Tan, Seng Kai wrote:
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)
No, the kernel driver should never change sample data.
If the hardware supports only 32-bit-aligned samples, then the driver must declare that. Any needed conversions are then done in user space.
S24_LE in wav file
qwavheaderdump -F ~/Public/workspace/aud_file/Tones/2ch_48sine_S24_LE.wav channels: 2 sample rate: 48000 bytes/second: 384000 bytes/sample: 8 bits/sample: 24
This is not correct according to the .wav specification; the wBitsPerSamples field must be the container size, which is 32 here (as shown by nChannels and nBlockAlign).
If the number of valid bits is less than the container size, the file must use the wValidBitsPerSample field in the WAVEFORMATEXTENSIBLE structure.
Anyway, .wav files cannot describe or use S24_LE samples, they use either S32_LE (as in this file) or S24_3LE.
Regards, Clemens