@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