[alsa-devel] ASoC: How to mix multi input ?
Vinod Koul
vinod.koul at intel.com
Mon May 25 07:48:44 CEST 2015
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
More information about the Alsa-devel
mailing list