Skip to content

Commit 00da2ed

Browse files
committed
ASoC: wm_adsp: Some improvements to firmware file
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: This series makes some improvements to the code that searches for firmware files. Patch 1 is a trivial patch to remove an unused function argument, before adding any new code that uses this API. Patches 2..4 add KUnit testing to prove that the subsequent changes don't break anything. The remaining patches remove duplicated code and clean up some of the implementation.
2 parents 0670bc8 + 8fc5c78 commit 00da2ed

5 files changed

Lines changed: 1385 additions & 109 deletions

File tree

sound/soc/codecs/Kconfig

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ config SND_SOC_WM_HUBS
398398
default m if SND_SOC_WM8993=m || SND_SOC_WM8994=m
399399

400400
config SND_SOC_WM_ADSP
401-
tristate
401+
tristate "Cirrus Logic wm_adsp driver" if KUNIT
402402
select FW_CS_DSP
403403
select SND_SOC_COMPRESS
404404
default y if SND_SOC_MADERA=y
@@ -424,6 +424,18 @@ config SND_SOC_WM_ADSP
424424
default m if SND_SOC_CS35L56=m
425425
default m if SND_SOC_CS48L32=m
426426

427+
config SND_SOC_WM_ADSP_TEST
428+
tristate "KUnit tests for Cirrus Logic wm_adsp" if !KUNIT_ALL_TESTS
429+
depends on KUNIT
430+
depends on SND_SOC_WM_ADSP
431+
default KUNIT_ALL_TESTS
432+
help
433+
This builds KUnit tests for the Cirrus Logic wm_adsp library.
434+
For more information on KUnit and unit tests in general,
435+
please refer to the KUnit documentation in
436+
Documentation/dev-tools/kunit/.
437+
If in doubt, say "N".
438+
427439
config SND_SOC_AB8500_CODEC
428440
tristate
429441
depends on ABX500_CORE

sound/soc/codecs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ snd-soc-wcd938x-sdw-y := wcd938x-sdw.o
361361
snd-soc-wcd939x-y := wcd939x.o
362362
snd-soc-wcd939x-sdw-y := wcd939x-sdw.o
363363
snd-soc-wm-adsp-y := wm_adsp.o
364+
snd-soc-wm-adsp-test-y := wm_adsp_fw_find_test.o
364365
snd-soc-wm0010-y := wm0010.o
365366
snd-soc-wm1250-ev1-y := wm1250-ev1.o
366367
snd-soc-wm2000-y := wm2000.o
@@ -862,6 +863,7 @@ obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o
862863
obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o
863864
obj-$(CONFIG_SND_SOC_WM9713) += snd-soc-wm9713.o
864865
obj-$(CONFIG_SND_SOC_WM_ADSP) += snd-soc-wm-adsp.o
866+
obj-$(CONFIG_SND_SOC_WM_ADSP_TEST) += snd-soc-wm-adsp-test.o
865867
obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o
866868
obj-$(CONFIG_SND_SOC_WSA881X) += snd-soc-wsa881x.o
867869
obj-$(CONFIG_SND_SOC_WSA883X) += snd-soc-wsa883x.o

0 commit comments

Comments
 (0)