@@ -2,6 +2,41 @@ Define.MonoSpeaker ""
Define.AnalogMic "yes"
Define.DigitalMic ""
+If.components-dmic1 {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-mic:dmic1"
+ }
+ True {
+ Define.AnalogMic ""
+ Define.DigitalMic "DMIC1"
+ }
+}
+
+If.components-dmic2 {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-mic:dmic2"
+ }
+ True {
+ Define.AnalogMic ""
+ Define.DigitalMic "DMIC2"
+ }
+}
+
+If.components-mspk {
+ Condition {
+ Type String
+ Haystack "${CardComponents}"
+ Needle "cfg-spk:1"
+ }
+ True {
+ Define.MonoSpeaker "yes"
+ }
+}
+
If.cfg-dmic1 {
Condition {
Type RegexMatch
Upcoming kernel versions will report which speaker and dmic config is used by the device in a components strings so that we don't need to duplicate the DMI quirks in both the kernel and the UCM profile. Add support for getting the speaker and dmic config from the components string. Note the old DMI matching is kept for support of older kernels, this means that on devices where the old DMI matching was used things like: Define.MonoSpeaker "Yes" Will now be done twice, this is harmless as long as the kernel and UCM profile DMI quirks are in sync, which they are. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- ucm2/Intel/chtrt5645/HiFi.conf | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)