# Comment - Long name of the SectionDevice
# Jack - Jack control if available
# Priority - CapturePriority
-DefineMacro.HDAMicEnum.SectionDevice."${var:__DevName}" {
- Comment "${var:__Comment}"
+DefineMacro.HDAMicEnum.If.enum {
+ Condition {
+ Type ControlExists
+ Control "name='${var:SourceControl}'"
+ ControlEnum "${var:__Enum}"
+ }
+ True.SectionDevice."${var:__DevName}" {
+ Comment "${var:__Comment}"
- EnableSequence [
- cset "name='${var:SourceControl}' '${var:__Enum}'"
- ]
- Value {
- CapturePriority "${eval:($__Priority+$MicExtraPriority)}"
- CapturePCM "hw:${CardId}"
- CaptureMixerElem "Capture"
- CaptureVolume "Capture Volume"
- CaptureSwitch "Capture Switch"
- CaptureMasterElem "${var:__Enum} Boost"
- }
- If.jack {
- Condition {
- Type String
- Empty "${var:-__Jack}"
+
+ EnableSequence [
+ cset "name='${var:SourceControl}' '${var:__Enum}'"
+ ]
+
+ Value {
+ CapturePriority "${eval:($__Priority+$MicExtraPriority)}"
+ CapturePCM "hw:${CardId}"
+ CaptureMixerElem "Capture"
+ CaptureVolume "Capture Volume"
+ CaptureSwitch "Capture Switch"
+ CaptureMasterElem "${var:__Enum} Boost"
+ }
+ If.jack {
+ Condition {
+ Type String
+ Empty "${var:-__Jack}"
+ }
+ False.Value.JackControl "${var:__Jack}"
}
- False.Value.JackControl "${var:__Jack}"
- }
- ConflictingDevice [
- "Mic:hda-int"
- "Mic:hda-hp"
- "Mic:hda"
- "Headset:hda-mic"
- ]
+ ConflictingDevice [
+ "Mic:hda-int"
+ "Mic:hda-hp"
+ "Mic:hda"
+ "Headset:hda-mic"
+ ]
+ }
}
# Macro HDAMicSwitch - Create the SectionDevice for HDA inputs (switches)