From 967bec1a57d6d859973ff46a9a8167554224bae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sun, 28 Aug 2022 11:59:31 +0200 Subject: [PATCH] ucm2: HDA - add support for Internal Mic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kacper Michajłow --- ucm2/HDA/HiFi-analog.conf | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/ucm2/HDA/HiFi-analog.conf b/ucm2/HDA/HiFi-analog.conf index 72834d1c..468715fc 100644 --- a/ucm2/HDA/HiFi-analog.conf +++ b/ucm2/HDA/HiFi-analog.conf @@ -1,5 +1,6 @@ # Generic HDA devices for analog I/O +Define.FrontMicName "" Define.DeviceFrontMic "" Define.LineDevice "" Define.hpvol "Headphone" @@ -7,12 +8,32 @@ Define.hpjack "Headphone Jack" Define.loctl "Line" Define.lovol "Line" -If.fmic { +If.imicname { + Condition { + Type ControlExists + Control "name='Internal Mic Boost Volume'" + } + True.Define { + FrontMicName "Internal" + } +} + +If.fmicname { Condition { Type ControlExists Control "name='Front Mic Playback Switch'" } - True { + True.Define { + FrontMicName "Front" + } +} + +If.fmic { + Condition { + Type String + Empty "${var:FrontMicName}" + } + False { If.mic2 { Condition { Type String @@ -213,7 +234,7 @@ If.frontmic { Empty "${var:DeviceFrontMic}" } False.SectionDevice."${var:DeviceFrontMic}" { - Comment "Front Stereo Microphone" + Comment "${var:FrontMicName} Stereo Microphone" ConflictingDevice [ "${var:DeviceMic}" @@ -222,8 +243,8 @@ If.frontmic { Value { CapturePriority 400 Include.value.File "/HDA/HDA-Capture-value.conf" - CaptureMasterElem "Front Mic Boost" - JackControl "Front Mic Jack" + CaptureMasterElem "${var:FrontMicName} Mic Boost" + JackControl "${var:FrontMicName} Mic Jack" } } }