提交 7eaa9161 编写于 作者: W Wang Xingchao 提交者: Takashi Iwai

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: NWang Xingchao <xingchao.wang@linux.intel.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 85054b21
...@@ -207,9 +207,9 @@ static void vt1708_stop_hp_work(struct hda_codec *codec) ...@@ -207,9 +207,9 @@ static void vt1708_stop_hp_work(struct hda_codec *codec)
return; return;
if (spec->hp_work_active) { if (spec->hp_work_active) {
snd_hda_codec_write(codec, 0x1, 0, 0xf81, 1); snd_hda_codec_write(codec, 0x1, 0, 0xf81, 1);
codec->jackpoll_interval = 0;
cancel_delayed_work_sync(&codec->jackpoll_work); cancel_delayed_work_sync(&codec->jackpoll_work);
spec->hp_work_active = false; spec->hp_work_active = false;
codec->jackpoll_interval = 0;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册