]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
HDA-Intel: use conf.d/ move DualCodecs config to separate directory
authorJaroslav Kysela <perex@perex.cz>
Mon, 22 Nov 2021 16:43:41 +0000 (17:43 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 22 Nov 2021 16:46:09 +0000 (17:46 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/HDA-Intel/DualCodecs/DualCodecs.conf [moved from ucm2/HDA-Intel/HDAudio-DualCodecs.conf with 92% similarity]
ucm2/HDA-Intel/DualCodecs/HiFi.conf [moved from ucm2/HDA-Intel/HiFi-dual.conf with 100% similarity]
ucm2/HDA-Intel/HDA-Intel.conf
ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf [deleted symlink]
ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf [deleted symlink]
ucm2/conf.d/HDA-Intel/HDA-Intel.conf [new symlink]

similarity index 92%
rename from ucm2/HDA-Intel/HDAudio-DualCodecs.conf
rename to ucm2/HDA-Intel/DualCodecs/DualCodecs.conf
index 6fd7bd1032f5023d63e630ebb5d4f209cdeb8813..393885f0bab329118c73c5184f163dbe2fa785c3 100644 (file)
@@ -1,7 +1,6 @@
-Syntax 2
 Comment "HDAudio with dual HD-audio codecs"
 SectionUseCase."HiFi" {
-       File "HiFi-dual.conf"
+       File "/HDA-Intel/DualCodecs/HiFi.conf"
        Comment "Default"
 }
 
index 78b46f0082a9f20c3d160b2fdc48df5e1e850066..47c53c489df901d5c3dac7ebeb4da24c51b51b26 100644 (file)
@@ -1,10 +1,24 @@
 Syntax 4
 
 Define.Use ""  # a non-empty string to use UCM configuration for HDA devices
+Define.Done "" # a non-empty string to skip the end error
 
 Define.AcpCardId "$${find-card:field=name,return=id,regex='^acp$'}"
 Define.DeviceMic "Mic"
 
+If.dualcodec {
+       Condition {
+               Type String
+               Haystack "${var:CardLongName}"
+               Needle "DualCodecs"
+       }
+       True {
+               Define.Done y
+               Define.AcpCardId ""
+               Include.dual.File "/HDA-Intel/DualCodecs/DualCodecs.conf"
+       }
+}
+
 If.acp {
        Condition {
                Type String
@@ -22,8 +36,10 @@ If.use {
                Empty "${var:Use}"
        }
        False {
+               Define.Done y
+
                SectionUseCase."HiFi" {
-                       File "HiFi.conf"
+                       File "/HDA-Intel/HiFi.conf"
                        Comment "Play HiFi quality Music"
                }
 
@@ -35,7 +51,12 @@ If.use {
                        sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:Mic ACP LED Capture Switch"
                ]
        }
-       True {
-               Error "UCM is not supported for this HDA model (${CardLongName})"
+}
+
+If.err {
+       Condition {
+               Type String
+               Empty "${var:Done}"
        }
+       True.Error "UCM is not supported for this HDA model (${CardLongName})"
 }
diff --git a/ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf b/ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf
deleted file mode 120000 (symlink)
index 89801aa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-HDAudio-DualCodecs.conf
\ No newline at end of file
diff --git a/ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf b/ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf
deleted file mode 120000 (symlink)
index 89801aa..0000000
+++ /dev/null
@@ -1 +0,0 @@
-HDAudio-DualCodecs.conf
\ No newline at end of file
diff --git a/ucm2/conf.d/HDA-Intel/HDA-Intel.conf b/ucm2/conf.d/HDA-Intel/HDA-Intel.conf
new file mode 120000 (symlink)
index 0000000..8ad4dae
--- /dev/null
@@ -0,0 +1 @@
+../../HDA-Intel/HDA-Intel.conf
\ No newline at end of file