summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-topology-test.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: topology: KUnit: Remove now redundant non_legacy_dai_naming flagCharles Keepax2022-06-271-3/+0
| | | | | | | | | | The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-45-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: KUnit: Followup prototype change of snd_soc_unregister_card()Uwe Kleine-König2022-06-231-20/+10
| | | | | | | | | | | | snd_soc_unregister_card() was recently converted to return void. Only the first instance was adapted, so convert the remaining ones now to fix building the topology test. Reported-by: kernel test robot <lkp@intel.com> Fixes: 1892a991886a ("ASoC: core: Make snd_soc_unregister_card() return void") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220622210629.286487-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: core: Make snd_soc_unregister_card() return voidUwe Kleine-König2022-06-221-3/+1
| | | | | | | | | | | | The function snd_soc_unregister_card() returned 0 unconditionally and most callers don't care to check the return value. Make it return void and adapt the callers that didn't ignore the return value before. This is a preparation for making platform remove callbacks return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220621145834.198519-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: KUnit: Convert from cpu to data formatAmadeusz Sławiński2021-02-021-33/+33
| | | | | | | | | | | | When creating topology templates and overriding data in specific test cases it should be done with cpu_to_le32 macro, so we operate on correct data on all architectures, as topology parser use le32_to_cpu to parse data from structures. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20210202163123.3942040-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: KUnit: Add KUnit tests passing topology with PCM to ↵Amadeusz Sławiński2021-01-211-0/+231
| | | | | | | | | | | | | | | | snd_soc_tplg_component_load In order to ensure correct behaviour of topology API, add unit tests exercising topology functionality. Add topology containing PCM template and tests for parsing it. Also adds test cases simulating modules reloads in case of separate drivers for card and component. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210120152846.1703655-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: KUnit: Add KUnit tests passing empty topology with variants ↵Amadeusz Sławiński2021-01-211-1/+310
| | | | | | | | | | | | | | | to snd_soc_tplg_component_load In order to ensure correct behaviour of topology API, add unit tests exercising topology functionality. Add "empty" topology template and tests for parsing it. Also adds few variants with bad magic numbers. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210120152846.1703655-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: topology: KUnit: Add KUnit tests passing various arguments to ↵Amadeusz Sławiński2021-01-211-0/+303
snd_soc_tplg_component_load In order to ensure correct behaviour of topology API, add unit tests exercising topology functionality. Start with adding cases for passing various arguments to snd_soc_tplg_component_load as it is part of exposed topology API. First test case adds test passing NULL component as argument. Following one adds test case for passing NULL ops as argument. Finally add test case passing NULL fw as argument. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210120152846.1703655-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>