From 91318ce689525efb3238ea9b7abdfb2b29af4c88 Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald Date: Fri, 24 Jul 2026 13:54:53 +0100 Subject: [PATCH] topology2: sdw-jack-generic: Make BE DAI and copiers honor SDW_JACK_CAPTURE_CH The BE DAI, alh-copier and host-copier for capture should honor the number of capture channels set by SDW_JACK_CAPTURE_CH. Before this change, the value of SDW_JACK_CAPTURE_CH only affected the min/max channels of the FE DAI but all the other objects in the pipeline were defaulting to 2-channel. Because of this, the codec DAI was always asked for a 2-channel capture, which won't work on codecs that only support 1 channel. And the host-copier output was 2-channel audio that could not be connected to the 1-channel DAI. Signed-off-by: Richard Fitzgerald --- .../platform/intel/sdw-jack-generic.conf | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf index b2e1a259d9a0..d06ccfa05cf1 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-generic.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-generic.conf @@ -38,7 +38,8 @@ Object.Dai.ALH [ name $SDW_JACK_IN_STREAM default_hw_conf_id 0 rate $JACK_RATE - channels 2 + channels $SDW_JACK_CAPTURE_CH + Object.Base.hw_config.1 { id 0 @@ -354,30 +355,40 @@ Object.Pipeline.host-gateway-capture [ Object.Base.output_audio_format [ { out_rate $JACK_RATE + out_channels $SDW_JACK_CAPTURE_CH out_bit_depth 16 out_valid_bit_depth 16 + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" } { out_rate $JACK_RATE + out_channels $SDW_JACK_CAPTURE_CH out_bit_depth 32 out_valid_bit_depth 24 + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" } { out_rate $JACK_RATE + out_channels $SDW_JACK_CAPTURE_CH out_bit_depth 32 out_valid_bit_depth 32 + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" } { out_rate $JACK_RATE + out_channels $SDW_JACK_CAPTURE_CH out_bit_depth 32 out_valid_bit_depth 32 out_sample_type $SAMPLE_TYPE_FLOAT + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" } { out_rate $JACK_RATE + out_channels $SDW_JACK_CAPTURE_CH out_bit_depth 8 out_valid_bit_depth 8 out_sample_type $SAMPLE_TYPE_UNSIGNED_INTEGER + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" } ] } @@ -386,18 +397,24 @@ Object.Pipeline.host-gateway-capture [ Object.Base.output_audio_format [ { out_rate $JACK_RATE + out_channels $SDW_JACK_CAPTURE_CH out_bit_depth 16 out_valid_bit_depth 16 + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" } { out_rate $JACK_RATE + out_channels $SDW_JACK_CAPTURE_CH out_bit_depth 32 out_valid_bit_depth 24 + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" } { out_rate $JACK_RATE + out_channels $SDW_JACK_CAPTURE_CH out_bit_depth 32 out_valid_bit_depth 32 + out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]" } ] } @@ -444,6 +461,7 @@ Object.Widget { Object.Base.input_audio_format [ { in_rate $JACK_RATE + in_channels $SDW_JACK_CAPTURE_CH in_bit_depth 32 in_valid_bit_depth $SDW_LINK_VALID_BITS in_sample_type $SAMPLE_TYPE_MSB_INTEGER