summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/sound/pci/emu10k1/emu10k1_synth.c
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/sound/pci/emu10k1/emu10k1_synth.c
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/sound/pci/emu10k1/emu10k1_synth.c')
-rw-r--r--ANDROID_3.4.5/sound/pci/emu10k1/emu10k1_synth.c124
1 files changed, 0 insertions, 124 deletions
diff --git a/ANDROID_3.4.5/sound/pci/emu10k1/emu10k1_synth.c b/ANDROID_3.4.5/sound/pci/emu10k1/emu10k1_synth.c
deleted file mode 100644
index 4c41c903..00000000
--- a/ANDROID_3.4.5/sound/pci/emu10k1/emu10k1_synth.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (C) 2000 Takashi Iwai <tiwai@suse.de>
- *
- * Routines for control of EMU10K1 WaveTable synth
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "emu10k1_synth_local.h"
-#include <linux/init.h>
-#include <linux/module.h>
-
-MODULE_AUTHOR("Takashi Iwai");
-MODULE_DESCRIPTION("Routines for control of EMU10K1 WaveTable synth");
-MODULE_LICENSE("GPL");
-
-/*
- * create a new hardware dependent device for Emu10k1
- */
-static int snd_emu10k1_synth_new_device(struct snd_seq_device *dev)
-{
- struct snd_emux *emux;
- struct snd_emu10k1 *hw;
- struct snd_emu10k1_synth_arg *arg;
- unsigned long flags;
-
- arg = SNDRV_SEQ_DEVICE_ARGPTR(dev);
- if (arg == NULL)
- return -EINVAL;
-
- if (arg->seq_ports <= 0)
- return 0; /* nothing */
- if (arg->max_voices < 1)
- arg->max_voices = 1;
- else if (arg->max_voices > 64)
- arg->max_voices = 64;
-
- if (snd_emux_new(&emux) < 0)
- return -ENOMEM;
-
- snd_emu10k1_ops_setup(emux);
- hw = arg->hwptr;
- emux->hw = hw;
- emux->max_voices = arg->max_voices;
- emux->num_ports = arg->seq_ports;
- emux->pitch_shift = -501;
- emux->memhdr = hw->memhdr;
- /* maximum two ports */
- emux->midi_ports = arg->seq_ports < 2 ? arg->seq_ports : 2;
- /* audigy has two external midis */
- emux->midi_devidx = hw->audigy ? 2 : 1;
- emux->linear_panning = 0;
- emux->hwdep_idx = 2; /* FIXED */
-
- if (snd_emux_register(emux, dev->card, arg->index, "Emu10k1") < 0) {
- snd_emux_free(emux);
- return -ENOMEM;
- }
-
- spin_lock_irqsave(&hw->voice_lock, flags);
- hw->synth = emux;
- hw->get_synth_voice = snd_emu10k1_synth_get_voice;
- spin_unlock_irqrestore(&hw->voice_lock, flags);
-
- dev->driver_data = emux;
-
- return 0;
-}
-
-static int snd_emu10k1_synth_delete_device(struct snd_seq_device *dev)
-{
- struct snd_emux *emux;
- struct snd_emu10k1 *hw;
- unsigned long flags;
-
- if (dev->driver_data == NULL)
- return 0; /* not registered actually */
-
- emux = dev->driver_data;
-
- hw = emux->hw;
- spin_lock_irqsave(&hw->voice_lock, flags);
- hw->synth = NULL;
- hw->get_synth_voice = NULL;
- spin_unlock_irqrestore(&hw->voice_lock, flags);
-
- snd_emux_free(emux);
- return 0;
-}
-
-/*
- * INIT part
- */
-
-static int __init alsa_emu10k1_synth_init(void)
-{
-
- static struct snd_seq_dev_ops ops = {
- snd_emu10k1_synth_new_device,
- snd_emu10k1_synth_delete_device,
- };
- return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH, &ops,
- sizeof(struct snd_emu10k1_synth_arg));
-}
-
-static void __exit alsa_emu10k1_synth_exit(void)
-{
- snd_seq_device_unregister_driver(SNDRV_SEQ_DEV_ID_EMU10K1_SYNTH);
-}
-
-module_init(alsa_emu10k1_synth_init)
-module_exit(alsa_emu10k1_synth_exit)