[Sound-open-firmware] [PATCH 2/3] topology: m4: Add DAI_OUT_SSP_LOOPBACK marco for SSP LOOPBACK dai comp
Xiuli Pan
xiuli.pan at linux.intel.com
Tue Jun 19 11:21:52 CEST 2018
From: Pan Xiuli <xiuli.pan at linux.intel.com>
Add new macro for SSP loobback mode support
Signed-off-by: Pan Xiuli <xiuli.pan at linux.intel.com>
---
Work with patch set:
SOF-Kernel(6):
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_SSP_LBM for ssp loopback mode
ASoC: SOF: add headers for lbm control callback functions
ASoC: SOF: add lbm kcontrol callback functions
ASoC: SOF: topology: Add topology handler for dai ssp loopback mode
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_SSP_LBM for ssp loopback mode
topology: m4: Add DAI_OUT_SSP_LOOPBACK marco for SSP LOOPBACK dai comp
topology: test: Add loopback topology
test & santity test with:
Mininow max rt5651 and UP2 Hifiberry PRO and CNL nocodec
SOF master: 48d2a1c551d7b3c8f76d44f3c04dd59a37ff6a8f
SOF-Tool master: bd7dc88231f31d385340310cef467f211a739eeb
https://github.com/plbossart/sound/tree/topic/sof-v4.14:
0d51a5ed28c5e97f09b59c4cafaddfb9d3b24b77
---
topology/m4/dai.m4 | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4
index bd67413..2a202c0 100644
--- a/topology/m4/dai.m4
+++ b/topology/m4/dai.m4
@@ -7,6 +7,61 @@ define(`N_DAI', DAI_NAME)
define(`N_DAI_OUT', DAI_NAME`.OUT')
define(`N_DAI_IN', DAI_NAME`.IN')
+dnl W_DAI_OUT_SSP_LOOPBACK(type, index, dai_link, format, periods_sink, periods_source, preload)
+define(`W_DAI_OUT_SSP_LOOPBACK',
+`SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w_comp" {'
+` tokens "sof_comp_tokens"'
+` tuples."word" {'
+` SOF_TKN_COMP_PERIOD_SINK_COUNT' STR($5)
+` SOF_TKN_COMP_PERIOD_SOURCE_COUNT' STR($6)
+` SOF_TKN_COMP_PRELOAD_COUNT' STR($7)
+` }'
+`}'
+`SectionData."'N_DAI_OUT($2)`_data_w_comp" {'
+` tuples "'N_DAI_OUT($2)`_tuples_w_comp"'
+`}'
+`SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w" {'
+` tokens "sof_dai_tokens"'
+` tuples."word" {'
+` SOF_TKN_DAI_INDEX' $2
+` }'
+`}'
+`SectionData."'N_DAI_OUT($2)`_data_w" {'
+` tuples "'N_DAI_OUT($2)`_tuples_w"'
+`}'
+`SectionVendorTuples."'N_DAI_OUT($2)`_tuples_str" {'
+` tokens "sof_dai_tokens"'
+` tuples."string" {'
+` SOF_TKN_DAI_TYPE' "SSP"
+` SOF_TKN_DAI_SSP_LBM' "TRUE"
+` }'
+`}'
+`SectionData."'N_DAI_OUT($2)`_data_str" {'
+` tuples "'N_DAI_OUT($2)`_tuples_str"'
+`}'
+`SectionVendorTuples."'N_DAI_OUT($2)`_tuples_comp_str" {'
+` tokens "sof_comp_tokens"'
+` tuples."string" {'
+` SOF_TKN_COMP_FORMAT' STR($4)
+` }'
+`}'
+`SectionData."'N_DAI_OUT($2)`_data_comp_str" {'
+` tuples "'N_DAI_OUT($2)`_tuples_comp_str"'
+`}'
+`SectionWidget."'N_DAI_OUT`" {'
+` index "'PIPELINE_ID`"'
+` type "dai_in"'
+` stream_name' STR($3)
+` no_pm "true"'
+` data ['
+` "'N_DAI_OUT($2)`_data_w"'
+` "'N_DAI_OUT($2)`_data_w_comp"'
+` "'N_DAI_OUT($2)`_data_str"'
+` "'N_DAI_OUT($2)`_data_comp_str"'
+` ]'
+`}')
+
+
dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload)
define(`W_DAI_OUT',
`SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w_comp" {'
--
2.7.4
More information about the Sound-open-firmware
mailing list