Re: [PATCH] kunit: cs_dsp: Depend on FW_CS_DSP rather then enabling it

From: Richard Fitzgerald
Date: Sat Mar 22 2025 - 06:24:29 EST


On 21/3/25 15:01, Nico Pache wrote:
I'm a little confused how the FW_CS_DSP config which was added in
v5.16 is reliant (library code that is only used by KUNIT) on a config
that was added in v6.14. Presumably the library is not just for the
KUNIT test. What was the purpose of this config before the
introduction of the KUNIT test. Im guessing it was not user selectable
back then too.

All this cs_dsp code was originally in sound/soc/codecs/wm_adsp.c.
The main DSP support was moved out into the generic cs_dsp library
so we can support using the DSP with non-ASoC drivers, and on devices
that are not sound chips. The drivers that use the cs_dsp library
select the Kconfig.
(ISTR that the config option may have been renamed to FW_CS_DSP at some
point, so could have a different name in older kernels.)


It also looks like FW_CS_DSP_KUNIT_TEST_UTILS and FW_CS_DSP_KUNIT_TEST
are redundant.

Possibly there's more tests to come that'll use them?

Yes, that is explained in the commit message that added this config
symbol. As this has been split out of wm_adsp, we still need to test
the functionality that was left in wm_adsp. I wrote the test utils
functions as a library so that a wm_adsp kunit test can re-use it.
I am still working on the wm_adsp kunit test.