aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_cirrus.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-05-05 13:36:03 +0800
committerAlex Shi <alex.shi@linaro.org>2016-05-05 13:36:03 +0800
commite91b1cc90283c1b9b75670b027a18afbd20fe070 (patch)
tree81c395406a3774775a183d544aee9c5ced1c31d6 /sound/pci/hda/patch_cirrus.c
parentd83731cf53fd3af7173cab5e3f573d06ebc852be (diff)
parent0b3df30dcadcddc56aed56c3c2d2de2ca963e81d (diff)
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-16.06-rtlsk-v4.1-16.05-rt
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r--sound/pci/hda/patch_cirrus.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 8f50a257a80d..aeb054ca9ed9 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -174,8 +174,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);
}