2014-09-24, 15:36
(2014-09-24, 15:16)plugh Wrote: Can't comments on all your cases, but the bcm2835 driver (both analog and hdmi) does not declare support for S24_LE
Actually xbmc doesn't use alsa for hdmi/analogue outputs. It uses openmax directly (and does support 8/16/24/32/float audio formats).
Internally xbmc uses ffmpeg's libswresample for format conversion. However the Pi has a GPU accelerated path for this which means libswresample is not used.
I did suspect that the GPU path might have a bug with 24-bit formats, but I get get the same noise with the GPU accelerated path disabled.
This fact suggests the bug is not in ffmpeg's libswresample as I believe I'm seeing it with that path disabled
Note there are two examples of noise produced:
One when using HifiBerry, presumably with mostly float audio (the output of most of ffmeg's audio decoders) . This will probably exercise a float->S24_LE conversion.
One when using s24_le.wav with HDMI audio output. This will probably exercise a S24_LE->float conversion (I'll have to check exactly what AudioEngine chooses for the sink in this case).
Possibly there are two bugs. One is a general disagreement about where bytes go in a S24 WAV file.
The other is on the path from xbmc->hifiberry driver does something wrong with S24.