From e0ed509562c2efd7696d8a67f5c40ee1b7ca99aa Mon Sep 17 00:00:00 2001 From: Brent Lu Date: Fri, 19 Jan 2024 04:56:49 +0800 Subject: [PATCH] topology2: dmic-generic: add switch for LED control Add a switch to gain widget for MIC mute LED control purpose. Use "DMIC_MUTE_LED=true" in cmake file to enable this feature. Signed-off-by: Brent Lu --- .../topology2/platform/intel/dmic-default.conf | 1 + .../topology2/platform/intel/dmic-generic.conf | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/tools/topology/topology2/platform/intel/dmic-default.conf b/tools/topology/topology2/platform/intel/dmic-default.conf index 0bbb288e9e03..8640e51967dc 100644 --- a/tools/topology/topology2/platform/intel/dmic-default.conf +++ b/tools/topology/topology2/platform/intel/dmic-default.conf @@ -36,4 +36,5 @@ Define { DMIC_CORE_ID 0 PASSTHROUGH "false" DMIC_PIPELINE_PRIORITY 0 + DMIC_MUTE_LED "false" } diff --git a/tools/topology/topology2/platform/intel/dmic-generic.conf b/tools/topology/topology2/platform/intel/dmic-generic.conf index 5ca0ec27c79b..5e707d49075a 100644 --- a/tools/topology/topology2/platform/intel/dmic-generic.conf +++ b/tools/topology/topology2/platform/intel/dmic-generic.conf @@ -142,6 +142,16 @@ IncludeByKey.PASSTHROUGH { Object.Control.mixer.1 { name '$DMIC0_PCM_NAME Capture Volume' } + IncludeByKey.DMIC_MUTE_LED { + "true" { + Object.Control.mixer.2 { + name '$DMIC0_PCM_NAME Capture Switch' + + mute_led_use 1 + mute_led_direction 1 + } + } + } } Object.Widget.module-copier."2" {