Skip to content

ASoC: codec drivers: sort the reg_defaults tables

Peter Ujfalusi linux-sound stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ASoC: ml26124: sort the register default tablesound/soc/codecs/ml26124.c+3 -10 replies
2/4ASoC: cx2072x: sort the register default tablesound/soc/codecs/cx2072x.c+61 -610 replies
3/4ASoC: max9860: sort the register default tablesound/soc/codecs/max9860.c+1 -10 replies
4/4ASoC: sti-sas: sort the register default tablesound/soc/codecs/sti-sas.c+1 -11 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchPatrice Chotard
1/4
2/4
3/4
4/4R-b

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/4] ASoC: codec drivers: sort the reg_defaults tables

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(-)
Signature · 1 line
2.55.0