topology: sof: add pipe-volume-capture-16khz.m4

DMIC16k only supports 16000Hz sample rate. pipe-volume-capture.m4
only supports 48000Hz. Add pipe-volume-capture-16khz.m4 to support 16KHz
record.

Signed-off-by: Libin Yang <libin.yang@intel.com>
This commit is contained in:
Libin Yang 2019-04-25 13:43:20 +08:00 committed by Tomasz Lauda
parent d30538396d
commit 55d1f5ac81
1 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,71 @@
# Passthrough with volume Pipeline and PCM
# This is a temporary solution. After FW supports the
# refinement of sample rate, this file will be removed
# and the default will support all kinds of sample rates.
#
# Pipeline Endpoints for connection are :-
#
# host PCM_C <-- B0 <-- Volume 0 <-- B1 <-- source DAI0
# Include topology builder
include(`utils.m4')
include(`buffer.m4')
include(`pcm.m4')
include(`pga.m4')
include(`dai.m4')
include(`mixercontrol.m4')
include(`pipeline.m4')
#
# Controls
#
# Volume Mixer control with max value of 32
C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
CONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256),
CONTROLMIXER_MAX(, 80),
false,
CONTROLMIXER_TLV(TLV 80 steps from -50dB to +30dB for 1dB, vtlv_m50s1),
Channel register and shift for Front Left/Right,
LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))
#
# Components and Buffers
#
# Host "Passthrough Capture" PCM
# with 0 sink and 2 source periods
W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2)
# "Volume" has 2 source and 2 sink periods
W_PGA(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "PIPELINE_ID Master Capture Volume"))
# Capture Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(2,
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES),
PLATFORM_HOST_MEM_CAP)
W_BUFFER(1, COMP_BUFFER_SIZE(2,
COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES),
PLATFORM_DAI_MEM_CAP)
#
# Pipeline Graph
#
# host PCM_P <-- B0 <-- Volume 0 <-- B1 <-- sink DAI0
P_GRAPH(pipe-pass-vol-capture-PIPELINE_ID, PIPELINE_ID,
LIST(` ',
`dapm(N_PCMC(PCM_ID), N_BUFFER(0))',
`dapm(N_BUFFER(0), N_PGA(0))',
`dapm(N_PGA(0), N_BUFFER(1))'))
#
# Pipeline Source and Sinks
#
indir(`define', concat(`PIPELINE_SINK_', PIPELINE_ID), N_BUFFER(1))
indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Capture PCM_ID)
#
# PCM Configuration
#
PCM_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 16000, 16000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)