aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-topology-test.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-02-02ASoC: topology: KUnit: Convert from cpu to data formatAmadeusz Sławiński1-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>
2021-01-21ASoC: topology: KUnit: Add KUnit tests passing topology with PCM to snd_soc_tplg_component_loadAmadeusz Sławiński1-0/+231
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>
2021-01-21ASoC: topology: KUnit: Add KUnit tests passing empty topology with variants to snd_soc_tplg_component_loadAmadeusz Sławiński1-1/+310
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>
2021-01-21ASoC: topology: KUnit: Add KUnit tests passing various arguments to snd_soc_tplg_component_loadAmadeusz Sławiński1-0/+303
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>