]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: cs-amp-lib-test: Add test cases for cs_amp_set_efi_calibration_data()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 21 Oct 2025 10:50:22 +0000 (11:50 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Oct 2025 14:07:51 +0000 (14:07 +0000)
commit4795375d8aa072e9aacb0b278e6203c6ca41816a
treed1bac79e206b7121efdbd87f25459a73932e832e
parent64670a6c062c4d183c366d46e71ee76395af6a15
ASoC: cs-amp-lib-test: Add test cases for cs_amp_set_efi_calibration_data()

Add a set of test cases for cs_amp_set_efi_calibration_data().

Broadly there are two type of behavior being tested:

How the EFI is updated:
- Create a new EFI
- Overwrite part of existing content
- Overwrite part of zero-filled preallocated content
- Grow the file to append new content

And how the location within the content is chosen:
- Overwrite a specific array entry
- Overwrite an entry with the same calTarget (silicon ID)
- Overwrite a free entry
- Append after existing data

Plus some cases for error conditions.

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