diff options
author | David Henningsson <david.henningsson@canonical.com> | 2012-01-02 06:40:16 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-01-08 03:57:18 -0500 |
commit | 78e2a928e377d5124932d4399c6c581908b027a0 (patch) | |
tree | abae46d2ec36a9a49a1bd6c9effdbf01aafdb80a /sound/pci/hda | |
parent | 40d03e63e91af8ddccdfd5a536cc2a6e51433e1d (diff) |
ALSA: HDA: Fix automute for Cirrus Logic 421x
There was a bug in the automute logic causing speakers not to
mute when headphones were plugged in.
Cc: stable@kernel.org
Tested-by: Hsin-Yi Chen <hychen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 913955895094..ea660429713d 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -922,16 +922,14 @@ static void cs_automute(struct hda_codec *codec) | |||
922 | 922 | ||
923 | /* mute speakers if spdif or hp jack is plugged in */ | 923 | /* mute speakers if spdif or hp jack is plugged in */ |
924 | for (i = 0; i < cfg->speaker_outs; i++) { | 924 | for (i = 0; i < cfg->speaker_outs; i++) { |
925 | int pin_ctl = hp_present ? 0 : PIN_OUT; | ||
926 | /* detect on spdif is specific to CS421x */ | ||
927 | if (spdif_present && (spec->vendor_nid == CS421X_VENDOR_NID)) | ||
928 | pin_ctl = 0; | ||
929 | |||
925 | nid = cfg->speaker_pins[i]; | 930 | nid = cfg->speaker_pins[i]; |
926 | snd_hda_codec_write(codec, nid, 0, | 931 | snd_hda_codec_write(codec, nid, 0, |
927 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 932 | AC_VERB_SET_PIN_WIDGET_CONTROL, pin_ctl); |
928 | hp_present ? 0 : PIN_OUT); | ||
929 | /* detect on spdif is specific to CS421x */ | ||
930 | if (spec->vendor_nid == CS421X_VENDOR_NID) { | ||
931 | snd_hda_codec_write(codec, nid, 0, | ||
932 | AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
933 | spdif_present ? 0 : PIN_OUT); | ||
934 | } | ||
935 | } | 933 | } |
936 | if (spec->gpio_eapd_hp) { | 934 | if (spec->gpio_eapd_hp) { |
937 | unsigned int gpio = hp_present ? | 935 | unsigned int gpio = hp_present ? |