diff options
| author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2026-10-20 14:57:06 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-10-20 15:54:26 +0100 |
| commit | 6cc7db9fdd06c992ee38793b2d556524fc0cf574 (patch) | |
| tree | 123fb496b689a7a14e22887ac3446be425252ab8 /scripts/basic | |
| parent | ff404ef11b975baf38c4472c51a6674c239e8021 (diff) | |
| download | linux-6cc7db9fdd06c992ee38793b2d556524fc0cf574.tar.gz linux-6cc7db9fdd06c992ee38793b2d556524fc0cf574.zip | |
ASoC: cs35l56: Wait for firmware timer expiry before system suspend
On CS35L5x firmware older than 3.13.7 (B0 silicon) and 4.7.16 (B2 silicon)
a SoundWire bus reset is not allowed within 250ms of the last firmware
timer start.
This is already avoided during runtime suspend by the various idle
timeouts. System suspend can happen at any time so needs special
protection. The driver cannot cancel the firmware timer, so it must wait
long enough for the timer to expire.
The delay is placed in the suspend stage because typically this has less
impact on end users than delays in resuming. The amp is in PS3 power
state when suspending and no new timers will be started in this state.
An extra 10ms is added to the delay to avoid a race on the exact instant
the firmware timer expires.
There is no need to have the delay for every driver instance. The timers
on each amp will expire in parallel, so the delay is only needed once.
A global flag is used so that the first instance to reach its suspend()
callback will delay and then clear the flag. The cs35l56_fw_idle_wait_lock
mutex is to ensure this is still safe if async_suspend was ever enabled
for SoundWire devices.
Fixes: e496112529006 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Reported-by: Ferenc Lengyel <leferi99@gmail.com>
Closes: https://github.com/thesofproject/linux/issues/5898
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20261020135706.3573260-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
