Skip to contentSkip to conversation

ALSA: hda - Don't enable unsol for jacks we're polling

PATCH Applied David Henningsson 2 participants 2 messages Oct 17, 2012 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 sound/pci/hda/hda_jack.c |    2 ++
 1 file changed, 2 insertions(+)
sound/pci/hda/hda_jack.c +2 -0
index 07d5288..5bdbada 100644
@@ -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);
Signature · 1 line
1.7.9.5
Applied
#1 lore raw

At Wed, 17 Oct 2012 14:45:05 +0200,

Quoted 6 lines · David Henningsson

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.

Thanks, applied.

Takashi

Quoted 20 lines
---
 sound/pci/hda/hda_jack.c |    2 ++
 1 file changed, 2 insertions(+)
sound/pci/hda/hda_jack.c +2 -0
index 07d5288..5bdbada 100644
@@ -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);
Signature · 1 line
1.7.9.5