Just test if controls for the legacy driver are available
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
# Adapted from https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672
SectionVerb {
- EnableSequence [
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5672/EnableSeq.conf>
- ]
- DisableSequence [
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
+ If.Controls {
+ Condition {
+ Type ControlExists
+ Control "name='media0_in Gain 0 Switch'"
+ }
+ True {
+ EnableSequence [
+ <platforms/bytcr/PlatformEnableSeq.conf>
+ <codecs/rt5672/EnableSeq.conf>
+ ]
+
+ DisableSequence [
+ <platforms/bytcr/PlatformDisableSeq.conf>
+ ]
+ }
+ False {
+ EnableSequence [
+ <codecs/rt5672/EnableSeq.conf>
+ ]
+ }
+ }
}
<codecs/rt5672/Speaker.conf>
# Adapted from https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672
SectionVerb {
- EnableSequence [
- <platforms/bytcr/PlatformEnableSeq.conf>
- <codecs/rt5672/EnableSeq.conf>
- ]
- DisableSequence [
- <platforms/bytcr/PlatformDisableSeq.conf>
- ]
+ If.Controls {
+ Condition {
+ Type ControlExists
+ Control "name='media0_in Gain 0 Switch'"
+ }
+ True {
+ EnableSequence [
+ <platforms/bytcr/PlatformEnableSeq.conf>
+ <codecs/rt5672/EnableSeq.conf>
+ ]
+
+ DisableSequence [
+ <platforms/bytcr/PlatformDisableSeq.conf>
+ ]
+ }
+ False {
+ EnableSequence [
+ <codecs/rt5672/EnableSeq.conf>
+ ]
+ }
+ }
}
<codecs/rt5672/Speaker.conf>