Commit f83a59c3 authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Jaroslav Kysela

ALSA: wss_lib: do not mess mixer settings during probe

Use the wss_dout function which does not mess
shadowed register values during chip probing.
Otherwise, user ends up with stupid mixer settings
after driver loading.
Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: default avatarRene Herman <rene.herman@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 36463a96
...@@ -1162,9 +1162,9 @@ static int snd_ad1848_probe(struct snd_wss *chip) ...@@ -1162,9 +1162,9 @@ static int snd_ad1848_probe(struct snd_wss *chip)
spin_lock_irqsave(&chip->reg_lock, flags); spin_lock_irqsave(&chip->reg_lock, flags);
/* set CS423x MODE 1 */ /* set CS423x MODE 1 */
snd_wss_out(chip, CS4231_MISC_INFO, 0); snd_wss_dout(chip, CS4231_MISC_INFO, 0);
snd_wss_out(chip, CS4231_RIGHT_INPUT, 0x45); /* 0x55 & ~0x10 */ snd_wss_dout(chip, CS4231_RIGHT_INPUT, 0x45); /* 0x55 & ~0x10 */
r = snd_wss_in(chip, CS4231_RIGHT_INPUT); r = snd_wss_in(chip, CS4231_RIGHT_INPUT);
if (r != 0x45) { if (r != 0x45) {
/* RMGE always high on AD1847 */ /* RMGE always high on AD1847 */
...@@ -1174,7 +1174,7 @@ static int snd_ad1848_probe(struct snd_wss *chip) ...@@ -1174,7 +1174,7 @@ static int snd_ad1848_probe(struct snd_wss *chip)
} }
hardware = WSS_HW_AD1847; hardware = WSS_HW_AD1847;
} else { } else {
snd_wss_out(chip, CS4231_LEFT_INPUT, 0xaa); snd_wss_dout(chip, CS4231_LEFT_INPUT, 0xaa);
r = snd_wss_in(chip, CS4231_LEFT_INPUT); r = snd_wss_in(chip, CS4231_LEFT_INPUT);
/* L/RMGE always low on AT2320 */ /* L/RMGE always low on AT2320 */
if ((r | CS4231_ENABLE_MIC_GAIN) != 0xaa) { if ((r | CS4231_ENABLE_MIC_GAIN) != 0xaa) {
...@@ -1199,7 +1199,7 @@ static int snd_ad1848_probe(struct snd_wss *chip) ...@@ -1199,7 +1199,7 @@ static int snd_ad1848_probe(struct snd_wss *chip)
r = snd_wss_in(chip, CS4231_MISC_INFO); r = snd_wss_in(chip, CS4231_MISC_INFO);
/* set CS423x MODE 2 */ /* set CS423x MODE 2 */
snd_wss_out(chip, CS4231_MISC_INFO, CS4231_MODE2); snd_wss_dout(chip, CS4231_MISC_INFO, CS4231_MODE2);
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
if (snd_wss_in(chip, i) != snd_wss_in(chip, 16 + i)) { if (snd_wss_in(chip, i) != snd_wss_in(chip, 16 + i)) {
/* we have more than 16 registers: check ID */ /* we have more than 16 registers: check ID */
...@@ -1221,7 +1221,7 @@ static int snd_ad1848_probe(struct snd_wss *chip) ...@@ -1221,7 +1221,7 @@ static int snd_ad1848_probe(struct snd_wss *chip)
else else
chip->hardware = WSS_HW_AD1848; chip->hardware = WSS_HW_AD1848;
out_mode: out_mode:
snd_wss_out(chip, CS4231_MISC_INFO, 0); snd_wss_dout(chip, CS4231_MISC_INFO, 0);
out: out:
spin_unlock_irqrestore(&chip->reg_lock, flags); spin_unlock_irqrestore(&chip->reg_lock, flags);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment