diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-03-15 16:44:55 +0100 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-04-11 16:44:16 +0200 |
commit | 12d5171636629247076eefafd5ae09d67e249e8b (patch) | |
tree | 0db97f0b3570791e07846992553d994bcd77821c /sound/pci | |
parent | 955804c1471e58e89e52cd802f696c47cfbd4157 (diff) | |
download | lwn-12d5171636629247076eefafd5ae09d67e249e8b.tar.gz lwn-12d5171636629247076eefafd5ae09d67e249e8b.zip |
ALSA: hda - Fix unconditional GPIO toggle via automute
commit 1f7c6658962fa1260c1658d681bd6bb0c746b99a upstream.
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
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index eef182bea2ad..6d8151d949ca 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -177,8 +177,12 @@ static void cs_automute(struct hda_codec *codec) snd_hda_gen_update_outputs(codec); if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) { - spec->gpio_data = spec->gen.hp_jack_present ? - spec->gpio_eapd_hp : spec->gpio_eapd_speaker; + if (spec->gen.automute_speaker) + spec->gpio_data = spec->gen.hp_jack_present ? + spec->gpio_eapd_hp : spec->gpio_eapd_speaker; + else + spec->gpio_data = + spec->gpio_eapd_hp | spec->gpio_eapd_speaker; snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA, spec->gpio_data); } |