Submitted By:            Xi Ruoyao <xry111 at xry111 dot site>
Date:                    2025-04-14
Initial Package Version: 1.2.13
Origin:                  Upstream (see the From line for revision)
Upstream Status:         Applied
Description:             Fixes "alsactl init" failure on machines using
                         sof-hda-dsp.  For example, ThinkPad T14P Gen2
                         is such a machine and on that the HDMI output
                         and digital microphone input are unusable until
                         a successful "alsactl init" run.

From 11b028a9a01e47fc9b48e4a566803752011902e2 Mon Sep 17 00:00:00 2001
From: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Date: Wed, 13 Nov 2024 14:48:38 +0200
Subject: [PATCH] UCM2: Intel: sof-hda-dsp: Fix handling of empty sys_vendor

The mistake in UCM syntax caused in alsaucm start error:

ALSA lib ucm_cond.c:367:(if_eval) unknown If.Condition.Type

Fixes: 13022a97711d ("sof-hda-dsp: Fix the case where sysfs dmi
       sys_vendor attribute is not set")

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/463
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 ucm2/Intel/sof-hda-dsp/HiFi-sof.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ucm2/Intel/sof-hda-dsp/HiFi-sof.conf b/ucm2/Intel/sof-hda-dsp/HiFi-sof.conf
index fea8159e..c755ba26 100644
--- a/ucm2/Intel/sof-hda-dsp/HiFi-sof.conf
+++ b/ucm2/Intel/sof-hda-dsp/HiFi-sof.conf
@@ -6,8 +6,8 @@ Define.SOFVendor "$${sys:devices/virtual/dmi/id/sys_vendor}"
 
 If.SOFVendor {
 	Condition {
-		Type Empty
-		String "${var:SOFVendor}"
+		Type String
+		Empty "${var:SOFVendor}"
 	}
 	True.Define.SOFVendor "${sys:devices/virtual/dmi/id/board_vendor}"
 }
