HDMI and Headphones sound output [ Rock Pi X ]

Troubleshooting HDMI sound output and Jack sound output, HW v1.4, Ubuntu 20.04

1 - Check if codecs are installed correctly

ubuntu@rockpix:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Audio [Intel HDMI/DP LPE Audio], device 0: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audio [Intel HDMI/DP LPE Audio], device 1: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Audio [Intel HDMI/DP LPE Audio], device 2: HdmiLpeAudio [Intel HDMI/DP LPE Audi]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: chtnau8824 [chtnau8824], device 0: 1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: chtnau8824 [chtnau8824], device 1: Deep-Buffer Audio (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

2 - Redirecting output to the correct device

From the output above we can infer:

HDMI device is: card 0, device 2, in order to redirect output to HDMI digital sound and bypass any /etc/asound.conf you may have in the file:

aplay -D plughw:0,2 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

or

ubuntu@rockpix:~$ AUDIODEV=hw:0,2 play SoundHelix-Song-1.mp3
play WARN alsa: can't encode 0-bit Unknown or not applicable

SoundHelix-Song-1.mp3:

 File Size: 8.95M     Bit Rate: 192k
  Encoding: MPEG audio    Info: 2009
  Channels: 2 @ 16-bit   
Samplerate: 44100Hz      
Replaygain: off         Artist: SoundHelix
  Duration: 00:06:12.73  

In:0.87% 00:00:03.25 [00:06:09.48] Out:143k  [ -====|=-    ]        Clip:0    
Aborted.

Output sound to the Headphones:

ubuntu@rockpix:~$ AUDIODEV=hw:1,0 play SoundHelix-Song-1.mp3
play WARN alsa: can't encode 0-bit Unknown or not applicable

SoundHelix-Song-1.mp3:

 File Size: 8.95M     Bit Rate: 192k
  Encoding: MPEG audio    Info: 2009
  Channels: 2 @ 16-bit   
Samplerate: 44100Hz      
Replaygain: off         Artist: SoundHelix
  Duration: 00:06:12.73  

In:0.60% 00:00:02.23 [00:06:10.50] Out:102k  [  ====|===   ]        Clip:0    
Aborted.

or

ubuntu@rockpix:~$ aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

Jack connector

I am sure I had the analog sound output to Headphones working a while ago, while revisiting the sound today i found out my Headphones had no sound. So, something changed, reading the forum, someone disclosed he had a hard time with the type of connector used.

See here: Audio jack and Nuvoton not working

But my connector is the 3-zone connector that works, or rather, it used to work before, but now I have to insert just one part and gently push the connector to the HDMI side.

The connector:

Don’t insert to the end

How it is working now:

I guess while inserting and removing the connector many times, something happened.
If you play a sound and insert it slowly you will find the correct position when you hear the sound.

1 Like

Is the same Jack connector works with ROCK Pi 4, I mean with the same depth plug? The Audio Jack connector on ROCK Pi 4 and X are the same and the pinout is the same.

Hi jack,

I don’t have RockPi 4 to compare the results, but i have RockPi E (dev) which seems to have a similar jack-out connector (I guess the same maker but mechanically differs as I will show below) and this connector works as it should.

I also got another jack in connector to test, here are both:

I tried to summarize my findings:

  • Both jack in connectors works with RockPi E

  • Black jack in connector works only if gently pushed aside and not completely inserted, I guess when pushed aside makes good contact to the female out jack ( ~4.mm ), the gray one works without inserting the connector to the end, no need to “push aside”, the outer diameters seem to be > 3.5 mm or it is slightest longer or the female out is a bit shorter.

This looks to be a problem with tolerances here.

To add to the confusion, I found another headset to test, and it works. Ahh … yes, they look dirty, they’ve been around for six years …

Now you can draw your conclusion.
PS. Both works on any PC.