aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/generic
diff options
context:
space:
mode:
authorNicolas Frattaroli <nicolas.frattaroli@collabora.com>2025-04-10 21:25:32 +0200
committerMark Brown <broonie@kernel.org>2025-04-11 13:01:26 +0100
commite78e7856d233010e6afef62f15567a8e7777c8bc (patch)
treeae554dacefdde221904f571158e52bff8c823f8c /sound/soc/generic
parentASoC: wm_adsp: Use vmemdup_user() instead of open-coding (diff)
downloadwireguard-linux-e78e7856d233010e6afef62f15567a8e7777c8bc.tar.xz
wireguard-linux-e78e7856d233010e6afef62f15567a8e7777c8bc.zip
ASoC: test-component: add set_tdm_slot stub implementation
The test-component driver implements various stub callbacks. One of the ones it doesn't implement is set_tdm_slot. This has no functional impact on whether ASoC core believes test-component to do TDM or not, it just means that any TDM configuration can't readily be dumped for debugging purposes like it can with the other callbacks. Add a stub implementation to allow for this. The output uses dev_info rather than dev_dbg, to be in line with the set_fmt stub implementation above. Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/20250410-test-component-tdm-slot-v1-1-9c3a7162fa7a@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r--sound/soc/generic/test-component.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c
index 5430d25deaef..89b995987e2d 100644
--- a/sound/soc/generic/test-component.c
+++ b/sound/soc/generic/test-component.c
@@ -140,6 +140,15 @@ static int test_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
return 0;
}
+static int test_dai_set_tdm_slot(struct snd_soc_dai *dai,
+ unsigned int tx_mask, unsigned int rx_mask,
+ int slots, int slot_width)
+{
+ dev_info(dai->dev, "set tdm slot: tx_mask=0x%08X, rx_mask=0x%08X, slots=%d, slot_width=%d\n",
+ tx_mask, rx_mask, slots, slot_width);
+ return 0;
+}
+
static int test_dai_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
{
mile_stone(dai);
@@ -203,6 +212,7 @@ static const u64 test_dai_formats =
static const struct snd_soc_dai_ops test_ops = {
.set_fmt = test_dai_set_fmt,
+ .set_tdm_slot = test_dai_set_tdm_slot,
.startup = test_dai_startup,
.shutdown = test_dai_shutdown,
.auto_selectable_formats = &test_dai_formats,
@@ -214,6 +224,7 @@ static const struct snd_soc_dai_ops test_verbose_ops = {
.set_pll = test_dai_set_pll,
.set_clkdiv = test_dai_set_clkdiv,
.set_fmt = test_dai_set_fmt,
+ .set_tdm_slot = test_dai_set_tdm_slot,
.mute_stream = test_dai_mute_stream,
.startup = test_dai_startup,
.shutdown = test_dai_shutdown,