diff options
| author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2025-01-06 08:49:45 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-01-13 17:16:55 +0300 |
| commit | 24410f499e808884cc91239dc16013e5bee8779a (patch) | |
| tree | ba8ea8bdbbba41d12c6e332c9b85dd3e968152f4 /include | |
| parent | 85dc053c87bcc32afd8e5cbf20a649dc24e93d24 (diff) | |
| download | linux-24410f499e808884cc91239dc16013e5bee8779a.tar.xz | |
ASoC: soc-core: Enable to use extra format on each DAI
Current ASoC is using dai_link->dai_fmt to set DAI format for both
CPU/Codec. But because it is using same settings, and
SND_SOC_DAIFMT_CLOCK_PROVIDER is flipped for CPU, we can't set both
CPU/Codec as clock consumer, for example.
To solve this issue, this patch enable to use extra format for each
DAI which can keep compatibility with legacy system,
1. SND_SOC_DAIFMT_FORMAT_MASK
2. SND_SOC_DAIFMT_CLOCK
3. SND_SOC_DAIFMT_INV
4. SND_SOC_DAIFMT_CLOCK_PROVIDER
Legacy
dai_fmt includes 1, 2, 3, 4
New idea
dai_fmt includes 1, 2, 3
ext_fmt includes 4
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Stephen Gordon <gordoste@iinet.net.au>
Link: https://patch.msgid.link/87r05go5ja.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sound/soc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 1e09ff084247..fcdb5adfcd5e 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -681,6 +681,17 @@ struct snd_soc_dai_link_component { struct device_node *of_node; const char *dai_name; const struct of_phandle_args *dai_args; + + /* + * Extra format = SND_SOC_DAIFMT_Bx_Fx + * + * [Note] it is Bx_Fx base, not CBx_CFx + * + * It will be used with dai_link->dai_fmt + * see + * snd_soc_runtime_set_dai_fmt() + */ + unsigned int ext_fmt; }; /* |
