* Question about Component and Card
@ 2015-08-03 5:33 Kuninori Morimoto
2015-08-03 6:27 ` Lars-Peter Clausen
0 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2015-08-03 5:33 UTC (permalink / raw)
To: Mark Brown, Lars-Peter Clausen; +Cc: Linux-ALSA, Simon, Liam Girdwood
Hi Lars
Cc Mark
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 ?
codec0: codec@0 {
xxx
};
codec1: codec@1 {
xxx
};
sound: sound@0xxxxxx {
#sound-dai-cells = <1>;
rcar_sound,dai {
dai0 {
xxxx
};
dai1 {
xxxx
};
};
};
card@0 {
compatible = "simple-audio-card";
simple-audio-card,cpu {
sound-dai = <&sound 0>;
};
simple-audio-card,codec {
sound-dai = <&codec0>;
};
};
card@1 {
compatible = "simple-audio-card";
simple-audio-card,cpu {
sound-dai = <&sound 1>;
};
simple-audio-card,codec {
sound-dai = <&codec1>;
};
};
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Question about Component and Card
2015-08-03 5:33 Question about Component and Card Kuninori Morimoto
@ 2015-08-03 6:27 ` Lars-Peter Clausen
2015-08-03 8:23 ` Kuninori Morimoto
0 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2015-08-03 6:27 UTC (permalink / raw)
To: Kuninori Morimoto, Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood
On 08/03/2015 07:33 AM, Kuninori Morimoto wrote:
>
> Hi Lars
> Cc Mark
>
> 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.
Changing this is unfortunately not really trivial.
- Lars
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Question about Component and Card
2015-08-03 6:27 ` Lars-Peter Clausen
@ 2015-08-03 8:23 ` Kuninori Morimoto
2015-08-03 11:51 ` Lars-Peter Clausen
0 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2015-08-03 8:23 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Linux-ALSA, Mark Brown, Liam Girdwood, Simon
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 ?
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: Question about Component and Card
2015-08-03 8:23 ` Kuninori Morimoto
@ 2015-08-03 11:51 ` Lars-Peter Clausen
2015-08-03 15:58 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Lars-Peter Clausen @ 2015-08-03 11:51 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Liam Girdwood, Simon
On 08/03/2015 10:23 AM, Kuninori Morimoto wrote:
>
> 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 ?
Yeah, it's difficult. I guess this is a case where the control path (e.g.
memory mapped register region, irq, etc.) is shared, but the data paths are
independent. In theory this means you can use each DAI in a different sound
card. But in practice they still share the same DAPM context, even though
there are no connections in the DAPM graph between them. I don't know how to
solve this issue. The easiest way out would be to register a different
component for each DAI. But that might not be possible depending on how the
system is structured.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Question about Component and Card
2015-08-03 11:51 ` Lars-Peter Clausen
@ 2015-08-03 15:58 ` Mark Brown
2015-08-04 0:22 ` Kuninori Morimoto
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2015-08-03 15:58 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto
[-- Attachment #1.1: Type: text/plain, Size: 738 bytes --]
On Mon, Aug 03, 2015 at 01:51:48PM +0200, Lars-Peter Clausen wrote:
> Yeah, it's difficult. I guess this is a case where the control path (e.g.
> memory mapped register region, irq, etc.) is shared, but the data paths are
> independent. In theory this means you can use each DAI in a different sound
> card. But in practice they still share the same DAPM context, even though
> there are no connections in the DAPM graph between them. I don't know how to
> solve this issue. The easiest way out would be to register a different
> component for each DAI. But that might not be possible depending on how the
> system is structured.
Alternatively combining everything into a single sound card might be
simpler than trying to deal with it.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Question about Component and Card
2015-08-03 15:58 ` Mark Brown
@ 2015-08-04 0:22 ` Kuninori Morimoto
0 siblings, 0 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2015-08-04 0:22 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Lars-Peter Clausen, Liam Girdwood, Simon
Hi Mark, Lars
> > Yeah, it's difficult. I guess this is a case where the control path (e.g.
> > memory mapped register region, irq, etc.) is shared, but the data paths are
> > independent. In theory this means you can use each DAI in a different sound
> > card. But in practice they still share the same DAPM context, even though
> > there are no connections in the DAPM graph between them. I don't know how to
> > solve this issue. The easiest way out would be to register a different
> > component for each DAI. But that might not be possible depending on how the
> > system is structured.
>
> Alternatively combining everything into a single sound card might be
> simpler than trying to deal with it.
I need to check above ideas.
Anyway, thank you for your help
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-08-04 0:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-03 5:33 Question about Component and Card Kuninori Morimoto
2015-08-03 6:27 ` Lars-Peter Clausen
2015-08-03 8:23 ` Kuninori Morimoto
2015-08-03 11:51 ` Lars-Peter Clausen
2015-08-03 15:58 ` Mark Brown
2015-08-04 0:22 ` Kuninori Morimoto
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.