From 01e37f4fb7aab57e3f0051d81f5f6e5b2f15c831 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 21 Nov 2022 10:16:57 +0100 Subject: [PATCH] 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 --- ucm2/HDA/DualCodecs/HiFi.conf | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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" } } -- 2.47.1