[PATCH 11/83] ASoC: apple: 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/apple/mca.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c
index 492165c0e1ea9..1954192a789f1 100644
--- a/sound/soc/apple/mca.c
+++ b/sound/soc/apple/mca.c
@@ -699,6 +699,14 @@ static int mca_fe_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
+static const u64 mca_fe_selectable_formats =
+	SND_SOC_POSSIBLE_DAIFMT_I2S	|
+	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 mca_fe_ops = {
 	.startup = mca_fe_startup,
 	.set_fmt = mca_fe_set_fmt,
@@ -706,6 +714,8 @@ static const struct snd_soc_dai_ops mca_fe_ops = {
 	.set_tdm_slot = mca_fe_set_tdm_slot,
 	.hw_params = mca_fe_hw_params,
 	.trigger = mca_fe_trigger,
+	.auto_selectable_formats = &mca_fe_selectable_formats,
+	.num_auto_selectable_formats = 1,
 };
 
 static bool mca_be_started(struct mca_cluster *cl)
-- 
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.