[PATCH 0/4] ASoC: codec drivers: sort the reg_defaults tables
Peter Ujfalusi <[email protected]> Wed, 5 Aug 2026 15:28:07 +0300
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
reg_defaults must be sorted by ascending register address, since
regcache_lookup_reg() locates entries in it with bsearch(). When a table is
not sorted, bsearch() cannot find the entries which follow a descending step,
so regcache_reg_needs_sync() falls back to reporting that a sync is needed for
them. Those registers are then written to the device on every regcache_sync()
even when they were never touched.
See commit fd80df352ba1 ("regcache: Add support for sorting defaults arrays")
for the same problem in a different context.
The series is based on broonie/for-linus (05eebef3c7b2).
Affected tables:
ml26124_reg 1 of 79 entries unreachable
cx2072x_reg_defaults 75 of 132 entries unreachable
max9860_reg_defaults 1 of 14 entries unreachable
stih407_sas_reg_defaults 1 of 2 entries unreachable
Peter Ujfalusi (4):
ASoC: ml26124: sort the register default table
ASoC: cx2072x: sort the register default table
ASoC: max9860: sort the register default table
ASoC: sti-sas: sort the register default table
sound/soc/codecs/cx2072x.c | 122 ++++++++++++++++++-------------------
sound/soc/codecs/max9860.c | 2 +-
sound/soc/codecs/ml26124.c | 4 +-
sound/soc/codecs/sti-sas.c | 2 +-
4 files changed, 66 insertions(+), 64 deletions(-)
--
2.55.0