TPLG: Change volume capture pipeline gain range to -50 .. +30 dB

This patch replaces the -64 to 0 dB volume scale for capture with
more practical -50 to +30 dB gain. The step is 1 dB. It allows to
compensate for different microphone model sensitivities when constant
acoustical decibels to digital decibels level is needed in a
microphone capture application.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2019-04-16 17:34:09 +03:00 committed by Janusz Jankowski
parent 4c6f6f7b48
commit 90a6efd154
3 changed files with 15 additions and 5 deletions

View File

@ -12,3 +12,13 @@ SectionTLV."vtlv_m90s3" {
mute "1" mute "1"
} }
} }
SectionTLV."vtlv_m50s1" {
Comment "-50dB step 1dB"
scale {
min "-5000"
step "100"
mute "1"
}
}

View File

@ -33,14 +33,14 @@ dnl frames, deadline, priority, core)
# Passthrough capture pipeline 6 on PCM 6 using max channels defined by CHANNELS. # Passthrough capture pipeline 6 on PCM 6 using max channels defined by CHANNELS.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0 # Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
6, 6, CHANNELS, s32le, 6, 6, CHANNELS, s32le,
48, 1000, 0, 0) 48, 1000, 0, 0)
# Passthrough capture pipeline 7 on PCM 7 using max channels defined by CHANNELS. # Passthrough capture pipeline 7 on PCM 7 using max channels defined by CHANNELS.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0 # Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-passthrough-capture.m4, PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
7, 7, CHANNELS, s16le, 7, 7, CHANNELS, s32le,
48, 1000, 0, 0) 48, 1000, 0, 0)
# #

View File

@ -19,9 +19,9 @@ include(`pipeline.m4')
# Volume Mixer control with max value of 32 # Volume Mixer control with max value of 32
C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID, C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
CONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256), CONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256),
CONTROLMIXER_MAX(, 32), CONTROLMIXER_MAX(, 80),
false, false,
CONTROLMIXER_TLV(TLV 32 steps from -90dB to +6dB for 3dB, vtlv_m90s3), CONTROLMIXER_TLV(TLV 80 steps from -50dB to +30dB for 1dB, vtlv_m50s1),
Channel register and shift for Front Left/Right, Channel register and shift for Front Left/Right,
LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1))) LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))