Re: Re: Re: [PATCH] ALSA: pcm: Show closed for DISCONNECTED state
From: Ai Chao
Date: Wed Jun 17 2026 - 03:20:04 EST
Hello Takashi
> Thanks, it's a bit clearer. But it still means that it's a cargo fix
> only for that specific application. The program should receive an
> error for any further syscalls, so that it can close gracefully by
> itself. Or it doesn't work as expected?
The recording software monitors /proc/asound/card0/pcm0c/sub0/status.
When the USB device is suddenly disconnected, the recording software fails
to capture audio data from the sound card, with both the hardware pointer
and application pointer being 0. The software remains in a pending state,
continuously displaying "Generating recording file". If the status file shows
"closed" (DISCONNECTED), the audio service detects the status change, reinitializes
the device, starts processing the recording file, and either resumes recording or
notifies the user.
Thanks,
Ai Chao