Skip to contentSkip to conversation

ALSA: usb-audio: add IFB_SILENCE_ON_EMPTY quirk for Behringer Flow 8

PATCH Applied Gordon Chen 3 participants 11 messages May 26 – Jul 30 1 message not in the archive Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usb-audio: add IFB_SILENCE_ON_EMPTY quirk for Behringer Flow 8

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.

---
 sound/usb/endpoint.c | 10 +++++++++-
 sound/usb/quirks.c   |  3 +++
 sound/usb/usbaudio.h |  8 ++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
sound/usb/endpoint.c +9 -1
index 6fbcb1175..24cd7692b 100644
@@ -1780,8 +1780,16 @@ static void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
 		/*
 		 * skip empty packets. At least M-Audio's Fast Track Ultra stops
 		 * streaming once it received a 0-byte OUT URB
+		 *
+		 * However, on devices where bytes==0 means every sync-source
+		 * packet errored (e.g. Behringer Flow 8 returning -EXDEV bursts
+		 * for entire capture URBs), an unconditional return starves the
+		 * IFB-fed OUT ring permanently. Such devices set
+		 * 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)
+		if (bytes == 0 && !(ep->chip->quirk_flags & QUIRK_FLAG_IFB_SILENCE_ON_EMPTY))
 			return;
 
 		spin_lock_irqsave(&ep->lock, flags);
sound/usb/quirks.c +3 -0
index 31cbe383a..e2c95be38 100644
@@ -2365,6 +2365,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
 		   QUIRK_FLAG_PLAYBACK_FIRST | QUIRK_FLAG_GENERIC_IMPLICIT_FB),
 	DEVICE_FLG(0x1397, 0x0509, /* Behringer UMC404HD */
 		   QUIRK_FLAG_PLAYBACK_FIRST | QUIRK_FLAG_GENERIC_IMPLICIT_FB),
