diff options
| author | Daniel Baluta <[email protected]> | 2023-11-28 10:11:18 +0200 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2023-12-14 10:56:47 +0000 |
| commit | d29351e8c20d61a852bbdfcab7bb7166bd916558 (patch) | |
| tree | 4c5aa96b73c1a826eb7d4b7d9ae2325e45b9d7b3 /sound/soc/generic/audio-graph-card2.c | |
| parent | 6475b8e1821c9d14e60592a74c10d75431500c7c (diff) | |
ASoC: audio-graph-card2: Introduce playback-only/capture-only DAI link flags
We need this to support MICFIL PDM found on i.MX8MP where the DAI link
supports only capture direction.
Signed-off-by: Daniel Baluta <[email protected]>
Link: https://msgid.link/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/generic/audio-graph-card2.c')
| -rw-r--r-- | sound/soc/generic/audio-graph-card2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 78d9679decda..f880a7f73522 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -760,6 +760,7 @@ static void graph_link_init(struct simple_util_priv *priv, struct device_node *ep; struct device_node *ports; unsigned int daifmt = 0, daiclk = 0; + bool playback_only = 0, capture_only = 0; unsigned int bit_frame = 0; if (graph_lnk_is_multi(port)) { @@ -798,6 +799,11 @@ static void graph_link_init(struct simple_util_priv *priv, if (is_cpu_node) daiclk = snd_soc_daifmt_clock_provider_flipped(daiclk); + graph_util_parse_link_direction(port, &playback_only, &capture_only); + + dai_link->playback_only = playback_only; + dai_link->capture_only = capture_only; + dai_link->dai_fmt = daifmt | daiclk; dai_link->init = simple_util_dai_init; dai_link->ops = &graph_ops; |