]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: hda/cs35l56: Create debugfs files for factory calibration
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 21 Oct 2025 10:50:16 +0000 (11:50 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Oct 2025 14:07:45 +0000 (14:07 +0000)
commit46a3df50b0cab466099515f2375b01c5be4fb95c
tree2b81a05b85e1e3968a7905d944fafb1d3ce8efb1
parent191a27faf53edf9e9101901e402bfee49c44073c
ALSA: hda/cs35l56: Create debugfs files for factory calibration

Create debugfs files that can be used to perform factory calibration.

During manufacture, the production line must perform a factory calibration
of the amps. This commit adds this functionality via debugfs files.

As this is only needed during manufacture, there is no need for this to be
available in a normal system so a Kconfig item has been added to enable
this. The new Kconfig option is inside a sub-menu because items do not
group and indent if the parent is invisible or there are multiple parent
dependencies. Anyway the sub-menu reduces the clutter.

cs35l56_hda_apply_calibration() has been changed to return an error code
that can be reported back through the debugfs write. The original call to
this function doesn't check the return code because in normal use it
doesn't matter whether this fails - the firmware will default to a safe
calibration for the platform. But tooling using the debugfs files might
want to know if there was an error.

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