From 1f9ec63b7938a37b0e8a1a5d64ca0c17260f10e6 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Mon, 22 Nov 2021 17:05:41 -0300 Subject: [PATCH] Make AC97 codec status bits reflect powerdowns, fixes output on ES1371 VxD driver --- src/sound/snd_ac97_codec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sound/snd_ac97_codec.c b/src/sound/snd_ac97_codec.c index d83f4e293..80e2e68fc 100644 --- a/src/sound/snd_ac97_codec.c +++ b/src/sound/snd_ac97_codec.c @@ -292,6 +292,11 @@ line_gain: val &= 0x9f1f; case 0x26: /* Powerdown Control/Status */ i = dev->powerdown_mask << 8; val = (val & i) | (prev & ~i); + + /* Update status bits to reflect powerdowns. */ + val = (val & ~0x000f) | (~(val >> 8) & 0x000f); + if (val & 0x0800) /* PR3 clears both ANL and REF */ + val &= ~0x0004; break; case 0x28: /* Extended Audio ID */