HDMI digital stereo?

I have gotten Analog Mono sound working thanks to help from other folks on another topic. Has anyone gotten digital stereo working? If so, how?

Frank

So, it appears from my reading about HDMI is that the audio signal is analog and would require a converter or to just add a USB soundcard dongle. All of my questions in this area are in regards to looking at the Radxa Zero as a less expensive alternative to using a Raspberry Pi 3B+ or 4B replacement. In my particular use - I need that audio out capability of the RPis and the 4 USB ports is also important. I love the little Radxa Zero board. I just think for my particular use case the RPi will be a better fit.

To be clear - the HDMI does work with my TV and TV’s audio (which uses 2 RCA audio out). So, the Radxa Zero would certainly be very useful in many applications. It just doesn’t work with my particular 5" screen which has a 3.5" audio out. The 5" inch screen’s audio out works fine with the RPi3B+ and the Rpi4B.

Yeah I am as confused as HDMI doesn’t carry analogue audio its just digital as far as I know.
You can by audio extractors and why they exist as they convert digital to analogue so sort of confused.
I haven’t a clue what your 5" screen is (model) or what the problem is but I don’t think its your hdmi sending out analogue audio.

At a guess the output is HDMI 2.1 whilst a Pi is HDMI version 1.3a maybe… ? But to be honest thought it was all backward compatible.
Have you tried something else than a Pi with that screen even a DVD say just to see if you have audio?

I thought the HDMI was digital, but why does the pavucontrol show the audio as Analog Mono. I followed the suggestion in the Debian HDMI sound thread using the following script:

sleep 15s
amixer sset ‘FRDDR_A SINK 1 SEL’ ‘OUT 1’
amixer sset ‘FRDDR_A SRC 1 EN’ ‘on’
amixer sset ‘TDMOUT_B SRC SEL’ ‘IN 0’
amixer sset ‘TOHDMITX I2S SRC’ ‘I2S B’
amixer sset ‘TOHDMITX’ ‘on’
amixer sset ‘FRDDR_B SINK 1 SEL’ ‘OUT 2’
amixer sset ‘FRDDR_B SRC 1 EN’ ‘on’
amixer sset ‘FRDDR_C SINK 1 SEL’ ‘OUT 3’
amixer sset ‘FRDDR_C SRC 1 EN’ ‘on’

This gives me the Analog Mono. The 5" screen I use is:

JniTyOpt 5 Inch Display Capacitive Touchscreen HDMI LCD 800x 480 High Resolution

I will try something other than the Pi and see if I get audio. Thanks for the help. I really like the Radxa zero so far.

Ok. Plugged my Udoo X86 via HDMI cable to my 5" screen and played PlutoTV via Firefox browser. I had the audio from the 5" screen go to my sound bar via 3.5" plug. It played audio just fine. So, it seems to be the Radxa Zero running Debian.

I presume the decoder on the 5" is analogue mono I guess as presume that changes when you plug it in a TV, or does it always say analogue mono?

I am sort of blind as not sure where the Rzero is and my monitors are old with DVI HDMI adapters but your HDMI audio is the end device you plug into and on the PC I use there is no hdmi audio as the end device doesn’t have it.

I haven’t a clue what the amixer settings do as they are not very imaginatively named and the DTS doesn’t really enlighten.

	sound {
		compatible = "amlogic,axg-sound-card";
		model = "RADXA-ZERO";
		audio-aux-devs = <&tdmout_b>;
		audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
				"TDMOUT_B IN 1", "FRDDR_B OUT 1",
				"TDMOUT_B IN 2", "FRDDR_C OUT 1",
				"TDM_B Playback", "TDMOUT_B OUT";

		assigned-clocks = <&clkc CLKID_MPLL2>,
				  <&clkc CLKID_MPLL0>,
				  <&clkc CLKID_MPLL1>;
		assigned-clock-parents = <0>, <0>, <0>;
		assigned-clock-rates = <294912000>,
				       <270950400>,
				       <393216000>;
		status = "okay";

		dai-link-0 {
			sound-dai = <&frddr_a>;
		};

		dai-link-1 {
			sound-dai = <&frddr_b>;
		};

		dai-link-2 {
			sound-dai = <&frddr_c>;
		};

		/* 8ch hdmi interface */
		dai-link-3 {
			sound-dai = <&tdmif_b>;
			dai-format = "i2s";
			dai-tdm-slot-tx-mask-0 = <1 1>;
			dai-tdm-slot-tx-mask-1 = <1 1>;
			dai-tdm-slot-tx-mask-2 = <1 1>;
			dai-tdm-slot-tx-mask-3 = <1 1>;
			mclk-fs = <256>;

			codec {
				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
			};
		};

		dai-link-4 {
			sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;

			codec {
				sound-dai = <&hdmi_tx>;
			};
		};
	};

