Skip to content

ASoC: tas2783-sdw: volume and firmware load fixes

Matthew Schwartz linux-sound lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ASoC: tas2783-sdw: keep the volume settings across resetssound/soc/codecs/tas2783-sdw.c+151 -85 replies
2/3ASoC: tas2783-sdw: load the firmware synchronouslysound/soc/codecs/tas2783-sdw.c+26 -572 replies
3/3ASoC: tas2783-sdw: refuse playback when the init writes failedsound/soc/codecs/tas2783-sdw.c+11 -03 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchLee Mann
SeriesT-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] ASoC: tas2783-sdw: volume and firmware load fixes

Three tas2783-sdw fixes found while bringing up the ASUS ROG Xbox Ally X20 [1], whose two TAS2783 amps share a SoundWire link that is powered off when idle. They don't depend on that series and apply on their own, but they were tested on the X20 with it applied.

Patch 1 keeps the Amp Volume and Speaker Volume settings in the driver. The register cache is dropped on every reset, so the controls fail with -EBUSY while the amp is runtime suspended, and on a link that powers off when idle a setting is lost on the next wake. It supersedes Lee Mann's patch for the volume lost across system suspend [2].

Patch 2 loads the firmware synchronously instead of waiting up to three seconds for an asynchronous callback, which could leave an amp with its firmware but without its SDCA init writes, or run after an unbind. Patch 3 then refuses playback, in hw_params and in the port prepare of a resumed stream, when those init writes failed.

On the X20 the firmware download takes about 1.2 s per amp from cold and 0.2 s per amp on a wake, when the program RAM is not downloaded again.

[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]

Matthew Schwartz (3):
ASoC: tas2783-sdw: keep the volume settings across resets
ASoC: tas2783-sdw: load the firmware synchronously
ASoC: tas2783-sdw: refuse playback when the init writes failed

 sound/soc/codecs/tas2783-sdw.c | 253 ++++++++++++++++++++++++---------
 1 file changed, 188 insertions(+), 65 deletions(-)

base-commit: 2450a9bcd3423612f614ea15ff44966fed189191

Signature · 1 line
2.56.0