From 5ea48b20277374e23a1cf3208cfdd2153f7fc25a Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 1 Apr 2025 06:42:51 +0200 Subject: [PATCH] Correct the fix. --- src/sound/snd_ac97_codec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sound/snd_ac97_codec.c b/src/sound/snd_ac97_codec.c index ad535591f..e92830f67 100644 --- a/src/sound/snd_ac97_codec.c +++ b/src/sound/snd_ac97_codec.c @@ -537,11 +537,10 @@ ac97_codec_getattn(void *priv, uint8_t reg, int *l, int *r) uint8_t r_val = val; if (reg <= 0x06) { /* 6-bit level */ *l = codec_attn[0x3f - (l_val & 0x3f)]; - *r = codec_attn[0x47 - (r_val & 0x3f)]; + *r = codec_attn[0x3f - (r_val & 0x3f)]; } else { /* 5-bit gain */ - /* Yes, 0x3f is correct, the 0x47 was most likely a decimal-hex mix-up. */ - *l = codec_attn[0x3f - (l_val & 0x1f)]; - *r = codec_attn[0x3f - (r_val & 0x1f)]; + *l = codec_attn[0x47 - (l_val & 0x1f)]; + *r = codec_attn[0x47 - (r_val & 0x1f)]; } /* Apply per-channel mute and center/LFE powerdowns where applicable. */