[PATCH 3/7] ASoC: ak4613: add .get_fmt support
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Thu Apr 22 03:53:50 CEST 2021
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
ak4613 supports .get_fmt by this patch
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
sound/soc/codecs/ak4613.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index fe208cfdd3ba..c63da8e32945 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -322,6 +322,15 @@ static int ak4613_dai_set_sysclk(struct snd_soc_dai *codec_dai,
return 0;
}
+static u64 ak4613_dai_get_fmt(struct snd_soc_dai *dai)
+{
+ return SND_SOC_POSSIBLE_DAIFMT_I2S |
+ SND_SOC_POSSIBLE_DAIFMT_LEFT_J |
+ SND_SOC_POSSIBLE_DAIFMT_CBP_CFP |
+ SND_SOC_POSSIBLE_DAIFMT_CBC_CFC |
+ SND_SOC_POSSIBLE_DAIFMT_NB_NF;
+}
+
static int ak4613_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{
struct snd_soc_component *component = dai->component;
@@ -543,6 +552,7 @@ static const struct snd_soc_dai_ops ak4613_dai_ops = {
.startup = ak4613_dai_startup,
.shutdown = ak4613_dai_shutdown,
.set_sysclk = ak4613_dai_set_sysclk,
+ .get_fmt = ak4613_dai_get_fmt,
.set_fmt = ak4613_dai_set_fmt,
.trigger = ak4613_dai_trigger,
.hw_params = ak4613_dai_hw_params,
--
2.25.1
More information about the Alsa-devel
mailing list