Re: [PATCH V2 1/2] ASoC: max98363: add soundwire amplifier driver

From: Pierre-Louis Bossart
Date: Mon Mar 13 2023 - 13:49:58 EST



> + ret = sdw_stream_add_slave(max98363->slave, &stream_config,
> + &port_config, 1, stream);
> + if (ret) {
> + dev_err(dai->dev, "Unable to configure port\n");
> + return ret;
> + }
> +
> + if (params_channels(params) > 16) {
> + dev_err(component->dev, "Unsupported channels %d\n",
> + params_channels(params));
> + return -EINVAL;
> + }

Do you actually support more than 8 channels?

The data port DPnPrepareCtl and DPn_ChannelEn registers expose 8
channels max. It's always possible to 'cheat' by packing two channels in
the same sample, but that would require custom signaling between manager
and peripheral that isn't present.

Could it be a left-over from a TDM implementation?

The rest of the patch looks fine.