Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Nicolas Frattaroli and committed by
Mark Brown
e78e7856 b5d057a8

+11
+11
sound/soc/generic/test-component.c
··· 140 140 return 0; 141 141 } 142 142 143 + static int test_dai_set_tdm_slot(struct snd_soc_dai *dai, 144 + unsigned int tx_mask, unsigned int rx_mask, 145 + int slots, int slot_width) 146 + { 147 + dev_info(dai->dev, "set tdm slot: tx_mask=0x%08X, rx_mask=0x%08X, slots=%d, slot_width=%d\n", 148 + tx_mask, rx_mask, slots, slot_width); 149 + return 0; 150 + } 151 + 143 152 static int test_dai_mute_stream(struct snd_soc_dai *dai, int mute, int stream) 144 153 { 145 154 mile_stone(dai); ··· 212 203 213 204 static const struct snd_soc_dai_ops test_ops = { 214 205 .set_fmt = test_dai_set_fmt, 206 + .set_tdm_slot = test_dai_set_tdm_slot, 215 207 .startup = test_dai_startup, 216 208 .shutdown = test_dai_shutdown, 217 209 .auto_selectable_formats = &test_dai_formats, ··· 224 214 .set_pll = test_dai_set_pll, 225 215 .set_clkdiv = test_dai_set_clkdiv, 226 216 .set_fmt = test_dai_set_fmt, 217 + .set_tdm_slot = test_dai_set_tdm_slot, 227 218 .mute_stream = test_dai_mute_stream, 228 219 .startup = test_dai_startup, 229 220 .shutdown = test_dai_shutdown,