ASoC: tas2783-sdw: stop describing the Latency and XU ID/Version Controls
Subsystems (3)
PATCH 1/1 ASoC: tas2783-sdw: stop describing the Latency and XU ID/Version Controls
The read-only Control list and tas2783_sdca_mbq_size() still describe the Latency Control of every Entity - twenty-one registers in all - and the XU ID and XU Version of the Extension Unit. The driver never reads any of them, and the platform firmware seen so far describes exactly one of the Latencies (FU21, as a DisCo constant) and neither of the two XU Controls. XU ID answers COMMAND_IGNORED on the bus in every power state.
Since commit f4ffa3820949 ("ASoC: tas2783-sdw: do not cache read-only Controls") they have no defaults and are marked volatile, so every access goes to the bus. Remove them from both tables: the driver then neither declares them readable nor sizes them, and the read-only list is left with the readings the device actually reports - Clock Valid, the actual power state, the protection status and the algorithm ready flags.
No functional change for the driver itself, which does not read any of the removed registers.
--- sound/soc/codecs/tas2783-sdw.c | 53 +++------------------------------- 1 file changed, 4 insertions(+), 49 deletions(-)
sound/soc/codecs/tas2783-sdw.c +4 -49
@@ -333,7 +333,6 @@ static int tas2783_sdca_mbq_size(struct device *dev, u32 reg)case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_PPU26 ,0x11 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_TG23 ,0x10 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x01 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x08 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x0a ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x10 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x14 ,0 ):
@@ -419,7 +418,6 @@ static int tas2783_sdca_mbq_size(struct device *dev, u32 reg)case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_FU127 ,0x0b ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_FU26 ,0x0b ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_FU26 ,0x0b ,1 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x07 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x09 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_MFPU21 ,0x12 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_MFPU26 ,0x12 ,0 ):
@@ -431,27 +429,8 @@ static int tas2783_sdca_mbq_size(struct device *dev, u32 reg)case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_IT21 ,0x11 ,0 ):return 2 ; -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_FU23 ,0x10 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_IT21 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_IT26 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_IT28 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_IT29 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_OT23 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_OT24 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_OT25 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_OT28 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_OT127 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_MU26 ,0x06 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_FU127 ,0x10 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_FU26 ,0x10 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x06 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x12 ,0 ):case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_XU22 ,0x13 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_MFPU21 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_MFPU26 ,0x08 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_SAPU29 ,0x05 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_PPU21 ,0x06 ,0 ): -case SDW_SDCA_CTL (1 ,TAS2783_SDCA_ENT_PPU26 ,0x06 ,0 ):return 4 ;default :
@@ -465,47 +444,23 @@ static bool tas2783_readable_register(struct device *dev, unsigned int reg) }/* -* The read-only SDCA Controls the driver describes: the Latency of every -* Entity, the Clock Valid of every Clock Source, the actual power state of -* the Power Domain Entity, the protection status, the algorithm ready flag -* and the Extension Unit id, version and firmware download status. None of -* them is a setting; every one is a reading of device state. +* The read-only SDCA Controls the driver describes: the Clock Valid of every +* Clock Source, the actual power state of the Power Domain Entity, the +* protection status and the algorithm ready flags. None of them is a +* setting; every one is a reading of device state. */ static bool tas2783_read_only_control (unsigned int reg) {switch (reg) { -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_FU21 ,0x10 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_FU23 ,0x10 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_FU26 ,0x10 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_XU22 ,0x06 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_XU22 ,0x07 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_XU22 ,0x08 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_CS24 ,0x02 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_CS21 ,0x02 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_CS25 ,0x02 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_CS26 ,0x02 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_CS28 ,0x02 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_PDE23 ,0x10 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_UDMPU23 ,0x06 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_SAPU29 ,0x05 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_SAPU29 ,0x11 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_PPU21 ,0x06 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_PPU26 ,0x06 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_IT21 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_IT29 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_IT26 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_IT28 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_OT24 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_OT23 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_OT25 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_OT28 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_MU26 ,0x06 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_OT127 ,0x08 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_FU127 ,0x10 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_CS127 ,0x02 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_MFPU21 ,0x08 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_MFPU21 ,0x04 ,0 ): -case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_MFPU26 ,0x08 ,0 ):case SDW_SDCA_CTL (FUNC_NUM_SMART_AMP ,TAS2783_SDCA_ENT_MFPU26 ,0x04 ,0 ):return true;
base-commit: 604ac544390f420332b10738cc10b29a2e91bac8
Signature · 1 line
2.53.0
Mark Brown
maintainerQuoted 1 line · Andrey Golovko
ASoC: tas2783-sdw: stop describing the Latency and XU ID/Version Controls
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/1] ASoC: tas2783-sdw: stop describing the Latency and XU ID/Version Controls
https://git.kernel.org/broonie/sound/c/b2c5435300c8
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark