[alsa-devel] [PATCH] pcm: softvol: add support for S24_LE
Takashi Iwai
tiwai at suse.de
Tue Sep 12 09:12:34 CEST 2017
On Tue, 12 Sep 2017 09:02:47 +0200,
Clemens Ladisch wrote:
>
> Jörg Krause wrote:
> > The i.MX6UL has a Synchronous Audio Interface (SAI), where the data in
> > the FIFO can be aligned anywhere within the 32-bit wide register
> > through the use of the First Bit Shifted configuration field. In the
> > corresponding Linux SAI driver the FBS field is set the way that data
> > alignment for 24-bit data is:
> >
> > 31 30 29 28 | 27 26 25 24 | 23 22 21 20 | .. | 3 2 1 0
> > ## ## ## ## ## ## ## ## [ DATA[23:0] ]
>
> This indeed is S24_LE.
>
> Which is an extremely uncommon format. If possible, the driver should
> be changed to align to the sample's MSB to the memory word's MSB, and
> then label it as S32_LE.
>
> >> S24_LE cannot be handled with the same algorithm as S32_LE.
>
> To be precise: the sign in bit 23 must be preserved.
I guess the simple calculation with S24_LE using the current code
would work as long as the upper 8 bits are ignored by hardware.
The upper 8 bits would hold bogus bits, and clearing this would be an
extra action we'd need in addition.
thanks,
Takashi
More information about the Alsa-devel
mailing list