From: David Henningsson Date: Wed, 17 Oct 2012 12:45:05 +0000 (+0200) Subject: ALSA: hda - Don't enable unsol for jacks we're polling X-Git-Tag: firefly_0821_release~3680^2~1370^2~135 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=34a9318772d00efc5c1af00639526232050c49b8;p=firefly-linux-kernel-4.4.55.git ALSA: hda - Don't enable unsol for jacks we're polling This will greatly reduce the frequency for detection errors in those cases where the hardware is "flaky", i e, rapidly changing between plugged and unplugged states even without user interaction. Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c index 07d5288ce8cf..5bdbadaa20fe 100644 --- a/sound/pci/hda/hda_jack.c +++ b/sound/pci/hda/hda_jack.c @@ -206,6 +206,8 @@ int snd_hda_jack_detect_enable_callback(struct hda_codec *codec, hda_nid_t nid, jack->action = action; if (cb) jack->callback = cb; + if (codec->jackpoll_interval > 0) + return 0; /* No unsol if we're polling instead */ return snd_hda_codec_write_cache(codec, nid, 0, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | jack->tag);