# Generic HDA devices for analog I/O
+Define.DeviceFrontMic ""
+Define.hpvol "Headphone"
+Define.hpjack "Headphone Jack"
+Define.lovol "Line Out"
+
+If.fmic {
+ Condition {
+ Type ControlExists
+ Control "name='Front Mic Playback Switch'"
+ }
+ True {
+ If.mic2 {
+ Condition {
+ Type String
+ String1 "${var:DeviceMic}"
+ String2 "Mic2"
+ }
+ True.Define {
+ DeviceFrontMic "Mic3"
+ }
+ False.Define {
+ DeviceMic "Mic1"
+ DeviceFrontMic "Mic2"
+ }
+ }
+ }
+}
+
+If.hplo {
+ Condition {
+ Type ControlExists
+ Control "name='Headphone+LO Playback Volume'"
+ }
+ True.Define {
+ hpvol "Headphone+LO"
+ lovol "Headphone+LO"
+ }
+}
+
+If.hpjack {
+ Condition {
+ Type ControlExists
+ Control "iface=CARD,name='Headphone Mic Jack'"
+ }
+ True.Define.hpjack "Headphone Mic Jack"
+ False.If.front {
+ Condition {
+ Type ControlExists
+ Control "iface=CARD,name='Front Headphone Jack'"
+ }
+ True.Define.hpjack "Front Headphone Jack"
+ }
+}
+
SectionDevice."Headphones" {
Comment "Headphones"
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId}"
- PlaybackMixerElem "Headphone"
+ PlaybackMixerElem "${var:hpvol}"
PlaybackMasterElem "Master"
- PlaybackVolume "Headphone Playback Volume"
+ PlaybackVolume "${var:hpvol} Playback Volume"
PlaybackSwitch "Headphone Playback Switch"
- If.jack {
- Condition {
- Type ControlExists
- Control "iface=CARD,name='Headphone Mic Jack'"
- }
- True {
- JackControl "Headphone Mic Jack"
- }
- False {
- JackControl "Headphone Jack"
- }
- }
+ JackControl "${var:hpjack}"
}
}
}
}
}
+
+If.frontmic {
+ Condition {
+ Type String
+ Empty "${var:DeviceFrontMic}"
+ }
+ False.SectionDevice."${var:DeviceFrontMic}" {
+ Comment "Front Stereo Microphone"
+
+ ConflictingDevice [
+ "${var:DeviceMic}"
+ ]
+
+ Value {
+ CapturePriority 400
+ Include.value.File "/HDA-Intel/HDA-Capture-value.conf"
+ CaptureMasterElem "Front Mic Boost"
+ JackControl "Front Mic Jack"
+ }
+ }
+}
+
+If.lineout {
+ Condition {
+ Type ControlExists
+ Control "name='Line Out Playback Switch'"
+ }
+ True.SectionDevice."Line" {
+ Comment "Line Output"
+
+ If.conflict {
+ Condition {
+ Type String
+ String1 "${var:lovol}"
+ String2 "Headphone+LO"
+ }
+ True.ConflictingDevice [
+ "Headphones"
+ ]
+ }
+
+ EnableSequence [
+ cset "name='Line Out Playback Switch' on"
+ ]
+ DisableSequence [
+ cset "name='Line Out Playback Switch' off"
+ ]
+
+ Value {
+ PlaybackPriority 300
+ PlaybackPCM "hw:${CardId}"
+ PlaybackMixerElem "${var:lovol}"
+ PlaybackMasterElem "Master"
+ PlaybackVolume "${var:lovol} Playback Volume"
+ PlaybackSwitch "Line Out Playback Switch"
+ JackControl "Line Out Jack"
+ }
+ }
+}