ALSA: hda - Allow jack detection when polling is enabled
authorTakashi Iwai <tiwai@suse.de>
Mon, 7 Jan 2013 11:11:33 +0000 (12:11 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 12 Jan 2013 07:43:54 +0000 (08:43 +0100)
Let is_jack_detectable() return true when the jack polling is enabled
for the codec.  VT1708 uses the polling explicitly so we need to allow
it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_jack.c

index 6479b6501828557a4811f46d4df983d54133629c..1d035efeff4fc606294eae02ca2cbe10e24b1dd9 100644 (file)
@@ -29,7 +29,8 @@ bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid)
        if (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) &
             AC_DEFCFG_MISC_NO_PRESENCE)
                return false;
-       if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP))
+       if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) &&
+           !codec->jackpoll_interval)
                return false;
        return true;
 }