From: Jaroslav Kysela Date: Tue, 10 May 2022 15:11:41 +0000 (+0200) Subject: HDA-DualCodecs: Fix wrong jack control on Lenovo P520 X-Git-Tag: v1.2.7~30 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=0baacfff3040630dbea3689fffdfced07a0bc64a;p=alsa-ucm-conf.git 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 --- 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" {