[alsa-devel] Counting links in simple-card
Hi Morimoto-san,
In simple-card.c simple_get_dais_count function there is this comment:
* ex1) * CPU0 --- Codec0 * CPU1 --- Codec1 * CPU2 -----/ * CPU3 --- Codec2 * * => 5 links = 2xCPU-Codec + 2xCPU-dummy + 1xdummy-Codec * => 7 DAIs = 4xCPU + 3xCodec * => 1 ccnf = 1xdummy-Codec
So, I don't understand exactly how did you get the formula for links. AFAICT there should be 3 x CPU-Codec + 1 x CPU-dummy.
thanks, Daniel.
Also, I wonder how can i use simple-card to create just a backend link CPU-dummy + Codec :).
Is this supported?
thanks, Daniel.
On Tue, Oct 8, 2019 at 4:03 PM Daniel Baluta daniel.baluta@gmail.com wrote:
Hi Morimoto-san,
In simple-card.c simple_get_dais_count function there is this comment:
* ex1) * CPU0 --- Codec0 * CPU1 --- Codec1 * CPU2 -----/ * CPU3 --- Codec2 * * => 5 links = 2xCPU-Codec + 2xCPU-dummy + 1xdummy-Codec * => 7 DAIs = 4xCPU + 3xCodec * => 1 ccnf = 1xdummy-Codec
So, I don't understand exactly how did you get the formula for links. AFAICT there should be 3 x CPU-Codec + 1 x CPU-dummy.
thanks, Daniel.
Hi Daniel
* ex1) * CPU0 --- Codec0 * CPU1 --- Codec1 * CPU2 -----/ * CPU3 --- Codec2 * * => 5 links = 2xCPU-Codec + 2xCPU-dummy + 1xdummy-Codec * => 7 DAIs = 4xCPU + 3xCodec * => 1 ccnf = 1xdummy-Codec
So, I don't understand exactly how did you get the formula for links. AFAICT there should be 3 x CPU-Codec + 1 x CPU-dummy.
CPU1/CPU2 and Codec1 are using DPCM. Thus, it is...
2xCPU-Codec: CPU0 - Codec0 CPU3 - Codec2
2xCPU-dummy: CPU1 - dummy CPU2 - dummy
1xdummy-Codec: dummy - Codec1
Also, I wonder how can i use simple-card to create just a backend link CPU-dummy + Codec :).
Is this supported?
Do you mean CPU-dummy + dummy-Codec ? But anyway, simple-card/audio-graph DPCM support is very limited. Unfortunately it doesn't have flexibility...
Thank you for your help !! Best regards --- Kuninori Morimoto
On Wed, Oct 9, 2019 at 3:18 AM Kuninori Morimoto kuninori.morimoto.gx@renesas.com wrote:
Hi Daniel
* ex1) * CPU0 --- Codec0 * CPU1 --- Codec1 * CPU2 -----/ * CPU3 --- Codec2 * * => 5 links = 2xCPU-Codec + 2xCPU-dummy + 1xdummy-Codec * => 7 DAIs = 4xCPU + 3xCodec * => 1 ccnf = 1xdummy-Codec
So, I don't understand exactly how did you get the formula for links. AFAICT there should be 3 x CPU-Codec + 1 x CPU-dummy.
CPU1/CPU2 and Codec1 are using DPCM. Thus, it is...
2xCPU-Codec: CPU0 - Codec0 CPU3 - Codec2
2xCPU-dummy: CPU1 - dummy CPU2 - dummy
1xdummy-Codec: dummy - Codec1
Also, I wonder how can i use simple-card to create just a backend link CPU-dummy + Codec :).
Is this supported?
Do you mean CPU-dummy + dummy-Codec ? But anyway, simple-card/audio-graph DPCM support is very limited. Unfortunately it doesn't have flexibility...
Yes, exactly. I need 1 DAI link with 1 FE + 1 BE for DSP / SOF usecase.
Hi Daniel
Do you mean CPU-dummy + dummy-Codec ? But anyway, simple-card/audio-graph DPCM support is very limited. Unfortunately it doesn't have flexibility...
Yes, exactly. I need 1 DAI link with 1 FE + 1 BE for DSP / SOF usecase.
simple-card support it if it needs convert-rate or convert-channels. Please check below
static simple_for_each_link(xxx) { ... for_each_child_of_node(node, np) { /* * It is DPCM * if it has many CPUs, * or has convert-xxx property */ (1) if (dpcm_selectable && (2) (num > 2 || (3) adata.convert_rate || adata.convert_channels)) ret = func_dpcm(priv, np, codec, li, is_top); ...
(1) : using simple-scu-audio-card (2) : 2 nodes or more (3) : has convert-xxx property
Thank you for your help !! Best regards --- Kuninori Morimoto
Thanks for your answer. See my comments inline
On Thu, Oct 10, 2019 at 2:37 AM Kuninori Morimoto kuninori.morimoto.gx@renesas.com wrote:
Hi Daniel
Do you mean CPU-dummy + dummy-Codec ? But anyway, simple-card/audio-graph DPCM support is very limited. Unfortunately it doesn't have flexibility...
Yes, exactly. I need 1 DAI link with 1 FE + 1 BE for DSP / SOF usecase.
simple-card support it if it needs convert-rate or convert-channels.
Yes, but this is needed for ASRC-like components. I don't think I can abuse this usage for my usecase.
Please check below
static simple_for_each_link(xxx) { ... for_each_child_of_node(node, np) { /* * It is DPCM * if it has many CPUs, * or has convert-xxx property */
(1) if (dpcm_selectable && (2) (num > 2 || (3) adata.convert_rate || adata.convert_channels)) ret = func_dpcm(priv, np, codec, li, is_top); ...
(1) : using simple-scu-audio-card (2) : 2 nodes or more (3) : has convert-xxx property
In fact I just need 1 BE DAI link. My use case is with SOF where the FE will be added by topology.
I think I can modify simple-card to do this. Just let me know if you see something obviously wrong on making the simple-card / simple-scu-card handling this case with creating just 1 BE DAI link.
Maybe add a property like "dpcm".
On Wed, Oct 9, 2019 at 3:18 AM Kuninori Morimoto kuninori.morimoto.gx@renesas.com wrote:
Hi Daniel
* ex1) * CPU0 --- Codec0 * CPU1 --- Codec1 * CPU2 -----/ * CPU3 --- Codec2 * * => 5 links = 2xCPU-Codec + 2xCPU-dummy + 1xdummy-Codec * => 7 DAIs = 4xCPU + 3xCodec * => 1 ccnf = 1xdummy-Codec
So, I don't understand exactly how did you get the formula for links. AFAICT there should be 3 x CPU-Codec + 1 x CPU-dummy.
CPU1/CPU2 and Codec1 are using DPCM. Thus, it is...
2xCPU-Codec: CPU0 - Codec0 CPU3 - Codec2
2xCPU-dummy: CPU1 - dummy CPU2 - dummy
1xdummy-Codec: dummy - Codec1
One more question: How would you describe in the DTS this scenario. Is this, correct?
machine_drv { compatible = "simple-card";
simple-audio-card,dai-link@0 { cpu { sound-dai=<&cpu0>; } codec { sound-dai=<&Codec0>; } }
simple-audio-card,dai-link@1 { cpu { sound-dai=<&cpu3>; } codec { sound-dai=<&Codec2>; } }
simple-audio-card,dai-link@2 { cpu { sound-dai=<&cpu1>; } }
simple-audio-card,dai-link@3 { cpu { sound-dai=<&cpu2>; } }
simple-audio-card,dai-link@4{ cpu { sound-dai=<&Codec1>; } } };
Hi Daniel
Thank you for your email
I think I can modify simple-card to do this. Just let me know if you see something obviously wrong on making the simple-card / simple-scu-card handling this case with creating just 1 BE DAI link.
Current DPCM support is used for "TDM-Split mode", "MIXer", "Sampling rate convert" for now.
But, of course I have no objection if you can add new feature.
simple-audio-card,dai-link@2 { cpu { sound-dai=<&cpu1>; } }
It looks FE, but is this for BE ?
Maybe add a property like "dpcm".
I think property "dpcm" is very ALSA-SoC naming, DT guy don't like it (?). "simple-xxx-card" (1) or new node (2) can be acceptable ? I'm not sure...
machine_drv { (1) compatible = "simple-xxx-card"; ...
simple-audio-card,dai-link@2 { (2) dpcm-fe { sound-dai=<&cpu1>; ...
Thank you for your help !! Best regards --- Kuninori Morimoto
participants (2)
-
Daniel Baluta
-
Kuninori Morimoto