11 Apr
2013
11 Apr
'13
11:35 a.m.
(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 SNDRV_PCM_FORMAT_S32_LE?
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
Regards, Clemens