[alsa-devel] [PATCH v2] ALSA: ASoC: McASP: add support for 24 bit samples

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Oct 9 12:24:21 CEST 2012

On Tue, Oct 09, 2012 at 11:47:57AM +0200, Daniel Mack wrote:
> On 09.10.2012 11:41, Mike Looijmans wrote:
> > Sorry for the lack of quoting, but I onle get the digest.

> > These are wrong:

> > +       case SNDRV_PCM_FORMAT_U24_LE: +       case

> > These pack a 24-bit sample value in a 32-bit word. The codec will
> > send 32 bits to the McASP, and you should transfer 32 bits to the
> > user, not just 24. Hence, SNDRV_PCM_FORMAT_S24_LE must be treated
> > just like SNDRV_PCM_FORMAT_S32_LE.

> > I've tested that on a DA850-alike board with several TLV320AIC3256
> > codecs, treating them as 3-byte samples will reasult in invalid
> > data.

> Ok, thanks for reporting this. Would like to send a patch or want me to
> fix it?

The above explanation isn't quite right.  For 24 bit the CODEC should be
working with 24 bits on the wire (though obviously extra BCLKs are
allowed) and the AP should be working with 32 bit words in memory.  The
issue here is probably that you're working with real 24 bit data in RAM

More information about the Alsa-devel mailing list