TOSLINK output on Asus Strix B650E-I GAMING WIFI
nakedape69 opened this issue · 3 comments
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:
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:
- speaker-test -c2 -t wav -w /usr/share/sounds/alsa/Front_Center.wav -D hw:2,2
But this wouldn't: - speaker-test -c2 -t wav -w /usr/share/sounds/alsa/Front_Center.wav -D plughw:CARD=Audio,DEV=2
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).
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
Here's the change that makes my SPDIF ouput work:
my_USB-audio.workaround.patch.txt