From: Jaroslav Kysela Date: Mon, 21 Nov 2022 09:16:57 +0000 (+0100) Subject: HDA: DualCodecs - handle S/PDIF without analog connections X-Git-Tag: v1.2.9~50 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=01e37f4fb7aab57e3f0051d81f5f6e5b2f15c831;p=alsa-ucm-conf.git HDA: DualCodecs - handle S/PDIF without analog connections 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 --- diff --git a/ucm2/HDA/DualCodecs/HiFi.conf b/ucm2/HDA/DualCodecs/HiFi.conf index 10c9162..8c0f403 100644 --- a/ucm2/HDA/DualCodecs/HiFi.conf +++ b/ucm2/HDA/DualCodecs/HiFi.conf @@ -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" } }