1#
2# Topology for pass through pipeline
3#
4
5# Include topology builder
6include(`utils.m4')
7include(`dai.m4')
8include(`ssp.m4')
9include(`dmic.m4')
10include(`pipeline.m4')
11
12# Include TLV library
13include(`common/tlv.m4')
14
15# Include Token library
16include(`sof/tokens.m4')
17
18# Include Apollolake DSP configuration
19include(`platform/intel/bxt.m4')
20
21DEBUG_START
22
23# Define the algorithm configurations blobs to apply such as filter coefficients
24include(`test_pipeline_filters.m4')
25
26#
27# Machine Specific Config - !! MUST BE SET TO MATCH TEST MACHINE DRIVER !!
28#
29# TEST_PIPE_NAME - Pipe name
30# TEST_DAI_LINK_NAME - BE DAI link name e.g. "NoCodec"
31# TEST_DAI_PORT	- SSP port number e.g. 2
32# TEST_DAI_FORMAT - SSP data format e.g s16le
33# TEST_PIPE_FORMAT - Pipeline format e.g. s16le
34# TEST_SSP_MCLK - SSP MCLK in Hz
35# TEST_SSP_BCLK - SSP BCLK in Hz
36# TEST_SSP_PHY_BITS - SSP physical slot size
37# TEST_SSP_DATA_BITS - SSP data slot size
38# TEST_SSP_MODE - SSP mode e.g. I2S, LEFT_J, DSP_A and DSP_B
39#
40
41#
42# Define the pipeline
43#
44# PCM0C  <--  TEST_PIPE_NAME  <--  SSP TEST_DAI_PORT
45#
46
47# Capture pipeline 2 on PCM 0 using max 2 channels of s32le.
48# 1000us deadline on core 0 with priority 0
49PIPELINE_PCM_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4,
50	2, 0, 2, s32le,
51	1000, 0, 0,
52	8000, 192000, 48000)
53
54#
55# DAI configuration
56#
57# SSP port TEST_DAI_PORT is our only pipeline DAI
58
59# Use 3 periods for SRC DAI buffer, otherwise 2 periods
60ifelse(TEST_PIPE_NAME, `src', `define(TEST_DAI_PERIODS, `3')', `define(TEST_DAI_PERIODS, `2')')
61
62# capture DAI is SSP TEST_DAI_PORT using TEST_DAI_PERIODS periods
63# schedule 1000us on core 0 with priority 0
64DAI_ADD(sof/pipe-dai-capture.m4,
65	2, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME,
66	PIPELINE_SINK_2, TEST_DAI_PERIODS, TEST_DAI_FORMAT,
67	1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
68
69# PCM Passthrough
70PCM_CAPTURE_ADD(Passthrough, 0, PIPELINE_PCM_2)
71
72#
73# BE configurations - overrides config in ACPI if present
74#
75# Clocks masters wrt codec
76#
77# TEST_SSP_DATA_BITS bit I2S
78# using TEST_SSP_PHY_BITS bit sample container on SSP TEST_DAI_PORT
79#
80DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, 0, TEST_DAI_LINK_NAME,
81	   ifelse(TEST_DAI_TYPE, `SSP',
82		  SSP_CONFIG(TEST_SSP_MODE,
83			     SSP_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in),
84			     SSP_CLOCK(bclk, TEST_SSP_BCLK, codec_slave),
85			     SSP_CLOCK(fsync, 48000, codec_slave),
86			     SSP_TDM(2, TEST_SSP_PHY_BITS, 3, 3),
87			     SSP_CONFIG_DATA(TEST_DAI_TYPE, TEST_DAI_PORT,
88					     TEST_SSP_DATA_BITS, TEST_SSP_MCLK_ID)),
89		  TEST_DAI_TYPE, `DMIC',
90		  DMIC_CONFIG(TEST_DMIC_DRIVER_VERSION, TEST_DMIC_CLK_MIN,
91			      TEST_DMIC_CLK_MAX, TEST_DMIC_DUTY_MIN,
92			      TEST_DMIC_DUTY_MAX, TEST_DMIC_SAMPLE_RATE,
93			      DMIC_WORD_LENGTH(TEST_DAI_FORMAT), TEST_DMIC_UNMUTE_TIME,
94			      TEST_DAI_TYPE, TEST_DAI_PORT,
95			      PDM_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT,
96					 TEST_DMIC_PDM_CONFIG)),
97		  `'))
98
99DEBUG_END
100