From 0a9672623663555f3b99fbee77b9eaf339fa1402 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 13 Apr 2020 10:29:14 -0500 Subject: [PATCH] sof-bytcht-rt5672: reuse legacy settings Just test if controls for the legacy driver are available Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jaroslav Kysela --- ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf | 28 ++++++++++++++++------ ucm2/cht-bsw-rt5672/HiFi.conf | 28 ++++++++++++++++------ 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf b/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf index 82c976b..50612aa 100644 --- a/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf +++ b/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf @@ -1,14 +1,28 @@ # Adapted from https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672 SectionVerb { - EnableSequence [ - - - ] - DisableSequence [ - - ] + If.Controls { + Condition { + Type ControlExists + Control "name='media0_in Gain 0 Switch'" + } + True { + EnableSequence [ + + + ] + + DisableSequence [ + + ] + } + False { + EnableSequence [ + + ] + } + } } diff --git a/ucm2/cht-bsw-rt5672/HiFi.conf b/ucm2/cht-bsw-rt5672/HiFi.conf index 9a64cc3..fd34452 100644 --- a/ucm2/cht-bsw-rt5672/HiFi.conf +++ b/ucm2/cht-bsw-rt5672/HiFi.conf @@ -1,14 +1,28 @@ # Adapted from https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672 SectionVerb { - EnableSequence [ - - - ] - DisableSequence [ - - ] + If.Controls { + Condition { + Type ControlExists + Control "name='media0_in Gain 0 Switch'" + } + True { + EnableSequence [ + + + ] + + DisableSequence [ + + ] + } + False { + EnableSequence [ + + ] + } + } } -- 2.47.1