[PATCH 0/2] ALSA: xen-front: Fix event channel stream lifetime bugs

Cássio Gabriel posted 2 patches 3 days, 21 hours ago
Failed in applying to current master (apply log)
There is a newer version of this series
sound/xen/xen_snd_front_alsa.c    | 17 ++++++++++++-----
sound/xen/xen_snd_front_evtchnl.c | 28 +++++++++++++++++++---------
sound/xen/xen_snd_front_evtchnl.h |  6 ++++--
3 files changed, 35 insertions(+), 16 deletions(-)
[PATCH 0/2] ALSA: xen-front: Fix event channel stream lifetime bugs
Posted by Cássio Gabriel 3 days, 21 hours ago
Fix two related event-channel issues in the Xen ALSA frontend.

The first patch resets the event channel's expected incoming event
id when a stream is cleared, and drops stale queued events from
the previous stream instance.

The second patch keeps the request channel connected from .open(),
where it is needed for hw-rule queries and stream open requests,
but delays the event channel until after a successful .prepare().
This prevents current-position events from reaching the ALSA position
handler before runtime buffer and period geometry are valid.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
---
Cássio Gabriel (2):
      ALSA: xen-front: Reset event channel state on stream clear
      ALSA: xen-front: Connect event channel after stream prepare

 sound/xen/xen_snd_front_alsa.c    | 17 ++++++++++++-----
 sound/xen/xen_snd_front_evtchnl.c | 28 +++++++++++++++++++---------
 sound/xen/xen_snd_front_evtchnl.h |  6 ++++--
 3 files changed, 35 insertions(+), 16 deletions(-)
---
base-commit: 31d40472d5699a6139fe3a2ad6558645a99b7422
change-id: 20260423-alsa-xen-event-channel-fixes-6e4b40e649f7

Best regards,
--  
Cássio Gabriel <cassiogabrielcontato@gmail.com>

Re: [PATCH 0/2] ALSA: xen-front: Fix event channel stream lifetime bugs
Posted by Takashi Iwai 3 days, 5 hours ago
On Tue, 26 May 2026 14:48:25 +0200,
Cássio Gabriel wrote:
> 
> Fix two related event-channel issues in the Xen ALSA frontend.
> 
> The first patch resets the event channel's expected incoming event
> id when a stream is cleared, and drops stale queued events from
> the previous stream instance.
> 
> The second patch keeps the request channel connected from .open(),
> where it is needed for hw-rule queries and stream open requests,
> but delays the event channel until after a successful .prepare().
> This prevents current-position events from reaching the ALSA position
> handler before runtime buffer and period geometry are valid.
> 
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
> ---
> Cássio Gabriel (2):
>       ALSA: xen-front: Reset event channel state on stream clear
>       ALSA: xen-front: Connect event channel after stream prepare

Applied both patches now to for-next branch.  Thanks.


Takashi