summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2023-07-31 18:57:20 +0200
committerTakashi Iwai <tiwai@suse.de>2023-08-01 08:30:05 +0200
commit15c378d66fc5bd00ce7c8ac869624f9a4a29d1d4 (patch)
tree4aec150bf43fc138b64e6a7287c3a4e82649b01b
parentALSA: hda/cs35l56: Do not mark cache dirty after REINIT (diff)
downloadlinux-15c378d66fc5bd00ce7c8ac869624f9a4a29d1d4.tar.xz
linux-15c378d66fc5bd00ce7c8ac869624f9a4a29d1d4.zip
ALSA: hda/cs35l56: Call cs_dsp_power_down() before reloading firmware
When firmware is reloaded after a system resume cs_dsp_power_down() should be called before calling cs_dsp_power_up(). The fw_patched flag should also be cleared and only set again if the firmware download succeeded. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230731165726.7940-4-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/cs35l56_hda.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c
index fda716e0db09..b6b8cb21da75 100644
--- a/sound/pci/hda/cs35l56_hda.c
+++ b/sound/pci/hda/cs35l56_hda.c
@@ -527,6 +527,12 @@ static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
char *wmfw_filename = NULL;
int ret = 0;
+ /* Prepare for a new DSP power-up */
+ if (cs35l56->base.fw_patched)
+ cs_dsp_power_down(&cs35l56->cs_dsp);
+
+ cs35l56->base.fw_patched = false;
+
cs35l56_hda_request_firmware_files(cs35l56, &wmfw_firmware, &wmfw_filename,
&coeff_firmware, &coeff_filename);