]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
sof-hda-dsp: Fix the case where sysfs dmi sys_vendor attribute is not set
authorJaroslav Kysela <perex@perex.cz>
Wed, 19 Jun 2024 06:45:57 +0000 (08:45 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 19 Jun 2024 06:45:57 +0000 (08:45 +0200)
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2292583
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Intel/sof-hda-dsp/HiFi-sof.conf

index 90af859ffd1a0ee1be8efc8b1a1171205cfe9bc0..fea8159e9c99f49c586c2a9e038f10b0d4dc0fd8 100644 (file)
@@ -2,6 +2,16 @@
 
 # File paths for controlling SOF processing
 
+Define.SOFVendor "$${sys:devices/virtual/dmi/id/sys_vendor}"
+
+If.SOFVendor {
+       Condition {
+               Type Empty
+               String "${var:SOFVendor}"
+       }
+       True.Define.SOFVendor "${sys:devices/virtual/dmi/id/board_vendor}"
+}
+
 If.SOFIPCVer {
        Condition {
                Type ControlExists
@@ -33,15 +43,14 @@ If.SOFPath {
                HeadphoneIirBlob "${var:BlobPath}/eq_iir/pass.blob"
                HeadphoneFirBlob "${var:BlobPath}/eq_fir/pass.blob"
                HeadphoneDrcBlob "${var:BlobPath}/drc/passthrough.blob"
+               ConfPathFromDMI "${var:SOFVendor}/${sys:devices/virtual/dmi/id/product_name}.conf"
+               SOFProductConfig "/blobs/sof/product_configs/${var:ConfPathFromDMI}"
+               SOFConfFullPath "${ConfTopDir}${var:SOFProductConfig}"
+               SOFUserConfig "/blobs/sof/user_configs/${var:ConfPathFromDMI}"
+               SOFUserConfFullPath "${ConfTopDir}${var:SOFUserConfig}"
        }
 }
 
-Define.ConfPathFromDMI "${sys:devices/virtual/dmi/id/sys_vendor}/${sys:devices/virtual/dmi/id/product_name}.conf"
-Define.SOFProductConfig "/blobs/sof/product_configs/${var:ConfPathFromDMI}"
-Define.SOFConfFullPath "${ConfTopDir}${var:SOFProductConfig}"
-Define.SOFUserConfig "/blobs/sof/user_configs/${var:ConfPathFromDMI}"
-Define.SOFUserConfFullPath "${ConfTopDir}${var:SOFUserConfig}"
-
 If.HasUserConfig {
        Condition {
                Type Path