]> Gentwo Git Trees - linux/.git/commit
ASoC: cs-amp-lib: Add HP-specific EFI variable for calibration data
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 9 Sep 2025 11:30:38 +0000 (12:30 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 9 Sep 2025 11:42:09 +0000 (12:42 +0100)
commitb78dd64208a83f66fc21951bd8758281a7d445a5
treea2e4e853ff133a80ef0748e21b241c12ab7eb49a
parent7a4e5f4c663319f1e0c990ca62e3bb8d3d215c93
ASoC: cs-amp-lib: Add HP-specific EFI variable for calibration data

Search for an HP-specific EFI variable for calibration before falling
back to the normal Cirrus Logic EFI variable.

Future HP models will use an HP-defined EFI variable for storage of
amp calibration data. The content is the same as the normal Cirrus
Logic EFI variable.

The first step in cs_amp_get_cal_efi_buffer() is to get the size of
the EFI variable, so this has been made a loop that walks through an
array of possible variables.

A small change is needed to the KUnit test, which is included in this
patch. Originally the cs_amp_lib_test_get_efi_variable() hook function
asserted that the passed name and GUID matched the Cirrus Logic EFI
variable. Obviously this will fail because the code now tries the HP
definition first. The function has been changed to return EFI_NOT_FOUND
instead, which emulates the normal behaviour of trying to get the HP
variable on a system that has the Cirrus variable.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Message-ID: <20250909113039.922065-6-rf@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs-amp-lib-test.c
sound/soc/codecs/cs-amp-lib.c