diff --git a/tools/topology/topology2/include/formats/compr_input_audio_formats.conf b/tools/topology/topology2/include/formats/compr_input_audio_formats.conf new file mode 100644 index 000000000000..8d5694400988 --- /dev/null +++ b/tools/topology/topology2/include/formats/compr_input_audio_formats.conf @@ -0,0 +1,107 @@ + # All input formats for e.g. host-copier, decoder, + # and module-copier + num_input_audio_formats 40 + CombineArrays.Object.Base.input_audio_format [ + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 8 ] + in_valid_bit_depth [ 8 ] + in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] + in_ch_map [ $CHANNEL_MAP_MONO ] + in_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 16 ] + in_valid_bit_depth [ 16 ] + in_ch_map [ $CHANNEL_MAP_MONO ] + in_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 24 ] + in_ch_map [ $CHANNEL_MAP_MONO ] + in_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 32 ] + in_ch_map [ $CHANNEL_MAP_MONO ] + in_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 8 ] + in_valid_bit_depth [ 8 ] + in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] + } + { + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 16 ] + in_valid_bit_depth [ 16 ] + } + { + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 24 ] + } + { + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 32 ] + } + ] diff --git a/tools/topology/topology2/include/formats/compr_input_audio_formats_s32_48k.conf b/tools/topology/topology2/include/formats/compr_input_audio_formats_s32_48k.conf new file mode 100644 index 000000000000..9ea5b19a2f16 --- /dev/null +++ b/tools/topology/topology2/include/formats/compr_input_audio_formats_s32_48k.conf @@ -0,0 +1,29 @@ + # Input formats for e.g. micsel + num_input_audio_formats 10 + CombineArrays.Object.Base.input_audio_format [ + { + in_channels [ 1 ] + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 32 ] + in_ch_map [ $CHANNEL_MAP_MONO ] + in_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + in_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + in_bit_depth [ 32 ] + in_valid_bit_depth [ 32 ] + } + ] diff --git a/tools/topology/topology2/include/formats/compr_input_output_formats_src_s32_to_48k.conf b/tools/topology/topology2/include/formats/compr_input_output_formats_src_s32_to_48k.conf new file mode 100644 index 000000000000..836855126233 --- /dev/null +++ b/tools/topology/topology2/include/formats/compr_input_output_formats_src_s32_to_48k.conf @@ -0,0 +1,65 @@ + # Input and output audio formats for SRC + num_input_audio_formats 28 + CombineArrays.Object.Base.input_audio_format [ + { + in_channels [ 1 ] + 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 ] + in_ch_map [ $CHANNEL_MAP_MONO ] + in_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + 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 2 + Object.Base.output_audio_format [ + { + out_channels 1 + out_rate 48000 + out_bit_depth 32 + out_valid_bit_depth 32 + out_ch_map $CHANNEL_MAP_MONO + out_ch_cfg $CHANNEL_CONFIG_MONO + } + { + out_channels 2 + out_rate 48000 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] diff --git a/tools/topology/topology2/include/formats/compr_output_audio_formats.conf b/tools/topology/topology2/include/formats/compr_output_audio_formats.conf new file mode 100644 index 000000000000..98d11fa51cbc --- /dev/null +++ b/tools/topology/topology2/include/formats/compr_output_audio_formats.conf @@ -0,0 +1,106 @@ + # Output audio formats for e.g. host-copier and decoder + num_output_audio_formats 40 + CombineArrays.Object.Base.output_audio_format [ + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 8 ] + out_valid_bit_depth [ 8 ] + out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] + out_ch_map [ $CHANNEL_MAP_MONO ] + out_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 16 ] + out_valid_bit_depth [ 16 ] + out_ch_map [ $CHANNEL_MAP_MONO ] + out_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 24 ] + out_ch_map [ $CHANNEL_MAP_MONO ] + out_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 32 ] + out_ch_map [ $CHANNEL_MAP_MONO ] + out_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 8 ] + out_valid_bit_depth [ 8 ] + out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] + } + { + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 16 ] + out_valid_bit_depth [ 16 ] + } + { + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 24 ] + } + { + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 32 ] + } + ] diff --git a/tools/topology/topology2/include/formats/compr_output_audio_formats_s32.conf b/tools/topology/topology2/include/formats/compr_output_audio_formats_s32.conf new file mode 100644 index 000000000000..e377afa38687 --- /dev/null +++ b/tools/topology/topology2/include/formats/compr_output_audio_formats_s32.conf @@ -0,0 +1,29 @@ + # Output audio formats e.g. module-copier + num_output_audio_formats 10 + CombineArrays.Object.Base.output_audio_format [ + { + out_channels [ 1 ] + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 32 ] + out_ch_map [ $CHANNEL_MAP_MONO ] + out_ch_cfg [ $CHANNEL_CONFIG_MONO ] + } + { + out_rate [ + 8000 + 44100 + 48000 + 96000 + 192000 + ] + out_bit_depth [ 32 ] + out_valid_bit_depth [ 32 ] + } + ] diff --git a/tools/topology/topology2/include/formats/compr_output_audio_formats_s32_48k_stereo.conf b/tools/topology/topology2/include/formats/compr_output_audio_formats_s32_48k_stereo.conf new file mode 100644 index 000000000000..13ebd43e389d --- /dev/null +++ b/tools/topology/topology2/include/formats/compr_output_audio_formats_s32_48k_stereo.conf @@ -0,0 +1,10 @@ + # Micsel single format output + num_output_audio_formats 1 + Object.Base.output_audio_format [ + { + out_channels 2 + out_rate 48000 + out_bit_depth 32 + out_valid_bit_depth 32 + } + ] diff --git a/tools/topology/topology2/include/pipelines/cavs/compr-playback.conf b/tools/topology/topology2/include/pipelines/cavs/compr-playback.conf index 4e5d9761ccab..da2821534982 100644 --- a/tools/topology/topology2/include/pipelines/cavs/compr-playback.conf +++ b/tools/topology/topology2/include/pipelines/cavs/compr-playback.conf @@ -22,6 +22,7 @@ + Class.Pipeline."compr-playback" { @@ -59,6 +60,8 @@ Class.Pipeline."compr-playback" { src."1" {} + micsel."1" {} + gain."1" {} mixin."1" {} @@ -81,6 +84,10 @@ Class.Pipeline."compr-playback" { } { source src.$index.1 + sink micsel.$index.1 + } + { + source micsel.$index.1 sink gain.$index.1 } { diff --git a/tools/topology/topology2/platform/intel/compr.conf b/tools/topology/topology2/platform/intel/compr.conf index ace7277675f4..14c07a0d974d 100644 --- a/tools/topology/topology2/platform/intel/compr.conf +++ b/tools/topology/topology2/platform/intel/compr.conf @@ -8,281 +8,37 @@ IncludeByKey.COMPRESSED_1 { Object.Widget.host-copier.1 { stream_name $COMPR_PCM_NAME pcm_id $COMPR_PCM_ID - - num_input_audio_formats 20 - CombineArrays.Object.Base.input_audio_format [ - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 8 ] - in_valid_bit_depth [ 8 ] - in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 16 ] - in_valid_bit_depth [ 16 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 24 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 32 ] - } - ] - - num_output_audio_formats 20 - CombineArrays.Object.Base.output_audio_format [ - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 8 ] - out_valid_bit_depth [ 8 ] - out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 16 ] - out_valid_bit_depth [ 16 ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 24 ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 32 ] - } - ] + + } Object.Widget.decoder.1 { core_id 1 - - num_input_audio_formats 20 - CombineArrays.Object.Base.input_audio_format [ - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 8 ] - in_valid_bit_depth [ 8 ] - in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 16 ] - in_valid_bit_depth [ 16 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 24 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 32 ] - } - ] - - num_output_audio_formats 20 - CombineArrays.Object.Base.output_audio_format [ - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 8 ] - out_valid_bit_depth [ 8 ] - out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 16 ] - out_valid_bit_depth [ 16 ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 24 ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 32 ] - } - ] + + } # converts the input to S32_LE Object.Widget.module-copier.2 { - num_input_audio_formats 20 - CombineArrays.Object.Base.input_audio_format [ - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 8 ] - in_valid_bit_depth [ 8 ] - in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 16 ] - in_valid_bit_depth [ 16 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 24 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 32 ] - } - ] - - num_output_audio_formats 5 - CombineArrays.Object.Base.output_audio_format [ - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 32 ] - } - ] + + } # converts the input to 48KHz # note: this is wrong for 96/192KHz HiRes audio!!!! Object.Widget.src.1 { rate_out 48000 + + } - + # converts the input to stereo + Object.Widget.micsel.1 { + Object.Control.bytes."1" { + name '$COMPR_PCM_NAME selector bytes' + + } + + } Object.Widget.gain.1 { @@ -367,281 +123,37 @@ IncludeByKey.COMPRESSED_2 { Object.Widget.host-copier.1 { stream_name $COMPR_2_PCM_NAME pcm_id $COMPR_2_PCM_ID - - num_input_audio_formats 20 - CombineArrays.Object.Base.input_audio_format [ - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 8 ] - in_valid_bit_depth [ 8 ] - in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 16 ] - in_valid_bit_depth [ 16 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 24 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 32 ] - } - ] - - num_output_audio_formats 20 - CombineArrays.Object.Base.output_audio_format [ - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 8 ] - out_valid_bit_depth [ 8 ] - out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 16 ] - out_valid_bit_depth [ 16 ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 24 ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 32 ] - } - ] + + } Object.Widget.decoder.1 { core_id 1 - - num_input_audio_formats 20 - CombineArrays.Object.Base.input_audio_format [ - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 8 ] - in_valid_bit_depth [ 8 ] - in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 16 ] - in_valid_bit_depth [ 16 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 24 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 32 ] - } - ] - - num_output_audio_formats 20 - CombineArrays.Object.Base.output_audio_format [ - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 8 ] - out_valid_bit_depth [ 8 ] - out_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 16 ] - out_valid_bit_depth [ 16 ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 24 ] - } - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 32 ] - } - ] + + } # converts the input to S32_LE Object.Widget.module-copier.2 { - num_input_audio_formats 20 - CombineArrays.Object.Base.input_audio_format [ - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 8 ] - in_valid_bit_depth [ 8 ] - in_sample_type [ $SAMPLE_TYPE_UNSIGNED_INTEGER ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 16 ] - in_valid_bit_depth [ 16 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 24 ] - } - { - in_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - in_bit_depth [ 32 ] - in_valid_bit_depth [ 32 ] - } - ] - - num_output_audio_formats 5 - CombineArrays.Object.Base.output_audio_format [ - { - out_rate [ - 8000 - 44100 - 48000 - 96000 - 192000 - ] - out_bit_depth [ 32 ] - out_valid_bit_depth [ 32 ] - } - ] + + } # converts the input to 48KHz # note: this is wrong for 96/192KHz HiRes audio!!!! Object.Widget.src.1 { rate_out 48000 + + } - + # converts the input to stereo + Object.Widget.micsel.1 { + Object.Control.bytes."1" { + name '$COMPR_2_PCM_NAME selector bytes' + + } + + } Object.Widget.gain.1 {