[alsa-devel] ALSA/ASOC new device and routing

Liam Girdwood liam.r.girdwood at linux.intel.com
Thu Nov 27 14:11:54 CET 2014


Reflowed the message.

On Thu, 2014-11-27 at 09:21 +0000, Eli Britstein wrote:
> Hi
> 
> I'm a newbie to ALSA.
> I'm targeting to use ALSA or ASoC solution in order to route
> capture/playback streams of a USB headset (that uses ALSA) to/from my
> own DSP device.
> I saw DPCM which is a part of ASoC manages dynamically connections
> between FE and BE streams.
> In my product, I just need them to be connected. No need for the
> "dynamically" part.
> 
Ok, so you have standard static routing from source to sink. ? or does
your DSP allow routing from PCM 0 to HW port 0 .. N ?

Best to also describe your HW in more detail so that people on the list
can provide better answers. 

> My questions:
> 1. Can someone please recommend a step by step guide, or an example
> how to make my DSP "look like" a BE? Do I need to write an ALSA driver
> for it or a ASOC driver?

If the routing is static then there is no need to create FE and BE DAI
links for your DSP. Just create standard PCM and DAI link. Otherwise
have a look at existing DPCM based drivers like Intel Haswell/Broadwell
and OMAP4.

> 2. After I have it as a BE, how can I connect the streams? I want the
> transfers to be done in kernel level, without need for application
> interventions for each buffer.

The connection depends on your DSP routing topology. Again look at the
existing examples. I think you are also asking about DMA here ? if so,
the kernel takes care of DMA configuration, however your application
will probably still have to perform IO on your audio buffers.

> 3. I'm using kernel 2.6.10 (quite old, I know). I don't want to port
> my entire kernel to a new one. As my requirement is not very complex,
> I don't think I'd encounter too many issues. However, if someone can
> point the important parts I need to back port, I'd appreciate it.
> Alternatively, if someone sees a showstopper in this approach, I'd be
> grateful to be aware of it.
> 
2.6.10 is really ancient and there have been many improvements since. I
would strongly recommend upgrading to the latest release. 

Liam
> 
> Thanks,
> Best regards,
> 
> Eli
> 




More information about the Alsa-devel mailing list