Skip to content

Commit ca3649d

Browse files
committed
ALSA: hda/conexant - Don't set HP pin-control bit unconditionally
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. Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent c16fa4f commit ca3649d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sound/pci/hda/patch_conexant.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3951,9 +3951,14 @@ static void cx_auto_init_output(struct hda_codec *codec)
39513951
int i;
39523952

39533953
mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids);
3954-
for (i = 0; i < cfg->hp_outs; i++)
3954+
for (i = 0; i < cfg->hp_outs; i++) {
3955+
unsigned int val = PIN_OUT;
3956+
if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) &
3957+
AC_PINCAP_HP_DRV)
3958+
val |= AC_PINCTL_HP_EN;
39553959
snd_hda_codec_write(codec, cfg->hp_pins[i], 0,
3956-
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP);
3960+
AC_VERB_SET_PIN_WIDGET_CONTROL, val);
3961+
}
39573962
mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
39583963
mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
39593964
mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);

0 commit comments

Comments
 (0)