]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
firmware: cs_dsp: mock_bin: Pass offset32 to cs_dsp_mock_bin_add_raw_block()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Wed, 31 Dec 2025 17:27:07 +0000 (17:27 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 5 Jan 2026 13:18:27 +0000 (13:18 +0000)
commit9e6f4c5b2d3af58390cf554ada9591935c5ac774
treec92ab51f65b906be24bbac0ae306bf0bab8822d2
parenta01816edf11fc9e6c8216bc03870311ce2add5a2
firmware: cs_dsp: mock_bin: Pass offset32 to cs_dsp_mock_bin_add_raw_block()

Add an argument to cs_dsp_mock_bin_add_raw_block() to pass a 32-bit
offset, and change the type of the existing offset argument to u16.

The cs_dsp_test_bin_error.c test uses cs_dsp_mock_bin_add_raw_block()
so it needs corresponding updates to pass 0 as the 32-bit offset.

Version 1 and 2 of the bin file format had a 16-bit offset on blocks
and the sample rate field of the blocks was not used. Version 3 adds
new block types that change the old sample rate field to be a 32-bit
offset with the old offset currently unused.

cs_dsp_mock_bin_add_raw_block() doesn't attempt to do any magic - its
purpose is to create a raw block exactly as specified by the calling
test code. So the test case can pass a value for both offset fields.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251231172711.450024-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/firmware/cirrus/test/cs_dsp_mock_bin.c
drivers/firmware/cirrus/test/cs_dsp_test_bin_error.c
include/linux/firmware/cirrus/cs_dsp_test_utils.h