]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
HDA-analog: Fix the phantom jack detection if block
authorJaroslav Kysela <perex@perex.cz>
Mon, 12 Jan 2026 15:26:08 +0000 (16:26 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 12 Jan 2026 15:27:56 +0000 (16:27 +0100)
The hpvol assignment should depend on speaker/line out detection.

Link: https://github.com/alsa-project/alsa-ucm-conf/issues/685
Fixes: 4ead6a9 ("HDA-analog: Use phantom jacks to determine the device for single output")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA/HiFi-analog.conf

index 894d026e34acc57024e56112eebf55d88c5f6017..06db24e41fcc0aab6eeeef393c7f48ee6df31030 100644 (file)
@@ -108,12 +108,18 @@ If.outnone {
                        }
                        True.Define.lovol "Master"
                }
-               If.last {
+               If.none {
                        Condition {
-                               Type ControlExists
-                               Control "name='Master Playback Switch'"
+                               Type String
+                               Empty "${var:spkvol}${var:lovol}"
+                       }
+                       True.If.default {
+                               Condition {
+                                       Type ControlExists
+                                       Control "name='Master Playback Switch'"
+                               }
+                               True.Define.hpvol "Master"
                        }
-                       True.Define.hpvol "Master"
                }
        }
 }