[PATCH v2 0/9] ASoC: stop dependent resume work after restore failures

From: Pengpeng Hou

Date: Tue Oct 13 2026 - 23:27:55 EST


This revision addresses Mark's cache-mode concern and Charles's WM8978
bias rollback question. It also accounts for the next suspend after a
failed resume: the ASoC wrapper reports the callback error but marks the
component resumed, so leaving an IRQ disabled needs driver-local ownership
tracking to avoid disabling it a second time in the next suspend.

All nine changes retain best-effort card resume. They do not add framework
rollback or automatic retries. The RT5682 SoundWire branch and RT5677
retained VAD path keep their existing behavior. RT5640 handles both IRQ
producers of jack work and clears ownership when either IRQ is freed.
RT5677 also propagates normal-mode transport write errors and remembers
pending restoration across later changes to the requested VAD mode.

These issues were found by our static-analysis tool and manually reviewed.
The code and descriptions were prepared with gpt 5 assistance; the patches
carry the corresponding Assisted-by trailers.

Changes since v1:
- restore cache-only mode and preserve dirty state on replay errors
- avoid repeated suspend-owned IRQ disables after failed resume
- return WM8978 bias to OFF on failure, without claiming hardware rollback
is guaranteed when the bias callback itself ignores register errors
- clear WM8978 PLL power as system suspend does
- quiesce both RT5640 jack IRQs and reject fresh setup while unrestored
- fix RT5677's normal-mode write error propagation and pending-restore state
- preserve the per-driver power, SoundWire and DSP VAD distinctions
- resend all members as one series rather than separate unthreaded posts

Previous series:
https://lore.kernel.org/all/20260906034321.86080-1-hppiscas@xxxxxxx/

Base: 8ef28aef33f2d5da6959ad6b579ec3cfccc009f6 (sound/for-next)

1. ASoC: nau8821: restore safe state after resume errors
2. ASoC: nau8824: restore safe state after resume errors
3. ASoC: nau8825: restore safe state after resume errors
4. ASoC: rt5663: restore safe state after resume errors
5. ASoC: rt5682s: restore safe state after resume errors
6. ASoC: rt5682: restore safe state after resume errors
7. ASoC: wm8978: restore safe state after resume errors
8. ASoC: rt5640: restore safe state after resume errors
9. ASoC: rt5677: restore safe state after resume errors