alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Wang Xingchao <xingchao.wang@linux.intel.com>
To: tiwai@suse.de
Cc: liam.r.girdwood@linux.intel.com, alsa-devel@alsa-project.org,
	Wang Xingchao <xingchao.wang@linux.intel.com>,
	david.henningsson@canonical.com, xingchao.wang@intel.com
Subject: [PATCH 1/3] ALSA: hda - Clearing jackpoll_interval avoid pending work
Date: Thu, 25 Jul 2013 23:34:44 -0400	[thread overview]
Message-ID: <1374809686-3886-1-git-send-email-xingchao.wang@linux.intel.com> (raw)

Clearing jackpoll_interval before calling cancel_delayed_work_sync(),
otherwise the work will be triggered again and cause impact in
hda_jackpoll_work(). The next patch will poll jack once even with
jackpoll_interval=0.

Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
---
 sound/pci/hda/patch_via.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index e2481ba..0bc20ef 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -207,9 +207,9 @@ static void vt1708_stop_hp_work(struct hda_codec *codec)
 		return;
 	if (spec->hp_work_active) {
 		snd_hda_codec_write(codec, 0x1, 0, 0xf81, 1);
+		codec->jackpoll_interval = 0;
 		cancel_delayed_work_sync(&codec->jackpoll_work);
 		spec->hp_work_active = false;
-		codec->jackpoll_interval = 0;
 	}
 }
 
-- 
1.8.3.2

             reply	other threads:[~2013-07-26  2:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26  3:34 Wang Xingchao [this message]
2013-07-26  3:34 ` [PATCH 2/3 V2] ALSA: hda - jack poll once if jackpoll_interval==0 Wang Xingchao
2013-07-26  3:34 ` [PATCH 3/3 V2] ALSA: hda - WAKEEN feature enabling for runtime pm Wang Xingchao
  -- strict thread matches above, loose matches on Subject: below --
2013-07-30  7:06 [PATCH 1/3] ALSA: hda - Clearing jackpoll_interval avoid pending work Wang Xingchao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374809686-3886-1-git-send-email-xingchao.wang@linux.intel.com \
    --to=xingchao.wang@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=xingchao.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).