From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda - Don't enable unsol for jacks we're polling Date: Wed, 17 Oct 2012 15:01:05 +0200 Message-ID: References: <1350477905-23402-1-git-send-email-david.henningsson@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 965D426520E for ; Wed, 17 Oct 2012 15:01:05 +0200 (CEST) In-Reply-To: <1350477905-23402-1-git-send-email-david.henningsson@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: David Henningsson Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 17 Oct 2012 14:45:05 +0200, David Henningsson wrote: > > 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 Thanks, applied. Takashi > --- > sound/pci/hda/hda_jack.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c > index 07d5288..5bdbada 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); > -- > 1.7.9.5 >