Commit 3a253445 authored by John Baboval's avatar John Baboval Committed by Takashi Iwai

ALSA: hda - Fix ThinkPad T410[s] docking station line-out

On the docking station for the Lenovo T410 and T410s, the line-out 
doesn't work. The trouble seems to be that it generates a plug event, 
but then doesn't report that the jack is connected. So automute mutes 
the jack when you plug something into it. The following patch (next 
message) fixes it.

Signed-off-by: John Baboval <john.baboval at virtualcomputer.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 77c4d5cd
...@@ -2116,8 +2116,8 @@ static void cxt5066_update_speaker(struct hda_codec *codec) ...@@ -2116,8 +2116,8 @@ static void cxt5066_update_speaker(struct hda_codec *codec)
struct conexant_spec *spec = codec->spec; struct conexant_spec *spec = codec->spec;
unsigned int pinctl; unsigned int pinctl;
snd_printdd("CXT5066: update speaker, hp_present=%d\n", snd_printdd("CXT5066: update speaker, hp_present=%d, cur_eapd=%d\n",
spec->hp_present); spec->hp_present, spec->cur_eapd);
/* Port A (HP) */ /* Port A (HP) */
pinctl = ((spec->hp_present & 1) && spec->cur_eapd) ? PIN_HP : 0; pinctl = ((spec->hp_present & 1) && spec->cur_eapd) ? PIN_HP : 0;
...@@ -2125,11 +2125,20 @@ static void cxt5066_update_speaker(struct hda_codec *codec) ...@@ -2125,11 +2125,20 @@ static void cxt5066_update_speaker(struct hda_codec *codec)
pinctl); pinctl);
/* Port D (HP/LO) */ /* Port D (HP/LO) */
pinctl = ((spec->hp_present & 2) && spec->cur_eapd) if (spec->dell_automute) {
? spec->port_d_mode : 0; /* DELL AIO Port Rule: PortA> PortD> IntSpk */
/* Mute if Port A is connected on Thinkpad */ pinctl = (!(spec->hp_present & 1) && spec->cur_eapd)
if (spec->thinkpad && (spec->hp_present & 1)) ? PIN_OUT : 0;
pinctl = 0; } else if (spec->thinkpad) {
if (spec->cur_eapd)
pinctl = spec->port_d_mode;
/* Mute dock line-out if Port A (laptop HP) is present */
if (spec->hp_present& 1)
pinctl = 0;
} else {
pinctl = ((spec->hp_present & 2) && spec->cur_eapd)
? spec->port_d_mode : 0;
}
snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
pinctl); pinctl);
...@@ -2137,14 +2146,6 @@ static void cxt5066_update_speaker(struct hda_codec *codec) ...@@ -2137,14 +2146,6 @@ static void cxt5066_update_speaker(struct hda_codec *codec)
pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0; pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0;
snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
pinctl); pinctl);
if (spec->dell_automute) {
/* DELL AIO Port Rule: PortA > PortD > IntSpk */
pinctl = (!(spec->hp_present & 1) && spec->cur_eapd)
? PIN_OUT : 0;
snd_hda_codec_write(codec, 0x1c, 0,
AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl);
}
} }
/* turn on/off EAPD (+ mute HP) as a master switch */ /* turn on/off EAPD (+ mute HP) as a master switch */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment