mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
ALSA: hda/cs35l56: Complete firmware reboot before calling cs_dsp_run()
Move the call to cs_dsp_run() in cs35l56_hda_fw_load() so that it is after the CS35L56 has been reset/reinit'd and the regmap cache has been synced. cs_dsp_run() syncs up ALSA control cache values with the DSP memory so this must not be done until the firmware has reinitialized. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230731165726.7940-2-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2ad27caab4
commit
7b6466ad1d
1 changed files with 5 additions and 6 deletions
|
@ -562,12 +562,6 @@ static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
|
||||||
if (coeff_filename)
|
if (coeff_filename)
|
||||||
dev_dbg(cs35l56->base.dev, "Loaded Coefficients: %s\n", coeff_filename);
|
dev_dbg(cs35l56->base.dev, "Loaded Coefficients: %s\n", coeff_filename);
|
||||||
|
|
||||||
ret = cs_dsp_run(&cs35l56->cs_dsp);
|
|
||||||
if (ret) {
|
|
||||||
dev_dbg(cs35l56->base.dev, "%s: cs_dsp_run ret %d\n", __func__, ret);
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cs35l56->base.secured) {
|
if (cs35l56->base.secured) {
|
||||||
ret = cs35l56_mbox_send(&cs35l56->base, CS35L56_MBOX_CMD_AUDIO_REINIT);
|
ret = cs35l56_mbox_send(&cs35l56->base, CS35L56_MBOX_CMD_AUDIO_REINIT);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -591,6 +585,11 @@ static int cs35l56_hda_fw_load(struct cs35l56_hda *cs35l56)
|
||||||
regmap_clear_bits(cs35l56->base.regmap, CS35L56_PROTECTION_STATUS,
|
regmap_clear_bits(cs35l56->base.regmap, CS35L56_PROTECTION_STATUS,
|
||||||
CS35L56_FIRMWARE_MISSING);
|
CS35L56_FIRMWARE_MISSING);
|
||||||
cs35l56->base.fw_patched = true;
|
cs35l56->base.fw_patched = true;
|
||||||
|
|
||||||
|
ret = cs_dsp_run(&cs35l56->cs_dsp);
|
||||||
|
if (ret)
|
||||||
|
dev_dbg(cs35l56->base.dev, "%s: cs_dsp_run ret %d\n", __func__, ret);
|
||||||
|
|
||||||
err:
|
err:
|
||||||
pm_runtime_put(cs35l56->base.dev);
|
pm_runtime_put(cs35l56->base.dev);
|
||||||
mutex_unlock(&cs35l56->base.irq_lock);
|
mutex_unlock(&cs35l56->base.irq_lock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue