[alsa-devel] [PATCH V1 08/11] ASoc: DaVinci: i2s, Improve underrun, support mono
Mark Brown
broonie at opensource.wolfsonmicro.com
Sun Jul 5 14:12:05 CEST 2009
On Sat, Jul 04, 2009 at 07:29:58PM -0700, Troy Kisky wrote:
> This patch will reduce the number of underruns by
> shifting out 32 bit values instead of 16 bit. It also
> adds mono support.
> + if (channels == 2) {
> + /* Combining both channels into 1 element can allow x10 the
> + * amount of time between servicing the dma channel, increase
> + * effiency, and reduce the chance of overrun/underrun. But,
> + * it will result in the left & right channels being swapped.
> + * So, you may want to let the codec know to swap them back.
This seems dodgy. The end resule sounds like a win but if it's going to
introduce a L/R swap then that's going to catch people out and not all
CODECs will have the ability to revert the swap. On the other hand, the
efficiency wins sound worthwhile from your description. Is it possible
to make this behaviour optional?
I'm going to be doing some work on digital routing and mixing soon, it
may make sense to hold off on this change and see if it can be
integrated with those changes - it sounds like the sort of thing that we
ought to be able to represent better. There's a bunch of other stuff
which could be done with better core support in that area.
> + *
> + * It may be x10 instead of x2 because the clock from the codec
> + * may run at mclk speed (ie. tlvaic23b), independent of the
> + * sample rate. So, having an entire frame at once means it can
> + * be serviced at the sample rate instead of the mclk speed.
I'm also having a really hard time following this bit of the comment,
mostly I think because I'm not sure what clock you're talking about
here.
More information about the Alsa-devel
mailing list