diff options
Diffstat (limited to 'sound')
35 files changed, 206 insertions, 493 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 91114c7aeff5..c5978d6c6080 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -1682,7 +1682,7 @@ static void snd_pcm_oss_init_substream(struct snd_pcm_substream *substream, substream->oss.setup = *setup; if (setup->nonblock) substream->ffile->f_flags |= O_NONBLOCK; - else + else if (setup->block) substream->ffile->f_flags &= ~O_NONBLOCK; runtime = substream->runtime; runtime->oss.params = 1; @@ -1757,10 +1757,11 @@ static int snd_pcm_oss_open_file(struct file *file, } pcm_oss_file->streams[idx] = substream; + substream->file = pcm_oss_file; snd_pcm_oss_init_substream(substream, &setup[idx], minor); } - if (! pcm_oss_file->streams[0] && pcm_oss_file->streams[1]) { + if (!pcm_oss_file->streams[0] && !pcm_oss_file->streams[1]) { snd_pcm_oss_release_file(pcm_oss_file); return -EINVAL; } @@ -1809,7 +1810,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file) err = -EFAULT; goto __error; } - memset(setup, 0, sizeof(*setup)); + memset(setup, 0, sizeof(setup)); if (file->f_mode & FMODE_WRITE) snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK, task_name, &setup[0]); diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 5d7eb123b999..122e10a61ab9 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -196,7 +196,7 @@ static char *snd_pcm_format_names[] = { FORMAT(U18_3BE), }; -const char *snd_pcm_format_name(snd_pcm_format_t format) +static const char *snd_pcm_format_name(snd_pcm_format_t format) { return snd_pcm_format_names[format]; } diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 964e4c47a7f1..0860c5a84502 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2007,14 +2007,16 @@ static void pcm_release_private(struct snd_pcm_substream *substream) void snd_pcm_release_substream(struct snd_pcm_substream *substream) { snd_pcm_drop(substream); - if (substream->pcm_release) - substream->pcm_release(substream); if (substream->hw_opened) { if (substream->ops->hw_free != NULL) substream->ops->hw_free(substream); substream->ops->close(substream); substream->hw_opened = 0; } + if (substream->pcm_release) { + substream->pcm_release(substream); + substream->pcm_release = NULL; + } snd_pcm_detach_substream(substream); } diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 8687ae3c66b8..b49a45cbf67a 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -183,7 +183,8 @@ static void snd_mpu401_uart_remove_timer (struct snd_mpu401 *mpu, int input) */ -static void snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, int ack) +static int snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, + int ack) { unsigned long flags; int timeout, ok; @@ -218,9 +219,11 @@ static void snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, int ok = 1; } spin_unlock_irqrestore(&mpu->input_lock, flags); - if (! ok) + if (!ok) { snd_printk("cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)\n", cmd, mpu->port, mpu->read(mpu, MPU401C(mpu)), mpu->read(mpu, MPU401D(mpu))); - // snd_printk("cmd: 0x%x at 0x%lx (status = 0x%x, data = 0x%x)\n", cmd, mpu->port, mpu->read(mpu, MPU401C(mpu)), mpu->read(mpu, MPU401D(mpu))); + return 1; + } + return 0; } /* @@ -235,12 +238,19 @@ static int snd_mpu401_uart_input_open(struct snd_rawmidi_substream *substream) if (mpu->open_input && (err = mpu->open_input(mpu)) < 0) return err; if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) { - snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1); - snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1); + if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) + goto error_out; + if (snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1)) + goto error_out; } mpu->substream_input = substream; set_bit(MPU401_MODE_BIT_INPUT, &mpu->mode); return 0; + +error_out: + if (mpu->open_input && mpu->close_input) + mpu->close_input(mpu); + return -EIO; } static int snd_mpu401_uart_output_open(struct snd_rawmidi_substream *substream) @@ -252,39 +262,52 @@ static int snd_mpu401_uart_output_open(struct snd_rawmidi_substream *substream) if (mpu->open_output && (err = mpu->open_output(mpu)) < 0) return err; if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) { - snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1); - snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1); + if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) + goto error_out; + if (snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1)) + goto error_out; } mpu->substream_output = substream; set_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode); return 0; + +error_out: + if (mpu->open_output && mpu->close_output) + mpu->close_output(mpu); + return -EIO; } static int snd_mpu401_uart_input_close(struct snd_rawmidi_substream *substream) { struct snd_mpu401 *mpu; + int err = 0; mpu = substream->rmidi->private_data; clear_bit(MPU401_MODE_BIT_INPUT, &mpu->mode); mpu->substream_input = NULL; if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) - snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0); + err = snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0); if (mpu->close_input) mpu->close_input(mpu); + if (err) + return -EIO; return 0; } static int snd_mpu401_uart_output_close(struct snd_rawmidi_substream *substream) { struct snd_mpu401 *mpu; + int err = 0; mpu = substream->rmidi->private_data; clear_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode); mpu->substream_output = NULL; if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) - snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0); + err = snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0); if (mpu->close_output) mpu->close_output(mpu); + if (err) + return -EIO; return 0; } @@ -316,6 +339,7 @@ static void snd_mpu401_uart_input_trigger(struct snd_rawmidi_substream *substrea snd_mpu401_uart_remove_timer(mpu, 1); clear_bit(MPU401_MODE_BIT_INPUT_TRIGGER, &mpu->mode); } + } /* diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c index 326a057f752f..99908e44124d 100644 --- a/sound/isa/ad1848/ad1848.c +++ b/sound/isa/ad1848/ad1848.c @@ -193,9 +193,11 @@ static int __init alsa_card_ad1848_init(void) continue; device = platform_device_register_simple(SND_AD1848_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } devices[i] = device; cards++; @@ -204,14 +206,10 @@ static int __init alsa_card_ad1848_init(void) #ifdef MODULE printk(KERN_ERR "AD1848 soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_ad1848_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_ad1848_unregister_all(); - return err; } static void __exit alsa_card_ad1848_exit(void) diff --git a/sound/isa/adlib.c b/sound/isa/adlib.c index a253a14e6a45..1124344ed948 100644 --- a/sound/isa/adlib.c +++ b/sound/isa/adlib.c @@ -43,8 +43,7 @@ static int __devinit snd_adlib_probe(struct platform_device *device) struct snd_card *card; struct snd_opl3 *opl3; - int error; - int i = device->id; + int error, i = device->id; if (port[i] == SNDRV_AUTO_PORT) { snd_printk(KERN_ERR DRV_NAME ": please specify port\n"); @@ -95,8 +94,7 @@ static int __devinit snd_adlib_probe(struct platform_device *device) return 0; out1: snd_card_free(card); - out0: error = -EINVAL; /* FIXME: should be the original error code */ - return error; +out0: return error; } static int __devexit snd_adlib_remove(struct platform_device *device) @@ -134,6 +132,11 @@ static int __init alsa_card_adlib_init(void) if (IS_ERR(device)) continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; + } + devices[i] = device; cards++; } diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index bc0f5ebf5d3c..3c1e9fd56fe0 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c @@ -699,9 +699,11 @@ static int __init alsa_card_cmi8330_init(void) continue; device = platform_device_register_simple(CMI8330_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; cards++; @@ -719,14 +721,10 @@ static int __init alsa_card_cmi8330_init(void) #ifdef MODULE snd_printk(KERN_ERR "CMI8330 not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_cmi8330_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_cmi8330_unregister_all(); - return err; } static void __exit alsa_card_cmi8330_exit(void) diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c index a30dcd962525..397310f358b7 100644 --- a/sound/isa/cs423x/cs4231.c +++ b/sound/isa/cs423x/cs4231.c @@ -209,9 +209,11 @@ static int __init alsa_card_cs4231_init(void) continue; device = platform_device_register_simple(SND_CS4231_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } devices[i] = device; cards++; @@ -220,14 +222,10 @@ static int __init alsa_card_cs4231_init(void) #ifdef MODULE printk(KERN_ERR "CS4231 soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_cs4231_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_cs4231_unregister_all(); - return err; } static void __exit alsa_card_cs4231_exit(void) diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index 382bb17ef49f..f7fa779347ff 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c @@ -780,9 +780,11 @@ static int __init alsa_card_cs423x_init(void) continue; device = platform_device_register_simple(CS423X_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; snd_cs423x_devices++; @@ -802,14 +804,10 @@ static int __init alsa_card_cs423x_init(void) #ifdef MODULE printk(KERN_ERR IDENT " soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_cs423x_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_cs423x_unregister_all(); - return err; } static void __exit alsa_card_cs423x_exit(void) diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index 2b69fc829265..e90689ee162f 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c @@ -213,9 +213,11 @@ static int __init alsa_card_es1688_init(void) continue; device = platform_device_register_simple(ES1688_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } devices[i] = device; cards++; @@ -224,14 +226,10 @@ static int __init alsa_card_es1688_init(void) #ifdef MODULE printk(KERN_ERR "ESS AudioDrive ES1688 soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_es1688_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_es1688_unregister_all(); - return err; } static void __exit alsa_card_es1688_exit(void) diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 9fbc185b4cc2..a36ec1daa5cb 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -2391,9 +2391,11 @@ static int __init alsa_card_es18xx_init(void) continue; device = platform_device_register_simple(ES18XX_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; cards++; @@ -2411,14 +2413,10 @@ static int __init alsa_card_es18xx_init(void) #ifdef MODULE snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_es18xx_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_es18xx_unregister_all(); - return err; } static void __exit alsa_card_es18xx_exit(void) diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c index 26dccfea2437..37057a37dc30 100644 --- a/sound/isa/gus/gusclassic.c +++ b/sound/isa/gus/gusclassic.c @@ -253,9 +253,11 @@ static int __init alsa_card_gusclassic_init(void) continue; device = platform_device_register_simple(GUSCLASSIC_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } devices[i] = device; cards++; @@ -264,14 +266,10 @@ static int __init alsa_card_gusclassic_init(void) #ifdef MODULE printk(KERN_ERR "GUS Classic soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_gusclassic_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_gusclassic_unregister_all(); - return err; } static void __exit alsa_card_gusclassic_exit(void) diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index 31dc20501d0c..05852fcc613b 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c @@ -363,9 +363,11 @@ static int __init alsa_card_gusextreme_init(void) continue; device = platform_device_register_simple(GUSEXTREME_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } devices[i] = device; cards++; @@ -374,14 +376,10 @@ static int __init alsa_card_gusextreme_init(void) #ifdef MODULE printk(KERN_ERR "GUS Extreme soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_gusextreme_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_gusextreme_unregister_all(); - return err; } static void __exit alsa_card_gusextreme_exit(void) diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c index cafb9b67fa72..fcf2c8fe6f94 100644 --- a/sound/isa/gus/gusmax.c +++ b/sound/isa/gus/gusmax.c @@ -390,9 +390,11 @@ static int __init alsa_card_gusmax_init(void) continue; device = platform_device_register_simple(GUSMAX_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } devices[i] = device; cards++; @@ -401,14 +403,10 @@ static int __init alsa_card_gusmax_init(void) #ifdef MODULE printk(KERN_ERR "GUS MAX soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_gusmax_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_gusmax_unregister_all(); - return err; } static void __exit alsa_card_gusmax_exit(void) diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index de71b7a99c83..4298d339e786 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c @@ -947,9 +947,11 @@ static int __init alsa_card_interwave_init(void) #endif device = platform_device_register_simple(INTERWAVE_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; cards++; @@ -966,14 +968,10 @@ static int __init alsa_card_interwave_init(void) #ifdef MODULE printk(KERN_ERR "InterWave soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_interwave_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_interwave_unregister_all(); - return err; } static void __exit alsa_card_interwave_exit(void) diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index c906e205d7d5..6d889052c32c 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c @@ -962,9 +962,11 @@ static int __init alsa_card_opl3sa2_init(void) #endif device = platform_device_register_simple(OPL3SA2_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; snd_opl3sa2_devices++; @@ -983,14 +985,10 @@ static int __init alsa_card_opl3sa2_init(void) #ifdef MODULE snd_printk(KERN_ERR "Yamaha OPL3-SA soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_opl3sa2_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_opl3sa2_unregister_all(); - return err; } static void __exit alsa_card_opl3sa2_exit(void) diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index 09384d03dc31..83d64bc07ff0 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c @@ -1436,8 +1436,11 @@ static int __init alsa_card_miro_init(void) if ((error = platform_driver_register(&snd_miro_driver)) < 0) return error; device = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0); - if (! IS_ERR(device)) - return 0; + if (! IS_ERR(device)) { + if (platform_get_drvdata(device)) + return 0; + platform_device_unregister(device); + } #ifdef MODULE printk(KERN_ERR "no miro soundcard found\n"); #endif diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 65b28cbc0ebd..8ee0d70536f9 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -2099,8 +2099,11 @@ static int __init alsa_card_opti9xx_init(void) return error; device = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0); if (!IS_ERR(device)) { - snd_opti9xx_platform_device = device; - return 0; + if (platform_get_drvdata(device)) { + snd_opti9xx_platform_device = device; + return 0; + } + platform_device_unregister(device); } platform_driver_unregister(&snd_opti9xx_driver); } diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c index 21ea65925a9e..6333f900eaee 100644 --- a/sound/isa/sb/sb16.c +++ b/sound/isa/sb/sb16.c @@ -720,9 +720,11 @@ static int __init alsa_card_sb16_init(void) continue; device = platform_device_register_simple(SND_SB16_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; cards++; @@ -745,14 +747,10 @@ static int __init alsa_card_sb16_init(void) snd_printk(KERN_ERR "In case, if you have AWE card, try snd-sbawe module\n"); #endif #endif - err = -ENODEV; - goto errout; + snd_sb16_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_sb16_unregister_all(); - return err; } static void __exit alsa_card_sb16_exit(void) diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c index 3efa23d303c3..141400c01426 100644 --- a/sound/isa/sb/sb8.c +++ b/sound/isa/sb/sb8.c @@ -264,9 +264,11 @@ static int __init alsa_card_sb8_init(void) continue; device = platform_device_register_simple(SND_SB8_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } devices[i] = device; cards++; @@ -275,14 +277,10 @@ static int __init alsa_card_sb8_init(void) #ifdef MODULE snd_printk(KERN_ERR "Sound Blaster soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_sb8_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_sb8_unregister_all(); - return err; } static void __exit alsa_card_sb8_exit(void) diff --git a/sound/isa/sgalaxy.c b/sound/isa/sgalaxy.c index a60e66afbf90..09c8e8c6b5e3 100644 --- a/sound/isa/sgalaxy.c +++ b/sound/isa/sgalaxy.c @@ -366,9 +366,11 @@ static int __init alsa_card_sgalaxy_init(void) continue; device = platform_device_register_simple(SND_SGALAXY_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } devices[i] = device; cards++; @@ -377,14 +379,10 @@ static int __init alsa_card_sgalaxy_init(void) #ifdef MODULE snd_printk(KERN_ERR "Sound Galaxy soundcard not found or device busy\n"); #endif - err = -ENODEV; - goto errout; + snd_sgalaxy_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_sgalaxy_unregister_all(); - return err; } static void __exit alsa_card_sgalaxy_exit(void) diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index 48e5552d3444..d2a856f0fde2 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c @@ -1427,8 +1427,8 @@ static int __init sscape_manual_probe(void) dma[i] == SNDRV_AUTO_DMA) { printk(KERN_INFO "sscape: insufficient parameters, need IO, IRQ, MPU-IRQ and DMA\n"); - ret = -ENXIO; - goto errout; + sscape_unregister_all(); + return -ENXIO; } /* @@ -1436,17 +1436,15 @@ static int __init sscape_manual_probe(void) */ device = platform_device_register_simple(SSCAPE_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - ret = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; } return 0; - - errout: - sscape_unregister_all(); - return ret; } static void sscape_exit(void) diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index 2f13cd5d4dcb..7ae86f82c3fa 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c @@ -722,9 +722,11 @@ static int __init alsa_card_wavefront_init(void) #endif device = platform_device_register_simple(WAVEFRONT_DRIVER, i, NULL, 0); - if (IS_ERR(device)) { - err = PTR_ERR(device); - goto errout; + if (IS_ERR(device)) + continue; + if (!platform_get_drvdata(device)) { + platform_device_unregister(device); + continue; } platform_devices[i] = device; cards++; @@ -742,14 +744,10 @@ static int __init alsa_card_wavefront_init(void) #ifdef MODULE printk (KERN_ERR "No WaveFront cards found or devices busy\n"); #endif - err = -ENODEV; - goto errout; + snd_wavefront_unregister_all(); + return -ENODEV; } return 0; - - errout: - snd_wavefront_unregister_all(); - return err; } static void __exit alsa_card_wavefront_exit(void) diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index 88e52dc84c09..6275266dde2e 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig @@ -5,23 +5,9 @@ # # Prompt user for primary drivers. -config OBSOLETE_OSS_DRIVER - bool "Obsolete OSS drivers" - depends on SOUND_PRIME - help - This option enables support for obsolete OSS drivers that - are scheduled for removal in the near future since there - are ALSA drivers for the same hardware. - - Please contact Adrian Bunk <bunk@stusta.de> if you had to - say Y here because your soundcard is not properly supported - by ALSA. - - If unsure, say N. - config SOUND_BT878 tristate "BT878 audio dma" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER + depends on SOUND_PRIME && PCI ---help--- Audio DMA support for bt878 based grabber boards. As you might have already noticed, bt878 is listed with two functions in /proc/pci. @@ -35,48 +21,9 @@ config SOUND_BT878 To compile this driver as a module, choose M here: the module will be called btaudio. -config SOUND_CMPCI - tristate "C-Media PCI (CMI8338/8738)" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - help - Say Y or M if you have a PCI sound card using the CMI8338 - or the CMI8738 chipset. Data on these chips are available at - <http://www.cmedia.com.tw/>. - - A userspace utility to control some internal registers of these - chips is available at - <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>. - -config SOUND_CMPCI_FM - bool "Enable legacy FM" - depends on SOUND_CMPCI && X86 - help - Say Y here to enable the legacy FM (frequency-modulation) synthesizer - support on a card using the CMI8338 or CMI8378 chipset. Even it is - enabled, you need to set fmio as proper value to enable it. - Say N here if you don't need this. - -config SOUND_CMPCI_MIDI - bool "Enable legacy MPU-401" - depends on SOUND_CMPCI && X86 - help - Say Y here to enable the legacy MPU401 MIDI synthesizer support on a - card using the CMI8338 or CMI8378 chipset. Even it is enabled, - you need to set mpuio as proper value to enable it. - Say N here if you don't need this. - -config SOUND_CMPCI_JOYSTICK - bool "Enable joystick" - depends on SOUND_CMPCI && X86 && (GAMEPORT=y || SOUND_CMPCI=GAMEPORT) - help - Say Y here in order to enable the joystick port on a sound card using - the CMI8338 or the CMI8738 chipset. You need to config the - gameport support and set joystick parameter as 1 to use it. - Say N here if you don't need this. - config SOUND_EMU10K1 tristate "Creative SBLive! (EMU10K1)" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER + depends on SOUND_PRIME && PCI ---help--- Say Y or M if you have a PCI sound card using the EMU10K1 chipset, such as the Creative SBLive!, SB PCI512 or Emu-APS. @@ -108,13 +55,6 @@ config SOUND_FUSION series) when wired as native sound drivers with AC97 codecs. If this driver does not work try the CS4232 driver. -config SOUND_CS4281 - tristate "Crystal Sound CS4281" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - help - Picture and feature list at - <http://www.pcbroker.com/crystal4281.html>. - config SOUND_BCM_CS4297A tristate "Crystal Sound CS4297a (for Swarm)" depends on SOUND_PRIME && SIBYTE_SWARM @@ -125,22 +65,9 @@ config SOUND_BCM_CS4297A note that CONFIG_KGDB should not be enabled at the same time, since it also attempts to use this UART port. -config SOUND_ES1370 - tristate "Ensoniq AudioPCI (ES1370)" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - help - Say Y or M if you have a PCI sound card utilizing the Ensoniq - ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find - out if your sound card uses an ES1370 without removing your - computer's cover, use lspci -n and look for the PCI ID - 1274:5000. Since Ensoniq was bought by Creative Labs, - Sound Blaster 64/PCI models are either ES1370 or ES1371 based. - This driver differs slightly from OSS/Free, so PLEASE READ - <file:Documentation/sound/oss/es1370>. - config SOUND_ES1371 tristate "Creative Ensoniq AudioPCI 97 (ES1371)" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER + depends on SOUND_PRIME && PCI help Say Y or M if you have a PCI sound card utilizing the Ensoniq ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if @@ -151,33 +78,6 @@ config SOUND_ES1371 slightly from OSS/Free, so PLEASE READ <file:Documentation/sound/oss/es1371>. -config SOUND_ESSSOLO1 - tristate "ESS Technology Solo1" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - help - Say Y or M if you have a PCI sound card utilizing the ESS Technology - Solo1 chip. To find out if your sound card uses a - Solo1 chip without removing your computer's cover, use - lspci -n and look for the PCI ID 125D:1969. This driver - differs slightly from OSS/Free, so PLEASE READ - <file:Documentation/sound/oss/solo1>. - -config SOUND_MAESTRO - tristate "ESS Maestro, Maestro2, Maestro2E driver" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - help - Say Y or M if you have a sound system driven by ESS's Maestro line - of PCI sound chips. These include the Maestro 1, Maestro 2, and - Maestro 2E. See <file:Documentation/sound/oss/Maestro> for more - details. - -config SOUND_MAESTRO3 - tristate "ESS Maestro3/Allegro driver (EXPERIMENTAL)" - depends on SOUND_PRIME && PCI && EXPERIMENTAL && OBSOLETE_OSS_DRIVER - help - Say Y or M if you have a sound system driven by ESS's Maestro 3 - PCI sound chip. - config SOUND_ICH tristate "Intel ICH (i8xx) audio support" depends on SOUND_PRIME && PCI @@ -185,24 +85,6 @@ config SOUND_ICH Support for integral audio in Intel's I/O Controller Hub (ICH) chipset, as used on the 810/820/840 motherboards. -config SOUND_HARMONY - tristate "PA Harmony audio driver" - depends on GSC_LASI && SOUND_PRIME && OBSOLETE_OSS_DRIVER - help - Say 'Y' or 'M' to include support for Harmony soundchip - on HP 712, 715/new and many other GSC based machines. - -config SOUND_SONICVIBES - tristate "S3 SonicVibes" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - help - Say Y or M if you have a PCI sound card utilizing the S3 - SonicVibes chipset. To find out if your sound card uses a - SonicVibes chip without removing your computer's cover, use - lspci -n and look for the PCI ID 5333:CA00. This driver - differs slightly from OSS/Free, so PLEASE READ - <file:Documentation/sound/oss/sonicvibes>. - config SOUND_VWSND tristate "SGI Visual Workstation Sound" depends on SOUND_PRIME && X86_VISWS @@ -231,10 +113,6 @@ config SOUND_VRC5477 integrated, multi-function controller chip for MIPS CPUs. Works with the AC97 codec. -config SOUND_AU1000 - tristate "Au1000 Sound" - depends on SOUND_PRIME && (SOC_AU1000 || SOC_AU1100 || SOC_AU1500) && OBSOLETE_OSS_DRIVER - config SOUND_AU1550_AC97 tristate "Au1550 AC97 Sound" depends on SOUND_PRIME && SOC_AU1550 @@ -507,7 +385,7 @@ config MSND_FIFOSIZE config SOUND_VIA82CXXX tristate "VIA 82C686 Audio Codec" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER + depends on SOUND_PRIME && PCI help Say Y here to include support for the audio codec found on VIA 82Cxxx-based chips. Typically these are built into a motherboard. @@ -576,18 +454,6 @@ config SOUND_AD1889 Say M here if you have a sound card based on the Analog Devices AD1889 chip. -config SOUND_SGALAXY - tristate "Aztech Sound Galaxy (non-PnP) cards" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER - help - This module initializes the older non Plug and Play sound galaxy - cards from Aztech. It supports the Waverider Pro 32 - 3D and the - Galaxy Washington 16. - - If you compile the driver into the kernel, you have to add - "sgalaxy=<io>,<irq>,<dma>,<dma2>,<sgbase>" to the kernel command - line. - config SOUND_ADLIB tristate "Adlib Cards" depends on SOUND_OSS @@ -612,56 +478,6 @@ config SOUND_ACI_MIXER This driver is also available as a module and will be called aci. -config SOUND_CS4232 - tristate "Crystal CS4232 based (PnP) cards" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER - help - Say Y here if you have a card based on the Crystal CS4232 chip set, - which uses its own Plug and Play protocol. - - If you compile the driver into the kernel, you have to add - "cs4232=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel - command line. - - See <file:Documentation/sound/oss/CS4232> for more information on - configuring this card. - -config SOUND_SSCAPE - tristate "Ensoniq SoundScape support" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER - help - Answer Y if you have a sound card based on the Ensoniq SoundScape - chipset. Such cards are being manufactured at least by Ensoniq, Spea - and Reveal (Reveal makes also other cards). - - If you compile the driver into the kernel, you have to add - "sscape=<io>,<irq>,<dma>,<mpuio>,<mpuirq>" to the kernel command - line. - -config SOUND_GUS - tristate "Gravis Ultrasound support" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER - help - Say Y here for any type of Gravis Ultrasound card, including the GUS - or GUS MAX. See also <file:Documentation/sound/oss/ultrasound> for more - information on configuring this card with modules. - - If you compile the driver into the kernel, you have to add - "gus=<io>,<irq>,<dma>,<dma2>" to the kernel command line. - -config SOUND_GUS16 - bool "16 bit sampling option of GUS (_NOT_ GUS MAX)" - depends on SOUND_GUS - help - Support for Gravis Ulstrasound (GUS) cards (other than the GUS), - sampling at 16-bit width. - -config SOUND_GUSMAX - bool "GUS MAX support" - depends on SOUND_GUS - help - Support for Gravis Ulstrasound MAX. - config SOUND_VMIDI tristate "Loopback MIDI device support" depends on SOUND_OSS @@ -742,7 +558,7 @@ config SOUND_MPU401 config SOUND_NM256 tristate "NM256AV/NM256ZX audio support" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER + depends on SOUND_OSS help Say M here to include audio support for the NeoMagic 256AV/256ZX chipsets. These are the audio chipsets found in the Sony @@ -752,35 +568,6 @@ config SOUND_NM256 See <file:Documentation/sound/oss/NM256> for further information. -config SOUND_MAD16 - tristate "OPTi MAD16 and/or Mozart based cards" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER - ---help--- - Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi - 82C928 or 82C929 or 82C931) audio interface chip. These chips are - quite common so it's possible that many no-name cards have one of - them. In addition the MAD16 chip is used in some cards made by known - manufacturers such as Turtle Beach (Tropez), Reveal (some models) - and Diamond (latest ones). Note however that the Tropez sound cards - have their own driver; if you have one of those, say N here and Y or - M to "Full support for Turtle Beach WaveFront", below. - - If you compile the driver into the kernel, you have to add - "mad16=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the - kernel command line. - - See also <file:Documentation/sound/oss/Opti> and - <file:Documentation/sound/oss/MAD16> for more information on setting - these cards up as modules. - -config MAD16_OLDCARD - bool "Support MIDI in older MAD16 based cards (requires SB)" - depends on SOUND_MAD16 - help - Answer Y (or M) if you have an older card based on the C928 or - Mozart chipset and you want to have MIDI support. If you enable this - option you also need to enable support for Sound Blaster. - config SOUND_PAS tristate "ProAudioSpectrum 16 support" depends on SOUND_OSS @@ -873,53 +660,9 @@ config SOUND_SB You can say M here to compile this driver as a module; the module is called sb. -config SOUND_AWE32_SYNTH - tristate "AWE32 synth" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER - help - Say Y here if you have a Sound Blaster SB32, AWE32-PnP, SB AWE64 or - similar sound card. See <file:Documentation/sound/oss/README.awe>, - <file:Documentation/sound/oss/AWE32> and the Soundblaster-AWE - mini-HOWTO, available from <http://www.tldp.org/docs.html#howto> - for more info. - -config SOUND_WAVEFRONT - tristate "Full support for Turtle Beach WaveFront (Tropez Plus, Tropez, Maui) synth/soundcards" - depends on SOUND_OSS && m && OBSOLETE_OSS_DRIVER - help - Answer Y or M if you have a Tropez Plus, Tropez or Maui sound card - and read the files <file:Documentation/sound/oss/Wavefront> and - <file:Documentation/sound/oss/Tropez+>. - -config SOUND_MAUI - tristate "Limited support for Turtle Beach Wave Front (Maui, Tropez) synthesizers" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER - help - Say Y here if you have a Turtle Beach Wave Front, Maui, or Tropez - sound card. - - If you compile the driver into the kernel, you have to add - "maui=<io>,<irq>" to the kernel command line. - -config MAUI_HAVE_BOOT - bool "Have OSWF.MOT firmware file" - depends on SOUND_MAUI=y && !STANDALONE - help - Turtle Beach Maui and Tropez sound cards have a microcontroller - which needs to be initialized prior to use. OSWF.MOT is a file - distributed with the card's DOS/Windows drivers. Answer Y if you - have this file. - -config MAUI_BOOT_FILE - string "Full pathname of OSWF.MOT firmware file" - depends on MAUI_HAVE_BOOT - default "/etc/sound/oswf.mot" - help - Enter the full pathname of your OSWF.MOT file, starting from /. - config SOUND_YM3812 tristate "Yamaha FM synthesizer (YM3812/OPL-3) support" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER + depends on SOUND_OSS ---help--- Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4). Answering Y is usually a safe and recommended choice, however some @@ -933,18 +676,6 @@ config SOUND_YM3812 If unsure, say Y. -config SOUND_OPL3SA1 - tristate "Yamaha OPL3-SA1 audio controller" - depends on SOUND_OSS && OBSOLETE_OSS_DRIVER - help - Say Y or M if you have a Yamaha OPL3-SA1 sound chip, which is - usually built into motherboards. Read - <file:Documentation/sound/oss/OPL3-SA> for details. - - If you compile the driver into the kernel, you have to add - "opl3sa=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel - command line. - config SOUND_OPL3SA2 tristate "Yamaha OPL3-SA2 and SA3 based PnP cards" depends on SOUND_OSS @@ -959,19 +690,6 @@ config SOUND_OPL3SA2 "opl3sa2=<io>,<irq>,<dma>,<dma2>,<mssio>,<mpuio>" to the kernel command line. -config SOUND_YMFPCI - tristate "Yamaha YMF7xx PCI audio (native mode)" - depends on SOUND_OSS && PCI && OBSOLETE_OSS_DRIVER - help - Support for Yamaha cards including the YMF711, YMF715, YMF718, - YMF719, YMF724, Waveforce 192XG, and Waveforce 192 Digital. - -config SOUND_YMFPCI_LEGACY - bool "Yamaha PCI legacy ports support" - depends on SOUND_YMFPCI - help - Support for YMF7xx PCI cards emulating an MP401. - config SOUND_UART6850 tristate "6850 UART support" depends on SOUND_OSS @@ -1101,30 +819,6 @@ config SOUND_KAHLUA tristate "XpressAudio Sound Blaster emulation" depends on SOUND_SB -config SOUND_ALI5455 - tristate "ALi5455 audio support" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - -config SOUND_FORTE - tristate "ForteMedia FM801 driver" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - help - Say Y or M if you want driver support for the ForteMedia FM801 PCI - audio controller (Abit AU10, Genius Sound Maker, HP Workstation - zx2000, and others). - -config SOUND_RME96XX - tristate "RME Hammerfall (RME96XX) support" - depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER - help - Say Y or M if you have a Hammerfall or Hammerfall light - multichannel card from RME. If you want to access advanced - features of the card, read <file:Documentation/sound/oss/rme96xx>. - -config SOUND_AD1980 - tristate "AD1980 front/back switch plugin" - depends on SOUND_PRIME && OBSOLETE_OSS_DRIVER - config SOUND_SH_DAC_AUDIO tristate "SuperH DAC audio support" depends on SOUND_PRIME && CPU_SH3 diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c index 0cd44a6f7ac0..3721c5857b90 100644 --- a/sound/oss/emu10k1/main.c +++ b/sound/oss/emu10k1/main.c @@ -94,6 +94,7 @@ #include <linux/init.h> #include <linux/delay.h> #include <linux/proc_fs.h> +#include <linux/dma-mapping.h> #include "hwaccess.h" #include "8010.h" @@ -119,7 +120,7 @@ /* the emu10k1 _seems_ to only supports 29 bit (512MiB) bit bus master */ -#define EMU10K1_DMA_MASK 0x1fffffff /* DMA buffer mask for pci_alloc_consist */ +#define EMU10K1_DMA_MASK DMA_29BIT_MASK /* DMA buffer mask for pci_alloc_consist */ #ifndef PCI_VENDOR_ID_CREATIVE #define PCI_VENDOR_ID_CREATIVE 0x1102 diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 278319bbdea1..d05200741ac3 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -160,6 +160,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = { { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF +{ 0x56494182, 0xffffffff, "VIA1618", NULL, NULL }, { 0x57454301, 0xffffffff, "W83971D", NULL, NULL }, { 0x574d4c00, 0xffffffff, "WM9701A", NULL, NULL }, { 0x574d4C03, 0xffffffff, "WM9703,WM9707,WM9708,WM9717", patch_wolfson03, NULL}, diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 37b80570a5c6..91899f87f037 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c @@ -35,6 +35,7 @@ #include <linux/init.h> #include <linux/moduleparam.h> #include <linux/pci.h> +#include <linux/dma-mapping.h> #include <linux/interrupt.h> #include <linux/slab.h> @@ -691,8 +692,8 @@ static int __devinit snd_als300_create(snd_card_t *card, if ((err = pci_enable_device(pci)) < 0) return err; - if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || - pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { + if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 || + pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) { printk(KERN_ERR "error setting 28bit DMA mask\n"); pci_disable_device(pci); return -ENXIO; diff --git a/sound/pci/au88x0/au88x0.h b/sound/pci/au88x0/au88x0.h index d65ccb1866a0..f078b716d2b0 100644 --- a/sound/pci/au88x0/au88x0.h +++ b/sound/pci/au88x0/au88x0.h @@ -19,7 +19,6 @@ #ifdef __KERNEL__ #include <sound/driver.h> -#include <linux/init.h> #include <linux/pci.h> #include <asm/io.h> #include <sound/core.h> @@ -277,14 +276,14 @@ static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); #endif /* Driver stuff. */ -static int __devinit vortex_gameport_register(vortex_t * card); +static int vortex_gameport_register(vortex_t * card); static void vortex_gameport_unregister(vortex_t * card); #ifndef CHIP_AU8820 -static int __devinit vortex_eq_init(vortex_t * vortex); -static int __devexit vortex_eq_free(vortex_t * vortex); +static int vortex_eq_init(vortex_t * vortex); +static int vortex_eq_free(vortex_t * vortex); #endif /* ALSA stuff. */ -static int __devinit snd_vortex_new_pcm(vortex_t * vortex, int idx, int nr); -static int __devinit snd_vortex_mixer(vortex_t * vortex); -static int __devinit snd_vortex_midi(vortex_t * vortex); +static int snd_vortex_new_pcm(vortex_t * vortex, int idx, int nr); +static int snd_vortex_mixer(vortex_t * vortex); +static int snd_vortex_midi(vortex_t * vortex); #endif diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c index 9cac02e93b25..4347e6abc1d5 100644 --- a/sound/pci/au88x0/au88x0_core.c +++ b/sound/pci/au88x0/au88x0_core.c @@ -2658,7 +2658,7 @@ static void vortex_spdif_init(vortex_t * vortex, int spdif_sr, int spdif_mode) /* Initialization */ -static int vortex_core_init(vortex_t * vortex) +static int __devinit vortex_core_init(vortex_t * vortex) { printk(KERN_INFO "Vortex: init.... "); diff --git a/sound/pci/au88x0/au88x0_eq.c b/sound/pci/au88x0/au88x0_eq.c index 64fbfbbaf816..0c86a31c4336 100644 --- a/sound/pci/au88x0/au88x0_eq.c +++ b/sound/pci/au88x0/au88x0_eq.c @@ -885,7 +885,7 @@ static char *EqBandLabels[10] __devinitdata = { }; /* ALSA driver entry points. Init and exit. */ -static int vortex_eq_init(vortex_t * vortex) +static int __devinit vortex_eq_init(vortex_t * vortex) { struct snd_kcontrol *kcontrol; int err, i; diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c index 6a13ca1d545e..7b5baa173859 100644 --- a/sound/pci/au88x0/au88x0_pcm.c +++ b/sound/pci/au88x0/au88x0_pcm.c @@ -506,7 +506,7 @@ static int __devinit snd_vortex_new_pcm(vortex_t * chip, int idx, int nr) int i; int err, nr_capt; - if ((chip == 0) || (idx < 0) || (idx > VORTEX_PCM_LAST)) + if ((chip == 0) || (idx < 0) || (idx >= VORTEX_PCM_LAST)) return -ENODEV; /* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 31cb9b48bb59..6bfa08436efa 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -843,8 +843,11 @@ static struct snd_emu_chip_details emu_chip_details[] = { .spdif_bug = 1, .ac97_chip = 1} , /* Tested by shane-alsa@cm.nu 5th Nov 2005 */ + /* The 0x20061102 does have SB0350 written on it + * Just like 0x20021102 + */ {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20061102, - .driver = "Audigy2", .name = "Audigy 2 [2006]", + .driver = "Audigy2", .name = "Audigy 2 [SB0350b]", .id = "Audigy2", .emu10k2_chip = 1, .ca0102_chip = 1, diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 2bfe37e8543c..bcfca159c6a2 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -801,6 +801,10 @@ static struct hda_board_config ad1986a_cfg_tbl[] = { .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */ { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213, .config = AD1986A_LAPTOP_EAPD }, /* ASUS A6J */ + { .pci_subvendor = 0x1043, .pci_subdevice = 0x11f7, + .config = AD1986A_LAPTOP_EAPD }, /* ASUS U5A */ + { .pci_subvendor = 0x103c, .pci_subdevice = 0x30af, + .config = AD1986A_LAPTOP_EAPD }, /* HP Compaq Presario B2800 */ {} }; @@ -1330,6 +1334,8 @@ static struct hda_board_config ad1981_cfg_tbl[] = { .config = AD1981_HP }, /* HP nx6320 */ { .pci_subvendor = 0x103c, .pci_subdevice = 0x309f, .config = AD1981_HP }, /* HP nx9420 AngelFire */ + { .pci_subvendor = 0x103c, .pci_subdevice = 0x30a2, + .config = AD1981_HP }, /* HP nx9420 AngelFire */ { .modelname = "basic", .config = AD1981_BASIC }, {} }; diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index abe9493f0a2c..715260787953 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -310,6 +310,9 @@ static struct hda_board_config stac922x_cfg_tbl[] = { .pci_subdevice = 0x0b0b, .config = STAC_D945GTP3 }, /* Intel D945PSN - 3 Stack, 9221 A1 */ { .pci_subvendor = PCI_VENDOR_ID_INTEL, + .pci_subdevice = 0x0707, + .config = STAC_D945GTP5 }, /* Intel D945PSV - 5 Stack */ + { .pci_subvendor = PCI_VENDOR_ID_INTEL, .pci_subdevice = 0x0404, .config = STAC_D945GTP5 }, /* Intel D945GTP - 5 Stack */ { .pci_subvendor = PCI_VENDOR_ID_INTEL, diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 1e7398de2865..0f171dd1377b 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -2333,6 +2333,7 @@ static int __devinit check_dxs_list(struct pci_dev *pci) { .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */ { .subvendor = 0x1019, .subdevice = 0x0a85, .action = VIA_DXS_NO_VRA }, /* ECS L7VMM2 */ { .subvendor = 0x1019, .subdevice = 0xa101, .action = VIA_DXS_SRC }, + { .subvendor = 0x1019, .subdevice = 0xaa01, .action = VIA_DXS_SRC }, /* ECS K8T890-A */ { .subvendor = 0x1025, .subdevice = 0x0033, .action = VIA_DXS_NO_VRA }, /* Acer Inspire 1353LM */ { .subvendor = 0x1025, .subdevice = 0x0046, .action = VIA_DXS_SRC }, /* Acer Aspire 1524 WLMi */ { .subvendor = 0x1043, .subdevice = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/ |