]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
HDA: DualCodecs - handle S/PDIF without analog connections
authorJaroslav Kysela <perex@perex.cz>
Mon, 21 Nov 2022 09:16:57 +0000 (10:16 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 3 Dec 2022 18:59:03 +0000 (19:59 +0100)
When no analog wires are connected, the S/PDIF output cannot be
selected in pipewire. Handle this for motherboards without Speaker
UCM device.

Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/239
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA/DualCodecs/HiFi.conf

index 10c91626f7d11d63089f9652154250c6a54da692..8c0f403bbed66537ffdfd37b011bf7636f83a152 100644 (file)
@@ -66,13 +66,20 @@ SectionDevice."Line1" {
                }
                True.Value.PlaybackMixerElem "Front"
        }
-       If.1 {
+       # make S/PDIF output working when no analog jacks are connected
+       If.speaker {
                Condition {
                        Type ControlExists
-                       Control "iface=CARD,name='Line Out Front Jack'"
+                       Control "name='Speaker Playback Switch'"
+               }
+               True.If.1 {
+                       Condition {
+                               Type ControlExists
+                               Control "iface=CARD,name='Line Out Front Jack'"
+                       }
+                       True.Value.JackControl "Line Out Front Jack"
+                       False.Value.JackControl "Line Out Jack"
                }
-               True.Value.JackControl "Line Out Front Jack"
-               False.Value.JackControl "Line Out Jack"
        }
 }