linux/sound/soc
Mark Brown 33c5aaf693
ASoC: cs35l41/cs35l45/cs4265: 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
fd80df352b ("regcache: Add support for sorting defaults arrays").

These three 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.

The 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:

  cs35l41_reg           2 (of 47)
  cs35l45_defaults     36 (of 73)
  cs4265_reg_defaults   3 (of 16)

For cs35l45 this is nearly half of the table: the DSP1_RX*_RATE and
DSP1_TX*_RATE registers sit in the middle of it while their addresses are
far above everything else, which cuts the search off from the whole
0x4c40 - 0xf010 range.

Found by an audit of all reg_defaults tables under sound/, the SoundWire
codec drivers are fixed by a separate series.

Link: https://patch.msgid.link/20260805082413.26174-1-peter.ujfalusi@linux.intel.com
2026-08-05 13:34:37 +01:00
..
adi
amd ASoC: amd: yc: Add DMI quirk for MSI Raider A18 HX A7VHG 2026-08-05 12:52:55 +01:00
apple ASoC: apple: mca: Use guard() for mutex locks 2026-04-27 06:52:25 +09:00
atmel Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
au1x ASoC: au1x: name back to pcm_new()/pcm_free() 2026-03-16 13:37:45 +00:00
bcm ASoC: bcm: cygnus: use scoped child node loop 2026-06-12 16:12:11 +01:00
cirrus ASoC: ep93xx: Fix unchecked clk_prepare_enable() and add rollback on failure 2026-03-30 19:38:22 +01:00
codecs ASoC: cs35l41/cs35l45/cs4265: sort the reg_defaults tables 2026-08-05 13:34:37 +01:00
dwc ASoC: dwc: name back to pcm_new()/pcm_free() 2026-03-16 13:37:49 +00:00
fsl ASoC: fsl: fix m2m_init error path cleanup in fsl_asrc and fsl_easrc 2026-07-19 22:25:13 +01:00
generic Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
google ASoC: google: name back to pcm_new()/pcm_free() 2026-03-16 13:37:52 +00:00
hisilicon ASoC: hisilicon: Use guard() for spin locks 2026-06-12 14:20:37 +01:00
img ASoC: img: img-spdif-out: Use guard() for spin locks 2026-06-11 20:43:32 +01:00
intel ASoC: SOF: topology: Use acpi mach from the machine driver 2026-07-30 23:19:52 +01:00
jz4740 Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
kirkwood ASoC: kirkwood: name back to pcm_new()/pcm_free() 2026-03-16 13:37:54 +00:00
loongson ASoC: Updates for v7.2 2026-06-15 20:19:22 +02:00
mediatek Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
meson ASoC: meson: aiu: fifo-spdif: soft reset the S/PDIF datapath on start/stop 2026-07-07 23:01:44 +01:00
mxs ASoC: mxs-sgtl5000: disable MCLK on error paths of mxs_sgtl5000_probe() 2026-04-01 14:01:25 +01:00
pxa ASoC: pxa: integrate sound/arm/pxa2xx into sound/soc/pxa2xx 2026-05-06 10:14:43 +09:00
qcom ASoC: qcom: sc8280xp: Add support for Eliza 2026-07-08 12:25:20 +01:00
renesas ASoC: rsnd: src: Add missing scu_supply clock to suspend/resume 2026-07-02 18:56:38 +01:00
rockchip ASoC: rockchip: rockchip_sai: #include <linux/platform_device.h> explicitly 2026-06-24 12:59:54 +01:00
samsung ASoC: samsung: spdif: Use guard() for spin locks 2026-04-27 08:28:19 +09:00
sdca ASoC: Fix races on creation of SDCA jack detection 2026-07-27 18:47:11 +01:00
sdw_utils ASoC: sdw_utils: fix missing component_name for cs42l43 part_id 0x2A3B 2026-06-12 16:07:57 +01:00
sof ASoC: SOF: ipc4-pcm: Continue the pipeline trigger in case of IPC timeout 2026-07-31 16:14:11 +01:00
sophgo ASoC: sophgo: return 1 on volume change in cv1800b_adc_volume_set() 2026-07-27 23:56:58 +01:00
spacemit ASoC: spacemit: add K3 SoC support with additional clocks 2026-06-01 16:00:44 +01:00
spear
sprd ASoC: sprd: sprd-mcdt: Use guard() for mutex & spin locks 2026-06-08 19:02:59 +01:00
starfive
sti ASoC: sti: uniperif_player: Use guard() for mutex & spin locks 2026-06-01 16:47:07 +01:00
stm ASoC: stm: stm32_adfsdm: set debugfs_prefix via Component driver 2026-06-10 12:21:13 +01:00
sunxi ASoC: sun4i-codec: Set quirks.playback_only for H616 codec 2026-07-14 15:23:08 +01:00
tegra Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ti Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
uniphier ASoC: uniphier: aio-dma: Use guard() for spin locks 2026-05-04 22:08:21 +09:00
ux500 ASoC: ux500: Use guard() for mutex locks 2026-05-04 22:02:21 +09:00
xilinx ASoC: xilinx: name back to pcm_new()/pcm_free() 2026-03-16 13:38:06 +00:00
xtensa ASoC: xtensa: name back to pcm_new()/pcm_free() 2026-03-16 13:38:07 +00:00
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card-test.c
soc-card.c ASoC: soc-card: add snd_soc_card_set_topology_name() 2026-05-28 12:18:29 +01:00
soc-component.c ASoC: Add a component fixup_controls callback 2026-07-27 18:47:07 +01:00
soc-compress.c
soc-core.c ASoC: Add a component fixup_controls callback 2026-07-27 18:47:07 +01:00
soc-dai.c ASoC: update auto format selection method 2026-06-12 18:57:58 +01:00
soc-dapm.c ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets 2026-05-25 13:37:18 +01:00
soc-devres.c ASoC: core: Move all users to deferrable card binding 2026-05-11 10:06:10 +09:00
soc-generic-dmaengine-pcm.c ASoC: soc-generic-dmaengine: set debugfs_prefix via Component driver 2026-06-10 12:21:12 +01:00
soc-jack.c
soc-link.c
soc-ops-test.c
soc-ops.c ASoC: ops: Log unknown controls in snd_soc_limit_volume() 2026-04-27 06:51:59 +09:00
soc-pcm.c ASoC: soc-pcm: constrain hw_params when DAIs share the same BCLK 2026-05-25 11:42:43 +01:00
soc-topology-test.c
soc-topology.c ASoC: topology: Check PCM and DAI name strings before use 2026-06-11 20:47:42 +01:00
soc-usb.c
soc-utils-test.c
soc-utils.c ASoC: remove SND_SOC_POSSIBLE_xBx_xFx 2026-06-12 18:57:52 +01:00