Thank you for your donation!


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


Solved: HDMI no sound Onkyo tx-nr474
#11
(03-08-2021, 11:21 PM)popej Wrote: Hi!

You have to disable screen blanking to have audio on HDMI. Or you can set option in config.txt:

hdmi_blanking=0


Option "wake display on play" didn't work for me.

Hardware volume on HDMI is initially at 0, which can be a reason for no audio. Hardware volume doesn't use CEC commands, so it is probably no different than software volume. I set it to none.

Default HDMI audio is 16-bit. You can switch to vc4-kms-3d driver, but I haven't been able to configure it correctly. Maybe there is a guide for it?  Likely will start a new thread for 

Regarding your comment on vc4-kms-3d driver and default HDMI audio being 16-bit, you are correct that my 24 bit music is playing at an output rate of 16 bits, so I will dig into that next, likely in a new vc4-kms-3d post.
Reply
#12
(03-10-2021, 09:41 AM)CoppolaVH Wrote:
(03-08-2021, 11:21 PM)popej Wrote: Hi!

You have to disable screen blanking to have audio on HDMI. Or you can set option in config.txt:

hdmi_blanking=0


Option "wake display on play" didn't work for me.

Hardware volume on HDMI is initially at 0, which can be a reason for no audio. Hardware volume doesn't use CEC commands, so it is probably no different than software volume. I set it to none.

Default HDMI audio is 16-bit. You can switch to vc4-kms-3d driver, but I haven't been able to configure it correctly. Maybe there is a guide for it?

Regarding your comment on vc4-kms-3d driver and default HDMI audio being 16-bit, you are correct that my 24 bit music is playing at an output rate of 16 bits, so I will dig into that next.
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 too have 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]
Reply
#13
I don't think vc4-fkms-v3d supports audio. You still have the same drivers for HDMI, which are activated by option:
dtparam=audio=on

You should install dtoverlay=vc4-kms-v3d (or vc4-kms-v3d-pi4 in case of RPi4) and remove dtparam=audio=on. When you run alsacap or look at audio info in Moode, you should see, that HDMI audio is different.

After switching to vc4-kms-3d:

Code:
pi@moode:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
pi@moode:~ $ aplay -L
null
   Discard all samples (playback) or generate zero samples (capture)
btaplay_dmix
alsaequal
plug_alsaequal
btstream
camilladsp
crossfeed
plug_bs2b
eqfa12p
plug_eqfa12p
invpolarity
default:CARD=vc4hdmi
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Default Audio Device
sysdefault:CARD=vc4hdmi
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Default Audio Device
front:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Front speakers
iec958:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Direct sample mixing device
dsnoop:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Direct sample snooping device
hw:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Direct hardware device without any conversions
plughw:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Hardware device with all software conversions
pi@moode:~ $ alsacap
*** Scanning for playback devices ***
Card 0, ID `vc4hdmi', name `vc4-hdmi'
 Device 0, ID `MAI PCM vc4-hdmi-hifi-0', name `MAI PCM vc4-hdmi-hifi-0', 1 subdevices (1 available)
Error opening sound device for card 0, device 0: Hotplug device has been removed.  Skipping.


It looks a bit better if you upgrade system, at least alsacap shows devices, but mpd still can't open audio.
Reply
#14
Alsacap had problems to open device, because HDMI was not connected. With receiver on, results are following:
Code:
pi@moode:~ $ alsacap
*** Scanning for playback devices ***
Card 0, ID `vc4hdmi', name `vc4-hdmi'
 Device 0, ID `MAI PCM vc4-hdmi-hifi-0', name `MAI PCM vc4-hdmi-hifi-0', 1 subdevices (1 available)
   2..8 channels, sampling rate 32000..192000 Hz
   Sample formats: IEC958_SUBFRAME_LE
   Buffer size range from 16 to 65536
   Period size range from 8 to 32768

     Subdevice 0, name `subdevice #0'

There is alternative alsa config file vc4-hdmi.conf, but it doesn't help:
https://github.com/LibreELEC/LibreELEC.t...-hdmi.conf
Reply
#15
(03-12-2021, 01:10 PM)popej Wrote: I don't think vc4-fkms-v3d supports audio. You still have the same drivers for HDMI, which are activated by option:
dtparam=audio=on

You should install dtoverlay=vc4-kms-v3d (or vc4-kms-v3d-pi4 in case of RPi4) and remove dtparam=audio=on. When you run alsacap or look at audio info in Moode, you should see, that HDMI audio is different.

After switching to vc4-kms-3d:

Code:
pi@moode:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
pi@moode:~ $ aplay -L
null
   Discard all samples (playback) or generate zero samples (capture)
btaplay_dmix
alsaequal
plug_alsaequal
btstream
camilladsp
crossfeed
plug_bs2b
eqfa12p
plug_eqfa12p
invpolarity
default:CARD=vc4hdmi
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Default Audio Device
sysdefault:CARD=vc4hdmi
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Default Audio Device
front:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Front speakers
iec958:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Direct sample mixing device
dsnoop:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Direct sample snooping device
hw:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Direct hardware device without any conversions
plughw:CARD=vc4hdmi,DEV=0
   vc4-hdmi, MAI PCM vc4-hdmi-hifi-0
   Hardware device with all software conversions
pi@moode:~ $ alsacap
*** Scanning for playback devices ***
Card 0, ID `vc4hdmi', name `vc4-hdmi'
 Device 0, ID `MAI PCM vc4-hdmi-hifi-0', name `MAI PCM vc4-hdmi-hifi-0', 1 subdevices (1 available)
Error opening sound device for card 0, device 0: Hotplug device has been removed.  Skipping.

It looks a bit better if you upgrade system, at least alsacap shows devices, but mpd still can't open audio.

Yeah, I get the MPD failing to open ALSA default as well with the new treatment to config.txt:

So, I REM out those lines in config.txt and back to running same in 16 bit output.

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-kms-v3d                                                                                                                    
#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]

I am starting to consider a hardware solution that supports 24-196 multichannel.   JustBoom Digi HAT for the Raspberry Pi (https://shop.justboom.co/products/justboom-digi-hat) seems like a potential.
Reply
#16
HDMI is a good audio interface ready available on RPi. I'm surprised that it is so neglected. Actually 16 bit is good enough, but for me it's kind of disturbing, that hardware is not utilized fully.
Reply
#17
Not neglected at all just such more complex than it seems on the surface.

Follow the issue in the Raspberry Pi Linux Git posted by @CoppolaVH.
https://github.com/raspberrypi/linux/issues/4204
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#18
Yes, I have posted my questions at RPi git too. I wonder it it is really difficult to upgrade alsa in Raspios or Moode. LibreElec seems to use current version.
Reply
#19
You could try installing the .deb package from Bullseye but I'm not sure if thats all thats needed. Maybe also libasound2-data, etc. You will need to check the dependencies.
https://packages.debian.org/bullseye/libasound2-dev

You will need the "armhf" download.

Then

Code:
sudo dpkg -i libasound2-dev_1.2.4-1.1_armhf.deb

Something like that.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#20
I have compiled and installed alsa-lib and alsa-util 1.2.4 on current Raspios Buster and RPI4 (libasound2-dev was needed for alsa-utils). It doesn't help. Desktop shows interface as IEC958 stereo and 5.1, but no sound form Chrome or VLC. Maybe more configuration is needed. I have tried recommended vc4-hdmi.config from libreelec, but then even desktop doesn't find interface. Alsacap and aplay detect cards ok.

I will look at Bullseye, thanks.
Reply


Forum Jump: