From: Hui Wang Date: Thu, 20 Aug 2020 03:25:24 +0000 (+0800) Subject: HDA-Intel: only add the acp dmic to the sound card with analog codec X-Git-Tag: v1.2.4~8 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=4c703a5504deb1772cadfdc783257d9a927b422b;p=alsa-ucm-conf.git HDA-Intel: only add the acp dmic to the sound card with analog codec 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 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/HDA-Intel/HiFi.conf b/ucm2/HDA-Intel/HiFi.conf index 2d18c9e..f09ce1c 100644 --- a/ucm2/HDA-Intel/HiFi.conf +++ b/ucm2/HDA-Intel/HiFi.conf @@ -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" - } -}