aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Xingchao <xingchao.wang@linux.intel.com>2013-07-25 23:34:44 -0400
committerTakashi Iwai <tiwai@suse.de>2013-07-29 08:19:03 -0400
commit7eaa9161edd1bb41c026db252bb7e7dfe97ab90a (patch)
treed42ddf1fc85c8df33255015f58962b5458fecf43
parent85054b2153f18eac16df9ff88913c98adea6a23e (diff)
ALSA: hda - Clearing jackpoll_interval avoid pending work
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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_via.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index e2481baddc70..0bc20ef5687a 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)
207 return; 207 return;
208 if (spec->hp_work_active) { 208 if (spec->hp_work_active) {
209 snd_hda_codec_write(codec, 0x1, 0, 0xf81, 1); 209 snd_hda_codec_write(codec, 0x1, 0, 0xf81, 1);
210 codec->jackpoll_interval = 0;
210 cancel_delayed_work_sync(&codec->jackpoll_work); 211 cancel_delayed_work_sync(&codec->jackpoll_work);
211 spec->hp_work_active = false; 212 spec->hp_work_active = false;
212 codec->jackpoll_interval = 0;
213 } 213 }
214} 214}
215 215