From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D39443CE62 for ; Wed, 29 Jul 2026 14:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785336266; cv=none; b=hb9WPUW5cbU1ABo80/ns/7o8qxuPLJ5rmpA03R5AQ3m2Be7j4BzeBSwFzjf7yMvza7oZJqIfBFGK5bMEP2WwEEO6z9pPmUCD+p/VLTlHMWu7sC69AEoTbM+pAqZAb8nWmyePx6qQn6VDDhuFLZF8r6LOv2/ys2AkjdF0k4GPvcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785336266; c=relaxed/simple; bh=41eORP/CnSTrvy94UtirU1MBs0oTobYhAF56gTsxXS0=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=jcEw+S5TSLV/LlBB13skJjCAQRzIbOjX0VU0Uuv8CdoIDFd6Uucddaw0g03a3xlyrF9FVIWRkDzj5jEnolFPcSrew4HlNVI/7xmq1bDsvNRkI0lA62MtYK+98eMfCydhu4zoYUWKLLXIqsX+EfIIRimM4RRQezfQOdTQkc0e9+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=DoYF461R; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=pAYmkRkC; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=QftwY280; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WqGyVeFb; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="DoYF461R"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="pAYmkRkC"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="QftwY280"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WqGyVeFb" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F1F837B182; Wed, 29 Jul 2026 14:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1785336253; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mo5k21iAOiX8HcMW7IH20r0grz5eSm2f7V/DI/osFUM=; b=DoYF461R7BdYYy3LEjlen/oDsxNdeamvBPLggNus0Zll/feyqBoD2oKW0V71xCA0/YWFX4 JP1DIeyZrPYj2yNrAzKzE1MsrjPJzECpWwP9HOaJxn8Ph/fL1/4Zxew2Hm7LTo05Svo9Wn FDRvYnHoRnyh3IltvTYSiBRWDPf5XGk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1785336253; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mo5k21iAOiX8HcMW7IH20r0grz5eSm2f7V/DI/osFUM=; b=pAYmkRkCS23av3UCvVurV+j695uIhk3RZqMUkKf1K2QtWF/A4G44mrABDo55rm7GXaU9sE nlpc4N07DHPf8gDg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1785336248; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mo5k21iAOiX8HcMW7IH20r0grz5eSm2f7V/DI/osFUM=; b=QftwY280pJnW1ONKoabxjd54dTQYkcLUaMPlH/ImaxKmAVlg9cIzNuC5VBRIZC3LizT+zW QmrbH/87aFDICE/R++ZL+EYBQLw2lwmzts5V5ka4HWTtbLdJS4Csdk4lYBFhB8WukN1Vsh GXCHa1yay+U+AoAjVTD1MegfkTiw3b8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1785336248; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Mo5k21iAOiX8HcMW7IH20r0grz5eSm2f7V/DI/osFUM=; b=WqGyVeFbxoxnIwnwjfPweHmoBUw9XsWSUjWdr740pjnDypF99fFbVEoeZoa9qru7N4X3Xf zm2CBqrjxjGY9kBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C2ED7779A1; Wed, 29 Jul 2026 14:44:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QhwGLrgRamoQRgAAD6G6ig (envelope-from ); Wed, 29 Jul 2026 14:44:08 +0000 Date: Wed, 29 Jul 2026 16:44:08 +0200 Message-ID: <87a4r95007.wl-tiwai@suse.de> From: Takashi Iwai To: Mark Shi Cc: Takashi Iwai , Gordon Chen , linux-sound@vger.kernel.org, Jaroslav Kysela , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: usb-audio: add IFB_SILENCE_ON_EMPTY quirk for Behringer Flow 8 In-Reply-To: References: <20260526072906.90106-1-chengordon326@gmail.com> <87bjbr6tth.wl-tiwai@suse.de> <875x1z6q0t.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/30.2 Mule/6.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-2022-JP X-Spam-Score: -3.30 X-Spam-Level: X-Spam-Flag: NO X-Spamd-Result: default: False [-3.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.998]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,hotmail.com]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_TO(0.00)[hotmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_CC(0.00)[suse.de,gmail.com,vger.kernel.org,perex.cz]; RCPT_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid] On Wed, 29 Jul 2026 16:28:23 +0200, Mark Shi wrote: > > > Hi Takashi, > > On Tue, 28 Jul 2026 17:46:05 +0200, > Mark Shi wrote: > > Hi Takashi, > > 在 2026/7/28 23:02, Takashi Iwai 写道: > > On Tue, 28 Jul 2026 16:27:35 +0200, > Mark Shi wrote: > > Hi Gordon, > > 在 2026/5/26 15:29, Gordon Chen 写道: > > The Behringer Flow 8 (1397:050c) is an 8-channel USB mixer that > declares OUT EP 0x01 with implicit feedback from capture EP 0x81 via > its UAC2 endpoint companion descriptor. After 5-35 minutes of > continuous playback, the device occasionally returns a capture URB in > which every iso_frame_desc has a non-zero status (-EXDEV bursts, > visible as rate-limited "frame N active: -18" lines in dmesg from > pcm.c). > > In that case snd_usb_handle_sync_urb() at endpoint.c counts bytes==0 > and falls into the early "skip empty packets" return originally added > for M-Audio Fast Track Ultra. As a result the playback EP loses its > sole IFB-driven feeder and the OUT ring starves permanently: hw_ptr > stops advancing while substream state remains RUNNING. Only USB > re-enumeration recovers. > > Three independent ftrace captures (taken at the moment of stall via a > userspace watchdog) consistently show: > > - 60-70 capture URB completions in the 70ms window before the marker > - 0 retire_playback_urb / queue_pending_output_urbs / > snd_usb_endpoint_implicit_feedback_sink calls > - every usb_submit_urb in the window comes from > snd_complete_urb+0x64e (capture self-resubmit), none from the > queue_pending_output_urbs path > > Add a new opt-in quirk QUIRK_FLAG_IFB_SILENCE_ON_EMPTY: when set, the > early return is skipped and we fall through to enqueue a packet_info > whose packet_size[i] are all 0 (the existing loop already maps > status!=0 packets to size 0). prepare_outbound_urb then emits a > silence packet, the OUT ring keeps moving, and the device rides > through the glitch. > > The default behaviour (early return) is preserved for all existing > devices including M-Audio Fast Track Ultra. Only Flow 8 opts in here. > > Cc: stable@vger.kernel.org > Signed-off-by: Gordon Chen > > Device: Mechrevo WUJIE14Pro A-7BC4U > CPU: AMD Ryzen 7 7840HS (Codename "Phoenix") > Firmware Version: T140_PHX_V20 > Firmware Release Date: 2024.1.8 > Kernel version: 7.1.4 > > In Linux kernel 7.1.4, I found that my laptop couldn't wake up from S3 > suspend; I had to hold down the power button to force a shutdown and > then restart it. > > Using `git bisect`, I discovered that if I revert this patch, the > laptop resumes from S3 normally. > > Do you have this USB-audio device (Behringer Flow 8 with USB ID > 1397:050c)? The commit must be harmless unless you have this device. > That is, if you don't have this device, it's likely a false-positive > bisection result. > > thanks, > > Takashi > > I don't have that device, but I partially reverted the code in that > section, and it went back to normal. > > Hmm, that's odd. > > Could you put a debug print what value does ep->chip->quirk_flags > have on your device? > > thanks, > > Takashi > > I added `usb_audio_info`, compiled and booted, but `dmesg | grep "quirk_flags" > ` returned no output. Then something wrong in your test :) Put another debug print at another place like the probe function, in order to verify whether the patched driver is really loaded, too. And, make sure that you're running the exactly patched kernel. Takashi > > --- > > diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c > index 24cd7692bd01..12759afacf3e 100644 > --- a/sound/usb/endpoint.c > +++ b/sound/usb/endpoint.c > @@ -1788,9 +1788,11 @@ static void snd_usb_handle_sync_urb(struct > snd_usb_endpoint *ep, > * QUIRK_FLAG_IFB_SILENCE_ON_EMPTY to fall through and enqueue a > * packet_info with size 0 packets, so playback emits silence > * and the OUT ring keeps moving. > */ > - if (bytes == 0 && !(ep->chip->quirk_flags & > QUIRK_FLAG_IFB_SILENCE_ON_EMPTY)) > + // if (bytes == 0 && !(ep->chip->quirk_flags & > QUIRK_FLAG_IFB_SILENCE_ON_EMPTY)) > + usb_audio_info(ep->chip, "quirk_flags = %d\n", ep->chip-> > quirk_flags); > + if (bytes == 0) > return; > > spin_lock_irqsave(&ep->lock, flags); > if (ep->next_packet_queued >= ARRAY_SIZE(ep->next_packet)) { > > -- > > -- > Best Regards, > Mark Shi >