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

Macro [
	{
		SplitPCM {
			Name "umc202hd_mono_in"
			Direction Capture
			Channels 1
			HWChannels 2
			HWChannelPos0 MONO
			HWChannelPos1 MONO
		}
	}
]

Define.PCMMixerName "PCM"

If.pcm_controls {
	Condition {
		Type ControlExists
		Control "name='UMC202HD 192k Output Playback Switch'"
	}
	True.Define.PCMMixerName "UMC202HD 192k Output"
}

Include.ctl_remap.File "/common/ctl/remap.conf"

Macro [
	{
		CtlRemapMonoVolSw {
			Dst "Input 1 Capture"
			Src "Mic Capture"
			Index 0
		}
	}
	{
		CtlRemapMonoVolSw {
			Dst "Input 2 Capture"
			Src "Mic Capture"
			Index 1
		}
	}
]

SectionDevice."Line1" {
	Comment "Line A"
	Value {
		PlaybackPriority 200
		PlaybackPCM "hw:${CardId}"
		PlaybackMixerElem "${var:PCMMixerName}"
	}
}

SectionDevice."Mic1" {
	Comment "Input 1"

	Value {
		CapturePriority 200
		CaptureMixer "default:${CardId}"
		CaptureMixerElem "Input 1"
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "umc202hd_mono_in"
		Direction Capture
		HWChannels 2
		Channels 1
		Channel0 0
		ChannelPos0 MONO
	}
}

SectionDevice."Mic2" {
	Comment "Input 2"

	Value {
		CapturePriority 100
		CaptureMixer "default:${CardId}"
		CaptureMixerElem "Input 2"
	}
	Macro.pcm_split.SplitPCMDevice {
		Name "umc202hd_mono_in"
		Direction Capture
		HWChannels 2
		Channels 1
		Channel0 1
		ChannelPos0 MONO
	}
}
