summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-08-07 15:45:39 +0100
committerMark Brown <broonie@kernel.org>2026-08-07 15:45:39 +0100
commit65c940d3c9cc765b512aff712014734a1852aa8b (patch)
tree82d251d54a31f8bd26bd42fed12d2c4c3210061a /tools/perf/scripts/python/syscall-counts.py
parent6d0451f9bf1a3d62e902bfdd68dc997409d65694 (diff)
parent3673b33633a5daf2f52aff03b57f7b25352fe234 (diff)
ASoC: Realtek codecs: sort the reg_defaults tables
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> says: reg_defaults must be sorted by ascending register address as regcache_lookup_reg() locates the entries in it with bsearch(), see commit fd80df352ba1 ("regcache: Add support for sorting defaults arrays"). These tables have entries which are out of order, so the binary search does not find part of them. For those registers regcache_reg_needs_sync() cannot compare the cached value against the default and reports that a sync is needed, so they are written to the device on every regcache_sync() even when they were never touched. On a RT712-VA this is not silent: the MIC_ARRAY function does not exist on that part, so the extra writes are NAKed by the codec and the bus driver reports soundwire_intel.link.0: Msg ignored for Slave 6 (for addr: 0x8e00) for every resume. For the other tables the extra writes are accepted and only cost bus bandwidth on every runtime resume. The sorting patches only reorder the existing entries, the text of every entry is kept verbatim and no default value is changed. Each table was verified by evaluating the register addresses and replaying lib/bsearch.c on them. Entries not reachable by the binary search, per table: rt274_reg 7 (of 33) rt286_reg 7 (of 39) rt298_reg 7 (of 39) rt700_reg_defaults 6 (of 320) rt711_reg_defaults 5 (of 269) rt711_sdca_reg_defaults 1 (of 54) rt711_sdca_mbq_defaults 2 (of 25) rt712_sdca_dmic_reg_defaults 3 (of 42) rt712_sdca_reg_defaults 4 (of 19) rt715_reg_defaults 25 (of 323) rt715_reg_defaults_sdca 7 (of 78) rt715_mbq_reg_defaults_sdca 1 (of 32) rt721_sdca_reg_defaults 12 (of 41) rt1017_sdca_reg_defaults 4 (of 110) rt1316_reg_defaults 1 (of 47) rt1318_reg 2 (of 142) rt1318_reg_defaults 3 (of 81) rt700 and rt715-sdca also have entries listed twice, those are dropped in separate patches first so that the sorting patches are pure reorders. Found by an audit of all reg_defaults tables under sound/. Other codec drivers have unsorted reg_defaults too, those are not addressed here. Link: https://patch.msgid.link/20260805090240.16991-1-peter.ujfalusi@linux.intel.com
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions