aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_jack.c
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2012-10-17 08:45:05 -0400
committerTakashi Iwai <tiwai@suse.de>2012-10-17 08:47:31 -0400
commit34a9318772d00efc5c1af00639526232050c49b8 (patch)
tree0eec86776e6dcd99630de69c513f295ef6cdbc7e /sound/pci/hda/hda_jack.c
parenta2af050f8df6eeec29818639859f14eb237d6957 (diff)
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 <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_jack.c')
-rw-r--r--sound/pci/hda/hda_jack.c2
1 files changed, 2 insertions, 0 deletions
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,
206 jack->action = action; 206 jack->action = action;
207 if (cb) 207 if (cb)
208 jack->callback = cb; 208 jack->callback = cb;
209 if (codec->jackpoll_interval > 0)
210 return 0; /* No unsol if we're polling instead */
209 return snd_hda_codec_write_cache(codec, nid, 0, 211 return snd_hda_codec_write_cache(codec, nid, 0,
210 AC_VERB_SET_UNSOLICITED_ENABLE, 212 AC_VERB_SET_UNSOLICITED_ENABLE,
211 AC_USRSP_EN | jack->tag); 213 AC_USRSP_EN | jack->tag);