aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-03-08 23:05:52 +0100
committerJaroslav Kysela <perex@perex.cz>2021-03-10 11:04:01 +0100
commitaa5eb452b45dc322344e797d3b31274ba5a055bd (patch)
treee317ad52eadad7cf85754293e12130ab1935f87c
parent3df03f08d5f3f60719a73e9962aa3e4caea11b32 (diff)
codecs/rt5640: Unify capture volume for AIF1 and AIF2 recording paths
The rt5640 codec is sometimes used with AIF1 connected to the SoC and sometimes with AIF2 connected to the SoC. The rt5640 UCM configuration deals with this by accepting input from and sending output to both AIFs, relying on the kernels DAPM framework to disable parts of the graph which are connected to the unconnected AIF. Before this commit codecs/rt5640/EnableSeq.conf was adding a +9dB (digital) boost to recording going through the 'ADC' path to AIF1, while not touching the 'Mono ADC' path to AIF2. This was causing recordings on devices using AIF2 to be somewhat soft. This commit unifies the record volume control settings for both paths by only using the '[Mono ]ADC Capture Volume' control, which is present in both paths and setting it to +9dB on both paths. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--ucm2/codecs/rt5640/EnableSeq.conf12
1 files changed, 8 insertions, 4 deletions
diff --git a/ucm2/codecs/rt5640/EnableSeq.conf b/ucm2/codecs/rt5640/EnableSeq.conf
index 223cceb..49703ae 100644
--- a/ucm2/codecs/rt5640/EnableSeq.conf
+++ b/ucm2/codecs/rt5640/EnableSeq.conf
@@ -39,10 +39,14 @@ EnableSequence [
cset "name='Mono ADC R2 Mux' DMIC R1"
cset "name='Mono ADC Capture Switch' on"
- # 47=0dB, 0.375 dB/step, set it to 6 dB to help with soft mics
- cset "name='ADC Capture Volume' 63"
- # Set ADC Boost Gain to 3dB higher vals result in too much noise
- cset "name='ADC Boost Gain' 1"
+ # 47=0dB, 0.375 dB/step, set it to 9 dB to help with soft mics
+ cset "name='ADC Capture Volume' 71"
+ cset "name='Mono ADC Capture Volume' 71"
+
+ # The second 'Mono ADC' path does not have a 'Boost Gain',
+ # set this to 0dB so that the volume of the AIF1 and AIF2 paths is equal.
+ cset "name='ADC Boost Gain' 0"
+
# Set IN1/IN3 internal mic boost to 8 (max)
# Set IN2 headset-mic boost to 1, headset mics are quite loud
cset "name='IN1 Boost' 8"