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.