• Kuninori Morimoto's avatar
    ASoC: audio-graph-card2: add DPCM support · f03beb55
    Kuninori Morimoto authored
    This patch adds DPCM support to audio-graph-card2.
    It uses "dpcm" node (= D), needs to have routing (= A),
    need to indicate both FE/BE at links (= B, C).
    dpcm ports@0 is for FE (= B), port@1 is for BE (= C).
    remote-endpoint can use both Single/Multi connection.
    
    			DSP
    		  ************
    	PCM0 <--> * fe0  be0 * <--> DAI0: Codec Headset
    	PCM1 <--> * fe1  be1 * <--> DAI1: Codec Speakers
    	PCM2 <--> * fe2  be2 * <--> DAI2: MODEM
    	PCM3 <--> * fe3  be3 * <--> DAI3: BT
    		  *	 be4 * <--> DAI4: DMIC
    		  *	 be5 * <--> DAI5: FM
    		  ************
    
    	sound {
    		compatible = "audio-graph-card2";
    
    		// indicate routing
    (A)		routing = "xxx Playback", "xxx Playback",
    			  "xxx Playback", "xxx Playback",
    			  "xxx Playback", "xxx Playback";
    
    		// indicate all Front-End, Back-End in DPCM case
    (B)		links = <&fe0, &fe1, ...
    (C)			 &be0, &be1, ...
    
    (D)		dpcm {
    			// Front-End
    			ports@0 {
    (B)				fe0: port@0 { fe0_ep: endpoint { remote-endpoint = <&pcm0_ep>; }; };
    (B)				fe1: port@1 { fe1_ep: endpoint { remote-endpoint = <&pcm1_ep>; }; };
    				...
    			};
    			// Back-End
    			ports@1 {
    (C)				be0: port@0 { be0_ep: endpoint { remote-endpoint = <&dai0_ep>; }; };
    (C)				be1: port@1 { be1_ep: endpoint { remote-endpoint = <&dai1_ep>; }; };
    				...
    			};
    		};
    	};
    
    	CPU {
    		ports {
    			bitclock-master;
    			frame-master;
    			port@0 { pcm0_ep: endpoint { remote-endpoint = <&fe0_ep>; }; };
    			port@1 { pcm1_ep: endpoint { remote-endpoint = <&fe1_ep>; }; };
    			...
    		};
    	};
    
    	Codec {
    		ports {
    			port@0 { dai0_ep: endpoint { remote-endpoint = <&be0_ep>; }; };
    			port@1 { dai1_ep: endpoint { remote-endpoint = <&be1_ep>; }; };
    			...
    		};
    	};
    
    Link: https://lore.kernel.org/r/87k0xszlep.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Link: https://lore.kernel.org/r/87zgrelu4v.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    f03beb55
graph_card.h 933 Bytes