Re: [PATCH] ALSA: pcm: Use pcm_lib_apply_appl_ptr() in x32 sync_ptr
From: Takashi Iwai
Date: Fri Mar 27 2026 - 07:44:26 EST
On Sun, 22 Mar 2026 00:02:21 +0100,
Cássio Gabriel wrote:
>
> snd_pcm_ioctl_sync_ptr_x32() still handles incoming appl_ptr updates
> differently from the other SYNC_PTR paths. The native handler and the
> 32-bit compat handler both pass appl_ptr through pcm_lib_apply_appl_ptr(),
> but the x32 handler still writes control->appl_ptr directly.
>
> That direct assignment skips the common appl_ptr validation against
> runtime->boundary and also bypasses the substream ack() callback.
> This makes the x32 ioctl path behave differently from the native and
> compat32 cases, and it can miss the driver notification that explicit
> appl_ptr synchronization relies on.
>
> Use pcm_lib_apply_appl_ptr() for x32 too, so appl_ptr updates are
> validated consistently and drivers relying on ack() notifications
> see the same behavior.
>
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>
Thanks, applied to for-next branch now.
Takashi