# Use case Configuration for sof-hda-dsp

SectionVerb {
	EnableSequence [
		disdevall ""
	]

	Value.TQ "HiFi"
}

Include.hda-analog.File "/HDA/HiFi-analog.conf"

Include.sof-analog.File "HiFi-sof.conf"

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"
			CaptureMicInfoFile "${var:LibDir}/dmics-nhlt.json"
			If.chn {
				Condition {
					Type RegexMatch
					Regex "cfg-dmics:[34]"
					String "${CardComponents}"
				}
				True {
					CaptureChannels 4
				}
				False.If.mono {
					Condition {
						Type RegexMatch
						Regex "cfg-dmics:[1]"
						String "${CardComponents}"
					}
					True.If.ipc4 {
						# Only IPC4 exposes Mono DMIC PCM
						# IPC3 creates Stereo PCM.
						Condition {
							Type String
							String1 "${var:SOFIPCVer}"
							String2 "ipc4"
						}
						True {
							CaptureChannels 1
						}
					}
				}
			}
			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"
				}
			}
		}
	}
}

Include.hdmi.File "/Intel/sof-hda-dsp/Hdmi.conf"
