Re: [PATCH] ASoC: SOF: Don't allow pointer operations on unconfigured streams
From: Péter Ujfalusi
Date: Mon Mar 30 2026 - 07:54:48 EST
On 30/03/2026 14:05, Mark Brown wrote:
> On Mon, Mar 30, 2026 at 10:01:59AM +0300, Péter Ujfalusi wrote:
>
>> Should this be fixed in core level to avoid repeating the same check in
>> every driver?
>
> I did wonder about that but wasn't sure if there might be some viable
> use case, especially for things proxying through to a DSP or something.
I see, but proxying or not, if there were no configuration set (the
state is OPEN) then asking for avail or tstamp do not have any validity.
> We don't generally guard calls based on the state the stream is in,
compress does this quite much, just avail and tstamp is exempt for some
reason.
> and not every implementation is going to try to do the division.
yeah, the SOF IPC4 compress which is under review for example is not
doing this.
--
Péter