summaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-10-04 02:17:22 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 07:55:32 -0700
commitd56b9b9c464a10ab1ee51a4c6190a2b57b8ef7a6 (patch)
treea48388734053900a8379042757ee241d1e9dfc7b /sound/oss
parent595182bcdf64fbfd7ae22c67ea6081b7d387d246 (diff)
[PATCH] The scheduled removal of some OSS drivers
This patch contains the scheduled removal of OSS drivers that: - have ALSA drivers for the same hardware without known regressions and - whose Kconfig options have been removed in 2.6.17. [michal.k.k.piotrowski@gmail.com: build fix] Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss')
-rw-r--r--sound/oss/Makefile49
-rw-r--r--sound/oss/ac97.c20
-rw-r--r--sound/oss/ac97.h3
-rw-r--r--sound/oss/ac97_codec.c89
-rw-r--r--sound/oss/ac97_plugin_ad1980.c126
-rw-r--r--sound/oss/ad1848.c4
-rw-r--r--sound/oss/ad1848.h1
-rw-r--r--sound/oss/ali5455.c3735
-rw-r--r--sound/oss/au1000.c2216
-rw-r--r--sound/oss/audio_syms.c2
-rw-r--r--sound/oss/awe_hw.h99
-rw-r--r--sound/oss/awe_wave.c6149
-rw-r--r--sound/oss/awe_wave.h77
-rw-r--r--sound/oss/cmpci.c3381
-rw-r--r--sound/oss/cs4281/Makefile6
-rw-r--r--sound/oss/cs4281/cs4281_hwdefs.h1234
-rw-r--r--sound/oss/cs4281/cs4281_wrapper-24.c41
-rw-r--r--sound/oss/cs4281/cs4281m.c4487
-rw-r--r--sound/oss/cs4281/cs4281pm-24.c45
-rw-r--r--sound/oss/cs4281/cs4281pm.h74
-rw-r--r--sound/oss/dm.h79
-rw-r--r--sound/oss/dmabuf.c30
-rw-r--r--sound/oss/es1370.c2819
-rw-r--r--sound/oss/esssolo1.c2516
-rw-r--r--sound/oss/forte.c2139
-rw-r--r--sound/oss/gus.h24
-rw-r--r--sound/oss/gus_card.c293
-rw-r--r--sound/oss/gus_hw.h50
-rw-r--r--sound/oss/gus_linearvol.h18
-rw-r--r--sound/oss/gus_midi.c256
-rw-r--r--sound/oss/gus_vol.c153
-rw-r--r--sound/oss/gus_wave.c3464
-rw-r--r--sound/oss/harmony.c1330
-rw-r--r--sound/oss/ics2101.c247
-rw-r--r--sound/oss/iwmem.h36
-rw-r--r--sound/oss/mad16.c1113
-rw-r--r--sound/oss/maestro.c3686
-rw-r--r--sound/oss/maestro.h60
-rw-r--r--sound/oss/maestro3.c2969
-rw-r--r--sound/oss/maestro3.h821
-rw-r--r--sound/oss/maui.c478
-rw-r--r--sound/oss/mpu401.c13
-rw-r--r--sound/oss/mpu401.h2
-rw-r--r--sound/oss/opl3sa.c329
-rw-r--r--sound/oss/rme96xx.c1857
-rw-r--r--sound/oss/rme96xx.h78
-rw-r--r--sound/oss/sequencer.c1
-rw-r--r--sound/oss/sequencer_syms.c7
-rw-r--r--sound/oss/sgalaxy.c207
-rw-r--r--sound/oss/sonicvibes.c2792
-rw-r--r--sound/oss/sound_calls.h2
-rw-r--r--sound/oss/tuning.h10
-rw-r--r--sound/oss/wavfront.c3554
-rw-r--r--sound/oss/wf_midi.c880
-rw-r--r--sound/oss/ymfpci.c2692
-rw-r--r--sound/oss/ymfpci.h361
-rw-r--r--sound/oss/ymfpci_image.h1565
-rw-r--r--sound/oss/yss225.c319
-rw-r--r--sound/oss/yss225.h24
59 files changed, 6 insertions, 59106 deletions
diff --git a/sound/oss/Makefile b/sound/oss/Makefile
index 86811792002f..8313757b6487 100644
--- a/sound/oss/Makefile
+++ b/sound/oss/Makefile
@@ -15,71 +15,42 @@ obj-$(CONFIG_SOUND_HAL2) += hal2.o
obj-$(CONFIG_SOUND_AEDSP16) += aedsp16.o
obj-$(CONFIG_SOUND_PSS) += pss.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_TRIX) += trix.o ad1848.o sb_lib.o uart401.o
-obj-$(CONFIG_SOUND_OPL3SA1) += opl3sa.o ad1848.o uart401.o
obj-$(CONFIG_SOUND_SSCAPE) += sscape.o ad1848.o mpu401.o
-obj-$(CONFIG_SOUND_MAD16) += mad16.o ad1848.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_CS4232) += cs4232.o uart401.o
obj-$(CONFIG_SOUND_MSS) += ad1848.o
obj-$(CONFIG_SOUND_OPL3SA2) += opl3sa2.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_PAS) += pas2.o sb.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_SB) += sb.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_KAHLUA) += kahlua.o
-obj-$(CONFIG_SOUND_WAVEFRONT) += wavefront.o
-obj-$(CONFIG_SOUND_MAUI) += maui.o mpu401.o
obj-$(CONFIG_SOUND_MPU401) += mpu401.o
obj-$(CONFIG_SOUND_UART6850) += uart6850.o
-obj-$(CONFIG_SOUND_GUS) += gus.o ad1848.o
obj-$(CONFIG_SOUND_ADLIB) += adlib_card.o opl3.o
obj-$(CONFIG_SOUND_YM3812) += opl3.o
obj-$(CONFIG_SOUND_VMIDI) += v_midi.o
obj-$(CONFIG_SOUND_VIDC) += vidc_mod.o
obj-$(CONFIG_SOUND_WAVEARTIST) += waveartist.o
-obj-$(CONFIG_SOUND_SGALAXY) += sgalaxy.o ad1848.o
obj-$(CONFIG_SOUND_AD1816) += ad1816.o
obj-$(CONFIG_SOUND_AD1889) += ad1889.o ac97_codec.o
obj-$(CONFIG_SOUND_ACI_MIXER) += aci.o
-obj-$(CONFIG_SOUND_AWE32_SYNTH) += awe_wave.o
obj-$(CONFIG_SOUND_VIA82CXXX) += via82cxxx_audio.o ac97_codec.o
ifeq ($(CONFIG_MIDI_VIA82CXXX),y)
obj-$(CONFIG_SOUND_VIA82CXXX) += sound.o uart401.o
endif
-obj-$(CONFIG_SOUND_YMFPCI) += ymfpci.o ac97_codec.o
-ifeq ($(CONFIG_SOUND_YMFPCI_LEGACY),y)
- obj-$(CONFIG_SOUND_YMFPCI) += opl3.o uart401.o
-endif
obj-$(CONFIG_SOUND_MSNDCLAS) += msnd.o msnd_classic.o
obj-$(CONFIG_SOUND_MSNDPIN) += msnd.o msnd_pinnacle.o
obj-$(CONFIG_SOUND_VWSND) += vwsnd.o
obj-$(CONFIG_SOUND_NM256) += nm256_audio.o ac97.o
obj-$(CONFIG_SOUND_ICH) += i810_audio.o ac97_codec.o
-obj-$(CONFIG_SOUND_SONICVIBES) += sonicvibes.o
-obj-$(CONFIG_SOUND_CMPCI) += cmpci.o
-ifeq ($(CONFIG_SOUND_CMPCI_FM),y)
- obj-$(CONFIG_SOUND_CMPCI) += sound.o opl3.o
-endif
-ifeq ($(CONFIG_SOUND_CMPCI_MIDI),y)
- obj-$(CONFIG_SOUND_CMPCI) += sound.o mpu401.o
-endif
-obj-$(CONFIG_SOUND_ES1370) += es1370.o
obj-$(CONFIG_SOUND_ES1371) += es1371.o ac97_codec.o
obj-$(CONFIG_SOUND_VRC5477) += nec_vrc5477.o ac97_codec.o
-obj-$(CONFIG_SOUND_AU1000) += au1000.o ac97_codec.o
obj-$(CONFIG_SOUND_AU1550_AC97) += au1550_ac97.o ac97_codec.o
-obj-$(CONFIG_SOUND_ESSSOLO1) += esssolo1.o
obj-$(CONFIG_SOUND_FUSION) += cs46xx.o ac97_codec.o
-obj-$(CONFIG_SOUND_MAESTRO) += maestro.o
-obj-$(CONFIG_SOUND_MAESTRO3) += maestro3.o ac97_codec.o
obj-$(CONFIG_SOUND_TRIDENT) += trident.o ac97_codec.o
-obj-$(CONFIG_SOUND_HARMONY) += harmony.o
obj-$(CONFIG_SOUND_EMU10K1) += ac97_codec.o
obj-$(CONFIG_SOUND_BCM_CS4297A) += swarm_cs4297a.o
-obj-$(CONFIG_SOUND_RME96XX) += rme96xx.o
obj-$(CONFIG_SOUND_BT878) += btaudio.o
-obj-$(CONFIG_SOUND_ALI5455) += ali5455.o ac97_codec.o
-obj-$(CONFIG_SOUND_FORTE) += forte.o ac97_codec.o
-obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o ac97_codec.o
obj-$(CONFIG_SOUND_WM97XX) += ac97_plugin_wm97xx.o
ifeq ($(CONFIG_MIDI_EMU10K1),y)
@@ -87,7 +58,6 @@ ifeq ($(CONFIG_MIDI_EMU10K1),y)
endif
obj-$(CONFIG_SOUND_EMU10K1) += emu10k1/
-obj-$(CONFIG_SOUND_CS4281) += cs4281/
obj-$(CONFIG_DMASOUND) += dmasound/
# Declare multi-part drivers.
@@ -98,17 +68,15 @@ sound-objs := \
midi_syms.o midi_synth.o midibuf.o \
sequencer.o sequencer_syms.o sound_timer.o sys_timer.o
-gus-objs := gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.o
pas2-objs := pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o
sb-objs := sb_card.o
sb_lib-objs := sb_common.o sb_audio.o sb_midi.o sb_mixer.o sb_ess.o
vidc_mod-objs := vidc.o vidc_fill.o
-wavefront-objs := wavfront.o wf_midi.o yss225.o
hostprogs-y := bin2hex hex2hex
# Files generated that shall be removed upon make clean
-clean-files := maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c \
+clean-files := msndperm.c msndinit.c pndsperm.c pndspini.c \
pss_boot.h trix_boot.h
# Firmware files that need translation
@@ -118,21 +86,6 @@ clean-files := maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c \
# will be forced to be remade.
#
-# Turtle Beach Maui / Tropez
-
-$(obj)/maui.o: $(obj)/maui_boot.h
-
-ifeq ($(CONFIG_MAUI_HAVE_BOOT),y)
- $(obj)/maui_boot.h: $(patsubst "%", %, $(CONFIG_MAUI_BOOT_FILE)) $(obj)/bin2hex
- $(obj)/bin2hex -i maui_os < $< > $@
-else
- $(obj)/maui_boot.h:
- ( \
- echo 'static unsigned char * maui_os = NULL;'; \
- echo 'static int maui_osLen = 0;'; \
- ) > $@
-endif
-
# Turtle Beach MultiSound
ifeq ($(CONFIG_MSNDCLAS_HAVE_BOOT),y)
diff --git a/sound/oss/ac97.c b/sound/oss/ac97.c
index 3ba6d91e891d..72cf4ed77937 100644
--- a/sound/oss/ac97.c
+++ b/sound/oss/ac97.c
@@ -112,25 +112,6 @@ ac97_init (struct ac97_hwint *dev)
return 0;
}
-/* Reset the mixer to the currently saved settings. */
-int
-ac97_reset (struct ac97_hwint *dev)
-{
- int x;
-
- if (dev->reset_device (dev))
- return -1;
-
- /* Now set the registers back to their last-written values. */
- for (x = 0; mixerRegs[x].ac97_regnum != -1; x++) {
- int regnum = mixerRegs[x].ac97_regnum;
- int value = dev->last_written_mixer_values [regnum / 2];
- if (value >= 0)
- ac97_put_register (dev, regnum, value);
- }
- return 0;
-}
-
/* Return the contents of register REG; use the cache if the value in it
is valid. Returns a negative error code on failure. */
static int
@@ -441,7 +422,6 @@ EXPORT_SYMBOL(ac97_init);
EXPORT_SYMBOL(ac97_set_values);
EXPORT_SYMBOL(ac97_put_register);
EXPORT_SYMBOL(ac97_mixer_ioctl);
-EXPORT_SYMBOL(ac97_reset);
MODULE_LICENSE("GPL");
diff --git a/sound/oss/ac97.h b/sound/oss/ac97.h
index 77d454ea3202..01837a9d7d6e 100644
--- a/sound/oss/ac97.h
+++ b/sound/oss/ac97.h
@@ -192,9 +192,6 @@ extern int ac97_put_register (struct ac97_hwint *dev, u8 reg, u16 value);
extern int ac97_mixer_ioctl (struct ac97_hwint *dev, unsigned int cmd,
void __user * arg);
-/* Do a complete reset on the AC97 mixer, restoring all mixer registers to
- the current values. Normally used after an APM resume event. */
-extern int ac97_reset (struct ac97_hwint *dev);
#endif
/*
diff --git a/sound/oss/ac97_codec.c b/sound/oss/ac97_codec.c
index 972327c97644..602db497929a 100644
--- a/sound/oss/ac97_codec.c
+++ b/sound/oss/ac97_codec.c
@@ -1399,95 +1399,6 @@ unsigned int ac97_set_adc_rate(struct ac97_codec *codec, unsigned int rate)
EXPORT_SYMBOL(ac97_set_adc_rate);
-int ac97_save_state(struct ac97_codec *codec)
-{
- return 0;
-}
-
-EXPORT_SYMBOL(ac97_save_state);
-
-int ac97_restore_state(struct ac97_codec *codec)
-{
- int i;
- unsigned int left, right, val;
-
- for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
- if (!supported_mixer(codec, i))
- continue;
-
- val = codec->mixer_state[i];
- right = val >> 8;
- left = val & 0xff;
- codec->write_mixer(codec, i, left, right);
- }
- return 0;
-}
-
-EXPORT_SYMBOL(ac97_restore_state);
-
-/**
- * ac97_register_driver - register a codec helper
- * @driver: Driver handler
- *
- * Register a handler for codecs matching the codec id. The handler
- * attach function is called for all present codecs and will be
- * called when new codecs are discovered.
- */
-
-int ac97_register_driver(struct ac97_driver *driver)
-{
- struct list_head *l;
- struct ac97_codec *c;
-
- mutex_lock(&codec_mutex);
- INIT_LIST_HEAD(&driver->list);
- list_add(&driver->list, &codec_drivers);
-
- list_for_each(l, &codecs)
- {
- c = list_entry(l, struct ac97_codec, list);
- if(c->driver != NULL || ((c->model ^ driver->codec_id) & driver->codec_mask))
- continue;
- if(driver->probe(c, driver))
- continue;
- c->driver = driver;
- }
- mutex_unlock(&codec_mutex);
- return 0;
-}
-
-EXPORT_SYMBOL_GPL(ac97_register_driver);
-
-/**
- * ac97_unregister_driver - unregister a codec helper
- * @driver: Driver handler
- *
- * Unregister a handler for codecs matching the codec id. The handler
- * remove function is called for all matching codecs.
- */
-
-void ac97_unregister_driver(struct ac97_driver *driver)
-{
- struct list_head *l;
- struct ac97_codec *c;
-
- mutex_lock(&codec_mutex);
- list_del_init(&driver->list);
-
- list_for_each(l, &codecs)
- {
- c = list_entry(l, struct ac97_codec, list);
- if (c->driver == driver) {
- driver->remove(c, driver);
- c->driver = NULL;
- }
- }
-
- mutex_unlock(&codec_mutex);
-}
-
-EXPORT_SYMBOL_GPL(ac97_unregister_driver);
-
static int swap_headphone(int remove_master)
{
struct list_head *l;
diff --git a/sound/oss/ac97_plugin_ad1980.c b/sound/oss/ac97_plugin_ad1980.c
deleted file mode 100644
index 24a9acd28160..000000000000
--- a/sound/oss/ac97_plugin_ad1980.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- ac97_plugin_ad1980.c Copyright (C) 2003 Red Hat, Inc. All rights reserved.
-
- The contents of this file are subject to the Open Software License version 1.1
- that can be found at http://www.opensource.org/licenses/osl-1.1.txt and is
- included herein by reference.
-
- Alternatively, the contents of this file may be used under the
- terms of the GNU General Public License version 2 (the "GPL") as
- distributed in the kernel source COPYING file, in which
- case the provisions of the GPL are applicable instead of the
- above. If you wish to allow the use of your version of this file
- only under the terms of the GPL and not to allow others to use
- your version of this file under the OSL, indicate your decision
- by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL. If you do not delete
- the provisions above, a recipient may use your version of this
- file under either the OSL or the GPL.
-
- Authors: Alan Cox <alan@redhat.com>
-
- This is an example codec plugin. This one switches the connections
- around to match the setups some vendors use with audio switched to
- non standard front connectors not the normal rear ones
-
- This code primarily exists to demonstrate how to use the codec
- interface
-
-*/
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/ac97_codec.h>
-
-/**
- * ad1980_remove - codec remove callback
- * @codec: The codec that is being removed
- *
- * This callback occurs when an AC97 codec is being removed. A
- * codec remove call will not occur for a codec during that codec
- * probe callback.
- *
- * Most drivers will need to lock their remove versus their
- * use of the codec after the probe function.
- */
-
-static void __devexit ad1980_remove(struct ac97_codec *codec, struct ac97_driver *driver)
-{
- /* Nothing to do in the simple example */
-}
-
-
-/**
- * ad1980_probe - codec found callback
- * @codec: ac97 codec matching the idents
- * @driver: ac97_driver it matched
- *
- * This entry point is called when a codec is found which matches
- * the driver. At the point it is called the codec is basically
- * operational, mixer operations have been initialised and can
- * be overriden. Called in process context. The field driver_private
- * is available for the driver to use to store stuff.
- *
- * The caller can claim the device by returning zero, or return
- * a negative error code.
- */
-
-static int ad1980_probe(struct ac97_codec *codec, struct ac97_driver *driver)
-{
- u16 control;
-
-#define AC97_AD_MISC 0x76
-
- /* Switch the inputs/outputs over (from Dell code) */
- control = codec->codec_read(codec, AC97_AD_MISC);
- codec->codec_write(codec, AC97_AD_MISC, control | 0x4420);
-
- /* We could refuse the device since we dont need to hang around,
- but we will claim it */
- return 0;
-}
-
-
-static struct ac97_driver ad1980_driver = {
- .codec_id = 0x41445370,
- .codec_mask = 0xFFFFFFFF,
- .name = "AD1980 example",
- .probe = ad1980_probe,
- .remove = __devexit_p(ad1980_remove),
-};
-
-/**
- * ad1980_exit - module exit path
- *
- * Our module is being unloaded. At this point unregister_driver
- * will call back our remove handler for any existing codecs. You
- * may not unregister_driver from interrupt context or from a
- * probe/remove callback.
- */
-
-static void ad1980_exit(void)
-{
- ac97_unregister_driver(&ad1980_driver);
-}
-
-/**
- * ad1980_init - set up ad1980 handlers
- *
- * After we call the register function it will call our probe
- * function for each existing matching device before returning to us.
- * Any devices appearing afterwards whose id's match the codec_id
- * will also cause the probe function to be called.
- * You may not register_driver from interrupt context or from a
- * probe/remove callback.
- */
-
-static int ad1980_init(void)
-{
- return ac97_register_driver(&ad1980_driver);
-}
-
-module_init(ad1980_init);
-module_exit(ad1980_exit);
-MODULE_LICENSE("GPL");
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
index f6b6b886c2ad..257b7536fb18 100644
--- a/sound/oss/ad1848.c
+++ b/sound/oss/ad1848.c
@@ -195,6 +195,7 @@ static void ad1848_halt(int dev);
static void ad1848_halt_input(int dev);
static void ad1848_halt_output(int dev);
static void ad1848_trigger(int dev, int bits);
+static irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy);
#ifndef EXCLUDE_TIMERS
static int ad1848_tmr_install(int dev);
@@ -2195,7 +2196,7 @@ void ad1848_unload(int io_base, int irq, int dma_playback, int dma_capture, int
printk(KERN_ERR "ad1848: Can't find device to be unloaded. Base=%x\n", io_base);
}
-irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy)
+static irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy)
{
unsigned char status;
ad1848_info *devc;
@@ -2802,7 +2803,6 @@ EXPORT_SYMBOL(ad1848_detect);
EXPORT_SYMBOL(ad1848_init);
EXPORT_SYMBOL(ad1848_unload);
EXPORT_SYMBOL(ad1848_control);
-EXPORT_SYMBOL(adintr);
EXPORT_SYMBOL(probe_ms_sound);
EXPORT_SYMBOL(attach_ms_sound);
EXPORT_SYMBOL(unload_ms_sound);
diff --git a/sound/oss/ad1848.h b/sound/oss/ad1848.h
index d0573b023973..b95ebe28d426 100644
--- a/sound/oss/ad1848.h
+++ b/sound/oss/ad1848.h
@@ -18,7 +18,6 @@ void ad1848_unload (int io_base, int irq, int dma_playback, int dma_capture, int
int ad1848_detect (struct resource *ports, int *flags, int *osp);
int ad1848_control(int cmd, int arg);
-irqreturn_t adintr(int irq, void *dev_id, struct pt_regs * dummy);
void attach_ms_sound(struct address_info * hw_config, struct resource *ports, struct module * owner);
int probe_ms_sound(struct address_info *hw_config, struct resource *ports);
diff --git a/sound/oss/ali5455.c b/sound/oss/ali5455.c
deleted file mode 100644
index 70dcd703a66f..000000000000
--- a/sound/oss/ali5455.c
+++ /dev/null
@@ -1,3735 +0,0 @@
-/*
- * ALI ali5455 and friends ICH driver for Linux
- * LEI HU <Lei_Hu@ali.com.tw>
- *
- * Built from:
- * drivers/sound/i810_audio
- *
- * The ALi 5455 is similar but not quite identical to the Intel ICH
- * series of controllers. Its easier to keep the driver separated from
- * the i810 driver.
- *
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
- * ALi 5455 theory of operation
- *
- * The chipset provides three DMA channels that talk to an AC97
- * CODEC (AC97 is a digital/analog mixer standard). At its simplest
- * you get 48Khz audio with basic volume and mixer controls. At the
- * best you get rate adaption in the codec. We set the card up so
- * that we never take completion interrupts but instead keep the card
- * chasing its tail around a ring buffer. This is needed for mmap
- * mode audio and happens to work rather well for non-mmap modes too.
- *
- * The board has one output channel for PCM audio (supported) and
- * a stereo line in and mono microphone input. Again these are normally
- * locked to 48Khz only. Right now recording is not finished.
- *
- * There is no midi support, no synth support. Use timidity. To get
- * esd working you need to use esd -r 48000 as it won't probe 48KHz
- * by default. mpg123 can't handle 48Khz only audio so use xmms.
- *
- * If you need to force a specific rate set the clocking= option
- *
- */
-
-#include <linux/module.h>
-#include <linux/string.h>
-#include <linux/ctype.h>
-#include <linux/ioport.h>
-#include <linux/sched.h>
-#include <linux/delay.h>
-#include <linux/sound.h>
-#include <linux/slab.h>
-#include <linux/soundcard.h>
-#include <linux/pci.h>
-#include <asm/io.h>
-#include <asm/dma.h>
-#include <linux/init.h>
-#include <linux/poll.h>
-#include <linux/spinlock.h>
-#include <linux/smp_lock.h>
-#include <linux/ac97_codec.h>
-#include <linux/interrupt.h>
-#include <linux/mutex.h>
-
-#include <asm/uaccess.h>
-
-#ifndef PCI_DEVICE_ID_ALI_5455
-#define PCI_DEVICE_ID_ALI_5455 0x5455
-#endif
-
-#ifndef PCI_VENDOR_ID_ALI
-#define PCI_VENDOR_ID_ALI 0x10b9
-#endif
-
-static int strict_clocking = 0;
-static unsigned int clocking = 0;
-static unsigned int codec_pcmout_share_spdif_locked = 0;
-static unsigned int codec_independent_spdif_locked = 0;
-static unsigned int controller_pcmout_share_spdif_locked = 0;
-static unsigned int controller_independent_spdif_locked = 0;
-static unsigned int globel = 0;
-
-#define ADC_RUNNING 1
-#define DAC_RUNNING 2
-#define CODEC_SPDIFOUT_RUNNING 8
-#define CONTROLLER_SPDIFOUT_RUNNING 4
-
-#define SPDIF_ENABLE_OUTPUT 4 /* bits 0,1 are PCM */
-
-#define ALI5455_FMT_16BIT 1
-#define ALI5455_FMT_STEREO 2
-#define ALI5455_FMT_MASK 3
-
-#define SPDIF_ON 0x0004
-#define SURR_ON 0x0010
-#define CENTER_LFE_ON 0x0020
-#define VOL_MUTED 0x8000
-
-
-#define ALI_SPDIF_OUT_CH_STATUS 0xbf
-/* the 810's array of pointers to data buffers */
-
-struct sg_item {
-#define BUSADDR_MASK 0xFFFFFFFE
- u32 busaddr;
-#define CON_IOC 0x80000000 /* interrupt on completion */
-#define CON_BUFPAD 0x40000000 /* pad underrun with last sample, else 0 */
-#define CON_BUFLEN_MASK 0x0000ffff /* buffer length in samples */
- u32 control;
-};
-
-/* an instance of the ali channel */
-#define SG_LEN 32
-struct ali_channel {
- /* these sg guys should probably be allocated
- separately as nocache. Must be 8 byte aligned */
- struct sg_item sg[SG_LEN]; /* 32*8 */
- u32 offset; /* 4 */
- u32 port; /* 4 */
- u32 used;
- u32 num;
-};
-
-/*
- * we have 3 separate dma engines. pcm in, pcm out, and mic.
- * each dma engine has controlling registers. These goofy
- * names are from the datasheet, but make it easy to write
- * code while leafing through it.
- */
-
-#define ENUM_ENGINE(PRE,DIG) \
-enum { \<