diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-04-21 12:52:36 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-04-21 12:52:36 -0400 |
commit | a748422ee45725e04e1d3792fa19dfa90ddfd116 (patch) | |
tree | 978e12895468baaa9f7ab2747b9f7d50beaf1717 /sound | |
parent | c63e31c2cc1ec67372920b5e1aff8204d04dd172 (diff) | |
parent | f4ffaa452e71495a06376f12f772342bc57051fc (diff) |
Merge branch 'master'
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, | |||
1682 | substream->oss.setup = *setup; | 1682 | substream->oss.setup = *setup; |
1683 | if (setup->nonblock) | 1683 | if (setup->nonblock) |
1684 | substream->ffile->f_flags |= O_NONBLOCK; | 1684 | substream->ffile->f_flags |= O_NONBLOCK; |
1685 | else | 1685 | else if (setup->block) |
1686 | substream->ffile->f_flags &= ~O_NONBLOCK; | 1686 | substream->ffile->f_flags &= ~O_NONBLOCK; |
1687 | runtime = substream->runtime; | 1687 | runtime = substream->runtime; |
1688 | runtime->oss.params = 1; | 1688 | runtime->oss.params = 1; |
@@ -1757,10 +1757,11 @@ static int snd_pcm_oss_open_file(struct file *file, | |||
1757 | } | 1757 | } |
1758 | 1758 | ||
1759 | pcm_oss_file->streams[idx] = substream; | 1759 | pcm_oss_file->streams[idx] = substream; |
1760 | substream->file = pcm_oss_file; | ||
1760 | snd_pcm_oss_init_substream(substream, &setup[idx], minor); | 1761 | snd_pcm_oss_init_substream(substream, &setup[idx], minor); |
1761 | } | 1762 | } |
1762 | 1763 | ||
1763 | if (! pcm_oss_file->streams[0] && pcm_oss_file->streams[1]) { | 1764 | if (!pcm_oss_file->streams[0] && !pcm_oss_file->streams[1]) { |
1764 | snd_pcm_oss_release_file(pcm_oss_file); | 1765 | snd_pcm_oss_release_file(pcm_oss_file); |
1765 | return -EINVAL; | 1766 | return -EINVAL; |
1766 | } | 1767 | } |
@@ -1809,7 +1810,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file) | |||
1809 | err = -EFAULT; | 1810 | err = -EFAULT; |
1810 | goto __error; | 1811 | goto __error; |
1811 | } | 1812 | } |
1812 | memset(setup, 0, sizeof(*setup)); | 1813 | memset(setup, 0, sizeof(setup)); |
1813 | if (file->f_mode & FMODE_WRITE) | 1814 | if (file->f_mode & FMODE_WRITE) |
1814 | snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK, | 1815 | snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK, |
1815 | task_name, &setup[0]); | 1816 | 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[] = { | |||
196 | FORMAT(U18_3BE), | 196 | FORMAT(U18_3BE), |
197 | }; | 197 | }; |
198 | 198 | ||
199 | const char *snd_pcm_format_name(snd_pcm_format_t format) | 199 | static const char *snd_pcm_format_name(snd_pcm_format_t format) |
200 | { | 200 | { |
201 | return snd_pcm_format_names[format]; | 201 | return snd_pcm_format_names[format]; |
202 | } | 202 | } |
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) | |||
2007 | void snd_pcm_release_substream(struct snd_pcm_substream *substream) | 2007 | void snd_pcm_release_substream(struct snd_pcm_substream *substream) |
2008 | { | 2008 | { |
2009 | snd_pcm_drop(substream); | 2009 | snd_pcm_drop(substream); |
2010 | if (substream->pcm_release) | ||
2011 | substream->pcm_release(substream); | ||
2012 | if (substream->hw_opened) { | 2010 | if (substream->hw_opened) { |
2013 | if (substream->ops->hw_free != NULL) | 2011 | if (substream->ops->hw_free != NULL) |
2014 | substream->ops->hw_free(substream); | 2012 | substream->ops->hw_free(substream); |
2015 | substream->ops->close(substream); | 2013 | substream->ops->close(substream); |
2016 | substream->hw_opened = 0; | 2014 | substream->hw_opened = 0; |
2017 | } | 2015 | } |
2016 | if (substream->pcm_release) { | ||
2017 | substream->pcm_release(substream); | ||
2018 | substream->pcm_release = NULL; | ||
2019 | } | ||
2018 | snd_pcm_detach_substream(substream); | 2020 | snd_pcm_detach_substream(substream); |
2019 | } | 2021 | } |
2020 | 2022 | ||
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) | |||
183 | 183 | ||
184 | */ | 184 | */ |
185 | 185 | ||
186 | static void snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, int ack) | 186 | static int snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, |
187 | int ack) | ||
187 | { | 188 | { |
188 | unsigned long flags; | 189 | unsigned long flags; |
189 | int timeout, ok; | 190 | int timeout, ok; |
@@ -218,9 +219,11 @@ static void snd_mpu401_uart_cmd(struct snd_mpu401 * mpu, unsigned char cmd, int | |||
218 | ok = 1; | 219 | ok = 1; |
219 | } | 220 | } |
220 | spin_unlock_irqrestore(&mpu->input_lock, flags); | 221 | spin_unlock_irqrestore(&mpu->input_lock, flags); |
221 | if (! ok) | 222 | if (!ok) { |
222 | 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))); | 223 | 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))); |
223 | // 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))); | 224 | return 1; |
225 | } | ||
226 | return 0; | ||
224 | } | 227 | } |
225 | 228 | ||
226 | /* | 229 | /* |
@@ -235,12 +238,19 @@ static int snd_mpu401_uart_input_open(struct snd_rawmidi_substream *substream) | |||
235 | if (mpu->open_input && (err = mpu->open_input(mpu)) < 0) | 238 | if (mpu->open_input && (err = mpu->open_input(mpu)) < 0) |
236 | return err; | 239 | return err; |
237 | if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) { | 240 | if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) { |
238 | snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1); | 241 | if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) |
239 | snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1); | 242 | goto error_out; |
243 | if (snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1)) | ||
244 | goto error_out; | ||
240 | } | 245 | } |
241 | mpu->substream_input = substream; | 246 | mpu->substream_input = substream; |
242 | set_bit(MPU401_MODE_BIT_INPUT, &mpu->mode); | 247 | set_bit(MPU401_MODE_BIT_INPUT, &mpu->mode); |
243 | return 0; | 248 | return 0; |
249 | |||
250 | error_out: | ||
251 | if (mpu->open_input && mpu->close_input) | ||
252 | mpu->close_input(mpu); | ||
253 | return -EIO; | ||
244 | } | 254 | } |
245 | 255 | ||
246 | static int snd_mpu401_uart_output_open(struct snd_rawmidi_substream *substream) | 256 | 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) | |||
252 | if (mpu->open_output && (err = mpu->open_output(mpu)) < 0) | 262 | if (mpu->open_output && (err = mpu->open_output(mpu)) < 0) |
253 | return err; | 263 | return err; |
254 | if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) { | 264 | if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) { |
255 | snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1); | 265 | if (snd_mpu401_uart_cmd(mpu, MPU401_RESET, 1)) |
256 | snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1); | 266 | goto error_out; |
267 | if (snd_mpu401_uart_cmd(mpu, MPU401_ENTER_UART, 1)) | ||
268 | goto error_out; | ||
257 | } | 269 | } |
258 | mpu->substream_output = substream; | 270 | mpu->substream_output = substream; |
259 | set_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode); | 271 | set_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode); |
260 | return 0; | 272 | return 0; |
273 | |||
274 | error_out: | ||
275 | if (mpu->open_output && mpu->close_output) | ||
276 | mpu->close_output(mpu); | ||
277 | return -EIO; | ||
261 | } | 278 | } |
262 | 279 | ||
263 | static int snd_mpu401_uart_input_close(struct snd_rawmidi_substream *substream) | 280 | static int snd_mpu401_uart_input_close(struct snd_rawmidi_substream *substream) |
264 | { | 281 | { |
265 | struct snd_mpu401 *mpu; | 282 | struct snd_mpu401 *mpu; |
283 | int err = 0; | ||
266 | 284 | ||
267 | mpu = substream->rmidi->private_data; | 285 | mpu = substream->rmidi->private_data; |
268 | clear_bit(MPU401_MODE_BIT_INPUT, &mpu->mode); | 286 | clear_bit(MPU401_MODE_BIT_INPUT, &mpu->mode); |
269 | mpu->substream_input = NULL; | 287 | mpu->substream_input = NULL; |
270 | if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) | 288 | if (! test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode)) |
271 | snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0); | 289 | err = snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0); |
272 | if (mpu->close_input) | 290 | if (mpu->close_input) |
273 | mpu->close_input(mpu); | 291 | mpu->close_input(mpu); |
292 | if (err) | ||
293 | return -EIO; | ||
274 | return 0; | 294 | return 0; |
275 | } | 295 | } |
276 | 296 | ||
277 | static int snd_mpu401_uart_output_close(struct snd_rawmidi_substream *substream) | 297 | static int snd_mpu401_uart_output_close(struct snd_rawmidi_substream *substream) |
278 | { | 298 | { |
279 | struct snd_mpu401 *mpu; | 299 | struct snd_mpu401 *mpu; |
300 | int err = 0; | ||
280 | 301 | ||
281 | mpu = substream->rmidi->private_data; | 302 | mpu = substream->rmidi->private_data; |
282 | clear_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode); | 303 | clear_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode); |
283 | mpu->substream_output = NULL; | 304 | mpu->substream_output = NULL; |
284 | if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) | 305 | if (! test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) |
285 | snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0); | 306 | err = snd_mpu401_uart_cmd(mpu, MPU401_RESET, 0); |
286 | if (mpu->close_output) | 307 | if (mpu->close_output) |
287 | mpu->close_output(mpu); | 308 | mpu->close_output(mpu); |
309 | if (err) | ||
310 | return -EIO; | ||
288 | return 0; | 311 | return 0; |
289 | } | 312 | } |
290 | 313 | ||
@@ -316,6 +339,7 @@ static void snd_mpu401_uart_input_trigger(struct snd_rawmidi_substream *substrea | |||
316 | snd_mpu401_uart_remove_timer(mpu, 1); | 339 | snd_mpu401_uart_remove_timer(mpu, 1); |
317 | clear_bit(MPU401_MODE_BIT_INPUT_TRIGGER, &mpu->mode); | 340 | clear_bit(MPU401_MODE_BIT_INPUT_TRIGGER, &mpu->mode); |
318 | } | 341 | } |
342 | |||
319 | } | 343 | } |
320 | 344 | ||
321 | /* | 345 | /* |
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) | |||
193 | continue; | 193 | continue; |
194 | device = platform_device_register_simple(SND_AD1848_DRIVER, | 194 | device = platform_device_register_simple(SND_AD1848_DRIVER, |
195 | i, NULL, 0); | 195 | i, NULL, 0); |
196 | if (IS_ERR(device)) { | 196 | if (IS_ERR(device)) |
197 | err = PTR_ERR(device); | 197 | continue; |
198 | goto errout; | 198 | if (!platform_get_drvdata(device)) { |
199 | platform_device_unregister(device); | ||
200 | continue; | ||
199 | } | 201 | } |
200 | devices[i] = device; | 202 | devices[i] = device; |
201 | cards++; | 203 | cards++; |
@@ -204,14 +206,10 @@ static int __init alsa_card_ad1848_init(void) | |||
204 | #ifdef MODULE | 206 | #ifdef MODULE |
205 | printk(KERN_ERR "AD1848 soundcard not found or device busy\n"); | 207 | printk(KERN_ERR "AD1848 soundcard not found or device busy\n"); |
206 | #endif | 208 | #endif |
207 | err = -ENODEV; | 209 | snd_ad1848_unregister_all(); |
208 | goto errout; | 210 | return -ENODEV; |
209 | } | 211 | } |
210 | return 0; | 212 | return 0; |
211 | |||
212 | errout: | ||
213 | snd_ad1848_unregister_all(); | ||
214 | return err; | ||
215 | } | 213 | } |
216 | 214 | ||
217 | static void __exit alsa_card_ad1848_exit(void) | 215 | 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) | |||
43 | struct snd_card *card; | 43 | struct snd_card *card; |
44 | struct snd_opl3 *opl3; | 44 | struct snd_opl3 *opl3; |
45 | 45 | ||
46 | int error; | 46 | int error, i = device->id; |
47 | int i = device->id; | ||
48 | 47 | ||
49 | if (port[i] == SNDRV_AUTO_PORT) { | 48 | if (port[i] == SNDRV_AUTO_PORT) { |
50 | snd_printk(KERN_ERR DRV_NAME ": please specify port\n"); | 49 | snd_printk(KERN_ERR DRV_NAME ": please specify port\n"); |
@@ -95,8 +94,7 @@ static int __devinit snd_adlib_probe(struct platform_device *device) | |||
95 | return 0; | 94 | return 0; |
96 | 95 | ||
97 | out1: snd_card_free(card); | 96 | out1: snd_card_free(card); |
98 | out0: error = -EINVAL; /* FIXME: should be the original error code */ | 97 | out0: return error; |
99 | return error; | ||
100 | } | 98 | } |
101 | 99 | ||
102 | static int __devexit snd_adlib_remove(struct platform_device *device) | 100 | static int __devexit snd_adlib_remove(struct platform_device *device) |
@@ -134,6 +132,11 @@ static int __init alsa_card_adlib_init(void) | |||
134 | if (IS_ERR(device)) | 132 | if (IS_ERR(device)) |
135 | continue; | 133 | continue; |
136 | 134 | ||
135 | if (!platform_get_drvdata(device)) { | ||
136 | platform_device_unregister(device); | ||
137 | continue; | ||
138 | } | ||
139 | |||
137 | devices[i] = device; | 140 | devices[i] = device; |
138 | cards++; | 141 | cards++; |
139 | } | 142 | } |
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) | |||
699 | continue; | 699 | continue; |
700 | device = platform_device_register_simple(CMI8330_DRIVER, | 700 | device = platform_device_register_simple(CMI8330_DRIVER, |
701 | i, NULL, 0); | 701 | i, NULL, 0); |
702 | if (IS_ERR(device)) { | 702 | if (IS_ERR(device)) |
703 | err = PTR_ERR(device); | 703 | continue; |
704 | goto errout; | 704 | if (!platform_get_drvdata(device)) { |
705 | platform_device_unregister(device); | ||
706 | continue; | ||
705 | } | 707 | } |
706 | platform_devices[i] = device; | 708 | platform_devices[i] = device; |
707 | cards++; | 709 | cards++; |
@@ -719,14 +721,10 @@ static int __init alsa_card_cmi8330_init(void) | |||
719 | #ifdef MODULE | 721 | #ifdef MODULE |
720 | snd_printk(KERN_ERR "CMI8330 not found or device busy\n"); | 722 | snd_printk(KERN_ERR "CMI8330 not found or device busy\n"); |
721 | #endif | 723 | #endif |
722 | err = -ENODEV; | 724 | snd_cmi8330_unregister_all(); |
723 | goto errout; | 725 | return -ENODEV; |
724 | } | 726 | } |
725 | return 0; | 727 | return 0; |
726 | |||
727 | errout: | ||
728 | snd_cmi8330_unregister_all(); | ||
729 | return err; | ||
730 | } | 728 | } |
731 | 729 | ||
732 | static void __exit alsa_card_cmi8330_exit(void) | 730 | 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) | |||
209 | continue; | 209 | continue; |
210 | device = platform_device_register_simple(SND_CS4231_DRIVER, | 210 | device = platform_device_register_simple(SND_CS4231_DRIVER, |
211 | i, NULL, 0); | 211 | i, NULL, 0); |
212 | if (IS_ERR(device)) { | 212 | if (IS_ERR(device)) |
213 | err = PTR_ERR(device); | 213 | continue; |
214 | goto errout; | 214 | if (!platform_get_drvdata(device)) { |
215 | platform_device_unregister(device); | ||
216 | continue; | ||
215 | } | 217 | } |
216 | devices[i] = device; | 218 | devices[i] = device; |
217 | cards++; | 219 | cards++; |
@@ -220,14 +222,10 @@ static int __init alsa_card_cs4231_init(void) | |||
220 | #ifdef MODULE | 222 | #ifdef MODULE |
221 | printk(KERN_ERR "CS4231 soundcard not found or device busy\n"); | 223 | printk(KERN_ERR "CS4231 soundcard not found or device busy\n"); |
222 | #endif | 224 | #endif |
223 | err = -ENODEV; | 225 | snd_cs4231_unregister_all(); |
224 | goto errout; | 226 | return -ENODEV; |
225 | } | 227 | } |
226 | return 0; | 228 | return 0; |
227 | |||
228 | errout: | ||
229 | snd_cs4231_unregister_all(); | ||
230 | return err; | ||
231 | } | 229 | } |
232 | 230 | ||
233 | static void __exit alsa_card_cs4231_exit(void) | 231 | 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) | |||
780 | continue; | 780 | continue; |
781 | device = platform_device_register_simple(CS423X_DRIVER, | 781 | device = platform_device_register_simple(CS423X_DRIVER, |
782 | i, NULL, 0); | 782 | i, NULL, 0); |
783 | if (IS_ERR(device)) { | 783 | if (IS_ERR(device)) |
784 | err = PTR_ERR(device); | 784 | continue; |
785 | goto errout; | 785 | if (!platform_get_drvdata(device)) { |
786 | platform_device_unregister(device); | ||
787 | continue; | ||
786 | } | 788 | } |
787 | platform_devices[i] = device; | 789 | platform_devices[i] = device; |
788 | snd_cs423x_devices++; | 790 | snd_cs423x_devices++; |
@@ -802,14 +804,10 @@ static int __init alsa_card_cs423x_init(void) | |||
802 | #ifdef MODULE | 804 | #ifdef MODULE |
803 | printk(KERN_ERR IDENT " soundcard not found or device busy\n"); | 805 | printk(KERN_ERR IDENT " soundcard not found or device busy\n"); |
804 | #endif | 806 | #endif |
805 | err = -ENODEV; | 807 | snd_cs423x_unregister_all(); |
806 | goto errout; | 808 | return -ENODEV; |
807 | } | 809 | } |
808 | return 0; | 810 | return 0; |
809 | |||
810 | errout: | ||
811 | snd_cs423x_unregister_all(); | ||
812 | return err; | ||
813 | } | 811 | } |
814 | 812 | ||
815 | static void __exit alsa_card_cs423x_exit(void) | 813 | 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) | |||
213 | continue; | 213 | continue; |
214 | device = platform_device_register_simple(ES1688_DRIVER, | 214 | device = platform_device_register_simple(ES1688_DRIVER, |
215 | i, NULL, 0); | 215 | i, NULL, 0); |
216 | if (IS_ERR(device)) { | 216 | if (IS_ERR(device)) |
217 | err = PTR_ERR(device); | 217 | continue; |
218 | goto errout; | 218 | if (!platform_get_drvdata(device)) { |
219 | platform_device_unregister(device); | ||
220 | continue; | ||
219 | } | 221 | } |
220 | devices[i] = device; | 222 | devices[i] = device; |
221 | cards++; | 223 | cards++; |
@@ -224,14 +226,10 @@ static int __init alsa_card_es1688_init(void) | |||
224 | #ifdef MODULE | 226 | #ifdef MODULE |
225 | printk(KERN_ERR "ESS AudioDrive ES1688 soundcard not found or device busy\n"); | 227 | printk(KERN_ERR "ESS AudioDrive ES1688 soundcard not found or device busy\n"); |
226 | #endif | 228 | #endif |
227 | err = -ENODEV; | 229 | snd_es1688_unregister_all(); |
228 | goto errout; | 230 | return -ENODEV; |
229 | } | 231 | } |
230 | return 0; | 232 | return 0; |
231 | |||
232 | errout: | ||
233 | snd_es1688_unregister_all(); | ||
234 | return err; | ||
235 | } | 233 | } |
236 | 234 | ||
237 | static void __exit alsa_card_es1688_exit(void) | 235 | 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) | |||
2391 | continue; | 2391 | continue; |
2392 | device = platform_device_register_simple(ES18XX_DRIVER, | 2392 | device = platform_device_register_simple(ES18XX_DRIVER, |
2393 | i, NULL, 0); | 2393 | i, NULL, 0); |
2394 | if (IS_ERR(device)) { | 2394 | if (IS_ERR(device)) |
2395 | err = PTR_ERR(device); | 2395 | continue; |
2396 | goto errout; | 2396 | if (!platform_get_drvdata(device)) { |
2397 | platform_device_unregister(device); | ||
2398 | continue; | ||
2397 | } | 2399 | } |
2398 | platform_devices[i] = device; | 2400 | platform_devices[i] = device; |
2399 | cards++; | 2401 | cards++; |
@@ -2411,14 +2413,10 @@ static int __init alsa_card_es18xx_init(void) | |||
2411 | #ifdef MODULE | 2413 | #ifdef MODULE |
2412 | snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n"); | 2414 | snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n"); |
2413 | #endif | 2415 | #endif |
2414 | err = -ENODEV; | 2416 | snd_es18xx_unregister_all(); |
2415 | goto errout; | 2417 | return -ENODEV; |
2416 | } | 2418 | } |
2417 | return 0; | 2419 | return 0; |
2418 | |||
2419 | errout: | ||
2420 | snd_es18xx_unregister_all(); | ||
2421 | return err; | ||
2422 | } | 2420 | } |
2423 | 2421 | ||
2424 | static void __exit alsa_card_es18xx_exit(void) | 2422 | 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) | |||
253 | continue; | 253 | continue; |
254 | device = platform_device_register_simple(GUSCLASSIC_DRIVER, | 254 | device = platform_device_register_simple(GUSCLASSIC_DRIVER, |
255 | i, NULL, 0); | 255 | i, NULL, 0); |
256 | if (IS_ERR(device)) { | 256 | if (IS_ERR(device)) |
257 | err = PTR_ERR(device); | 257 | continue; |
258 | goto errout; | 258 | if (!platform_get_drvdata(device)) { |
259 | platform_device_unregister(device); | ||
260 | continue; | ||
259 | } | 261 | } |
260 | devices[i] = device; | 262 | devices[i] = device; |
261 | cards++; | 263 | cards++; |
@@ -264,14 +266,10 @@ static int __init alsa_card_gusclassic_init(void) | |||
264 | #ifdef MODULE | 266 | #ifdef MODULE |
265 | printk(KERN_ERR "GUS Classic soundcard not found or device busy\n"); | 267 | printk(KERN_ERR "GUS Classic soundcard not found or device busy\n"); |
266 | #endif | 268 | #endif |
267 | err = -ENODEV; | 269 | snd_gusclassic_unregister_all(); |
268 | goto errout; | 270 | return -ENODEV; |
269 | } | 271 | } |
270 | return 0; | 272 | return 0; |
271 | |||
272 | errout: | ||
273 | snd_gusclassic_unregister_all(); | ||
274 | return err; | ||
275 | } | 273 | } |
276 | 274 | ||
277 | static void __exit alsa_card_gusclassic_exit(void) | 275 | 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) | |||
363 | continue; | 363 | continue; |
364 | device = platform_device_register_simple(GUSEXTREME_DRIVER, | 364 | device = platform_device_register_simple(GUSEXTREME_DRIVER, |
365 | i, NULL, 0); | 365 | i, NULL, 0); |
366 | if (IS_ERR(device)) { | 366 | if (IS_ERR(device)) |
367 | err = PTR_ERR(device); | 367 | continue; |
368 | goto errout; | 368 | if (!platform_get_drvdata(device)) { |
369 | platform_device_unregister(device); | ||
370 | continue; | ||
369 | } | 371 | } |
370 | devices[i] = device; | 372 | devices[i] = device; |
371 | cards++; | 373 | cards++; |
@@ -374,14 +376,10 @@ static int __init alsa_card_gusextreme_init(void) | |||
374 | #ifdef MODULE | 376 | #ifdef MODULE |
375 | printk(KERN_ERR "GUS Extreme soundcard not found or device busy\n"); | 377 | printk(KERN_ERR "GUS Extreme soundcard not found or device busy\n"); |
376 | #endif | 378 | #endif |
377 | err = -ENODEV; | 379 | snd_gusextreme_unregister_all(); |
378 | goto errout; | 380 | return -ENODEV; |
379 | } | 381 | } |
380 | return 0; | 382 | return 0; |
381 | |||
382 | errout: | ||
383 | snd_gusextreme_unregister_all(); | ||
384 | return err; | ||
385 | } | 383 | } |
386 | 384 | ||
387 | static void __exit alsa_card_gusextreme_exit(void) | 385 | 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) | |||
390 | continue; | 390 | continue; |
391 | device = platform_device_register_simple(GUSMAX_DRIVER, | 391 | device = platform_device_register_simple(GUSMAX_DRIVER, |
392 | i, NULL, 0); | 392 | i, NULL, 0); |
393 | if (IS_ERR(device)) { | 393 | if (IS_ERR(device)) |
394 | err = PTR_ERR(device); | 394 | continue; |
395 | goto errout; | 395 | if (!platform_get_drvdata(device)) { |
396 | platform_device_unregister(device); | ||
397 | continue; | ||
396 | } | 398 | } |
397 | devices[i] = device; | 399 | devices[i] = device; |
398 | cards++; | 400 | cards++; |
@@ -401,14 +403,10 @@ static int __init alsa_card_gusmax_init(void) | |||
401 | #ifdef MODULE | 403 | #ifdef MODULE |
402 | printk(KERN_ERR "GUS MAX soundcard not found or device busy\n"); | 404 | printk(KERN_ERR "GUS MAX soundcard not found or device busy\n"); |
403 | #endif | 405 | #endif |
404 | err = -ENODEV; | 406 | snd_gusmax_unregister_all(); |
405 | goto errout; | 407 | return -ENODEV; |
406 | } | 408 | } |
407 | return 0; | 409 | return 0; |
408 | |||
409 | errout: | ||
410 | snd_gusmax_unregister_all(); | ||
411 | return err; | ||
412 | } | 410 | } |
413 | 411 | ||
414 | static void __exit alsa_card_gusmax_exit(void) | 412 | 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) | |||
947 | #endif | 947 | #endif |
948 | device = platform_device_register_simple(INTERWAVE_DRIVER, | 948 | device = platform_device_register_simple(INTERWAVE_DRIVER, |
949 | i, NULL, 0); | 949 | i, NULL, 0); |
950 | if (IS_ERR(device)) { | 950 | if (IS_ERR(device)) |
951 | err = PTR_ERR(device); | 951 | continue; |
952 | goto errout; | 952 | if (!platform_get_drvdata(device)) { |
953 | platform_device_unregister(device); | ||
954 | continue; | ||
953 | } | 955 | } |
954 | platform_devices[i] = device; | 956 | platform_devices[i] = device; |
955 | cards++; | 957 | cards++; |
@@ -966,14 +968,10 @@ static int __init alsa_card_interwave_init(void) | |||
966 | #ifdef MODULE | 968 | #ifdef MODULE |
967 | printk(KERN_ERR "InterWave soundcard not found or device busy\n"); | 969 | printk(KERN_ERR "InterWave soundcard not found or device busy\n"); |
968 | #endif | 970 | #endif |
969 | err = -ENODEV; | 971 | snd_interwave_unregister_all(); |
970 | goto errout; | 972 | return -ENODEV; |
971 | } | 973 | } |
972 | return 0; | 974 | return 0; |
973 | |||
974 | errout: | ||
975 | snd_interwave_unregister_all(); | ||
976 | return err; | ||
977 | } | 975 | } |
978 | 976 | ||
979 | static void __exit alsa_card_interwave_exit(void) | 977 | 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) | |||
962 | #endif | 962 | #endif |
963 | device = platform_device_register_simple(OPL3SA2_DRIVER, | 963 | device = platform_device_register_simple(OPL3SA2_DRIVER, |
964 | i, NULL, 0); | 964 | i, NULL, 0); |
965 | if (IS_ERR(device)) { | 965 | if (IS_ERR(device)) |
966 | err = PTR_ERR(device); | 966 | continue; |
967 | goto errout; | 967 | if (!platform_get_drvdata(device)) { |
968 | platform_device_unregister(device); | ||
969 | continue; | ||
968 | } | 970 | } |
969 | platform_devices[i] = device; | 971 | platform_devices[i] = device; |
970 | snd_opl3sa2_devices++; | 972 | snd_opl3sa2_devices++; |
@@ -983,14 +985,10 @@ static int __init alsa_card_opl3sa2_init(void) | |||
983 | #ifdef MODULE | 985 | #ifdef MODULE |
984 | snd_printk(KERN_ERR "Yamaha OPL3-SA soundcard not found or device busy\n"); | 986 | snd_printk(KERN_ERR "Yamaha OPL3-SA soundcard not found or device busy\n"); |
985 | #endif | 987 | #endif |
986 | err = -ENODEV; | 988 | snd_opl3sa2_unregister_all(); |
987 | goto errout; | 989 | return -ENODEV; |
988 | } | 990 | } |
989 | return 0; | 991 | return 0; |
990 | |||
991 | errout: | ||
992 | snd_opl3sa2_unregister_all(); | ||
993 | return err; | ||
994 | } | 992 | } |
995 | 993 | ||
996 | static void __exit alsa_card_opl3sa2_exit(void) | 994 | 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) | |||
1436 | if ((error = platform_driver_register(&snd_miro_driver)) < 0) | 1436 | if ((error = platform_driver_register(&snd_miro_driver)) < 0) |
1437 | return error; | 1437 | return error; |
1438 | device = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0); | 1438 | device = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0); |
1439 | if (! IS_ERR(device)) | 1439 | if (! IS_ERR(device)) { |
1440 | return 0; | 1440 | if (platform_get_drvdata(device)) |
1441 | return 0; | ||
1442 | platform_device_unregister(device); | ||
1443 | } | ||
1441 | #ifdef MODULE | 1444 | #ifdef MODULE |
1442 | printk(KERN_ERR "no miro soundcard found\n"); | 1445 | printk(KERN_ERR "no miro soundcard found\n"); |
1443 | #endif | 1446 | #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) | |||
2099 | return error; | 2099 | return error; |
2100 | device = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0); | 2100 | device = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0); |
2101 | if (!IS_ERR(device)) { | 2101 | if (!IS_ERR(device)) { |
2102 | snd_opti9xx_platform_device = device; | 2102 | if (platform_get_drvdata(device)) { |
2103 | return 0; | 2103 | snd_opti9xx_platform_device = device; |
2104 | return 0; | ||
2105 | } | ||
2106 | platform_device_unregister(device); | ||
2104 | } | 2107 | } |
2105 | platform_driver_unregister(&snd_opti9xx_driver); | 2108 | platform_driver_unregister(&snd_opti9xx_driver); |
2106 | } | 2109 | } |
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) | |||
720 | continue; | 720 | continue; |
721 | device = platform_device_register_simple(SND_SB16_DRIVER, | 721 | device = platform_device_register_simple(SND_SB16_DRIVER, |
722 | i, NULL, 0); | 722 | i, NULL, 0); |
723 | if (IS_ERR(device)) { | 723 | if (IS_ERR(device)) |
724 | err = PTR_ERR(device); | 724 | continue; |
725 | goto errout; | 725 | if (!platform_get_drvdata(device)) { |
726 | platform_device_unregister(device); | ||
727 | continue; | ||
726 | } | 728 | } |
727 | platform_devices[i] = device; | 729 | platform_devices[i] = device; |
728 | cards++; | 730 | cards++; |
@@ -745,14 +747,10 @@ static int __init alsa_card_sb16_init(void) | |||
745 | snd_printk(KERN_ERR "In case, if you have AWE card, try snd-sbawe module\n"); | 747 | snd_printk(KERN_ERR "In case, if you have AWE card, try snd-sbawe module\n"); |
746 | #endif | 748 | #endif |
747 | #endif | 749 | #endif |
748 | err = -ENODEV; | 750 | snd_sb16_unregister_all(); |
749 | goto errout; | 751 | return -ENODEV; |
750 | } | 752 | } |
751 | return 0; | 753 | return 0; |
752 | |||
753 | errout: | ||
754 | snd_sb16_unregister_all(); | ||
755 | return err; | ||
756 | } | 754 | } |
757 | 755 | ||
758 | static void __exit alsa_card_sb16_exit(void) | 756 | 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) | |||
264 | continue; | 264 | continue; |
265 | device = platform_device_register_simple(SND_SB8_DRIVER, | 265 | device = platform_device_register_simple(SND_SB8_DRIVER, |
266 | i, NULL, 0); | 266 | i, NULL, 0); |
267 | if (IS_ERR(device)) { | 267 | if (IS_ERR(device)) |
268 | err = PTR_ERR(device); | 268 | continue; |
269 | goto errout; | 269 | if (!platform_get_drvdata(device)) { |
270 | platform_device_unregister(device); | ||
271 | continue; | ||
270 | } | 272 | } |
271 | devices[i] = device; | 273 | devices[i] = device; |
272 | cards++; | 274 | cards++; |
@@ -275,14 +277,10 @@ static int __init alsa_card_sb8_init(void) | |||
275 | #ifdef MODULE | 277 | #ifdef MODULE |
276 | snd_printk(KERN_ERR "Sound Blaster soundcard not found or device busy\n"); | 278 | snd_printk(KERN_ERR "Sound Blaster soundcard not found or device busy\n"); |
277 | #endif | 279 | #endif |
278 | err = -ENODEV; | 280 | snd_sb8_unregister_all(); |
279 | goto errout; | 281 | return -ENODEV; |
280 | } | 282 | } |
281 | return 0; | 283 | return 0; |
282 | |||
283 | errout: | ||
284 | snd_sb8_unregister_all(); | ||
285 | return err; | ||
286 | } | 284 | } |
287 | 285 | ||
288 | static void __exit alsa_card_sb8_exit(void) | 286 | 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) | |||
366 | continue; | 366 | continue; |
367 | device = platform_device_register_simple(SND_SGALAXY_DRIVER, | 367 | device = platform_device_register_simple(SND_SGALAXY_DRIVER, |
368 | i, NULL, 0); | 368 | i, NULL, 0); |
369 | if (IS_ERR(device)) { | 369 | if (IS_ERR(device)) |
370 | err = PTR_ERR(device); | 370 | continue; |
371 | goto errout; | 371 | if (!platform_get_drvdata(device)) { |
372 | platform_device_unregister(device); | ||
373 | continue; | ||
372 | } | 374 | } |
373 | devices[i] = device; | 375 | devices[i] = device; |
374 | cards++; | 376 | cards++; |
@@ -377,14 +379,10 @@ static int __init alsa_card_sgalaxy_init(void) | |||
377 | #ifdef MODULE | 379 | #ifdef MODULE |
378 | snd_printk(KERN_ERR "Sound Galaxy soundcard not found or device busy\n"); | 380 | snd_printk(KERN_ERR "Sound Galaxy soundcard not found or device busy\n"); |
379 | #endif | 381 | #endif |
380 | err = -ENODEV; | 382 | snd_sgalaxy_unregister_all(); |
381 | goto errout; | 383 | return -ENODEV; |
382 | } | 384 | } |
383 | return 0; | 385 | return 0; |
384 | |||
385 | errout: | ||
386 | snd_sgalaxy_unregister_all(); | ||
387 | return err; | ||
388 | } | 386 | } |
389 | 387 | ||
390 | static void __exit alsa_card_sgalaxy_exit(void) | 388 | 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) | |||
1427 | dma[i] == SNDRV_AUTO_DMA) { | 1427 | dma[i] == SNDRV_AUTO_DMA) { |
1428 | printk(KERN_INFO | 1428 | printk(KERN_INFO |
1429 | "sscape: insufficient parameters, need IO, IRQ, MPU-IRQ and DMA\n"); | 1429 | "sscape: insufficient parameters, need IO, IRQ, MPU-IRQ and DMA\n"); |
1430 | ret = -ENXIO; | 1430 | sscape_unregister_all(); |
1431 | goto errout; | 1431 | return -ENXIO; |
1432 | } | 1432 | } |
1433 | 1433 | ||
1434 | /* | 1434 | /* |
@@ -1436,17 +1436,15 @@ static int __init sscape_manual_probe(void) | |||
1436 | */ | 1436 | */ |
1437 | device = platform_device_register_simple(SSCAPE_DRIVER, | 1437 | device = platform_device_register_simple(SSCAPE_DRIVER, |
1438 | i, NULL, 0); | 1438 | i, NULL, 0); |
1439 | if (IS_ERR(device)) { | 1439 | if (IS_ERR(device)) |
1440 | ret = PTR_ERR(device); | 1440 | continue; |
1441 | goto errout; | 1441 | if (!platform_get_drvdata(device)) { |
1442 | platform_device_unregister(device); | ||
1443 | continue; | ||
1442 | } | 1444 | } |
1443 | platform_devices[i] = device; | 1445 | platform_devices[i] = device; |
1444 | } | 1446 | } |
1445 | return 0; | 1447 | return 0; |
1446 | |||
1447 | errout: | ||
1448 | sscape_unregister_all(); | ||
1449 | return ret; | ||
1450 | } | 1448 | } |
1451 | 1449 | ||
1452 | static void sscape_exit(void) | 1450 | 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) | |||
722 | #endif | 722 | #endif |
723 | device = platform_device_register_simple(WAVEFRONT_DRIVER, | 723 | device = platform_device_register_simple(WAVEFRONT_DRIVER, |
724 | i, NULL, 0); | 724 | i, NULL, 0); |
725 | if (IS_ERR(device)) { | 725 | if (IS_ERR(device)) |
726 | err = PTR_ERR(device); | 726 | continue; |
727 | goto errout; | 727 | if (!platform_get_drvdata(device)) { |
728 | platform_device_unregister(device); | ||
729 | continue; | ||
728 | } | 730 | } |
729 | platform_devices[i] = device; | 731 | platform_devices[i] = device; |
730 | cards++; | 732 | cards++; |
@@ -742,14 +744,10 @@ static int __init alsa_card_wavefront_init(void) | |||
742 | #ifdef MODULE | 744 | #ifdef MODULE |
743 | printk (KERN_ERR "No WaveFront cards found or devices busy\n"); | 745 | printk (KERN_ERR "No WaveFront cards found or devices busy\n"); |
744 | #endif | 746 | #endif |
745 | err = -ENODEV; | 747 | snd_wavefront_unregister_all(); |
746 | goto errout; | 748 | return -ENODEV; |
747 | } | 749 | } |
748 | return 0; | 750 | return 0; |
749 | |||
750 | errout: | ||
751 | snd_wavefront_unregister_all(); | ||
752 | return err; | ||
753 | } | 751 | } |
754 | 752 | ||
755 | static void __exit alsa_card_wavefront_exit(void) | 753 | 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 @@ | |||
5 | # | 5 | # |
6 | # Prompt user for primary drivers. | 6 | # Prompt user for primary drivers. |
7 | 7 | ||
8 | config OBSOLETE_OSS_DRIVER | ||
9 | bool "Obsolete OSS drivers" | ||
10 | depends on SOUND_PRIME | ||
11 | help | ||
12 | This option enables support for obsolete OSS drivers that | ||
13 | are scheduled for removal in the near future since there | ||
14 | are ALSA drivers for the same hardware. | ||
15 | |||
16 | Please contact Adrian Bunk <bunk@stusta.de> if you had to | ||
17 | say Y here because your soundcard is not properly supported | ||
18 | by ALSA. | ||
19 | |||
20 | If unsure, say N. | ||
21 | |||
22 | config SOUND_BT878 | 8 | config SOUND_BT878 |
23 | tristate "BT878 audio dma" | 9 | tristate "BT878 audio dma" |
24 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | 10 | depends on SOUND_PRIME && PCI |
25 | ---help--- | 11 | ---help--- |
26 | Audio DMA support for bt878 based grabber boards. As you might have | 12 | Audio DMA support for bt878 based grabber boards. As you might have |
27 | already noticed, bt878 is listed with two functions in /proc/pci. | 13 | already noticed, bt878 is listed with two functions in /proc/pci. |
@@ -35,48 +21,9 @@ config SOUND_BT878 | |||
35 | To compile this driver as a module, choose M here: the module will | 21 | To compile this driver as a module, choose M here: the module will |
36 | be called btaudio. | 22 | be called btaudio. |
37 | 23 | ||
38 | config SOUND_CMPCI | ||
39 | tristate "C-Media PCI (CMI8338/8738)" | ||
40 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
41 | help | ||
42 | Say Y or M if you have a PCI sound card using the CMI8338 | ||
43 | or the CMI8738 chipset. Data on these chips are available at | ||
44 | <http://www.cmedia.com.tw/>. | ||
45 | |||
46 | A userspace utility to control some internal registers of these | ||
47 | chips is available at | ||
48 | <http://member.nifty.ne.jp/Breeze/softwares/unix/cmictl-e.html>. | ||
49 | |||
50 | config SOUND_CMPCI_FM | ||
51 | bool "Enable legacy FM" | ||
52 | depends on SOUND_CMPCI && X86 | ||
53 | help | ||
54 | Say Y here to enable the legacy FM (frequency-modulation) synthesizer | ||
55 | support on a card using the CMI8338 or CMI8378 chipset. Even it is | ||
56 | enabled, you need to set fmio as proper value to enable it. | ||
57 | Say N here if you don't need this. | ||
58 | |||
59 | config SOUND_CMPCI_MIDI | ||
60 | bool "Enable legacy MPU-401" | ||
61 | depends on SOUND_CMPCI && X86 | ||
62 | help | ||
63 | Say Y here to enable the legacy MPU401 MIDI synthesizer support on a | ||
64 | card using the CMI8338 or CMI8378 chipset. Even it is enabled, | ||
65 | you need to set mpuio as proper value to enable it. | ||
66 | Say N here if you don't need this. | ||
67 | |||
68 | config SOUND_CMPCI_JOYSTICK | ||
69 | bool "Enable joystick" | ||
70 | depends on SOUND_CMPCI && X86 && (GAMEPORT=y || SOUND_CMPCI=GAMEPORT) | ||
71 | help | ||
72 | Say Y here in order to enable the joystick port on a sound card using | ||
73 | the CMI8338 or the CMI8738 chipset. You need to config the | ||
74 | gameport support and set joystick parameter as 1 to use it. | ||
75 | Say N here if you don't need this. | ||
76 | |||
77 | config SOUND_EMU10K1 | 24 | config SOUND_EMU10K1 |
78 | tristate "Creative SBLive! (EMU10K1)" | 25 | tristate "Creative SBLive! (EMU10K1)" |
79 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | 26 | depends on SOUND_PRIME && PCI |
80 | ---help--- | 27 | ---help--- |
81 | Say Y or M if you have a PCI sound card using the EMU10K1 chipset, | 28 | Say Y or M if you have a PCI sound card using the EMU10K1 chipset, |
82 | such as the Creative SBLive!, SB PCI512 or Emu-APS. | 29 | such as the Creative SBLive!, SB PCI512 or Emu-APS. |
@@ -108,13 +55,6 @@ config SOUND_FUSION | |||
108 | series) when wired as native sound drivers with AC97 codecs. If | 55 | series) when wired as native sound drivers with AC97 codecs. If |
109 | this driver does not work try the CS4232 driver. | 56 | this driver does not work try the CS4232 driver. |
110 | 57 | ||
111 | config SOUND_CS4281 | ||
112 | tristate "Crystal Sound CS4281" | ||
113 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
114 | help | ||
115 | Picture and feature list at | ||
116 | <http://www.pcbroker.com/crystal4281.html>. | ||
117 | |||
118 | config SOUND_BCM_CS4297A | 58 | config SOUND_BCM_CS4297A |
119 | tristate "Crystal Sound CS4297a (for Swarm)" | 59 | tristate "Crystal Sound CS4297a (for Swarm)" |
120 | depends on SOUND_PRIME && SIBYTE_SWARM | 60 | depends on SOUND_PRIME && SIBYTE_SWARM |
@@ -125,22 +65,9 @@ config SOUND_BCM_CS4297A | |||
125 | note that CONFIG_KGDB should not be enabled at the same | 65 | note that CONFIG_KGDB should not be enabled at the same |
126 | time, since it also attempts to use this UART port. | 66 | time, since it also attempts to use this UART port. |
127 | 67 | ||
128 | config SOUND_ES1370 | ||
129 | tristate "Ensoniq AudioPCI (ES1370)" | ||
130 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
131 | help | ||
132 | Say Y or M if you have a PCI sound card utilizing the Ensoniq | ||
133 | ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find | ||
134 | out if your sound card uses an ES1370 without removing your | ||
135 | computer's cover, use lspci -n and look for the PCI ID | ||
136 | 1274:5000. Since Ensoniq was bought by Creative Labs, | ||
137 | Sound Blaster 64/PCI models are either ES1370 or ES1371 based. | ||
138 | This driver differs slightly from OSS/Free, so PLEASE READ | ||
139 | <file:Documentation/sound/oss/es1370>. | ||
140 | |||
141 | config SOUND_ES1371 | 68 | config SOUND_ES1371 |
142 | tristate "Creative Ensoniq AudioPCI 97 (ES1371)" | 69 | tristate "Creative Ensoniq AudioPCI 97 (ES1371)" |
143 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | 70 | depends on SOUND_PRIME && PCI |
144 | help | 71 | help |
145 | Say Y or M if you have a PCI sound card utilizing the Ensoniq | 72 | Say Y or M if you have a PCI sound card utilizing the Ensoniq |
146 | ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if | 73 | ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if |
@@ -151,33 +78,6 @@ config SOUND_ES1371 | |||
151 | slightly from OSS/Free, so PLEASE READ | 78 | slightly from OSS/Free, so PLEASE READ |
152 | <file:Documentation/sound/oss/es1371>. | 79 | <file:Documentation/sound/oss/es1371>. |
153 | 80 | ||
154 | config SOUND_ESSSOLO1 | ||
155 | tristate "ESS Technology Solo1" | ||
156 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
157 | help | ||
158 | Say Y or M if you have a PCI sound card utilizing the ESS Technology | ||
159 | Solo1 chip. To find out if your sound card uses a | ||
160 | Solo1 chip without removing your computer's cover, use | ||
161 | lspci -n and look for the PCI ID 125D:1969. This driver | ||
162 | differs slightly from OSS/Free, so PLEASE READ | ||
163 | <file:Documentation/sound/oss/solo1>. | ||
164 | |||
165 | config SOUND_MAESTRO | ||
166 | tristate "ESS Maestro, Maestro2, Maestro2E driver" | ||
167 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
168 | help | ||
169 | Say Y or M if you have a sound system driven by ESS's Maestro line | ||
170 | of PCI sound chips. These include the Maestro 1, Maestro 2, and | ||
171 | Maestro 2E. See <file:Documentation/sound/oss/Maestro> for more | ||
172 | details. | ||
173 | |||
174 | config SOUND_MAESTRO3 | ||
175 | tristate "ESS Maestro3/Allegro driver (EXPERIMENTAL)" | ||
176 | depends on SOUND_PRIME && PCI && EXPERIMENTAL && OBSOLETE_OSS_DRIVER | ||
177 | help | ||
178 | Say Y or M if you have a sound system driven by ESS's Maestro 3 | ||
179 | PCI sound chip. | ||
180 | |||
181 | config SOUND_ICH | 81 | config SOUND_ICH |
182 | tristate "Intel ICH (i8xx) audio support" | 82 | tristate "Intel ICH (i8xx) audio support" |
183 | depends on SOUND_PRIME && PCI | 83 | depends on SOUND_PRIME && PCI |
@@ -185,24 +85,6 @@ config SOUND_ICH | |||
185 | Support for integral audio in Intel's I/O Controller Hub (ICH) | 85 | Support for integral audio in Intel's I/O Controller Hub (ICH) |
186 | chipset, as used on the 810/820/840 motherboards. | 86 | chipset, as used on the 810/820/840 motherboards. |
187 | 87 | ||
188 | config SOUND_HARMONY | ||
189 | tristate "PA Harmony audio driver" | ||
190 | depends on GSC_LASI && SOUND_PRIME && OBSOLETE_OSS_DRIVER | ||
191 | help | ||
192 | Say 'Y' or 'M' to include support for Harmony soundchip | ||
193 | on HP 712, 715/new and many other GSC based machines. | ||
194 | |||
195 | config SOUND_SONICVIBES | ||
196 | tristate "S3 SonicVibes" | ||
197 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
198 | help | ||
199 | Say Y or M if you have a PCI sound card utilizing the S3 | ||
200 | SonicVibes chipset. To find out if your sound card uses a | ||
201 | SonicVibes chip without removing your computer's cover, use | ||
202 | lspci -n and look for the PCI ID 5333:CA00. This driver | ||
203 | differs slightly from OSS/Free, so PLEASE READ | ||
204 | <file:Documentation/sound/oss/sonicvibes>. | ||
205 | |||
206 | config SOUND_VWSND | 88 | config SOUND_VWSND |
207 | tristate "SGI Visual Workstation Sound" | 89 | tristate "SGI Visual Workstation Sound" |
208 | depends on SOUND_PRIME && X86_VISWS | 90 | depends on SOUND_PRIME && X86_VISWS |
@@ -231,10 +113,6 @@ config SOUND_VRC5477 | |||
231 | integrated, multi-function controller chip for MIPS CPUs. Works | 113 | integrated, multi-function controller chip for MIPS CPUs. Works |
232 | with the AC97 codec. | 114 | with the AC97 codec. |
233 | 115 | ||
234 | config SOUND_AU1000 | ||
235 | tristate "Au1000 Sound" | ||
236 | depends on SOUND_PRIME && (SOC_AU1000 || SOC_AU1100 || SOC_AU1500) && OBSOLETE_OSS_DRIVER | ||
237 | |||
238 | config SOUND_AU1550_AC97 | 116 | config SOUND_AU1550_AC97 |
239 | tristate "Au1550 AC97 Sound" | 117 | tristate "Au1550 AC97 Sound" |
240 | depends on SOUND_PRIME && SOC_AU1550 | 118 | depends on SOUND_PRIME && SOC_AU1550 |
@@ -507,7 +385,7 @@ config MSND_FIFOSIZE | |||
507 | 385 | ||
508 | config SOUND_VIA82CXXX | 386 | config SOUND_VIA82CXXX |
509 | tristate "VIA 82C686 Audio Codec" | 387 | tristate "VIA 82C686 Audio Codec" |
510 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | 388 | depends on SOUND_PRIME && PCI |
511 | help | 389 | help |
512 | Say Y here to include support for the audio codec found on VIA | 390 | Say Y here to include support for the audio codec found on VIA |
513 | 82Cxxx-based chips. Typically these are built into a motherboard. | 391 | 82Cxxx-based chips. Typically these are built into a motherboard. |
@@ -576,18 +454,6 @@ config SOUND_AD1889 | |||
576 | Say M here if you have a sound card based on the Analog Devices | 454 | Say M here if you have a sound card based on the Analog Devices |
577 | AD1889 chip. | 455 | AD1889 chip. |
578 | 456 | ||
579 | config SOUND_SGALAXY | ||
580 | tristate "Aztech Sound Galaxy (non-PnP) cards" | ||
581 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | ||
582 | help | ||
583 | This module initializes the older non Plug and Play sound galaxy | ||
584 | cards from Aztech. It supports the Waverider Pro 32 - 3D and the | ||
585 | Galaxy Washington 16. | ||
586 | |||
587 | If you compile the driver into the kernel, you have to add | ||
588 | "sgalaxy=<io>,<irq>,<dma>,<dma2>,<sgbase>" to the kernel command | ||
589 | line. | ||
590 | |||
591 | config SOUND_ADLIB | 457 | config SOUND_ADLIB |
592 | tristate "Adlib Cards" | 458 | tristate "Adlib Cards" |
593 | depends on SOUND_OSS | 459 | depends on SOUND_OSS |
@@ -612,56 +478,6 @@ config SOUND_ACI_MIXER | |||
612 | 478 | ||
613 | This driver is also available as a module and will be called aci. | 479 | This driver is also available as a module and will be called aci. |
614 | 480 | ||
615 | config SOUND_CS4232 | ||
616 | tristate "Crystal CS4232 based (PnP) cards" | ||
617 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | ||
618 | help | ||
619 | Say Y here if you have a card based on the Crystal CS4232 chip set, | ||
620 | which uses its own Plug and Play protocol. | ||
621 | |||
622 | If you compile the driver into the kernel, you have to add | ||
623 | "cs4232=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel | ||
624 | command line. | ||
625 | |||
626 | See <file:Documentation/sound/oss/CS4232> for more information on | ||
627 | configuring this card. | ||
628 | |||
629 | config SOUND_SSCAPE | ||
630 | tristate "Ensoniq SoundScape support" | ||
631 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | ||
632 | help | ||
633 | Answer Y if you have a sound card based on the Ensoniq SoundScape | ||
634 | chipset. Such cards are being manufactured at least by Ensoniq, Spea | ||
635 | and Reveal (Reveal makes also other cards). | ||
636 | |||
637 | If you compile the driver into the kernel, you have to add | ||
638 | "sscape=<io>,<irq>,<dma>,<mpuio>,<mpuirq>" to the kernel command | ||
639 | line. | ||
640 | |||
641 | config SOUND_GUS | ||
642 | tristate "Gravis Ultrasound support" | ||
643 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | ||
644 | help | ||
645 | Say Y here for any type of Gravis Ultrasound card, including the GUS | ||
646 | or GUS MAX. See also <file:Documentation/sound/oss/ultrasound> for more | ||
647 | information on configuring this card with modules. | ||
648 | |||
649 | If you compile the driver into the kernel, you have to add | ||
650 | "gus=<io>,<irq>,<dma>,<dma2>" to the kernel command line. | ||
651 | |||
652 | config SOUND_GUS16 | ||
653 | bool "16 bit sampling option of GUS (_NOT_ GUS MAX)" | ||
654 | depends on SOUND_GUS | ||
655 | help | ||
656 | Support for Gravis Ulstrasound (GUS) cards (other than the GUS), | ||
657 | sampling at 16-bit width. | ||
658 | |||
659 | config SOUND_GUSMAX | ||
660 | bool "GUS MAX support" | ||
661 | depends on SOUND_GUS | ||
662 | help | ||
663 | Support for Gravis Ulstrasound MAX. | ||
664 | |||
665 | config SOUND_VMIDI | 481 | config SOUND_VMIDI |
666 | tristate "Loopback MIDI device support" | 482 | tristate "Loopback MIDI device support" |
667 | depends on SOUND_OSS | 483 | depends on SOUND_OSS |
@@ -742,7 +558,7 @@ config SOUND_MPU401 | |||
742 | 558 | ||
743 | config SOUND_NM256 | 559 | config SOUND_NM256 |
744 | tristate "NM256AV/NM256ZX audio support" | 560 | tristate "NM256AV/NM256ZX audio support" |
745 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | 561 | depends on SOUND_OSS |
746 | help | 562 | help |
747 | Say M here to include audio support for the NeoMagic 256AV/256ZX | 563 | Say M here to include audio support for the NeoMagic 256AV/256ZX |
748 | chipsets. These are the audio chipsets found in the Sony | 564 | chipsets. These are the audio chipsets found in the Sony |
@@ -752,35 +568,6 @@ config SOUND_NM256 | |||
752 | 568 | ||
753 | See <file:Documentation/sound/oss/NM256> for further information. | 569 | See <file:Documentation/sound/oss/NM256> for further information. |
754 | 570 | ||
755 | config SOUND_MAD16 | ||
756 | tristate "OPTi MAD16 and/or Mozart based cards" | ||
757 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | ||
758 | ---help--- | ||
759 | Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi | ||
760 | 82C928 or 82C929 or 82C931) audio interface chip. These chips are | ||
761 | quite common so it's possible that many no-name cards have one of | ||
762 | them. In addition the MAD16 chip is used in some cards made by known | ||
763 | manufacturers such as Turtle Beach (Tropez), Reveal (some models) | ||
764 | and Diamond (latest ones). Note however that the Tropez sound cards | ||
765 | have their own driver; if you have one of those, say N here and Y or | ||
766 | M to "Full support for Turtle Beach WaveFront", below. | ||
767 | |||
768 | If you compile the driver into the kernel, you have to add | ||
769 | "mad16=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the | ||
770 | kernel command line. | ||
771 | |||
772 | See also <file:Documentation/sound/oss/Opti> and | ||
773 | <file:Documentation/sound/oss/MAD16> for more information on setting | ||
774 | these cards up as modules. | ||
775 | |||
776 | config MAD16_OLDCARD | ||
777 | bool "Support MIDI in older MAD16 based cards (requires SB)" | ||
778 | depends on SOUND_MAD16 | ||
779 | help | ||
780 | Answer Y (or M) if you have an older card based on the C928 or | ||
781 | Mozart chipset and you want to have MIDI support. If you enable this | ||
782 | option you also need to enable support for Sound Blaster. | ||
783 | |||
784 | config SOUND_PAS | 571 | config SOUND_PAS |
785 | tristate "ProAudioSpectrum 16 support" | 572 | tristate "ProAudioSpectrum 16 support" |
786 | depends on SOUND_OSS | 573 | depends on SOUND_OSS |
@@ -873,53 +660,9 @@ config SOUND_SB | |||
873 | You can say M here to compile this driver as a module; the module is | 660 | You can say M here to compile this driver as a module; the module is |
874 | called sb. | 661 | called sb. |
875 | 662 | ||
876 | config SOUND_AWE32_SYNTH | ||
877 | tristate "AWE32 synth" | ||
878 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | ||
879 | help | ||
880 | Say Y here if you have a Sound Blaster SB32, AWE32-PnP, SB AWE64 or | ||
881 | similar sound card. See <file:Documentation/sound/oss/README.awe>, | ||
882 | <file:Documentation/sound/oss/AWE32> and the Soundblaster-AWE | ||
883 | mini-HOWTO, available from <http://www.tldp.org/docs.html#howto> | ||
884 | for more info. | ||
885 | |||
886 | config SOUND_WAVEFRONT | ||
887 | tristate "Full support for Turtle Beach WaveFront (Tropez Plus, Tropez, Maui) synth/soundcards" | ||
888 | depends on SOUND_OSS && m && OBSOLETE_OSS_DRIVER | ||
889 | help | ||
890 | Answer Y or M if you have a Tropez Plus, Tropez or Maui sound card | ||
891 | and read the files <file:Documentation/sound/oss/Wavefront> and | ||
892 | <file:Documentation/sound/oss/Tropez+>. | ||
893 | |||
894 | config SOUND_MAUI | ||
895 | tristate "Limited support for Turtle Beach Wave Front (Maui, Tropez) synthesizers" | ||
896 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | ||
897 | help | ||
898 | Say Y here if you have a Turtle Beach Wave Front, Maui, or Tropez | ||
899 | sound card. | ||
900 | |||
901 | If you compile the driver into the kernel, you have to add | ||
902 | "maui=<io>,<irq>" to the kernel command line. | ||
903 | |||
904 | config MAUI_HAVE_BOOT | ||
905 | bool "Have OSWF.MOT firmware file" | ||
906 | depends on SOUND_MAUI=y && !STANDALONE | ||
907 | help | ||
908 | Turtle Beach Maui and Tropez sound cards have a microcontroller | ||
909 | which needs to be initialized prior to use. OSWF.MOT is a file | ||
910 | distributed with the card's DOS/Windows drivers. Answer Y if you | ||
911 | have this file. | ||
912 | |||
913 | config MAUI_BOOT_FILE | ||
914 | string "Full pathname of OSWF.MOT firmware file" | ||
915 | depends on MAUI_HAVE_BOOT | ||
916 | default "/etc/sound/oswf.mot" | ||
917 | help | ||
918 | Enter the full pathname of your OSWF.MOT file, starting from /. | ||
919 | |||
920 | config SOUND_YM3812 | 663 | config SOUND_YM3812 |
921 | tristate "Yamaha FM synthesizer (YM3812/OPL-3) support" | 664 | tristate "Yamaha FM synthesizer (YM3812/OPL-3) support" |
922 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | 665 | depends on SOUND_OSS |
923 | ---help--- | 666 | ---help--- |
924 | Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4). | 667 | Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4). |
925 | Answering Y is usually a safe and recommended choice, however some | 668 | Answering Y is usually a safe and recommended choice, however some |
@@ -933,18 +676,6 @@ config SOUND_YM3812 | |||
933 | 676 | ||
934 | If unsure, say Y. | 677 | If unsure, say Y. |
935 | 678 | ||
936 | config SOUND_OPL3SA1 | ||
937 | tristate "Yamaha OPL3-SA1 audio controller" | ||
938 | depends on SOUND_OSS && OBSOLETE_OSS_DRIVER | ||
939 | help | ||
940 | Say Y or M if you have a Yamaha OPL3-SA1 sound chip, which is | ||
941 | usually built into motherboards. Read | ||
942 | <file:Documentation/sound/oss/OPL3-SA> for details. | ||
943 | |||
944 | If you compile the driver into the kernel, you have to add | ||
945 | "opl3sa=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel | ||
946 | command line. | ||
947 | |||
948 | config SOUND_OPL3SA2 | 679 | config SOUND_OPL3SA2 |
949 | tristate "Yamaha OPL3-SA2 and SA3 based PnP cards" | 680 | tristate "Yamaha OPL3-SA2 and SA3 based PnP cards" |
950 | depends on SOUND_OSS | 681 | depends on SOUND_OSS |
@@ -959,19 +690,6 @@ config SOUND_OPL3SA2 | |||
959 | "opl3sa2=<io>,<irq>,<dma>,<dma2>,<mssio>,<mpuio>" to the kernel | 690 | "opl3sa2=<io>,<irq>,<dma>,<dma2>,<mssio>,<mpuio>" to the kernel |
960 | command line. | 691 | command line. |
961 | 692 | ||
962 | config SOUND_YMFPCI | ||
963 | tristate "Yamaha YMF7xx PCI audio (native mode)" | ||
964 | depends on SOUND_OSS && PCI && OBSOLETE_OSS_DRIVER | ||
965 | help | ||
966 | Support for Yamaha cards including the YMF711, YMF715, YMF718, | ||
967 | YMF719, YMF724, Waveforce 192XG, and Waveforce 192 Digital. | ||
968 | |||
969 | config SOUND_YMFPCI_LEGACY | ||
970 | bool "Yamaha PCI legacy ports support" | ||
971 | depends on SOUND_YMFPCI | ||
972 | help | ||
973 | Support for YMF7xx PCI cards emulating an MP401. | ||
974 | |||
975 | config SOUND_UART6850 | 693 | config SOUND_UART6850 |
976 | tristate "6850 UART support" | 694 | tristate "6850 UART support" |
977 | depends on SOUND_OSS | 695 | depends on SOUND_OSS |
@@ -1101,30 +819,6 @@ config SOUND_KAHLUA | |||
1101 | tristate "XpressAudio Sound Blaster emulation" | 819 | tristate "XpressAudio Sound Blaster emulation" |
1102 | depends on SOUND_SB | 820 | depends on SOUND_SB |
1103 | 821 | ||
1104 | config SOUND_ALI5455 | ||
1105 | tristate "ALi5455 audio support" | ||
1106 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
1107 | |||
1108 | config SOUND_FORTE | ||
1109 | tristate "ForteMedia FM801 driver" | ||
1110 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
1111 | help | ||
1112 | Say Y or M if you want driver support for the ForteMedia FM801 PCI | ||
1113 | audio controller (Abit AU10, Genius Sound Maker, HP Workstation | ||
1114 | zx2000, and others). | ||
1115 | |||
1116 | config SOUND_RME96XX | ||
1117 | tristate "RME Hammerfall (RME96XX) support" | ||
1118 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS_DRIVER | ||
1119 | help | ||
1120 | Say Y or M if you have a Hammerfall or Hammerfall light | ||
1121 | multichannel card from RME. If you want to access advanced | ||
1122 | features of the card, read <file:Documentation/sound/oss/rme96xx>. | ||
1123 | |||
1124 | config SOUND_AD1980 | ||
1125 | tristate "AD1980 front/back switch plugin" | ||
1126 | depends on SOUND_PRIME && OBSOLETE_OSS_DRIVER | ||
1127 | |||
1128 | config SOUND_SH_DAC_AUDIO | 822 | config SOUND_SH_DAC_AUDIO |
1129 | tristate "SuperH DAC audio support" | 823 | tristate "SuperH DAC audio support" |
1130 | depends on SOUND_PRIME && CPU_SH3 | 824 | 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 @@ | |||
94 | #include <linux/init.h> | 94 | #include <linux/init.h> |
95 | #include <linux/delay.h> | 95 | #include <linux/delay.h> |
96 | #include <linux/proc_fs.h> | 96 | #include <linux/proc_fs.h> |
97 | #include <linux/dma-mapping.h> | ||
97 | 98 | ||
98 | #include "hwaccess.h" | 99 | #include "hwaccess.h" |
99 | #include "8010.h" | 100 | #include "8010.h" |
@@ -119,7 +120,7 @@ | |||
119 | 120 | ||
120 | 121 | ||
121 | /* the emu10k1 _seems_ to only supports 29 bit (512MiB) bit bus master */ | 122 | /* the emu10k1 _seems_ to only supports 29 bit (512MiB) bit bus master */ |
122 | #define EMU10K1_DMA_MASK 0x1fffffff /* DMA buffer mask for pci_alloc_consist */ | 123 | #define EMU10K1_DMA_MASK DMA_29BIT_MASK /* DMA buffer mask for pci_alloc_consist */ |
123 | 124 | ||
124 | #ifndef PCI_VENDOR_ID_CREATIVE | 125 | #ifndef PCI_VENDOR_ID_CREATIVE |
125 | #define PCI_VENDOR_ID_CREATIVE 0x1102 | 126 | #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[] = { | |||
160 | { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, | 160 | { 0x54584e20, 0xffffffff, "TLC320AD9xC", NULL, NULL }, |
161 | { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF | 161 | { 0x56494161, 0xffffffff, "VIA1612A", NULL, NULL }, // modified ICE1232 with S/PDIF |
162 | { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF | 162 | { 0x56494170, 0xffffffff, "VIA1617A", patch_vt1617a, NULL }, // modified VT1616 with S/PDIF |
163 | { 0x56494182, 0xffffffff, "VIA1618", NULL, NULL }, | ||
163 | { 0x57454301, 0xffffffff, "W83971D", NULL, NULL }, | 164 | { 0x57454301, 0xffffffff, "W83971D", NULL, NULL }, |
164 | { 0x574d4c00, 0xffffffff, "WM9701A", NULL, NULL }, | 165 | { 0x574d4c00, 0xffffffff, "WM9701A", NULL, NULL }, |
165 | { 0x574d4C03, 0xffffffff, "WM9703,WM9707,WM9708,WM9717", patch_wolfson03, NULL}, | 166 | { 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 @@ | |||
35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
36 | #include <linux/moduleparam.h> | 36 | #include <linux/moduleparam.h> |
37 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
38 | #include <linux/dma-mapping.h> | ||
38 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
39 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
40 | 41 | ||
@@ -691,8 +692,8 @@ static int __devinit snd_als300_create(snd_card_t *card, | |||
691 | if ((err = pci_enable_device(pci)) < 0) | 692 | if ((err = pci_enable_device(pci)) < 0) |
692 | return err; | 693 | return err; |
693 | 694 | ||
694 | if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || | 695 | if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 || |
695 | pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { | 696 | pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) { |
696 | printk(KERN_ERR "error setting 28bit DMA mask\n"); | 697 | printk(KERN_ERR "error setting 28bit DMA mask\n"); |
697 | pci_disable_device(pci); | 698 | pci_disable_device(pci); |
698 | return -ENXIO; | 699 | 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 @@ | |||
19 | 19 | ||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | #include <sound/driver.h> | 21 | #include <sound/driver.h> |
22 | #include <linux/init.h> | ||
23 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
24 | #include <asm/io.h> | 23 | #include <asm/io.h> |
25 | #include <sound/core.h> | 24 | #include <sound/core.h> |
@@ -277,14 +276,14 @@ static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en); | |||
277 | #endif | 276 | #endif |
278 | 277 | ||
279 | /* Driver stuff. */ | 278 | /* Driver stuff. */ |
280 | static int __devinit vortex_gameport_register(vortex_t * card); | 279 | static int vortex_gameport_register(vortex_t * card); |
281 | static void vortex_gameport_unregister(vortex_t * card); | 280 | static void vortex_gameport_unregister(vortex_t * card); |
282 | #ifndef CHIP_AU8820 | 281 | #ifndef CHIP_AU8820 |
283 | static int __devinit vortex_eq_init(vortex_t * vortex); | 282 | static int vortex_eq_init(vortex_t * vortex); |
284 | static int __devexit vortex_eq_free(vortex_t * vortex); | 283 | static int vortex_eq_free(vortex_t * vortex); |
285 | #endif | 284 | #endif |
286 | /* ALSA stuff. */ | 285 | /* ALSA stuff. */ |
287 | static int __devinit snd_vortex_new_pcm(vortex_t * vortex, int idx, int nr); | 286 | static int snd_vortex_new_pcm(vortex_t * vortex, int idx, int nr); |
288 | static int __devinit snd_vortex_mixer(vortex_t * vortex); | 287 | static int snd_vortex_mixer(vortex_t * vortex); |
289 | static int __devinit snd_vortex_midi(vortex_t * vortex); | 288 | static int snd_vortex_midi(vortex_t * vortex); |
290 | #endif | 289 | #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) | |||
2658 | 2658 | ||
2659 | /* Initialization */ | 2659 | /* Initialization */ |
2660 | 2660 | ||
2661 | static int vortex_core_init(vortex_t * vortex) | 2661 | static int __devinit vortex_core_init(vortex_t * vortex) |
2662 | { | 2662 | { |
2663 | 2663 | ||
2664 | printk(KERN_INFO "Vortex: init.... "); | 2664 | 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 = { | |||
885 | }; | 885 | }; |
886 | 886 | ||
887 | /* ALSA driver entry points. Init and exit. */ | 887 | /* ALSA driver entry points. Init and exit. */ |
888 | static int vortex_eq_init(vortex_t * vortex) | 888 | static int __devinit vortex_eq_init(vortex_t * vortex) |
889 | { | 889 | { |
890 | struct snd_kcontrol *kcontrol; | 890 | struct snd_kcontrol *kcontrol; |
891 | int err, i; | 891 | 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) | |||
506 | int i; | 506 | int i; |
507 | int err, nr_capt; | 507 | int err, nr_capt; |
508 | 508 | ||
509 | if ((chip == 0) || (idx < 0) || (idx > VORTEX_PCM_LAST)) | 509 | if ((chip == 0) || (idx < 0) || (idx >= VORTEX_PCM_LAST)) |
510 | return -ENODEV; | 510 | return -ENODEV; |
511 | 511 | ||
512 | /* idx indicates which kind of PCM device. ADB, SPDIF, I2S and A3D share the | 512 | /* 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[] = { | |||
843 | .spdif_bug = 1, | 843 | .spdif_bug = 1, |
844 | .ac97_chip = 1} , | 844 | .ac97_chip = 1} , |
845 | /* Tested by shane-alsa@cm.nu 5th Nov 2005 */ | 845 | /* Tested by shane-alsa@cm.nu 5th Nov 2005 */ |
846 | /* The 0x20061102 does have SB0350 written on it | ||
847 | * Just like 0x20021102 | ||
848 | */ | ||
846 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20061102, | 849 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20061102, |
847 | .driver = "Audigy2", .name = "Audigy 2 [2006]", | 850 | .driver = "Audigy2", .name = "Audigy 2 [SB0350b]", |
848 | .id = "Audigy2", | 851 | .id = "Audigy2", |
849 | .emu10k2_chip = 1, | 852 | .emu10k2_chip = 1, |
850 | .ca0102_chip = 1, | 853 | .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[] = { | |||
801 | .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */ | 801 | .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */ |
802 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213, | 802 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213, |
803 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS A6J */ | 803 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS A6J */ |
804 | { .pci_subvendor = 0x1043, .pci_subdevice = 0x11f7, | ||
805 | .config = AD1986A_LAPTOP_EAPD }, /* ASUS U5A */ | ||
806 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x30af, | ||
807 | .config = AD1986A_LAPTOP_EAPD }, /* HP Compaq Presario B2800 */ | ||
804 | {} | 808 | {} |
805 | }; | 809 | }; |
806 | 810 | ||
@@ -1330,6 +1334,8 @@ static struct hda_board_config ad1981_cfg_tbl[] = { | |||
1330 | .config = AD1981_HP }, /* HP nx6320 */ | 1334 | .config = AD1981_HP }, /* HP nx6320 */ |
1331 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x309f, | 1335 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x309f, |
1332 | .config = AD1981_HP }, /* HP nx9420 AngelFire */ | 1336 | .config = AD1981_HP }, /* HP nx9420 AngelFire */ |
1337 | { .pci_subvendor = 0x103c, .pci_subdevice = 0x30a2, | ||
1338 | .config = AD1981_HP }, /* HP nx9420 AngelFire */ | ||
1333 | { .modelname = "basic", .config = AD1981_BASIC }, | 1339 | { .modelname = "basic", .config = AD1981_BASIC }, |
1334 | {} | 1340 | {} |
1335 | }; | 1341 | }; |
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[] = { | |||
310 | .pci_subdevice = 0x0b0b, | 310 | .pci_subdevice = 0x0b0b, |
311 | .config = STAC_D945GTP3 }, /* Intel D945PSN - 3 Stack, 9221 A1 */ | 311 | .config = STAC_D945GTP3 }, /* Intel D945PSN - 3 Stack, 9221 A1 */ |
312 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | 312 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, |
313 | .pci_subdevice = 0x0707, | ||
314 | .config = STAC_D945GTP5 }, /* Intel D945PSV - 5 Stack */ | ||
315 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | ||
313 | .pci_subdevice = 0x0404, | 316 | .pci_subdevice = 0x0404, |
314 | .config = STAC_D945GTP5 }, /* Intel D945GTP - 5 Stack */ | 317 | .config = STAC_D945GTP5 }, /* Intel D945GTP - 5 Stack */ |
315 | { .pci_subvendor = PCI_VENDOR_ID_INTEL, | 318 | { .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) | |||
2333 | { .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */ | 2333 | { .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */ |
2334 | { .subvendor = 0x1019, .subdevice = 0x0a85, .action = VIA_DXS_NO_VRA }, /* ECS L7VMM2 */ | 2334 | { .subvendor = 0x1019, .subdevice = 0x0a85, .action = VIA_DXS_NO_VRA }, /* ECS L7VMM2 */ |
2335 | { .subvendor = 0x1019, .subdevice = 0xa101, .action = VIA_DXS_SRC }, | 2335 | { .subvendor = 0x1019, .subdevice = 0xa101, .action = VIA_DXS_SRC }, |
2336 | { .subvendor = 0x1019, .subdevice = 0xaa01, .action = VIA_DXS_SRC }, /* ECS K8T890-A */ | ||
2336 | { .subvendor = 0x1025, .subdevice = 0x0033, .action = VIA_DXS_NO_VRA }, /* Acer Inspire 1353LM */ | 2337 | { .subvendor = 0x1025, .subdevice = 0x0033, .action = VIA_DXS_NO_VRA }, /* Acer Inspire 1353LM */ |
2337 | { .subvendor = 0x1025, .subdevice = 0x0046, .action = VIA_DXS_SRC }, /* Acer Aspire 1524 WLMi */ | 2338 | { .subvendor = 0x1025, .subdevice = 0x0046, .action = VIA_DXS_SRC }, /* Acer Aspire 1524 WLMi */ |
2338 | { .subvendor = 0x1043, .subdevice = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/ | 2339 | { .subvendor = 0x1043, .subdevice = 0x8095, .action = VIA_DXS_NO_VRA }, /* ASUS A7V8X (FIXME: possibly VIA_DXS_ENABLE?)*/ |