Skip to contentSkip to conversation

snd-maestro3: Fix Allegro mute until master volume/mute is touched

PATCH Applied Ondrej Zary 2 participants 2 messages Nov 1, 2015 – Nov 2, 2015 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 snd-maestro3: Fix Allegro mute until master volume/mute is touched

ESS Allegro (marked ES1989S), [125d:1988] (rev 10) is mute after loading snd-maestro3 and running alsactl restore. Touching master volume or mute makes it work.

Looks like a bug in the AC'97 codec integrated into the chip.

Write AC97_MASTER register twice to work-around the problem.

---
 sound/pci/maestro3.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
sound/pci/maestro3.c +10 -0
index 965d5c6..17ae926 100644
@@ -1929,6 +1929,16 @@ snd_m3_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
 		return;
 	snd_m3_outw(chip, val, CODEC_DATA);
 	snd_m3_outb(chip, reg & 0x7f, CODEC_COMMAND);
+	/*
+	 * Workaround for buggy ES1988 integrated AC'97 codec. It remains silent
+	 * until the MASTER volume or mute is touched (alsactl restore does not
+	 * work).
+	 */
+	if (ac97->id == 0x45838308 && reg == AC97_MASTER) {
+		snd_m3_ac97_wait(chip);
+		snd_m3_outw(chip, val, CODEC_DATA);
+		snd_m3_outb(chip, reg & 0x7f, CODEC_COMMAND);
+	}
 }
 
 
Signature · 1 line
Ondrej Zary
Applied
#1 lore raw
Quoted 10 lines · Ondrej Zary

ESS Allegro (marked ES1989S), [125d:1988] (rev 10) is mute after loading snd-maestro3 and running alsactl restore. Touching master volume or mute makes it work.

Looks like a bug in the AC'97 codec integrated into the chip.

Write AC97_MASTER register twice to work-around the problem.

Applied, thanks.

Takashi

Quoted 30 lines
---
 sound/pci/maestro3.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
sound/pci/maestro3.c +10 -0
index 965d5c6..17ae926 100644
@@ -1929,6 +1929,16 @@ snd_m3_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
 		return;
 	snd_m3_outw(chip, val, CODEC_DATA);
 	snd_m3_outb(chip, reg & 0x7f, CODEC_COMMAND);
+	/*
+	 * Workaround for buggy ES1988 integrated AC'97 codec. It remains silent
+	 * until the MASTER volume or mute is touched (alsactl restore does not
+	 * work).
+	 */
+	if (ac97->id == 0x45838308 && reg == AC97_MASTER) {
+		snd_m3_ac97_wait(chip);
+		snd_m3_outw(chip, val, CODEC_DATA);
+		snd_m3_outb(chip, reg & 0x7f, CODEC_COMMAND);
+	}
 }
 
 
Signature · 3 lines
Ondrej Zary

.