mirror of https://github.com/thesofproject/sof.git
tools: topology: Add crossover topology files
This commit adds the topology files for the crossover component. The control bytes are generated by the tools in tune/crossover. Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This commit is contained in:
parent
7df7c0ff9d
commit
3bea8a7b3e
|
@ -0,0 +1,61 @@
|
|||
divert(-1)
|
||||
|
||||
dnl Define macro for crossover widget
|
||||
DECLARE_SOF_RT_UUID("crossover", crossover_uuid, 0x948c9ad1, 0x806a, 0x4131,
|
||||
0xad, 0x6c, 0xb2, 0xbd, 0xa9, 0xe3, 0x5a, 0x9f)
|
||||
|
||||
dnl N_CROSSOVER(name)
|
||||
define(`N_CROSSOVER', `CROSSOVER'PIPELINE_ID`.'$1)
|
||||
|
||||
dnl W_CROSSOVER(name, format, periods_sink, periods_source, kcontrol_list)
|
||||
define(`W_CROSSOVER',
|
||||
`SectionVendorTuples."'N_CROSSOVER($1)`_tuples_uuid" {'
|
||||
` tokens "sof_comp_tokens"'
|
||||
` tuples."uuid" {'
|
||||
` SOF_TKN_COMP_UUID' STR(crossover_uuid)
|
||||
` }'
|
||||
`}'
|
||||
`SectionData."'N_CROSSOVER($1)`_data_uuid" {'
|
||||
` tuples "'N_CROSSOVER($1)`_tuples_uuid"'
|
||||
`}'
|
||||
`SectionVendorTuples."'N_CROSSOVER($1)`_tuples_w" {'
|
||||
` tokens "sof_comp_tokens"'
|
||||
` tuples."word" {'
|
||||
` SOF_TKN_COMP_PERIOD_SINK_COUNT' STR($3)
|
||||
` SOF_TKN_COMP_PERIOD_SOURCE_COUNT' STR($4)
|
||||
` }'
|
||||
`}'
|
||||
`SectionData."'N_CROSSOVER($1)`_data_w" {'
|
||||
` tuples "'N_CROSSOVER($1)`_tuples_w"'
|
||||
`}'
|
||||
`SectionVendorTuples."'N_CROSSOVER($1)`_tuples_str" {'
|
||||
` tokens "sof_comp_tokens"'
|
||||
` tuples."string" {'
|
||||
` SOF_TKN_COMP_FORMAT' STR($2)
|
||||
` }'
|
||||
`}'
|
||||
`SectionVendorTuples."'N_CROSSOVER($1)`_crossover_process_tuples_str" {'
|
||||
` tokens "sof_process_tokens"'
|
||||
` tuples."string" {'
|
||||
` SOF_TKN_PROCESS_TYPE' "CROSSOVER"
|
||||
` }'
|
||||
`}'
|
||||
`SectionData."'N_CROSSOVER($1)`_data_str" {'
|
||||
` tuples "'N_CROSSOVER($1)`_tuples_str"'
|
||||
` tuples "'N_CROSSOVER($1)`_crossover_process_tuples_str"'
|
||||
`}'
|
||||
`SectionWidget."'N_CROSSOVER($1)`" {'
|
||||
` index "'PIPELINE_ID`"'
|
||||
` type "effect"'
|
||||
` no_pm "true"'
|
||||
` data ['
|
||||
` "'N_CROSSOVER($1)`_data_uuid"'
|
||||
` "'N_CROSSOVER($1)`_data_w"'
|
||||
` "'N_CROSSOVER($1)`_data_str"'
|
||||
` ]'
|
||||
` bytes ['
|
||||
$5
|
||||
` ]'
|
||||
`}')
|
||||
|
||||
divert(0)dnl
|
|
@ -0,0 +1,19 @@
|
|||
# Exported Control Bytes 17-Apr-2020
|
||||
CONTROLBYTES_PRIV(CROSSOVER_priv,
|
||||
` bytes "0x53,0x4f,0x46,0x00,0x00,0x00,0x00,0x00,'
|
||||
` 0x60,0x00,0x00,0x00,0x00,0xf0,0x00,0x03,'
|
||||
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
|
||||
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
|
||||
` 0x60,0x00,0x00,0x00,0x02,0x00,0x00,0x00,'
|
||||
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
|
||||
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
|
||||
` 0x01,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,'
|
||||
` 0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00,'
|
||||
` 0x8e,0x6f,0xa8,0xc5,0xb3,0x81,0x14,0x7a,'
|
||||
` 0xb0,0xc3,0x10,0x00,0x5f,0x87,0x21,0x00,'
|
||||
` 0xb0,0xc3,0x10,0x00,0x00,0x00,0x00,0x00,'
|
||||
` 0x00,0x40,0x00,0x00,0x8e,0x6f,0xa8,0xc5,'
|
||||
` 0xb3,0x81,0x14,0x7a,0x89,0x04,0x1b,0x3d,'
|
||||
` 0xee,0xf6,0xc9,0x85,0x89,0x04,0x1b,0x3d,'
|
||||
` 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00"'
|
||||
)
|
|
@ -0,0 +1,83 @@
|
|||
# Crossover Volume Pipeline
|
||||
#
|
||||
# Low Latency Playback with demux and volume.
|
||||
#
|
||||
# Pipeline Endpoints for connection are :
|
||||
#
|
||||
# B2 (DAI buffer)
|
||||
# Playback Crossover
|
||||
#
|
||||
# host PCM_P -- B0 --> Crossover 0 --> B1 ---> DAI0
|
||||
# |
|
||||
# pipeline n+1 --> DAI
|
||||
|
||||
# Include topology builder
|
||||
include(`utils.m4')
|
||||
include(`buffer.m4')
|
||||
include(`pcm.m4')
|
||||
include(`crossover.m4')
|
||||
include(`bytecontrol.m4')
|
||||
|
||||
#
|
||||
# Controls for Crossover
|
||||
#
|
||||
|
||||
define(CROSSOVER_priv, concat(`crossover_bytes_', PIPELINE_ID))
|
||||
define(MY_CROSSOVER_CTRL, concat(`crossover_control_', PIPELINE_ID))
|
||||
include(`crossover_coef_default.m4')
|
||||
C_CONTROLBYTES(MY_CROSSOVER_CTRL, PIPELINE_ID,
|
||||
CONTROLBYTES_OPS(bytes, 258 binds the control to bytes get/put handlers, 258, 258),
|
||||
CONTROLBYTES_EXTOPS(258 binds the control to bytes get/put handlers, 258, 258),
|
||||
, , ,
|
||||
CONTROLBYTES_MAX(, 1024),
|
||||
,
|
||||
CROSSOVER_priv)
|
||||
|
||||
#
|
||||
# Components and Buffers
|
||||
#
|
||||
|
||||
# Host "Low latency Playback" PCM
|
||||
# with 2 sink and 0 source periods
|
||||
W_PCM_PLAYBACK(PCM_ID, Low Latency Playback, 2, 0)
|
||||
|
||||
# Crossover filter has 2 sink and source periods. TODO for controls
|
||||
W_CROSSOVER(0, PIPELINE_FORMAT, 2, 2, LIST(` ', "MY_CROSSOVER_CTRL"))
|
||||
|
||||
# Low Latency 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(DAI_PERIODS,
|
||||
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
|
||||
PLATFORM_COMP_MEM_CAP)
|
||||
|
||||
|
||||
#
|
||||
# Pipeline Graph
|
||||
# host PCM_P -- B0 --> Crossover 0 --> B1 ---> DAI
|
||||
# |
|
||||
# pipeline n+1 --> DAI
|
||||
|
||||
P_GRAPH(pipe-ll-playback-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(N_BUFFER(0), N_PCMP(PCM_ID))',
|
||||
`dapm(N_CROSSOVER(0), N_BUFFER(0))',
|
||||
`dapm(N_BUFFER(1), N_CROSSOVER(0))'))
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
#
|
||||
indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(1))
|
||||
indir(`define', concat(`PIPELINE_CROSSOVER_', PIPELINE_ID), N_CROSSOVER(0))
|
||||
indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Low Latency Playback PCM_ID)
|
||||
|
||||
#
|
||||
# PCM Configuration
|
||||
#
|
||||
|
||||
|
||||
# PCM capabilities supported by FW
|
||||
PCM_CAPABILITIES(Low Latency Playback PCM_ID, `S32_LE,S24_LE,S16_LE', 48000, 48000, 2, PIPELINE_CHANNELS, 2, 16, 192, 16384, 65536, 65536)
|
||||
|
||||
undefine(`MY_CROSSOVER_CTRL')
|
||||
undefine(`CROSSOVER_priv')
|
Loading…
Reference in New Issue