Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ting-Han Hou" <ue081723@gmail.com>
Cc: virtualization@lists.linux.dev,
	"Eugenio Perez" <eperezma@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] ALSA: virtio: reset I/O message fill level on prepare
Date: Sun, 11 Oct 2026 13:02:56 +0000	[thread overview]
Message-ID: <sashiko-outbox-167243@kernel.org> (raw)
In-Reply-To: <20261011125426.35745-1-ue081723@gmail.com>

> Since commit fe981e67568c ("ALSA: virtio: use ack callback"), an I/O
> message is only queued to the device once the application has filled
> the whole period: virtsnd_pcm_msg_send() accumulates the transferred
> bytes in msg->length and queues the message when it reaches
> period_bytes.  msg->length is reset to 0 only when the device completes
> the message.
> 
> If the substream is stopped (e.g. snd_pcm_drop()) while a period is
> only partially filled, the corresponding message is never queued and
> keeps its partial length.  virtsnd_pcm_prepare() resets msg_count,
> hw_ptr and the indirect PCM state, but not msg->length.  After the
> next start, the stale length is added to the new data, the sum never
> equals period_bytes, and the message is never sent again.  Playback
> then stalls once hw_ptr reaches that period: writes fail with -EIO
> ("DMA or IRQ trouble") and drain fails with -EIO.  Capture is affected the
> [ ... ]
> Found by code inspection, confirmed with the reproducer above.
> 
> Fixes: fe981e67568c ("ALSA: virtio: use ack callback")
> Assisted-by: LLM
> Signed-off-by: Ting-Han Hou <ue081723@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261011125426.35745-1-ue081723@gmail.com?part=1


  reply	other threads:[~2026-10-11 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-11 12:54 [PATCH] ALSA: virtio: reset I/O message fill level on prepare Ting-Han Hou
2026-10-11 13:02 ` sashiko-bot [this message]
2026-10-12  7:28 ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-167243@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=ue081723@gmail.com \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox