From eada1bb6715cb7b20e3fe878299d85ce1e22defe Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 13 Apr 2020 10:37:03 -0500 Subject: [PATCH] sof-bytcht-nau8824: 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/chtnau8824/HiFi-mono.conf | 27 ++++++++++++++++++++------- ucm2/chtnau8824/HiFi.conf | 30 ++++++++++++++++++++++-------- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/ucm2/chtnau8824/HiFi-mono.conf b/ucm2/chtnau8824/HiFi-mono.conf index 26d6a56..e87ebe3 100644 --- a/ucm2/chtnau8824/HiFi-mono.conf +++ b/ucm2/chtnau8824/HiFi-mono.conf @@ -5,14 +5,27 @@ SectionVerb { TQ "HiFi" } - EnableSequence [ - - - ] + If.Controls { + Condition { + Type ControlExists + Control "name='media0_in Gain 0 Switch'" + } + True { + EnableSequence [ + + + ] - DisableSequence [ - - ] + DisableSequence [ + + ] + } + False { + EnableSequence [ + + ] + } + } } diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf index fd8b741..6ed4e4f 100644 --- a/ucm2/chtnau8824/HiFi.conf +++ b/ucm2/chtnau8824/HiFi.conf @@ -1,15 +1,29 @@ - SectionVerb { - EnableSequence [ - - - ] - DisableSequence [ - - ] + If.Controls { + Condition { + Type ControlExists + Control "name='media0_in Gain 0 Switch'" + } + True { + EnableSequence [ + + + ] + + DisableSequence [ + + ] + } + False { + EnableSequence [ + + ] + } + } } + -- 2.11.0