ASoC: tas2764: Wait for ramp-down after shutdown
authorHector Martin <marcan@marcan.st>
Sat, 8 Feb 2025 01:03:25 +0000 (01:03 +0000)
committerMark Brown <broonie@kernel.org>
Sun, 16 Feb 2025 23:51:27 +0000 (23:51 +0000)
commit08a66f55f7246d477b19620a953476dfc02beefc
treedca24a4da7634ebba886759230821e42fd91a516
parent1c3b5f37409682184669457a5bdf761268eafbe5
ASoC: tas2764: Wait for ramp-down after shutdown

When we shut down the amp, we need to wait for the built-in ramp-down
before we can remove the TDM clocks. There is no documented status
regiter to poll, so the best we can do is a delay. Datasheet says 5.9ms
for ramp-down and 1.5ms between shutdown and next startup, so let's do
6ms after mute and 2ms after shutdown. That gives us a cumulative 8ms
for ramp-down and guaratees the required minimum shutdown time.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20250208-asoc-tas2764-v1-2-dbab892a69b5@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2764.c