# Control audio processing in SOF
-# File paths for controlling SOF processing
-
-Define.SOFVendor "$${sys:devices/virtual/dmi/id/sys_vendor}"
-Define.SOFProduct "$${sys:devices/virtual/dmi/id/product_name}"
-
-If.SOFVendor {
- Condition {
- Type String
- Empty "${var:SOFVendor}"
- }
- True.Define.SOFVendor "${sys:devices/virtual/dmi/id/board_vendor}"
-}
-
-If.SOFProduct {
- Condition {
- Type String
- Empty "${var:SOFProduct}"
- }
- True.Define.SOFProduct "${sys:devices/virtual/dmi/id/board_name}"
-}
-
-If.SOFIPCVer {
- Condition {
- Type ControlExists
- Control "name='Post Mixer Analog Playback IIR Eq bytes'"
- }
- True.Define {
- SOFIPCVer "ipc4"
- PostMixerAnalogPlaybackIIRBytes "Post Mixer Analog Playback IIR Eq bytes"
- PostMixerAnalogPlaybackFIRBytes "Post Mixer Analog Playback FIR Eq bytes"
- PostMixerAnalogPlaybackDRCBytes "Post Mixer Analog Playback DRC bytes"
- PostMixerAnalogPlaybackDRCSwitch "Post Mixer Analog Playback DRC switch"
- }
- False.Define {
- SOFIPCVer "ipc3"
- PostMixerAnalogPlaybackIIRBytes "EQIIR1.0 eqiir_coef_1"
- PostMixerAnalogPlaybackFIRBytes "EQFIR1.0 eqfir_coef_1"
- PostMixerAnalogPlaybackDRCBytes "not available"
- PostMixerAnalogPlaybackDRCSwitch "not available"
- }
-}
-
-If.SOFPath {
- Condition { Type AlwaysTrue }
- True.Define {
- BlobPath "${ConfTopDir}/blobs/sof/${var:SOFIPCVer}"
- SpeakerIirBlob "${var:BlobPath}/eq_iir/highpass_100hz_0db_48khz.blob"
- SpeakerFirBlob "${var:BlobPath}/eq_fir/pass.blob"
- SpeakerDrcBlob "${var:BlobPath}/drc/speaker_default.blob"
- HeadphoneIirBlob "${var:BlobPath}/eq_iir/pass.blob"
- HeadphoneFirBlob "${var:BlobPath}/eq_fir/pass.blob"
- HeadphoneDrcBlob "${var:BlobPath}/drc/passthrough.blob"
- ConfPathFromDMI "${var:SOFVendor}/${var:SOFProduct}.conf"
- SOFProductConfig "/blobs/sof/product_configs/${var:ConfPathFromDMI}"
- SOFConfFullPath "${ConfTopDir}${var:SOFProductConfig}"
- SOFUserConfig "/blobs/sof/user_configs/${var:ConfPathFromDMI}"
- SOFUserConfFullPath "${ConfTopDir}${var:SOFUserConfig}"
- }
-}
-
-If.HasUserConfig {
- Condition {
- Type Path
- Mode read
- Path "${var:SOFUserConfFullPath}"
- }
- True {
- Include.product-config.File "${var:SOFUserConfig}"
- }
- False.If.HasProductConfig {
- Condition {
- Type Path
- Mode read
- Path "${var:SOFConfFullPath}"
- }
- True {
- Include.product-config.File "${var:SOFProductConfig}"
- }
- }
-}
-
# Redefine headphone control FOR SOF. This is same as Headphone in HDA/HiFi-analog.conf
# but adds DRC and EQ controls.
--- /dev/null
+# Control audio processing in SOF
+
+# File paths for controlling SOF processing
+
+Define.SOFVendor "$${sys:devices/virtual/dmi/id/sys_vendor}"
+Define.SOFProduct "$${sys:devices/virtual/dmi/id/product_name}"
+
+If.SOFVendor {
+ Condition {
+ Type String
+ Empty "${var:SOFVendor}"
+ }
+ True.Define.SOFVendor "${sys:devices/virtual/dmi/id/board_vendor}"
+}
+
+If.SOFProduct {
+ Condition {
+ Type String
+ Empty "${var:SOFProduct}"
+ }
+ True.Define.SOFProduct "${sys:devices/virtual/dmi/id/board_name}"
+}
+
+If.SOFIPCVer {
+ Condition {
+ Type ControlExists
+ Control "name='Post Mixer Analog Playback IIR Eq bytes'"
+ }
+ True.Define {
+ SOFIPCVer "ipc4"
+ PostMixerAnalogPlaybackIIRBytes "Post Mixer Analog Playback IIR Eq bytes"
+ PostMixerAnalogPlaybackFIRBytes "Post Mixer Analog Playback FIR Eq bytes"
+ PostMixerAnalogPlaybackDRCBytes "Post Mixer Analog Playback DRC bytes"
+ PostMixerAnalogPlaybackDRCSwitch "Post Mixer Analog Playback DRC switch"
+ }
+ False.Define {
+ SOFIPCVer "ipc3"
+ PostMixerAnalogPlaybackIIRBytes "EQIIR1.0 eqiir_coef_1"
+ PostMixerAnalogPlaybackFIRBytes "EQFIR1.0 eqfir_coef_1"
+ PostMixerAnalogPlaybackDRCBytes "not available"
+ PostMixerAnalogPlaybackDRCSwitch "not available"
+ }
+}
+
+If.SOFPath {
+ Condition { Type AlwaysTrue }
+ True.Define {
+ BlobPath "${ConfTopDir}/blobs/sof/${var:SOFIPCVer}"
+ SpeakerIirBlob "${var:BlobPath}/eq_iir/highpass_100hz_0db_48khz.blob"
+ SpeakerFirBlob "${var:BlobPath}/eq_fir/pass.blob"
+ SpeakerDrcBlob "${var:BlobPath}/drc/speaker_default.blob"
+ HeadphoneIirBlob "${var:BlobPath}/eq_iir/pass.blob"
+ HeadphoneFirBlob "${var:BlobPath}/eq_fir/pass.blob"
+ HeadphoneDrcBlob "${var:BlobPath}/drc/passthrough.blob"
+ ConfPathFromDMI "${var:SOFVendor}/${var:SOFProduct}.conf"
+ SOFProductConfig "/blobs/sof/product_configs/${var:ConfPathFromDMI}"
+ SOFConfFullPath "${ConfTopDir}${var:SOFProductConfig}"
+ SOFUserConfig "/blobs/sof/user_configs/${var:ConfPathFromDMI}"
+ SOFUserConfFullPath "${ConfTopDir}${var:SOFUserConfig}"
+ }
+}
+
+If.HasUserConfig {
+ Condition {
+ Type Path
+ Mode read
+ Path "${var:SOFUserConfFullPath}"
+ }
+ True {
+ Include.product-config.File "${var:SOFUserConfig}"
+ }
+ False.If.HasProductConfig {
+ Condition {
+ Type Path
+ Mode read
+ Path "${var:SOFConfFullPath}"
+ }
+ True {
+ Include.product-config.File "${var:SOFProductConfig}"
+ }
+ }
+}