Commit graph

1,462,307 commits

Author SHA1 Message Date
Mark Brown
512f614646
ASoC: use .auto_selectable_formats
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says:

This is v2 to add .auto_selectable_formats to each drivers.
I have posted it for all drivers in v1, but is separated into few parts in v2.

[x]: already applied
[o]: this patch-set
[ ]: will post later

	[x]: convert existing .auto_selectable_formats
	[o]: add .auto_selectable_formats on driver (already got Reviewed-by)
	[ ]: add .auto_selectable_formats on driver

Link: https://patch.msgid.link/87mrwmhvjd.wl-kuninori.morimoto.gx@renesas.com
2026-07-09 18:00:14 +01:00
Kuninori Morimoto
5e6f8ad000
ASoC: spacemit: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Link: https://patch.msgid.link/87h5muhvi6.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 18:00:12 +01:00
Kuninori Morimoto
2b7f2b7a2a
ASoC: meson: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://patch.msgid.link/87ik7ahvi9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 18:00:11 +01:00
Kuninori Morimoto
946ddf03d0
ASoC: codecs: pcm*: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Kirill Marinushkin <k.marinushkin@gmail.com>
Link: https://patch.msgid.link/87jyrqhvid.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 18:00:10 +01:00
Kuninori Morimoto
5f195b1ae6
ASoC: amd: use .auto_selectable_formats
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/87ldc6hvil.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 18:00:09 +01:00
Pengpeng Hou
181bce7342
ASoC: codecs: max98090: Propagate runtime regcache_sync() errors
max98090_runtime_suspend() puts the regmap into cache-only mode. Runtime
resume clears cache-only mode, resets the device, and replays cached
register state with regcache_sync(), but currently ignores a failed
replay.

Return the sync error and restore cache-only/dirty state before failing
runtime resume. This deliberately leaves the separate system-resume sync
call unchanged because the source does not provide an equally strong
paired system suspend/cache-only proof for that path.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704040747.56587-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:37 +01:00
Pengpeng Hou
d20de7409d
ASoC: codecs: max98396: Unwind supplies on resume failure
max98396_resume() enables the core, pvdd, and vbat supplies before
leaving cache-only mode, resetting the device, and replaying cached
register state. The function currently ignores regcache_sync() failures,
and the optional pvdd/vbat enable failures return without unwinding
supplies that were already enabled in this resume attempt.

Rework the function to use common error labels. This propagates sync
failures, restores cache-only/dirty state on failed cache replay, and
disables each supply acquired by this resume path before returning the
error.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704040651.47558-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:36 +01:00
Pengpeng Hou
446a8b7a03
ASoC: codecs: rt5682-sdw: Propagate regcache_sync() errors
rt5682_io_init() and rt5682_dev_resume() both leave cache-only mode
before replaying cached register state with regcache_sync(). Both paths
ignore the sync result, which can hide a failed hardware restore.

Propagate regcache_sync() failures from both paths. The first hardware
init path now has a dedicated sync-failure cleanup that restores cache
bypass, cache-only, and dirty-cache state before balancing the runtime
PM reference. The resume path restores both regmaps to cache-only mode
and marks the main cache dirty before returning the error.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704040530.40047-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:35 +01:00
Pengpeng Hou
39dadd459c
ASoC: codecs: rt1320-sdw: Propagate regcache_sync() errors
rt1320_dev_resume() clears cache-only mode for both regmaps and
replays cached register state into the device. Both regcache_sync()
calls currently ignore their return values, so resume can report
success even if either replay failed.

Check both sync operations and return the first error. On failure,
restore both regmaps to cache-only mode and mark both caches dirty,
so a later successful resume attempt starts from a coherent suspended
cache state instead of a partially live pair of regmaps.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704040418.28181-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:34 +01:00
Pengpeng Hou
a407338ca6
ASoC: codecs: cs4349: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state during
runtime resume. cs4349_runtime_resume() currently ignores that failure
and returns success.

