On 09-01-2024 07:47, Kuninori Morimoto wrote:
/-----> codec1 endpoint /
CPU endpoint \ -----> codec2 endpoint
It sounds "Single CPU - Mult Codec" connection, and if my understanding was correct, current ASoC is not supporting it so far.
Yes, this is a typical TDM use case. __soc_pcm_hw_params() call in soc-pcm.c loops over all CODECs for a given rtd. So is there something else you are referring to which makes ASoC core doesn't work?
But dummy CPU with Multi-CPU/Codec connection helps you ? I'm not 100% sure though... See ${LINUX}/sound/soc/generic/audio-graph-card2-custom-sample.dtsi
DT looks like
[Multi-CPU/Codec] +-+ +-+ cpu <--| |<-@--------->| |-> codec1 dummy <--| | | |-> codec2 +-+ +-+
Use Multi-CPU/Codec connection with dummy.
audio-graph-card2 { compatible = "audio-graph-card2"; links = <&mcpu>; multi { ports@0 { /* [Multi-CPU] */ mcpu: port@0 { mcpu0_ep: endpoint { remote-endpoint = <&mcodec0_ep>; }; }; port@1 { mcpu1_ep: endpoint { remote-endpoint = <&cpu_ep>; }; }; port@2 { mcpu2_ep: endpoint { remote-endpoint = <&dummy_ep>; }; }; }; /* [Multi-Codec] */ ports@1 { port@0 { mcodec0_ep: endpoint { remote-endpoint = <&mcpu0_ep>; }; }; port@1 { mcodec1_ep: endpoint { remote-endpoint = <&codec1_ep>; }; }; port@2 { mcodec2_ep: endpoint { remote-endpoint = <&codec2_ep>; }; }; }; }; }; test_cpu { compatible = "test-cpu"; port { dummy_ep: endpoint { remote-endpoint = <&mcpu2_ep>; }; }; };
I looked at the 1:N (Semi-Multi) example in the references you shared. Seems like this is broken into multiple 1:1 links. Is this correct understanding?
Also the binding properties of "audio-graph-card2" seem to be different from "audio-graph-card". I am looking at a simpler extension of existing bindings for Tegra audio without having to re-write the whole bindings. If "remote-endpoint" can take phandle array it would be simpler from DT point of view.