aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorJohn Baboval <john.baboval@virtualcomputer.com>2010-12-02 11:21:31 -0500
committerTakashi Iwai <tiwai@suse.de>2010-12-03 06:27:11 -0500
commit3a253445e327d0295bbe51bcbec5f44f86b54a8c (patch)
treeed9c9375b0d6d7319e371bedc32d3e246e1137b0 /sound/pci
parent77c4d5cdb81d25a45fbdfb84dd3348121219a072 (diff)
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_conexant.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 846d1ead47f..e652b34b1bd 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -2116,8 +2116,8 @@ static void cxt5066_update_speaker(struct hda_codec *codec)
2116 struct conexant_spec *spec = codec->spec; 2116 struct conexant_spec *spec = codec->spec;
2117 unsigned int pinctl; 2117 unsigned int pinctl;
2118 2118
2119 snd_printdd("CXT5066: update speaker, hp_present=%d\n", 2119 snd_printdd("CXT5066: update speaker, hp_present=%d, cur_eapd=%d\n",
2120 spec->hp_present); 2120 spec->hp_present, spec->cur_eapd);
2121 2121
2122 /* Port A (HP) */ 2122 /* Port A (HP) */
2123 pinctl = ((spec->hp_present & 1) && spec->cur_eapd) ? PIN_HP : 0; 2123 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 pinctl); 2125 pinctl);
2126 2126
2127 /* Port D (HP/LO) */ 2127 /* Port D (HP/LO) */
2128 pinctl = ((spec->hp_present & 2) && spec->cur_eapd) 2128 if (spec->dell_automute) {
2129 ? spec->port_d_mode : 0; 2129 /* DELL AIO Port Rule: PortA> PortD> IntSpk */
2130 /* Mute if Port A is connected on Thinkpad */ 2130 pinctl = (!(spec->hp_present & 1) && spec->cur_eapd)
2131 if (spec->thinkpad && (spec->hp_present & 1)) 2131 ? PIN_OUT : 0;
2132 pinctl = 0; 2132 } else if (spec->thinkpad) {
2133 if (spec->cur_eapd)
2134 pinctl = spec->port_d_mode;
2135 /* Mute dock line-out if Port A (laptop HP) is present */
2136 if (spec->hp_present& 1)
2137 pinctl = 0;
2138 } else {
2139 pinctl = ((spec->hp_present & 2) && spec->cur_eapd)
2140 ? spec->port_d_mode : 0;
2141 }
2133 snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 2142 snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
2134 pinctl); 2143 pinctl);
2135 2144
@@ -2137,14 +2146,6 @@ static void cxt5066_update_speaker(struct hda_codec *codec)
2137 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0; 2146 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0;
2138 snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 2147 snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL,
2139 pinctl); 2148 pinctl);
2140
2141 if (spec->dell_automute) {
2142 /* DELL AIO Port Rule: PortA > PortD > IntSpk */
2143 pinctl = (!(spec->hp_present & 1) && spec->cur_eapd)
2144 ? PIN_OUT : 0;
2145 snd_hda_codec_write(codec, 0x1c, 0,
2146 AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl);
2147 }
2148} 2149}
2149 2150
2150/* turn on/off EAPD (+ mute HP) as a master switch */ 2151/* turn on/off EAPD (+ mute HP) as a master switch */