Front Audio (Headphone) and Optical Not Working in Rocky Linux 9
With Rocky Linux 9 (clone of RHEL 9), I do not get audio of the front headphone jack or the optical output on the back. I do get audio out of the line out on the back. The front port does not work with Rocky Linux 8, Ubuntu and Fedora, and I did not test the optical. With Windows, the front jack works as expected with the realtek driver installed, and I did not test the optical on Windows.
The output of /usr/sbin/alsa-info.sh is here: http://alsa-project.org/db/?f=0d71a1351cd49f220c36fe69cc9af93f1d71ee3c
I built the computer with a Gigabyte Z690 AERO G motherboard that has a realtek alc4080 codec and Intel Z690 chipset.
With Rocky Linux 9, without the headphones plugged in the sounds settings show: digital output (s/sdif) - usb hdmi/displayport-built-in audio
when plug in headphones in the front jack “headphones - usb audio” appears and disappears when I unplug the headphones.
If I use the following command, I can hear the audio clip through the headphones: aplay -D plughw:Audio,1 /usr/share/sounds/alsa/Front_Left.wav
If I use the following command, I can hear the audio clip through the optical: aplay -D plughw:Audio,2 /usr/share/sounds/alsa/Front_Left.wav
I’m using alsa-lib 1.2.7 from the Rocky Linux repo. I tried to compile 1.2.8 from source but when I run “./configure” I got the error: ./configure: line 2998: syntax error near unexpected token `external' ./configure: line 2998: `AM_GNU_GETTEXT(external)'
I noticed https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/USB-Audio/USB... has more If.realtek-alc4080 entries. When I copied the If.realtek-alc4080 section into /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf and /usr/share/alsa/ucm2/conf.d/USB-Audio/USB-Audio.conf, and after I rebooted, I get the same performance.
One thing I noticed in https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/USB-Audio/USB... is the only Gigabyte entry under If.realtek-alc4080 is “Gigabyte Z590 Aorus Pro AX”. I see other manufactures have Intel Z690 chipset support but not Gigabyte.
I’m not sure if I’m hitting a bug or if my motherboard is not supported. Please point me in the correct direction if this isn’t an AlSA issue. I posted the Rocky Linux forum but was not able to resolve the issue.
Brian
On 31. 12. 22 20:16, yakajirri - a001 wrote:
With Rocky Linux 9 (clone of RHEL 9), I do not get audio of the front headphone jack or the optical output on the back. I do get audio out of the line out on the back. The front port does not work with Rocky Linux 8, Ubuntu and Fedora, and I did not test the optical. With Windows, the front jack works as expected with the realtek driver installed, and I did not test the optical on Windows.
The output of /usr/sbin/alsa-info.sh is here: http://alsa-project.org/db/?f=0d71a1351cd49f220c36fe69cc9af93f1d71ee3c
Card sysdefault:0 'Audio'/'Generic USB Audio at usb-0000:00:14.0-11, high speed' Mixer name : 'USB Mixer' Components : 'USB0414:a012'
...
https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/USB-Audio/USB... has more If.realtek-alc4080 entries. When I copied the If.realtek-alc4080 section into /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf and /usr/share/alsa/ucm2/conf.d/USB-Audio/USB-Audio.conf, and after I rebooted, I get the same performance.
The configuration for your hardware version is missing in UCM.
Change 0414:a00e string in Regex (If.realtek-alc4080) to 0414:a012 for a quick test in USB-Audio.conf. And yes, use the latest USB-Audio.conf, Realtek/ALC4080.conf and Realtek/ALC4080-HiFi.conf files from github.
Jaroslav
@Jaroslav
If I do the following, I can get the audio on the optical and headphones:
------------------------------------------
mkdir /usr/src/alsa-ucm-conf mkdir /usr/src/alsa-ucm-conf/current cd /usr/src/alsa-ucm-conf/current git clone https://github.com/alsa-project/alsa-ucm-conf cd alsa-ucm-conf/
mv /usr/share/alsa/ucm /usr/share/alsa/ucm_bk_01 mv /usr/share/alsa/ucm2 /usr/share/alsa/ucm2_bk_01 # -P keeps symobic links; R copies dir cp -PR /usr/src/alsa-ucm-conf/current/alsa-ucm-conf/ucm /usr/share/alsa cp -PR /usr/src/alsa-ucm-conf/current/alsa-ucm-conf/ucm2 /usr/share/alsa
cp /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf.bk01 gedit /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf & #in realtek-alc4080 # in Regex, replace 0414:a00e with 0414:a012
------------------------------------------
The optical and headphones work except I have three issues:
1. When I reboot, in the Rocky sound settings, the computer defaults to "hdmi/displayport-built-in audio". To get the optical port, I have to select "digital output (s/sdif) - usb" in the settings.
2. When I plug in headphones for the first time, to get the audio to switch to the headphone jack, I have to select “headphones - usb audio” in the settings. If I unplug the headphones, the settings switch back to hdmi. Then if I plug the headphones back in the headphone works.
3. I have kvm switch that switches usb mouse, usb keyboard, usb printer, and hdmi between this linux box and a windows laptop. When I switch from linux to windows, I get a pop on my speakers. This is weird since the optical port is built into the motherboard and the optical port only goes between the linux box and speakers.
Do you know if any of these issues are easy to fix? If not, I can live with the issues.
Also, should I submit the USB-Audio.conf change as a feature request( except adding 0414:a012 instead of wiping out the other motherboard)?
Thank you for your help. I've been fighting with these issues for a long time.
Brian
On 12/31/2022 2:35 PM, Jaroslav Kysela wrote:
On 31. 12. 22 20:16, yakajirri - a001 wrote:
With Rocky Linux 9 (clone of RHEL 9), I do not get audio of the front headphone jack or the optical output on the back. I do get audio out of the line out on the back. The front port does not work with Rocky Linux 8, Ubuntu and Fedora, and I did not test the optical. With Windows, the front jack works as expected with the realtek driver installed, and I did not test the optical on Windows.
The output of /usr/sbin/alsa-info.sh is here: http://alsa-project.org/db/?f=0d71a1351cd49f220c36fe69cc9af93f1d71ee3c
Card sysdefault:0 'Audio'/'Generic USB Audio at usb-0000:00:14.0-11, high speed' Mixer name : 'USB Mixer' Components : 'USB0414:a012'
...
https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/USB-Audio/USB...
has more If.realtek-alc4080 entries. When I copied the If.realtek-alc4080 section into /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf and /usr/share/alsa/ucm2/conf.d/USB-Audio/USB-Audio.conf, and after I rebooted, I get the same performance.
The configuration for your hardware version is missing in UCM.
Change 0414:a00e string in Regex (If.realtek-alc4080) to 0414:a012 for a quick test in USB-Audio.conf. And yes, use the latest USB-Audio.conf, Realtek/ALC4080.conf and Realtek/ALC4080-HiFi.conf files from github.
Jaroslav
participants (2)
-
Jaroslav Kysela
-
yakajirri - a001