Propagate the error, restore cache-only/dirty state, and hold reset low
again on sync failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704040330.23616-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:33 +01:00
Pengpeng Hou
56ce50099e
ASoC: codecs: wm8962: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state during
runtime resume. wm8962_runtime_resume() currently ignores that failure
and continues programming the device.

Propagate the error, restore cache-only/dirty state, and unwind the
supplies and clock acquired by runtime resume.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704040220.12045-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:32 +01:00
Pengpeng Hou
d5f4c13784
ASoC: codecs: wm5100: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state during
runtime resume. wm5100_runtime_resume() currently ignores that failure.

Propagate the error, restore cache-only/dirty state, and unwind the LDO
and core supplies acquired by runtime resume.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704040132.8278-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:31 +01:00
Pengpeng Hou
9497ea79d7
ASoC: codecs: wm2200: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state during
runtime resume. wm2200_runtime_resume() currently ignores that failure.

Propagate the error, restore cache-only/dirty state, and unwind the LDO
and core supplies acquired by runtime resume.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260704040044.2402-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:30 +01:00
Pengpeng Hou
5e5ea96e68
ASoC: codecs: cs35l32: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state during
runtime resume. cs35l32_runtime_resume() currently ignores that failure.

Propagate the error, restore cache-only/dirty state, and unwind the
reset and supply state acquired by runtime resume.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035957.97236-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:29 +01:00
Pengpeng Hou
72f1d7d21f
ASoC: codecs: wcd938x-sdw: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state during
runtime resume. wcd938x_sdw_runtime_resume() currently ignores that
failure.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035857.90264-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:28 +01:00
Pengpeng Hou
0d6b2d6f93
ASoC: codecs: tas2783-sdw: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state after
SoundWire resume or attach handling. tas2783 currently ignores that
failure.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035746.82560-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:27 +01:00
Pengpeng Hou
70f88374e4
ASoC: codecs: tas2552: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state after
runtime resume. tas2552_runtime_resume() currently ignores that failure
and returns success.

Propagate the error, restore cache-only/dirty state, and put the
amplifier back into shutdown on sync failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035705.77946-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:26 +01:00
Pengpeng Hou
aeb606a643
ASoC: codecs: rt9120: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state after
runtime resume. rt9120_runtime_resume() currently ignores that failure
and returns success.

Propagate the error, restore cache-only/dirty state, and power the
device back down on sync failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035548.67713-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:25 +01:00
Pengpeng Hou
2c5e237e7e
ASoC: codecs: rt1318-sdw: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state after the
SoundWire slave has reinitialized. rt1318_dev_resume() currently ignores
that failure and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035437.57792-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:24 +01:00
Pengpeng Hou
49ea357ea7
ASoC: codecs: max98388: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state after
resume. max98388_resume() currently ignores that failure and returns
success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035316.47011-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:23 +01:00
Pengpeng Hou
83cc6d88e3
ASoC: codecs: max98373: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state after
resume. max98373_resume() currently ignores that failure and returns
success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035204.39073-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:22 +01:00
Pengpeng Hou
ea70ad6ac2
ASoC: codecs: lpass-tx-macro: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state. The TX
macro MCLK helper and runtime resume path currently ignore that failure
and report success.

Propagate the error from the MCLK helper users and from runtime resume.
If runtime resume fails after enabling clocks, restore cache-only/dirty
state and unwind the clocks acquired by the resume path.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704035052.29804-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:21 +01:00
Pengpeng Hou
e38cbb7524
ASoC: codecs: lpass-rx-macro: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state. The RX
macro MCLK helper and runtime resume path currently ignore that failure
and report success.

Propagate the error from the MCLK helper users and from runtime resume.
If runtime resume fails after enabling clocks, restore cache-only/dirty
state and unwind the clocks acquired by the resume path.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704034946.20369-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:45:20 +01:00
Pengpeng Hou
abe8ddff80
ASoC: codecs: rt5514: Propagate bias restore errors
rt5514_set_bias_level() restores normal recording settings when leaving
the DSP-enabled state, but ignores both the patch write and
regcache_sync() failures. The bias transition can therefore report
success even when the restore did not complete.