The bit of the script you need as we don’t need to test if the case is an amlogic is

  TDMOUT=$(awk '/TDMOUT/ && $2=="OUT" {print substr($1,length($1),1)}' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)
  if [ "${TDMOUT}" = "A" ]; then
    mixer "$card" 'FRDDR_A SINK 1 SEL' 'OUT 0'
    mixer "$card" 'FRDDR_A SRC 1 EN' on
    mixer "$card" 'TDMOUT_A SRC SEL' 'IN 0'
    mixer "$card" 'TOHDMITX' on
    mixer "$card" 'TOHDMITX I2S SRC' 'I2S A'
  elif [ "${TDMOUT}" = "B" ]; then
    mixer "$card" 'FRDDR_A SINK 1 SEL' 'OUT 1'
    mixer "$card" 'FRDDR_A SRC 1 EN' on
    mixer "$card" 'TDMOUT_B SRC SEL' 'IN 0'
    mixer "$card" 'TOHDMITX' on
    mixer "$card" 'TOHDMITX I2S SRC' 'I2S B'
  fi

So with a tad of mangling to amixer and not needed the card name as the if elif is one or the other and you seem have bits of it all.

Manjaro it is then :slight_smile:

That’s funny because I use Manjaro on my home computer, my laptop, and my Udoo x86 (which I use attached to our TV as a computer/media center/retro game system). I use Raspbian on my Pis because it just so damn easy to work with (and I like the raspi-config tool and being able to change the config.txt).

Thanks for your help. These other board makers should really take the approach of the Raspberry Pi organization.

Frank

Raspberry have a revenue of ÂŁ71m but made just ÂŁ11m profit but sell for about 100% profit.
Opensource hardware providers sell at just over BoM and likely wish they had that revenue as they likely would.

PS try manjaro think its needs Android in emmc to boot from SD but dunno if you missed what I said about the script as its one or the other as guess on other hardware its implemented differently.

Depending on TDMOUT=$(awk ‘/TDMOUT/ && $2==“OUT” {print substr($1,length($1),1)}’ /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)

You can just have a look at /sys/firmware/devicetree/base/sound/audio-routing
Its either for A
mixer “$card” ‘FRDDR_A SINK 1 SEL’ ‘OUT 0’
mixer “$card” ‘FRDDR_A SRC 1 EN’ on
mixer “$card” ‘TDMOUT_A SRC SEL’ ‘IN 0’
mixer “$card” ‘TOHDMITX’ on
mixer “$card” ‘TOHDMITX I2S SRC’ ‘I2S A’
or B
mixer “$card” ‘FRDDR_A SINK 1 SEL’ ‘OUT 1’
mixer “$card” ‘FRDDR_A SRC 1 EN’ on
mixer “$card” ‘TDMOUT_B SRC SEL’ ‘IN 0’
mixer “$card” ‘TOHDMITX’ on
mixer “$card” ‘TOHDMITX I2S SRC’ ‘I2S B’
but before you seemed to have a bit of both, but /sys/firmware/devicetree/base/sound/audio-routing will have an entry showing if A or B and then its just 5 lines from the above.

I think the Debian image for the Zero went a bit pear shaped so prob better off anyways.

Manjaro sound works great, but no wifi! I get wifi on debian, but no sound through my 5" screen. I get sound on manjaro (with 5" screen), but no wifi. Very frustrating.

1 Like

Might be linux-firmware but have you tried a sudo pacman -Syu?

Not without attaching an ethernet card and cable.

So, luckily, I had a usb ethernet adapter. I tried to do the upgrade but it kept ending because of basically 2 errors: operations too slow (I’m on fiber optic) and keyring errors. So, no luck upgrading.

I don’t know about that image as @spikerguy was making changes but was waiting for radxa about uboot.

The downloads are from the manjaro site https://manjaro.org/downloads/arm/radxa-zero/arm8-radxa-zero-kde-plasma/ which I quite like as a desktop

But if you go to https://manjaro.org/download/ and click editions the versions are avail there and then join the manjaro forum.

I don’t intend to search out my RZeroes as the PiZ2 took some off the shine for them and looking forward to the new Zero2 from radxa.
I think you will find Manjaro a good bet as they have been working on it and think prerelease of the RZ2.