Debian HDMI sound

OK. This is what is showing up in pavucontrol after running the script with amixer commands from above post.

So, now, it is at least showing an audio device, which it wasn’t before. But, when I run the speaker-test - I see that the sound is showing in the pavucontrol, but I still don’t hear anything.

Dunno start with alsa as pulseaudio sits ontop.

See if you can get a cmdline aplay to work before you get to pulseaudio and desktops

OK. It’s something to do with my 5" screen. Sound works just fine when I attach it to my HDMI on the TV. Thanks. Now, it looks like my problem.

1 Like

Here’s the weird thing. I plug in my RPi4B, which is running Rasbian (derivative of debian). The HDMI audio output works just fine with the 5" inch display.

So, a difference I see is the RPi4B is using Audio Digital and not Audio Analog as my pictures above show on the Radxa Zero.

OK. I did another test with my HDMI TV. It has 2 RCA jacks to a 4-pole stereo audio plug, which I plug in to our soundbar. Disconnect 1 RCA jack and no sound. So, these settings described above (which work) only do mono sound. How do we do stereo sound? Maybe, that’s why it’s not working with the 5" inch HDMI display. I have a stereo jack plugged in. I’m pulling at straws here. Any suggestions?

This cockamamie setup works. Why did I have to connect a stereo plug that goes to 2 RCA plugs to Behringer U-Control UCA202 and then plug that via the UCA202 headphone jack to my soundbar and it works?

“The UCA202 provides 2 analog inputs and outputs, as well as an additional S/PDIF optical output for direct digital conversion. The stereo headphone output with dedicated level control lets you monitor both input and output.”

This is frustrating!

OK. I booted up Mangaro xfce and the sound works (but no wifi). So, I copied down all of the alsamixer configurations for radxa-zero. I booted up debian, again, and applied all of the settings from manjaro to debian through alsamixer.

I did: pulseaudio -k and then pulseaudio --start and all of a sudden the speaker-test started to play via my 5" screen.

BUT, when I bring up the pavucontrol screen it is stuck in "Establishing connection to PulseAudio. Please wait…

So, slow progress.

1 Like

Dunno I should really search out my Zero’s but that would mean tidying the flat :slight_smile:

Slowly you are chipping away and often the answer is always in logs and a quick google.

@spikerguy and manjaro might be a better option

There is a sound service which is needed to make sound work, copying file will not work.

Also the sound service depends on what audio route is used in the device tree.
IDK why wifi didn’t work for you but if you try the latest image then wifi should work out of the box.

Point me to an image that you know wifi works and I’ll try it. I prefer xfce, but will try whatever you suggest.

Here - Dev 20220207
This image will not work with android in emmc. so erase emmc and test it on sd card and if it all works fine then flash it to emmc just like you flash on sd card.

Mne doesn’t have an emmc. So, I’ll try one of these images.

So, you say it all just works, but why doesn’t the wifi? There isn’t even a Network icon in the Settings Manager. If I use nmtui, and create a WIFI connection - it won’t let me connect to it. There is no wlan0 when I use ip address. Maybe, you connected yours to an ethernet adapter and did something first.

Did you try the latest image ?

OK. First, are talking manjaro or debian? This is a debian thread, but a lot of this has been manjaro. I just download the latest manjaro xfce:

Manjaro-ARM-xfce-radxa-zero-20220207.img

That is what I am trying now.

1 Like

did you try this and it really works?

Yeah, you giving more ideas its really working.

An update on this thread. I have produced a package to enable HDMI audio on our official image. This will be included in our official image in a later time.

1 Like

Hi @RadxaYuntian, as I was testing some other things on the Zero, I tried your package and can confirm it works. Before installing, pavucontrol has no sound output option. Afterwards with a restart of pulseaudio it has this:
HDMI-audio_2022-03-10

Sound output was then as expected. I encourage adding this package to the radxa stable source!

I also tested with an usb DAC, which when plugged in provides full audio output once selected in pavucontrol like so:
USB-audio_2022-03-10

My desktop setup is an Aiyima A07 with stereo bookshelf speakers. A compact hifi setup would be to add something like this USB DAC which could then also be used on the go :wink:

Note: I have no affiliation with either of these companies or products.

1 Like

I’m having trouble getting HDMI audio to work. I’ve followed the steps above, including installing the package linked by @RadxaYuntian. I see the “Analog Mono Output” under pavucontrol “Output Devices”, and when I try a test like “aplay test.wav”, I see an active sound bar in the window.

dmesg shows the following errors, however, and I don’t hear any sound:

Playing WAVE ‘audiocheck.net_whitenoisegaussian.wav’ : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
[ 1686.032097] hdmi-audio-codec hdmi-audio-codec.4.auto: Not able to map channels to speakers (-22)
[ 1686.035232] hdmi-audio-codec hdmi-audio-codec.4.auto: ASoC: error at snd_soc_dai_hw_params on i2s-hifi: -22
[ 1686.044946] axg-sound-card sound: ASoC: PRE_PMU: be.dai-link-4-playback event failed: -22

I’m using this display with built-in speaker, and have tested that the speaker works when HDMI is plugged into my laptop.

aplay devices show the following:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: RADXAZERO [RADXA-ZERO], device 0: fe.dai-link-0 () []
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: RADXAZERO [RADXA-ZERO], device 1: fe.dai-link-1 (
) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: RADXAZERO [RADXA-ZERO], device 2: fe.dai-link-2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0

And I am running this release:

$ uname -r
5.10.69-12-amlogic-g98700611d064

Any suggestions?