On Wed, Oct 25, 2023 at 02:19:13AM +0000, Kuninori Morimoto wrote: > This patch adds channel-map-index property to enable handling Don't write commit messages with 'This patch' or 'This commit'. See the documentation on writing patches. > CPU:Codec = N:M connection. This is not answering Why? > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> > --- > .../devicetree/bindings/sound/audio-graph-port.yaml | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml > index 60b5e3fd1115..2a7e0784d591 100644 > --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml > +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml > @@ -93,6 +93,19 @@ definitions: > minimum: 1 > maximum: 64 > > + channel-map-index: > + description: It indicates CPU/Codec DAIs channel mapping index if number of > + CPU(N) / Codec(M) were not same in one dai-link. channel-map-index is not > + needed if the numbers were 1:M or N:1 or N==M. Same indexed CPU <-> Codec > + will be paired. This is CPUx2 <-> Codecx3 sample. > + CPUA { ... .channel-map-index = <0>; } > + [0] CPUA <---> CodecA CPUB { ... .channel-map-index = <1 2>; } > + [1] CPUB <-+-> CodecB > + [2] \-> CodecC CodecA { ... .channel-map-index = <0>; } > + CodecB { ... .channel-map-index = <1>; } > + CodecC { ... .channel-map-index = <2>; } We have 2 different meanings for channel-map-index here. We have the codecs defining "I am index N" and then the CPUs defining "I'm connected to codec N". That's confusing to start with. Made-up indices are something we try to avoid in DT. Are the numbers here (0, 1, 2) significant? The normal way we link from one node to another is phandles. Why not use phandles here: CPUA { ... .channel-map-index = <&CodecA>; } CPUB { ... .channel-map-index = <&CodecB &CodecC>; } However, we also have OF graph to define complex topologies/connections AND we're already using it for this binding. So why not here? You can always have more than 1 port and/or endpoint. Generally, multiple ports are independent/simultaneous data connections and multiple endpoints are either 1:N fanout or N:1 muxed connections. Rob