# Adapted from https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672 Define.Speaker "yes" Define.Headphones "yes" Define.MonoSpeaker "yes" Define.DigitalMic1 "yes" Define.DigitalMic2 "yes" Define.HeadsetMic "yes" If.cfg-dmic1 { Condition { Type RegexMatch String "${CardLongName}" Regex "(LENOVO.*LenovoMiix210)|(LENOVO.*ThinkPad10)" } True { Define.MonoSpeaker "" Define.DigitalMic2 "" } } If.cfg-dmic2 { Condition { Type RegexMatch String "${CardLongName}" Regex "(LENOVO.*ThinkPad8)" } True { Define.MonoSpeaker "" Define.DigitalMic1 "" } } SectionVerb { Include.e.File "/codecs/rt5672/EnableSeq.conf" If.Controls { Condition { Type ControlExists Control "name='media0_in Gain 0 Switch'" } Before.EnableSequence "0" True { Include.pe.File "/platforms/bytcr/PlatformEnableSeq.conf" Include.pd.File "/platforms/bytcr/PlatformDisableSeq.conf" } } } If.spk { Condition { Type String Empty "${var:Speaker}" } False.Include.spk.File "/codecs/rt5672/Speaker.conf" } If.mspk { Condition { Type String Empty "${var:MonoSpeaker}" } True { RenameDevice."Speaker1" "Speaker" RemoveDevice."Speaker2" "Speaker2" } False.Include.mspk.File "/codecs/rt5672/MonoSpeaker.conf" } If.hp { Condition { Type String Empty "${var:Headphones}" } #True.RemoveDevice."Headphones" "Headphones" False.Include.hp.File "/codecs/rt5672/HeadPhones.conf" } If.dmic1 { Condition { Type String Empty "${var:DigitalMic1}" } True.RemoveDevice."Mic1" "Mic1" False { Include.dmic1.File "/codecs/rt5672/DMIC1.conf" If.dmic2 { Condition { Type "String" Empty "${var:DigitalMic2}" } True.RenameDevice."Mic1" "Mic" } } } If.dmic2 { Condition { Type String Empty "${var:DigitalMic2}" } True.RemoveDevice."Mic2" "Mic2" False { Include.dmic2.File "/codecs/rt5672/DMIC2.conf" If.dmic1 { Condition { Type "String" Empty "${var:DigitalMic1}" } True.RenameDevice."Mic2" "Mic" } } } If.hsmic { Condition { Type String Empty "${var:HeadsetMic}" } #True.RemoveDevice."Headset" "Headset" False.Include.hsmic.File "/codecs/rt5672/HeadsetMic.conf" }