diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-01-24 11:19:27 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-01-24 11:19:27 +0100 |
commit | 23d2df5b0db67fa90d3caf4b2d2f21ca33ec9c11 (patch) | |
tree | 688a194ccf1b87e8cf0917517db5975a62dc4859 /sound/pci/hda | |
parent | ecda0cff9df77d3f7d388bd4966e61f1947d2c95 (diff) | |
download | blackbird-op-linux-23d2df5b0db67fa90d3caf4b2d2f21ca33ec9c11.tar.gz blackbird-op-linux-23d2df5b0db67fa90d3caf4b2d2f21ca33ec9c11.zip |
ALSA: hda - Change headphone pin control with master volume on cx5051
The HP pin (0x16) control has to be changed dynamically depending on
the master volume switch as well as the speaker pin (0x1a). Otherwise
the headphone still sounds with master off.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 250b74f8136e..9077e4174ee6 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -1605,6 +1605,11 @@ static void cxt5051_update_speaker(struct hda_codec *codec) { struct conexant_spec *spec = codec->spec; unsigned int pinctl; + /* headphone pin */ + pinctl = (spec->hp_present && spec->cur_eapd) ? PIN_HP : 0; + snd_hda_codec_write(codec, 0x16, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, + pinctl); + /* speaker pin */ pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0; snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl); |