[alsa-devel] Question about Conversion to S24_LE from S24_3LE

Tan, Seng Kai seng.kai.tan at intel.com
Tue Apr 19 02:57:54 CEST 2016


Tan, Seng Kai wrote:
>>> Your hardware does not support S24_LE.
>>> 24-bit samples use the S32_LE format (unless you have very exotic hardware, but HDA isn't).
>>
>> We have another I2S hardware which is able to support S24L_LE and 
>> S32_LE format,

>The format on the codec's bus has almost nothing to do with the ALSA sample format.

>The Sxx_xE format describes how the samples are formatted in memory, i.e., how the DMA controller expects to read them.

I think I get what you mean. 
The input to the driver should be 0x123456 (3 byte, no padding)
And the driver supposed to arrange it to 0x12345600 (4 byte, LSB padding for left justified)
That is because the driver do not support and the value get truncate

>> S24_LE in wav file

>.wav files do no use ALSA sample formats.

>Please describe the values of the header fields in this .wav file.

qwavheaderdump -F ~/Public/workspace/aud_file/Tones/2ch_48sine_S24_LE.wav
/home/ilab/Public/workspace/aud_file/Tones/2ch_48sine_S24_LE.wav (11520044 bytes):
        riff: 'RIFF'
        riff length: 11520036
        wave: 'WAVE'
        fmt: 'fmt '
        fmt length: 16
        format: 1
        channels: 2
        sample rate: 48000
        bytes/second: 384000
        bytes/sample: 8
                 bytes/sample field should be 1, 2 or 4
                don't know which value must be set...

        bits/sample: 24
        data: 'data'
        data length: 11520000

Regards,
Clemens


More information about the Alsa-devel mailing list