From: Takashi Iwai <tiwai@suse.de>
To: Ai Chao <aichao@kylinos.cn>
Cc: perex@perex.cz, tiwai@suse.com, kees@kernel.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: pcm: Show closed for DISCONNECTED state
Date: Tue, 16 Jun 2026 09:24:50 +0200 [thread overview]
Message-ID: <8733ynrlq5.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260616020601.2106490-1-aichao@kylinos.cn>
On Tue, 16 Jun 2026 04:06:01 +0200,
Ai Chao wrote:
>
> Hello Takashi
>
> >Hmm, why it must be that? The state is shown as "DISCONNECTED".
> >
> >IOW, does this matter for which application and how do we have to
> >imitate as if the file got closed?
>
> Test Environment: Dual-boot Linux and Android system.
>
> Issue: When a recording app is opened in Linux, the system is switched to Android,
> and then switched back to Linux, the recording app fails to save the recording
> and keeps prompting "generating recording file".
>
> Note: The USB hub resets during the system switching process.
>
> Root Cause Analysis (from App Engineer): The recording app relies on the driver to
> report the IN_CLOSE_WRITE event. Upon receiving this, the audio service
> checks /proc/asound/card0/pcm0*/sub0/status. If the value is not "close", it assumes
> the sound card is occupied and skips loading; if the value is "close", it considers
> the sound card available and loads it normally.
> syslog:
> [ 1140.495952] retire_capture_urb: 17 callbacks suppressed
> [ 1140.583090] usb 1-2.4.2: USB disconnect, device number 53
> [ 1140.583965] usb 1-2.4.2: cannot submit urb (err = -19)
> [ 1140.588816] usb 1-2.4.2: cannot submit urb 0, error -19: no device
> [ 1140.662630] usb 2-4.3: USB disconnect, device number 15
> [ 1140.722584] usb 1-2.3: USB disconnect, device number 51
> [ 1140.722605] usb 1-2.3.2: USB disconnect, device number 52
> [ 1140.805724] usb 2-4.4: USB disconnect, device number 16
> [ 1141.352341] usb 1-2.3.3: USB disconnect, device number 54
> [ 1141.558840] hub 1-2.4:1.0: hub_ext_port_status failed (err = -71)
> [ 1141.613714] usb 1-2.3.5: USB disconnect, device number 55
> [ 1141.757651] usb 1-2.4: USB disconnect, device number 49
> [ 1144.324836] usb 1-2.4: new high-speed USB device number 56 using xhci_hcd
> [ 1144.473047] usb 1-2.4: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
> [ 1144.473065] usb 1-2.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
> [ 1144.473072] usb 1-2.4: Product: USB 2.0 Hub
> [ 1144.473738] hub 1-2.4:1.0: USB hub found
> [ 1144.473765] hub 1-2.4:1.0: 4 ports detected
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?
Takashi
next prev parent reply other threads:[~2026-06-16 7:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 2:06 Re: [PATCH] ALSA: pcm: Show closed for DISCONNECTED state Ai Chao
2026-06-16 7:24 ` Takashi Iwai [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-15 13:26 Ai Chao
2026-06-15 13:51 ` 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=8733ynrlq5.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=aichao@kylinos.cn \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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