From 277b7a011a6340525d203d3ed43d72c13b1196a6 Mon Sep 17 00:00:00 2001 From: Pan Xiuli Date: Thu, 22 Mar 2018 17:55:48 +0800 Subject: [PATCH] topology: utils: add get format name helper function We may need to get format name from some format short name. Signed-off-by: Pan Xiuli --- topology/m4/utils.m4 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/topology/m4/utils.m4 b/topology/m4/utils.m4 index e929244..ba87c8d 100644 --- a/topology/m4/utils.m4 +++ b/topology/m4/utils.m4 @@ -35,6 +35,15 @@ define(`COMP_SAMPLE_SIZE', $1, `float', `4', `4')') +dnl COMP_FORMAT_NAME(FMT) +define(`COMP_FORMAT_NAME', +`ifelse( + $1, `s16le', `S16_LE', + $1, `s24le', `S24_LE', + $1, `s32le', `S32_LE', + $1, `float', `FLOAT_LE', + )') + dnl P_GRAPH(name, CONNECTIONS) define(`P_GRAPH', `SectionGraph.STR($1) {'