From 13022a97711daa156c0cc6e5601409a86e5a26ec Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 19 Jun 2024 08:45:57 +0200 Subject: [PATCH] sof-hda-dsp: Fix the case where sysfs dmi sys_vendor attribute is not set BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2292583 Signed-off-by: Jaroslav Kysela --- ucm2/Intel/sof-hda-dsp/HiFi-sof.conf | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ucm2/Intel/sof-hda-dsp/HiFi-sof.conf b/ucm2/Intel/sof-hda-dsp/HiFi-sof.conf index 90af859..fea8159 100644 --- a/ucm2/Intel/sof-hda-dsp/HiFi-sof.conf +++ b/ucm2/Intel/sof-hda-dsp/HiFi-sof.conf @@ -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 -- 2.47.1