From 4444f31df0b6c287eae45b5b590062b746e22e26 Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald Date: Fri, 25 Oct 2024 16:02:45 +0100 Subject: [PATCH] topology2: sdw-amp-generic: Add 6 and 8 channel feedback Add support for 6 channel and 8 channel amp feedback. The host-copier defaults provide 2 channel stereo and 4 channel 3.1. Use the value of AMP_FEEDBACK_CH to set special case input and output formats for 6 channels and 8 channels. The alh-copier also needs special cases for 6 and 8 channels. Signed-off-by: Richard Fitzgerald --- .../platform/intel/sdw-amp-generic.conf | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf index 8cc009d21292..4589484e285f 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-generic.conf @@ -371,6 +371,81 @@ IncludeByKey.SDW_AMP_FEEDBACK { Object.Widget.host-copier.1 { stream_name "amp feedback" pcm_id 3 + + IncludeByKey.AMP_FEEDBACK_CH { + "6" { + num_input_audio_formats 1 + num_output_audio_formats 3 + Object.Base.input_audio_format [ + { + in_channels 6 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_5_POINT_1 + in_ch_map $CHANNEL_MAP_5_POINT_1 + } + ] + Object.Base.output_audio_format [ + { + out_channels 6 + out_bit_depth 32 + out_valid_bit_depth 24 + out_ch_cfg $CHANNEL_CONFIG_5_POINT_1 + out_ch_map $CHANNEL_MAP_5_POINT_1 + } + { + out_channels 6 + out_bit_depth 32 + out_valid_bit_depth 32 + out_ch_cfg $CHANNEL_CONFIG_5_POINT_1 + out_ch_map $CHANNEL_MAP_5_POINT_1 + } + { + out_channels 6 + out_bit_depth 16 + out_valid_bit_depth 16 + out_ch_cfg $CHANNEL_CONFIG_5_POINT_1 + out_ch_map $CHANNEL_MAP_5_POINT_1 + } + ] + } + "8" { + num_input_audio_formats 1 + num_output_audio_formats 3 + Object.Base.input_audio_format [ + { + in_channels 8 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_7_POINT_1 + in_ch_map $CHANNEL_MAP_7_POINT_1 + } + ] + Object.Base.output_audio_format [ + { + out_channels 8 + out_bit_depth 32 + out_valid_bit_depth 24 + out_ch_cfg $CHANNEL_CONFIG_7_POINT_1 + out_ch_map $CHANNEL_MAP_7_POINT_1 + } + { + out_channels 8 + out_bit_depth 32 + out_valid_bit_depth 32 + out_ch_cfg $CHANNEL_CONFIG_7_POINT_1 + out_ch_map $CHANNEL_MAP_7_POINT_1 + } + { + out_channels 8 + out_bit_depth 16 + out_valid_bit_depth 16 + out_ch_cfg $CHANNEL_CONFIG_7_POINT_1 + out_ch_map $CHANNEL_MAP_7_POINT_1 + } + ] + } + } } } ] @@ -403,6 +478,14 @@ IncludeByKey.SDW_AMP_FEEDBACK { in_ch_cfg $CHANNEL_CONFIG_3_POINT_1 in_ch_map $CHANNEL_MAP_3_POINT_1 } + "6" { + in_ch_cfg $CHANNEL_CONFIG_5_POINT_1 + in_ch_map $CHANNEL_MAP_5_POINT_1 + } + "8" { + in_ch_cfg $CHANNEL_CONFIG_7_POINT_1 + in_ch_map $CHANNEL_MAP_7_POINT_1 + } } in_sample_type $SAMPLE_TYPE_MSB_INTEGER @@ -424,6 +507,14 @@ IncludeByKey.SDW_AMP_FEEDBACK { out_ch_cfg $CHANNEL_CONFIG_3_POINT_1 out_ch_map $CHANNEL_MAP_3_POINT_1 } + "6" { + out_ch_cfg $CHANNEL_CONFIG_5_POINT_1 + out_ch_map $CHANNEL_MAP_5_POINT_1 + } + "8" { + out_ch_cfg $CHANNEL_CONFIG_7_POINT_1 + out_ch_map $CHANNEL_MAP_7_POINT_1 + } } } ]