From f6f57fe82b2f4487deb4f49674f974c706622c96 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Thu, 8 Jun 2023 17:13:02 +0800 Subject: [PATCH] Topology2: sdw-jack-generic: add 1 ch format support Some codecs like cs42l42 support 1 channel capture only. Signed-off-by: Bard Liao --- .../platform/intel/sdw-jack-generic.conf | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf index 33d2375a9..f82cda744 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -180,11 +180,56 @@ Object.Pipeline.host-gateway-capture [ Object.Widget.host-copier.1 { stream_name "Passthrough Capture 0" pcm_id 1 + num_input_audio_formats 9 + num_output_audio_formats 9 Object.Base.audio_format.1 { # 32/32 -> 16/16 bits conversion is done here in_bit_depth 32 in_valid_bit_depth 32 } + # 32-bit 48KHz 1ch + Object.Base.input_audio_format.7 { + in_channels 1 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + } + Object.Base.output_audio_format.7 { + out_bit_depth 32 + out_valid_bit_depth 32 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + } + # 24-bit 48KHz 1ch + Object.Base.input_audio_format.8 { + in_channels 1 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + } + Object.Base.output_audio_format.8 { + out_bit_depth 32 + out_valid_bit_depth 24 + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + } + # 16-bit 48KHz 1ch + Object.Base.input_audio_format.9 { + in_channels 1 + in_bit_depth 32 + in_valid_bit_depth 32 + in_ch_cfg $CHANNEL_CONFIG_MONO + in_ch_map $CHANNEL_MAP_MONO + } + Object.Base.output_audio_format.9 { + out_channels 1 + out_ch_cfg $CHANNEL_CONFIG_MONO + out_ch_map $CHANNEL_MAP_MONO + } } } ]