From c1f72c5d82f5c8a87b4eebacd77bf427ccfbda48 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 21 Aug 2026 10:02:44 +0200 Subject: [PATCH] ucm2: rt712 - use 'Headphone Switch' only when available Fixes: https://github.com/alsa-project/alsa-ucm-conf/issues/825 Signed-off-by: Jaroslav Kysela --- ucm2/sof-soundwire/rt721.conf | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ucm2/sof-soundwire/rt721.conf b/ucm2/sof-soundwire/rt721.conf index d55b1e4..09428fd 100644 --- a/ucm2/sof-soundwire/rt721.conf +++ b/ucm2/sof-soundwire/rt721.conf @@ -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 -- 2.52.0