From e90b7cfa071270d6422c3180df7d27e3f23258ef Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 22 Nov 2021 17:43:41 +0100 Subject: [PATCH] HDA-Intel: use conf.d/ move DualCodecs config to separate directory Signed-off-by: Jaroslav Kysela --- .../DualCodecs.conf} | 3 +-- .../{HiFi-dual.conf => DualCodecs/HiFi.conf} | 0 ucm2/HDA-Intel/HDA-Intel.conf | 27 ++++++++++++++++--- .../HDAudio-Gigabyte-ALC1220DualCodecs.conf | 1 - ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf | 1 - ucm2/conf.d/HDA-Intel/HDA-Intel.conf | 1 + 6 files changed, 26 insertions(+), 7 deletions(-) rename ucm2/HDA-Intel/{HDAudio-DualCodecs.conf => DualCodecs/DualCodecs.conf} (92%) rename ucm2/HDA-Intel/{HiFi-dual.conf => DualCodecs/HiFi.conf} (100%) delete mode 120000 ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf delete mode 120000 ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf create mode 120000 ucm2/conf.d/HDA-Intel/HDA-Intel.conf diff --git a/ucm2/HDA-Intel/HDAudio-DualCodecs.conf b/ucm2/HDA-Intel/DualCodecs/DualCodecs.conf similarity index 92% rename from ucm2/HDA-Intel/HDAudio-DualCodecs.conf rename to ucm2/HDA-Intel/DualCodecs/DualCodecs.conf index 6fd7bd1..393885f 100644 --- a/ucm2/HDA-Intel/HDAudio-DualCodecs.conf +++ b/ucm2/HDA-Intel/DualCodecs/DualCodecs.conf @@ -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" } diff --git a/ucm2/HDA-Intel/HiFi-dual.conf b/ucm2/HDA-Intel/DualCodecs/HiFi.conf similarity index 100% rename from ucm2/HDA-Intel/HiFi-dual.conf rename to ucm2/HDA-Intel/DualCodecs/HiFi.conf diff --git a/ucm2/HDA-Intel/HDA-Intel.conf b/ucm2/HDA-Intel/HDA-Intel.conf index 78b46f0..47c53c4 100644 --- a/ucm2/HDA-Intel/HDA-Intel.conf +++ b/ucm2/HDA-Intel/HDA-Intel.conf @@ -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 index 89801aa..0000000 --- a/ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf +++ /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 index 89801aa..0000000 --- a/ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf +++ /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 index 0000000..8ad4dae --- /dev/null +++ b/ucm2/conf.d/HDA-Intel/HDA-Intel.conf @@ -0,0 +1 @@ +../../HDA-Intel/HDA-Intel.conf \ No newline at end of file -- 2.47.1