[PATCH 00/20] ASoC: propagate register restore failures

Pengpeng Hou posted 20 patches 4 weeks, 1 day ago
sound/soc/codecs/adau1372.c                | 44 ++++++++++++++--------
sound/soc/codecs/adau1701.c                |  4 +-
sound/soc/codecs/cs35l56-shared.c          |  9 ++++-
sound/soc/codecs/cs42l42-sdw.c             |  4 +-
sound/soc/codecs/cs42l42.c                 | 27 +++++++++----
sound/soc/codecs/cs42l42.h                 |  2 +-
sound/soc/codecs/es9356.c                  | 14 +++++--
sound/soc/codecs/jz4740.c                  | 25 ++++++++----
sound/soc/codecs/max98088.c                |  9 ++++-
sound/soc/codecs/ssm2518.c                 | 15 +++++++-
sound/soc/codecs/ssm4567.c                 | 15 +++++++-
sound/soc/codecs/tlv320aic3x.c             | 36 ++++++++++++++----
sound/soc/codecs/wm8731.c                  |  7 +++-
sound/soc/codecs/wm8770.c                  |  7 +++-
sound/soc/codecs/wm8804.c                  |  6 ++-
sound/soc/codecs/wm8904.c                  | 10 ++++-
sound/soc/codecs/wm8985.c                  |  7 +++-
sound/soc/codecs/wm8991.c                  |  7 +++-
sound/soc/codecs/wm8993.c                  |  9 ++++-
sound/soc/codecs/wm8996.c                  | 11 +++++-
sound/soc/mediatek/mt8186/mt8186-afe-clk.c |  2 +
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 15 +++++++-
sound/soc/mediatek/mt8196/mt8196-afe-clk.c | 27 ++++++++++---
sound/soc/mediatek/mt8196/mt8196-afe-pcm.c |  8 +++-
24 files changed, 251 insertions(+), 69 deletions(-)
[PATCH 00/20] ASoC: propagate register restore failures
Posted by Pengpeng Hou 4 weeks, 1 day ago
Several ASoC codec and AFE power transitions restore cached register state
after reset or power loss.  The callbacks in this series all have an effective
error consumer: component probe or hw_params, DAPM bias handling, device
runtime PM, or system PM.  They currently continue or publish success after a
required register operation failed.

Check the complete local restore transaction at each site and unwind clocks,
supplies, GPIOs, cache state or software publication where that transaction
acquired them.  For the Mediatek AFE drivers this also makes the clock helpers
unwind partial internal acquisition prefixes before returning to runtime PM.

This is a new set of sites, not a revision of the earlier 19-patch series at:

  https://lore.kernel.org/all/20260704034845.14291-1-pengpeng@iscas.ac.cn/

It intentionally excludes snd_soc_component_driver resume callbacks whose
return values are discarded by snd_soc_component_resume(); that shared policy
is being discussed separately.  The cs42l42 patch covers the shared system
resume helper and is distinct from the SoundWire runtime-resume path fixed by
commit a118fea777a2.

The issues were identified via static analysis and manually reviewed.

Assisted-by: LLM

Pengpeng Hou (20):
  ASoC: adau1372: Unwind failed power restoration
  ASoC: adau1701: Propagate register cache replay errors
  ASoC: cs35l56: Propagate register restore errors from runtime resume
  ASoC: cs42l42: Propagate system resume restore errors
  ASoC: es9356: Publish IRQ readiness after cache replay
  ASoC: jz4740: Propagate codec wake-up errors
  ASoC: max98088: Propagate cache replay errors from bias restore
  ASoC: ssm2518: Unwind failed power restoration
  ASoC: ssm4567: Unwind failed power restoration
  ASoC: tlv320aic3x: Propagate power restoration errors
  ASoC: wm8731: Unwind supplies on cache replay failure
  ASoC: wm8770: Unwind supplies on cache replay failure
  ASoC: wm8804: Propagate cache replay errors from runtime resume
  ASoC: wm8904: Unwind resources on cache replay failure
  ASoC: wm8985: Unwind supplies on cache replay failure
  ASoC: wm8991: Propagate cache replay errors from bias restore
  ASoC: wm8993: Unwind supplies on cache replay failure
  ASoC: wm8996: Unwind supplies on cache replay failure
  ASoC: mediatek: mt8186: Unwind runtime resume failures
  ASoC: mediatek: mt8196: Unwind register clock and cache restore
    failures

 sound/soc/codecs/adau1372.c                | 44 ++++++++++++++--------
 sound/soc/codecs/adau1701.c                |  4 +-
 sound/soc/codecs/cs35l56-shared.c          |  9 ++++-
 sound/soc/codecs/cs42l42-sdw.c             |  4 +-
 sound/soc/codecs/cs42l42.c                 | 27 +++++++++----
 sound/soc/codecs/cs42l42.h                 |  2 +-
 sound/soc/codecs/es9356.c                  | 14 +++++--
 sound/soc/codecs/jz4740.c                  | 25 ++++++++----
 sound/soc/codecs/max98088.c                |  9 ++++-
 sound/soc/codecs/ssm2518.c                 | 15 +++++++-
 sound/soc/codecs/ssm4567.c                 | 15 +++++++-
 sound/soc/codecs/tlv320aic3x.c             | 36 ++++++++++++++----
 sound/soc/codecs/wm8731.c                  |  7 +++-
 sound/soc/codecs/wm8770.c                  |  7 +++-
 sound/soc/codecs/wm8804.c                  |  6 ++-
 sound/soc/codecs/wm8904.c                  | 10 ++++-
 sound/soc/codecs/wm8985.c                  |  7 +++-
 sound/soc/codecs/wm8991.c                  |  7 +++-
 sound/soc/codecs/wm8993.c                  |  9 ++++-
 sound/soc/codecs/wm8996.c                  | 11 +++++-
 sound/soc/mediatek/mt8186/mt8186-afe-clk.c |  2 +
 sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 15 +++++++-
 sound/soc/mediatek/mt8196/mt8196-afe-clk.c | 27 ++++++++++---
 sound/soc/mediatek/mt8196/mt8196-afe-pcm.c |  8 +++-
 24 files changed, 251 insertions(+), 69 deletions(-)

