Re: Question about Conversion to S24_LE from S24_3LE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux