]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
sof-hda-dsp: Fix the case where sysfs dmi product_name attribute is not set
authorJaroslav Kysela <perex@perex.cz>
Wed, 13 Nov 2024 15:19:15 +0000 (16:19 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 13 Nov 2024 15:20:00 +0000 (16:20 +0100)
  !!DMI Information
  !!---------------

  Manufacturer:
  Product Name:
  Product Version:
  Firmware Version:  R6G07
  System SKU:        Default string
  Board Vendor:      Default string
  Board Name:        Default string

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 c755ba26cbe60919c554abf8226bbce58269fb2f..5fd1843ff1012efe1dd2ebcf5ad95ee89ee3d3e8 100644 (file)
@@ -3,6 +3,7 @@
 # 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 {
@@ -12,6 +13,14 @@ If.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
@@ -43,7 +52,7 @@ 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"
+               ConfPathFromDMI "${var:SOFVendor}/${var:SOFProduct}"
                SOFProductConfig "/blobs/sof/product_configs/${var:ConfPathFromDMI}"
                SOFConfFullPath "${ConfTopDir}${var:SOFProductConfig}"
                SOFUserConfig "/blobs/sof/user_configs/${var:ConfPathFromDMI}"