OSDN Git Service

sof-hda-dsp: use CardComponents to detect the four digital microphones
authorJaroslav Kysela <perex@perex.cz>
Thu, 28 Nov 2019 18:21:47 +0000 (19:21 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 29 Nov 2019 09:14:30 +0000 (10:14 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/sof-hda-dsp/HiFi.conf

index 6dee548..43d8315 100644 (file)
@@ -142,7 +142,19 @@ SectionDevice."DigitalMic" {
        Value {
                CapturePriority 100
                CapturePCM "hw:${CardId},6"
-               CaptureChannels "2"
+               If.chn {
+                       Condition {
+                               Type String
+                               Haystack "${CardComponents}"
+                               Needle "cfg-dmics:4"
+                       }
+                       True {
+                               CaptureChannels "4"
+                       }
+                       False {
+                               CaptureChannels "2"
+                       }
+               }
                If.vol {
                        Condition {
                                Type ControlExists