From: Kai Vehmanen Date: Thu, 11 Jun 2020 14:46:07 +0000 (+0300) Subject: sof-hda-dsp: make Headphone Playback Switch conditional X-Git-Tag: v1.2.4~47 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=6b0216d7b9ed5094a7bf28e6f643d90dd7e6fa62;p=alsa-ucm-conf.git sof-hda-dsp: make Headphone Playback Switch conditional The Headphone Playback Switch control is not present in all HDA codecs. Allow the Headphones definition to work also on such systems. Signed-off-by: Kai Vehmanen Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/sof-hda-dsp/HiFi.conf b/ucm2/sof-hda-dsp/HiFi.conf index 3b54d4a..1279488 100644 --- a/ucm2/sof-hda-dsp/HiFi.conf +++ b/ucm2/sof-hda-dsp/HiFi.conf @@ -17,13 +17,20 @@ SectionVerb { SectionDevice."Headphones" { Comment "Headphones" - EnableSequence [ - cset "name='Headphone Playback Switch' on" - ] - - DisableSequence [ - cset "name='Headphone Playback Switch' off" - ] + If.headphone_switch { + Condition { + Type ControlExists + Control "name='Headphone Playback Switch'" + } + True { + EnableSequence [ + cset "name='Headphone Playback Switch' on" + ] + DisableSequence [ + cset "name='Headphone Playback Switch' off" + ] + } + } Value { PlaybackPriority 200