提交 e7baf1c1 编写于 作者: T Takashi Iwai 提交者: Yang Yingliang

ALSA: hda/ca0132 - Keep power on during processing DSP response

commit 377bc0cfabce0244632dada19060839ced4e6949 upstream.

We need to keep power on while processing the DSP response via unsol
event.  Each snd_hda_codec_read() call does the power management, so
it should work normally, but still it's safer to keep the power up for
the whole function.

Fixes: a73d511c ("ALSA: hda/ca0132: Add unsol handler for DSP and jack detection")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191213085111.22855-2-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d4c5460b
...@@ -6754,12 +6754,14 @@ static void ca0132_process_dsp_response(struct hda_codec *codec, ...@@ -6754,12 +6754,14 @@ static void ca0132_process_dsp_response(struct hda_codec *codec,
struct ca0132_spec *spec = codec->spec; struct ca0132_spec *spec = codec->spec;
codec_dbg(codec, "ca0132_process_dsp_response\n"); codec_dbg(codec, "ca0132_process_dsp_response\n");
snd_hda_power_up_pm(codec);
if (spec->wait_scp) { if (spec->wait_scp) {
if (dspio_get_response_data(codec) >= 0) if (dspio_get_response_data(codec) >= 0)
spec->wait_scp = 0; spec->wait_scp = 0;
} }
dspio_clear_response_queue(codec); dspio_clear_response_queue(codec);
snd_hda_power_down_pm(codec);
} }
static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb) static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册