2017-12-12 06:03:24 +08:00
|
|
|
# Passthrough with volume Pipeline and PCM
|
|
|
|
#
|
|
|
|
# Pipeline Endpoints for connection are :-
|
|
|
|
#
|
|
|
|
# host PCM_C <-- B0 <-- Volume 0 <-- B1 <-- source DAI0
|
|
|
|
|
|
|
|
# Include topology builder
|
2018-03-06 06:17:12 +08:00
|
|
|
include(`utils.m4')
|
|
|
|
include(`buffer.m4')
|
|
|
|
include(`pcm.m4')
|
|
|
|
include(`pga.m4')
|
|
|
|
include(`dai.m4')
|
|
|
|
include(`mixercontrol.m4')
|
|
|
|
include(`pipeline.m4')
|
2017-12-12 06:03:24 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Controls
|
|
|
|
#
|
2018-03-06 05:58:29 +08:00
|
|
|
# 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(, 32),
|
|
|
|
false,
|
|
|
|
CONTROLMIXER_TLV(TLV 32 steps from -90dB to +6dB for 3dB, vtlv_m90s3),
|
|
|
|
Channel register and shift for Front Left/Right,
|
|
|
|
LIST(` ', KCONTROL_CHANNEL(FL, 1, 0), KCONTROL_CHANNEL(FR, 1, 1)))
|
2017-12-12 06:03:24 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Components and Buffers
|
|
|
|
#
|
|
|
|
|
2018-06-13 04:01:56 +08:00
|
|
|
# Host "Passthrough Capture" PCM
|
2017-12-12 06:03:24 +08:00
|
|
|
# with 0 sink and 2 source periods
|
2018-06-13 04:01:56 +08:00
|
|
|
W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2, 2)
|
2017-12-12 06:03:24 +08:00
|
|
|
|
|
|
|
# "Volume" has 2 source and 2 sink periods
|
2018-03-28 20:43:20 +08:00
|
|
|
W_PGA(0, PIPELINE_FORMAT, 2, 2, 2, LIST(` ', "Master Capture Volume PIPELINE_ID"))
|
2017-12-12 06:03:24 +08:00
|
|
|
|
2018-02-10 01:36:21 +08:00
|
|
|
# Capture Buffers
|
2017-12-12 06:03:24 +08:00
|
|
|
W_BUFFER(0, COMP_BUFFER_SIZE(2,
|
2018-03-05 21:38:12 +08:00
|
|
|
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES),
|
|
|
|
PLATFORM_HOST_MEM_CAP)
|
2017-12-12 06:03:24 +08:00
|
|
|
W_BUFFER(1, COMP_BUFFER_SIZE(2,
|
2018-03-05 21:38:12 +08:00
|
|
|
COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES),
|
|
|
|
PLATFORM_DAI_MEM_CAP)
|
2017-12-12 06:03:24 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Pipeline Graph
|
|
|
|
#
|
|
|
|
# host PCM_P <-- B0 <-- Volume 0 <-- B1 <-- sink DAI0
|
|
|
|
|
2018-03-06 05:58:30 +08:00
|
|
|
P_GRAPH(pipe-pass-vol-capture-PIPELINE_ID, PIPELINE_ID,
|
|
|
|
LIST(` ',
|
2018-03-17 01:17:33 +08:00
|
|
|
`dapm(Passthrough Capture PCM_ID, N_PCMC(PCM_ID))',
|
|
|
|
`dapm(N_PCMC(PCM_ID), N_BUFFER(0))',
|
2018-03-06 05:58:30 +08:00
|
|
|
`dapm(N_BUFFER(0), N_PGA(0))',
|
|
|
|
`dapm(N_PGA(0), N_BUFFER(1))'))
|
2017-12-12 06:03:24 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
|
2018-09-22 04:19:45 +08:00
|
|
|
PCM_CAPABILITIES(Passthrough Capture PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)
|
2017-12-12 06:03:24 +08:00
|
|
|
|