CoppolaVH
Posts: 3
Joined: Wed Mar 10, 2021 12:23 pm

Problem: 24 bit Output to HDMI downsamples to 16 bit in pi 4 b model

Thu Mar 11, 2021 1:20 pm

We are looking at options for 24 bit audio output over HDMI. Currently the pi 4 b model is downsampling to 16 bit.

We understand the Openmax (https://www.khronos.org/openmaxil) is a possible solution that can play 24 bit, but how do we load it as it does not seem to be a part of the Rasbi OS.

Does anybody have any success with 24 bit output, and how are you getting pi to do so, please?

cleverca22
Posts: 4734
Joined: Sat Aug 18, 2012 2:33 pm

Re: Problem: 24 bit Output to HDMI downsamples to 16 bit in pi 4 b model

Thu Mar 11, 2021 2:32 pm

https://github.com/raspberrypi/linux/bl ... 1989-L2015

when using the kms drivers, linux will register a FIFO inside the hdmi block, to be fed by the DMA controller
and the sound subsystem should then just feed it a stream of IEC958 (spdif) bytes, which then get embedded inside the video stream

CoppolaVH
Posts: 3
Joined: Wed Mar 10, 2021 12:23 pm

Re: Problem: 24 bit Output to HDMI downsamples to 16 bit in pi 4 b model

Thu Mar 11, 2021 3:15 pm

Thanks for the response. I am sorry I was not clear. I am dealing with Audio that is 24 bit FLAC encoded that streams to the pi. When it gets to the pi the output is downsampled to 16 bit.

Also, anything on kernel 5.4 as I think that is what we are running.

CoppolaVH
Posts: 3
Joined: Wed Mar 10, 2021 12:23 pm

Re: Problem: 24 bit Output to HDMI downsamples to 16 bit in pi 4 b model

Fri Mar 12, 2021 2:05 am

Regarding 24 bit output:

Encoded at 24 bit, 192 kHz, Stereo FLAC
Decoded to 24 bit, 192 kHz, Stereo, 4.846 Mbps

DestinationLocal
Output rate 16 bit, 192 kHz, Stereo, 6.144 Mbps

I added dtoverlay=vc4-fkms-v3d to config.txt (below), but still the pi downsamples to 16 bit as you can see above.

disable_splash=1
disable_overscan=1
hdmi_drive=2
hdmi_blanking=0
hdmi_force_edid_audio=1
hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=4
dtoverlay=vc4-fkms-v3d
#config_hdmi_boost=5
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=audio=on
#dtoverlay=disable-wifi
#dtoverlay=disable-bt
enable_uart=1
hdmi_enable_4kp60=1
[all]

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11837
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Problem: 24 bit Output to HDMI downsamples to 16 bit in pi 4 b model

Fri Mar 12, 2021 5:56 pm

https://github.com/raspberrypi/linux/issues/4204

Please do not duplicate questions between forums and Github, or at least if you must then provide a link each way. Not doing so results in two disconnected threads, and duplicated effort.

And use the 5.10 kernel as that is now the standard one that is being supported.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Troubleshooting”