aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-04-19 09:15:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-27 12:51:05 -0400
commitc7a17402276938793a8e97fe7eefe28eb39fe874 (patch)
treee5f13a10c0b571cbb4fd177a4dfff9e890b3a239
parentee6c90f9e96bc7d334f626b6076817d57cf861a1 (diff)
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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 4ad20a61531..4cf3266c942 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)
4003 int i; 4003 int i;
4004 4004
4005 mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids); 4005 mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids);
4006 for (i = 0; i < cfg->hp_outs; i++) 4006 for (i = 0; i < cfg->hp_outs; i++) {
4007 unsigned int val = PIN_OUT;
4008 if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) &
4009 AC_PINCAP_HP_DRV)
4010 val |= AC_PINCTL_HP_EN;
4007 snd_hda_codec_write(codec, cfg->hp_pins[i], 0, 4011 snd_hda_codec_write(codec, cfg->hp_pins[i], 0,
4008 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP); 4012 AC_VERB_SET_PIN_WIDGET_CONTROL, val);
4013 }
4009 mute_outputs(codec, cfg->hp_outs, cfg->hp_pins); 4014 mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
4010 mute_outputs(codec, cfg->line_outs, cfg->line_out_pins); 4015 mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
4011 mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins); 4016 mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);