Re: [PATCH v2 3/5] ASoC: q6apm-dai: make use of q6apm_get_hw_pointer
From: Dmitry Baryshkov
Date: Thu Feb 20 2025 - 12:01:00 EST
On Thu, 20 Feb 2025 at 18:29, <srinivas.kandagatla@xxxxxxxxxx> wrote:
>
> From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
>
> With the existing code, the buffer position is only reset in pointer
> callback, which leaves the possiblity of it going over the size of
> buffer size and reporting incorrect position to userspace.
>
> Without this patch, its possible to see errors like:
> snd-x1e80100 sound: invalid position: pcmC0D0p:0, pos = 12288, buffer size = 12288, period size = 1536
> snd-x1e80100 sound: invalid position: pcmC0D0p:0, pos = 12288, buffer size = 12288, period size = 1536
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
Fixes: ?
> ---
> sound/soc/qcom/qdsp6/q6apm-dai.c | 23 ++++-------------------
> 1 file changed, 4 insertions(+), 19 deletions(-)
--
With best wishes
Dmitry