Re: [PATCH 1/2] soundwire: Improve channel min/max comments
From: Pierre-Louis Bossart
Date: Tue Nov 10 2026 - 03:34:08 EST
On 11/9/26 18:38, Charles Keepax wrote:
> Presently, the comments for the minimum and maximum channels are
> misleading. In the SDCA specification these are actually channel
> indexes not a count of the number of channels. So for example
> min_ch=4 and max_ch=5 means that 1 or 2 channels are supported.
> Update the comments associated with the structure to make this
> more clear.
It's the DisCo spec, not SDCA.
The DisCo spec reads:
"
mipi-sdw-min-channel-number : This optional integer Property shall
indicate the minimum Channel Number for this Audio Port, if the
Audio Port uses consecutive inclusive Channel Numbers.
"
> Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
> ---
> include/linux/soundwire/sdw.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
> index f710e5932b4b2..22fb7158bb709 100644
> --- a/include/linux/soundwire/sdw.h
> +++ b/include/linux/soundwire/sdw.h
> @@ -289,8 +289,8 @@ struct sdw_dp0_prop {
> * @ch_prep_timeout: Port-specific timeout value, in milliseconds
> * @imp_def_interrupts: If set, each bit corresponds to support for
> * implementation-defined interrupts
> - * @max_ch: Maximum channels supported
> - * @min_ch: Minimum channels supported
> + * @max_ch: Index of the maximum channel supported
> + * @min_ch: Index of the minimum channel supported
that's also ambiguous.
Maybe just use the spec definition "minimum Channel Number of this Audio
Port"
> * @num_channels: Number of discrete channels supported
> * @num_ch_combinations: Number of channel combinations supported
> * @channels: Discrete channels supported