[alsa-devel] Question about Component and Card

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Aug 3 10:23:07 CEST 2015


Hi Lars

> > I noticed my sound card (which is not upstreamed) can't probe in next branch.
> > I think it is because this patch
> > 1b7c12316982f74a5b8e7704c24cf5524d0723a3
> > (ASoC: Prevent components from being bound to multiple cards)
> > 
> > In my case, my sound device (= CPU) has some DAIs,
> > and these are connected to some codecs.
> > It is shown as below. And I would like to use these as 2 sound cards.
> >  ex)	aplay -D hw:0 xxx
> > 	aplay -D hw:1 xxx
> > But, 2nd sound card can't probe because of above patch now.
> > (component->card indicates 1st card)
> > It can be probeed if I used DPCM card (= 1 CPU + 2 Codec), but...
> > But, is my understanding wrong ?
> 
> ASoC always had the restriction that you can only bind a component to a
> single card. Otherwise the internal data structures will get corrupted,
> which may result in undefined behavior at a later point. The patch made this
> restriction explicit to make sure that issue is caught when it happens and
> you don't have dig through crashes from random memory corruption.

Hmm...
Current my CPU driver is probing all channels in 1 driver.
Then, I can use multi sound card if CPU driver probes limited channels.
(ex driver0 probes ch0, ch1
    driver1 probes ch2, ch3, or something like this)

This means I need to re-consider / change my CPU driver for it.
Do you think this is good idea ? or do I have other solution ?


More information about the Alsa-devel mailing list