diff options
-rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 34 | ||||
-rw-r--r-- | include/sound/ad1816a.h | 2 | ||||
-rw-r--r-- | include/sound/wss.h | 1 | ||||
-rw-r--r-- | sound/isa/Kconfig | 25 | ||||
-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/Makefile | 8 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4232.c | 2 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4236.c | 153 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4236_lib.c | 45 | ||||
-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 | 79 |
24 files changed, 351 insertions, 282 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 841a9365d5fd..57fe4f3ca2c0 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -346,6 +346,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
346 | sbirq - IRQ # for CMI8330 chip (SB16) | 346 | sbirq - IRQ # for CMI8330 chip (SB16) |
347 | sbdma8 - 8bit DMA # for CMI8330 chip (SB16) | 347 | sbdma8 - 8bit DMA # for CMI8330 chip (SB16) |
348 | sbdma16 - 16bit DMA # for CMI8330 chip (SB16) | 348 | sbdma16 - 16bit DMA # for CMI8330 chip (SB16) |
349 | fmport - (optional) OPL3 I/O port | ||
350 | mpuport - (optional) MPU401 I/O port | ||
351 | mpuirq - (optional) MPU401 irq # | ||
349 | 352 | ||
350 | This module supports multiple cards and autoprobe. | 353 | This module supports multiple cards and autoprobe. |
351 | 354 | ||
@@ -388,34 +391,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
388 | 391 | ||
389 | The power-management is supported. | 392 | The power-management is supported. |
390 | 393 | ||
391 | Module snd-cs4232 | ||
392 | ----------------- | ||
393 | |||
394 | Module for sound cards based on CS4232/CS4232A ISA chips. | ||
395 | |||
396 | isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) | ||
397 | |||
398 | with isapnp=0, the following options are available: | ||
399 | |||
400 | port - port # for CS4232 chip (PnP setup - 0x534) | ||
401 | cport - control port # for CS4232 chip (PnP setup - 0x120,0x210,0xf00) | ||
402 | mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable | ||
403 | fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable | ||
404 | irq - IRQ # for CS4232 chip (5,7,9,11,12,15) | ||
405 | mpu_irq - IRQ # for MPU-401 UART (9,11,12,15) | ||
406 | dma1 - first DMA # for CS4232 chip (0,1,3) | ||
407 | dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable | ||
408 | |||
409 | This module supports multiple cards. This module does not support autoprobe | ||
410 | (if ISA PnP is not used) thus main port must be specified!!! Other ports are | ||
411 | optional. | ||
412 | |||
413 | The power-management is supported. | ||
414 | |||
415 | Module snd-cs4236 | 394 | Module snd-cs4236 |
416 | ----------------- | 395 | ----------------- |
417 | 396 | ||
418 | Module for sound cards based on CS4235/CS4236/CS4236B/CS4237B/ | 397 | Module for sound cards based on CS4232/CS4232A, |
398 | CS4235/CS4236/CS4236B/CS4237B/ | ||
419 | CS4238B/CS4239 ISA chips. | 399 | CS4238B/CS4239 ISA chips. |
420 | 400 | ||
421 | isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) | 401 | isapnp - ISA PnP detection - 0 = disable, 1 = enable (default) |
@@ -437,6 +417,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
437 | 417 | ||
438 | The power-management is supported. | 418 | The power-management is supported. |
439 | 419 | ||
420 | This module is aliased as snd-cs4232 since it provides the old | ||
421 | snd-cs4232 functionality, too. | ||
422 | |||
440 | Module snd-cs4281 | 423 | Module snd-cs4281 |
441 | ----------------- | 424 | ----------------- |
442 | 425 | ||
@@ -606,6 +589,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
606 | Module for ESS AudioDrive ES-1688 and ES-688 sound cards. | 589 | Module for ESS AudioDrive ES-1688 and ES-688 sound cards. |
607 | 590 | ||
608 | port - port # for ES-1688 chip (0x220,0x240,0x260) | 591 | port - port # for ES-1688 chip (0x220,0x240,0x260) |
592 | fm_port - port # for OPL3 (option; share the same port as default) | ||
609 | mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default) | 593 | mpu_port - port # for MPU-401 port (0x300,0x310,0x320,0x330), -1 = disable (default) |
610 | irq - IRQ # for ES-1688 chip (5,7,9,10) | 594 | irq - IRQ # for ES-1688 chip (5,7,9,10) |
611 | mpu_irq - IRQ # for MPU-401 port (5,7,9,10) | 595 | mpu_irq - IRQ # for MPU-401 port (5,7,9,10) |
diff --git a/include/sound/ad1816a.h b/include/sound/ad1816a.h index b3aa62ee3c8d..d010858c33c2 100644 --- a/include/sound/ad1816a.h +++ b/include/sound/ad1816a.h | |||
@@ -169,5 +169,7 @@ extern int snd_ad1816a_create(struct snd_card *card, unsigned long port, | |||
169 | 169 | ||
170 | extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm); | 170 | extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm); |
171 | extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); | 171 | extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); |
172 | extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, | ||
173 | struct snd_timer **rtimer); | ||
172 | 174 | ||
173 | #endif /* __SOUND_AD1816A_H */ | 175 | #endif /* __SOUND_AD1816A_H */ |
diff --git a/include/sound/wss.h b/include/sound/wss.h index fd01f22825cd..6d65f322f1d5 100644 --- a/include/sound/wss.h +++ b/include/sound/wss.h | |||
@@ -154,6 +154,7 @@ int snd_wss_create(struct snd_card *card, | |||
154 | unsigned short hardware, | 154 | unsigned short hardware, |
155 | unsigned short hwshare, | 155 | unsigned short hwshare, |
156 | struct snd_wss **rchip); | 156 | struct snd_wss **rchip); |
157 | int snd_wss_free(struct snd_wss *chip); | ||
157 | int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); | 158 | int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); |
158 | int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer); | 159 | int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer); |
159 | int snd_wss_mixer(struct snd_wss *chip); | 160 | int snd_wss_mixer(struct snd_wss *chip); |
diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig index ce0aa044e274..4e06bbd9298d 100644 --- a/sound/isa/Kconfig +++ b/sound/isa/Kconfig | |||
@@ -56,8 +56,8 @@ config SND_AD1848 | |||
56 | Say Y here to include support for AD1848 (Analog Devices) or | 56 | Say Y here to include support for AD1848 (Analog Devices) or |
57 | CS4248 (Cirrus Logic - Crystal Semiconductors) chips. | 57 | CS4248 (Cirrus Logic - Crystal Semiconductors) chips. |
58 | 58 | ||
59 | For newer chips from Cirrus Logic, use the CS4231, CS4232 or | 59 | For newer chips from Cirrus Logic, use the CS4231 or CS4232+ |
60 | CS4236+ drivers. | 60 | drivers. |
61 | 61 | ||
62 | To compile this driver as a module, choose M here: the module | 62 | To compile this driver as a module, choose M here: the module |
63 | will be called snd-ad1848. | 63 | will be called snd-ad1848. |
@@ -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. |
@@ -112,26 +114,15 @@ config SND_CS4231 | |||
112 | To compile this driver as a module, choose M here: the module | 114 | To compile this driver as a module, choose M here: the module |
113 | will be called snd-cs4231. | 115 | will be called snd-cs4231. |
114 | 116 | ||
115 | config SND_CS4232 | ||
116 | tristate "Generic Cirrus Logic CS4232 driver" | ||
117 | select SND_OPL3_LIB | ||
118 | select SND_MPU401_UART | ||
119 | select SND_WSS_LIB | ||
120 | help | ||
121 | Say Y here to include support for CS4232 chips from Cirrus | ||
122 | Logic - Crystal Semiconductors. | ||
123 | |||
124 | To compile this driver as a module, choose M here: the module | ||
125 | will be called snd-cs4232. | ||
126 | |||
127 | config SND_CS4236 | 117 | config SND_CS4236 |
128 | tristate "Generic Cirrus Logic CS4236+ driver" | 118 | tristate "Generic Cirrus Logic CS4232/CS4236+ driver" |
129 | select SND_OPL3_LIB | 119 | select SND_OPL3_LIB |
130 | select SND_MPU401_UART | 120 | select SND_MPU401_UART |
131 | select SND_WSS_LIB | 121 | select SND_WSS_LIB |
132 | help | 122 | help |
133 | Say Y to include support for CS4235,CS4236,CS4237B,CS4238B, | 123 | Say Y to include support for CS4232,CS4235,CS4236,CS4237B, |
134 | CS4239 chips from Cirrus Logic - Crystal Semiconductors. | 124 | CS4238B,CS4239 chips from Cirrus Logic - Crystal |
125 | Semiconductors. | ||
135 | 126 | ||
136 | To compile this driver as a module, choose M here: the module | 127 | To compile this driver as a module, choose M here: the module |
137 | will be called snd-cs4236. | 128 | will be called snd-cs4236. |
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/Makefile b/sound/isa/cs423x/Makefile index 5870ca21ab59..6d397e8d54ac 100644 --- a/sound/isa/cs423x/Makefile +++ b/sound/isa/cs423x/Makefile | |||
@@ -3,13 +3,11 @@ | |||
3 | # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz> | 3 | # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz> |
4 | # | 4 | # |
5 | 5 | ||
6 | snd-cs4236-lib-objs := cs4236_lib.o | ||
7 | snd-cs4231-objs := cs4231.o | 6 | snd-cs4231-objs := cs4231.o |
8 | snd-cs4232-objs := cs4232.o | 7 | snd-cs4236-objs := cs4236.o cs4236_lib.o |
9 | snd-cs4236-objs := cs4236.o | ||
10 | 8 | ||
11 | # Toplevel Module Dependency | 9 | # Toplevel Module Dependency |
12 | obj-$(CONFIG_SND_CS4231) += snd-cs4231.o | 10 | obj-$(CONFIG_SND_CS4231) += snd-cs4231.o |
13 | obj-$(CONFIG_SND_CS4232) += snd-cs4232.o | 11 | obj-$(CONFIG_SND_CS4236) += snd-cs4236.o |
14 | obj-$(CONFIG_SND_CS4236) += snd-cs4236.o snd-cs4236-lib.o | 12 | |
15 | 13 | ||
diff --git a/sound/isa/cs423x/cs4232.c b/sound/isa/cs423x/cs4232.c deleted file mode 100644 index 9fad2e6c0c2c..000000000000 --- a/sound/isa/cs423x/cs4232.c +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #define CS4232 | ||
2 | #include "cs4236.c" | ||
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index f7845986f467..a076a6ce8071 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -33,17 +33,14 @@ | |||
33 | 33 | ||
34 | MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>"); | 34 | MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>"); |
35 | MODULE_LICENSE("GPL"); | 35 | MODULE_LICENSE("GPL"); |
36 | #ifdef CS4232 | 36 | MODULE_DESCRIPTION("Cirrus Logic CS4232-9"); |
37 | MODULE_DESCRIPTION("Cirrus Logic CS4232"); | ||
38 | MODULE_SUPPORTED_DEVICE("{{Turtle Beach,TBS-2000}," | 37 | MODULE_SUPPORTED_DEVICE("{{Turtle Beach,TBS-2000}," |
39 | "{Turtle Beach,Tropez Plus}," | 38 | "{Turtle Beach,Tropez Plus}," |
40 | "{SIC CrystalWave 32}," | 39 | "{SIC CrystalWave 32}," |
41 | "{Hewlett Packard,Omnibook 5500}," | 40 | "{Hewlett Packard,Omnibook 5500}," |
42 | "{TerraTec,Maestro 32/96}," | 41 | "{TerraTec,Maestro 32/96}," |
43 | "{Philips,PCA70PS}}"); | 42 | "{Philips,PCA70PS}}," |
44 | #else | 43 | "{{Crystal Semiconductors,CS4235}," |
45 | MODULE_DESCRIPTION("Cirrus Logic CS4235-9"); | ||
46 | MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4235}," | ||
47 | "{Crystal Semiconductors,CS4236}," | 44 | "{Crystal Semiconductors,CS4236}," |
48 | "{Crystal Semiconductors,CS4237}," | 45 | "{Crystal Semiconductors,CS4237}," |
49 | "{Crystal Semiconductors,CS4238}," | 46 | "{Crystal Semiconductors,CS4238}," |
@@ -70,15 +67,11 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4235}," | |||
70 | "{Typhoon Soundsystem,CS4236B}," | 67 | "{Typhoon Soundsystem,CS4236B}," |
71 | "{Turtle Beach,Malibu}," | 68 | "{Turtle Beach,Malibu}," |
72 | "{Unknown,Digital PC 5000 Onboard}}"); | 69 | "{Unknown,Digital PC 5000 Onboard}}"); |
73 | #endif | ||
74 | 70 | ||
75 | #ifdef CS4232 | 71 | MODULE_ALIAS("snd_cs4232"); |
76 | #define IDENT "CS4232" | 72 | |
77 | #define DEV_NAME "cs4232" | 73 | #define IDENT "CS4232+" |
78 | #else | 74 | #define DEV_NAME "cs4232+" |
79 | #define IDENT "CS4236+" | ||
80 | #define DEV_NAME "cs4236" | ||
81 | #endif | ||
82 | 75 | ||
83 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ | 76 | static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ |
84 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ | 77 | static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ |
@@ -128,9 +121,7 @@ MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); | |||
128 | #ifdef CONFIG_PNP | 121 | #ifdef CONFIG_PNP |
129 | static int isa_registered; | 122 | static int isa_registered; |
130 | static int pnpc_registered; | 123 | static int pnpc_registered; |
131 | #ifdef CS4232 | ||
132 | static int pnp_registered; | 124 | static int pnp_registered; |
133 | #endif | ||
134 | #endif /* CONFIG_PNP */ | 125 | #endif /* CONFIG_PNP */ |
135 | 126 | ||
136 | struct snd_card_cs4236 { | 127 | struct snd_card_cs4236 { |
@@ -145,11 +136,10 @@ struct snd_card_cs4236 { | |||
145 | 136 | ||
146 | #ifdef CONFIG_PNP | 137 | #ifdef CONFIG_PNP |
147 | 138 | ||
148 | #ifdef CS4232 | ||
149 | /* | 139 | /* |
150 | * PNP BIOS | 140 | * PNP BIOS |
151 | */ | 141 | */ |
152 | static const struct pnp_device_id snd_cs4232_pnpbiosids[] = { | 142 | static const struct pnp_device_id snd_cs423x_pnpbiosids[] = { |
153 | { .id = "CSC0100" }, | 143 | { .id = "CSC0100" }, |
154 | { .id = "CSC0000" }, | 144 | { .id = "CSC0000" }, |
155 | /* Guillemot Turtlebeach something appears to be cs4232 compatible | 145 | /* Guillemot Turtlebeach something appears to be cs4232 compatible |
@@ -157,10 +147,8 @@ static const struct pnp_device_id snd_cs4232_pnpbiosids[] = { | |||
157 | { .id = "GIM0100" }, | 147 | { .id = "GIM0100" }, |
158 | { .id = "" } | 148 | { .id = "" } |
159 | }; | 149 | }; |
160 | MODULE_DEVICE_TABLE(pnp, snd_cs4232_pnpbiosids); | 150 | MODULE_DEVICE_TABLE(pnp, snd_cs423x_pnpbiosids); |
161 | #endif /* CS4232 */ | ||
162 | 151 | ||
163 | #ifdef CS4232 | ||
164 | #define CS423X_ISAPNP_DRIVER "cs4232_isapnp" | 152 | #define CS423X_ISAPNP_DRIVER "cs4232_isapnp" |
165 | static struct pnp_card_device_id snd_cs423x_pnpids[] = { | 153 | static struct pnp_card_device_id snd_cs423x_pnpids[] = { |
166 | /* Philips PCA70PS */ | 154 | /* Philips PCA70PS */ |
@@ -179,12 +167,6 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = { | |||
179 | { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, | 167 | { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, |
180 | /* Netfinity 3000 on-board soundcard */ | 168 | /* Netfinity 3000 on-board soundcard */ |
181 | { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } }, | 169 | { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } }, |
182 | /* --- */ | ||
183 | { .id = "" } /* end */ | ||
184 | }; | ||
185 | #else /* CS4236 */ | ||
186 | #define CS423X_ISAPNP_DRIVER "cs4236_isapnp" | ||
187 | static struct pnp_card_device_id snd_cs423x_pnpids[] = { | ||
188 | /* Intel Marlin Spike Motherboard - CS4235 */ | 170 | /* Intel Marlin Spike Motherboard - CS4235 */ |
189 | { .id = "CSC0225", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, | 171 | { .id = "CSC0225", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, |
190 | /* Intel Marlin Spike Motherboard (#2) - CS4235 */ | 172 | /* Intel Marlin Spike Motherboard (#2) - CS4235 */ |
@@ -266,7 +248,6 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = { | |||
266 | /* --- */ | 248 | /* --- */ |
267 | { .id = "" } /* end */ | 249 | { .id = "" } /* end */ |
268 | }; | 250 | }; |
269 | #endif | ||
270 | 251 | ||
271 | MODULE_DEVICE_TABLE(pnp_card, snd_cs423x_pnpids); | 252 | MODULE_DEVICE_TABLE(pnp_card, snd_cs423x_pnpids); |
272 | 253 | ||
@@ -323,17 +304,19 @@ static int __devinit snd_cs423x_pnp_init_mpu(int dev, struct pnp_dev *pdev) | |||
323 | return 0; | 304 | return 0; |
324 | } | 305 | } |
325 | 306 | ||
326 | #ifdef CS4232 | 307 | static int __devinit snd_card_cs423x_pnp(int dev, struct snd_card_cs4236 *acard, |
327 | static int __devinit snd_card_cs4232_pnp(int dev, struct snd_card_cs4236 *acard, | 308 | struct pnp_dev *pdev, |
328 | struct pnp_dev *pdev) | 309 | struct pnp_dev *cdev) |
329 | { | 310 | { |
330 | acard->wss = pdev; | 311 | acard->wss = pdev; |
331 | if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0) | 312 | if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0) |
332 | return -EBUSY; | 313 | return -EBUSY; |
333 | cport[dev] = -1; | 314 | if (cdev) |
315 | cport[dev] = pnp_port_start(cdev, 0); | ||
316 | else | ||
317 | cport[dev] = -1; | ||
334 | return 0; | 318 | return 0; |
335 | } | 319 | } |
336 | #endif | ||
337 | 320 | ||
338 | static int __devinit snd_card_cs423x_pnpc(int dev, struct snd_card_cs4236 *acard, | 321 | static int __devinit snd_card_cs423x_pnpc(int dev, struct snd_card_cs4236 *acard, |
339 | struct pnp_card_link *card, | 322 | struct pnp_card_link *card, |
@@ -411,40 +394,39 @@ static int __devinit snd_cs423x_probe(struct snd_card *card, int dev) | |||
411 | return -EBUSY; | 394 | return -EBUSY; |
412 | } | 395 | } |
413 | 396 | ||
414 | #ifdef CS4232 | ||
415 | err = snd_wss_create(card, port[dev], cport[dev], | 397 | err = snd_wss_create(card, port[dev], cport[dev], |
416 | irq[dev], | 398 | irq[dev], |
417 | dma1[dev], dma2[dev], | 399 | dma1[dev], dma2[dev], |
418 | WSS_HW_DETECT, 0, &chip); | 400 | WSS_HW_DETECT3, 0, &chip); |
419 | if (err < 0) | ||
420 | return err; | ||
421 | acard->chip = chip; | ||
422 | |||
423 | err = snd_wss_pcm(chip, 0, &pcm); | ||
424 | if (err < 0) | ||
425 | return err; | ||
426 | |||
427 | err = snd_wss_mixer(chip); | ||
428 | if (err < 0) | 401 | if (err < 0) |
429 | return err; | 402 | return err; |
430 | 403 | if (chip->hardware & WSS_HW_CS4236B_MASK) { | |
431 | #else /* CS4236 */ | 404 | snd_wss_free(chip); |
432 | err = snd_cs4236_create(card, | 405 | err = snd_cs4236_create(card, |
433 | port[dev], cport[dev], | 406 | port[dev], cport[dev], |
434 | irq[dev], dma1[dev], dma2[dev], | 407 | irq[dev], dma1[dev], dma2[dev], |
435 | WSS_HW_DETECT, 0, &chip); | 408 | WSS_HW_DETECT, 0, &chip); |
436 | if (err < 0) | 409 | if (err < 0) |
437 | return err; | 410 | return err; |
438 | acard->chip = chip; | 411 | acard->chip = chip; |
439 | 412 | ||
440 | err = snd_cs4236_pcm(chip, 0, &pcm); | 413 | err = snd_cs4236_pcm(chip, 0, &pcm); |
441 | if (err < 0) | 414 | if (err < 0) |
442 | return err; | 415 | return err; |
443 | 416 | ||
444 | err = snd_cs4236_mixer(chip); | 417 | err = snd_cs4236_mixer(chip); |
445 | if (err < 0) | 418 | if (err < 0) |
446 | return err; | 419 | return err; |
447 | #endif | 420 | } else { |
421 | acard->chip = chip; | ||
422 | err = snd_wss_pcm(chip, 0, &pcm); | ||
423 | if (err < 0) | ||
424 | return err; | ||
425 | |||
426 | err = snd_wss_mixer(chip); | ||
427 | if (err < 0) | ||
428 | return err; | ||
429 | } | ||
448 | strcpy(card->driver, pcm->name); | 430 | strcpy(card->driver, pcm->name); |
449 | strcpy(card->shortname, pcm->name); | 431 | strcpy(card->shortname, pcm->name); |
450 | sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", | 432 | sprintf(card->longname, "%s at 0x%lx, irq %i, dma %i", |
@@ -579,13 +561,14 @@ static struct isa_driver cs423x_isa_driver = { | |||
579 | 561 | ||
580 | 562 | ||
581 | #ifdef CONFIG_PNP | 563 | #ifdef CONFIG_PNP |
582 | #ifdef CS4232 | 564 | static int __devinit snd_cs423x_pnpbios_detect(struct pnp_dev *pdev, |
583 | static int __devinit snd_cs4232_pnpbios_detect(struct pnp_dev *pdev, | ||
584 | const struct pnp_device_id *id) | 565 | const struct pnp_device_id *id) |
585 | { | 566 | { |
586 | static int dev; | 567 | static int dev; |
587 | int err; | 568 | int err; |
588 | struct snd_card *card; | 569 | struct snd_card *card; |
570 | struct pnp_dev *cdev; | ||
571 | char cid[PNP_ID_LEN]; | ||
589 | 572 | ||
590 | if (pnp_device_is_isapnp(pdev)) | 573 | if (pnp_device_is_isapnp(pdev)) |
591 | return -ENOENT; /* we have another procedure - card */ | 574 | return -ENOENT; /* we have another procedure - card */ |
@@ -596,10 +579,19 @@ static int __devinit snd_cs4232_pnpbios_detect(struct pnp_dev *pdev, | |||
596 | if (dev >= SNDRV_CARDS) | 579 | if (dev >= SNDRV_CARDS) |
597 | return -ENODEV; | 580 | return -ENODEV; |
598 | 581 | ||
582 | /* prepare second id */ | ||
583 | strcpy(cid, pdev->id[0].id); | ||
584 | cid[5] = '1'; | ||
585 | cdev = NULL; | ||
586 | list_for_each_entry(cdev, &(pdev->protocol->devices), protocol_list) { | ||
587 | if (!strcmp(cdev->id[0].id, cid)) | ||
588 | break; | ||
589 | } | ||
599 | err = snd_cs423x_card_new(dev, &card); | 590 | err = snd_cs423x_card_new(dev, &card); |
600 | if (err < 0) | 591 | if (err < 0) |
601 | return err; | 592 | return err; |
602 | if ((err = snd_card_cs4232_pnp(dev, card->private_data, pdev)) < 0) { | 593 | err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev); |
594 | if (err < 0) { | ||
603 | printk(KERN_ERR "PnP BIOS detection failed for " IDENT "\n"); | 595 | printk(KERN_ERR "PnP BIOS detection failed for " IDENT "\n"); |
604 | snd_card_free(card); | 596 | snd_card_free(card); |
605 | return err; | 597 | return err; |
@@ -614,35 +606,34 @@ static int __devinit snd_cs4232_pnpbios_detect(struct pnp_dev *pdev, | |||
614 | return 0; | 606 | return 0; |
615 | } | 607 | } |
616 | 608 | ||
617 | static void __devexit snd_cs4232_pnp_remove(struct pnp_dev * pdev) | 609 | static void __devexit snd_cs423x_pnp_remove(struct pnp_dev *pdev) |
618 | { | 610 | { |
619 | snd_card_free(pnp_get_drvdata(pdev)); | 611 | snd_card_free(pnp_get_drvdata(pdev)); |
620 | pnp_set_drvdata(pdev, NULL); | 612 | pnp_set_drvdata(pdev, NULL); |
621 | } | 613 | } |
622 | 614 | ||
623 | #ifdef CONFIG_PM | 615 | #ifdef CONFIG_PM |
624 | static int snd_cs4232_pnp_suspend(struct pnp_dev *pdev, pm_message_t state) | 616 | static int snd_cs423x_pnp_suspend(struct pnp_dev *pdev, pm_message_t state) |
625 | { | 617 | { |
626 | return snd_cs423x_suspend(pnp_get_drvdata(pdev)); | 618 | return snd_cs423x_suspend(pnp_get_drvdata(pdev)); |
627 | } | 619 | } |
628 | 620 | ||
629 | static int snd_cs4232_pnp_resume(struct pnp_dev *pdev) | 621 | static int snd_cs423x_pnp_resume(struct pnp_dev *pdev) |
630 | { | 622 | { |
631 | return snd_cs423x_resume(pnp_get_drvdata(pdev)); | 623 | return snd_cs423x_resume(pnp_get_drvdata(pdev)); |
632 | } | 624 | } |
633 | #endif | 625 | #endif |
634 | 626 | ||
635 | static struct pnp_driver cs4232_pnp_driver = { | 627 | static struct pnp_driver cs423x_pnp_driver = { |
636 | .name = "cs4232-pnpbios", | 628 | .name = "cs423x-pnpbios", |
637 | .id_table = snd_cs4232_pnpbiosids, | 629 | .id_table = snd_cs423x_pnpbiosids, |
638 | .probe = snd_cs4232_pnpbios_detect, | 630 | .probe = snd_cs423x_pnpbios_detect, |
639 | .remove = __devexit_p(snd_cs4232_pnp_remove), | 631 | .remove = __devexit_p(snd_cs423x_pnp_remove), |
640 | #ifdef CONFIG_PM | 632 | #ifdef CONFIG_PM |
641 | .suspend = snd_cs4232_pnp_suspend, | 633 | .suspend = snd_cs423x_pnp_suspend, |
642 | .resume = snd_cs4232_pnp_resume, | 634 | .resume = snd_cs423x_pnp_resume, |
643 | #endif | 635 | #endif |
644 | }; | 636 | }; |
645 | #endif /* CS4232 */ | ||
646 | 637 | ||
647 | static int __devinit snd_cs423x_pnpc_detect(struct pnp_card_link *pcard, | 638 | static int __devinit snd_cs423x_pnpc_detect(struct pnp_card_link *pcard, |
648 | const struct pnp_card_device_id *pid) | 639 | const struct pnp_card_device_id *pid) |
@@ -716,18 +707,14 @@ static int __init alsa_card_cs423x_init(void) | |||
716 | #ifdef CONFIG_PNP | 707 | #ifdef CONFIG_PNP |
717 | if (!err) | 708 | if (!err) |
718 | isa_registered = 1; | 709 | isa_registered = 1; |
719 | #ifdef CS4232 | 710 | err = pnp_register_driver(&cs423x_pnp_driver); |
720 | err = pnp_register_driver(&cs4232_pnp_driver); | ||
721 | if (!err) | 711 | if (!err) |
722 | pnp_registered = 1; | 712 | pnp_registered = 1; |
723 | #endif | ||
724 | err = pnp_register_card_driver(&cs423x_pnpc_driver); | 713 | err = pnp_register_card_driver(&cs423x_pnpc_driver); |
725 | if (!err) | 714 | if (!err) |
726 | pnpc_registered = 1; | 715 | pnpc_registered = 1; |
727 | #ifdef CS4232 | ||
728 | if (pnp_registered) | 716 | if (pnp_registered) |
729 | err = 0; | 717 | err = 0; |
730 | #endif | ||
731 | if (isa_registered) | 718 | if (isa_registered) |
732 | err = 0; | 719 | err = 0; |
733 | #endif | 720 | #endif |
@@ -739,10 +726,8 @@ static void __exit alsa_card_cs423x_exit(void) | |||
739 | #ifdef CONFIG_PNP | 726 | #ifdef CONFIG_PNP |
740 | if (pnpc_registered) | 727 | if (pnpc_registered) |
741 | pnp_unregister_card_driver(&cs423x_pnpc_driver); | 728 | pnp_unregister_card_driver(&cs423x_pnpc_driver); |
742 | #ifdef CS4232 | ||
743 | if (pnp_registered) | 729 | if (pnp_registered) |
744 | pnp_unregister_driver(&cs4232_pnp_driver); | 730 | pnp_unregister_driver(&cs423x_pnp_driver); |
745 | #endif | ||
746 | if (isa_registered) | 731 | if (isa_registered) |
747 | #endif | 732 | #endif |
748 | isa_unregister_driver(&cs423x_isa_driver); | 733 | isa_unregister_driver(&cs423x_isa_driver); |
diff --git a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c index 6a85fdc53b60..38835f31298b 100644 --- a/sound/isa/cs423x/cs4236_lib.c +++ b/sound/isa/cs423x/cs4236_lib.c | |||
@@ -88,10 +88,6 @@ | |||
88 | #include <sound/wss.h> | 88 | #include <sound/wss.h> |
89 | #include <sound/asoundef.h> | 89 | #include <sound/asoundef.h> |
90 | 90 | ||
91 | MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>"); | ||
92 | MODULE_DESCRIPTION("Routines for control of CS4235/4236B/4237B/4238B/4239 chips"); | ||
93 | MODULE_LICENSE("GPL"); | ||
94 | |||
95 | /* | 91 | /* |
96 | * | 92 | * |
97 | */ | 93 | */ |
@@ -286,7 +282,8 @@ int snd_cs4236_create(struct snd_card *card, | |||
286 | if (hardware == WSS_HW_DETECT) | 282 | if (hardware == WSS_HW_DETECT) |
287 | hardware = WSS_HW_DETECT3; | 283 | hardware = WSS_HW_DETECT3; |
288 | if (cport < 0x100) { | 284 | if (cport < 0x100) { |
289 | snd_printk("please, specify control port for CS4236+ chips\n"); | 285 | snd_printk(KERN_ERR "please, specify control port " |
286 | "for CS4236+ chips\n"); | ||
290 | return -ENODEV; | 287 | return -ENODEV; |
291 | } | 288 | } |
292 | err = snd_wss_create(card, port, cport, | 289 | err = snd_wss_create(card, port, cport, |
@@ -295,7 +292,8 @@ int snd_cs4236_create(struct snd_card *card, | |||
295 | return err; | 292 | return err; |
296 | 293 | ||
297 | if (!(chip->hardware & WSS_HW_CS4236B_MASK)) { | 294 | if (!(chip->hardware & WSS_HW_CS4236B_MASK)) { |
298 | snd_printk("CS4236+: MODE3 and extended registers not available, hardware=0x%x\n",chip->hardware); | 295 | snd_printk(KERN_ERR "CS4236+: MODE3 and extended registers " |
296 | "not available, hardware=0x%x\n", chip->hardware); | ||
299 | snd_device_free(card, chip); | 297 | snd_device_free(card, chip); |
300 | return -ENODEV; | 298 | return -ENODEV; |
301 | } | 299 | } |
@@ -303,16 +301,19 @@ int snd_cs4236_create(struct snd_card *card, | |||
303 | { | 301 | { |
304 | int idx; | 302 | int idx; |
305 | for (idx = 0; idx < 8; idx++) | 303 | for (idx = 0; idx < 8; idx++) |
306 | snd_printk("CD%i = 0x%x\n", idx, inb(chip->cport + idx)); | 304 | snd_printk(KERN_DEBUG "CD%i = 0x%x\n", |
305 | idx, inb(chip->cport + idx)); | ||
307 | for (idx = 0; idx < 9; idx++) | 306 | for (idx = 0; idx < 9; idx++) |
308 | snd_printk("C%i = 0x%x\n", idx, snd_cs4236_ctrl_in(chip, idx)); | 307 | snd_printk(KERN_DEBUG "C%i = 0x%x\n", |
308 | idx, snd_cs4236_ctrl_in(chip, idx)); | ||
309 | } | 309 | } |
310 | #endif | 310 | #endif |
311 | ver1 = snd_cs4236_ctrl_in(chip, 1); | 311 | ver1 = snd_cs4236_ctrl_in(chip, 1); |
312 | ver2 = snd_cs4236_ext_in(chip, CS4236_VERSION); | 312 | 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); | 313 | snd_printdd("CS4236: [0x%lx] C1 (version) = 0x%x, ext = 0x%x\n", cport, ver1, ver2); |
314 | if (ver1 != ver2) { | 314 | if (ver1 != ver2) { |
315 | snd_printk("CS4236+ chip detected, but control port 0x%lx is not valid\n", cport); | 315 | snd_printk(KERN_ERR "CS4236+ chip detected, but " |
316 | "control port 0x%lx is not valid\n", cport); | ||
316 | snd_device_free(card, chip); | 317 | snd_device_free(card, chip); |
317 | return -ENODEV; | 318 | return -ENODEV; |
318 | } | 319 | } |
@@ -883,7 +884,8 @@ static int snd_cs4236_get_iec958_switch(struct snd_kcontrol *kcontrol, struct sn | |||
883 | spin_lock_irqsave(&chip->reg_lock, flags); | 884 | spin_lock_irqsave(&chip->reg_lock, flags); |
884 | ucontrol->value.integer.value[0] = chip->image[CS4231_ALT_FEATURE_1] & 0x02 ? 1 : 0; | 885 | ucontrol->value.integer.value[0] = chip->image[CS4231_ALT_FEATURE_1] & 0x02 ? 1 : 0; |
885 | #if 0 | 886 | #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", | 887 | printk(KERN_DEBUG "get valid: ALT = 0x%x, C3 = 0x%x, C4 = 0x%x, " |
888 | "C5 = 0x%x, C6 = 0x%x, C8 = 0x%x\n", | ||
887 | snd_wss_in(chip, CS4231_ALT_FEATURE_1), | 889 | snd_wss_in(chip, CS4231_ALT_FEATURE_1), |
888 | snd_cs4236_ctrl_in(chip, 3), | 890 | snd_cs4236_ctrl_in(chip, 3), |
889 | snd_cs4236_ctrl_in(chip, 4), | 891 | snd_cs4236_ctrl_in(chip, 4), |
@@ -920,7 +922,8 @@ static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct sn | |||
920 | mutex_unlock(&chip->mce_mutex); | 922 | mutex_unlock(&chip->mce_mutex); |
921 | 923 | ||
922 | #if 0 | 924 | #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", | 925 | printk(KERN_DEBUG "set valid: ALT = 0x%x, C3 = 0x%x, C4 = 0x%x, " |
926 | "C5 = 0x%x, C6 = 0x%x, C8 = 0x%x\n", | ||
924 | snd_wss_in(chip, CS4231_ALT_FEATURE_1), | 927 | snd_wss_in(chip, CS4231_ALT_FEATURE_1), |
925 | snd_cs4236_ctrl_in(chip, 3), | 928 | snd_cs4236_ctrl_in(chip, 3), |
926 | snd_cs4236_ctrl_in(chip, 4), | 929 | snd_cs4236_ctrl_in(chip, 4), |
@@ -1015,23 +1018,3 @@ int snd_cs4236_mixer(struct snd_wss *chip) | |||
1015 | } | 1018 | } |
1016 | return 0; | 1019 | return 0; |
1017 | } | 1020 | } |
1018 | |||
1019 | EXPORT_SYMBOL(snd_cs4236_create); | ||
1020 | EXPORT_SYMBOL(snd_cs4236_pcm); | ||
1021 | EXPORT_SYMBOL(snd_cs4236_mixer); | ||
1022 | |||
1023 | /* | ||
1024 | * INIT part | ||
1025 | */ | ||
1026 | |||
1027 | static int __init alsa_cs4236_init(void) | ||
1028 | { | ||
1029 | return 0; | ||
1030 | } | ||
1031 | |||
1032 | static void __exit alsa_cs4236_exit(void) | ||
1033 | { | ||
1034 | } | ||
1035 | |||
1036 | module_init(alsa_cs4236_init) | ||
1037 | module_exit(alsa_cs4236_exit) | ||
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 63e51373ddc7..9c5fce31f06b 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..ac27832b2c6f 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; |
@@ -1628,7 +1657,7 @@ static void snd_wss_resume(struct snd_wss *chip) | |||
1628 | } | 1657 | } |
1629 | #endif /* CONFIG_PM */ | 1658 | #endif /* CONFIG_PM */ |
1630 | 1659 | ||
1631 | static int snd_wss_free(struct snd_wss *chip) | 1660 | int snd_wss_free(struct snd_wss *chip) |
1632 | { | 1661 | { |
1633 | release_and_free_resource(chip->res_port); | 1662 | release_and_free_resource(chip->res_port); |
1634 | release_and_free_resource(chip->res_cport); | 1663 | release_and_free_resource(chip->res_cport); |
@@ -1651,6 +1680,7 @@ static int snd_wss_free(struct snd_wss *chip) | |||
1651 | kfree(chip); | 1680 | kfree(chip); |
1652 | return 0; | 1681 | return 0; |
1653 | } | 1682 | } |
1683 | EXPORT_SYMBOL(snd_wss_free); | ||
1654 | 1684 | ||
1655 | static int snd_wss_dev_free(struct snd_device *device) | 1685 | static int snd_wss_dev_free(struct snd_device *device) |
1656 | { | 1686 | { |
@@ -1820,7 +1850,8 @@ int snd_wss_create(struct snd_card *card, | |||
1820 | #if 0 | 1850 | #if 0 |
1821 | if (chip->hardware & WSS_HW_CS4232_MASK) { | 1851 | if (chip->hardware & WSS_HW_CS4232_MASK) { |
1822 | if (chip->res_cport == NULL) | 1852 | if (chip->res_cport == NULL) |
1823 | snd_printk("CS4232 control port features are not accessible\n"); | 1853 | snd_printk(KERN_ERR "CS4232 control port features are " |
1854 | "not accessible\n"); | ||
1824 | } | 1855 | } |
1825 | #endif | 1856 | #endif |
1826 | 1857 | ||