From 6549b5a358b7182666beee66ddb8b36345c4118a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 27 Nov 2009 12:22:44 +0100 Subject: [PATCH] --- yaml --- r: 170360 b: refs/heads/master c: bfc9902599549736b9c6445e1e2235b8542f64a6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_sigmatel.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 2bd669e00e4e..fdf05335d115 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b587fc4d35afb1bc0fc3d890084bb14c78372dc +refs/heads/master: bfc9902599549736b9c6445e1e2235b8542f64a6 diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index 2a45375d79f8..6b0bc040c3b1 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -4440,7 +4440,14 @@ static inline int get_pin_presence(struct hda_codec *codec, hda_nid_t nid) { if (!nid) return 0; - return snd_hda_jack_detect(codec, nid); + /* NOTE: we can't use snd_hda_jack_detect() here because STAC/IDT + * codecs behave wrongly when SET_PIN_SENSE is triggered, although + * the pincap gives TRIG_REQ bit. + */ + if (snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PIN_SENSE, 0) & + AC_PINSENSE_PRESENCE) + return 1; + return 0; } static void stac92xx_line_out_detect(struct hda_codec *codec,