Commit Graph

7 Commits

Author SHA1 Message Date
Charles Keepax 7cfb102a55
ASoC: topology: KUnit: Remove now redundant non_legacy_dai_naming flag
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>
2022-06-27 13:16:54 +01:00
Uwe Kleine-König d5017d1323
ASoC: topology: KUnit: Followup prototype change of snd_soc_unregister_card()
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: 1892a99188 ("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>
2022-06-23 13:07:47 +01:00
Uwe Kleine-König 1892a99188
ASoC: core: Make snd_soc_unregister_card() return void
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>
2022-06-22 13:39:34 +01:00
Amadeusz Sławiński be6be67e13
ASoC: topology: KUnit: Convert from cpu to data format
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-02-02 17:08:21 +00:00
Amadeusz Sławiński 3ad8c8e9ef
ASoC: topology: KUnit: Add KUnit tests passing topology with PCM to 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>
2021-01-21 12:36:26 +00:00
Amadeusz Sławiński cec9128dfc
ASoC: topology: KUnit: Add KUnit tests passing empty topology with variants 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>
2021-01-21 12:36:25 +00:00
Amadeusz Sławiński d52bbf747c
ASoC: topology: KUnit: Add KUnit tests passing various arguments to 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>
2021-01-21 12:36:24 +00:00