diff options
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/Kconfig | 2 | ||||
-rw-r--r-- | sound/isa/ad1816a/ad1816a.c | 14 | ||||
-rw-r--r-- | sound/isa/ad1816a/ad1816a_lib.c | 11 | ||||
-rw-r--r-- | sound/isa/cmi8330.c | 68 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4236_lib.c | 21 | ||||
-rw-r--r-- | sound/isa/es1688/es1688.c | 23 | ||||
-rw-r--r-- | sound/isa/es1688/es1688_lib.c | 23 | ||||
-rw-r--r-- | sound/isa/gus/gus_dma.c | 27 | ||||
-rw-r--r-- | sound/isa/gus/gus_irq.c | 6 | ||||
-rw-r--r-- | sound/isa/gus/gus_pcm.c | 26 | ||||
-rw-r--r-- | sound/isa/gus/gus_uart.c | 10 | ||||
-rw-r--r-- | sound/isa/gus/interwave.c | 16 | ||||
-rw-r--r-- | sound/isa/opl3sa2.c | 10 | ||||
-rw-r--r-- | sound/isa/opti9xx/opti92x-ad1848.c | 40 | ||||
-rw-r--r-- | sound/isa/sc6000.c | 4 | ||||
-rw-r--r-- | sound/isa/wavefront/wavefront.c | 4 | ||||
-rw-r--r-- | sound/isa/wavefront/wavefront_synth.c | 2 | ||||
-rw-r--r-- | sound/isa/wss/wss_lib.c | 76 |
18 files changed, 259 insertions, 124 deletions
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index ce0aa044e274..5915dc41c0ee 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig | |||
@@ -94,6 +94,8 @@ config SND_CMI8330 | |||
94 | tristate "C-Media CMI8330" | 94 | tristate "C-Media CMI8330" |
95 | select SND_WSS_LIB | 95 | select SND_WSS_LIB |
96 | select SND_SB16_DSP | 96 | select SND_SB16_DSP |
97 | select SND_OPL3_LIB | ||
98 | select SND_MPU401_UART | ||
97 | help | 99 | help |
98 | Say Y here to include support for soundcards based on the | 100 | Say Y here to include support for soundcards based on the |
99 | C-Media CMI8330 chip. | 101 | C-Media CMI8330 chip. |
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c index 9660e598232c..bbcbf92a8ebe 100644 --- a/sound/isa/ad1816a/ad1816a.c +++ b/sound/isa/ad1816a/ad1816a.c | |||
@@ -156,6 +156,7 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard | |||
156 | struct snd_card_ad1816a *acard; | 156 | struct snd_card_ad1816a *acard; |
157 | struct snd_ad1816a *chip; | 157 | struct snd_ad1816a *chip; |
158 | struct snd_opl3 *opl3; | 158 | struct snd_opl3 *opl3; |
159 | struct snd_timer *timer; | ||
159 | 160 | ||
160 | error = snd_card_create(index[dev], id[dev], THIS_MODULE, | 161 | error = snd_card_create(index[dev], id[dev], THIS_MODULE, |
161 | sizeof(struct snd_card_ad1816a), &card); | 162 | sizeof(struct snd_card_ad1816a), &card); |
@@ -195,6 +196,12 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard | |||
195 | return error; | 196 | return error; |
196 | } | 197 | } |
197 | 198 | ||
199 | error = snd_ad1816a_timer(chip, 0, &timer); | ||
200 | if (error < 0) { | ||
201 | snd_card_free(card); | ||
202 | return error; | ||
203 | } | ||
204 | |||
198 | if (mpu_port[dev] > 0) { | 205 | if (mpu_port[dev] > 0) { |
199 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, | 206 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, |
200 | mpu_port[dev], 0, mpu_irq[dev], IRQF_DISABLED, | 207 | mpu_port[dev], 0, mpu_irq[dev], IRQF_DISABLED, |
@@ -208,11 +215,8 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard | |||
208 | OPL3_HW_AUTO, 0, &opl3) < 0) { | 215 | OPL3_HW_AUTO, 0, &opl3) < 0) { |
209 | printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx.\n", fm_port[dev], fm_port[dev] + 2); | 216 | printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx.\n", fm_port[dev], fm_port[dev] + 2); |
210 | } else { | 217 | } else { |
211 | if ((error = snd_opl3_timer_new(opl3, 1, 2)) < 0) { | 218 | error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); |
212 | snd_card_free(card); | 219 | if (error < 0) { |
213 | return error; | ||
214 | } | ||
215 | if ((error = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) { | ||
216 | snd_card_free(card); | 220 | snd_card_free(card); |
217 | return error; | 221 | return error; |
218 | } | 222 | } |
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index 3bfca7c59baf..05aef8b97e96 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c | |||
@@ -37,7 +37,7 @@ static inline int snd_ad1816a_busy_wait(struct snd_ad1816a *chip) | |||
37 | if (inb(AD1816A_REG(AD1816A_CHIP_STATUS)) & AD1816A_READY) | 37 | if (inb(AD1816A_REG(AD1816A_CHIP_STATUS)) & AD1816A_READY) |
38 | return 0; | 38 | return 0; |
39 | 39 | ||
40 | snd_printk("chip busy.\n"); | 40 | snd_printk(KERN_WARNING "chip busy.\n"); |
41 | return -EBUSY; | 41 | return -EBUSY; |
42 | } | 42 | } |
43 | 43 | ||
@@ -196,7 +196,7 @@ static int snd_ad1816a_trigger(struct snd_ad1816a *chip, unsigned char what, | |||
196 | spin_unlock(&chip->lock); | 196 | spin_unlock(&chip->lock); |
197 | break; | 197 | break; |
198 | default: | 198 | default: |
199 | snd_printk("invalid trigger mode 0x%x.\n", what); | 199 | snd_printk(KERN_WARNING "invalid trigger mode 0x%x.\n", what); |
200 | error = -EINVAL; | 200 | error = -EINVAL; |
201 | } | 201 | } |
202 | 202 | ||
@@ -377,7 +377,6 @@ static struct snd_pcm_hardware snd_ad1816a_capture = { | |||
377 | .fifo_size = 0, | 377 | .fifo_size = 0, |
378 | }; | 378 | }; |
379 | 379 | ||
380 | #if 0 /* not used now */ | ||
381 | static int snd_ad1816a_timer_close(struct snd_timer *timer) | 380 | static int snd_ad1816a_timer_close(struct snd_timer *timer) |
382 | { | 381 | { |
383 | struct snd_ad1816a *chip = snd_timer_chip(timer); | 382 | struct snd_ad1816a *chip = snd_timer_chip(timer); |
@@ -442,8 +441,6 @@ static struct snd_timer_hardware snd_ad1816a_timer_table = { | |||
442 | .start = snd_ad1816a_timer_start, | 441 | .start = snd_ad1816a_timer_start, |
443 | .stop = snd_ad1816a_timer_stop, | 442 | .stop = snd_ad1816a_timer_stop, |
444 | }; | 443 | }; |
445 | #endif /* not used now */ | ||
446 | |||
447 | 444 | ||
448 | static int snd_ad1816a_playback_open(struct snd_pcm_substream *substream) | 445 | static int snd_ad1816a_playback_open(struct snd_pcm_substream *substream) |
449 | { | 446 | { |
@@ -568,7 +565,7 @@ static const char __devinit *snd_ad1816a_chip_id(struct snd_ad1816a *chip) | |||
568 | case AD1816A_HW_AD1815: return "AD1815"; | 565 | case AD1816A_HW_AD1815: return "AD1815"; |
569 | case AD1816A_HW_AD18MAX10: return "AD18max10"; | 566 | case AD1816A_HW_AD18MAX10: return "AD18max10"; |
570 | default: | 567 | default: |
571 | snd_printk("Unknown chip version %d:%d.\n", | 568 | snd_printk(KERN_WARNING "Unknown chip version %d:%d.\n", |
572 | chip->version, chip->hardware); | 569 | chip->version, chip->hardware); |
573 | return "AD1816A - unknown"; | 570 | return "AD1816A - unknown"; |
574 | } | 571 | } |
@@ -687,7 +684,6 @@ int __devinit snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_p | |||
687 | return 0; | 684 | return 0; |
688 | } | 685 | } |
689 | 686 | ||
690 | #if 0 /* not used now */ | ||
691 | int __devinit snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **rtimer) | 687 | int __devinit snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **rtimer) |
692 | { | 688 | { |
693 | struct snd_timer *timer; | 689 | struct snd_timer *timer; |
@@ -709,7 +705,6 @@ int __devinit snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd | |||
709 | *rtimer = timer; | 705 | *rtimer = timer; |
710 | return 0; | 706 | return 0; |
711 | } | 707 | } |
712 | #endif /* not used now */ | ||
713 | 708 | ||
714 | /* | 709 | /* |
715 | * | 710 | * |
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index 24e60902f8ca..de83608719ea 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -31,11 +31,11 @@ | |||
31 | * To quickly load the module, | 31 | * To quickly load the module, |
32 | * | 32 | * |
33 | * modprobe -a snd-cmi8330 sbport=0x220 sbirq=5 sbdma8=1 | 33 | * modprobe -a snd-cmi8330 sbport=0x220 sbirq=5 sbdma8=1 |
34 | * sbdma16=5 wssport=0x530 wssirq=11 wssdma=0 | 34 | * sbdma16=5 wssport=0x530 wssirq=11 wssdma=0 fmport=0x388 |
35 | * | 35 | * |
36 | * This card has two mixers and two PCM devices. I've cheesed it such | 36 | * This card has two mixers and two PCM devices. I've cheesed it such |
37 | * that recording and playback can be done through the same device. | 37 | * that recording and playback can be done through the same device. |
38 | * The driver "magically" routes the capturing to the AD1848 codec, | 38 | * The driver "magically" routes the capturing to the CMI8330 codec, |
39 | * and playback to the SB16 codec. This allows for full-duplex mode | 39 | * and playback to the SB16 codec. This allows for full-duplex mode |
40 | * to some extent. | 40 | * to some extent. |
41 | * The utilities in alsa-utils are aware of both devices, so passing | 41 | * The utilities in alsa-utils are aware of both devices, so passing |
@@ -51,6 +51,8 @@ | |||
51 | #include <linux/moduleparam.h> | 51 | #include <linux/moduleparam.h> |
52 | #include <sound/core.h> | 52 | #include <sound/core.h> |
53 | #include <sound/wss.h> | 53 | #include <sound/wss.h> |
54 | #include <sound/opl3.h> | ||
55 | #include <sound/mpu401.h> | ||
54 | #include <sound/sb.h> | 56 | #include <sound/sb.h> |
55 | #include <sound/initval.h> | 57 | #include <sound/initval.h> |
56 | 58 | ||
@@ -79,6 +81,9 @@ static int sbdma16[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; | |||
79 | static long wssport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; | 81 | static long wssport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; |
80 | static int wssirq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; | 82 | static int wssirq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; |
81 | static int wssdma[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; | 83 | static int wssdma[SNDRV_CARDS] = SNDRV_DEFAULT_DMA; |
84 | static long fmport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; | ||
85 | static long mpuport[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; | ||
86 | static int mpuirq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; | ||
82 | 87 | ||
83 | module_param_array(index, int, NULL, 0444); | 88 | module_param_array(index, int, NULL, 0444); |
84 | MODULE_PARM_DESC(index, "Index value for CMI8330 soundcard."); | 89 | MODULE_PARM_DESC(index, "Index value for CMI8330 soundcard."); |
@@ -107,6 +112,12 @@ MODULE_PARM_DESC(wssirq, "IRQ # for CMI8330 WSS driver."); | |||
107 | module_param_array(wssdma, int, NULL, 0444); | 112 | module_param_array(wssdma, int, NULL, 0444); |
108 | MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); | 113 | MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); |
109 | 114 | ||
115 | module_param_array(fmport, long, NULL, 0444); | ||
116 | MODULE_PARM_DESC(fmport, "FM port # for CMI8330 driver."); | ||
117 | module_param_array(mpuport, long, NULL, 0444); | ||
118 | MODULE_PARM_DESC(mpuport, "MPU-401 port # for CMI8330 driver."); | ||
119 | module_param_array(mpuirq, int, NULL, 0444); | ||
120 | MODULE_PARM_DESC(mpuirq, "IRQ # for CMI8330 MPU-401 port."); | ||
110 | #ifdef CONFIG_PNP | 121 | #ifdef CONFIG_PNP |
111 | static int isa_registered; | 122 | static int isa_registered; |
112 | static int pnp_registered; | 123 | static int pnp_registered; |
@@ -149,6 +160,7 @@ struct snd_cmi8330 { | |||
149 | #ifdef CONFIG_PNP | 160 | #ifdef CONFIG_PNP |
150 | struct pnp_dev *cap; | 161 | struct pnp_dev *cap; |
151 | struct pnp_dev *play; | 162 | struct pnp_dev *play; |
163 | struct pnp_dev *mpu; | ||
152 | #endif | 164 | #endif |
153 | struct snd_card *card; | 165 | struct snd_card *card; |
154 | struct snd_wss *wss; | 166 | struct snd_wss *wss; |
@@ -165,7 +177,7 @@ struct snd_cmi8330 { | |||
165 | #ifdef CONFIG_PNP | 177 | #ifdef CONFIG_PNP |
166 | 178 | ||
167 | static struct pnp_card_device_id snd_cmi8330_pnpids[] = { | 179 | static struct pnp_card_device_id snd_cmi8330_pnpids[] = { |
168 | { .id = "CMI0001", .devs = { { "@@@0001" }, { "@X@0001" } } }, | 180 | { .id = "CMI0001", .devs = { { "@@@0001" }, { "@X@0001" }, { "@H@0001" } } }, |
169 | { .id = "" } | 181 | { .id = "" } |
170 | }; | 182 | }; |
171 | 183 | ||
@@ -219,8 +231,10 @@ WSS_SINGLE("3D Control - Switch", 0, | |||
219 | CMI8330_RMUX3D, 5, 1, 1), | 231 | CMI8330_RMUX3D, 5, 1, 1), |
220 | WSS_SINGLE("PC Speaker Playback Volume", 0, | 232 | WSS_SINGLE("PC Speaker Playback Volume", 0, |
221 | CMI8330_OUTPUTVOL, 3, 3, 0), | 233 | CMI8330_OUTPUTVOL, 3, 3, 0), |
222 | WSS_SINGLE("FM Playback Switch", 0, | 234 | WSS_DOUBLE("FM Playback Switch", 0, |
223 | CMI8330_RECMUX, 3, 1, 1), | 235 | CS4231_AUX2_LEFT_INPUT, CS4231_AUX2_RIGHT_INPUT, 7, 7, 1, 1), |
236 | WSS_DOUBLE("FM Playback Volume", 0, | ||
237 | CS4231_AUX2_LEFT_INPUT, CS4231_AUX2_RIGHT_INPUT, 0, 0, 31, 1), | ||
224 | WSS_SINGLE(SNDRV_CTL_NAME_IEC958("Input ", CAPTURE, SWITCH), 0, | 238 | WSS_SINGLE(SNDRV_CTL_NAME_IEC958("Input ", CAPTURE, SWITCH), 0, |
225 | CMI8330_RMUX3D, 7, 1, 1), | 239 | CMI8330_RMUX3D, 7, 1, 1), |
226 | WSS_SINGLE(SNDRV_CTL_NAME_IEC958("Input ", PLAYBACK, SWITCH), 0, | 240 | WSS_SINGLE(SNDRV_CTL_NAME_IEC958("Input ", PLAYBACK, SWITCH), 0, |
@@ -323,16 +337,21 @@ static int __devinit snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard, | |||
323 | if (acard->play == NULL) | 337 | if (acard->play == NULL) |
324 | return -EBUSY; | 338 | return -EBUSY; |
325 | 339 | ||
340 | acard->mpu = pnp_request_card_device(card, id->devs[2].id, NULL); | ||
341 | if (acard->play == NULL) | ||
342 | return -EBUSY; | ||
343 | |||
326 | pdev = acard->cap; | 344 | pdev = acard->cap; |
327 | 345 | ||
328 | err = pnp_activate_dev(pdev); | 346 | err = pnp_activate_dev(pdev); |
329 | if (err < 0) { | 347 | if (err < 0) { |
330 | snd_printk(KERN_ERR "CMI8330/C3D (AD1848) PnP configure failure\n"); | 348 | snd_printk(KERN_ERR "CMI8330/C3D PnP configure failure\n"); |
331 | return -EBUSY; | 349 | return -EBUSY; |
332 | } | 350 | } |
333 | wssport[dev] = pnp_port_start(pdev, 0); | 351 | wssport[dev] = pnp_port_start(pdev, 0); |
334 | wssdma[dev] = pnp_dma(pdev, 0); | 352 | wssdma[dev] = pnp_dma(pdev, 0); |
335 | wssirq[dev] = pnp_irq(pdev, 0); | 353 | wssirq[dev] = pnp_irq(pdev, 0); |
354 | fmport[dev] = pnp_port_start(pdev, 1); | ||
336 | 355 | ||
337 | /* allocate SB16 resources */ | 356 | /* allocate SB16 resources */ |
338 | pdev = acard->play; | 357 | pdev = acard->play; |
@@ -347,6 +366,17 @@ static int __devinit snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard, | |||
347 | sbdma16[dev] = pnp_dma(pdev, 1); | 366 | sbdma16[dev] = pnp_dma(pdev, 1); |
348 | sbirq[dev] = pnp_irq(pdev, 0); | 367 | sbirq[dev] = pnp_irq(pdev, 0); |
349 | 368 | ||
369 | /* allocate MPU-401 resources */ | ||
370 | pdev = acard->mpu; | ||
371 | |||
372 | err = pnp_activate_dev(pdev); | ||
373 | if (err < 0) { | ||
374 | snd_printk(KERN_ERR | ||
375 | "CMI8330/C3D (MPU-401) PnP configure failure\n"); | ||
376 | return -EBUSY; | ||
377 | } | ||
378 | mpuport[dev] = pnp_port_start(pdev, 0); | ||
379 | mpuirq[dev] = pnp_irq(pdev, 0); | ||
350 | return 0; | 380 | return 0; |
351 | } | 381 | } |
352 | #endif | 382 | #endif |
@@ -489,6 +519,7 @@ static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev) | |||
489 | { | 519 | { |
490 | struct snd_cmi8330 *acard; | 520 | struct snd_cmi8330 *acard; |
491 | int i, err; | 521 | int i, err; |
522 | struct snd_opl3 *opl3; | ||
492 | 523 | ||
493 | acard = card->private_data; | 524 | acard = card->private_data; |
494 | err = snd_wss_create(card, wssport[dev] + 4, -1, | 525 | err = snd_wss_create(card, wssport[dev] + 4, -1, |
@@ -496,11 +527,11 @@ static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev) | |||
496 | wssdma[dev], -1, | 527 | wssdma[dev], -1, |
497 | WSS_HW_DETECT, 0, &acard->wss); | 528 | WSS_HW_DETECT, 0, &acard->wss); |
498 | if (err < 0) { | 529 | if (err < 0) { |
499 | snd_printk(KERN_ERR PFX "(AD1848) device busy??\n"); | 530 | snd_printk(KERN_ERR PFX "(CMI8330) device busy??\n"); |
500 | return err; | 531 | return err; |
501 | } | 532 | } |
502 | if (acard->wss->hardware != WSS_HW_CMI8330) { | 533 | if (acard->wss->hardware != WSS_HW_CMI8330) { |
503 | snd_printk(KERN_ERR PFX "(AD1848) not found during probe\n"); | 534 | snd_printk(KERN_ERR PFX "(CMI8330) not found during probe\n"); |
504 | return -ENODEV; | 535 | return -ENODEV; |
505 | } | 536 | } |
506 | 537 | ||
@@ -532,6 +563,27 @@ static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev) | |||
532 | snd_printk(KERN_ERR PFX "failed to create pcms\n"); | 563 | snd_printk(KERN_ERR PFX "failed to create pcms\n"); |
533 | return err; | 564 | return err; |
534 | } | 565 | } |
566 | if (fmport[dev] != SNDRV_AUTO_PORT) { | ||
567 | if (snd_opl3_create(card, | ||
568 | fmport[dev], fmport[dev] + 2, | ||
569 | OPL3_HW_AUTO, 0, &opl3) < 0) { | ||
570 | snd_printk(KERN_ERR PFX | ||
571 | "no OPL device at 0x%lx-0x%lx ?\n", | ||
572 | fmport[dev], fmport[dev] + 2); | ||
573 | } else { | ||
574 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | ||
575 | if (err < 0) | ||
576 | return err; | ||
577 | } | ||
578 | } | ||
579 | |||
580 | if (mpuport[dev] != SNDRV_AUTO_PORT) { | ||
581 | if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, | ||
582 | mpuport[dev], 0, mpuirq[dev], | ||
583 | IRQF_DISABLED, NULL) < 0) | ||
584 | printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n", | ||
585 | mpuport[dev]); | ||
586 | } | ||
535 | 587 | ||
536 | strcpy(card->driver, "CMI8330/C3D"); | 588 | strcpy(card->driver, "CMI8330/C3D"); |
537 | strcpy(card->shortname, "C-Media CMI8330/C3D"); | 589 | strcpy(card->shortname, "C-Media CMI8330/C3D"); |
diff --git a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c index 6a85fdc53b60..2406efdfd8dd 100644 --- a/sound/isa/cs423x/cs4236_lib.c +++ b/sound/isa/cs423x/cs4236_lib.c | |||
@@ -286,7 +286,8 @@ int snd_cs4236_create(struct snd_card *card, | |||
286 | if (hardware == WSS_HW_DETECT) | 286 | if (hardware == WSS_HW_DETECT) |
287 | hardware = WSS_HW_DETECT3; | 287 | hardware = WSS_HW_DETECT3; |
288 | if (cport < 0x100) { | 288 | if (cport < 0x100) { |
289 | snd_printk("please, specify control port for CS4236+ chips\n"); | 289 | snd_printk(KERN_ERR "please, specify control port " |
290 | "for CS4236+ chips\n"); | ||
290 | return -ENODEV; | 291 | return -ENODEV; |
291 | } | 292 | } |
292 | err = snd_wss_create(card, port, cport, | 293 | err = snd_wss_create(card, port, cport, |
@@ -295,7 +296,8 @@ int snd_cs4236_create(struct snd_card *card, | |||
295 | return err; | 296 | return err; |
296 | 297 | ||
297 | if (!(chip->hardware & WSS_HW_CS4236B_MASK)) { | 298 | if (!(chip->hardware & WSS_HW_CS4236B_MASK)) { |
298 | snd_printk("CS4236+: MODE3 and extended registers not available, hardware=0x%x\n",chip->hardware); | 299 | snd_printk(KERN_ERR "CS4236+: MODE3 and extended registers " |
300 | "not available, hardware=0x%x\n", chip->hardware); | ||
299 | snd_device_free(card, chip); | 301 | snd_device_free(card, chip); |
300 | return -ENODEV; | 302 | return -ENODEV; |
301 | } | 303 | } |
@@ -303,16 +305,19 @@ int snd_cs4236_create(struct snd_card *card, | |||
303 | { | 305 | { |
304 | int idx; | 306 | int idx; |
305 | for (idx = 0; idx < 8; idx++) | 307 | for (idx = 0; idx < 8; idx++) |
306 | snd_printk("CD%i = 0x%x\n", idx, inb(chip->cport + idx)); | 308 | snd_printk(KERN_DEBUG "CD%i = 0x%x\n", |
309 | idx, inb(chip->cport + idx)); | ||
307 | for (idx = 0; idx < 9; idx++) | 310 | for (idx = 0; idx < 9; idx++) |
308 | snd_printk("C%i = 0x%x\n", idx, snd_cs4236_ctrl_in(chip, idx)); | 311 | snd_printk(KERN_DEBUG "C%i = 0x%x\n", |
312 | idx, snd_cs4236_ctrl_in(chip, idx)); | ||
309 | } | 313 | } |
310 | #endif | 314 | #endif |
311 | ver1 = snd_cs4236_ctrl_in(chip, 1); | 315 | ver1 = snd_cs4236_ctrl_in(chip, 1); |
312 | ver2 = snd_cs4236_ext_in(chip, CS4236_VERSION); | 316 | ver2 = snd_cs4236_ext_in(chip, CS4236_VERSION); |
313 | snd_printdd("CS4236: [0x%lx] C1 (version) = 0x%x, ext = 0x%x\n", cport, ver1, ver2); | 317 | snd_printdd("CS4236: [0x%lx] C1 (version) = 0x%x, ext = 0x%x\n", cport, ver1, ver2); |
314 | if (ver1 != ver2) { | 318 | if (ver1 != ver2) { |
315 | snd_printk("CS4236+ chip detected, but control port 0x%lx is not valid\n", cport); | 319 | snd_printk(KERN_ERR "CS4236+ chip detected, but " |
320 | "control port 0x%lx is not valid\n", cport); | ||
316 | snd_device_free(card, chip); | 321 | snd_device_free(card, chip); |
317 | return -ENODEV; | 322 | return -ENODEV; |
318 | } | 323 | } |
@@ -883,7 +888,8 @@ static int snd_cs4236_get_iec958_switch(struct snd_kcontrol *kcontrol, struct sn | |||
883 | spin_lock_irqsave(&chip->reg_lock, flags); | 888 | spin_lock_irqsave(&chip->reg_lock, flags); |
884 | ucontrol->value.integer.value[0] = chip->image[CS4231_ALT_FEATURE_1] & 0x02 ? 1 : 0; | 889 | ucontrol->value.integer.value[0] = chip->image[CS4231_ALT_FEATURE_1] & 0x02 ? 1 : 0; |
885 | #if 0 | 890 | #if 0 |
886 | printk("get valid: ALT = 0x%x, C3 = 0x%x, C4 = 0x%x, C5 = 0x%x, C6 = 0x%x, C8 = 0x%x\n", | 891 | printk(KERN_DEBUG "get valid: ALT = 0x%x, C3 = 0x%x, C4 = 0x%x, " |
892 | "C5 = 0x%x, C6 = 0x%x, C8 = 0x%x\n", | ||
887 | snd_wss_in(chip, CS4231_ALT_FEATURE_1), | 893 | snd_wss_in(chip, CS4231_ALT_FEATURE_1), |
888 | snd_cs4236_ctrl_in(chip, 3), | 894 | snd_cs4236_ctrl_in(chip, 3), |
889 | snd_cs4236_ctrl_in(chip, 4), | 895 | snd_cs4236_ctrl_in(chip, 4), |
@@ -920,7 +926,8 @@ static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct sn | |||
920 | mutex_unlock(&chip->mce_mutex); | 926 | mutex_unlock(&chip->mce_mutex); |
921 | 927 | ||
922 | #if 0 | 928 | #if 0 |
923 | printk("set valid: ALT = 0x%x, C3 = 0x%x, C4 = 0x%x, C5 = 0x%x, C6 = 0x%x, C8 = 0x%x\n", | 929 | printk(KERN_DEBUG "set valid: ALT = 0x%x, C3 = 0x%x, C4 = 0x%x, " |
930 | "C5 = 0x%x, C6 = 0x%x, C8 = 0x%x\n", | ||
924 | snd_wss_in(chip, CS4231_ALT_FEATURE_1), | 931 | snd_wss_in(chip, CS4231_ALT_FEATURE_1), |
925 | snd_cs4236_ctrl_in(chip, 3), | 932 | snd_cs4236_ctrl_in(chip, 3), |
926 | snd_cs4236_ctrl_in(chip, 4), | 933 | snd_cs4236_ctrl_in(chip, 4), |
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index d746750410ea..442b081cafb7 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c | |||
@@ -49,6 +49,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | |||
49 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 49 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ |
50 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */ | 50 | static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE; /* Enable this card */ |
51 | static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x220,0x240,0x260 */ | 51 | static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* 0x220,0x240,0x260 */ |
52 | static long fm_port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; /* Usually 0x388 */ | ||
52 | static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1}; | 53 | static long mpu_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -1}; |
53 | static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */ | 54 | static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */ |
54 | static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */ | 55 | static int mpu_irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ; /* 5,7,9,10 */ |
@@ -65,6 +66,8 @@ MODULE_PARM_DESC(port, "Port # for " CRD_NAME " driver."); | |||
65 | module_param_array(mpu_port, long, NULL, 0444); | 66 | module_param_array(mpu_port, long, NULL, 0444); |
66 | MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " CRD_NAME " driver."); | 67 | MODULE_PARM_DESC(mpu_port, "MPU-401 port # for " CRD_NAME " driver."); |
67 | module_param_array(irq, int, NULL, 0444); | 68 | module_param_array(irq, int, NULL, 0444); |
69 | module_param_array(fm_port, long, NULL, 0444); | ||
70 | MODULE_PARM_DESC(fm_port, "FM port # for ES1688 driver."); | ||
68 | MODULE_PARM_DESC(irq, "IRQ # for " CRD_NAME " driver."); | 71 | MODULE_PARM_DESC(irq, "IRQ # for " CRD_NAME " driver."); |
69 | module_param_array(mpu_irq, int, NULL, 0444); | 72 | module_param_array(mpu_irq, int, NULL, 0444); |
70 | MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " CRD_NAME " driver."); | 73 | MODULE_PARM_DESC(mpu_irq, "MPU-401 IRQ # for " CRD_NAME " driver."); |
@@ -143,13 +146,19 @@ static int __devinit snd_es1688_probe(struct device *dev, unsigned int n) | |||
143 | sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, | 146 | sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", pcm->name, |
144 | chip->port, chip->irq, chip->dma8); | 147 | chip->port, chip->irq, chip->dma8); |
145 | 148 | ||
146 | if (snd_opl3_create(card, chip->port, chip->port + 2, | 149 | if (fm_port[n] == SNDRV_AUTO_PORT) |
147 | OPL3_HW_OPL3, 0, &opl3) < 0) | 150 | fm_port[n] = port[n]; /* share the same port */ |
148 | dev_warn(dev, "opl3 not detected at 0x%lx\n", chip->port); | 151 | |
149 | else { | 152 | if (fm_port[n] > 0) { |
150 | error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | 153 | if (snd_opl3_create(card, fm_port[n], fm_port[n] + 2, |
151 | if (error < 0) | 154 | OPL3_HW_OPL3, 0, &opl3) < 0) |
152 | goto out; | 155 | dev_warn(dev, |
156 | "opl3 not detected at 0x%lx\n", fm_port[n]); | ||
157 | else { | ||
158 | error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | ||
159 | if (error < 0) | ||
160 | goto out; | ||
161 | } | ||
153 | } | 162 | } |
154 | 163 | ||
155 | if (mpu_irq[n] >= 0 && mpu_irq[n] != SNDRV_AUTO_IRQ && | 164 | if (mpu_irq[n] >= 0 && mpu_irq[n] != SNDRV_AUTO_IRQ && |
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 4fbb508a817f..4c6e14f87f2d 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c | |||
@@ -45,7 +45,7 @@ static int snd_es1688_dsp_command(struct snd_es1688 *chip, unsigned char val) | |||
45 | return 1; | 45 | return 1; |
46 | } | 46 | } |
47 | #ifdef CONFIG_SND_DEBUG | 47 | #ifdef CONFIG_SND_DEBUG |
48 | printk("snd_es1688_dsp_command: timeout (0x%x)\n", val); | 48 | printk(KERN_DEBUG "snd_es1688_dsp_command: timeout (0x%x)\n", val); |
49 | #endif | 49 | #endif |
50 | return 0; | 50 | return 0; |
51 | } | 51 | } |
@@ -167,13 +167,16 @@ static int snd_es1688_probe(struct snd_es1688 *chip) | |||
167 | hw = ES1688_HW_AUTO; | 167 | hw = ES1688_HW_AUTO; |
168 | switch (chip->version & 0xfff0) { | 168 | switch (chip->version & 0xfff0) { |
169 | case 0x4880: | 169 | case 0x4880: |
170 | snd_printk("[0x%lx] ESS: AudioDrive ES488 detected, but driver is in another place\n", chip->port); | 170 | snd_printk(KERN_ERR "[0x%lx] ESS: AudioDrive ES488 detected, " |
171 | "but driver is in another place\n", chip->port); | ||
171 | return -ENODEV; | 172 | return -ENODEV; |
172 | case 0x6880: | 173 | case 0x6880: |
173 | hw = (chip->version & 0x0f) >= 8 ? ES1688_HW_1688 : ES1688_HW_688; | 174 | hw = (chip->version & 0x0f) >= 8 ? ES1688_HW_1688 : ES1688_HW_688; |
174 | break; | 175 | break; |
175 | default: | 176 | default: |
176 | snd_printk("[0x%lx] ESS: unknown AudioDrive chip with version 0x%x (Jazz16 soundcard?)\n", chip->port, chip->version); | 177 | snd_printk(KERN_ERR "[0x%lx] ESS: unknown AudioDrive chip " |
178 | "with version 0x%x (Jazz16 soundcard?)\n", | ||
179 | chip->port, chip->version); | ||
177 | return -ENODEV; | 180 | return -ENODEV; |
178 | } | 181 | } |
179 | 182 | ||
@@ -223,7 +226,7 @@ static int snd_es1688_init(struct snd_es1688 * chip, int enable) | |||
223 | } | 226 | } |
224 | } | 227 | } |
225 | #if 0 | 228 | #if 0 |
226 | snd_printk("mpu cfg = 0x%x\n", cfg); | 229 | snd_printk(KERN_DEBUG "mpu cfg = 0x%x\n", cfg); |
227 | #endif | 230 | #endif |
228 | spin_lock_irqsave(&chip->reg_lock, flags); | 231 | spin_lock_irqsave(&chip->reg_lock, flags); |
229 | snd_es1688_mixer_write(chip, 0x40, cfg); | 232 | snd_es1688_mixer_write(chip, 0x40, cfg); |
@@ -237,7 +240,9 @@ static int snd_es1688_init(struct snd_es1688 * chip, int enable) | |||
237 | cfg = 0xf0; /* enable only DMA counter interrupt */ | 240 | cfg = 0xf0; /* enable only DMA counter interrupt */ |
238 | irq_bits = irqs[chip->irq & 0x0f]; | 241 | irq_bits = irqs[chip->irq & 0x0f]; |
239 | if (irq_bits < 0) { | 242 | if (irq_bits < 0) { |
240 | snd_printk("[0x%lx] ESS: bad IRQ %d for ES1688 chip!!\n", chip->port, chip->irq); | 243 | snd_printk(KERN_ERR "[0x%lx] ESS: bad IRQ %d " |
244 | "for ES1688 chip!!\n", | ||
245 | chip->port, chip->irq); | ||
241 | #if 0 | 246 | #if 0 |
242 | irq_bits = 0; | 247 | irq_bits = 0; |
243 | cfg = 0x10; | 248 | cfg = 0x10; |
@@ -250,7 +255,8 @@ static int snd_es1688_init(struct snd_es1688 * chip, int enable) | |||
250 | cfg = 0xf0; /* extended mode DMA enable */ | 255 | cfg = 0xf0; /* extended mode DMA enable */ |
251 | dma = chip->dma8; | 256 | dma = chip->dma8; |
252 | if (dma > 3 || dma == 2) { | 257 | if (dma > 3 || dma == 2) { |
253 | snd_printk("[0x%lx] ESS: bad DMA channel %d for ES1688 chip!!\n", chip->port, dma); | 258 | snd_printk(KERN_ERR "[0x%lx] ESS: bad DMA channel %d " |
259 | "for ES1688 chip!!\n", chip->port, dma); | ||
254 | #if 0 | 260 | #if 0 |
255 | dma_bits = 0; | 261 | dma_bits = 0; |
256 | cfg = 0x00; /* disable all DMA */ | 262 | cfg = 0x00; /* disable all DMA */ |
@@ -341,8 +347,9 @@ static int snd_es1688_trigger(struct snd_es1688 *chip, int cmd, unsigned char va | |||
341 | return -EINVAL; /* something is wrong */ | 347 | return -EINVAL; /* something is wrong */ |
342 | } | 348 | } |
343 | #if 0 | 349 | #if 0 |
344 | printk("trigger: val = 0x%x, value = 0x%x\n", val, value); | 350 | printk(KERN_DEBUG "trigger: val = 0x%x, value = 0x%x\n", val, value); |
345 | printk("trigger: pointer = 0x%x\n", snd_dma_pointer(chip->dma8, chip->dma_size)); | 351 | printk(KERN_DEBUG "trigger: pointer = 0x%x\n", |
352 | snd_dma_pointer(chip->dma8, chip->dma_size)); | ||
346 | #endif | 353 | #endif |
347 | snd_es1688_write(chip, 0xb8, (val & 0xf0) | value); | 354 | snd_es1688_write(chip, 0xb8, (val & 0xf0) | value); |
348 | spin_unlock(&chip->reg_lock); | 355 | spin_unlock(&chip->reg_lock); |
diff --git a/sound/isa/gus/gus_dma.c b/sound/isa/gus/gus_dma.c index f45f6116c77a..36c27c832360 100644 --- a/sound/isa/gus/gus_dma.c +++ b/sound/isa/gus/gus_dma.c | |||
@@ -45,7 +45,8 @@ static void snd_gf1_dma_program(struct snd_gus_card * gus, | |||
45 | unsigned char dma_cmd; | 45 | unsigned char dma_cmd; |
46 | unsigned int address_high; | 46 | unsigned int address_high; |
47 | 47 | ||
48 | // snd_printk("dma_transfer: addr=0x%x, buf=0x%lx, count=0x%x\n", addr, (long) buf, count); | 48 | snd_printdd("dma_transfer: addr=0x%x, buf=0x%lx, count=0x%x\n", |
49 | addr, buf_addr, count); | ||
49 | 50 | ||
50 | if (gus->gf1.dma1 > 3) { | 51 | if (gus->gf1.dma1 > 3) { |
51 | if (gus->gf1.enh_mode) { | 52 | if (gus->gf1.enh_mode) { |
@@ -77,7 +78,8 @@ static void snd_gf1_dma_program(struct snd_gus_card * gus, | |||
77 | snd_gf1_dma_ack(gus); | 78 | snd_gf1_dma_ack(gus); |
78 | snd_dma_program(gus->gf1.dma1, buf_addr, count, dma_cmd & SNDRV_GF1_DMA_READ ? DMA_MODE_READ : DMA_MODE_WRITE); | 79 | snd_dma_program(gus->gf1.dma1, buf_addr, count, dma_cmd & SNDRV_GF1_DMA_READ ? DMA_MODE_READ : DMA_MODE_WRITE); |
79 | #if 0 | 80 | #if 0 |
80 | snd_printk("address = 0x%x, count = 0x%x, dma_cmd = 0x%x\n", address << 1, count, dma_cmd); | 81 | snd_printk(KERN_DEBUG "address = 0x%x, count = 0x%x, dma_cmd = 0x%x\n", |
82 | address << 1, count, dma_cmd); | ||
81 | #endif | 83 | #endif |
82 | spin_lock_irqsave(&gus->reg_lock, flags); | 84 | spin_lock_irqsave(&gus->reg_lock, flags); |
83 | if (gus->gf1.enh_mode) { | 85 | if (gus->gf1.enh_mode) { |
@@ -142,7 +144,9 @@ static void snd_gf1_dma_interrupt(struct snd_gus_card * gus) | |||
142 | snd_gf1_dma_program(gus, block->addr, block->buf_addr, block->count, (unsigned short) block->cmd); | 144 | snd_gf1_dma_program(gus, block->addr, block->buf_addr, block->count, (unsigned short) block->cmd); |
143 | kfree(block); | 145 | kfree(block); |
144 | #if 0 | 146 | #if 0 |
145 | printk("program dma (IRQ) - addr = 0x%x, buffer = 0x%lx, count = 0x%x, cmd = 0x%x\n", addr, (long) buffer, count, cmd); | 147 | snd_printd(KERN_DEBUG "program dma (IRQ) - " |
148 | "addr = 0x%x, buffer = 0x%lx, count = 0x%x, cmd = 0x%x\n", | ||
149 | block->addr, block->buf_addr, block->count, block->cmd); | ||
146 | #endif | 150 | #endif |
147 | } | 151 | } |
148 | 152 | ||
@@ -203,13 +207,16 @@ int snd_gf1_dma_transfer_block(struct snd_gus_card * gus, | |||
203 | } | 207 | } |
204 | *block = *__block; | 208 | *block = *__block; |
205 | block->next = NULL; | 209 | block->next = NULL; |
206 | #if 0 | 210 | |
207 | printk("addr = 0x%x, buffer = 0x%lx, count = 0x%x, cmd = 0x%x\n", block->addr, (long) block->buffer, block->count, block->cmd); | 211 | snd_printdd("addr = 0x%x, buffer = 0x%lx, count = 0x%x, cmd = 0x%x\n", |
208 | #endif | 212 | block->addr, (long) block->buffer, block->count, |
209 | #if 0 | 213 | block->cmd); |
210 | printk("gus->gf1.dma_data_pcm_last = 0x%lx\n", (long)gus->gf1.dma_data_pcm_last); | 214 | |
211 | printk("gus->gf1.dma_data_pcm = 0x%lx\n", (long)gus->gf1.dma_data_pcm); | 215 | snd_printdd("gus->gf1.dma_data_pcm_last = 0x%lx\n", |
212 | #endif | 216 | (long)gus->gf1.dma_data_pcm_last); |
217 | snd_printdd("gus->gf1.dma_data_pcm = 0x%lx\n", | ||
218 | (long)gus->gf1.dma_data_pcm); | ||
219 | |||
213 | spin_lock_irqsave(&gus->dma_lock, flags); | 220 | spin_lock_irqsave(&gus->dma_lock, flags); |
214 | if (synth) { | 221 | if (synth) { |
215 | if (gus->gf1.dma_data_synth_last) { | 222 | if (gus->gf1.dma_data_synth_last) { |
diff --git a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c index 041894ddd014..2055aff71b50 100644 --- a/sound/isa/gus/gus_irq.c +++ b/sound/isa/gus/gus_irq.c | |||
@@ -41,7 +41,7 @@ __again: | |||
41 | if (status == 0) | 41 | if (status == 0) |
42 | return IRQ_RETVAL(handled); | 42 | return IRQ_RETVAL(handled); |
43 | handled = 1; | 43 | handled = 1; |
44 | // snd_printk("IRQ: status = 0x%x\n", status); | 44 | /* snd_printk(KERN_DEBUG "IRQ: status = 0x%x\n", status); */ |
45 | if (status & 0x02) { | 45 | if (status & 0x02) { |
46 | STAT_ADD(gus->gf1.interrupt_stat_midi_in); | 46 | STAT_ADD(gus->gf1.interrupt_stat_midi_in); |
47 | if (gus->gf1.interrupt_handler_midi_in) | 47 | if (gus->gf1.interrupt_handler_midi_in) |
@@ -65,7 +65,9 @@ __again: | |||
65 | continue; /* multi request */ | 65 | continue; /* multi request */ |
66 | already |= _current_; /* mark request */ | 66 | already |= _current_; /* mark request */ |
67 | #if 0 | 67 | #if 0 |
68 | printk("voice = %i, voice_status = 0x%x, voice_verify = %i\n", voice, voice_status, inb(GUSP(gus, GF1PAGE))); | 68 | printk(KERN_DEBUG "voice = %i, voice_status = 0x%x, " |
69 | "voice_verify = %i\n", | ||
70 | voice, voice_status, inb(GUSP(gus, GF1PAGE))); | ||
69 | #endif | 71 | #endif |
70 | pvoice = &gus->gf1.voices[voice]; | 72 | pvoice = &gus->gf1.voices[voice]; |
71 | if (pvoice->use) { | 73 | if (pvoice->use) { |
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index 38510aeb21c6..edb11eefdfe3 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c | |||
@@ -82,7 +82,10 @@ static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream, | |||
82 | 82 | ||
83 | count += offset & 31; | 83 | count += offset & 31; |
84 | offset &= ~31; | 84 | offset &= ~31; |
85 | // snd_printk("block change - offset = 0x%x, count = 0x%x\n", offset, count); | 85 | /* |
86 | snd_printk(KERN_DEBUG "block change - offset = 0x%x, count = 0x%x\n", | ||
87 | offset, count); | ||
88 | */ | ||
86 | memset(&block, 0, sizeof(block)); | 89 | memset(&block, 0, sizeof(block)); |
87 | block.cmd = SNDRV_GF1_DMA_IRQ; | 90 | block.cmd = SNDRV_GF1_DMA_IRQ; |
88 | if (snd_pcm_format_unsigned(runtime->format)) | 91 | if (snd_pcm_format_unsigned(runtime->format)) |
@@ -135,7 +138,11 @@ static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream) | |||
135 | curr = begin + (pcmp->bpos * pcmp->block_size) / runtime->channels; | 138 | curr = begin + (pcmp->bpos * pcmp->block_size) / runtime->channels; |
136 | end = curr + (pcmp->block_size / runtime->channels); | 139 | end = curr + (pcmp->block_size / runtime->channels); |
137 | end -= snd_pcm_format_width(runtime->format) == 16 ? 2 : 1; | 140 | end -= snd_pcm_format_width(runtime->format) == 16 ? 2 : 1; |
138 | // snd_printk("init: curr=0x%x, begin=0x%x, end=0x%x, ctrl=0x%x, ramp=0x%x, rate=0x%x\n", curr, begin, end, voice_ctrl, ramp_ctrl, rate); | 141 | /* |
142 | snd_printk(KERN_DEBUG "init: curr=0x%x, begin=0x%x, end=0x%x, " | ||
143 | "ctrl=0x%x, ramp=0x%x, rate=0x%x\n", | ||
144 | curr, begin, end, voice_ctrl, ramp_ctrl, rate); | ||
145 | */ | ||
139 | pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8; | 146 | pan = runtime->channels == 2 ? (!voice ? 1 : 14) : 8; |
140 | vol = !voice ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; | 147 | vol = !voice ? gus->gf1.pcm_volume_level_left : gus->gf1.pcm_volume_level_right; |
141 | spin_lock_irqsave(&gus->reg_lock, flags); | 148 | spin_lock_irqsave(&gus->reg_lock, flags); |
@@ -205,9 +212,11 @@ static void snd_gf1_pcm_interrupt_wave(struct snd_gus_card * gus, | |||
205 | ramp_ctrl = (snd_gf1_read8(gus, SNDRV_GF1_VB_VOLUME_CONTROL) & ~0xa4) | 0x03; | 212 | ramp_ctrl = (snd_gf1_read8(gus, SNDRV_GF1_VB_VOLUME_CONTROL) & ~0xa4) | 0x03; |
206 | #if 0 | 213 | #if 0 |
207 | snd_gf1_select_voice(gus, pvoice->number); | 214 | snd_gf1_select_voice(gus, pvoice->number); |
208 | printk("position = 0x%x\n", (snd_gf1_read_addr(gus, SNDRV_GF1_VA_CURRENT, voice_ctrl & 4) >> 4)); | 215 | printk(KERN_DEBUG "position = 0x%x\n", |
216 | (snd_gf1_read_addr(gus, SNDRV_GF1_VA_CURRENT, voice_ctrl & 4) >> 4)); | ||
209 | snd_gf1_select_voice(gus, pcmp->pvoices[1]->number); | 217 | snd_gf1_select_voice(gus, pcmp->pvoices[1]->number); |
210 | printk("position = 0x%x\n", (snd_gf1_read_addr(gus, SNDRV_GF1_VA_CURRENT, voice_ctrl & 4) >> 4)); | 218 | printk(KERN_DEBUG "position = 0x%x\n", |
219 | (snd_gf1_read_addr(gus, SNDRV_GF1_VA_CURRENT, voice_ctrl & 4) >> 4)); | ||
211 | snd_gf1_select_voice(gus, pvoice->number); | 220 | snd_gf1_select_voice(gus, pvoice->number); |
212 | #endif | 221 | #endif |
213 | pcmp->bpos++; | 222 | pcmp->bpos++; |
@@ -299,7 +308,11 @@ static int snd_gf1_pcm_poke_block(struct snd_gus_card *gus, unsigned char *buf, | |||
299 | unsigned int len; | 308 | unsigned int len; |
300 | unsigned long flags; | 309 | unsigned long flags; |
301 | 310 | ||
302 | // printk("poke block; buf = 0x%x, pos = %i, count = %i, port = 0x%x\n", (int)buf, pos, count, gus->gf1.port); | 311 | /* |
312 | printk(KERN_DEBUG | ||
313 | "poke block; buf = 0x%x, pos = %i, count = %i, port = 0x%x\n", | ||
314 | (int)buf, pos, count, gus->gf1.port); | ||
315 | */ | ||
303 | while (count > 0) { | 316 | while (count > 0) { |
304 | len = count; | 317 | len = count; |
305 | if (len > 512) /* limit, to allow IRQ */ | 318 | if (len > 512) /* limit, to allow IRQ */ |
@@ -680,7 +693,8 @@ static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream) | |||
680 | runtime->private_free = snd_gf1_pcm_playback_free; | 693 | runtime->private_free = snd_gf1_pcm_playback_free; |
681 | 694 | ||
682 | #if 0 | 695 | #if 0 |
683 | printk("playback.buffer = 0x%lx, gf1.pcm_buffer = 0x%lx\n", (long) pcm->playback.buffer, (long) gus->gf1.pcm_buffer); | 696 | printk(KERN_DEBUG "playback.buffer = 0x%lx, gf1.pcm_buffer = 0x%lx\n", |
697 | (long) pcm->playback.buffer, (long) gus->gf1.pcm_buffer); | ||
684 | #endif | 698 | #endif |
685 | if ((err = snd_gf1_dma_init(gus)) < 0) | 699 | if ((err = snd_gf1_dma_init(gus)) < 0) |
686 | return err; | 700 | return err; |
diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c index f0af3f79b08b..21cc42e4c4be 100644 --- a/sound/isa/gus/gus_uart.c +++ b/sound/isa/gus/gus_uart.c | |||
@@ -129,8 +129,14 @@ static int snd_gf1_uart_input_open(struct snd_rawmidi_substream *substream) | |||
129 | } | 129 | } |
130 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); | 130 | spin_unlock_irqrestore(&gus->uart_cmd_lock, flags); |
131 | #if 0 | 131 | #if 0 |
132 | snd_printk("read init - enable = %i, cmd = 0x%x, stat = 0x%x\n", gus->uart_enable, gus->gf1.uart_cmd, snd_gf1_uart_stat(gus)); | 132 | snd_printk(KERN_DEBUG |
133 | snd_printk("[0x%x] reg (ctrl/status) = 0x%x, reg (data) = 0x%x (page = 0x%x)\n", gus->gf1.port + 0x100, inb(gus->gf1.port + 0x100), inb(gus->gf1.port + 0x101), inb(gus->gf1.port + 0x102)); | 133 | "read init - enable = %i, cmd = 0x%x, stat = 0x%x\n", |
134 | gus->uart_enable, gus->gf1.uart_cmd, snd_gf1_uart_stat(gus)); | ||
135 | snd_printk(KERN_DEBUG | ||
136 | "[0x%x] reg (ctrl/status) = 0x%x, reg (data) = 0x%x " | ||
137 | "(page = 0x%x)\n", | ||
138 | gus->gf1.port + 0x100, inb(gus->gf1.port + 0x100), | ||
139 | inb(gus->gf1.port + 0x101), inb(gus->gf1.port + 0x102)); | ||
134 | #endif | 140 | #endif |
135 | return 0; | 141 | return 0; |
136 | } | 142 | } |
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 50e429a120da..534a6eced2b8 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -170,7 +170,7 @@ static void snd_interwave_i2c_setlines(struct snd_i2c_bus *bus, int ctrl, int da | |||
170 | unsigned long port = bus->private_value; | 170 | unsigned long port = bus->private_value; |
171 | 171 | ||
172 | #if 0 | 172 | #if 0 |
173 | printk("i2c_setlines - 0x%lx <- %i,%i\n", port, ctrl, data); | 173 | printk(KERN_DEBUG "i2c_setlines - 0x%lx <- %i,%i\n", port, ctrl, data); |
174 | #endif | 174 | #endif |
175 | outb((data << 1) | ctrl, port); | 175 | outb((data << 1) | ctrl, port); |
176 | udelay(10); | 176 | udelay(10); |
@@ -183,7 +183,7 @@ static int snd_interwave_i2c_getclockline(struct snd_i2c_bus *bus) | |||
183 | 183 | ||
184 | res = inb(port) & 1; | 184 | res = inb(port) & 1; |
185 | #if 0 | 185 | #if 0 |
186 | printk("i2c_getclockline - 0x%lx -> %i\n", port, res); | 186 | printk(KERN_DEBUG "i2c_getclockline - 0x%lx -> %i\n", port, res); |
187 | #endif | 187 | #endif |
188 | return res; | 188 | return res; |
189 | } | 189 | } |
@@ -197,7 +197,7 @@ static int snd_interwave_i2c_getdataline(struct snd_i2c_bus *bus, int ack) | |||
197 | udelay(10); | 197 | udelay(10); |
198 | res = (inb(port) & 2) >> 1; | 198 | res = (inb(port) & 2) >> 1; |
199 | #if 0 | 199 | #if 0 |
200 | printk("i2c_getdataline - 0x%lx -> %i\n", port, res); | 200 | printk(KERN_DEBUG "i2c_getdataline - 0x%lx -> %i\n", port, res); |
201 | #endif | 201 | #endif |
202 | return res; | 202 | return res; |
203 | } | 203 | } |
@@ -342,7 +342,8 @@ static void __devinit snd_interwave_bank_sizes(struct snd_gus_card * gus, int *s | |||
342 | snd_gf1_poke(gus, local, d); | 342 | snd_gf1_poke(gus, local, d); |
343 | snd_gf1_poke(gus, local + 1, d + 1); | 343 | snd_gf1_poke(gus, local + 1, d + 1); |
344 | #if 0 | 344 | #if 0 |
345 | printk("d = 0x%x, local = 0x%x, local + 1 = 0x%x, idx << 22 = 0x%x\n", | 345 | printk(KERN_DEBUG "d = 0x%x, local = 0x%x, " |
346 | "local + 1 = 0x%x, idx << 22 = 0x%x\n", | ||
346 | d, | 347 | d, |
347 | snd_gf1_peek(gus, local), | 348 | snd_gf1_peek(gus, local), |
348 | snd_gf1_peek(gus, local + 1), | 349 | snd_gf1_peek(gus, local + 1), |
@@ -356,7 +357,8 @@ static void __devinit snd_interwave_bank_sizes(struct snd_gus_card * gus, int *s | |||
356 | } | 357 | } |
357 | } | 358 | } |
358 | #if 0 | 359 | #if 0 |
359 | printk("sizes: %i %i %i %i\n", sizes[0], sizes[1], sizes[2], sizes[3]); | 360 | printk(KERN_DEBUG "sizes: %i %i %i %i\n", |
361 | sizes[0], sizes[1], sizes[2], sizes[3]); | ||
360 | #endif | 362 | #endif |
361 | } | 363 | } |
362 | 364 | ||
@@ -410,12 +412,12 @@ static void __devinit snd_interwave_detect_memory(struct snd_gus_card * gus) | |||
410 | lmct = (psizes[3] << 24) | (psizes[2] << 16) | | 412 | lmct = (psizes[3] << 24) | (psizes[2] << 16) | |
411 | (psizes[1] << 8) | psizes[0]; | 413 | (psizes[1] << 8) | psizes[0]; |
412 | #if 0 | 414 | #if 0 |
413 | printk("lmct = 0x%08x\n", lmct); | 415 | printk(KERN_DEBUG "lmct = 0x%08x\n", lmct); |
414 | #endif | 416 | #endif |
415 | for (i = 0; i < ARRAY_SIZE(lmc); i++) | 417 | for (i = 0; i < ARRAY_SIZE(lmc); i++) |
416 | if (lmct == lmc[i]) { | 418 | if (lmct == lmc[i]) { |
417 | #if 0 | 419 | #if 0 |
418 | printk("found !!! %i\n", i); | 420 | printk(KERN_DEBUG "found !!! %i\n", i); |
419 | #endif | 421 | #endif |
420 | snd_gf1_write16(gus, SNDRV_GF1_GW_MEMORY_CONFIG, (snd_gf1_look16(gus, SNDRV_GF1_GW_MEMORY_CONFIG) & 0xfff0) | i); | 422 | snd_gf1_write16(gus, SNDRV_GF1_GW_MEMORY_CONFIG, (snd_gf1_look16(gus, SNDRV_GF1_GW_MEMORY_CONFIG) & 0xfff0) | i); |
421 | snd_interwave_bank_sizes(gus, psizes); | 423 | snd_interwave_bank_sizes(gus, psizes); |
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 645491a53023..e8d6e1ac88a8 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -179,12 +179,13 @@ static unsigned char __snd_opl3sa2_read(struct snd_opl3sa2 *chip, unsigned char | |||
179 | unsigned char result; | 179 | unsigned char result; |
180 | #if 0 | 180 | #if 0 |
181 | outb(0x1d, port); /* password */ | 181 | outb(0x1d, port); /* password */ |
182 | printk("read [0x%lx] = 0x%x\n", port, inb(port)); | 182 | printk(KERN_DEBUG "read [0x%lx] = 0x%x\n", port, inb(port)); |
183 | #endif | 183 | #endif |
184 | outb(reg, chip->port); /* register */ | 184 | outb(reg, chip->port); /* register */ |
185 | result = inb(chip->port + 1); | 185 | result = inb(chip->port + 1); |
186 | #if 0 | 186 | #if 0 |
187 | printk("read [0x%lx] = 0x%x [0x%x]\n", port, result, inb(port)); | 187 | printk(KERN_DEBUG "read [0x%lx] = 0x%x [0x%x]\n", |
188 | port, result, inb(port)); | ||
188 | #endif | 189 | #endif |
189 | return result; | 190 | return result; |
190 | } | 191 | } |
@@ -233,7 +234,10 @@ static int __devinit snd_opl3sa2_detect(struct snd_card *card) | |||
233 | snd_printk(KERN_ERR PFX "can't grab port 0x%lx\n", port); | 234 | snd_printk(KERN_ERR PFX "can't grab port 0x%lx\n", port); |
234 | return -EBUSY; | 235 | return -EBUSY; |
235 | } | 236 | } |
236 | // snd_printk("REG 0A = 0x%x\n", snd_opl3sa2_read(chip, 0x0a)); | 237 | /* |
238 | snd_printk(KERN_DEBUG "REG 0A = 0x%x\n", | ||
239 | snd_opl3sa2_read(chip, 0x0a)); | ||
240 | */ | ||
237 | chip->version = 0; | 241 | chip->version = 0; |
238 | tmp = snd_opl3sa2_read(chip, OPL3SA2_MISC); | 242 | tmp = snd_opl3sa2_read(chip, OPL3SA2_MISC); |
239 | if (tmp == 0xff) { | 243 | if (tmp == 0xff) { |
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index cd6e60a6a4ea..5cd555325b9d 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c | |||
@@ -252,7 +252,7 @@ static int __devinit snd_opti9xx_init(struct snd_opti9xx *chip, | |||
252 | #endif /* OPTi93X */ | 252 | #endif /* OPTi93X */ |
253 | 253 | ||
254 | default: | 254 | default: |
255 | snd_printk("chip %d not supported\n", hardware); | 255 | snd_printk(KERN_ERR "chip %d not supported\n", hardware); |
256 | return -ENODEV; | 256 | return -ENODEV; |
257 | } | 257 | } |
258 | return 0; | 258 | return 0; |
@@ -294,7 +294,7 @@ static unsigned char snd_opti9xx_read(struct snd_opti9xx *chip, | |||
294 | #endif /* OPTi93X */ | 294 | #endif /* OPTi93X */ |
295 | 295 | ||
296 | default: | 296 | default: |
297 | snd_printk("chip %d not supported\n", chip->hardware); | 297 | snd_printk(KERN_ERR "chip %d not supported\n", chip->hardware); |
298 | } | 298 | } |
299 | 299 | ||
300 | spin_unlock_irqrestore(&chip->lock, flags); | 300 | spin_unlock_irqrestore(&chip->lock, flags); |
@@ -336,7 +336,7 @@ static void snd_opti9xx_write(struct snd_opti9xx *chip, unsigned char reg, | |||
336 | #endif /* OPTi93X */ | 336 | #endif /* OPTi93X */ |
337 | 337 | ||
338 | default: | 338 | default: |
339 | snd_printk("chip %d not supported\n", chip->hardware); | 339 | snd_printk(KERN_ERR "chip %d not supported\n", chip->hardware); |
340 | } | 340 | } |
341 | 341 | ||
342 | spin_unlock_irqrestore(&chip->lock, flags); | 342 | spin_unlock_irqrestore(&chip->lock, flags); |
@@ -412,7 +412,7 @@ static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip) | |||
412 | #endif /* OPTi93X */ | 412 | #endif /* OPTi93X */ |
413 | 413 | ||
414 | default: | 414 | default: |
415 | snd_printk("chip %d not supported\n", chip->hardware); | 415 | snd_printk(KERN_ERR "chip %d not supported\n", chip->hardware); |
416 | return -EINVAL; | 416 | return -EINVAL; |
417 | } | 417 | } |
418 | 418 | ||
@@ -430,7 +430,8 @@ static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip) | |||
430 | wss_base_bits = 0x02; | 430 | wss_base_bits = 0x02; |
431 | break; | 431 | break; |
432 | default: | 432 | default: |
433 | snd_printk("WSS port 0x%lx not valid\n", chip->wss_base); | 433 | snd_printk(KERN_WARNING "WSS port 0x%lx not valid\n", |
434 | chip->wss_base); | ||
434 | goto __skip_base; | 435 | goto __skip_base; |
435 | } | 436 | } |
436 | snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(1), wss_base_bits << 4, 0x30); | 437 | snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(1), wss_base_bits << 4, 0x30); |
@@ -455,7 +456,7 @@ __skip_base: | |||
455 | irq_bits = 0x04; | 456 | irq_bits = 0x04; |
456 | break; | 457 | break; |
457 | default: | 458 | default: |
458 | snd_printk("WSS irq # %d not valid\n", chip->irq); | 459 | snd_printk(KERN_WARNING "WSS irq # %d not valid\n", chip->irq); |
459 | goto __skip_resources; | 460 | goto __skip_resources; |
460 | } | 461 | } |
461 | 462 | ||
@@ -470,13 +471,14 @@ __skip_base: | |||
470 | dma_bits = 0x03; | 471 | dma_bits = 0x03; |
471 | break; | 472 | break; |
472 | default: | 473 | default: |
473 | snd_printk("WSS dma1 # %d not valid\n", chip->dma1); | 474 | snd_printk(KERN_WARNING "WSS dma1 # %d not valid\n", |
475 | chip->dma1); | ||
474 | goto __skip_resources; | 476 | goto __skip_resources; |
475 | } | 477 | } |
476 | 478 | ||
477 | #if defined(CS4231) || defined(OPTi93X) | 479 | #if defined(CS4231) || defined(OPTi93X) |
478 | if (chip->dma1 == chip->dma2) { | 480 | if (chip->dma1 == chip->dma2) { |
479 | snd_printk("don't want to share dmas\n"); | 481 | snd_printk(KERN_ERR "don't want to share dmas\n"); |
480 | return -EBUSY; | 482 | return -EBUSY; |
481 | } | 483 | } |
482 | 484 | ||
@@ -485,7 +487,8 @@ __skip_base: | |||
485 | case 1: | 487 | case 1: |
486 | break; | 488 | break; |
487 | default: | 489 | default: |
488 | snd_printk("WSS dma2 # %d not valid\n", chip->dma2); | 490 | snd_printk(KERN_WARNING "WSS dma2 # %d not valid\n", |
491 | chip->dma2); | ||
489 | goto __skip_resources; | 492 | goto __skip_resources; |
490 | } | 493 | } |
491 | dma_bits |= 0x04; | 494 | dma_bits |= 0x04; |
@@ -516,7 +519,8 @@ __skip_resources: | |||
516 | mpu_port_bits = 0x00; | 519 | mpu_port_bits = 0x00; |
517 | break; | 520 | break; |
518 | default: | 521 | default: |
519 | snd_printk("MPU-401 port 0x%lx not valid\n", | 522 | snd_printk(KERN_WARNING |
523 | "MPU-401 port 0x%lx not valid\n", | ||
520 | chip->mpu_port); | 524 | chip->mpu_port); |
521 | goto __skip_mpu; | 525 | goto __skip_mpu; |
522 | } | 526 | } |
@@ -535,7 +539,7 @@ __skip_resources: | |||
535 | mpu_irq_bits = 0x01; | 539 | mpu_irq_bits = 0x01; |
536 | break; | 540 | break; |
537 | default: | 541 | default: |
538 | snd_printk("MPU-401 irq # %d not valid\n", | 542 | snd_printk(KERN_WARNING "MPU-401 irq # %d not valid\n", |
539 | chip->mpu_irq); | 543 | chip->mpu_irq); |
540 | goto __skip_mpu; | 544 | goto __skip_mpu; |
541 | } | 545 | } |
@@ -726,7 +730,7 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card) | |||
726 | if (chip->wss_base == SNDRV_AUTO_PORT) { | 730 | if (chip->wss_base == SNDRV_AUTO_PORT) { |
727 | chip->wss_base = snd_legacy_find_free_ioport(possible_ports, 4); | 731 | chip->wss_base = snd_legacy_find_free_ioport(possible_ports, 4); |
728 | if (chip->wss_base < 0) { | 732 | if (chip->wss_base < 0) { |
729 | snd_printk("unable to find a free WSS port\n"); | 733 | snd_printk(KERN_ERR "unable to find a free WSS port\n"); |
730 | return -EBUSY; | 734 | return -EBUSY; |
731 | } | 735 | } |
732 | } | 736 | } |
@@ -815,14 +819,8 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card) | |||
815 | chip->fm_port, chip->fm_port + 4 - 1); | 819 | chip->fm_port, chip->fm_port + 4 - 1); |
816 | } | 820 | } |
817 | if (opl3) { | 821 | if (opl3) { |
818 | #ifdef CS4231 | 822 | error = snd_opl3_hwdep_new(opl3, 0, 1, &synth); |
819 | const int t1dev = 1; | 823 | if (error < 0) |
820 | #else | ||
821 | const int t1dev = 0; | ||
822 | #endif | ||
823 | if ((error = snd_opl3_timer_new(opl3, t1dev, t1dev+1)) < 0) | ||
824 | return error; | ||
825 | if ((error = snd_opl3_hwdep_new(opl3, 0, 1, &synth)) < 0) | ||
826 | return error; | 824 | return error; |
827 | } | 825 | } |
828 | } | 826 | } |
@@ -900,7 +898,7 @@ static int __devinit snd_opti9xx_isa_probe(struct device *devptr, | |||
900 | #if defined(CS4231) || defined(OPTi93X) | 898 | #if defined(CS4231) || defined(OPTi93X) |
901 | if (dma2 == SNDRV_AUTO_DMA) { | 899 | if (dma2 == SNDRV_AUTO_DMA) { |
902 | if ((dma2 = snd_legacy_find_free_dma(possible_dma2s[dma1 % 4])) < 0) { | 900 | if ((dma2 = snd_legacy_find_free_dma(possible_dma2s[dma1 % 4])) < 0) { |
903 | snd_printk("unable to find a free DMA2\n"); | 901 | snd_printk(KERN_ERR "unable to find a free DMA2\n"); |
904 | return -EBUSY; | 902 | return -EBUSY; |
905 | } | 903 | } |
906 | } | 904 | } |
diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c index 7a1470376c6d..782010608ef4 100644 --- a/sound/isa/sc6000.c +++ b/sound/isa/sc6000.c | |||
@@ -576,10 +576,6 @@ static int __devinit snd_sc6000_probe(struct device *devptr, unsigned int dev) | |||
576 | snd_printk(KERN_ERR PFX "no OPL device at 0x%x-0x%x ?\n", | 576 | snd_printk(KERN_ERR PFX "no OPL device at 0x%x-0x%x ?\n", |
577 | 0x388, 0x388 + 2); | 577 | 0x388, 0x388 + 2); |
578 | } else { | 578 | } else { |
579 | err = snd_opl3_timer_new(opl3, 0, 1); | ||
580 | if (err < 0) | ||
581 | goto err_unmap2; | ||
582 | |||
583 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | 579 | err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); |
584 | if (err < 0) | 580 | if (err < 0) |
585 | goto err_unmap2; | 581 | goto err_unmap2; |
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index 95898b2b7b58..a34ae7b1f7d0 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c | |||
@@ -553,11 +553,11 @@ static int __devinit snd_wavefront_isa_match(struct device *pdev, | |||
553 | return 0; | 553 | return 0; |
554 | #endif | 554 | #endif |
555 | if (cs4232_pcm_port[dev] == SNDRV_AUTO_PORT) { | 555 | if (cs4232_pcm_port[dev] == SNDRV_AUTO_PORT) { |
556 | snd_printk("specify CS4232 port\n"); | 556 | snd_printk(KERN_ERR "specify CS4232 port\n"); |
557 | return 0; | 557 | return 0; |
558 | } | 558 | } |
559 | if (ics2115_port[dev] == SNDRV_AUTO_PORT) { | 559 | if (ics2115_port[dev] == SNDRV_AUTO_PORT) { |
560 | snd_printk("specify ICS2115 port\n"); | 560 | snd_printk(KERN_ERR "specify ICS2115 port\n"); |
561 | return 0; | 561 | return 0; |
562 | } | 562 | } |
563 | return 1; | 563 | return 1; |
diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 4c410820a994..beb312cca75b 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c | |||
@@ -633,7 +633,7 @@ wavefront_get_sample_status (snd_wavefront_t *dev, int assume_rom) | |||
633 | wbuf[1] = i >> 7; | 633 | wbuf[1] = i >> 7; |
634 | 634 | ||
635 | if (snd_wavefront_cmd (dev, WFC_IDENTIFY_SAMPLE_TYPE, rbuf, wbuf)) { | 635 | if (snd_wavefront_cmd (dev, WFC_IDENTIFY_SAMPLE_TYPE, rbuf, wbuf)) { |
636 | snd_printk("cannot identify sample " | 636 | snd_printk(KERN_WARNING "cannot identify sample " |
637 | "type of slot %d\n", i); | 637 | "type of slot %d\n", i); |
638 | dev->sample_status[i] = WF_ST_EMPTY; | 638 | dev->sample_status[i] = WF_ST_EMPTY; |
639 | continue; | 639 | continue; |
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 3d6c5f2838af..8de5deda7ad6 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c | |||
@@ -219,7 +219,8 @@ void snd_wss_out(struct snd_wss *chip, unsigned char reg, unsigned char value) | |||
219 | snd_wss_wait(chip); | 219 | snd_wss_wait(chip); |
220 | #ifdef CONFIG_SND_DEBUG | 220 | #ifdef CONFIG_SND_DEBUG |
221 | if (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) | 221 | if (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) |
222 | snd_printk("out: auto calibration time out - reg = 0x%x, value = 0x%x\n", reg, value); | 222 | snd_printk(KERN_DEBUG "out: auto calibration time out " |
223 | "- reg = 0x%x, value = 0x%x\n", reg, value); | ||
223 | #endif | 224 | #endif |
224 | wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | reg); | 225 | wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | reg); |
225 | wss_outb(chip, CS4231P(REG), value); | 226 | wss_outb(chip, CS4231P(REG), value); |
@@ -235,7 +236,8 @@ unsigned char snd_wss_in(struct snd_wss *chip, unsigned char reg) | |||
235 | snd_wss_wait(chip); | 236 | snd_wss_wait(chip); |
236 | #ifdef CONFIG_SND_DEBUG | 237 | #ifdef CONFIG_SND_DEBUG |
237 | if (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) | 238 | if (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) |
238 | snd_printk("in: auto calibration time out - reg = 0x%x\n", reg); | 239 | snd_printk(KERN_DEBUG "in: auto calibration time out " |
240 | "- reg = 0x%x\n", reg); | ||
239 | #endif | 241 | #endif |
240 | wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | reg); | 242 | wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | reg); |
241 | mb(); | 243 | mb(); |
@@ -252,7 +254,7 @@ void snd_cs4236_ext_out(struct snd_wss *chip, unsigned char reg, | |||
252 | wss_outb(chip, CS4231P(REG), val); | 254 | wss_outb(chip, CS4231P(REG), val); |
253 | chip->eimage[CS4236_REG(reg)] = val; | 255 | chip->eimage[CS4236_REG(reg)] = val; |
254 | #if 0 | 256 | #if 0 |
255 | printk("ext out : reg = 0x%x, val = 0x%x\n", reg, val); | 257 | printk(KERN_DEBUG "ext out : reg = 0x%x, val = 0x%x\n", reg, val); |
256 | #endif | 258 | #endif |
257 | } | 259 | } |
258 | EXPORT_SYMBOL(snd_cs4236_ext_out); | 260 | EXPORT_SYMBOL(snd_cs4236_ext_out); |
@@ -268,7 +270,8 @@ unsigned char snd_cs4236_ext_in(struct snd_wss *chip, unsigned char reg) | |||
268 | { | 270 | { |
269 | unsigned char res; | 271 | unsigned char res; |
270 | res = wss_inb(chip, CS4231P(REG)); | 272 | res = wss_inb(chip, CS4231P(REG)); |
271 | printk("ext in : reg = 0x%x, val = 0x%x\n", reg, res); | 273 | printk(KERN_DEBUG "ext in : reg = 0x%x, val = 0x%x\n", |
274 | reg, res); | ||
272 | return res; | 275 | return res; |
273 | } | 276 | } |
274 | #endif | 277 | #endif |
@@ -394,13 +397,16 @@ void snd_wss_mce_up(struct snd_wss *chip) | |||
394 | snd_wss_wait(chip); | 397 | snd_wss_wait(chip); |
395 | #ifdef CONFIG_SND_DEBUG | 398 | #ifdef CONFIG_SND_DEBUG |
396 | if (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) | 399 | if (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) |
397 | snd_printk("mce_up - auto calibration time out (0)\n"); | 400 | snd_printk(KERN_DEBUG |
401 | "mce_up - auto calibration time out (0)\n"); | ||
398 | #endif | 402 | #endif |
399 | spin_lock_irqsave(&chip->reg_lock, flags); | 403 | spin_lock_irqsave(&chip->reg_lock, flags); |
400 | chip->mce_bit |= CS4231_MCE; | 404 | chip->mce_bit |= CS4231_MCE; |
401 | timeout = wss_inb(chip, CS4231P(REGSEL)); | 405 | timeout = wss_inb(chip, CS4231P(REGSEL)); |
402 | if (timeout == 0x80) | 406 | if (timeout == 0x80) |
403 | snd_printk("mce_up [0x%lx]: serious init problem - codec still busy\n", chip->port); | 407 | snd_printk(KERN_DEBUG "mce_up [0x%lx]: " |
408 | "serious init problem - codec still busy\n", | ||
409 | chip->port); | ||
404 | if (!(timeout & CS4231_MCE)) | 410 | if (!(timeout & CS4231_MCE)) |
405 | wss_outb(chip, CS4231P(REGSEL), | 411 | wss_outb(chip, CS4231P(REGSEL), |
406 | chip->mce_bit | (timeout & 0x1f)); | 412 | chip->mce_bit | (timeout & 0x1f)); |
@@ -419,7 +425,9 @@ void snd_wss_mce_down(struct snd_wss *chip) | |||
419 | 425 | ||
420 | #ifdef CONFIG_SND_DEBUG | 426 | #ifdef CONFIG_SND_DEBUG |
421 | if (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) | 427 | if (wss_inb(chip, CS4231P(REGSEL)) & CS4231_INIT) |
422 | snd_printk("mce_down [0x%lx] - auto calibration time out (0)\n", (long)CS4231P(REGSEL)); | 428 | snd_printk(KERN_DEBUG "mce_down [0x%lx] - " |
429 | "auto calibration time out (0)\n", | ||
430 | (long)CS4231P(REGSEL)); | ||
423 | #endif | 431 | #endif |
424 | spin_lock_irqsave(&chip->reg_lock, flags); | 432 | spin_lock_irqsave(&chip->reg_lock, flags); |
425 | chip->mce_bit &= ~CS4231_MCE; | 433 | chip->mce_bit &= ~CS4231_MCE; |
@@ -427,7 +435,9 @@ void snd_wss_mce_down(struct snd_wss *chip) | |||
427 | wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | (timeout & 0x1f)); | 435 | wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | (timeout & 0x1f)); |
428 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 436 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
429 | if (timeout == 0x80) | 437 | if (timeout == 0x80) |
430 | snd_printk("mce_down [0x%lx]: serious init problem - codec still busy\n", chip->port); | 438 | snd_printk(KERN_DEBUG "mce_down [0x%lx]: " |
439 | "serious init problem - codec still busy\n", | ||
440 | chip->port); | ||
431 | if ((timeout & CS4231_MCE) == 0 || !(chip->hardware & hw_mask)) | 441 | if ((timeout & CS4231_MCE) == 0 || !(chip->hardware & hw_mask)) |
432 | return; | 442 | return; |
433 | 443 | ||
@@ -565,7 +575,7 @@ static unsigned char snd_wss_get_format(struct snd_wss *chip, | |||
565 | if (channels > 1) | 575 | if (channels > 1) |
566 | rformat |= CS4231_STEREO; | 576 | rformat |= CS4231_STEREO; |
567 | #if 0 | 577 | #if 0 |
568 | snd_printk("get_format: 0x%x (mode=0x%x)\n", format, mode); | 578 | snd_printk(KERN_DEBUG "get_format: 0x%x (mode=0x%x)\n", format, mode); |
569 | #endif | 579 | #endif |
570 | return rformat; | 580 | return rformat; |
571 | } | 581 | } |
@@ -774,7 +784,7 @@ static void snd_wss_init(struct snd_wss *chip) | |||
774 | snd_wss_mce_down(chip); | 784 | snd_wss_mce_down(chip); |
775 | 785 | ||
776 | #ifdef SNDRV_DEBUG_MCE | 786 | #ifdef SNDRV_DEBUG_MCE |
777 | snd_printk("init: (1)\n"); | 787 | snd_printk(KERN_DEBUG "init: (1)\n"); |
778 | #endif | 788 | #endif |
779 | snd_wss_mce_up(chip); | 789 | snd_wss_mce_up(chip); |
780 | spin_lock_irqsave(&chip->reg_lock, flags); | 790 | spin_lock_irqsave(&chip->reg_lock, flags); |
@@ -789,7 +799,7 @@ static void snd_wss_init(struct snd_wss *chip) | |||
789 | snd_wss_mce_down(chip); | 799 | snd_wss_mce_down(chip); |
790 | 800 | ||
791 | #ifdef SNDRV_DEBUG_MCE | 801 | #ifdef SNDRV_DEBUG_MCE |
792 | snd_printk("init: (2)\n"); | 802 | snd_printk(KERN_DEBUG "init: (2)\n"); |
793 | #endif | 803 | #endif |
794 | 804 | ||
795 | snd_wss_mce_up(chip); | 805 | snd_wss_mce_up(chip); |
@@ -800,7 +810,7 @@ static void snd_wss_init(struct snd_wss *chip) | |||
800 | snd_wss_mce_down(chip); | 810 | snd_wss_mce_down(chip); |
801 | 811 | ||
802 | #ifdef SNDRV_DEBUG_MCE | 812 | #ifdef SNDRV_DEBUG_MCE |
803 | snd_printk("init: (3) - afei = 0x%x\n", | 813 | snd_printk(KERN_DEBUG "init: (3) - afei = 0x%x\n", |
804 | chip->image[CS4231_ALT_FEATURE_1]); | 814 | chip->image[CS4231_ALT_FEATURE_1]); |
805 | #endif | 815 | #endif |
806 | 816 | ||
@@ -817,7 +827,7 @@ static void snd_wss_init(struct snd_wss *chip) | |||
817 | snd_wss_mce_down(chip); | 827 | snd_wss_mce_down(chip); |
818 | 828 | ||
819 | #ifdef SNDRV_DEBUG_MCE | 829 | #ifdef SNDRV_DEBUG_MCE |
820 | snd_printk("init: (4)\n"); | 830 | snd_printk(KERN_DEBUG "init: (4)\n"); |
821 | #endif | 831 | #endif |
822 | 832 | ||
823 | snd_wss_mce_up(chip); | 833 | snd_wss_mce_up(chip); |
@@ -829,7 +839,7 @@ static void snd_wss_init(struct snd_wss *chip) | |||
829 | snd_wss_mce_down(chip); | 839 | snd_wss_mce_down(chip); |
830 | 840 | ||
831 | #ifdef SNDRV_DEBUG_MCE | 841 | #ifdef SNDRV_DEBUG_MCE |
832 | snd_printk("init: (5)\n"); | 842 | snd_printk(KERN_DEBUG "init: (5)\n"); |
833 | #endif | 843 | #endif |
834 | } | 844 | } |
835 | 845 | ||
@@ -1278,7 +1288,8 @@ static int snd_wss_probe(struct snd_wss *chip) | |||
1278 | } else if (rev == 0x03) { | 1288 | } else if (rev == 0x03) { |
1279 | chip->hardware = WSS_HW_CS4236B; | 1289 | chip->hardware = WSS_HW_CS4236B; |
1280 | } else { | 1290 | } else { |
1281 | snd_printk("unknown CS chip with version 0x%x\n", rev); | 1291 | snd_printk(KERN_ERR |
1292 | "unknown CS chip with version 0x%x\n", rev); | ||
1282 | return -ENODEV; /* unknown CS4231 chip? */ | 1293 | return -ENODEV; /* unknown CS4231 chip? */ |
1283 | } | 1294 | } |
1284 | } | 1295 | } |
@@ -1342,7 +1353,10 @@ static int snd_wss_probe(struct snd_wss *chip) | |||
1342 | case 6: | 1353 | case 6: |
1343 | break; | 1354 | break; |
1344 | default: | 1355 | default: |
1345 | snd_printk("unknown CS4235 chip (enhanced version = 0x%x)\n", id); | 1356 | snd_printk(KERN_WARNING |
1357 | "unknown CS4235 chip " | ||
1358 | "(enhanced version = 0x%x)\n", | ||
1359 | id); | ||
1346 | } | 1360 | } |
1347 | } else if ((id & 0x1f) == 0x0b) { /* CS4236/B */ | 1361 | } else if ((id & 0x1f) == 0x0b) { /* CS4236/B */ |
1348 | switch (id >> 5) { | 1362 | switch (id >> 5) { |
@@ -1353,7 +1367,10 @@ static int snd_wss_probe(struct snd_wss *chip) | |||
1353 | chip->hardware = WSS_HW_CS4236B; | 1367 | chip->hardware = WSS_HW_CS4236B; |
1354 | break; | 1368 | break; |
1355 | default: | 1369 | default: |
1356 | snd_printk("unknown CS4236 chip (enhanced version = 0x%x)\n", id); | 1370 | snd_printk(KERN_WARNING |
1371 | "unknown CS4236 chip " | ||
1372 | "(enhanced version = 0x%x)\n", | ||
1373 | id); | ||
1357 | } | 1374 | } |
1358 | } else if ((id & 0x1f) == 0x08) { /* CS4237B */ | 1375 | } else if ((id & 0x1f) == 0x08) { /* CS4237B */ |
1359 | chip->hardware = WSS_HW_CS4237B; | 1376 | chip->hardware = WSS_HW_CS4237B; |
@@ -1364,7 +1381,10 @@ static int snd_wss_probe(struct snd_wss *chip) | |||
1364 | case 7: | 1381 | case 7: |
1365 | break; | 1382 | break; |
1366 | default: | 1383 | default: |
1367 | snd_printk("unknown CS4237B chip (enhanced version = 0x%x)\n", id); | 1384 | snd_printk(KERN_WARNING |
1385 | "unknown CS4237B chip " | ||
1386 | "(enhanced version = 0x%x)\n", | ||
1387 | id); | ||
1368 | } | 1388 | } |
1369 | } else if ((id & 0x1f) == 0x09) { /* CS4238B */ | 1389 | } else if ((id & 0x1f) == 0x09) { /* CS4238B */ |
1370 | chip->hardware = WSS_HW_CS4238B; | 1390 | chip->hardware = WSS_HW_CS4238B; |
@@ -1374,7 +1394,10 @@ static int snd_wss_probe(struct snd_wss *chip) | |||
1374 | case 7: | 1394 | case 7: |
1375 | break; | 1395 | break; |
1376 | default: | 1396 | default: |
1377 | snd_printk("unknown CS4238B chip (enhanced version = 0x%x)\n", id); | 1397 | snd_printk(KERN_WARNING |
1398 | "unknown CS4238B chip " | ||
1399 | "(enhanced version = 0x%x)\n", | ||
1400 | id); | ||
1378 | } | 1401 | } |
1379 | } else if ((id & 0x1f) == 0x1e) { /* CS4239 */ | 1402 | } else if ((id & 0x1f) == 0x1e) { /* CS4239 */ |
1380 | chip->hardware = WSS_HW_CS4239; | 1403 | chip->hardware = WSS_HW_CS4239; |
@@ -1384,10 +1407,15 @@ static int snd_wss_probe(struct snd_wss *chip) | |||
1384 | case 6: | 1407 | case 6: |
1385 | break; | 1408 | break; |
1386 | default: | 1409 | default: |
1387 | snd_printk("unknown CS4239 chip (enhanced version = 0x%x)\n", id); | 1410 | snd_printk(KERN_WARNING |
1411 | "unknown CS4239 chip " | ||
1412 | "(enhanced version = 0x%x)\n", | ||
1413 | id); | ||
1388 | } | 1414 | } |
1389 | } else { | 1415 | } else { |
1390 | snd_printk("unknown CS4236/CS423xB chip (enhanced version = 0x%x)\n", id); | 1416 | snd_printk(KERN_WARNING |
1417 | "unknown CS4236/CS423xB chip " | ||
1418 | "(enhanced version = 0x%x)\n", id); | ||
1391 | } | 1419 | } |
1392 | } | 1420 | } |
1393 | } | 1421 | } |
@@ -1618,7 +1646,8 @@ static void snd_wss_resume(struct snd_wss *chip) | |||
1618 | wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | (timeout & 0x1f)); | 1646 | wss_outb(chip, CS4231P(REGSEL), chip->mce_bit | (timeout & 0x1f)); |
1619 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 1647 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
1620 | if (timeout == 0x80) | 1648 | if (timeout == 0x80) |
1621 | snd_printk("down [0x%lx]: serious init problem - codec still busy\n", chip->port); | 1649 | snd_printk(KERN_ERR "down [0x%lx]: serious init problem " |
1650 | "- codec still busy\n", chip->port); | ||
1622 | if ((timeout & CS4231_MCE) == 0 || | 1651 | if ((timeout & CS4231_MCE) == 0 || |
1623 | !(chip->hardware & (WSS_HW_CS4231_MASK | WSS_HW_CS4232_MASK))) { | 1652 | !(chip->hardware & (WSS_HW_CS4231_MASK | WSS_HW_CS4232_MASK))) { |
1624 | return; | 1653 | return; |
@@ -1820,7 +1849,8 @@ int snd_wss_create(struct snd_card *card, | |||
1820 | #if 0 | 1849 | #if 0 |
1821 | if (chip->hardware & WSS_HW_CS4232_MASK) { | 1850 | if (chip->hardware & WSS_HW_CS4232_MASK) { |
1822 | if (chip->res_cport == NULL) | 1851 | if (chip->res_cport == NULL) |
1823 | snd_printk("CS4232 control port features are not accessible\n"); | 1852 | snd_printk(KERN_ERR "CS4232 control port features are " |
1853 | "not accessible\n"); | ||
1824 | } | 1854 | } |
1825 | #endif | 1855 | #endif |
1826 | 1856 | ||