Skip to content

Commit e4fa878

Browse files
keyonjielgirdwood
authored andcommitted
topology: utils: add helper to generate PCM capability
Add a helper to generate supported formats of the PCM capability, it is up to the pipeline format: for s16_le pipeline, only S16_LE is supported. for s24_le pipeline, both S16_LE and S24_LE are supported. for s32_le pipeline, all S16_LE, S24_LE and S32_LE are supported. For each pipeline, we should use CAPABILITY_FORMAT_NAME(PIPELINE_FORMAT) in the PCM_CAPABILITIES definition. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
1 parent 84298db commit e4fa878

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎tools/topology/m4/utils.m4‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ define(`COMP_FORMAT_VALUE',
5757
$1, `s32le', `0x02',
5858
)')
5959

60+
dnl CAPABILITY_FORMAT_NAME(BUF_FMT)
61+
define(`CAPABILITY_FORMAT_NAME',
62+
`ifelse(
63+
$1, `s16le', `S16_LE',
64+
$1, `s24le', ``S24_LE,S16_LE'',
65+
$1, `s32le', ``S32_LE,S24_LE,S16_LE'',
66+
$1, `float', `FLOAT_LE',
67+
)')
68+
6069
# note: only support number < 256 at the moment
6170
dnl DEC2HEX(dec_num)
6271
define(`DEC2HEX',

0 commit comments

Comments
 (0)