From 7f8603e3739011964ed8bef255cbdc1538136814 Mon Sep 17 00:00:00 2001 From: Baofeng Tian Date: Thu, 19 Oct 2023 16:49:14 +0800 Subject: [PATCH] audio: tplg2: condense tplg audio format for s32 format condense src format from s32 to multiple audio format. Signed-off-by: Baofeng Tian --- .../src_format_s32_to_sxx_convert.conf | 417 ++++-------------- 1 file changed, 81 insertions(+), 336 deletions(-) diff --git a/tools/topology/topology2/include/components/src_format_s32_to_sxx_convert.conf b/tools/topology/topology2/include/components/src_format_s32_to_sxx_convert.conf index a76ba74ab2de..ceaaeb8f78ad 100644 --- a/tools/topology/topology2/include/components/src_format_s32_to_sxx_convert.conf +++ b/tools/topology/topology2/include/components/src_format_s32_to_sxx_convert.conf @@ -1,346 +1,91 @@ #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 42 - Object.Base.output_audio_format [ - # 8khz output - { - out_rate 8000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 11.025 khz output - { - out_rate 11025 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 12khz output - { - out_rate 12000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 16khz output - { - out_rate 16000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 22.05khz output - { - out_rate 22050 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 24khz output - { - out_rate 24000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 32khz output - { - out_rate 32000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 44.1khz output - { - out_rate 44100 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 48khz output - { - out_rate 48000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 64khz output - { - out_rate 64000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 88.2khz output - { - out_rate 88200 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 96khz output - { - out_rate 96000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 176.4khz output - { - out_rate 176400 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 192khz output - { - out_rate 192000 - out_bit_depth 16 - out_valid_bit_depth 16 - } - # 8khz output - { - out_rate 8000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 11.025 khz output - { - out_rate 11025 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 12khz output - { - out_rate 12000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 16khz output - { - out_rate 16000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 22.05khz output - { - out_rate 22050 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 24khz output - { - out_rate 24000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 32khz output - { - out_rate 32000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 44.1khz output - { - out_rate 44100 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 48khz output - { - out_rate 48000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 64khz output - { - out_rate 64000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 88.2khz output - { - out_rate 88200 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 96khz output - { - out_rate 96000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 176.4khz output - { - out_rate 176400 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 192khz output - { - out_rate 192000 - out_bit_depth 32 - out_valid_bit_depth 24 - } - # 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 [ 16 ] + out_valid_bit_depth [ 16 ] + } + { + out_rate [ + 8000 + 11025 + 12000 + 16000 + 22050 + 24000 + 32000 + 44100 + 48000 + 64000 + 88200 + 96000 + 176400 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 24 ] + } + { + 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 ] } + ]