diff --git a/topology/m4/utils.m4 b/topology/m4/utils.m4 index ba87c8d..8b397b6 100644 --- a/topology/m4/utils.m4 +++ b/topology/m4/utils.m4 @@ -70,5 +70,43 @@ define(`W_DATA', ` tuples STR($2)' `}') +dnl VIRTUAL_DAPM_ROUTE_OUT(name, dai type, dai index, direction, index) +define(`VIRTUAL_DAPM_ROUTE_OUT', +`SectionWidget.STR($1) {' +` index STR($5)' +` type "aif_out"' +` no_pm "true"' +`}' +`SectionGraph.STR($2) {' +` index STR($5)' +`' +` lines [' +` dapm($1,$2$3.$4)' +` ]' +`}') + +dnl VIRTUAL_DAPM_ROUTE_IN(name, dai type, dai index, direction, index) +define(`VIRTUAL_DAPM_ROUTE_IN', +`SectionWidget.STR($1) {' +` index STR($5)' +` type "aif_in"' +` no_pm "true"' +`}' +`SectionGraph.STR($2) {' +` index STR($5)' +`' +` lines [' +` dapm($2$3.$4, $1)' +` ]' +`}') + +dnl VIRTUAL_WIDGET(name, index) +define(`VIRTUAL_WIDGET', +`SectionWidget.STR($1) {' +` index STR($2)' +` type "mixer"' +` no_pm "true"' +`}') + divert(0) dnl diff --git a/topology/sof-cnl-rt274.m4 b/topology/sof-cnl-rt274.m4 index 89d5a25..36cd91f 100644 --- a/topology/sof-cnl-rt274.m4 +++ b/topology/sof-cnl-rt274.m4 @@ -69,3 +69,14 @@ DAI_CONFIG(SSP, 0, SSP0-Codec, DSP_B, 24, DAI_CLOCK(bclk, 4800000, codec_slave), DAI_CLOCK(fsync, 48000, codec_slave), DAI_TDM(4, 25, 3, 3)) + +VIRTUAL_DAPM_ROUTE_OUT(codec0_out, SSP, 0, OUT, 0) +VIRTUAL_DAPM_ROUTE_OUT(codec1_out, SSP, 0, OUT, 1) +VIRTUAL_DAPM_ROUTE_OUT(ssp0 Tx, SSP, 0, OUT, 2) +VIRTUAL_DAPM_ROUTE_OUT(Capture, SSP, 0, OUT, 3) +VIRTUAL_DAPM_ROUTE_OUT(SoC DMIC, SSP, 0, OUT, 4) +VIRTUAL_DAPM_ROUTE_IN(codec0_in, SSP, 0, IN, 5) +VIRTUAL_WIDGET(DMIC01 Rx, 6) +VIRTUAL_WIDGET(DMic, 7) +VIRTUAL_WIDGET(dmic01_hifi, 8) +VIRTUAL_WIDGET(ssp0 Rx, 9)