--- /dev/null
+# RT1320 amp specific switch control settings
+
+DefineMacro.rt1320spkled.If.0 {
+ Condition {
+ Type RegexMatch
+ Regex "${var:__ForAmps}"
+ String "${var:SpeakerAmps}"
+ }
+ True.Macro [
+ { SetLED { LED="speaker" Action="attach" CtlId="rt1320-${var:__Amp} OT23 L Switch" } }
+ { SetLED { LED="speaker" Action="attach" CtlId="rt1320-${var:__Amp} OT23 R Switch" } }
+ ]
+}
+
+If.spk_init_rt1320 {
+ Condition {
+ Type String
+ Needle "rt1320"
+ Haystack "${var:MultiSpeakerShadow}"
+ }
+ True {
+ Macro.num1.rt1320spkled { ForAmps "[12]" Amp 1 }
+ Macro.num2.rt1320spkled { ForAmps "2" Amp 2 }
+ }
+}
+
+Define.SpeakerMixerElem "rt1320-1 OT23"
+
+If.oneAmp {
+ Condition {
+ Type RegexMatch
+ Regex "1"
+ String "${var:SpeakerAmps}"
+ }
+ True {
+ Define.SpeakerMixerElem "rt1320 OT23"
+ LibraryConfig.remap.Config {
+ ctl.default.map {
+ "name='rt1320 OT23 Playback Switch'" {
+ "name='rt1320-1 OT23 L Switch'".vindex.0 0
+ "name='rt1320-1 OT23 R Switch'".vindex.1 0
+ }
+ }
+ }
+ }
+}
+
+If.twoAmps {
+ Condition {
+ Type RegexMatch
+ Regex "2"
+ String "${var:SpeakerAmps}"
+ }
+ True {
+ Define.SpeakerMixerElem "rt1320 OT23"
+ LibraryConfig.remap.Config {
+ ctl.default.map {
+ "name='rt1320 OT23 Playback Switch'" {
+ "name='rt1320-1 OT23 L Switch'".vindex.0 0
+ "name='rt1320-1 OT23 R Switch'".vindex.0 0
+ "name='rt1320-2 OT23 L Switch'".vindex.1 0
+ "name='rt1320-2 OT23 R Switch'".vindex.1 0
+ }
+ }
+ }
+ }
+}
]
Value {
- PlaybackPriority 100
- PlaybackPCM "hw:${CardId},2"
+ PlaybackPriority 100
+ PlaybackPCM "hw:${CardId},2"
+ PlaybackMixer "default:${CardId}"
+ PlaybackMixerElem "${var:SpeakerMixerElem}"
+ PlaybackSwitch "${var:SpeakerMixerElem} Playback Switch"
}
}