]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
HDA-DualCodecs: Fix wrong jack control on Lenovo P520
authorJaroslav Kysela <perex@perex.cz>
Tue, 10 May 2022 15:11:41 +0000 (17:11 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 12 May 2022 09:54:30 +0000 (11:54 +0200)
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 <kai.heng.feng@canonical.com>
Fixes: 7dda1e2 ("HDA: improve support for HDAudio-Gigabyte-ALC1220DualCodecs")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA/DualCodecs/HiFi.conf

index 1f7e58d8e4a8992c8d7aa79b46ef2ed7d1502ed8..10c91626f7d11d63089f9652154250c6a54da692 100644 (file)
@@ -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" {