-- 
2.43.0
Re: (subset) [PATCH 00/20] ASoC: propagate register restore failures
Posted by Mark Brown 1 week, 4 days ago
On Fri, 28 Aug 2026 19:33:55 +0800, Pengpeng Hou wrote:
> ASoC: propagate register restore failures
> 
> Several ASoC codec and AFE power transitions restore cached register state
> after reset or power loss.  The callbacks in this series all have an effective
> error consumer: component probe or hw_params, DAPM bias handling, device
> runtime PM, or system PM.  They currently continue or publish success after a
> required register operation failed.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[01/20] ASoC: adau1372: Unwind failed power restoration
        https://git.kernel.org/broonie/sound/c/affb75ebf9ae
[02/20] ASoC: adau1701: Propagate register cache replay errors
        https://git.kernel.org/broonie/sound/c/6194ceba5dac
[03/20] ASoC: cs35l56: Propagate register restore errors from runtime resume
        https://git.kernel.org/broonie/sound/c/adf7e9a1f508
[04/20] ASoC: cs42l42: Propagate system resume restore errors
        https://git.kernel.org/broonie/sound/c/68cbe8933835
[05/20] ASoC: es9356: Publish IRQ readiness after cache replay
        https://git.kernel.org/broonie/sound/c/31a717842535
[06/20] ASoC: jz4740: Propagate codec wake-up errors
        https://git.kernel.org/broonie/sound/c/c826c897a330
[07/20] ASoC: max98088: Propagate cache replay errors from bias restore
        https://git.kernel.org/broonie/sound/c/11e145401b68
[08/20] ASoC: ssm2518: Unwind failed power restoration
        https://git.kernel.org/broonie/sound/c/6b4330d590a2
[09/20] ASoC: ssm4567: Unwind failed power restoration
        https://git.kernel.org/broonie/sound/c/4406319f7f52
[10/20] ASoC: tlv320aic3x: Propagate power restoration errors
        https://git.kernel.org/broonie/sound/c/1621a23dd164
[11/20] ASoC: wm8731: Unwind supplies on cache replay failure
        https://git.kernel.org/broonie/sound/c/f7c28c42085b
[12/20] ASoC: wm8770: Unwind supplies on cache replay failure
        https://git.kernel.org/broonie/sound/c/fcfcb17039d9
[13/20] ASoC: wm8804: Propagate cache replay errors from runtime resume
        https://git.kernel.org/broonie/sound/c/a4de439e78dc
[14/20] ASoC: wm8904: Unwind resources on cache replay failure
        https://git.kernel.org/broonie/sound/c/4da4cb28883d
[15/20] ASoC: wm8985: Unwind supplies on cache replay failure
        https://git.kernel.org/broonie/sound/c/76f9631fa81b
[16/20] ASoC: wm8991: Propagate cache replay errors from bias restore
        https://git.kernel.org/broonie/sound/c/745f64b9335b
[17/20] ASoC: wm8993: Unwind supplies on cache replay failure
        https://git.kernel.org/broonie/sound/c/7784ba385367
[18/20] ASoC: wm8996: Unwind supplies on cache replay failure
        https://git.kernel.org/broonie/sound/c/8fe60034e163

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark