No sound via HDMI

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

No sound via HDMI

Postby surdo » Thu Mar 18, 2021 4:34 pm

Hi, I'm unable to get sound to work on a Raspberry Pi 4.

"aplay -l" lists the devices correctly:

$this->bbcode_second_pass_code('', '
[alarm@archlinux ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
')

However if I attempt to play a wav file by specifying the card and device I get errors:

$this->bbcode_second_pass_code('', '
[alarm@archlinux audio]$ aplay -D plughw:0,0 wav.wav
Playing WAVE 'wav.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
aplay: set_params:1343: Sample format non available
Available formats:
- IEC958_SUBFRAME_LE
[alarm@archlinux audio]$
')

If I attempt to run jackd with: /usr/bin/jackd -R -dalsa -dhw:0 -r48000 -p512 -n3
it complains: "Sorry. The audio interface "hw:0" doesn't support any of the hardware sample formats that JACK's alsa-driver can use."

Something must be missing in my installation, can anyone please suggest what it might be?

Thanks

EDIT - My /boot/config.txt contains the following:

$this->bbcode_second_pass_code('', 'dtoverlay=vc4-kms-v3d
initramfs initramfs-linux.img followkernel
dtparam=audio=on
hdmi_drive=2
')

And I am not using pulseaudio.
surdo
 
Posts: 6
Joined: Thu Mar 18, 2021 4:20 pm


Re: No sound via HDMI

Postby surdo » Fri Mar 19, 2021 11:55 am

I found this discussion: viewtopic.php?f=65&t=15070
where it's mentioned that "output via the vc4hdmi driver is supported by pulseaudio".

Is it the case that I need to install pulse to use HDMI audio?

This I've tried but didn't fix the fundamental problem. Have removed pulseaudio and pulseaudi-alsa since.

Edit - sound is working on the headphones

$this->bbcode_second_pass_code('', '
[alarm@archlinux ~]$ sudo pacman -Ss alsa | grep installed
extra/alsa-lib 1.2.4-3 [installed]
extra/alsa-plugins 1:1.2.2-2 [installed]
extra/alsa-topology-conf 1.2.4-2 [installed]
extra/alsa-ucm-conf 1.2.4-2 [installed]
extra/alsa-utils 1.2.4-2 [installed]
extra/zita-alsa-pcmi 0.3.2-3 [installed]
community/alsa-tools 1.2.2-1 [installed]
')
surdo
 
Posts: 6
Joined: Thu Mar 18, 2021 4:20 pm

Re: No sound via HDMI

Postby surdo » Fri Mar 19, 2021 4:37 pm

Some progress. The vc4hdmi driver requires the IEC958 sample format. I can get sound out of HDMI with the following:

aplay -D iec958 audio.wav

see:

https://github.com/raspberrypi/linux/is ... -497348161
https://github.com/raspberrypi/linux/is ... -497677954

I've not succeeded however configuring ALSA with this transformation. Among other things, I've tried the following in my ~/.asoundrc

$this->bbcode_second_pass_code('', 'pcm.!default {
type plug
slave {
pcm "hw:0,0"
format IEC958_SUBFRAME_LE
}
}
')

While this produces no Alsa syntax errors when I use aplay, it still won't play the audio and prints:

$this->bbcode_second_pass_code('', 'Playing WAVE 'wav48k.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1343: Sample format non available
Available formats:
- IEC958_SUBFRAME_LE
[alarm@archlinux ~]$')

Ultimately, I need to get Jack running.

Can anyone please help?
surdo
 
Posts: 6
Joined: Thu Mar 18, 2021 4:20 pm

Re: No sound via HDMI

Postby solskogen » Fri Mar 19, 2021 5:56 pm

$this->bbcode_second_pass_code('', '
dtparam=audio=on
dtoverlay=vc4-kms-v3d,noaudio
')

This should work (no need to changing alsa configuration)
solskogen
 
Posts: 161
Joined: Mon Nov 18, 2013 10:41 am

Re: No sound via HDMI

Postby surdo » Fri Mar 19, 2021 7:19 pm

$this->bbcode_second_pass_quote('', 'T')his should work (no need to changing alsa configuration)


Thank you very much, it works!
surdo
 
Posts: 6
Joined: Thu Mar 18, 2021 4:20 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 8 guests