From 0baacfff3040630dbea3689fffdfced07a0bc64a Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 10 May 2022 17:11:41 +0200 Subject: [PATCH] HDA-DualCodecs: Fix wrong jack control on Lenovo P520 Lenovo P520 uses the same line out switch like other dual codecs systems, however it uses another jack control. So consolidate the switch and separate the jacks to make its jack control work again. Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/149 From: Kai-Heng Feng Fixes: 7dda1e2 ("HDA: improve support for HDAudio-Gigabyte-ALC1220DualCodecs") Signed-off-by: Jaroslav Kysela --- ucm2/HDA/DualCodecs/HiFi.conf | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/ucm2/HDA/DualCodecs/HiFi.conf b/ucm2/HDA/DualCodecs/HiFi.conf index 1f7e58d..10c9162 100644 --- a/ucm2/HDA/DualCodecs/HiFi.conf +++ b/ucm2/HDA/DualCodecs/HiFi.conf @@ -64,18 +64,15 @@ SectionDevice."Line1" { Type ControlExists Control "name='Front Playback Switch'" } - True { - Value { - PlaybackMixerElem "Front" - JackControl "Line Out Front Jack" - } - } - False { - Value { - JackControl "Line Out Jack" - JackHWMute "Speaker" - } + True.Value.PlaybackMixerElem "Front" + } + 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" } } @@ -104,7 +101,6 @@ SectionDevice."Headphones" { } True.Value.JackHWMute "Speaker" } - } SectionDevice."Line2" { -- 2.47.1