Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: codec drivers: sort the reg_defaults tables
@ 2026-08-05 12:28 Peter Ujfalusi
  2026-08-05 12:28 ` [PATCH 1/4] ASoC: ml26124: sort the register default table Peter Ujfalusi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2026-08-05 12:28 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Patrice Chotard; +Cc: linux-sound, stable


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-05 12:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 12:28 [PATCH 0/4] ASoC: codec drivers: sort the reg_defaults tables Peter Ujfalusi
2026-08-05 12:28 ` [PATCH 1/4] ASoC: ml26124: sort the register default table Peter Ujfalusi
2026-08-05 12:28 ` [PATCH 2/4] ASoC: cx2072x: " Peter Ujfalusi
2026-08-05 12:28 ` [PATCH 3/4] ASoC: max9860: " Peter Ujfalusi
2026-08-05 12:28 ` [PATCH 4/4] ASoC: sti-sas: " Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox