* ASoC: How to mix multi input ?
@ 2015-05-20 5:20 Kuninori Morimoto
2015-05-20 18:13 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2015-05-20 5:20 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood
Hi Mark, ALSA SoC
I would like to ask you how to mix multi input in ASoC.
Renesas sound device(s) can mix multi input to 1 output.
+-+
sound A --> |M|
sound B --> |I| --> [ codec ] -> speaker
sound C --> |X|
+-+
Here, sound A/B/C will be used randomly.
Does ALSA SoC already has this kind of system ?
My image about these are like this.
sound A: aplay -D hw:0 ...
sound B: aplay -D hw:1 ...
sound C: aplay -D hw:2 ...
...
codec will be started if one of A/B/C are started,
and it will be stopped if all of A/B/C are stopped.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ASoC: How to mix multi input ?
2015-05-20 5:20 ASoC: How to mix multi input ? Kuninori Morimoto
@ 2015-05-20 18:13 ` Mark Brown
2015-05-21 0:20 ` Kuninori Morimoto
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2015-05-20 18:13 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Simon, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 810 bytes --]
On Wed, May 20, 2015 at 05:20:06AM +0000, Kuninori Morimoto wrote:
> I would like to ask you how to mix multi input in ASoC.
> Renesas sound device(s) can mix multi input to 1 output.
You mean in DPCM rather than a plain CODEC?
> Here, sound A/B/C will be used randomly.
> Does ALSA SoC already has this kind of system ?
I *think* at least the Intel systems do this already.
> My image about these are like this.
> sound A: aplay -D hw:0 ...
> sound B: aplay -D hw:1 ...
> sound C: aplay -D hw:2 ...
> ...
> codec will be started if one of A/B/C are started,
> and it will be stopped if all of A/B/C are stopped.
If you connect multiple front ends to one back end this should work
(with DAPM routes and so on). If it doesn't work then that's something
that should work.
[-- 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] 9+ messages in thread
* Re: ASoC: How to mix multi input ?
2015-05-20 18:13 ` Mark Brown
@ 2015-05-21 0:20 ` Kuninori Morimoto
2015-05-21 11:05 ` Mark Brown
2015-05-25 5:48 ` Vinod Koul
0 siblings, 2 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2015-05-21 0:20 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood
Hi Mark
Thank you for your reply
>> Here, sound A/B/C will be used randomly.
>> Does ALSA SoC already has this kind of system ?
>
> I *think* at least the Intel systems do this already.
Thank you. I will check it.
> > I would like to ask you how to mix multi input in ASoC.
> > Renesas sound device(s) can mix multi input to 1 output.
>
> You mean in DPCM rather than a plain CODEC?
(snip)
> > codec will be started if one of A/B/C are started,
> > and it will be stopped if all of A/B/C are stopped.
>
> If you connect multiple front ends to one back end this should work
> (with DAPM routes and so on). If it doesn't work then that's something
> that should work.
I considered about DPCM, but *maybe* this is not goot match for us.
If my understanding is correct, and if I used DPCM for this,
all of sound A/B/C are start/stop:ed in same time ?
ex)
start sound => start A/B/C and codec
stop sound => stop A/B/C and codec
I guess it works if it has this connection
data -> [A] -> [B] -> [C] -> codec
We would like to do is like this
+-+
dataA -> [A] -> |M|
dataB -> [B] -> |I| -> codec
dataC -> [C] -> |X|
+-+
init => working:
start sound A => working: codec + A
start sound B => working: codec + A/B (mixed)
stop sound A => working: codec + B
start sound C => working: codec + B/C (mixed)
stop sound B => working: codec + C
stop sound C => working:
I guess current DPCM doesn't support this ?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ASoC: How to mix multi input ?
2015-05-21 0:20 ` Kuninori Morimoto
@ 2015-05-21 11:05 ` Mark Brown
2015-05-22 0:01 ` Kuninori Morimoto
2015-05-25 5:48 ` Vinod Koul
1 sibling, 1 reply; 9+ messages in thread
From: Mark Brown @ 2015-05-21 11:05 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Simon, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 1357 bytes --]
On Thu, May 21, 2015 at 12:20:06AM +0000, Kuninori Morimoto wrote:
> > > codec will be started if one of A/B/C are started,
> > > and it will be stopped if all of A/B/C are stopped.
> > If you connect multiple front ends to one back end this should work
> > (with DAPM routes and so on). If it doesn't work then that's something
> > that should work.
> I considered about DPCM, but *maybe* this is not goot match for us.
> If my understanding is correct, and if I used DPCM for this,
> all of sound A/B/C are start/stop:ed in same time ?
> ex)
> start sound => start A/B/C and codec
> stop sound => stop A/B/C and codec
> I guess it works if it has this connection
> data -> [A] -> [B] -> [C] -> codec
> We would like to do is like this
>
> +-+
> dataA -> [A] -> |M|
> dataB -> [B] -> |I| -> codec
> dataC -> [C] -> |X|
> +-+
> init => working:
> start sound A => working: codec + A
> start sound B => working: codec + A/B (mixed)
> stop sound A => working: codec + B
> start sound C => working: codec + B/C (mixed)
> stop sound B => working: codec + C
> stop sound C => working:
> I guess current DPCM doesn't support this ?
What you're describing is what I'd expect to happen - I'd say if that's
not working it's a bug and we should fix 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] 9+ messages in thread
* Re: ASoC: How to mix multi input ?
2015-05-21 11:05 ` Mark Brown
@ 2015-05-22 0:01 ` Kuninori Morimoto
2015-05-22 17:59 ` Liam Girdwood
0 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2015-05-22 0:01 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Simon, Liam Girdwood
Hi Mark
> > init => working:
> > start sound A => working: codec + A
> > start sound B => working: codec + A/B (mixed)
> > stop sound A => working: codec + B
> > start sound C => working: codec + B/C (mixed)
> > stop sound B => working: codec + C
> > stop sound C => working:
>
> > I guess current DPCM doesn't support this ?
>
> What you're describing is what I'd expect to happen - I'd say if that's
> not working it's a bug and we should fix it.
Thank you. I didn't know this.
I will check it
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ASoC: How to mix multi input ?
2015-05-22 0:01 ` Kuninori Morimoto
@ 2015-05-22 17:59 ` Liam Girdwood
2015-05-22 18:04 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Liam Girdwood @ 2015-05-22 17:59 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Liam Girdwood, Simon
On Fri, 2015-05-22 at 00:01 +0000, Kuninori Morimoto wrote:
> Hi Mark
>
> > > init => working:
> > > start sound A => working: codec + A
> > > start sound B => working: codec + A/B (mixed)
> > > stop sound A => working: codec + B
> > > start sound C => working: codec + B/C (mixed)
> > > stop sound B => working: codec + C
> > > stop sound C => working:
> >
> > > I guess current DPCM doesn't support this ?
> >
> > What you're describing is what I'd expect to happen - I'd say if that's
> > not working it's a bug and we should fix it.
>
> Thank you. I didn't know this.
> I will check it
DPCM should work with all the above. It worked on OMAP4 ABE when I last
checked OMAP4 over 2 years ago.
Liam
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ASoC: How to mix multi input ?
2015-05-22 17:59 ` Liam Girdwood
@ 2015-05-22 18:04 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-05-22 18:04 UTC (permalink / raw)
To: Liam Girdwood; +Cc: Linux-ALSA, Simon, Liam Girdwood, Kuninori Morimoto
[-- Attachment #1.1: Type: text/plain, Size: 664 bytes --]
On Fri, May 22, 2015 at 06:59:31PM +0100, Liam Girdwood wrote:
> On Fri, 2015-05-22 at 00:01 +0000, Kuninori Morimoto wrote:
> > > > init => working:
> > > > start sound A => working: codec + A
> > > > start sound B => working: codec + A/B (mixed)
> > > > stop sound A => working: codec + B
> > > > start sound C => working: codec + B/C (mixed)
> > > > stop sound B => working: codec + C
> > > > stop sound C => working:
> DPCM should work with all the above. It worked on OMAP4 ABE when I last
> checked OMAP4 over 2 years ago.
Yeah, I was pretty sure people had been doing that already and I didn't
see anything that might have changed 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] 9+ messages in thread
* Re: ASoC: How to mix multi input ?
2015-05-21 0:20 ` Kuninori Morimoto
2015-05-21 11:05 ` Mark Brown
@ 2015-05-25 5:48 ` Vinod Koul
2015-05-25 8:06 ` Kuninori Morimoto
1 sibling, 1 reply; 9+ messages in thread
From: Vinod Koul @ 2015-05-25 5:48 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Liam Girdwood, Simon
On Thu, May 21, 2015 at 12:20:06AM +0000, Kuninori Morimoto wrote:
>
> Hi Mark
>
> Thank you for your reply
>
> >> Here, sound A/B/C will be used randomly.
> >> Does ALSA SoC already has this kind of system ?
> >
> > I *think* at least the Intel systems do this already.
>
> Thank you. I will check it.
>
> > > I would like to ask you how to mix multi input in ASoC.
> > > Renesas sound device(s) can mix multi input to 1 output.
> >
> > You mean in DPCM rather than a plain CODEC?
> (snip)
> > > codec will be started if one of A/B/C are started,
> > > and it will be stopped if all of A/B/C are stopped.
> >
> > If you connect multiple front ends to one back end this should work
> > (with DAPM routes and so on). If it doesn't work then that's something
> > that should work.
>
> I considered about DPCM, but *maybe* this is not goot match for us.
> If my understanding is correct, and if I used DPCM for this,
> all of sound A/B/C are start/stop:ed in same time ?
>
> ex)
> start sound => start A/B/C and codec
> stop sound => stop A/B/C and codec
>
> I guess it works if it has this connection
>
> data -> [A] -> [B] -> [C] -> codec
>
> We would like to do is like this
>
> +-+
> dataA -> [A] -> |M|
> dataB -> [B] -> |I| -> codec
> dataC -> [C] -> |X|
> +-+
>
> init => working:
> start sound A => working: codec + A
> start sound B => working: codec + A/B (mixed)
> stop sound A => working: codec + B
> start sound C => working: codec + B/C (mixed)
> stop sound B => working: codec + C
> stop sound C => working:
>
> I guess current DPCM doesn't support this ?
it does, you have to declare A, B, C as FE then introduce a digital mixer
(real or virtual, depending on the system) and the a BE which is your HW DAI
here and connects to codec
This works very well and you can start/stop A, B, C independently. Codec
will be on as along as any of the inputs is On.
See the sound/soc/intel/atom for reference
--
~Vinod
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: ASoC: How to mix multi input ?
2015-05-25 5:48 ` Vinod Koul
@ 2015-05-25 8:06 ` Kuninori Morimoto
0 siblings, 0 replies; 9+ messages in thread
From: Kuninori Morimoto @ 2015-05-25 8:06 UTC (permalink / raw)
To: Vinod Koul; +Cc: Linux-ALSA, Mark Brown, Liam Girdwood, Simon
Hi Vinod
> > init => working:
> > start sound A => working: codec + A
> > start sound B => working: codec + A/B (mixed)
> > stop sound A => working: codec + B
> > start sound C => working: codec + B/C (mixed)
> > stop sound B => working: codec + C
> > stop sound C => working:
> >
> > I guess current DPCM doesn't support this ?
> it does, you have to declare A, B, C as FE then introduce a digital mixer
> (real or virtual, depending on the system) and the a BE which is your HW DAI
> here and connects to codec
>
> This works very well and you can start/stop A, B, C independently. Codec
> will be on as along as any of the inputs is On.
>
> See the sound/soc/intel/atom for reference
Thank you !
I will check it
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-05-25 8:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 5:20 ASoC: How to mix multi input ? Kuninori Morimoto
2015-05-20 18:13 ` Mark Brown
2015-05-21 0:20 ` Kuninori Morimoto
2015-05-21 11:05 ` Mark Brown
2015-05-22 0:01 ` Kuninori Morimoto
2015-05-22 17:59 ` Liam Girdwood
2015-05-22 18:04 ` Mark Brown
2015-05-25 5:48 ` Vinod Koul
2015-05-25 8:06 ` 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.