[Sound-open-firmware] [PATCH V2 1/3] topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol
From: Pan Xiuli xiuli.pan@linux.intel.com
Add token SOF_TKN_DAI_LBM_KCONTROL for SSP loopback mode kcontrol
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
--- V2: Rename token Work with patch set: SOF-Kernel(7): ASoC: SOF: Add debug_mode flag in sof dev ASoC: SOF: debug: add debugmode debugfs for sof_dev debug_mode ASoC: SOF: uapi: topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol ASoC: SOF: add headers for switch control callback functions ASoC: SOF: add switch kcontrol callback functions ASoC: SOF: topology: Add DAI TOKEN string bool parser ASoC: SOF: topology: Add topology handler for dai lbm kcontrol
SOF(5): dai: add lbm status for dai ssp dai: add get_loopback_mode function DMIC: add empty get_loopback_mode function SSP: support for get/set_loopback_mode functions dai: add dai_cmd support for loopback mode switch
SOF-Tools(3): topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol topology: m4: add dai lbm kcotnrol support topology: test: Add loopback topology
test & santity test with: Mininow max rt5651 and UP2 Hifiberry PRO and CNL nocodec SOF master: 27795ece0ff9405795cef866fc28a7ab6db20d82 SOF-Tool master: bd7dc88231f31d385340310cef467f211a739eeb sof-dev: df15329163229fe3436ad914561430c20f778cf1
--- topology/sof/tokens.m4 | 1 + 1 file changed, 1 insertion(+)
diff --git a/topology/sof/tokens.m4 b/topology/sof/tokens.m4 index f0b3428..f17ed35 100644 --- a/topology/sof/tokens.m4 +++ b/topology/sof/tokens.m4 @@ -19,6 +19,7 @@ SectionVendorTokens."sof_dai_tokens" { SOF_TKN_DAI_TYPE "154" SOF_TKN_DAI_INDEX "155" SOF_TKN_DAI_SAMPLE_BITS "156" + SOF_TKN_DAI_LBM_KCONTROL "157" }
SectionVendorTokens."sof_sched_tokens" {
From: Pan Xiuli xiuli.pan@linux.intel.com
Add a new parameter for DAI_OUT to enable DAI_LBM_KCONTROL token
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
--- V2: use parameter instead of new macro Work with patch set: SOF-Kernel(7): ASoC: SOF: Add debug_mode flag in sof dev ASoC: SOF: debug: add debugmode debugfs for sof_dev debug_mode ASoC: SOF: uapi: topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol ASoC: SOF: add headers for switch control callback functions ASoC: SOF: add switch kcontrol callback functions ASoC: SOF: topology: Add DAI TOKEN string bool parser ASoC: SOF: topology: Add topology handler for dai lbm kcontrol
SOF(5): dai: add lbm status for dai ssp dai: add get_loopback_mode function DMIC: add empty get_loopback_mode function SSP: support for get/set_loopback_mode functions dai: add dai_cmd support for loopback mode switch
SOF-Tools(3): topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol topology: m4: add dai lbm kcotnrol support topology: test: Add loopback topology
test & santity test with: Mininow max rt5651 and UP2 Hifiberry PRO and CNL nocodec SOF master: 27795ece0ff9405795cef866fc28a7ab6db20d82 SOF-Tool master: bd7dc88231f31d385340310cef467f211a739eeb sof-dev: df15329163229fe3436ad914561430c20f778cf1
--- topology/m4/dai.m4 | 6 ++++-- topology/sof/pipe-dai-playback.m4 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4 index bd67413..996f54c 100644 --- a/topology/m4/dai.m4 +++ b/topology/m4/dai.m4 @@ -7,7 +7,7 @@ define(`N_DAI', DAI_NAME) define(`N_DAI_OUT', DAI_NAME`.OUT') define(`N_DAI_IN', DAI_NAME`.IN')
-dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload) +dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload, dailbmkcontrol) define(`W_DAI_OUT', `SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w_comp" {' ` tokens "sof_comp_tokens"' @@ -33,6 +33,7 @@ define(`W_DAI_OUT', ` tokens "sof_dai_tokens"' ` tuples."string" {' ` SOF_TKN_DAI_TYPE' $1 +`ifelse($8, `', `', ` SOF_TKN_DAI_LBM_KCONTROL $8')' ` }' `}' `SectionData."'N_DAI_OUT($2)`_data_str" {' @@ -252,7 +253,7 @@ define(`DAI_CONFIG', dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl frames, deadline, priority, core, lbm_kcontrol) define(`DAI_ADD', `undefine(`PIPELINE_ID')' `undefine(`DAI_TYPE')' @@ -277,6 +278,7 @@ define(`DAI_ADD', `define(`SCHEDULE_DEADLINE', $10)' `define(`SCHEDULE_PRIORITY', $11)' `define(`SCHEDULE_CORE', $12)' +`define(`DAI_LBM_KCONTROL', $13)' `include($1)' )
diff --git a/topology/sof/pipe-dai-playback.m4 b/topology/sof/pipe-dai-playback.m4 index 804b180..fda27ac 100644 --- a/topology/sof/pipe-dai-playback.m4 +++ b/topology/sof/pipe-dai-playback.m4 @@ -8,7 +8,7 @@ include(`pipeline.m4') # # DAI definitions # -W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2) +W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2, DAI_LBM_KCONTROL)
# # DAI pipeline - always use 0 for DAIs
On Wed, 2018-06-20 at 17:32 +0800, Xiuli Pan wrote:
From: Pan Xiuli xiuli.pan@linux.intel.com
Add a new parameter for DAI_OUT to enable DAI_LBM_KCONTROL token
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
V2: use parameter instead of new macro Work with patch set: SOF-Kernel(7): ASoC: SOF: Add debug_mode flag in sof dev ASoC: SOF: debug: add debugmode debugfs for sof_dev debug_mode ASoC: SOF: uapi: topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol ASoC: SOF: add headers for switch control callback functions ASoC: SOF: add switch kcontrol callback functions ASoC: SOF: topology: Add DAI TOKEN string bool parser ASoC: SOF: topology: Add topology handler for dai lbm kcontrol
SOF(5): dai: add lbm status for dai ssp dai: add get_loopback_mode function DMIC: add empty get_loopback_mode function SSP: support for get/set_loopback_mode functions dai: add dai_cmd support for loopback mode switch
SOF-Tools(3): topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol topology: m4: add dai lbm kcotnrol support topology: test: Add loopback topology
test & santity test with: Mininow max rt5651 and UP2 Hifiberry PRO and CNL nocodec SOF master: 27795ece0ff9405795cef866fc28a7ab6db20d82 SOF-Tool master: bd7dc88231f31d385340310cef467f211a739eeb sof-dev: df15329163229fe3436ad914561430c20f778cf1
topology/m4/dai.m4 | 6 ++++-- topology/sof/pipe-dai-playback.m4 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4 index bd67413..996f54c 100644 --- a/topology/m4/dai.m4 +++ b/topology/m4/dai.m4 @@ -7,7 +7,7 @@ define(`N_DAI', DAI_NAME) define(`N_DAI_OUT', DAI_NAME`.OUT') define(`N_DAI_IN', DAI_NAME`.IN')
-dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload) +dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload, dailbmkcontrol)
Lets just call this new param "flags". It can be a bitmask. i.e.
define(`DAI_FLAGS_KCTRL_LOOPBACK', 1) define(`DAI_FLAGS_KCTRL_TRISTATE', 2)
etc
define(`W_DAI_OUT', `SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w_comp" {' ` tokens "sof_comp_tokens"' @@ -33,6 +33,7 @@ define(`W_DAI_OUT', ` tokens "sof_dai_tokens"' ` tuples."string" {' ` SOF_TKN_DAI_TYPE' $1 +`ifelse($8, `', `', ` SOF_TKN_DAI_LBM_KCONTROL $8')'
and then if we change the token name to SOF_TKN_DAI_KCTRL_FLAGS we can assign it directly and the driver can then check the flags for which kcontrols to create.
Liam
` }' `}' `SectionData."'N_DAI_OUT($2)`_data_str" {' @@ -252,7 +253,7 @@ define(`DAI_CONFIG', dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl frames, deadline, priority, core, lbm_kcontrol) define(`DAI_ADD', `undefine(`PIPELINE_ID')' `undefine(`DAI_TYPE')' @@ -277,6 +278,7 @@ define(`DAI_ADD', `define(`SCHEDULE_DEADLINE', $10)' `define(`SCHEDULE_PRIORITY', $11)' `define(`SCHEDULE_CORE', $12)' +`define(`DAI_LBM_KCONTROL', $13)' `include($1)' )
diff --git a/topology/sof/pipe-dai-playback.m4 b/topology/sof/pipe-dai- playback.m4 index 804b180..fda27ac 100644 --- a/topology/sof/pipe-dai-playback.m4 +++ b/topology/sof/pipe-dai-playback.m4 @@ -8,7 +8,7 @@ include(`pipeline.m4') # # DAI definitions # -W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2) +W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2, DAI_LBM_KCONTROL)
# # DAI pipeline - always use 0 for DAIs
--------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
On Wed, 2018-06-20 at 17:32 +0800, Xiuli Pan wrote:
From: Pan Xiuli xiuli.pan@linux.intel.com
Add a new parameter for DAI_OUT to enable DAI_LBM_KCONTROL token
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
V2: use parameter instead of new macro Work with patch set: SOF-Kernel(7): ASoC: SOF: Add debug_mode flag in sof dev ASoC: SOF: debug: add debugmode debugfs for sof_dev debug_mode ASoC: SOF: uapi: topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol ASoC: SOF: add headers for switch control callback functions ASoC: SOF: add switch kcontrol callback functions ASoC: SOF: topology: Add DAI TOKEN string bool parser ASoC: SOF: topology: Add topology handler for dai lbm kcontrol
SOF(5): dai: add lbm status for dai ssp dai: add get_loopback_mode function DMIC: add empty get_loopback_mode function SSP: support for get/set_loopback_mode functions dai: add dai_cmd support for loopback mode switch
SOF-Tools(3): topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol topology: m4: add dai lbm kcotnrol support topology: test: Add loopback topology
test & santity test with: Mininow max rt5651 and UP2 Hifiberry PRO and CNL nocodec SOF master: 27795ece0ff9405795cef866fc28a7ab6db20d82 SOF-Tool master: bd7dc88231f31d385340310cef467f211a739eeb sof-dev: df15329163229fe3436ad914561430c20f778cf1
topology/m4/dai.m4 | 6 ++++-- topology/sof/pipe-dai-playback.m4 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4 index bd67413..996f54c 100644 --- a/topology/m4/dai.m4 +++ b/topology/m4/dai.m4 @@ -7,7 +7,7 @@ define(`N_DAI', DAI_NAME) define(`N_DAI_OUT', DAI_NAME`.OUT') define(`N_DAI_IN', DAI_NAME`.IN')
-dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload) +dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload, dailbmkcontrol)
Does the last argument have be a bool true/false value or can it be 0 or 1? Does the parser in the driver handle both cases? If not, could you please make it explicit here?
define(`W_DAI_OUT', `SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w_comp" {' ` tokens "sof_comp_tokens"' @@ -33,6 +33,7 @@ define(`W_DAI_OUT', ` tokens "sof_dai_tokens"' ` tuples."string" {' ` SOF_TKN_DAI_TYPE' $1 +`ifelse($8, `', `', ` SOF_TKN_DAI_LBM_KCONTROL $8') ' ` }' `}' `SectionData."'N_DAI_OUT($2)`_data_str" {' @@ -252,7 +253,7 @@ define(`DAI_CONFIG', dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl frames, deadline, priority, core, lbm_kcontrol) define(`DAI_ADD', `undefine(`PIPELINE_ID')' `undefine(`DAI_TYPE')' @@ -277,6 +278,7 @@ define(`DAI_ADD', `define(`SCHEDULE_DEADLINE', $10)' `define(`SCHEDULE_PRIORITY', $11)' `define(`SCHEDULE_CORE', $12)' +`define(`DAI_LBM_KCONTROL', $13)' `include($1)' )
diff --git a/topology/sof/pipe-dai-playback.m4 b/topology/sof/pipe- dai-playback.m4 index 804b180..fda27ac 100644 --- a/topology/sof/pipe-dai-playback.m4 +++ b/topology/sof/pipe-dai-playback.m4 @@ -8,7 +8,7 @@ include(`pipeline.m4') # # DAI definitions # -W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2) +W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2, DAI_LBM_KCONTROL)
# # DAI pipeline - always use 0 for DAIs
On 6/21/2018 07:49, Ranjani Sridharan wrote:
On Wed, 2018-06-20 at 17:32 +0800, Xiuli Pan wrote:
From: Pan Xiuli xiuli.pan@linux.intel.com
Add a new parameter for DAI_OUT to enable DAI_LBM_KCONTROL token
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
V2: use parameter instead of new macro Work with patch set: SOF-Kernel(7): ASoC: SOF: Add debug_mode flag in sof dev ASoC: SOF: debug: add debugmode debugfs for sof_dev debug_mode ASoC: SOF: uapi: topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol ASoC: SOF: add headers for switch control callback functions ASoC: SOF: add switch kcontrol callback functions ASoC: SOF: topology: Add DAI TOKEN string bool parser ASoC: SOF: topology: Add topology handler for dai lbm kcontrol
SOF(5): dai: add lbm status for dai ssp dai: add get_loopback_mode function DMIC: add empty get_loopback_mode function SSP: support for get/set_loopback_mode functions dai: add dai_cmd support for loopback mode switch
SOF-Tools(3): topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol topology: m4: add dai lbm kcotnrol support topology: test: Add loopback topology
test & santity test with: Mininow max rt5651 and UP2 Hifiberry PRO and CNL nocodec SOF master: 27795ece0ff9405795cef866fc28a7ab6db20d82 SOF-Tool master: bd7dc88231f31d385340310cef467f211a739eeb sof-dev: df15329163229fe3436ad914561430c20f778cf1
topology/m4/dai.m4 | 6 ++++-- topology/sof/pipe-dai-playback.m4 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4 index bd67413..996f54c 100644 --- a/topology/m4/dai.m4 +++ b/topology/m4/dai.m4 @@ -7,7 +7,7 @@ define(`N_DAI', DAI_NAME) define(`N_DAI_OUT', DAI_NAME`.OUT') define(`N_DAI_IN', DAI_NAME`.IN')
-dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload) +dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload, dailbmkcontrol)
Does the last argument have be a bool true/false value or can it be 0 or 1? Does the parser in the driver handle both cases? If not, could you please make it explicit here?
Will add some readme and comment later. Now it seems we did not have an agreement about the implement.
Thanks Xiuli
define(`W_DAI_OUT', `SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w_comp" {' ` tokens "sof_comp_tokens"' @@ -33,6 +33,7 @@ define(`W_DAI_OUT', ` tokens "sof_dai_tokens"' ` tuples."string" {' ` SOF_TKN_DAI_TYPE' $1 +`ifelse($8, `', `', ` SOF_TKN_DAI_LBM_KCONTROL $8') ' ` }' `}' `SectionData."'N_DAI_OUT($2)`_data_str" {' @@ -252,7 +253,7 @@ define(`DAI_CONFIG', dnl DAI_ADD(pipeline, dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, -dnl frames, deadline, priority, core) +dnl frames, deadline, priority, core, lbm_kcontrol) define(`DAI_ADD', `undefine(`PIPELINE_ID')' `undefine(`DAI_TYPE')' @@ -277,6 +278,7 @@ define(`DAI_ADD', `define(`SCHEDULE_DEADLINE', $10)' `define(`SCHEDULE_PRIORITY', $11)' `define(`SCHEDULE_CORE', $12)' +`define(`DAI_LBM_KCONTROL', $13)' `include($1)' )
diff --git a/topology/sof/pipe-dai-playback.m4 b/topology/sof/pipe- dai-playback.m4 index 804b180..fda27ac 100644 --- a/topology/sof/pipe-dai-playback.m4 +++ b/topology/sof/pipe-dai-playback.m4 @@ -8,7 +8,7 @@ include(`pipeline.m4') # # DAI definitions # -W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2) +W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2, DAI_LBM_KCONTROL)
# # DAI pipeline - always use 0 for DAIs
From: Pan Xiuli xiuli.pan@linux.intel.com
loopback topology will have a token to let driver create a kcontrol for the dai loopback mode.
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
--- Work with patch set: SOF-Kernel(7): ASoC: SOF: Add debug_mode flag in sof dev ASoC: SOF: debug: add debugmode debugfs for sof_dev debug_mode ASoC: SOF: uapi: topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol ASoC: SOF: add headers for switch control callback functions ASoC: SOF: add switch kcontrol callback functions ASoC: SOF: topology: Add DAI TOKEN string bool parser ASoC: SOF: topology: Add topology handler for dai lbm kcontrol
SOF(5): dai: add lbm status for dai ssp dai: add get_loopback_mode function DMIC: add empty get_loopback_mode function SSP: support for get/set_loopback_mode functions dai: add dai_cmd support for loopback mode switch
SOF-Tools(3): topology: Add SOF_TKN_DAI_LBM_KCONTROL for ssp loopback mode kcontrol topology: m4: add dai lbm kcotnrol support topology: test: Add loopback topology
test & santity test with: Mininow max rt5651 and UP2 Hifiberry PRO and CNL nocodec SOF master: 27795ece0ff9405795cef866fc28a7ab6db20d82 SOF-Tool master: bd7dc88231f31d385340310cef467f211a739eeb sof-dev: df15329163229fe3436ad914561430c20f778cf1
--- topology/test/test-loopback.m4 | 94 ++++++++++++++++++++++++++++++++++++++++++ topology/test/tplg-build.sh | 2 +- 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 topology/test/test-loopback.m4
diff --git a/topology/test/test-loopback.m4 b/topology/test/test-loopback.m4 new file mode 100644 index 0000000..1db8acc --- /dev/null +++ b/topology/test/test-loopback.m4 @@ -0,0 +1,94 @@ +# +# Topology for pass through pipeline +# + +# Include topology builder +include(`dai.m4') +include(`utils.m4') +include(`pipeline.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Baytrail DSP configuration +include(`dsps/byt.m4') + +# +# Machine Specific Config - !! MUST BE SET TO MATCH TEST MACHINE DRIVER !! +# +# TEST_PIPE_NAME - Pipe name +# TEST_DAI_LINK_NAME - BE DAI link name e.g. "NoCodec" +# TEST_DAI_PORT - SSP port number e.g. 2 +# TEST_DAI_FORMAT - SSP data format e.g s16le +# TEST_PIPE_FORMAT - Pipeline format e.g. s16le +# TEST_SSP_MCLK - SSP BCLK in Hz +# TEST_SSP_BCLK - SSP BCLK in Hz +# TEST_SSP_PHY_BITS - SSP physical slot size +# TEST_SSP_DATA_BITS - SSP data slot size +# TEST_SSP_MODE - SSP mode e.g. I2S, LEFT_J, DSP_A and DSP_B +# + +# +# Define the pipeline +# +# PCM0 <-- TEST_PIPE_NAME pipe --> SSP TEST_DAI_PORT +# + +# Passthrough playback pipeline 1 on PCM 0 using max 2 channels of s24le. +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 + +PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4, + 1, 0, 2, TEST_PIPE_FORMAT, + 48, 1000, 0, 0, + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2) + + +# Passthrough playback pipeline 2 on PCM 0 using max 2 channels of s24le. +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 + +PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, + 2, 0, 2, TEST_PIPE_FORMAT, + 48, 1000, 0, 0, + TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2) + +# +# DAI configuration +# +# SSP port TEST_DAI_PORT is our only pipeline DAI +# + +# playback DAI is SSP TEST_DAI_PORT using 2 periods +# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-playback.m4, + 1, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, + PIPELINE_SOURCE_1, 2, TEST_DAI_FORMAT, + 48, 1000, 0, 0, "TRUE") + +# capture DAI is SSP TEST_DAI_PORT using 2 periods +# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 2, TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_LINK_NAME, + PIPELINE_SINK_2, 2, TEST_DAI_FORMAT, + 48, 1000, 0, 0) + +# PCM Passthrough +PCM_DUPLEX_ADD(Passthrough, 3, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) + +# +# BE configurations - overrides config in ACPI if present +# +# Clocks masters wrt codec +# +# TEST_SSP_DATA_BITS bit I2S using TEST_SSP_PHY_BITS bit sample conatiner on SSP TEST_DAI_PORT +# +DAI_CONFIG(TEST_DAI_TYPE, TEST_DAI_PORT, 0, TEST_DAI_LINK_NAME, + SSP_CONFIG(TEST_SSP_MODE, + DAI_CLOCK(mclk, TEST_SSP_MCLK, codec_mclk_in), + DAI_CLOCK(bclk, TEST_SSP_BCLK, codec_slave), + DAI_CLOCK(fsync, 48000, codec_slave), + DAI_TDM(2, TEST_SSP_PHY_BITS, 3, 3), + SSP_SAMPLE_BITS(TEST_DAI_TYPE, TEST_DAI_PORT, + TEST_SSP_DATA_BITS))) diff --git a/topology/test/tplg-build.sh b/topology/test/tplg-build.sh index 6721768..facbe17 100755 --- a/topology/test/tplg-build.sh +++ b/topology/test/tplg-build.sh @@ -12,7 +12,7 @@ export M4PATH="../:../m4:../common"
# Simple component test cases # can be used on components with 1 sink and 1 source. -SIMPLE_TESTS=(test-all test-capture test-playback) +SIMPLE_TESTS=(test-all test-capture test-playback test-loopback) TONE_TEST=test-tone-playback DMIC_TEST=test-capture TEST_STRINGS=""
participants (4)
-
Liam Girdwood
-
Pan, Xiuli
-
Ranjani Sridharan
-
Xiuli Pan