Skip to content

Commit 83baecd

Browse files
rfvirgilbroonie
authored andcommitted
firmware: cs_dsp: Add KUnit testing of control parsing
Add KUnit test cases for parsing of firmware controls out of the wmfw. These test cases are only testing that the data in the wmfw is correctly interpreted and entered into the list of controls. The test cases can be roughly divided into three types: 1) The correct values are extracted from the wmfw. 2) Variable-length strings are handled correctly. 3) Controls are correctly identified as unique or identical. There are multiple test suites to cover: - V1 and V2 format files on 16-bit and 32-bit ADSP2. - V3 format files on Halo Core DSPs. V1 format does not have named controls, and the strings in the coefficient descriptor are fixed-length fields. On V2 and V3 format the controls are named and all strings are variable-length. The obsolete V0 format does not have controls, so no testing of that format is needed. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20241212143725.1381013-8-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent a2b2f2c commit 83baecd

2 files changed

Lines changed: 1852 additions & 0 deletions

File tree

drivers/firmware/cirrus/test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cs_dsp_test_utils-objs := \
1010

1111
cs_dsp_test-objs := \
1212
cs_dsp_test_bin.o \
13+
cs_dsp_test_control_parse.o \
1314
cs_dsp_test_wmfw.o \
1415
cs_dsp_tests.o
1516

0 commit comments

Comments
 (0)