]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: rt712 - use 'Headphone Switch' only when available
authorJaroslav Kysela <perex@perex.cz>
Fri, 21 Aug 2026 08:02:44 +0000 (10:02 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 21 Aug 2026 08:03:27 +0000 (10:03 +0200)
Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/825
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/sof-soundwire/rt721.conf

index d55b1e4c95aae351f4ccb186e9bc658c914d43db..09428fd085f97ebb9ed45dc11c1f87faace0e5c5 100644 (file)
@@ -58,13 +58,20 @@ If.codecspk {
 SectionDevice."Headphones" {
        Comment "Headphones"
 
-       EnableSequence [
-               cset "name='Headphone Switch' on"
-       ]
-
-       DisableSequence [
-               cset "name='Headphone Switch' off"
-       ]
+       If.hs {
+               Condition {
+                       Type ControlExists
+                       Control "name='Headphone Switch'"
+               }
+               True {
+                       EnableSequence [
+                               cset "name='Headphone Switch' on"
+                       ]
+                       DisableSequence [
+                               cset "name='Headphone Switch' off"
+                       ]
+               }
+       }
 
        Value {
              PlaybackPriority 200