From c25623c016a40f9b26808d8a381423c29665f8f8 Mon Sep 17 00:00:00 2001 From: Baofeng Tian Date: Fri, 20 Oct 2023 16:14:34 +0800 Subject: [PATCH] audio: tplg2: condense passthrough tplg file audio format Condense passthrough audio format with combined arrays. Signed-off-by: Baofeng Tian --- .../src_format_s32_passthrough.conf | 208 ++++-------------- 1 file changed, 40 insertions(+), 168 deletions(-) diff --git a/tools/topology/topology2/include/components/src_format_s32_passthrough.conf b/tools/topology/topology2/include/components/src_format_s32_passthrough.conf index adc8a391ef6b..97d87c9b24c4 100644 --- a/tools/topology/topology2/include/components/src_format_s32_passthrough.conf +++ b/tools/topology/topology2/include/components/src_format_s32_passthrough.conf @@ -1,178 +1,50 @@ #src format array num_input_audio_formats 14 - Object.Base.input_audio_format [ - # 8khz input - { - in_rate 8000 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 11.025 khz input - { - in_rate 11025 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 12khz input - { - in_rate 12000 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 16khz input - { - in_rate 16000 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 22.05khz input - { - in_rate 22050 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 24khz input - { - in_rate 24000 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 32khz input - { - in_rate 32000 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 44.1khz input - { - in_rate 44100 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 48khz input - { - in_rate 48000 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 64khz input - { - in_rate 64000 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 88.2khz input - { - in_rate 88200 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 96khz input - { - in_rate 96000 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 176.4khz input - { - in_rate 176400 - in_bit_depth 32 - in_valid_bit_depth 32 - } - # 192khz input - { - in_rate 192000 - in_bit_depth 32 - in_valid_bit_depth 32 + CombineArrays.Object.Base.input_audio_format [ + { + in_rate [ + 8000 + 11025 + 12000 + 16000 + 22050 + 24000 + 32000 + 44100 + 48000 + 64000 + 88200 + 96000 + 176400 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 32 ] } ] num_output_audio_formats 14 - Object.Base.output_audio_format [ - # 8khz output - { - out_rate 8000 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 11.025 khz output - { - out_rate 11025 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 12khz output - { - out_rate 12000 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 16khz output - { - out_rate 16000 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 22.05khz output - { - out_rate 22050 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 24khz output - { - out_rate 24000 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 32khz output - { - out_rate 32000 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 44.1khz output - { - out_rate 44100 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 48khz output - { - out_rate 48000 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 64khz output - { - out_rate 64000 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 88.2khz output - { - out_rate 88200 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 96khz output - { - out_rate 96000 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 176.4khz output - { - out_rate 176400 - out_bit_depth 32 - out_valid_bit_depth 32 - } - # 192khz output - { - out_rate 192000 - out_bit_depth 32 - out_valid_bit_depth 32 + CombineArrays.Object.Base.output_audio_format [ + { + out_rate [ + 8000 + 11025 + 12000 + 16000 + 22050 + 24000 + 32000 + 44100 + 48000 + 64000 + 88200 + 96000 + 176400 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 32 ] } ]