Propagate the write and sync errors from the bias-level restore path.
Only clear dsp_enabled after both restore operations succeed, so a failed
restore keeps the internal state retryable.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704074550.57755-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:16:19 +01:00
Pengpeng Hou
e857b163c8
ASoC: codecs: wsa881x: Propagate regcache_sync() errors
wsa881x_runtime_resume() powers the device up, waits for SoundWire
initialization, leaves cache-only mode, and replays cached register
state. It currently ignores regcache_sync() failures and returns
success.

Propagate sync failures, restore cache-only/dirty state, and undo the
shutdown GPIO state acquired by resume.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704074434.54200-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:11:53 +01:00
Pengpeng Hou
f047e6a0f9
ASoC: codecs: rt722-sdca-sdw: Propagate regcache_sync() errors
rt722_sdca_dev_resume() waits for SoundWire initialization, leaves
cache-only mode, and replays cached register state. It currently ignores
regcache_sync() failures and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704074350.53023-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:08:16 +01:00
Pengpeng Hou
c9ad95acab
ASoC: codecs: rt1316-sdw: Propagate regcache_sync() errors
rt1316_dev_resume() waits for SoundWire initialization, leaves cache-
only mode, and replays cached register state. It currently ignores
regcache_sync() failures and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704074238.50145-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:07:25 +01:00
Pengpeng Hou
439f04ca42
ASoC: codecs: rt1017-sdca-sdw: Propagate regcache_sync() errors
rt1017_sdca_dev_resume() waits for SoundWire initialization, leaves
cache-only mode, and replays cached register state. It currently ignores
regcache_sync() failures and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704074137.47606-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:06:33 +01:00
Pengpeng Hou
7a08868263
ASoC: codecs: rt721-sdca-sdw: Propagate regcache_sync() errors
rt721_sdca_dev_resume() clears cache-only mode for both regmaps and
replays cached register state. Both regcache_sync() calls currently
ignore their return values.

Check both sync operations, return the first error, and restore both
regmaps to cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704073758.37156-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:03:53 +01:00
Pengpeng Hou
ba8c728e75
ASoC: codecs: rt712-sdca-sdw: Propagate regcache_sync() errors
rt712_sdca_dev_resume() clears cache-only mode for both regmaps and
replays cached register state. Both regcache_sync() calls currently
ignore their return values.

Check both sync operations, return the first error, and restore both
regmaps to cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704073646.33065-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 17:02:58 +01:00
Pengpeng Hou
f814f9dfdc
ASoC: codecs: rt712-sdca-dmic: Propagate regcache_sync() errors
rt712_sdca_dmic_dev_resume() clears cache-only mode for both regmaps and
replays cached register state. Both regcache_sync() calls currently
ignore their return values.

Check both sync operations, return the first error, and restore both
regmaps to cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704073524.27201-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 16:59:07 +01:00
Pengpeng Hou
6ed25217ae
ASoC: codecs: wsa884x: Propagate regcache_sync() errors
wsa884x_runtime_resume() leaves cache-only mode and replays cached
register state. It currently ignores regcache_sync() failures and
returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704072616.88634-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 16:58:24 +01:00
Pengpeng Hou
cc5c698bbc
ASoC: codecs: wsa883x: Propagate regcache_sync() errors
wsa883x_runtime_resume() leaves cache-only mode and replays cached
register state. It currently ignores regcache_sync() failures and
returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704072454.80981-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 16:57:39 +01:00
Pengpeng Hou
495d266f67
ASoC: codecs: wcd939x-sdw: Propagate regcache_sync() errors
wcd939x_sdw_runtime_resume() leaves cache-only mode and replays cached
register state when a regmap is present. It currently ignores
regcache_sync() failures and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704072347.76000-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 16:56:51 +01:00
Pengpeng Hou
a1d01870b4
ASoC: codecs: wcd937x-sdw: Propagate regcache_sync() errors
wcd937x_sdw_runtime_resume() leaves cache-only mode and replays cached
register state when a regmap is present. It currently ignores
regcache_sync() failures and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704072236.70862-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 16:55:30 +01:00
Pengpeng Hou
ca571406c5
ASoC: codecs: rt5645: Propagate regcache_sync() errors
Both rt5645_resume() and rt5645_sys_resume() leave cache-only mode and
replay cached register state, but both paths ignore regcache_sync()
failures and can report success.

