linux/include/sound
Richard Fitzgerald 32172cf3cb
ASoC: cs35l56: Allow restoring factory calibration through ALSA control
Add an ALSA control (CAL_DATA) that can be used to restore amp calibration,
instead of using debugfs. A readback control (CAL_DATA_RB) is also added
for factory testing.

On ChromeOS the process that restores amp calibration from NVRAM has
limited permissions and cannot access debugfs. It requires an ALSA control
that it can write the calibration blob into. ChromeOS also restricts access
to ALSA controls, which avoids the risk of accidental or malicious
overwriting of good calibration data with bad data. As this control is not
needed for normal Linux-based distros it is a Kconfig option.

A separate control, CAL_DATA_RB, provides a readback of the current
calibration data, which could be either from a write to CAL_DATA or the
result of factory production-line calibration.

The write and read are intentionally separate controls to defeat "dumb"
save-and-restore tools like alsa-restore that assume it is safe to save
all control values and write them back in any order at some undefined
future time. Such behavior carries the risk of restoring stale or bad data
over the top of good data.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251111130850.513969-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-11-11 13:52:49 +00:00
..
ac97 driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
sof ASoC: SOF: IPC4: Add GET macros for module id and module instance id 2025-08-29 13:34:16 +02:00
ac97_codec.h ALSA: mark all struct bus_type as const 2023-12-30 10:10:41 +01:00
aci.h ALSA: opti9xx: Use standard print API 2024-08-08 07:49:45 +02:00
acp63_chip_offset_byte.h ASoC: amd: update ps platform acp header file 2023-02-03 12:04:02 +00:00
ad1816a.h
ad1843.h
ak4xxx-adda.h
ak4113.h
ak4114.h
ak4117.h
ak4531_codec.h ALSA: ens137x: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
ak4641.h
alc5623.h
asequencer.h ALSA: seq: Add UMP support 2023-05-23 12:11:21 +02:00
asound.h
asoundef.h ALSA: IEC958 definition for consumer status channel update 2024-09-07 10:42:17 +02:00
compress_driver.h ALSA: compress_offload: Add 64-bit safe timestamp infrastructure 2025-09-08 09:33:24 +02:00
control.h Merge branch 'topic/control-lookup-rwlock' into for-next 2024-08-09 14:25:24 +02:00
core.h ALSA: core: Remove unused snd_device_get_state 2025-05-05 12:36:29 +02:00
cs-amp-lib.h ASoC: cs-amp-lib-test: Add test cases for cs_amp_set_efi_calibration_data() 2025-10-27 14:07:51 +00:00
cs35l33.h
cs35l34.h
cs35l35.h
cs35l36.h
cs35l41.h ALSA: hda: cs35l41: Add support for center channel in CS35L41 HDA 2025-06-13 10:19:34 +02:00
cs35l56.h ASoC: cs35l56: Allow restoring factory calibration through ALSA control 2025-11-11 13:52:49 +00:00
cs42l42.h ASoC: cs42l42: Remove redundant delays in suspend(). 2024-02-19 17:02:18 +00:00
cs42l43.h ASoC: cs42l43: Add support for the cs42l43 2023-08-18 23:41:54 +01:00
cs48l32_registers.h ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP 2025-04-15 13:58:43 +01:00
cs48l32.h ASoC: cs48l32: Add driver for Cirrus Logic CS48L32 audio DSP 2025-04-15 13:58:43 +01:00
cs4231-regs.h
cs4271.h ASoC: cs4271: Convert to GPIO descriptors 2023-12-01 16:59:21 +00:00
cs8403.h
cs8427.h
da7213.h
da7218.h
da7219-aad.h ASoC: da7219: Add Jack insertion detection polarity 2023-05-23 18:49:36 +01:00
da7219.h
da9055.h
designware_i2s.h ASoC: dwc: i2s: Add StarFive JH7110 SoC support 2023-08-23 13:56:40 +01:00
dmaengine_pcm.h ASoC: dmaengine_pcm: Add port_window_size to DAI dma data struct 2025-08-10 21:09:12 +01:00
emu10k1_synth.h
emu10k1.h ALSA: emu10k1: Use guard() for emu1010 FPGA locking 2025-09-01 13:52:40 +02:00
emu8000_reg.h
emu8000.h ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
emux_legacy.h
emux_synth.h ALSA: synth: Save a few bytes of memory when registering a 'snd_emux' 2024-01-22 13:04:22 +01:00
es1688.h ALSA: es1688: Use standard print API 2024-08-08 07:47:24 +02:00
graph_card.h ASoC: simple_card_utils.h: convert not to use asoc_xxx() 2023-09-25 14:16:14 +02:00
gus.h ALSA: gus: Use guard() for mutex locks 2025-09-01 13:53:02 +02:00
hda_chmap.h
hda_codec.h ALSA: hda: Introduce auto cleanup macros for PM 2025-08-29 11:52:13 +02:00
hda_component.h
hda_hwdep.h
hda_i915.h ALSA: hda: i915: Remove extra argument from snd_hdac_i915_init 2023-10-19 14:56:25 +02:00
hda_register.h ALSA: hda: Fix all stream interrupts definition 2024-10-14 12:00:52 +02:00
hda_regmap.h ALSA: hda: Manage concurrent reg access more properly 2020-01-13 13:40:41 +01:00
hda_verbs.h ALSA: cleanup double word in comment 2022-02-11 15:18:56 +01:00
hda-mlink.h ASoC: SOF: Intel: hda-mlink: Add support for mic privacy in VS SHIM registers 2025-03-08 16:06:41 +00:00
hda-sdw-bpt.h ASoC: SOF: Intel: hda-sdw-bpt: add helpers for SoundWire BPT DMA 2025-03-10 12:31:19 +05:30
hdaudio_ext.h ASoC: Intel: avs: Read HW capabilities when possible 2025-04-07 14:39:57 +01:00
hdaudio.h ALSA: hda: Use auto cleanup macros for DSP loader locks 2025-08-29 11:52:14 +02:00
hdmi-codec.h ASoC: hdmi-codec: allow to refine formats actually supported 2025-01-26 14:01:12 +02:00
hwdep.h ALSA: hwdep: Don't embed device 2023-08-17 09:24:01 +02:00
i2c.h
info.h ALSA: info: Remove unused function declarations 2023-08-08 14:45:45 +02:00
initval.h ALSA: Allow const arrays for legacy resource management helpers 2020-01-05 16:14:26 +01:00
intel-dsp-config.h ASoC: Intel: avs: PCI driver implementation 2022-05-17 11:58:04 +01:00
intel-nhlt.h ALSA: hda: intel-nhlt: add intel_nhlt_ssp_device_type() function 2024-03-22 12:40:46 +01:00
jack.h USB/Thunderbolt changes for 6.16-rc1 2025-06-06 12:45:35 -07:00
madera-pdata.h ASoC: madera: Replace kernel.h with the necessary inclusions 2022-07-05 13:00:49 +01:00
max9768.h ASoC: max9768: Convert to use GPIO descriptors 2023-09-11 12:50:05 +01:00
max98088.h
max98090.h
max98095.h
memalloc.h ALSA: memalloc: Let IOMMU handle S/G primarily 2024-08-01 12:45:49 +02:00
minors.h
mixer_oss.h
mpu401.h
omap-hdmi-audio.h ALSA: Replace HTTP links with HTTPS ones 2020-07-19 20:49:25 +02:00
opl3.h ALSA: opl3: Replace with __packed attribute 2023-10-26 09:43:15 +02:00
opl4.h
pcm_drm_eld.h ALSA: hda/hdmi: extract common interface for ELD handling 2025-02-05 13:04:00 +01:00
pcm_iec958.h ALSA: iec958: Split status creation and fill 2021-06-08 17:05:41 +02:00
pcm_oss.h
pcm_params.h ALSA: hda: Upgrade stream-format infrastructure 2023-11-27 17:27:41 +01:00
pcm-indirect.h ALSA: pcm: Improved XRUN handling for indirect PCM helpers 2023-03-24 14:52:58 +01:00
pcm.h Merge branch 'for-linus' into for-next 2025-05-22 20:34:24 +02:00
pt2258.h
pxa2xx-lib.h Input: touchscreen: use wrapper for pxa2xx ac97 registers 2022-05-07 22:55:48 +02:00
q6usboffload.h ASoC: qcom: qdsp6: Add USB backend ASoC driver for Q6 2025-04-11 13:02:32 +02:00
rawmidi.h ALSA: rawmidi: Make tied_device=0 as default / unknown 2025-01-14 16:52:07 +01:00
rt286.h
rt298.h
rt1015.h ASoC: rt1015: add delay to fix pop noise from speaker 2020-11-05 17:25:17 +00:00
rt1318.h ASoC: rt1318: Add RT1318 audio amplifier driver 2024-06-19 14:50:34 +01:00
rt5514.h
rt5659.h
rt5660.h
rt5663.h
rt5665.h ASoC: rt5665: Convert to use GPIO descriptors 2023-08-17 15:10:11 +01:00
rt5668.h ASoC: rt5668: Convert to use GPIO descriptors 2023-08-17 15:10:12 +01:00
rt5682.h ASoC: rt5682: Convert to use GPIO descriptors 2023-08-17 15:10:13 +01:00
rt5682s.h ASoC: rt5682s: Add LDO output selection for dacref 2023-11-14 17:39:27 +00:00
sb.h ALSA: als4000: Replace with DEFINE_SIMPLE_DEV_PM_OPS() 2024-02-12 11:50:24 +01:00
sb16_csp.h
sdca_asoc.h ASoC: SDCA: Add hw_params() helper function 2025-07-15 19:45:51 +01:00
sdca_fdl.h ASoC: SDCA: Add UMP timeout handling for FDL 2025-10-27 15:31:27 +00:00
sdca_function.h ASoC: SDCA: Add FDL library for XU entities 2025-10-27 15:31:24 +00:00
sdca_hid.h ASoC: SDCA: Add HID button IRQ 2025-10-27 15:31:29 +00:00
sdca_interrupts.h ASoC: SDCA: Add early IRQ handling 2025-10-27 15:31:28 +00:00
sdca_regmap.h ASoC: SDCA: Add helper to write out defaults and fixed values 2025-02-27 13:09:14 +00:00
sdca_ump.h ASoC: SDCA: Add UMP timeout handling for FDL 2025-10-27 15:31:27 +00:00
sdca.h ASoC: SDCA: Add SDCA FDL data parsing 2025-10-27 15:31:23 +00:00
sdw.h sound: sdw: Add hw_params to SoundWire config helper function 2022-11-28 13:04:24 +00:00
seq_device.h ALSA: seq: Bind UMP device 2023-05-23 12:11:33 +02:00
seq_kernel.h ALSA: seq: Remove unused declarations 2024-08-17 16:32:31 +02:00
seq_midi_emul.h ALSA: seq: Constify struct snd_midi_op 2020-01-03 09:24:19 +01:00
seq_midi_event.h
seq_oss_legacy.h
seq_oss.h
seq_virmidi.h
sh_dac_audio.h
sh_fsi.h
simple_card_utils.h ASoC: simple-card-utils: use snd_soc_ret() 2025-02-06 17:26:22 +00:00
simple_card.h ASoC: remove asoc_xxx() compatible macro 2023-09-26 17:18:45 +02:00
snd_wavefront.h ALSA: wavefront: remove snd_wavefront_xxx() 2025-05-11 16:24:48 +02:00
soc_sdw_utils.h ASoC: soc_sdw_utils: export asoc_sdw_get_dai_type 2025-10-13 11:23:26 +01:00
soc-acpi-intel-match.h ASoC: Intel: soc-acpi: add PTL match tables 2024-08-02 14:04:55 +01:00
soc-acpi-intel-ssp-common.h ASoC: Intel: ssp-common: get codec tplg suffix function 2024-03-28 13:58:14 +00:00
soc-acpi.h ASoC: soc-acpi: make some variables of acpi adr and link adr non-const 2025-10-13 11:23:22 +01:00
soc-card.h ASoC: Drop snd_soc_*_get_kcontrol_locked() 2024-08-09 14:24:55 +02:00
soc-component.h ASoC: Updates for v6.18 2025-09-20 08:38:17 +02:00
soc-dai.h ALSA: compress_offload: Add 64-bit safe timestamp infrastructure 2025-09-08 09:33:24 +02:00
soc-dapm.h ASoC: soc-dapm: add snd_soc_dapm_set_idle_bias() 2025-09-18 22:24:18 +01:00
soc-dpcm.h ASoC: remove dpcm_process_paths() 2025-02-16 23:51:06 +00:00
soc-jack.h ASoC: soc-jack: Get rid of legacy GPIO support 2024-03-26 17:13:45 +00:00
soc-link.h ASoC: soc-pcm: care trigger rollback 2020-12-09 12:13:38 +00:00
soc-topology.h ASoC: topology: Constify an argument of snd_soc_tplg_component_load() 2024-05-27 01:31:15 +01:00
soc-usb.h ASoC: usb: Fetch ASoC card and pcm device information 2025-04-11 13:02:31 +02:00
soc.h ASoC: SDCA: support Q7.8 volume format 2025-11-06 13:05:44 +00:00
sof.h ASoC: SOF: add disable_function_topology flag 2025-05-06 22:48:03 +09:00
soundfont.h ALSA: synth: Use guard() for preset locks 2025-09-01 13:54:27 +02:00
spear_dma.h
spear_spdif.h
sta32x.h
sta350.h
tas2x20-tlv.h ASoC: tas2781: Add tas2118, tas2x20, tas5825 support 2025-09-09 08:42:50 +02:00
tas2552-plat.h
tas2563-tlv.h ASoC: tas2781: mark const variables tas2563_dvc_table as __maybe_unused 2024-08-22 13:34:12 +01:00
tas2770-tlv.h ALSA: hda: Fix the wrong register was used for DVC of TAS2770 2025-07-29 17:48:29 +02:00
tas2781-comlib-i2c.h ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB 2025-04-30 07:36:25 +02:00
tas2781-dsp.h ASoC: Updates for v6.18 2025-09-20 08:38:17 +02:00
tas2781-tlv.h ALSA: hda/tas2781: Add name prefix tas2781 for tas2781's dvc_tlv and amp_vol_tlv 2025-08-18 11:10:57 +02:00
tas2781.h ASoC: tas2781: Add tas5822 support 2025-11-04 14:15:29 +00:00
tas5086.h
tas5825-tlv.h ALSA: hda: Add TAS5825 support 2025-08-11 09:13:42 +02:00
tea6330t.h
timer.h ALSA: timer: Replace tasklet with work 2020-09-09 18:32:52 +02:00
tlv.h
tlv320aic32x4.h ASoC: codec: tlv320aic32x4: Drop aic32x4_pdata usage 2025-07-13 22:36:54 +01:00
uda1380.h
ump_convert.h ALSA: ump: Fix buffer overflow at UMP SysEx message conversion 2025-04-29 14:52:06 +02:00
ump_msg.h ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info 2025-05-11 16:27:55 +02:00
ump.h ALSA: seq: Notify UMP EP and FB changes 2025-01-12 13:12:21 +01:00
util_mem.h
vx_core.h ALSA: vx_core: Drop unused dev field 2024-08-08 07:47:23 +02:00
wavefront.h ALSA: wavefront: Drop obsoleted comments and definitions 2023-10-26 09:43:24 +02:00
wm0010.h ASoC: wm0010: Convert to GPIO descriptors 2023-12-08 14:31:57 +00:00
wm2000.h
wm2200.h ASoC: wm2200: Convert to GPIO descriptors 2023-12-08 14:31:59 +00:00
wm5100.h ASoC: wm5100: Convert to GPIO descriptors 2023-12-08 14:31:59 +00:00
wm8903.h
wm8904.h ASoC: wm8904: get platform data from DT 2025-03-20 12:42:29 +00:00
wm8955.h
wm8960.h ASoC: wm8960: Support headphone jack detection function 2020-06-15 20:58:33 +01:00
wm8962.h
wm8993.h
wm8996.h ASoC: wm8996: Convert to GPIO descriptors 2023-12-08 14:32:00 +00:00
wm9081.h
wm9090.h
wss.h