alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ALSA: hda - Clearing jackpoll_interval avoid pending work
@ 2013-07-26  3:34 Wang Xingchao
  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
  0 siblings, 2 replies; 4+ messages in thread
From: Wang Xingchao @ 2013-07-26  3:34 UTC (permalink / raw)
  To: tiwai
  Cc: liam.r.girdwood, alsa-devel, Wang Xingchao, david.henningsson,
	xingchao.wang

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH 1/3] ALSA: hda - Clearing jackpoll_interval avoid pending work
@ 2013-07-30  7:06 Wang Xingchao
  2013-07-30  7:06 ` [PATCH 2/3 V2] ALSA: hda - jack poll once if jackpoll_interval==0 Wang Xingchao
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Xingchao @ 2013-07-30  7:06 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel, Wang Xingchao

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-30  6:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26  3:34 [PATCH 1/3] ALSA: hda - Clearing jackpoll_interval avoid pending work Wang Xingchao
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
2013-07-30  7:06 ` [PATCH 2/3 V2] ALSA: hda - jack poll once if jackpoll_interval==0 Wang Xingchao

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).