Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: 24 bit Output to HDMI downsamples to 16 bit
#21
(10-22-2023, 03:02 PM)jcucurull Wrote: Are there any news on the support of 24bit output via HDMI?

I have noticed that since April the kernel of Moodeaudio has been upgraded to version 6.1.21. I thought that maybe the problem was solved, because in some forums they were mentioning that this could be related to the version 5.x. However, after upgrading my Moodeaudio to the last release (8.3.6) with the new kernel, it still happens the same.

I have also tried the solution posted in some forums that consists of modifying the config.txt file to remove the options dtparam=audio=on and dtoverlay=vc4-fkms-v3d and adding dtoverlay=vc4-kms-v3d. But this only creates an alsa error when I try to reproduce any song.

So, has nobody managed to play 24 bits audio (without 16 bit decrease) using the HDMI output? To me it is a bit suprising, because the HDMI of the Raspi is the more versatile and economical way to output the audio towards an AVR (no extra layers are needed), which I am sure is one of the most common use cases of Moodeaudio.

No news that I know of., at least as far as RaspiOS Bullseye goes. It's possible that HDMI audio has been improved in the new Bookworm platform but our project is not yet at a point where we have a moOde Bookworm image to test.

You can run moodeutl -F to see what formats and sample rates the HDMI interfaces support.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#22
(10-22-2023, 05:25 PM)Tim Curtis Wrote: You can run moodeutl -F to see what formats and sample rates the HDMI interfaces support.

This is exactly what I had in mind with exposed properties (of the DAC...)
I believe the command, though, expects the HDMI to be chosen as output, in order to provide information.
Reply
#23
(10-22-2023, 06:23 PM)Nutul Wrote:
(10-22-2023, 05:25 PM)Tim Curtis Wrote: You can run moodeutl -F to see what formats and sample rates the HDMI interfaces support.

This is exactly what I had in mind with exposed properties (of the DAC...)
I believe the command, though, expects the HDMI to be chosen as output, in order to provide information.

It checks all the interfaces. It's just executing the alsacap command.

Code:
pi@sig:~ $ moodeutl -F
*** Scanning for playback devices ***
Card 0, ID `b1', name `bcm2835 HDMI 1'
 Device 0, ID `bcm2835 HDMI 1', name `bcm2835 HDMI 1', 4 subdevices (4 available)
   1..8 channels, sampling rate 8000..192000 Hz
   Sample formats: U8, S16_LE
   Buffer size range from 80 to 131072
   Period size range from 80 to 131072

     Subdevice 0, name `subdevice #0'
     Subdevice 1, name `subdevice #1'
     Subdevice 2, name `subdevice #2'
     Subdevice 3, name `subdevice #3'
 Device 1, ID `bcm2835 HDMI 1', name `bcm2835 HDMI 1', 1 subdevices (1 available)
   2 channels, sampling rate 44100..48000 Hz
   Sample formats: S16_LE
   Buffer size range from 444 to 32768
   Period size range from 444 to 32768

     Subdevice 0, name `subdevice #0'
Card 1, ID `Headphones', name `bcm2835 Headphones'
 Device 0, ID `bcm2835 Headphones', name `bcm2835 Headphones', 4 subdevices (4 available)
   1..8 channels, sampling rate 8000..192000 Hz
   Sample formats: U8, S16_LE
   Buffer size range from 80 to 131072
   Period size range from 80 to 131072

     Subdevice 0, name `subdevice #0'
     Subdevice 1, name `subdevice #1'
     Subdevice 2, name `subdevice #2'
     Subdevice 3, name `subdevice #3'
Card 2, ID `Revolution', name `Revolution'
 Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
   2 channels, sampling rate 44100..705600 Hz
   Sample formats: S16_LE, S32_LE, SPECIAL, DSD_U32_BE
   Buffer size range from 16 to 1411200
   Period size range from 8 to 705600

     Subdevice 0, name `subdevice #0'
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#24
(10-22-2023, 08:09 PM)Tim Curtis Wrote: Device 0, ID `bcm2835 HDMI 1'
Sample formats: U8, S16_LE

No 24 bits, nor 32, hence downgrade to 16.
Reply
#25
Yes 16-bit but in the kernel hdmi.c source file there is code for 24/192
https://github.com/raspberrypi/linux/blo...deo/hdmi.c

I'm not sure whether this code is whats being used to support the Pi HDMI ports but there is no question that Pi HDMI audio has been problematic for many years. Hopefully there will be some relief in Bookworm.

I'd like to see it work reliably up to 24/192, multichannel LPCM up to 7.1 and for passthrough Dolby AC3 and DTS bitstream. I think this is sort of whats expected from modern HDMI audio.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#26
(10-22-2023, 09:12 PM)Tim Curtis Wrote: Yes 16-bit but in the kernel hdmi.c source file there is code for 24/192
https://github.com/raspberrypi/linux/blo...deo/hdmi.c

I'm not sure whether this code is whats being used to support the Pi HDMI ports but there is no question that Pi HDMI audio has been problematic for many years. Hopefully there will be some relief in Bookworm.

I'd like to see it work reliably up to 24/192, multichannel LPCM up to 7.1 and for passthrough Dolby AC3 and DTS bitstream. I think this is sort of whats expected from modern HDMI audio.

Yes, know that, what I was - sorry for not having explicitly said - referring to is the fact that it could depend on the hardware implementation too; that is, how things are done on the Pi; and if it is so, we may get it with the Pi5. Full support for HDMI would be such a great achievement.
Reply
#27
(10-22-2023, 09:12 PM)Tim Curtis Wrote: Yes 16-bit but in the kernel hdmi.c source file there is code for 24/192
https://github.com/raspberrypi/linux/blo...deo/hdmi.c

I'm not sure whether this code is whats being used to support the Pi HDMI ports but there is no question that Pi HDMI audio has been problematic for many years. Hopefully there will be some relief in Bookworm.

I'd like to see it work reliably up to 24/192, multichannel LPCM up to 7.1 and for passthrough Dolby AC3 and DTS bitstream. I think this is sort of whats expected from modern HDMI audio.

That would be very good.

Using the command you mentioned, I see that the HDMI currently only supports 16 bits:


Code:
*** Scanning for playback devices ***
Card 0, ID `b1', name `bcm2835 HDMI 1'
  Device 0, ID `bcm2835 HDMI 1', name `bcm2835 HDMI 1', 4 subdevices (4 available)
    1..8 channels, sampling rate 8000..192000 Hz
    Sample formats: U8, S16_LE
    Buffer size range from 80 to 131072
    Period size range from 80 to 131072

      Subdevice 0, name `subdevice #0'
      Subdevice 1, name `subdevice #1'
      Subdevice 2, name `subdevice #2'
      Subdevice 3, name `subdevice #3'
  Device 1, ID `bcm2835 HDMI 1', name `bcm2835 HDMI 1', 1 subdevices (1 available)
    2 channels, sampling rate 44100..48000 Hz
    Sample formats: S16_LE
    Buffer size range from 444 to 32768
    Period size range from 444 to 32768

      Subdevice 0, name `subdevice #0'


Best,
Jordi
Reply


Forum Jump: