Skip to content

Commit

Permalink
ALSA: hda - Don't enable unsol for jacks we're polling
Browse files Browse the repository at this point in the history
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 <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
David Henningsson authored and Takashi Iwai committed Oct 17, 2012
1 parent a2af050 commit 34a9318
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/pci/hda/hda_jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 34a9318

Please sign in to comment.