diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-10-12 07:55:33 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-15 18:10:41 +0300 |
commit | c3a15c92a67b701751c2680fa894d832570f7e7b (patch) | |
tree | 1ed0b1e1517408e17624ca1731759b46b5576a59 /include/sound/graph_card.h | |
parent | f03beb55a831bc7575b3c8882bf8fa6c81198eca (diff) | |
download | linux-c3a15c92a67b701751c2680fa894d832570f7e7b.tar.xz |
ASoC: audio-graph-card2: add Codec2Codec support
This patch adds Codec2Codec support to audio-graph-card2.
It can use Codec2Codec but very simple case only for now.
It doesn't have "SWITCH" control yet, thus it start automatically
when it was probed, and can't stop, so far.
Thus it needs to be updated around widgets/routing handling,
and you need to understand that it is under experimental.
Codec has SND_SOC_DAPM_INPUT() (= IN) / SND_SOC_DAPM_OUTPUT(= OUT)
widgets in below case.
It is assuming 2channel, S32_LE format for now.
It needs to be updated, too.
It needs "codec2codec" node (= B), needs to have routing (= A),
need to indicate CPU side at links (= X).
ports@0 is for CPU side (= X), port@1 is Codec side (= Y).
It needs to have "rate" (= C)
+--+
| |<-- Codec0 <-- IN
| |--> Codec1 --> OUT
+--+
sound {
compatible = "audio-graph-card2";
(A) routing = "OUT" ,"DAI1 Playback",
"DAI0 Capture", "IN";
(X) links = <&c2c>;
(B) codec2codec {
ports {
(C) rate = <48000>;
(X) c2c: port@0 { c2cf_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
(Y) port@1 { c2cb_ep: endpoint { remote-endpoint = <&codec1_ep>; }; };
};
};
Codec {
ports {
port@0 {
bitclock-master;
frame-master;
codec0_ep: endpoint { remote-endpoint = <&c2cf_ep>; }; };
port@1 { codec1_ep: endpoint { remote-endpoint = <&c2cb_ep>; }; };
};
};
Link: https://lore.kernel.org/r/87k0xszlep.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y26ylu4a.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/graph_card.h')
-rw-r--r-- | include/sound/graph_card.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/graph_card.h b/include/sound/graph_card.h index ece78a84391c..4c8b94c77b8e 100644 --- a/include/sound/graph_card.h +++ b/include/sound/graph_card.h @@ -18,6 +18,7 @@ struct graph2_custom_hooks { int (*hook_post)(struct asoc_simple_priv *priv); GRAPH2_CUSTOM custom_normal; GRAPH2_CUSTOM custom_dpcm; + GRAPH2_CUSTOM custom_c2c; }; int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev); @@ -28,5 +29,7 @@ int audio_graph2_link_normal(struct asoc_simple_priv *priv, struct device_node *lnk, struct link_info *li); int audio_graph2_link_dpcm(struct asoc_simple_priv *priv, struct device_node *lnk, struct link_info *li); +int audio_graph2_link_c2c(struct asoc_simple_priv *priv, + struct device_node *lnk, struct link_info *li); #endif /* __GRAPH_CARD_H */ |