mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
ASoC: da7213: add .auto_selectable_formats support
By this patch, DAI format might be automatically selected (Depends on paired DAI, and/or Sound Card). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Linh Phung <linh.phung.jy@renesas.com> Tested-by: Khanh Le <khanh.le.xr@renesas.com> Link: https://lore.kernel.org/r/87y1hdh4f1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
e335f29583
commit
89286e235c
1 changed files with 18 additions and 0 deletions
|
@ -1550,12 +1550,30 @@ static int da7213_set_component_pll(struct snd_soc_component *component,
|
||||||
return _da7213_set_component_pll(component, pll_id, source, fref, fout);
|
return _da7213_set_component_pll(component, pll_id, source, fref, fout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Select below from Sound Card, not Auto
|
||||||
|
* SND_SOC_DAIFMT_CBC_CFC
|
||||||
|
* SND_SOC_DAIFMT_CBP_CFP
|
||||||
|
*/
|
||||||
|
static u64 da7213_dai_formats =
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_I2S |
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_LEFT_J |
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_RIGHT_J |
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_DSP_A |
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_DSP_B |
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_NB_NF |
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_NB_IF |
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_IB_NF |
|
||||||
|
SND_SOC_POSSIBLE_DAIFMT_IB_IF;
|
||||||
|
|
||||||
/* DAI operations */
|
/* DAI operations */
|
||||||
static const struct snd_soc_dai_ops da7213_dai_ops = {
|
static const struct snd_soc_dai_ops da7213_dai_ops = {
|
||||||
.hw_params = da7213_hw_params,
|
.hw_params = da7213_hw_params,
|
||||||
.set_fmt = da7213_set_dai_fmt,
|
.set_fmt = da7213_set_dai_fmt,
|
||||||
.mute_stream = da7213_mute,
|
.mute_stream = da7213_mute,
|
||||||
.no_capture_mute = 1,
|
.no_capture_mute = 1,
|
||||||
|
.auto_selectable_formats = &da7213_dai_formats,
|
||||||
|
.num_auto_selectable_formats = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_soc_dai_driver da7213_dai = {
|
static struct snd_soc_dai_driver da7213_dai = {
|
||||||
|
|
Loading…
Reference in a new issue