diff options
Diffstat (limited to 'sound/isa/cs423x/cs4236_lib.c')
-rw-r--r-- | sound/isa/cs423x/cs4236_lib.c | 45 |
1 files changed, 14 insertions, 31 deletions
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) | ||