Re: [PATCH v2 2/2] ASoC: tas2783-sdw: do not cache read-only Controls
From: Charles Keepax
Date: Tue Aug 18 2026 - 04:17:02 EST
On Sat, Aug 15, 2026 at 02:45:00PM +0300, Andrey Golovko wrote:
> On Fri, Aug 14, 2026 at 04:13:42PM +0100, Mark Brown wrote:
>
> > Does this work for multibyte reads? The regmap has val_size set to 8
> > but some of the read only registers are multibyte. For SoundWire
> > val_bits doesn't really matter so you should just be able to set that to
> > 32.
>
> It does not, thank you. Twenty of the Controls in the list are wider
> than one byte, and with val_bits = 8 the MBQ layer refuses each of them
> before anything reaches the bus, so the patch on its own would replace
> an answer from the cache with -EINVAL.
>
> The widening is a patch of its own because the calibration write relied
> on the old width, so I have sent both as v3 with it in front, against
> for-7.3:
>
> https://lore.kernel.org/linux-sound/20260815112000.4180-1-andrey.golovko@xxxxxxxxx/
>
> The cover letter has the list of the multi-byte Controls and what the
> two patches were measured to do on the machine here.
>
> One thing I noticed while checking the sizes, unrelated to this series:
> FU21 0x10 and UDMPU23 0x06 are in the read-only list but appear nowhere
> in tas2783_sdca_mbq_size(), which returns 0 for them, so
> tas2783_readable_register() refuses them and they are unreachable
> through the regmap in either direction. Harmless as it stands, nothing
> touches them, but the size callback looks incomplete rather than
> deliberate. I can add them, or leave that to TI along with the rest of
> the reg_defaults questions I owe them a mail about.
One thing that is worth noting, is that sometimes in SDCA values
are DisCo constants, these are registers where the value is just
hard coded in the ACPI and typically not implemented in the
hardware. Generally, these are implemented as non-read/non-write
registers with an entry in the default array. This allows the
constant value to be read through the regmap, and driver code
generally doesn't need to care that the register is fictional.
Both of the controls you list are latency which is commonly done
as a DisCo constant, although that said it is also not a control
that is AFAIK used by any implementation so could also just have
been forgotten.
Thanks,
Charles