forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
topology1: sof-adl-rt1019-rt5682: enable DTS playback support
Create a dts demux pipeline for Speaker playback and echoRef. Headphone dts playback can reuse the existing pipeline. Signed-off-by: Mac Chiang <[email protected]>
- Loading branch information
Showing
3 changed files
with
139 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 134 additions & 0 deletions
134
tools/topology/topology1/sof/pipe-eq-iir-dts-codec-demux-playback.m4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# Demux Volume Pipeline with DTS codec and PCM | ||
# | ||
# Pipeline Endpoints for connection are :- | ||
# | ||
# Playback Demux | ||
# B3 (DAI buffer) | ||
|
||
# | ||
# host PCM_P --> B0 --> EQ 0 --> B1 --> DTS codec --> B2 --> Demux --> B3 --> sink DAI0 | ||
# | | ||
# pipeline --> DAI | ||
|
||
# Include topology builder | ||
include(`utils.m4') | ||
include(`buffer.m4') | ||
include(`pcm.m4') | ||
include(`dai.m4') | ||
include(`pipeline.m4') | ||
include(`codec_adapter.m4') | ||
include(`bytecontrol.m4') | ||
include(`eq_iir.m4') | ||
include(`muxdemux.m4') | ||
|
||
# | ||
# Controls | ||
# | ||
|
||
# | ||
# DTS Codec | ||
# | ||
|
||
include(`dts_codec_adapter.m4') | ||
|
||
# | ||
# IIR EQ | ||
# | ||
define(DEF_EQIIR_COEF, concat(`eqiir_coef_', PIPELINE_ID)) | ||
define(DEF_EQIIR_PRIV, concat(`eqiir_priv_', PIPELINE_ID)) | ||
|
||
# define filter. eq_iir_coef_flat.m4 is set by default | ||
ifdef(`PIPELINE_FILTER1', , `define(PIPELINE_FILTER1, eq_iir_coef_flat.m4)') | ||
include(PIPELINE_FILTER1) | ||
|
||
# EQ Bytes control with max value of 255 | ||
C_CONTROLBYTES(DEF_EQIIR_COEF, PIPELINE_ID, | ||
CONTROLBYTES_OPS(bytes, 258 binds the mixer control to bytes get/put handlers, 258, 258), | ||
CONTROLBYTES_EXTOPS(258 binds the mixer control to bytes get/put handlers, 258, 258), | ||
, , , | ||
CONTROLBYTES_MAX(, 2048), | ||
, | ||
DEF_EQIIR_PRIV) | ||
|
||
# demux Bytes control with max value of 255 | ||
C_CONTROLBYTES(concat(`DEMUX', PIPELINE_ID), PIPELINE_ID, | ||
CONTROLBYTES_OPS(bytes, 258 binds the mixer control to bytes get/put handlers, 258, 258), | ||
CONTROLBYTES_EXTOPS(258 binds the mixer control to bytes get/put handlers, 258, 258), | ||
, , , | ||
CONTROLBYTES_MAX(, 304), | ||
, concat(`demux_priv_', PIPELINE_ID)) | ||
|
||
# | ||
# Components and Buffers | ||
# | ||
|
||
ifdef(`CA_SCHEDULE_CORE',`', `define(`CA_SCHEDULE_CORE', `SCHEDULE_CORE')') | ||
|
||
# Host "Playback with codec adapter" PCM | ||
# with DAI_PERIODS sink and 0 source periods | ||
W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, DAI_PERIODS, 0, SCHEDULE_CORE) | ||
|
||
W_CODEC_ADAPTER(0, PIPELINE_FORMAT, DAI_PERIODS, DAI_PERIODS, CA_SCHEDULE_CORE, | ||
LIST(` ', "CA_SETUP_CONTROLBYTES_NAME_PIPE")) | ||
|
||
# "EQ 0" has 2 sink period and 2 source periods | ||
W_EQ_IIR(0, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE, | ||
LIST(` ', "DEF_EQIIR_COEF")) | ||
|
||
# Mux 0 has 2 sink and source periods. | ||
W_MUXDEMUX(0, 1, PIPELINE_FORMAT, 2, 2, SCHEDULE_CORE, | ||
LIST(` ', concat(`DEMUX', PIPELINE_ID))) | ||
|
||
# Playback Buffers | ||
W_BUFFER(0, COMP_BUFFER_SIZE(2, | ||
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), | ||
PLATFORM_HOST_MEM_CAP) | ||
W_BUFFER(1, COMP_BUFFER_SIZE(2, | ||
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), | ||
PLATFORM_HOST_MEM_CAP) | ||
W_BUFFER(2, COMP_BUFFER_SIZE(DAI_PERIODS, | ||
COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), | ||
PLATFORM_DAI_MEM_CAP) | ||
W_BUFFER(3, COMP_BUFFER_SIZE(DAI_PERIODS, | ||
COMP_SAMPLE_SIZE(DAI_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)), | ||
PLATFORM_DAI_MEM_CAP) | ||
|
||
# | ||
# Pipeline Graph | ||
# | ||
# host PCM_P --> B0 --> EQ 0 --> B1 --> CODEC_ADAPTER -> B2 --> DEMUX --> B3 --> sink DAI0 | ||
|
||
P_GRAPH(pipe-pass-playback-PIPELINE_ID, PIPELINE_ID, | ||
LIST(` ', | ||
`dapm(N_BUFFER(0), N_PCMP(PCM_ID))', | ||
`dapm(N_EQ_IIR(0), N_BUFFER(0))', | ||
`dapm(N_BUFFER(1), N_EQ_IIR(0))', | ||
`dapm(N_CODEC_ADAPTER(0), N_BUFFER(1))', | ||
`dapm(N_BUFFER(2), N_CODEC_ADAPTER(0))' | ||
`dapm(N_MUXDEMUX(0), N_BUFFER(2))' | ||
`dapm(N_BUFFER(3), N_MUXDEMUX(0))' | ||
)) | ||
|
||
# | ||
# Pipeline Source and Sinks | ||
# | ||
indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(3)) | ||
indir(`define', concat(`PIPELINE_DEMUX_', PIPELINE_ID), N_MUXDEMUX(0)) | ||
indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Passthrough Playback PCM_ID) | ||
|
||
# | ||
# PCM Configuration | ||
# | ||
|
||
PCM_CAPABILITIES(Passthrough Playback PCM_ID, CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT), PCM_MIN_RATE, PCM_MAX_RATE, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536) | ||
|
||
undefine(`CA_SETUP_CONTROLBYTES_NAME_PIPE') | ||
undefine(`CA_SETUP_PARAMS') | ||
|
||
undefine(`CA_SCHEDULE_CORE') | ||
undefine(`CA_SETUP_CONTROLBYTES_NAME') | ||
undefine(`CA_SETUP_CONTROLBYTES_MAX') | ||
undefine(`CA_SETUP_CONTROLBYTES') | ||
|
||
undefine(`DEF_EQIIR_COEF') | ||
undefine(`DEF_EQIIR_PRIV') |