ASoC: fsi: 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/87bl8wnc5x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0292176522
commit
af69f47df1
@ -1694,12 +1694,27 @@ static int fsi_dai_hw_params(struct snd_pcm_substream *substream,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Select below from Sound Card, not auto
|
||||||
|
* SND_SOC_DAIFMT_CBC_CFC
|
||||||
|
* SND_SOC_DAIFMT_CBP_CFP
|
||||||
|
*/
|
||||||
|
static u64 fsi_dai_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 fsi_dai_ops = {
|
static const struct snd_soc_dai_ops fsi_dai_ops = {
|
||||||
.startup = fsi_dai_startup,
|
.startup = fsi_dai_startup,
|
||||||
.shutdown = fsi_dai_shutdown,
|
.shutdown = fsi_dai_shutdown,
|
||||||
.trigger = fsi_dai_trigger,
|
.trigger = fsi_dai_trigger,
|
||||||
.set_fmt = fsi_dai_set_fmt,
|
.set_fmt = fsi_dai_set_fmt,
|
||||||
.hw_params = fsi_dai_hw_params,
|
.hw_params = fsi_dai_hw_params,
|
||||||
|
.auto_selectable_formats = &fsi_dai_formats,
|
||||||
|
.num_auto_selectable_formats = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user