More Generic Audio Graph Sound Card idea
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Fri Aug 21 06:15:41 CEST 2020
Hi Mark
Cc Pierre-Louis, Sameer
Current audio-graph-card driver has DPCM support,
but it is limited (= Mix/Mux/TDM-split/rate-convert/channel-convert).
It was expanded forcibly expanded.
Because of it, the connection judgement for normal vs DPCM is tricky.
I know Pierre-Louis want to use it for SOF, but something is missing,
thus, can't use (?).
I know now Sameer is currently trying to expand it now.
It is OK for me, but, more expansion in the future will be difficult/buggy.
For example supporting many *generic* DPCM and normal connection in the
same time will be difficult.
I'm thinking below style as new audio-graph-card2.
It is not tricky, thus connection judgement for normal vs DSP is easy.
Then, code can be more readable (= no guaranty :P) ?
I guss "audio-graph-card" and "audio-graph-card2" can have some (= not full)
compatible for normal connection. But has no compatible for DPCM connection.
I think I need to keep as-is for current audio-graph-card,
and create new audio-graph-card2 driver.
Because there is users, and card2 implementation will have huge different.
Keeping compatible and update will be very difficult or buggy.
But what do you think ?
Note 1 is that this is just idea for now.
I'm very happy to implement it, but it will be after that
my all remaining patch was posted/accepted.
Note 2 is that I'm not full DPCM analyst.
Thus, maybe audio-graph-card2 can solve current connection issue,
but might can't for unknown connection case.
In such came we need ver3 (?).
------------ image ---------------------------
| Front End PCMs | SoC DSP | Back End DAIs | Audio devices |
*************
PCM0 <------------> * * <----DAI0-----> Codec Headset
* *
PCM1 <------------> * * <----DAI1-----> Codec Speakers
* DSP *
PCM2 <------------> * * <----DAI2-----> MODEM
* *
PCM3 <------------> * * <----DAI3-----> BT
* *
* * <----DAI4-----> DMIC
* *
* * <----DAI5-----> FM
*************
------------ DT sample ---------------------------
sound {
compatible = "audio-graph-card2";
dais = <&pcm0,
&pcm1,
&pcm2,
&pcm3>;
};
front-end {
ports {
pcm0: port at 0 { pcm0_endpoint: endpoint { remote-endpoint = <&dsp_f0>; }; };
pcm1: port at 1 { pcm1_endpoint: endpoint { remote-endpoint = <&dsp_f1>; }; };
pcm2: port at 2 { pcm2_endpoint: endpoint { remote-endpoint = <&dsp_f2>; }; };
pcm3: port at 3 { pcm3_endpoint: endpoint { remote-endpoint = <&dsp_f3>; }; };
};
};
dsp {
compatible = "audio-graph-card2-dsp";
ports {
/* Front End side */
port at 0 { dsp_f0: endpoint { remote-endpoint = <&pcm0>; }; };
port at 1 { dsp_f1: endpoint { remote-endpoint = <&pcm1>; }; };
port at 2 { dsp_f2: endpoint { remote-endpoint = <&pcm2>; }; };
port at 3 { dsp_f3: endpoint { remote-endpoint = <&pcm3>; }; };
/* Back End side */
port at 4 { dsp_b0: endpoint { remote-endpoint = <&dai0>; }; };
port at 5 { dsp_b1: endpoint { remote-endpoint = <&dai1>; }; };
port at 6 { dsp_b2: endpoint { remote-endpoint = <&dai2>; }; };
port at 7 { dsp_b3: endpoint { remote-endpoint = <&dai3>; }; };
port at 8 { dsp_b4: endpoint { remote-endpoint = <&dai4>; }; };
port at 9 { dsp_b5: endpoint { remote-endpoint = <&dai5>; }; };
};
};
back-end {
ports {
port at 0 { dai0: endpoint { remote-endpoint = <&dsp_b0>; }; };
port at 1 { dai1: endpoint { remote-endpoint = <&dsp_b1>; }; };
port at 2 { dai2: endpoint { remote-endpoint = <&dsp_b2>; }; };
port at 3 { dai3: endpoint { remote-endpoint = <&dsp_b3>; }; };
port at 4 { dai4: endpoint { remote-endpoint = <&dsp_b4>; }; };
port at 5 { dai5: endpoint { remote-endpoint = <&dsp_b5>; }; };
};
};
More information about the Alsa-devel
mailing list