+	DEVICE_FLG(0x1397, 0x050c, /* Behringer Flow 8 */
+		   QUIRK_FLAG_IFB_SILENCE_ON_EMPTY),
 	DEVICE_FLG(0x13e5, 0x0001, /* Serato Phono */
 		   QUIRK_FLAG_IGNORE_CTL_ERROR),
 	DEVICE_FLG(0x152a, 0x880a, /* NeuralDSP Quad Cortex */
@@ -2602,6 +2604,7 @@ static const char *const snd_usb_audio_quirk_flag_names[] = {
 	QUIRK_STRING_ENTRY(SKIP_IFACE_SETUP),
 	QUIRK_STRING_ENTRY(MIXER_PLAYBACK_LINEAR_VOL),
 	QUIRK_STRING_ENTRY(MIXER_CAPTURE_LINEAR_VOL),
+	QUIRK_STRING_ENTRY(IFB_SILENCE_ON_EMPTY),
 	NULL
 };
 
sound/usb/usbaudio.h +8 -0
index 58fd07f8c..9afcad8f1 100644
@@ -236,6 +236,12 @@ extern bool snd_usb_skip_validation;
  * QUIRK_FLAG_MIXER_CAPTURE_LINEAR_VOL
  *  Similar to QUIRK_FLAG_MIXER_PLAYBACK_LINEAR_VOL, but for capture streams.
  *  Overrides QUIRK_FLAG_MIXER_CAPTURE_MIN_MUTE
+ * QUIRK_FLAG_IFB_SILENCE_ON_EMPTY
+ *  In implicit feedback mode, when an entire capture URB returns with
+ *  all iso_frame_desc[i].status != 0 (bytes==0), do not silently return
+ *  from snd_usb_handle_sync_urb. Instead fall through and enqueue a
+ *  packet_info containing only size-0 packets, so the OUT ring keeps
+ *  moving (emits silence). Needed by Behringer Flow 8 (1397:050c).
  */
 
 enum {
@@ -268,6 +274,7 @@ enum {
 	QUIRK_TYPE_SKIP_IFACE_SETUP		= 26,
 	QUIRK_TYPE_MIXER_PLAYBACK_LINEAR_VOL	= 27,
 	QUIRK_TYPE_MIXER_CAPTURE_LINEAR_VOL	= 28,
+	QUIRK_TYPE_IFB_SILENCE_ON_EMPTY		= 29,
 /* Please also edit snd_usb_audio_quirk_flag_names */
 };
 
@@ -302,5 +309,6 @@ enum {
 #define QUIRK_FLAG_SKIP_IFACE_SETUP		QUIRK_FLAG(SKIP_IFACE_SETUP)
 #define QUIRK_FLAG_MIXER_PLAYBACK_LINEAR_VOL	QUIRK_FLAG(MIXER_PLAYBACK_LINEAR_VOL)
 #define QUIRK_FLAG_MIXER_CAPTURE_LINEAR_VOL	QUIRK_FLAG(MIXER_CAPTURE_LINEAR_VOL)
+#define QUIRK_FLAG_IFB_SILENCE_ON_EMPTY		QUIRK_FLAG(IFB_SILENCE_ON_EMPTY)
 
 #endif /* __USBAUDIO_H */
Signature · 1 line
2.54.0
Applied
#1 lore raw
Quoted 33 lines · 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.

Quoted 5 lines

The default behaviour (early return) is preserved for all existing devices including M-Audio Fast Track Ultra. Only Flow 8 opts in here.

Applied to for-next branch now, as it's no urgent fix like a regression.

thanks,

Takashi

#2 lore raw
In reply to Gordon Chen

Hi Gordon,

Quoted 32 lines · 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.

Quoted 6 lines

The default behaviour (early return) is preserved for all existing devices including M-Audio Fast Track Ultra. Only Flow 8 opts in here.

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.

Best Regards,
Mark Shi

#3 lore raw
Quoted 48 lines · Mark Shi

Hi Gordon,

Quoted 32 lines · 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.

Quoted 6 lines

The default behaviour (early return) is preserved for all existing devices including M-Audio Fast Track Ultra. Only Flow 8 opts in here.

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

Quoted 6 lines

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

#4 lore raw

Hi Takashi,

Quoted 61 lines · Takashi Iwai
Quoted 47 lines · Mark Shi

Hi Gordon,

Quoted 32 lines · 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.

Quoted 6 lines

The default behaviour (early return) is preserved for all existing devices including M-Audio Fast Track Ultra. Only Flow 8 opts in here.

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

Quoted 6 lines

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.

Quoted 3 lines

thanks,

Takashi

I don't have that device, but I partially reverted the code in that section, and it went back to normal.

Thanks,

Mark Shi

---
 sound/usb/endpoint.c | 10 +---------

 1 file changed, 1 insertion(+), 9 deletions(-)
sound/usb/endpoint.c +0 -0
index 24cd7692bd01..6fbcb117555c 100644
@@ -1780,16 +1780,8 @@ static void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,

         /*
          * skip empty packets. At least M-Audio's Fast Track Ultra stops
          * streaming once it received a 0-byte OUT URB
-         *
-         * However, on devices where bytes==0 means every sync-source
-         * packet errored (e.g. Behringer Flow 8 returning -EXDEV bursts -         * for entire capture URBs), an unconditional return starves the -         * IFB-fed OUT ring permanently. Such devices set
-         * 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)
             return;

         spin_lock_irqsave(&ep->lock, flags);

Signature · 1 line
2.55.0
#5 lore raw
Quoted 65 lines · Mark Shi

Hi Takashi,

Quoted 61 lines · Takashi Iwai
Quoted 47 lines · Mark Shi

Hi Gordon,

Quoted 32 lines · 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.

Quoted 6 lines

The default behaviour (early return) is preserved for all existing devices including M-Audio Fast Track Ultra. Only Flow 8 opts in here.

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

Quoted 6 lines

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.

Quoted 6 lines
Quoted 3 lines

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.

Quoted 33 lines

Thanks,

Mark Shi

---
 sound/usb/endpoint.c | 10 +---------

 1 file changed, 1 insertion(+), 9 deletions(-)
sound/usb/endpoint.c +1 -9
index 24cd7692bd01..6fbcb117555c 100644
@@ -1780,16 +1780,8 @@ static void snd_usb_handle_sync_urb(struct
 snd_usb_endpoint *ep,
          /*
           * skip empty packets. At least M-Audio's Fast Track Ultra stops
           * streaming once it received a 0-byte OUT URB
-         *
-         * However, on devices where bytes==0 means every sync-source
-         * packet errored (e.g. Behringer Flow 8 returning -EXDEV bursts
-         * for entire capture URBs), an unconditional return starves the
-         * IFB-fed OUT ring permanently. Such devices set
-         * 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)
              return;
Quoted 1 line

         spin_lock_irqsave(&ep->lock, flags);

Could you put a debug print what value does ep->chip->quirk_flags have on your device?

thanks,

Takashi

A message that is not in the archive (sent off-list or not yet received): OS3PR01MB88275E7D7BCF41FE0689E701DECA2@OS3PR01MB8827.jpnprd01.prod.outlook.com

#7 lore raw
Quoted 86 lines · Mark Shi

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.

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?

Quoted 6 lines

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

Quoted 31 lines

---

sound/usb/endpoint.c +3 -1
index 24cd7692bd01..12759afacf3e 100644
@@ -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)) {

--

Signature · 2 lines
Best Regards,
Mark Shi
#8 lore raw

Hi Takashi,

Quoted 93 lines
Quoted 85 lines · Mark Shi

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.

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?

Quoted 6 lines

thanks,

Takashi

I added usb_audio_info, compiled and booted, but dmesg | grep "quirk_flags" returned no output.

Quoted 8 lines

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

I used the printk function to retrieve the quirk_flags for the current function. Here is the output:

```

[   23.225719] snd-usb-audio: quirk_flags = 0x100800

```
Signature · 2 lines
Best Regards,
Mark Shi
#9 lore raw
Quoted 99 lines · Mark Shi

Hi Takashi,

Quoted 86 lines
Quoted 79 lines · Mark Shi

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:
[email protected]

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?

Quoted 5 lines

thanks,
Takashi
I added usb_audio_info, compiled and booted, but `dmesg |
grep "quirk_flags"
` returned no output.

Quoted 8 lines

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

Quoted 7 lines

I used the printk function to retrieve the quirk_flags for the current function. Here is the output:

```

[   23.225719] snd-usb-audio: quirk_flags = 0x100800

And what about ep->chip->quirk_flags at the place in question? Does it show the very same value?

The value 0x100800 means that your device has the quirk bit 11 (QUIRK_TYPE_IFACE_DELAY) and bit 20 (QUIRK_TYPE_FORCE_IFACE_RESET), and they have nothing to do with the commit you're testing.

thanks,

Takashi

#10 lore raw

Hi Takashi,

Quoted 108 lines · Takashi Iwai
Quoted 94 lines · Mark Shi

Hi Takashi,

Quoted 92 lines
Quoted 78 lines · Mark Shi

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:
[email protected]

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?

Quoted 5 lines

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.

Quoted 9 lines
Quoted 1 line

Takashi

I used the printk function to retrieve the quirk_flags for the current function. Here is the output:

```

[   23.225719] snd-usb-audio: quirk_flags = 0x100800

And what about ep->chip->quirk_flags at the place in question? Does it show the very same value?

Quoted 7 lines

The value 0x100800 means that your device has the quirk bit 11 (QUIRK_TYPE_IFACE_DELAY) and bit 20 (QUIRK_TYPE_FORCE_IFACE_RESET), and they have nothing to do with the commit you're testing.

thanks,
Takashi

I modified the output and added two log points for this purpose, and output:

```

[   23.355939] snd-usb-audio:snd_usb_endpoint_start() quirk_flags = 0x100800
[   23.437401] snd-usb-audio:snd_usb_endpoint_start() quirk_flags = 0x100800
[   67.813139] snd-usb-audio:snd_usb_endpoint_start() quirk_flags = 0x100800

```

Regardless of whether I added a log point, snd_usb_endpoint_implicit_feedback_sink() did not produce any output.

However, without the partial code rollback, during the 7.1.3–7.1.4 period, I could only restore normal operation by disabling PCIe power management using the "pcie_port_pm=off" kernel parameter (from "amd_s2idle.py" script's report).

Unfortunately for me, the platform returned to normal in version 7.1.5 (even though I hadn't applied any patches) (T_T). This makes it impossible for me to determine which side is at fault.

---
 sound/usb/endpoint.c | 4 ++++

 1 file changed, 4 insertions(+)
sound/usb/endpoint.c +0 -0
index 24cd7692bd01..cc79f4e9cf10 100644
@@ -1559,6 +1559,8 @@ int snd_usb_endpoint_start(struct snd_usb_endpoint *ep)

     int err;
     unsigned int i;

+    printk(KERN_EMERG "snd-usb-audio:snd_usb_endpoint_start() quirk_flags = 0x%x\n", ep->chip->quirk_flags); +
     if (atomic_read(&ep->chip->shutdown))
         return -EBADFD;

@@ -1789,7 +1791,9 @@ static void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
          * packet_info with size 0 packets, so playback emits silence
          * and the OUT ring keeps moving.
          */
+        printk(KERN_EMERG "snd-usb-audio:snd_usb_endpoint_implicit_feedback_sink() quirk_flags = 0x%x\n", ep->chip->quirk_flags); if (bytes == 0 && !(ep->chip->quirk_flags & QUIRK_FLAG_IFB_SILENCE_ON_EMPTY))
+        // if (bytes == 0)
             return;

         spin_lock_irqsave(&ep->lock, flags);

Signature · 5 lines
2.55.0

-- 
Best Regards,
Mark Shi
#11 lore raw
Quoted 134 lines · Mark Shi

Hi Takashi,

Quoted 108 lines · Takashi Iwai
Quoted 94 lines · Mark Shi

Hi Takashi,

Quoted 92 lines
Quoted 78 lines · Mark Shi

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:
[email protected]

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?

Quoted 5 lines

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.

Quoted 9 lines
Quoted 1 line

Takashi

I used the printk function to retrieve the quirk_flags for the current function. Here is the output:

```

[   23.225719] snd-usb-audio: quirk_flags = 0x100800

And what about ep->chip->quirk_flags at the place in question? Does it show the very same value?

Quoted 7 lines

The value 0x100800 means that your device has the quirk bit 11 (QUIRK_TYPE_IFACE_DELAY) and bit 20 (QUIRK_TYPE_FORCE_IFACE_RESET), and they have nothing to do with the commit you're testing.

thanks,
Takashi

I modified the output and added two log points for this purpose, and output:

```

[   23.355939] snd-usb-audio:snd_usb_endpoint_start() quirk_flags = 0x100800
[   23.437401] snd-usb-audio:snd_usb_endpoint_start() quirk_flags = 0x100800
[   67.813139] snd-usb-audio:snd_usb_endpoint_start() quirk_flags = 0x100800

```

Regardless of whether I added a log point, snd_usb_endpoint_implicit_feedback_sink() did not produce any output.

Quoted 8 lines

However, without the partial code rollback, during the 7.1.3–7.1.4 period, I could only restore normal operation by disabling PCIe power management using the "pcie_port_pm=off" kernel parameter (from "amd_s2idle.py" script's report).

Unfortunately for me, the platform returned to normal in version 7.1.5 (even though I hadn't applied any patches) (T_T). This makes it impossible for me to determine which side is at fault.

Well, that must be a false-positive, as you couldn't get the debug print at the patch actually touching.

Let us know if you can reproduce the issue reliably and it still points to this commit.

thanks,

Takashi