]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: cs_dsp: Add KUnit testing of control read/write
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 12 Dec 2024 14:37:22 +0000 (14:37 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 13 Dec 2024 13:14:45 +0000 (13:14 +0000)
commitfe54fd5474f746f07f2b587f2f5e3311bf611970
tree720ab8be2a6cc15a022cd3c3bd163ffba09330ae
parent9b33a4fc500cedc1adc9c0ee01e30ffd50e5887a
firmware: cs_dsp: Add KUnit testing of control read/write

Add KUnit test cases for control read/write.

Tests cases cover general reading and writing of controls:
1) Read/write at offset position in control.
2) Read/write of various lengths less than length of the control.
3) Rejecting illegal arguments.

The test cases are run for ADSP2 with 16-bit registers, ADSP2
with 32-bit registers and Halo Core with 32-bit registers. The
ADSP2 cases are further divided into runs for V1 and V2 format
WMFW files, because there are differences in how V1 and V2
defines controls.

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-10-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/test/Makefile
drivers/firmware/cirrus/test/cs_dsp_test_control_rw.c [new file with mode: 0644]