diff options
author | Kai Vehmanen <kai.vehmanen@linux.intel.com> | 2020-06-11 17:46:07 +0300 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2020-06-23 17:18:29 +0200 |
commit | 6b0216d7b9ed5094a7bf28e6f643d90dd7e6fa62 (patch) | |
tree | 5a77c6f771c8ec1fe2b82dcea1efb18e44f25486 | |
parent | d001c8de287f9fa3ce1814fb1c0804390576a19e (diff) |
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 <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r-- | ucm2/sof-hda-dsp/HiFi.conf | 21 |
1 files changed, 14 insertions, 7 deletions
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 |