aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-11-27 06:22:44 -0500
committerTakashi Iwai <tiwai@suse.de>2009-11-27 06:22:44 -0500
commitbfc9902599549736b9c6445e1e2235b8542f64a6 (patch)
treeda39d6398dd09f41d25a02faf48379044854f412 /sound/pci
parent0b587fc4d35afb1bc0fc3d890084bb14c78372dc (diff)
ALSA: hda - Don't trigger pin-sense for STAC/IDT codecs
STAC/IDT codecs seem to behave weird when SET_PIN_SENSE verb is issued before reading the jack-detection although the TRIG_REQ pin capability is given by the hardware. Since snd_hda_jack_detect() issues the SET_PIN_SENSE verb simply judging from the pincap, we have to revert the change in the commit d56757abc11a21996d9839c0d4e3b2c3666cd318 ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect() to plain GET_PIN_SENSE verb without triggering. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_sigmatel.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 2a45375d79f8..6b0bc040c3b1 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4440,7 +4440,14 @@ static inline int get_pin_presence(struct hda_codec *codec, hda_nid_t nid)
4440{ 4440{
4441 if (!nid) 4441 if (!nid)
4442 return 0; 4442 return 0;
4443 return snd_hda_jack_detect(codec, nid); 4443 /* NOTE: we can't use snd_hda_jack_detect() here because STAC/IDT
4444 * codecs behave wrongly when SET_PIN_SENSE is triggered, although
4445 * the pincap gives TRIG_REQ bit.
4446 */
4447 if (snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PIN_SENSE, 0) &
4448 AC_PINSENSE_PRESENCE)
4449 return 1;
4450 return 0;
4444} 4451}
4445 4452
4446static void stac92xx_line_out_detect(struct hda_codec *codec, 4453static void stac92xx_line_out_detect(struct hda_codec *codec,