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

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: fsl-asoc-card: Allow passing the number of slots in use

Currently, fsl-asoc-card supports passing the width of the TDM slot, but
not the number of slots in use, as it harcodes it as two slots.

Add support for passing the number of slots in use.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://lore.kernel.org/r/20230616203913.551183-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Fabio Estevam and committed by
Mark Brown
6ab11462 aa21a7d4

+7 -1
+7 -1
sound/soc/fsl/fsl-asoc-card.c
··· 62 62 * @sysclk_dir: SYSCLK directions for set_sysclk() 63 63 * @sysclk_id: SYSCLK ids for set_sysclk() 64 64 * @slot_width: Slot width of each frame 65 + * @slot_num: Number of slots of each frame 65 66 * 66 67 * Note: [1] for tx and [0] for rx 67 68 */ ··· 71 70 u32 sysclk_dir[2]; 72 71 u32 sysclk_id[2]; 73 72 u32 slot_width; 73 + u32 slot_num; 74 74 }; 75 75 76 76 /** ··· 193 191 } 194 192 195 193 if (cpu_priv->slot_width) { 196 - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 2, 194 + if (!cpu_priv->slot_num) 195 + cpu_priv->slot_num = 2; 196 + 197 + ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, 198 + cpu_priv->slot_num, 197 199 cpu_priv->slot_width); 198 200 if (ret && ret != -ENOTSUPP) { 199 201 dev_err(dev, "failed to set TDM slot for cpu dai\n");