Linux Documentation
 help / color / mirror / Atom feed
From: Joonho Lee <mynameisjune111@gmail.com>
To: linux-sound@vger.kernel.org
Cc: tiwai@suse.com, perex@perex.cz, anton.yakovlev@opensynergy.com,
	mst@redhat.com, virtualization@lists.linux.dev,
	linux-kernel@vger.kernel.org, corbet@lwn.net,
	skhan@linuxfoundation.org, rdunlap@infradead.org,
	linux-doc@vger.kernel.org
Subject: [PATCH v14 00/12] ALSA: virtio: staged capture recovery and PCM RESET synchronization
Date: Wed,  4 Nov 2026 11:17:33 +0900	[thread overview]
Message-ID: <20261104021745.57733-1-mynameisjune111@gmail.com> (raw)

Hi Takashi,

This v14 series replaces v13 and applies as twelve patches to sound.git
for-next at a4311e9447bbb219044db38897f95be112f46a8a. The patch order places
the ALSA PCM synchronization prerequisites before the virtio ACK and teardown
changes, so the driver can keep ACK admission closed while the core resets
the PCM pointer. Targeting 7.5 or later works for me; I have no urgent
deadline.

The changes address the 16 raw Sashiko findings from v13; several findings
share a fix and its validation. They close ACK admission before teardown
waits while keeping prepared runtime storage valid until device-owned capture
requests drain. They prevent event delivery before ALSA objects are ready,
preserve XRUN state through recovery, and keep capture accounting consistent
across RESET, short RX completion, sub-byte ACKs and NOMMU post-STOP copies.
Failed-probe cleanup reclaims event buffers without dispatching them into
uninitialized ALSA state.

Playback RESET returns -EBUSY while TX requests remain device-owned and leaves
the pointers unchanged. DROP/PREPARE retires that generation before retrying.
Linked PCM RESET retains its first-error and partial-completion behavior.

Validation includes 21 selected QEMU runs with expected fixture exit codes,
module hashes, unchanged inputs, VM cleanup and decoded kernel diagnostics
checked. The callback boundary suite passed 24 cases; ACK/START failure to
DROP recovery passed 18 cases; the forced ACK/teardown race passed 12 cases
under KASAN/lockdep and 12 under KCSAN_STRICT. Fourteen ordinary and staged
capture segments, totaling 14,208,000 frames, matched the independent sample
oracle.

Separately, all twelve ordered v14 stages built, with the recorded source
hashes matching each stage. Four targeted intermediate-stage QEMU runs matched
their expected exits, module hashes, unchanged-input checks, VM cleanup and
quiet decoded KASAN/lockdep logs. The linked-peer checks accepted baseline ACK
3/3 and rejected candidate ACK with -EBADFD 3/3; three control cases per
version and six candidate recovery cases passed. The stage-6 event probe
dispatched one enabled event, blocked pre-init dispatch and passed rebind I/O.
The stage-7 short-RX case published zero progress, latched XRUN and reopened
for 96,000 bytes. Capture-stage host checks passed 15 assertions across
stages 7–9, including the teardown gate's prepared-state lifetime.

Two physical VZ runs used a Samson Go Mic at 48 kHz mono. Each run included a
70-second capture, three five-second reopen captures, RUNNING and PAUSED
RESET, and normal shutdown. All recordings had nonzero input and zero XRUN
errors. These VZ runs used the experimental capture compatibility flags.

The NOMMU post-STOP path passed 22 assertions in an extracted-function host
shim; no CONFIG_MMU=n kernel or device run was performed. Event admission used
synthetic events; physical system suspend was not exercised.
Docker Desktop, other input devices, and broad load or format coverage remain
outside these results.

LLM assistance was used for review analysis, implementation, fixtures and
this explanation. The patches carry Assisted-by: LLM.

Previous series:
https://lore.kernel.org/linux-sound/20261103080821.16983-1-mynameisjune111@gmail.com/T/

Thanks,
Joonho

base-commit: a4311e9447bbb219044db38897f95be112f46a8a

             reply	other threads:[~2026-11-04  2:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  2:17 Joonho Lee [this message]
2026-11-04  2:17 ` [PATCH v14 01/12] ALSA: pcm: mark stop-threshold accesses for capture policy sampling Joonho Lee
2026-11-04  2:17 ` [PATCH v14 02/12] ALSA: pcm: report partial progress under the stream lock Joonho Lee
2026-11-04  2:17 ` [PATCH v14 03/12] ALSA: pcm: add an optional reset operation " Joonho Lee
2026-11-04  2:17 ` [PATCH v14 04/12] ALSA: virtio: Propagate PCM send failures through ACK Joonho Lee
2026-11-04  2:17 ` [PATCH v14 05/12] ALSA: virtio: Recover PCM state after a failed start Joonho Lee
2026-11-04  2:17 ` [PATCH v14 06/12] ALSA: virtio: Retain queued messages through device reset Joonho Lee
2026-11-04  2:17 ` [PATCH v14 07/12] ALSA: virtio: Keep PCM DMA buffers alive through device ownership Joonho Lee
2026-11-04  2:17 ` [PATCH v14 08/12] ALSA: virtio: Keep control payloads alive through DMA completion Joonho Lee
2026-11-04  2:17 ` [PATCH v14 09/12] ALSA: virtio: wait through signals for PCM teardown Joonho Lee
2026-11-04  2:17 ` [PATCH v14 10/12] ALSA: virtio: add staged capture and serialize PCM lifecycle accounting Joonho Lee
2026-11-04  2:17 ` [PATCH v14 11/12] ALSA: virtio: prioritize staged capture period work Joonho Lee
2026-11-04  2:17 ` [PATCH v14 12/12] docs: describe virtio-sound capture options Joonho Lee

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=20261104021745.57733-1-mynameisjune111@gmail.com \
    --to=mynameisjune111@gmail.com \
    --cc=anton.yakovlev@opensynergy.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=perex@perex.cz \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tiwai@suse.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