Check both sync operations, return the error, and restore cache-
only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704072031.60768-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 16:54:53 +01:00
Pengpeng Hou
808d65f3fb
ASoC: codecs: pm4125-sdw: Propagate regcache_sync() errors
pm4125_sdw_runtime_resume() leaves cache-only mode and replays cached
register state when a regmap is present. It currently ignores
regcache_sync() failures and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704071933.52450-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-09 16:54:05 +01:00
Pengpeng Hou
b64317ec00
ASoC: codecs: max98373-sdw: Propagate regcache_sync() errors
max98373_resume() waits for SoundWire initialization, leaves cache-only
mode, and replays cached register state. It currently ignores
regcache_sync() failures and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704074044.45520-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 19:30:49 +01:00
Pengpeng Hou
b2a06f7c95
ASoC: codecs: max98363: Propagate regcache_sync() errors
max98363_resume() waits for SoundWire initialization, leaves cache-only
mode, and replays cached register state. It currently ignores
regcache_sync() failures and returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704074000.42578-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 19:01:32 +01:00
Pengpeng Hou
29da72e58f
ASoC: codecs: uda1342: Leave cache-only mode before syncing
uda1342_suspend() puts the regmap into cache-only mode. uda1342_resume()
marks the cache dirty and syncs it, but does not first leave cache-only
mode and ignores sync failures.

Leave cache-only mode before syncing the dirty cache, propagate sync
failures, and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704072140.67222-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 19:00:51 +01:00
Pengpeng Hou
ed1d19d37f
ASoC: codecs: max98927: Propagate regcache_sync() errors
max98927_resume() leaves cache-only mode and replays cached register
state into the device. It currently ignores regcache_sync() failures and
returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260704071848.47928-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 18:59:40 +01:00
Jiri Slaby (SUSE)
907e6a7010
ASoC: pm4125: Switch to irq_domain_create_linear()
irq_domain_add_linear() is going away as being obsolete now. Switch to
the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct
device_node. Therefore, of_fwnode_handle() is added around the
parameter.

Note some of the users can likely use dev->fwnode directly instead of
indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not
guaranteed to be set for all, so this has to be investigated on case to
case basis (by people who can actually test with the HW).

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Srinivas Kandagatla <srini@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260708095840.385526-1-jirislaby@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 18:57:20 +01:00
Chancel Liu
cf3bd20c43
ASoC: dt-bindings: dmic-codec: Add audio-graph port support
Add port property referencing audio-graph-port.yaml to allow DMIC to be
used with audio-graph-card and audio-graph-card2.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260707065725.312450-4-chancel.liu@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 18:07:59 +01:00
Chancel Liu
28017bf7f7
ASoC: dt-bindings: fsl,micfil: Add audio-graph port support
Add port property referencing audio-graph-port.yaml to allow MICFIL to
be used with audio-graph-card and audio-graph-card2.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260707065725.312450-3-chancel.liu@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 18:07:57 +01:00
Chancel Liu
7ccad56689
ASoC: dt-bindings: wlf,wm8524: Add audio-graph port support
Add port property referencing audio-graph-port.yaml to allow WM8524 to
be used with audio-graph-card and audio-graph-card2.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260707065725.312450-2-chancel.liu@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 18:07:56 +01:00
Kuninori Morimoto
cb63976eac
ASoC: amd: acp6x-mach: tidyup strange alignment
yc_acp_quirk_table[] has strange alignment item.
Tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/874iiageo4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-08 17:51:15 +01:00
Vijendar Mukunda
6943ea9942
ASoC: SOF: amd: add missing blank line between Kconfig entries
Add a missing blank line between SND_SOC_SOF_AMD_ACP70 and
SND_SOC_SOF_AMD_ACP7X config entries to conform to Kconfig formatting
convention.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260707060918.2535962-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-07 15:06:48 +01:00
Mark Brown
8e5a6599a3
ASoC: cs35l3x: drain threaded IRQs before runtime suspend
Runyu Xiao <runyu.xiao@seu.edu.cn> says:

