summaryrefslogtreecommitdiffstats
path: root/drivers/sound
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-19 01:28:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-19 01:28:40 +0000
commit8abb719409c9060a7c0676f76e9182c1e0b8ca46 (patch)
treeb88cc5a6cd513a04a512b7e6215c873c90a1c5dd /drivers/sound
parentf01bd7aeafd95a08aafc9e3636bb26974df69d82 (diff)
Merge with 2.3.99-pre1.
Diffstat (limited to 'drivers/sound')
-rw-r--r--drivers/sound/Config.in5
-rw-r--r--drivers/sound/Makefile37
-rw-r--r--drivers/sound/dev_table.c2
-rw-r--r--drivers/sound/dev_table.h36
-rw-r--r--drivers/sound/dmabuf.c8
-rw-r--r--drivers/sound/miroaci.h1
-rw-r--r--drivers/sound/mpu401.c21
-rw-r--r--drivers/sound/sb_card.c2
-rw-r--r--drivers/sound/sound_core.c112
-rw-r--r--drivers/sound/sound_firmware.c18
-rw-r--r--drivers/sound/soundcard.c57
-rw-r--r--drivers/sound/waveartist.c12
12 files changed, 208 insertions, 103 deletions
diff --git a/drivers/sound/Config.in b/drivers/sound/Config.in
index 1d74abb50..947e0294e 100644
--- a/drivers/sound/Config.in
+++ b/drivers/sound/Config.in
@@ -81,11 +81,14 @@ fi
dep_tristate ' OSS sound modules' CONFIG_SOUND_OSS $CONFIG_SOUND
if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then
+ bool ' Verbose initialisation' CONFIG_SOUND_TRACEINIT
+ bool ' Persistent DMA buffers' CONFIG_SOUND_DMAP
+
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
dep_tristate ' AD1816(A) based cards (EXPERIMENTAL)' CONFIG_SOUND_AD1816 $CONFIG_SOUND
fi
-
dep_tristate ' Aztech Sound Galaxy (non-PnP) cards' CONFIG_SOUND_SGALAXY $CONFIG_SOUND_OSS
+ dep_tristate ' Adlib Cards' CONFIG_SOUND_ADLIB $CONFIG_SOUND_OSS
dep_tristate ' ACI mixer (miroPCM12)' CONFIG_SOUND_ACI_MIXER $CONFIG_SOUND_OSS
dep_tristate ' Crystal CS4232 based (PnP) cards' CONFIG_SOUND_CS4232 $CONFIG_SOUND_OSS
dep_tristate ' Ensoniq SoundScape support' CONFIG_SOUND_SSCAPE $CONFIG_SOUND_OSS
diff --git a/drivers/sound/Makefile b/drivers/sound/Makefile
index 6a3576df0..5b4d35c8c 100644
--- a/drivers/sound/Makefile
+++ b/drivers/sound/Makefile
@@ -44,26 +44,27 @@ obj-$(CONFIG_SOUND_CS4232) += cs4232.o ad1848.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_SOFTOSS) += softoss2.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_OPL3SA1) += opl3sa.o ad1848.o uart401.o
+obj-$(CONFIG_SOUND_SOFTOSS) += softoss2.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_OPL3SA2) += opl3sa2.o ad1848.o uart401.o mpu401.o
-obj-$(CONFIG_SOUND_MSS) += ad1848.o
-obj-$(CONFIG_SOUND_PAS) += pas2.o sb_lib.o uart401.o
-obj-$(CONFIG_SOUND_SB) += sb.o sb_lib.o uart401.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_OPL3SA2) += opl3sa2.o ad1848.o uart401.o mpu401.o
+obj-$(CONFIG_SOUND_MSS) += ad1848.o
+obj-$(CONFIG_SOUND_PAS) += pas2.o sb_lib.o uart401.o
+obj-$(CONFIG_SOUND_SB) += sb.o sb_lib.o uart401.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_YM3812) += adlib_card.o 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_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_ACI_MIXER) += aci.o
obj-$(CONFIG_SOUND_AWE32_SYNTH) += awe_wave.o
diff --git a/drivers/sound/dev_table.c b/drivers/sound/dev_table.c
index 52d4d79f8..99a4d8f44 100644
--- a/drivers/sound/dev_table.c
+++ b/drivers/sound/dev_table.c
@@ -17,8 +17,6 @@
#include "sound_config.h"
int softoss_dev = 0;
-int sound_started = 0;
-int sndtable_get_cardcount(void);
int sound_install_audiodrv(int vers, char *name, struct audio_driver *driver,
int driver_size, int flags, unsigned int format_mask,
diff --git a/drivers/sound/dev_table.h b/drivers/sound/dev_table.h
index db2b141d6..a5525a4bf 100644
--- a/drivers/sound/dev_table.h
+++ b/drivers/sound/dev_table.h
@@ -43,8 +43,6 @@
* NOTE! NOTE! NOTE! NOTE!
*/
-extern int sound_started;
-
struct driver_info
{
char *driver_id;
@@ -350,11 +348,14 @@ struct sound_timer_operations
#ifdef _DEV_TABLE_C_
-struct audio_operations *audio_devs[MAX_AUDIO_DEV] = {NULL}; int num_audiodevs = 0;
-struct mixer_operations *mixer_devs[MAX_MIXER_DEV] = {NULL}; int num_mixers = 0;
-struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV] = {NULL}; int num_synths = 0;
-struct midi_operations *midi_devs[MAX_MIDI_DEV] = {NULL}; int num_midis = 0;
-
+struct audio_operations *audio_devs[MAX_AUDIO_DEV] = {NULL};
+int num_audiodevs = 0;
+struct mixer_operations *mixer_devs[MAX_MIXER_DEV] = {NULL};
+int num_mixers = 0;
+struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV] = {NULL};
+int num_synths = 0;
+struct midi_operations *midi_devs[MAX_MIDI_DEV] = {NULL};
+int num_midis = 0;
#ifndef EXCLUDE_TIMERS
extern struct sound_timer_operations default_sound_timer;
struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = {
@@ -370,18 +371,17 @@ int num_sound_timers = 0;
#else
-extern struct audio_operations * audio_devs[MAX_AUDIO_DEV]; extern int num_audiodevs;
-extern struct mixer_operations * mixer_devs[MAX_MIXER_DEV]; extern int num_mixers;
-extern struct synth_operations * synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV]; extern int num_synths;
-extern struct midi_operations * midi_devs[MAX_MIDI_DEV]; extern int num_midis;
-extern struct sound_timer_operations * sound_timer_devs[MAX_TIMER_DEV]; extern int num_sound_timers;
+extern struct audio_operations *audio_devs[MAX_AUDIO_DEV];
+extern int num_audiodevs;
+extern struct mixer_operations *mixer_devs[MAX_MIXER_DEV];
+extern int num_mixers;
+extern struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV];
+extern int num_synths;
+extern struct midi_operations *midi_devs[MAX_MIDI_DEV];
+extern int num_midis;
+extern struct sound_timer_operations * sound_timer_devs[MAX_TIMER_DEV];
+extern int num_sound_timers;
#endif /* _DEV_TABLE_C_ */
-void setup_cards(void);
-int sndtable_get_cardcount (void);
-void sound_chconf(int card_type, int ioaddr, int irq, int dma);
-int snd_find_driver(int type);
-void sound_unload_driver(int type);
-int sndtable_identify_card(char *name);
extern int sound_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc *info);
int sndtable_probe (int unit, struct address_info *hw_config);
diff --git a/drivers/sound/dmabuf.c b/drivers/sound/dmabuf.c
index c0edb593f..ce5e4f732 100644
--- a/drivers/sound/dmabuf.c
+++ b/drivers/sound/dmabuf.c
@@ -66,6 +66,14 @@ static int sound_alloc_dmap(struct dma_buffparms *dmap)
if (dma_buffsize < 4096)
dma_buffsize = 4096;
dma_pagesize = (dmap->dma < 4) ? (64 * 1024) : (128 * 1024);
+
+ /*
+ * Now check for the Cyrix problem.
+ */
+
+ if(isa_dma_bridge_buggy==2)
+ dma_pagesize=32768;
+
dmap->raw_buf = NULL;
dmap->buffsize = dma_buffsize;
if (dmap->buffsize > dma_pagesize)
diff --git a/drivers/sound/miroaci.h b/drivers/sound/miroaci.h
index 9fea58a53..ee4e01d1f 100644
--- a/drivers/sound/miroaci.h
+++ b/drivers/sound/miroaci.h
@@ -1,4 +1,3 @@
-#include <linux/config.h>
extern int aci_implied_cmd(unsigned char opcode);
extern int aci_write_cmd(unsigned char opcode, unsigned char parameter);
extern int aci_write_cmd_d(unsigned char opcode, unsigned char parameter, unsigned char parameter2);
diff --git a/drivers/sound/mpu401.c b/drivers/sound/mpu401.c
index 2757659ac..a329f0e72 100644
--- a/drivers/sound/mpu401.c
+++ b/drivers/sound/mpu401.c
@@ -1726,25 +1726,24 @@ int init_mpu401(void)
{
/* Can be loaded either for module use or to provide functions
to others */
- cfg.irq = irq;
- cfg.io_base = io;
-
- if (cfg.io_base != -1 && cfg.irq != -1) {
- printk(KERN_WARNING "mpu401: need io and irq !");
- return -ENODEV;
+ if (io != -1 && irq != -1) {
+ cfg.irq = irq;
+ cfg.io_base = io;
+ if (probe_mpu401(&cfg) == 0)
+ return -ENODEV;
+ attach_mpu401(&cfg);
}
- if (probe_mpu401(&cfg) == 0)
- return -ENODEV;
- attach_mpu401(&cfg);
-
SOUND_LOCK;
return 0;
}
void cleanup_mpu401(void)
{
- unload_mpu401(&cfg);
+ if (io != -1 && irq != -1) {
+ /* Check for use by, for example, sscape driver */
+ unload_mpu401(&cfg);
+ }
SOUND_LOCK_END;
}
diff --git a/drivers/sound/sb_card.c b/drivers/sound/sb_card.c
index 40804417c..c471163ef 100644
--- a/drivers/sound/sb_card.c
+++ b/drivers/sound/sb_card.c
@@ -399,7 +399,6 @@ static struct pci_dev *sb_init_diamond(struct pci_bus *bus, struct pci_dev *card
/* @X@0001:mpu
*/
-#ifdef CONFIG_MIDI
if((mpu_dev = isapnp_find_dev(bus,
ISAPNP_VENDOR('@','X','@'), ISAPNP_FUNCTION(0x0001), NULL)))
{
@@ -413,7 +412,6 @@ static struct pci_dev *sb_init_diamond(struct pci_bus *bus, struct pci_dev *card
}
else
printk(KERN_ERR "sb: DT0197H panic: mpu not found\n");
-#endif
/* @P@:Gameport
diff --git a/drivers/sound/sound_core.c b/drivers/sound/sound_core.c
index 923b46e90..217bdb605 100644
--- a/drivers/sound/sound_core.c
+++ b/drivers/sound/sound_core.c
@@ -217,6 +217,16 @@ static void sound_remove_unit(struct sound_unit **list, int unit)
static struct sound_unit *chains[16];
+/**
+ * register_sound_special
+ * @fops: File operations for the driver
+ * @unit: Unit number to allocate
+ *
+ * Allocate a special sound device by minor number from the sound
+ * subsystem. The allocated number is returned on succes. On failure
+ * a negative error code is returned.
+ */
+
int register_sound_special(struct file_operations *fops, int unit)
{
char *name;
@@ -240,8 +250,8 @@ int register_sound_special(struct file_operations *fops, int unit)
case 5:
name = "unknown5";
break;
- case 6:
- name = "sndstat";
+ case 6: /* Was once sndstat */
+ name = "unknown6";
break;
case 7:
name = "unknown7";
@@ -272,23 +282,43 @@ int register_sound_special(struct file_operations *fops, int unit)
break;
}
return sound_insert_unit(&chains[unit&15], fops, -1, unit, unit+1,
- name, S_IRUGO | S_IWUGO);
+ name, S_IRUSR | S_IWUSR);
}
EXPORT_SYMBOL(register_sound_special);
+/**
+ * register_sound_mixer
+ * @fops: File operations for the driver
+ * @dev: Unit number to allocate
+ *
+ * Allocate a mixer device. Unit is the number of the mixer requested.
+ * Pass -1 to request the next free mixer unit. On success the allocated
+ * number is returned, on failure a negative error code is returned.
+ */
+
int register_sound_mixer(struct file_operations *fops, int dev)
{
return sound_insert_unit(&chains[0], fops, dev, 0, 128,
- "mixer", S_IRUGO | S_IWUGO);
+ "mixer", S_IRUSR | S_IWUSR);
}
EXPORT_SYMBOL(register_sound_mixer);
+/**
+ * register_sound_midi
+ * @fops: File operations for the driver
+ * @dev: Unit number to allocate
+ *
+ * Allocate a midi device. Unit is the number of the midi device requested.
+ * Pass -1 to request the next free midi unit. On success the allocated
+ * number is returned, on failure a negative error code is returned.
+ */
+
int register_sound_midi(struct file_operations *fops, int dev)
{
return sound_insert_unit(&chains[2], fops, dev, 2, 130,
- "midi", S_IRUGO | S_IWUGO);
+ "midi", S_IRUSR | S_IWUSR);
}
EXPORT_SYMBOL(register_sound_midi);
@@ -298,22 +328,55 @@ EXPORT_SYMBOL(register_sound_midi);
* in open - see below.
*/
+/**
+ * register_sound_dsp
+ * @fops: File operations for the driver
+ * @dev: Unit number to allocate
+ *
+ * Allocate a DSP device. Unit is the number of the DSP requested.
+ * Pass -1 to request the next free DSP unit. On success the allocated
+ * number is returned, on failure a negative error code is returned.
+ *
+ * This function allocates both the audio and dsp device entries together
+ * and will always allocate them as a matching pair - eg dsp3/audio3
+ */
+
int register_sound_dsp(struct file_operations *fops, int dev)
{
return sound_insert_unit(&chains[3], fops, dev, 3, 131,
- "dsp", S_IWUGO | S_IRUSR | S_IRGRP);
+ "dsp", S_IWUSR | S_IRUSR);
}
EXPORT_SYMBOL(register_sound_dsp);
+/**
+ * register_sound_synth
+ * @fops: File operations for the driver
+ * @dev: Unit number to allocate
+ *
+ * Allocate a synth device. Unit is the number of the synth device requested.
+ * Pass -1 to request the next free synth unit. On success the allocated
+ * number is returned, on failure a negative error code is returned.
+ */
+
+
int register_sound_synth(struct file_operations *fops, int dev)
{
return sound_insert_unit(&chains[9], fops, dev, 9, 137,
- "synth", S_IRUGO | S_IWUGO);
+ "synth", S_IRUSR | S_IWUSR);
}
EXPORT_SYMBOL(register_sound_synth);
+/**
+ * unregister_sound_special
+ * @unit: Unit number to allocate
+ *
+ * Release a sound device that was allocated with register_sound_special.
+ * The unit passed is the return value from the register function.
+ */
+
+
void unregister_sound_special(int unit)
{
sound_remove_unit(&chains[unit&15], unit);
@@ -321,6 +384,14 @@ void unregister_sound_special(int unit)
EXPORT_SYMBOL(unregister_sound_special);
+/**
+ * unregister_sound_mixer
+ * @unit: Unit number to allocate
+ *
+ * Release a sound device that was allocated with register_sound_mixer.
+ * The unit passed is the return value from the register function.
+ */
+
void unregister_sound_mixer(int unit)
{
sound_remove_unit(&chains[0], unit);
@@ -328,6 +399,14 @@ void unregister_sound_mixer(int unit)
EXPORT_SYMBOL(unregister_sound_mixer);
+/**
+ * unregister_sound_midi
+ * @unit: Unit number to allocate
+ *
+ * Release a sound device that was allocated with register_sound_midi.
+ * The unit passed is the return value from the register function.
+ */
+
void unregister_sound_midi(int unit)
{
return sound_remove_unit(&chains[2], unit);
@@ -335,13 +414,32 @@ void unregister_sound_midi(int unit)
EXPORT_SYMBOL(unregister_sound_midi);
+/**
+ * unregister_sound_dsp
+ * @unit: Unit number to allocate
+ *
+ * Release a sound device that was allocated with register_sound_dsp.
+ * The unit passed is the return value from the register function.
+ *
+ * Both of the allocated units are released together automatically.
+ */
+
void unregister_sound_dsp(int unit)
{
return sound_remove_unit(&chains[3], unit);
}
+
EXPORT_SYMBOL(unregister_sound_dsp);
+/**
+ * unregister_sound_synth
+ * @unit: Unit number to allocate
+ *
+ * Release a sound device that was allocated with register_sound_synth.
+ * The unit passed is the return value from the register function.
+ */
+
void unregister_sound_synth(int unit)
{
return sound_remove_unit(&chains[9], unit);
diff --git a/drivers/sound/sound_firmware.c b/drivers/sound/sound_firmware.c
index c446e98e0..393e6a780 100644
--- a/drivers/sound/sound_firmware.c
+++ b/drivers/sound/sound_firmware.c
@@ -47,6 +47,24 @@ static int do_mod_firmware_load(const char *fn, char **fp)
return (int) l;
}
+/**
+ * mod_firmware_load - load sound driver firmware
+ * @fn: filename
+ * @fp: return for the buffer.
+ *
+ * Load the firmware for a sound module (up to 128K) into a buffer.
+ * The buffer is returned in *fp. It is allocated with vmalloc so is
+ * virtually linear and not DMAable. The caller should free it with
+ * vfree when finished.
+ *
+ * The length of the buffer is returned on a successful load, the
+ * value zero on a failure.
+ *
+ * Caution: This API is not recommended. Firmware should be loaded via
+ * an ioctl call and a setup application. This function may disappear
+ * in future.
+ */
+
int mod_firmware_load(const char *fn, char **fp)
{
int r;
diff --git a/drivers/sound/soundcard.c b/drivers/sound/soundcard.c
index 00f8b6e7b..f3b008f0c 100644
--- a/drivers/sound/soundcard.c
+++ b/drivers/sound/soundcard.c
@@ -74,7 +74,12 @@ caddr_t sound_mem_blocks[1024];
int sound_nblocks = 0;
/* Persistent DMA buffers */
-int sound_dmap_flag = 0;
+#ifdef CONFIG_SOUND_DMAP
+int sound_dmap_flag = 1;
+#else
+int sound_dmap_flag = 0;
+#endif
+
static int soundcard_configured = 0;
static char dma_alloc_map[MAX_DMA_CHANNELS] = {0};
@@ -92,8 +97,6 @@ unsigned long seq_time = 0; /* Time for /dev/sequencer */
static mixer_vol_table mixer_vols[MAX_MIXER_DEV];
static int num_mixer_volumes = 0;
-int traceinit = 0;
-
int *load_mixer_volumes(char *name, int *levels, int present)
{
int i, n;
@@ -637,11 +640,6 @@ soundcard_init(void)
soundcard_configured = 1;
-#if defined(CONFIG_LOWLEVEL_SOUND) && !defined(MODULE)
- sound_preinit_lowlevel_drivers();
- sound_init_lowlevel_drivers();
-#endif
-
audio_init_devices();
soundcard_register_devfs(1); /* register after we know # of devices */
@@ -663,38 +661,15 @@ static int sound[20] = {
static int dmabuf = 0;
static int dmabug = 0;
-MODULE_PARM(traceinit, "i");
MODULE_PARM(dmabuf, "i");
MODULE_PARM(dmabug, "i");
int init_module(void)
{
int err;
-#if FIXED_FOR_2_4_0
- int ints[21];
- int i;
-#endif
-#ifdef HAS_BRIDGE_BUGGY_FUNC
if(dmabug)
isa_dma_bridge_buggy = dmabug;
-#else
- if(dmabug)
- printk(KERN_ERR "sound: rebuild with PCI_QUIRKS enabled to configure this.\n");
-#endif
-
-#if FIXED_FOR_2_4_0
- /*
- * "sound=" command line handling by Harald Milz.
- */
- i = 0;
- while (i < 20 && sound[i])
- ints[i + 1] = sound[i++];
- ints[0] = i;
-
- if (i)
- sound_setup("sound=", ints);
-#endif
err = create_special_devices();
if (err)
@@ -730,13 +705,6 @@ void cleanup_module(void)
sound_stop_timer();
-#ifdef CONFIG_LOWLEVEL_SOUND
- {
- extern void sound_unload_lowlevel_drivers(void);
-
- sound_unload_lowlevel_drivers();
- }
-#endif
sequencer_unload();
for (i = 0; i < MAX_DMA_CHANNELS; i++)
@@ -855,8 +823,9 @@ void sound_stop_timer(void)
void conf_printf(char *name, struct address_info *hw_config)
{
- if (!traceinit)
- return;
+#ifndef CONFIG_SOUND_TRACEINIT
+ return;
+#else
printk("<%s> at 0x%03x", name, hw_config->io_base);
if (hw_config->irq)
@@ -869,13 +838,14 @@ void conf_printf(char *name, struct address_info *hw_config)
printk(",%d", hw_config->dma2);
}
printk("\n");
+#endif
}
void conf_printf2(char *name, int base, int irq, int dma, int dma2)
{
- if (!traceinit)
- return;
-
+#ifndef CONFIG_SOUND_TRACEINIT
+ return;
+#else
printk("<%s> at 0x%03x", name, base);
if (irq)
@@ -888,6 +858,7 @@ void conf_printf2(char *name, int base, int irq, int dma, int dma2)
printk(",%d", dma2);
}
printk("\n");
+#endif
}
/*
diff --git a/drivers/sound/waveartist.c b/drivers/sound/waveartist.c
index d1631defd..75d1a8977 100644
--- a/drivers/sound/waveartist.c
+++ b/drivers/sound/waveartist.c
@@ -1771,6 +1771,18 @@ MODULE_PARM(dma2, "i"); /* DMA2 */
static int __init init_waveartist(void)
{
+ if (!io && machine_is_netwinder()) {
+ /*
+ * The NetWinder WaveArtist is at a fixed address.
+ * If the user does not supply an address, use the
+ * well-known parameters.
+ */
+ io = 0x250;
+ irq = 12;
+ dma = 3;
+ dma2 = 7;
+ }
+
cfg.io_base = io;
cfg.irq = irq;
cfg.dma = dma;