}
}
}
+
+# RT1320 DMIC specific switch control settings
+
+Define.MicMixerElem "rt1320-1 FU"
+
+DefineMacro.rt1320micled.If.0 {
+ Condition {
+ Type RegexMatch
+ Regex "${var:__ForMics}"
+ String "${var:Mics}"
+ }
+ True.Macro [{ SetLED { LED="mic" Action="attach" CtlId="rt1320-${var:__Mic} FU Capture Switch" } }]
+}
+
+If.mic_init_rt1320 {
+ Condition {
+ Type String
+ Needle "rt1320"
+ Haystack "${var:MultiMicShadow}"
+ }
+ True {
+ Macro.num1.rt1320micled { ForMics "[12]" Mic 1 }
+ Macro.num2.rt1320micled { ForMics "2" Mic 2 }
+
+ If.twoMics {
+ Condition {
+ Type RegexMatch
+ Regex "2"
+ String "${var:Mics}"
+ }
+ True {
+ Define.MicMixerElem "rt1320 FU"
+ LibraryConfig.remap.Config {
+ ctl.default.map {
+ "name='rt1320 FU Capture Switch'" {
+ "name='rt1320-1 FU Capture Switch'".vindex.0 0
+ "name='rt1320-1 FU Capture Switch'".vindex.1 1
+ "name='rt1320-1 FU Capture Switch'".vindex.2 2
+ "name='rt1320-1 FU Capture Switch'".vindex.3 3
+ "name='rt1320-2 FU Capture Switch'".vindex.4 0
+ "name='rt1320-2 FU Capture Switch'".vindex.5 1
+ "name='rt1320-2 FU Capture Switch'".vindex.6 2
+ "name='rt1320-2 FU Capture Switch'".vindex.7 3
+ }
+ }
+ }
+ }
+ }
+ }
+}
PlaybackSwitch "${var:SpeakerMixerElem} Playback Switch"
}
}
+
+# Use case Configuration for RT1320 SoundWire DMIC (microphone function)
+
+DefineMacro.rt1320dmic.If.0 {
+ Condition {
+ Type RegexMatch
+ Regex "${var:__ForMics}"
+ String "${var:Mics}"
+ }
+ True {
+ EnableSequence [
+ cset "name='rt1320-${var:__Mic} FU Capture Switch' 1"
+ ]
+ DisableSequence [
+ cset "name='rt1320-${var:__Mic} FU Capture Switch' 0"
+ ]
+ }
+}
+
+If.codecmic {
+ Condition {
+ Type String
+ Needle "rt1320"
+ Haystack "${var:MultiMicShadow}"
+ }
+ True {
+ SectionDevice."Mic" {
+ Comment "Microphones"
+
+ Macro.num1.rt1320dmic { ForMics "[12]" Mic 1 }
+ Macro.num2.rt1320dmic { ForMics "2" Mic 2 }
+
+ Value {
+ CapturePriority 100
+ CapturePCM "hw:${CardId},4"
+ CaptureMixerElem "${var:MicMixerElem}"
+ CaptureSwitch "${var:MicMixerElem} Capture Switch"
+ }
+ }
+ }
+}