ControlEnum "Headphone Mic"
}
True {
- SectionDevice."Mic2" {
+ SectionDevice."${var:DeviceMic}" {
Comment "Headphones Stereo Microphone"
ConflictingDevice [
}
}
False {
- SectionDevice."Mic2" {
+ SectionDevice."${var:DeviceMic}" {
Comment "Headphones Stereo Microphone"
Value {
Value.TQ "HiFi"
}
-<HDA-Intel/HiFi-analog.conf>
+Include.hda-analog.File "/HDA-Intel/HiFi-analog.conf"
-If.monomic.After.SectionDevice "Mic1"
-
-SectionDevice."Mic1" {
- Comment "Digital Microphone"
+If.dmic {
+ Condition {
+ Type String
+ Empty "${var:DeviceDmic}"
+ }
+ Before.SectionDevice "${var:DeviceMic}"
+ False.SectionDevice."${var:DeviceDmic}" {
+ Comment "Digital Microphone"
- Value {
- CapturePriority 100
- CapturePCM "hw:${CardId},6"
- If.chn {
- Condition {
- Type RegexMatch
- Regex "cfg-dmics:[34]"
- String "${CardComponents}"
- }
- True {
- CaptureChannels 4
- }
- }
- If.vol {
- Condition {
- Type ControlExists
- Control "name='Dmic0 Capture Switch'"
- }
- True {
- CaptureMixerElem "Dmic0"
- CaptureVolume "Dmic0 Capture Volume"
- CaptureSwitch "Dmic0 Capture Switch"
+ Value {
+ CapturePriority 100
+ CapturePCM "hw:${CardId},6"
+ If.chn {
+ Condition {
+ Type RegexMatch
+ Regex "cfg-dmics:[34]"
+ String "${CardComponents}"
+ }
+ True {
+ CaptureChannels 4
+ }
}
- False {
- # v1.3 SOF firmware
- CaptureMixerElem "PGA10.0 10 Master"
- CaptureVolume "PGA10.0 10 Master Capture Volume"
+ If.vol {
+ Condition {
+ Type ControlExists
+ Control "name='Dmic0 Capture Switch'"
+ }
+ True {
+ CaptureMixerElem "Dmic0"
+ CaptureVolume "Dmic0 Capture Volume"
+ CaptureSwitch "Dmic0 Capture Switch"
+ }
+ False {
+ # v1.3 SOF firmware
+ CaptureMixerElem "PGA10.0 10 Master"
+ CaptureVolume "PGA10.0 10 Master Capture Volume"
+ }
}
}
}
}
-<sof-hda-dsp/Hdmi.conf>
+Include.hdmi.File "/sof-hda-dsp/Hdmi.conf"
-Syntax 3
+Syntax 4
+
+Define.DeviceMic "Mic"
+Define.DeviceDmic ""
+
+If.dmic {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-dmics:"
+ }
+ True.Define.DeviceDmic "Mic1"
+ True.Define.DeviceMic "Mic2"
+}
SectionUseCase."HiFi" {
File "HiFi.conf"
]
}
-If.Dmic0 {
+If.dmic {
Condition {
- Type ControlExists
- Control "name='Dmic0 Capture Volume'"
+ Type String
+ Empty "${var:DeviceDmic}"
+ }
+ False.If.Dmic0 {
+ Condition {
+ Type ControlExists
+ Control "name='Dmic0 Capture Volume'"
+ }
+ True.BootSequence [
+ cset "name='Dmic0 Capture Volume' 70%"
+ ]
}
- True.BootSequence [
- cset "name='Dmic0 Capture Volume' 70%"
- ]
}
If.Capture {