Re: [RFC PATCH 05/23] ASoC: codecs: wsa884x: add VI sense capture DAI

From: Mark Brown

Date: Sun Nov 15 2026 - 12:36:37 EST


> The VI sense port carries the voltage and current sense data that DSP
> speaker protection needs, but it is described as a sink port next to
> the playback ports and has no DAI, so nothing can capture from it.

> Make it a source port with its own capture DAI, ops and stream runtime,
> and leave it out of the playback port list. sdw_get_slave_dpn_prop()
> searches the sink port properties by count, so pack that array densely
> now that VI sense is no longer in it.

> @@ -1795,7 +1826,10 @@ static int wsa884x_hw_free(struct snd_pcm_substream *substream,
> {
> struct wsa884x_priv *wsa884x = dev_get_drvdata(dai->dev);
>
> - sdw_stream_remove_slave(wsa884x->slave, wsa884x->sruntime);
> + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)

The VI DAI has it's own ops so it could just have it's own hw_free()
which would be a bit less fragile/surprising.

--
Mark Brown <broonie@xxxxxxxxxx>