Re: [PATCH] ALSA: hda: cs35l56: Volume/Posture controls don't need to wait for dsp_work
From: Takashi Iwai
Date: Wed Dec 02 2026 - 03:30:15 EST
On Tue, 01 Dec 2026 12:16:00 +0100,
Richard Fitzgerald wrote:
>
> Delete the calls to cs35l56_hda_wait_dsp_ready() in the get/put handlers
> for the Volume and Posture controls. This wait isn't necessary now.
>
> The original reason for the wait in the get/put handlers was that the
> downloaded firmware can patch the registers to non-default values. To
> avoid the regmap cache getting out-of-sync with the actual register
> value, the ASoC driver fixed up the regmap content at the end of
> firmware download. This meant that control get/put had to wait for
> firmware download to complete. The HDA driver never had this fixup code
> so never needed the wait.
>
> Commit df4167d658d4 ("ASoC: cs35l56: Patch soft registers to defaults")
> already removed this fix-up code in the ASoC driver, and instead used
> the regmap patch to set volume and posture registers to a default of zero.
> When HDA driver firmware download was moved to a workqueue in
> commit 634f3b4e7dde ("ALSA: hda: cs35l56: Perform firmware download in the
> background") the wait was added to the get/put handlers, copying the
> behaviour of the ASoC driver. But this was unnecessary and the equivalent
> wait has been removed from the ASoC driver.
>
> When the amp is rebooted after a firmware download, cs35l56_system_reset()
> puts the regmap in cache-only and this is only released after the amp has
> rebooted. The regcache_sync() near the end of cs35l56_hda_fw_load() will
> overwrite the volume and posture registers with the values from the regmap
> patch and then write out any non-default cached values.
>
> That means it is safe for the Volume and Posture controls to read/write
> regmap any time.
>
> Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
Applied to for-next branch now. Thanks.
Takashi