Re: [PATCH v2 2/2] ASoC: codecs: add Qualcomm WSA885X codec driver
From: Mark Brown
Date: Fri Jul 03 2026 - 11:08:01 EST
On Wed, Jul 01, 2026 at 07:29:13PM +0530, Prasad Kumpatla wrote:
> Add an ASoC codec driver for the Qualcomm WSA885X stereo smart speaker
> amplifier controlled over I2C.
> +static struct snd_soc_dai_driver wsa885x_dai[] = {
> + {
> + .name = "wsa885x_dai_drv",
> + .playback = {
> + .stream_name = "WSA885X TDM Playback",
> + .channels_min = 1,
> + .channels_max = 2,
> + .rates = SNDRV_PCM_RATE_8000_192000 |
> + SNDRV_PCM_RATE_352800 |
> + SNDRV_PCM_RATE_384000,
> + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
> + SNDRV_PCM_FMTBIT_S32_LE,
> + },
> + .ops = &wsa885x_dai_ops,
> + },
> +};
Does the device actually support all the rates advertised, 11.025kHz for
example?
> +static int wsa885x_rx_slot_mask_put(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
> + struct wsa885x_priv *wsa885x = snd_soc_component_get_drvdata(component);
> + u32 mask = ucontrol->value.integer.value[0];
> +
> + if (!wsa885x_is_valid_rx_slot_mask(mask))
> + return -EINVAL;
> +
> + if (wsa885x->rx_slot_mask == mask)
> + return 0;
> +
> + wsa885x->rx_slot_mask = mask;
> +
> + return 1;
> +}
This looks like you're trying to put TDM configuration in the control
API, it should be done via set_tdm_slot() - the driver does have one,
but it only configures mono vs stereo with no control over slot
placement.
Attachment:
signature.asc
Description: PGP signature