]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: cs35l56: Add common code for factory calibration
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 21 Oct 2025 10:50:14 +0000 (11:50 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Oct 2025 14:07:43 +0000 (14:07 +0000)
commitf7097161e94cd39df7a8848ad0de5f394124ed69
treeafe32ad5c9fa87f6828475ca9ad195ea6da47ea7
parentcdd27fa3298ad2f39788804f7d09ab31af2b416c
ASoC: cs35l56: Add common code for factory calibration

Add core code to support factory calibration. This can be used by both
the ASoC and HDA drivers.

This code consists of implementations of debugfs handlers for three
debugfs files used to start factory calibration and read the results.

This is not a full implementation of debugfs files. There are some
requirements to synchronize with the rest of the amp driver, and the way
this is done is significantly different between ASoC and HDA. Therefore
cs35l56-shared.c provides the main part of the file handlers, but the
files themselves are defined in the ASoC and HDA drivers with suitable
handling before calling into this shared code.

The cal_data file allows the calibration to be read and also for a
previous calibration to be written (for systems where the storage is not
something directly accessible to drivers, such as on filesystems). Code
outside the kernel should treat the content of cal_data as an opaque blob,
so the struct definition is not exported as a user API.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251021105022.1013685-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/cs35l56.h
sound/soc/codecs/Kconfig
sound/soc/codecs/cs35l56-shared.c