[alsa-devel] ASoC: how to calculate dma size in tdm mode

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Aug 9 12:38:14 CEST 2012


On Thu, Aug 09, 2012 at 05:56:57PM +0800, Scott Jiang wrote:

> If user app use 2 channels but codec need 8 channels in tdm mode, I
> need to copy this data from user space to dma buffer. I wonder how to
> calculate dma size, snd_pcm_hardware.buffer_bytes_max or
> buffer_bytes_max * tdm_channels / channels_min?

I'm not sure which data you mean here?  It sounds like your hardware
doesn't support stereo DMA, if that's the case your capabilites should
reflect it.  With most hardware you'd just do a normal stereo playback
here, the unused TDM timeslots would not be visible outside of the DAI.


More information about the Alsa-devel mailing list