Both cs35l33 and cs35l34 can enter runtime suspend while their threaded
IRQ handlers are still reachable. The suspend path then switches the
driver into regcache cache-only mode and powers the codec down, while
the IRQ thread still expects live status-register access.

This issue was found by our static analysis tool and manually audited on
Linux v6.18.21. Directed QEMU no-device validation further showed that,
after runtime_suspend() completed, the real threaded handlers could
still be injected and would continue past volatile regmap read failures
into their release/update paths.

This series keeps the fix on the suspend actor and applies the same
runtime-suspend/threaded-IRQ ordering repair boundary to both drivers:

- track whether request_threaded_irq() actually succeeded
- disable_irq() before cache_only/power-off in runtime suspend
- enable_irq() only after regcache_sync() in runtime resume

That drains any in-flight threaded handler and blocks new IRQ handling
while the codec is suspended, without mixing in larger IRQ-thread
defensive cleanups.

Build-tested by compiling cs35l33.o and cs35l34.o.

No cs35l33/cs35l34 hardware was available for end-to-end runtime
testing.

Link: https://patch.msgid.link/20260611161553.3378721-1-runyu.xiao@seu.edu.cn
2026-07-06 14:39:25 +01:00
Runyu Xiao
4105a4c067
ASoC: cs35l34: drain threaded IRQ before runtime suspend
cs35l34_runtime_suspend() currently switches the codec into
regcache_cache_only(true), asserts reset low, and powers the device off
without first quiescing the threaded IRQ registered by
devm_request_threaded_irq(). That leaves a window where
cs35l34_irq_thread() can still run after suspend has removed live
hardware access.

A running system can reach this during runtime PM while the driver still
has critical fault IRQs unmasked. If the threaded handler runs in that
window, it reads volatile INT_STATUS_1..4 after cache_only has been
enabled, ignores the regmap_read() failures, and can still execute the
PROT_RELEASE_CTL release sequence or the BST fault power-down writes.

Use disable_irq() before entering cache_only/reset-low/power-off so any
in-flight threaded handler is drained and no new IRQ thread can run
while the device is suspended. Re-enable the IRQ only after
runtime_resume() has restored live register access with regcache_sync().
Since probe only logs request_threaded_irq() failures and keeps going,
track whether the IRQ was actually installed before disabling or
re-enabling it.

Fixes: c1124c09e1 ("ASoC: cs35l34: Initial commit of the cs35l34 CODEC driver.")
Cc: stable@vger.kernel.org
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260611161553.3378721-3-runyu.xiao@seu.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-06 14:39:23 +01:00
Runyu Xiao
e074c12c42
ASoC: cs35l33: drain threaded IRQ before runtime suspend
cs35l33_runtime_suspend() currently switches the codec into
regcache_cache_only(true) and powers it down without first quiescing the
threaded IRQ registered by devm_request_threaded_irq(). That leaves a
window where cs35l33_irq_thread() can still run after suspend has closed
off live register access.

A running system can reach this during runtime PM while the driver still
has critical fault IRQs unmasked. If the threaded handler runs in that
window, it reads volatile INT_STATUS_1/2 after cache_only has been
enabled, ignores the regmap_read() failures, and can still drive the
AMP_SHORT_RLS, CAL_ERR_RLS, OTE_RLS, and OTW_RLS release paths.

Use disable_irq() before entering cache_only/power-off so any in-flight
threaded handler is drained and no new IRQ thread can run during the
suspended state. Re-enable the IRQ only after runtime_resume() has
restored live register access with regcache_sync(). Since probe only
warns if devm_request_threaded_irq() fails, track whether the IRQ was
actually installed before disabling or re-enabling it.

Fixes: 3333cb7187 ("ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.")
Cc: stable@vger.kernel.org
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260611161553.3378721-2-runyu.xiao@seu.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2026-07-06 14:39:22 +01:00