topology: pcm: add helper for creating low power Capture PCM.

Add implement PCM_CAPTURE_LP_ADD() to create low power Capture PCM,
which can run at low power status like d0i3.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
This commit is contained in:
Keyon Jie 2019-08-01 17:22:14 +08:00 committed by Tomasz Lauda
parent 9fcbd3e16a
commit 6eb35e61c4
1 changed files with 33 additions and 4 deletions

View File

@ -88,9 +88,20 @@ define(`PCM_PLAYBACK_ADD',
`}', `fatal_error(`Invalid parameters ($#) to PCM_PLAYBACK_ADD')')'
)
dnl PCM_CAPTURE_ADD(name, pcm_id, capture)
define(`PCM_CAPTURE_ADD',
`ifelse(`$#', `3',
dnl PCM_CAPTURE_ADD_COMMON(name, pcm_id, capture, lp)
define(`PCM_CAPTURE_ADD_COMMON',
`ifelse(`$4', `1',
`SectionVendorTuples."$1_tuples_w" {'
` tokens "sof_stream_tokens"'
` tuples."bool" {'
` SOF_TKN_STREAM_CAPTURE_COMPATIBLE_D0I3 "true"'
` }'
`}'
`'
`SectionData."$1_data_w" {'
` tuples "$1_tuples_w"'
`}', `')'
`'
`SectionPCM.STR($1) {'
`'
` # used for binding to the PCM'
@ -104,7 +115,25 @@ define(`PCM_CAPTURE_ADD',
`'
` capabilities STR($3)'
` }'
`}', `fatal_error(`Invalid parameters ($#) to PCM_CAPTURE_ADD')')'
`ifelse(`$4', `1',
` data ['
` "$1_data_w"'
` ]', `')'
`}'
)
dnl PCM_CAPTURE_ADD(name, pcm_id, capture)
define(`PCM_CAPTURE_ADD',
`ifelse(`$#', `3',
PCM_CAPTURE_ADD_COMMON($1, $2, $3, 0),
`fatal_error(`Invalid parameters ($#) to PCM_CAPTURE_ADD')')'
)
dnl PCM_CAPTURE_LP_ADD(name, pcm_id, capture)
define(`PCM_CAPTURE_LP_ADD',
`ifelse(`$#', `3',
PCM_CAPTURE_ADD_COMMON($1, $2, $3, 1),
`fatal_error(`Invalid parameters ($#) to PCM_CAPTURE_LP_ADD')')'
)
dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture)