[PATCH 15/83] ASoC: cirrus: use .auto_selectable_formats

Kuninori Morimoto <[email protected]>
Newsgroups dev.linux.lists.chrome-platform,dev.linux.lists.imx,dev.linux.lists.spacemit,org.infradead.lists.linux-riscv,org.kernel.vger.linux-mips,org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-sound
Message-ID <[email protected]>
We can use .auto_selectable_formats. Let's adds it.

Signed-off-by: Kuninori Morimoto <[email protected]>
---
 sound/soc/cirrus/ep93xx-i2s.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index 5dba741594fab..8195ed7c6dd69 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -401,6 +401,15 @@ static int ep93xx_i2s_resume(struct snd_soc_component *component)
 #define ep93xx_i2s_resume	NULL
 #endif
 
+static const u64 ep93xx_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	SND_SOC_POSSIBLE_DAIFMT_RIGHT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_NB_IF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_NF	|
+	SND_SOC_POSSIBLE_DAIFMT_IB_IF;
+
 static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
 	.probe		= ep93xx_i2s_dai_probe,
 	.startup	= ep93xx_i2s_startup,
@@ -408,6 +417,8 @@ static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
 	.hw_params	= ep93xx_i2s_hw_params,
 	.set_sysclk	= ep93xx_i2s_set_sysclk,
 	.set_fmt	= ep93xx_i2s_set_dai_fmt,
+	.auto_selectable_formats	= &ep93xx_selectable_formats,
+	.num_auto_selectable_formats	= 1,
 };
 
 #define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.