[alsa-devel] Question about FE & BE DPCM
Daniel Baluta
daniel.baluta at gmail.com
Fri Nov 1 22:41:33 CET 2019
On Tue, Oct 15, 2019 at 4:15 AM Kuninori Morimoto
<kuninori.morimoto.gx at renesas.com> wrote:
>
>
> Hi Daniel
>
> > » /* BE is dummy */
> > » » codecs->of_node»» = NULL;
> > » » codecs->dai_name» = "snd-soc-dummy-dai";
> > » » codecs->name» » = "snd-soc-dummy";
> >
> > » » /* FE settings */
> > » » dai_link->dynamic» » = 1;
> > » » dai_link->dpcm_merged_format» = 1;
>
> Ahh, indeed... it is wrong comment.
> It should be /* Codec is dummy */ here.
> I will post fixup patch, soon.
>
> Current simple-card is assuming
>
> FE: CPU-dummy
> BE: dummy-Codec
>
> > asoc_simple_canonicalize_platform function where it does say:
> >
> > » * DPCM BE can be no platform.
> > » * Alloced memory will be waste, but not leak.
> > » */
> > » if (!dai_link->platforms->of_node)
> > » » dai_link->num_platforms = 0;
> >
> > But I do want to create a BE with a platform. So, should I try to
> > revert the following
>
> I see.
> I'm not using but someone added asoc_simple_parse_platform().
> Maybe it can help you (?), but it is not called/used under DPCM case.
> If you can support it under DPCM, asoc_simple_canonicalize_platform()
> is no longer your issue ?
Yes, this would definitely help. Now I'm trying to figure out an acceptable
way to create just one link with:
FE: CPU-dummy
BE: dummy-Codec
Or even better just one:
BE: dummy-Codec.
Both audio-graph-card.c and simple-card.c deal with DPCM only with
this conditions:
» » » /*
» » » * It is DPCM
» » » * if Codec port has many endpoints,
» » » * or has convert-xxx property
» » » */
or
» » » if (dpcm_selectable &&
» » » (num > 2 ||
» » » adata.convert_rate || adata.convert_channels))
More information about the Alsa-devel
mailing list