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 <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2024-06-19 08:45:57 +02:00
commit 13022a9771

View 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