| From 377bc0cfabce0244632dada19060839ced4e6949 Mon Sep 17 00:00:00 2001 |
| From: Takashi Iwai <tiwai@suse.de> |
| Date: Fri, 13 Dec 2019 09:51:09 +0100 |
| Subject: ALSA: hda/ca0132 - Keep power on during processing DSP response |
| |
| From: Takashi Iwai <tiwai@suse.de> |
| |
| 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: a73d511c4867 ("ALSA: hda/ca0132: Add unsol handler for DSP and jack detection") |
| Cc: <[email protected]> |
| Link: https://lore.kernel.org/r/[email protected] |
| Signed-off-by: Takashi Iwai <[email protected]> |
| Signed-off-by: Greg Kroah-Hartman <[email protected]> |
| |
| --- |
| sound/pci/hda/patch_ca0132.c | 2 ++ |
| 1 file changed, 2 insertions(+) |
| |
| --- a/sound/pci/hda/patch_ca0132.c |
| +++ b/sound/pci/hda/patch_ca0132.c |
| @@ -4400,12 +4400,14 @@ static void ca0132_process_dsp_response( |
| struct ca0132_spec *spec = codec->spec; |
| |
| codec_dbg(codec, "ca0132_process_dsp_response\n"); |
| + snd_hda_power_up_pm(codec); |
| if (spec->wait_scp) { |
| if (dspio_get_response_data(codec) >= 0) |
| spec->wait_scp = 0; |
| } |
| |
| dspio_clear_response_queue(codec); |
| + snd_hda_power_down_pm(codec); |
| } |
| |
| static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb) |