[alsa-devel] what is the difference between SNDRV_PCM_FMTBIT_S24_LE and SNDRV_PCM_FMTBIT_S24_3LE

Clemens Ladisch clemens at ladisch.de
Thu Apr 11 11:35:57 CEST 2013

(please do not drop the mailing list from replies.)

Zhang wei wrote:
> I do not really understand. For example,an codec is wm8985 ...

The SNDRV_PCM_* symbols specify the format in which samples are
stored in memory.

I do not know how ASoC maps these symbols to on-the-wire formats.

>>Most devices that support 24 bits use SNDRV_PCM_FORMAT_S32_LE, which
>>stores the sample's bits in the upper bits of a 32-bit word.
> But how to distinguish the SNDRV_PCM_FORMAT_S24_LE and the REAL

If a 24-bit sample with the value 0x123456 is stored in memory, it looks
like this:
SNDRV_PCM_FORMAT_S24_LE: 56 34 12 00
SNDRV_PCM_FORMAT_S32_LE: 00 56 34 12


More information about the Alsa-devel mailing list