Skip to content

Commit 1f7c665

Browse files
committed
ALSA: hda - Fix unconditional GPIO toggle via automute
Cirrus HD-audio driver may adjust GPIO pins for EAPD dynamically depending on the jack plug state. This works fine for the auto-mute mode where the speaker gets muted upon the HP jack plug. OTOH, when the auto-mute mode is off, this turns off the EAPD unexpectedly depending on the jack state, which results in the silent speaker output. This patch fixes the silent speaker output issue by setting GPIO bits constantly when the auto-mute mode is off. Reported-and-tested-by: moosotc@gmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 294783e commit 1f7c665

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sound/pci/hda/patch_cirrus.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,12 @@ static void cs_automute(struct hda_codec *codec)
174174
snd_hda_gen_update_outputs(codec);
175175

176176
if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) {
177-
spec->gpio_data = spec->gen.hp_jack_present ?
178-
spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
177+
if (spec->gen.automute_speaker)
178+
spec->gpio_data = spec->gen.hp_jack_present ?
179+
spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
180+
else
181+
spec->gpio_data =
182+
spec->gpio_eapd_hp | spec->gpio_eapd_speaker;
179183
snd_hda_codec_write(codec, 0x01, 0,
180184
AC_VERB_SET_GPIO_DATA, spec->gpio_data);
181185
}

0 commit comments

Comments
 (0)