alsa-project / alsa-ucm-conf

ALSA Use Case Manager configuration
BSD 3-Clause "New" or "Revised" License
69 stars 208 forks source link

TOSLINK output on Asus Strix B650E-I GAMING WIFI #342

Closed nakedape69 closed 6 months ago

nakedape69 commented 11 months ago

UCM seems to set the wrong device for digital output to TOSLINK (optical S/PDIF) on this card. It sets SpdifPCM "hw:${CardId},3" which renders no sound at all. Changing it to SpdifPCM "hw:${CardId},2" makes it work.

alsa-info output attached:

alsa-info.txt

TuXFrk commented 8 months ago

I sent a message about a similar issue to alsa-devel@alsa-project.org on oktober 10 2023, but I'm not sure whether the mail arrived. Therefor I'll post my "work" here as well. I think I worked around the same problem in a slightly different (and dirty!) way. I'm not able to test if the above remark helps me to resolve the problem in a proper way. @nakedape69: Perhaps you could clarify where you make the modification?

I worked around the problem with the support of the TOSLINK output of my ROG STRIX B650E-I GAMING WIFI motherboard by modifying "/usr/share/alsa/cards/USB-Audio.conf". I made some very crude modifications, just to get it to work.

I've attached a zip file with the files I modified for the solution and alsa-info.sh output. (As you'll notice in the .asoundrc in attached alsa-info file, it took me some attempts to solve the issue :-) ).

My goal was to have full alsa support, so I could enable a52 encoding through pulseaudio.

Some background: Initially this command would work:

This was caused by only these devices reported by "aplay -L" iec958:CARD=Audio,DEV=0 USB Audio, USB Audio IEC958 (S/PDIF) Digital Audio Output iec958:CARD=Audio,DEV=1 USB Audio, USB Audio #1 IEC958 (S/PDIF) Digital Audio Output After the changes in USB-Audio.conf, all 4 devices on my motherboard card are listed: iec958:CARD=Audio,DEV=0 USB Audio, USB Audio IEC958 (S/PDIF) Digital Audio Output iec958:CARD=Audio,DEV=1 USB Audio, USB Audio #1 IEC958 (S/PDIF) Digital Audio Output iec958:CARD=Audio,DEV=2 USB Audio, USB Audio #2 IEC958 (S/PDIF) Digital Audio Output iec958:CARD=Audio,DEV=3 USB Audio, USB Audio #3 IEC958 (S/PDIF) Digital Audio Output Now pulseaudio can support a52 encoding of the 5.1 audiostream to my amplifier (through TOSLINK).

Data2Alsa-dev.zip

TuXFrk commented 3 months ago

In order to get SPDIF audio working on my system after the update, I still have to modify the USB-Audio.conf file. I've narrowed it down to a minimal required change: I comment out the "default 0" line and replace it (=add) a "default 2" line (see patch text below). Somehow the change "perexg" made to the "/usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf" file does not seem to do the trick on my machine. If there is something I can to to test or debug, I'd gladly do it. Attached you'll find the output from "also-info.sh". alsa-info.zip

TuXFrk commented 3 months ago

Here's the change that makes my SPDIF ouput work: my_USB-audio.workaround.patch.txt