Include.pcm_split.File "/common/pcm/split.conf"

Macro.playback.SplitPCM {
	Name "goxlr_stereo_out"
	Direction Playback
	Channels 2
	HWChannels "${var:PlaybackChannels}"
	HWChannelPos0 FL
	HWChannelPos1 FR
	HWChannelPos2 FL
	HWChannelPos3 FR
	HWChannelPos4 FL
	HWChannelPos5 FR
	HWChannelPos6 FL
	HWChannelPos7 FR
	HWChannelPos8 FL
	HWChannelPos9 FR
}

Macro.capture.SplitPCM {
	Name "goxlr_stereo_in"
	Direction Capture
	Channels 2
	HWChannels "${var:CaptureChannels}"
	HWChannelPos0 FL
	HWChannelPos1 FR
	HWChannelPos2 FL
	HWChannelPos3 FR
	HWChannelPos4 FL
	HWChannelPos5 FR
	HWChannelPos6 FL
	HWChannelPos7 FR
	HWChannelPos8 FL
	HWChannelPos9 FR
	HWChannelPos10 FL
	HWChannelPos11 FR
	HWChannelPos12 FL
	HWChannelPos13 FR
	HWChannelPos14 FL
	HWChannelPos15 FR
	HWChannelPos16 FL
	HWChannelPos17 FR
	HWChannelPos18 FL
	HWChannelPos19 FR
	HWChannelPos20 MONO # mini ends here
	HWChannelPos21 MONO
	HWChannelPos22 MONO # standard firmware ends here
	HWChannelPos23 FL
	HWChannelPos24 FR   # beta firmware ends here
}

SectionDevice."Speaker" {
	Comment "System"

	Value {
		PlaybackPriority 100
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "goxlr_stereo_out"
		Direction Playback
		HWChannels "${var:PlaybackChannels}"
		Channels 2
		Channel0 0
		Channel1 1
		ChannelPos0 FL
		ChannelPos1 FR
	}
}

SectionDevice."Line1" {
	Comment "Game"

	Value {
		PlaybackPriority 300
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "goxlr_stereo_out"
		Direction Playback
		HWChannels "${var:PlaybackChannels}"
		Channels 2
		Channel0 2
		Channel1 3
		ChannelPos0 FL
		ChannelPos1 FR
	}
}

SectionDevice."Line2" {
	Comment "Music"

	Value {
		PlaybackPriority 400
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "goxlr_stereo_out"
		Direction Playback
		HWChannels "${var:PlaybackChannels}"
		Channels 2
		Channel0 6
		Channel1 7
		ChannelPos0 FL
		ChannelPos1 FR
	}
}

SectionDevice."Headphones" {
	Comment "Chat"

	Value {
		PlaybackPriority 200
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "goxlr_stereo_out"
		Direction Playback
		HWChannels "${var:PlaybackChannels}"
		Channels 2
		Channel0 4
		Channel1 5
		ChannelPos0 FL
		ChannelPos1 FR
	}
}

SectionDevice."Line3" {
	Comment "Sample"

	Value {
		PlaybackPriority 500
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "goxlr_stereo_out"
		Direction Playback
		HWChannels "${var:PlaybackChannels}"
		Channels 2
		Channel0 8
		Channel1 9
		ChannelPos0 FL
		ChannelPos1 FR
	}
}

SectionDevice."Line4" {
	Comment "Stream Mix 1"

	Value {
		CapturePriority 200
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "goxlr_stereo_in"
		Direction Capture
		HWChannels "${var:CaptureChannels}"
		Channels 2
		Channel0 0
		Channel1 1
		ChannelPos0 FL
		ChannelPos1 FR
	}
}

SectionDevice."Headset" {
	Comment "Chat Mic"

	Value {
		CapturePriority 100
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "goxlr_stereo_in"
		Direction Capture
		HWChannels "${var:CaptureChannels}"
		Channels 2
		Channel0 2
		Channel1 3
		ChannelPos0 FL
		ChannelPos1 FR
	}
}

SectionDevice."Line5" {
	Comment "Sampler"

	Value {
		CapturePriority 300
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "goxlr_stereo_in"
		Direction Capture
		HWChannels "${var:CaptureChannels}"
		Channels 2
		Channel0 4
		Channel1 5
		ChannelPos0 FL
		ChannelPos1 FR
	}
}

If.mix2 {
	Condition {
		Type String
		String1 "${var:CaptureChannels}"
		String2 "25"
	}
	True.SectionDevice."Line6" {
		Comment "Stream Mix 2"

		Value {
			CapturePriority 200
		}

		Macro.pcm_split.SplitPCMDevice {
			Name "goxlr_stereo_in"
			Direction Capture
			HWChannels "${var:CaptureChannels}"
			Channels 2
			Channel0 23
			Channel1 24
			ChannelPos0 FL
			ChannelPos1 FR
		}
	}
}
