Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1260227 > unrolled thread

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

Started byOndrej Zary <linux@rainbow-software.org>
First post2015-11-01 21:00 +0100
Last post2015-11-02 08:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] snd-maestro3: Fix Allegro mute until master volume/mute is touched Ondrej Zary <linux@rainbow-software.org> - 2015-11-01 21:00 +0100
    Re: [PATCH] snd-maestro3: Fix Allegro mute until master volume/mute is touched Takashi Iwai <tiwai@suse.de> - 2015-11-02 08:50 +0100

#1260227 — [PATCH] snd-maestro3: Fix Allegro mute until master volume/mute is touched

FromOndrej Zary <linux@rainbow-software.org>
Date2015-11-01 21:00 +0100
Subject[PATCH] snd-maestro3: Fix Allegro mute until master volume/mute is touched
Message-ID<qq6Xf-45H-7@gated-at.bofh.it>
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.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
 sound/pci/maestro3.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 965d5c6..17ae926 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -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);
+	}
 }
 
 
-- 
Ondrej Zary

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1260435

FromTakashi Iwai <tiwai@suse.de>
Date2015-11-02 08:50 +0100
Message-ID<qqi2n-2yF-59@gated-at.bofh.it>
In reply to#1260227
On Sun, 01 Nov 2015 20:53:14 +0100,
Ondrej Zary wrote:
> 
> 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.
> 
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

Applied, thanks.


Takashi

> ---
>  sound/pci/maestro3.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
> index 965d5c6..17ae926 100644
> --- a/sound/pci/maestro3.c
> +++ b/sound/pci/maestro3.c
> @@ -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);
> +	}
>  }
>  
>  
> -- 
> Ondrej Zary
> 
> .
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web