[alsa-devel] ASOC: stream widget created two times

Arnaud POULIQUEN arnaud.pouliquen at st.com
Fri Nov 22 15:19:20 CET 2013

I 'm newbie on asoc dev. I'm trying to develop a driver based on dynamic
PCM implementation with backend and frontend. I'm working on 3.10

I have declared a FE  :
            .name = "MMDL0",
            .stream_name = "MM DL0 Frontend",
            .cpu_dai_name = "mm_dl0",

            .codec_name = "snd-soc-dummy",
            .codec_dai_name = "snd-soc-dummy-dai",

            .ignore_pmdown_time = 1, /* Power down without delay */
            .init = sti_dummy_init,

CPU DAI associated:
static struct snd_soc_dai_driver sti_frontend_cpu_dais[] = {
                        .name = "mm_dl0",
                        .playback = {
                                    .stream_name = "MM_DL0",
                                    .channels_min = 1,
                                    .channels_max = 8,
                                    .rates = SNDRV_PCM_RATE_48000,
                                    .formats = SNDRV_PCM_FMTBIT_S16_LE
                        .probe = sti_frontend_dai_probe,
                        .probe_order = SND_SOC_COMP_ORDER_FIRST,
Platform is declared using platform_of_node using DTS.
I have also declared a BE and the route that links the FE cpu dai widget with
the BE codec dai widget.

My concern is that MM_DL0 widget is created 2 times. One time in soc_probe_link_dais
and one time in soc_probe_platform.
After analysis it seems that this occurs because my cpu dai is registered in
platform device.
In this case the condition if (dai->dev != platform->dev)  in soc_probe_platform is false,
so dai widget is created a second time.

So I would like to know if  this is a normal behavior and I have to create a
specific device to register my cpu_dai?

Thanks in advance for your answers



More information about the Alsa-devel mailing list