If.spk {
	Condition {
		Type String
		Haystack "${CardComponents}"
		Needle "cfg-spk:2"
	}
	True {
		<codecs/rt5651/Speaker.conf>
	}
}

If.mono {
	Condition {
		Type String
		Haystack "${CardComponents}"
		Needle "cfg-spk:1"
	}
	True {
		<codecs/rt5651/MonoSpeaker.conf>
	}
}

If.headphones {
	Condition {
		Type String
		Haystack "${CardComponents}"
		Needle "cfg-hp:lrswap"
	}
	True {
		<codecs/rt5651/HeadPhones-swapped.conf>
	}
	False {
		<codecs/rt5651/HeadPhones.conf>
	}
}

If.dmic1 {
	Condition {
		Type String
		Haystack "${CardComponents}"
		Needle "cfg-mic:dmic1"
	}
	True {
		<codecs/rt5651/DigitalMic.conf>
		<codecs/rt5651/IN2-HeadsetMic.conf>
		SectionDevice."Mic".ConflictingDevice.0 "Headset"
	}
	False {
		<codecs/rt5651/IN3-HeadsetMic.conf>
	}
}

If.in1 {
	Condition {
		Type String
		Haystack "${CardComponents}"
		Needle "cfg-mic:in1"
	}
	True {
		<codecs/rt5651/IN1-InternalMic.conf>
	}
}

If.in2 {
	Condition {
		Type String
		Haystack "${CardComponents}"
		Needle "cfg-mic:in2"
	}
	True {
		<codecs/rt5651/IN2-InternalMic.conf>
	}
}

If.in12 {
	Condition {
		Type String
		Haystack "${CardComponents}"
		Needle "cfg-mic:in12"
	}
	True {
		<codecs/rt5651/IN12-InternalMic.conf>
	}
}
