[Sound-open-firmware] [PATCH] topology: add implementations for single direction pcm

Keyon Jie yang.jie at linux.intel.com
Tue Dec 19 06:09:20 CET 2017


Currently it support only dual direction pcm with PCM_DUPLEX_ADD,
definitely we need add single direction(playback or capture only)
pcm in many cases.

Here add implementation of PCM_PLAYBACK_ADD add PCM_CAPTURE_ADD,
for playback and capture respectively.

Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
---
 topology/m4/local.m4 | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/topology/m4/local.m4 b/topology/m4/local.m4
index c0ffef2..46abaab 100644
--- a/topology/m4/local.m4
+++ b/topology/m4/local.m4
@@ -476,6 +476,46 @@ define(`COMP_SAMPLE_SIZE',
 dnl COMP_BUFFER_SIZE( num_periods, sample_size, channels, fmames)
 define(`COMP_BUFFER_SIZE', `eval(`$1 * $2 * $3 * $4')')
 
+dnl PCM_PLAYBACK_ADD(name, pipeline, pcm_id, dai_id, playback)
+define(`PCM_PLAYBACK_ADD',
+`SectionPCM.STR($1) {'
+`'
+`	index STR($2)'
+`'
+`	# used for binding to the PCM'
+`	id STR($3)'
+`'
+`	dai.STR($1 $3) {'
+`		id STR($4)'
+`	}'
+`'
+`	pcm."playback" {'
+`'
+`		capabilities STR($5)'
+`	}'
+`'
+`}')
+
+dnl PCM_CAPTURE_ADD(name, pipeline, pcm_id, dai_id, capture)
+define(`PCM_CAPTURE_ADD',
+`SectionPCM.STR($1) {'
+`'
+`	index STR($2)'
+`'
+`	# used for binding to the PCM'
+`	id STR($3)'
+`'
+`	dai.STR($1 $3) {'
+`		id STR($4)'
+`	}'
+`'
+`	pcm."capture" {'
+`'
+`		capabilities STR($5)'
+`	}'
+`'
+`}')
+
 dnl PCM_DUPLEX_ADD(name, pipeline, pcm_id, dai_id, playback, capture)
 define(`PCM_DUPLEX_ADD',
 `SectionPCM.STR($1) {'
-- 
2.11.0



More information about the Sound-open-firmware mailing list