Commit bfc99025 authored by Takashi Iwai's avatar Takashi Iwai

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
  d56757ab
    ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()
to plain GET_PIN_SENSE verb without triggering.
Reported-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 0b587fc4
......@@ -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,
......
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