diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-04-19 15:15:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 09:51:05 -0700 |
commit | c7a17402276938793a8e97fe7eefe28eb39fe874 (patch) | |
tree | e5f13a10c0b571cbb4fd177a4dfff9e890b3a239 | |
parent | ee6c90f9e96bc7d334f626b6076817d57cf861a1 (diff) | |
download | kernel-common-c7a17402276938793a8e97fe7eefe28eb39fe874.tar.gz kernel-common-c7a17402276938793a8e97fe7eefe28eb39fe874.tar.bz2 kernel-common-c7a17402276938793a8e97fe7eefe28eb39fe874.zip |
ALSA: hda/conexant - Don't set HP pin-control bit unconditionally
commit ca3649de026ff95c6f2847e8d096cf2f411c02b3 upstream.
Some output pins on Conexant chips have no HP control bit, but the
auto-parser initializes these pins unconditionally with PIN_HP.
Check the pin-capability and avoid the HP bit if not supported.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 4ad20a61531e..4cf3266c9424 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -4003,9 +4003,14 @@ static void cx_auto_init_output(struct hda_codec *codec) int i; mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids); - for (i = 0; i < cfg->hp_outs; i++) + for (i = 0; i < cfg->hp_outs; i++) { + unsigned int val = PIN_OUT; + if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) & + AC_PINCAP_HP_DRV) + val |= AC_PINCTL_HP_EN; snd_hda_codec_write(codec, cfg->hp_pins[i], 0, - AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP); + AC_VERB_SET_PIN_WIDGET_CONTROL, val); + } mute_outputs(codec, cfg->hp_outs, cfg->hp_pins); mute_outputs(codec, cfg->line_outs, cfg->line_out_pins); mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins); |