diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-05-27 05:26:51 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-07 17:55:13 +0300 |
commit | c50f381afcab30125e43258bba9316054c4ddfac (patch) | |
tree | 14d0d7c4203177ce1bf1c09e2537a8beb4c19cc7 /sound/soc/codecs/ak4613.c | |
parent | ba9e82a1c8919340bee0dd7f7cafb8749810aabe (diff) | |
download | linux-c50f381afcab30125e43258bba9316054c4ddfac.tar.xz |
ASoC: ak4613: add .auto_selectable_formats support
By this patch, DAI format might be automatically selected
(Depends on paired DAI).
Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87fsy8nc7o.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/ak4613.c')
-rw-r--r-- | sound/soc/codecs/ak4613.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c index fe208cfdd3ba..4d2e78101f28 100644 --- a/sound/soc/codecs/ak4613.c +++ b/sound/soc/codecs/ak4613.c @@ -539,6 +539,15 @@ static int ak4613_dai_trigger(struct snd_pcm_substream *substream, int cmd, return 0; } +/* + * Select below from Sound Card, not Auto + * SND_SOC_DAIFMT_CBC_CFC + * SND_SOC_DAIFMT_CBP_CFP + */ +static u64 ak4613_dai_formats = + SND_SOC_POSSIBLE_DAIFMT_I2S | + SND_SOC_POSSIBLE_DAIFMT_LEFT_J; + static const struct snd_soc_dai_ops ak4613_dai_ops = { .startup = ak4613_dai_startup, .shutdown = ak4613_dai_shutdown, @@ -546,6 +555,8 @@ static const struct snd_soc_dai_ops ak4613_dai_ops = { .set_fmt = ak4613_dai_set_fmt, .trigger = ak4613_dai_trigger, .hw_params = ak4613_dai_hw_params, + .auto_selectable_formats = &ak4613_dai_formats, + .num_auto_selectable_formats = 1, }; #define AK4613_PCM_RATE (SNDRV_PCM_RATE_32000 |\ |