OSDN Git Service

HDA-Intel: only add the acp dmic to the sound card with analog codec
authorHui Wang <hui.wang@canonical.com>
Thu, 20 Aug 2020 03:25:24 +0000 (11:25 +0800)
committerJaroslav Kysela <perex@perex.cz>
Mon, 7 Sep 2020 11:05:49 +0000 (13:05 +0200)
Without this change, the acp dmic will be added to both Intel sound
card (with analog codec) and Nvidia Hdmi audio sound card.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA-Intel/HiFi.conf

index 2d18c9e..f09ce1c 100644 (file)
@@ -9,24 +9,25 @@ If.analog {
                Type ControlExists
                Control "name='Master Playback Switch'"
        }
-       True.Include.analog.File "/HDA-Intel/HiFi-analog.conf"
+       True {
+               Include.analog.File "/HDA-Intel/HiFi-analog.conf"
+               If.acp {
+                       Condition {
+                               Type String
+                               Empty "${var:AcpCardId}"
+                       }
+                       True {
+                               RenameDevice."Mic1" "Mic"
+                       }
+                       False.Include.acp {
+                               Before.SectionDevice "Mic1"
+                               File "/HDA-Intel/HiFi-acp.conf"
+                       }
+               }
+       }
 }
 
 If.hdmi {
        Condition { Type String Empty "" }
        True.Include.hdmi.File "/HDA-Intel/Hdmi.conf"
 }
-
-If.acp {
-       Condition {
-               Type String
-               Empty "${var:AcpCardId}"
-       }
-       True {
-               RenameDevice."Mic1" "Mic"
-       }
-       False.Include.acp {
-               Before.SectionDevice "Mic1"
-               File "/HDA-Intel/HiFi-acp.conf"
-       }
-}