public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
@ 2025-07-30 20:02 Bob Ham
  2025-07-31  8:17 ` Michał Pecio
  0 siblings, 1 reply; 9+ messages in thread
From: Bob Ham @ 2025-07-30 20:02 UTC (permalink / raw)
  To: linux-usb


[-- Attachment #1.1: Type: text/plain, Size: 1492 bytes --]

Hi there,

I'm trying to get an Arturia AudioFuse 16Rig audio interface working
under Linux.  During loading of snd-usb-audio and when trying to play
through the interface, the kernel spews a whole bunch of messages like so:

[ 1667.208402] xhci_hcd 0000:00:14.0: WARN: buffer overrun event for
slot 3 ep 2 on endpoint
[ 1667.216585] xhci_hcd 0000:00:14.0: WARN: buffer overrun event for
slot 3 ep 2 on endpoint
[ 1667.224778] xhci_hcd 0000:00:14.0: WARN: buffer overrun event for
slot 3 ep 2 on endpoint

When trying to play, there is nothing from the audio outputs on the
interface and aplay reports:

$ aplay -D hw:CARD=Audio,DEV=0 output.wav
Playing WAVE 'output.wav' : Signed 32 bit Little Endian, Rate 48000 Hz,
Channels 10
aplay: pcm_write:2127: write error: Input/output error

I don't really know anything about XHCI so I was wondering if someone
could advise me on what might be causing the error messages?


I followed some instructions from this list⁰ on enabling logs and traces
which might help shed some light.  Here is the kernel log (which
includes some debugging statements I added):

  https://settrans.net/~rah/misc/xhci-kernel-log.txt

And here is the contents of /sys/kernel/debug/tracing/trace which
unfortunately looks empty, I'm wondering if the instructions I followed
are still valid?

  https://settrans.net/~rah/misc/xhci-kernel-trace.txt


Thanks,

Bob Ham


⁰https://lore.kernel.org/linux-usb/?t=20190409143433


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 2913 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
  2025-07-30 20:02 Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages Bob Ham
@ 2025-07-31  8:17 ` Michał Pecio
  2025-07-31  8:27   ` Michał Pecio
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Michał Pecio @ 2025-07-31  8:17 UTC (permalink / raw)
  To: Bob Ham; +Cc: linux-usb

Hi,

The 6.12 kernel series is half year old, so this may be unique to your
hardware. Can you try other (ideally similar) UAC devices in the same
USB port, or this device with different xHCI (or EHCI) controllers?

On Wed, 30 Jul 2025 21:02:24 +0100, Bob Ham wrote:
> I'm trying to get an Arturia AudioFuse 16Rig audio interface working
> under Linux.  During loading of snd-usb-audio and when trying to play
> through the interface, the kernel spews a whole bunch of messages
> like so:
> 
> [ 1667.208402] xhci_hcd 0000:00:14.0: WARN: buffer overrun event for
> slot 3 ep 2 on endpoint
> [ 1667.216585] xhci_hcd 0000:00:14.0: WARN: buffer overrun event for
> slot 3 ep 2 on endpoint
> [ 1667.224778] xhci_hcd 0000:00:14.0: WARN: buffer overrun event for
> slot 3 ep 2 on endpoint

"ep 2" means "ep index 2", which is USB endpoint 0x81 aka EP 1 IN.
So this is caused by recording, or maybe by playback while recording,
but not by playback alone.

At face value, "buffer overrun" means that the device sends a packet
which doesn't exceed the endpoint's limit (that would be babble), but
exceeds the data buffer submitted by the UAC driver. In the snippet
above, it seems to be happening regularly every 65 USB microframes.

It could be a UAC issue, or it could still be an xHCI issue if buffer
size is miscommunicated to the hardware or misunderstood by it.

Can you mount debugfs and see if you can find the directory below? It
would tell if there is anything unusual about those 1 in 65 buffers.

/sys/kernel/debug/usb/xhci/0000:00:14.0/


Regards,
Michal


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
  2025-07-31  8:17 ` Michał Pecio
@ 2025-07-31  8:27   ` Michał Pecio
  2025-07-31 10:11     ` Robert Ham
  2025-07-31  9:56   ` Robert Ham
  2025-07-31 10:04   ` Robert Ham
  2 siblings, 1 reply; 9+ messages in thread
From: Michał Pecio @ 2025-07-31  8:27 UTC (permalink / raw)
  To: Bob Ham; +Cc: linux-usb

On Thu, 31 Jul 2025 10:17:20 +0200, Michał Pecio wrote:
> "ep 2" means "ep index 2", which is USB endpoint 0x81 aka EP 1 IN.
> So this is caused by recording, or maybe by playback while recording,
> but not by playback alone.

Apologies, I forgot that some UAC modes may use additional "feedback"
endpoints so it could still be a playback thing.

Can you post "lsusb -v" for this device?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
  2025-07-31  8:17 ` Michał Pecio
  2025-07-31  8:27   ` Michał Pecio
@ 2025-07-31  9:56   ` Robert Ham
  2025-07-31 10:04   ` Robert Ham
  2 siblings, 0 replies; 9+ messages in thread
From: Robert Ham @ 2025-07-31  9:56 UTC (permalink / raw)
  To: Michał Pecio; +Cc: linux-usb


[-- Attachment #1.1: Type: text/plain, Size: 6966 bytes --]

Hi Michał,

On 31/07/2025 09:17, Michał Pecio wrote:
> Hi,
> 
> The 6.12 kernel series is half year old, so this may be unique to your
> hardware. Can you try other (ideally similar) UAC devices in the same
> USB port, or this device with different xHCI (or EHCI) controllers?

I feel I should provide some background.  I've been trying to get this
device working a while.  I've tried it in various machines with various
kernel versions and a number of device firmware revisions as well.  The
buffer overrun errors have appeared in different places, I don't think
it's specific to this machine's controller.  Regardless, I'll do your
suggested tests to make certain and get back to you.

Also, there are other problems with both the kernel and the device that
I've had to work around to get to the point of the buffer overruns in
the current setup.  Firstly, I needed to add a hack to snd-usb-audio to
stop it worrying about >32 channels in a feature unit descriptor.  As I
understand it though, this is a kernel issue; >32 channels is allowed.
(Patch should be forthcoming.)

Secondly, the device seems to stop responding to a SET_INTERFACE request
when snd-usb-audio sends a bunch of those requests during initialisation
so I made it send just the last request and the device seems to be OK
with that, or at least doesn't stop responding.  However, I wouldn't be
surprised if it's doing silly, spec-violating things in other places
too.  The manufacturer has explicitly and comically stated: "Because the
16Rig is working on Mac without any driver, it means that it is class
compliant."
--
https://forum.arturia.com/t/is-audiofuse-16rig-usb-audio-class-compliant/2153/3


> Can you mount debugfs and see if you can find the directory below? It
> would tell if there is anything unusual about those 1 in 65 buffers.
> 
> /sys/kernel/debug/usb/xhci/0000:00:14.0/

/sys/kernel/debug/usb/xhci/0000:00:14.0/
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port01
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port01/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port02
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port02/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port03
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port03/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port04
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port04/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port05
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port05/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port06
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port06/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port07
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port07/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port08
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port08/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port09
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port09/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port10
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port10/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port11
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port11/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port12
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port12/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port13
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port13/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port14
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port14/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port15
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port15/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port16
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port16/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/slot-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/name
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-ext-dbc:00
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-ext-protocol:01
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-ext-protocol:00
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-ext-legsup:00
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-runtime
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-op
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-cap


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 2913 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
  2025-07-31  8:17 ` Michał Pecio
  2025-07-31  8:27   ` Michał Pecio
  2025-07-31  9:56   ` Robert Ham
@ 2025-07-31 10:04   ` Robert Ham
  2025-07-31 20:21     ` Michał Pecio
  2 siblings, 1 reply; 9+ messages in thread
From: Robert Ham @ 2025-07-31 10:04 UTC (permalink / raw)
  To: Michał Pecio; +Cc: linux-usb


[-- Attachment #1.1: Type: text/plain, Size: 8297 bytes --]

On 31/07/2025 09:17, Michał Pecio wrote:
> Can you mount debugfs and see if you can find the directory below? It
> would tell if there is anything unusual about those 1 in 65 buffers.
> 
> /sys/kernel/debug/usb/xhci/0000:00:14.0/

Umm.. and this is with the device connected and snd-usb-audio loaded,
which might be more helpful :-)

/sys/kernel/debug/usb/xhci/0000:00:14.0/
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port01
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port01/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port02
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port02/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port03
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port03/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port04
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port04/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port05
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port05/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port06
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port06/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port07
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port07/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port08
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port08/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port09
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port09/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port10
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port10/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port11
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port11/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port12
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port12/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port13
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port13/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port14
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port14/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port15
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port15/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port16
/sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port16/portsc
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep03
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep03/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep03/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep03/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep03/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep02
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep02/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep02/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep02/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep02/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/slot-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/name
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep00
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep00/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep00/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep00/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/04/ep00/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep04
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep04/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep04/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep04/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep04/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/slot-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/name
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep00
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep00/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep00/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep00/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/03/ep00/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep02
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep02/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep02/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep02/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep02/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/slot-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/name
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep00
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep00/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep00/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep00/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/02/ep00/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep06/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep05/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep04/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep03/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep02/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/slot-context
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/name
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/devices/01/ep00/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/event-ring/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring/trbs
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring/cycle
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring/dequeue
/sys/kernel/debug/usb/xhci/0000:00:14.0/command-ring/enqueue
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-ext-dbc:00
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-ext-protocol:01
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-ext-protocol:00
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-ext-legsup:00
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-runtime
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-op
/sys/kernel/debug/usb/xhci/0000:00:14.0/reg-cap

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 2913 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
  2025-07-31  8:27   ` Michał Pecio
@ 2025-07-31 10:11     ` Robert Ham
  2025-07-31 14:26       ` Mathias Nyman
  0 siblings, 1 reply; 9+ messages in thread
From: Robert Ham @ 2025-07-31 10:11 UTC (permalink / raw)
  To: Michał Pecio; +Cc: linux-usb


[-- Attachment #1.1: Type: text/plain, Size: 22349 bytes --]

I managed to sort out the tracing and debug output. Updated kernel log
and trace:

https://settrans.net/~rah/misc/xhci-kernel-log-2.txt

https://settrans.net/~rah/misc/xhci-kernel-trace-2.txt


On 31/07/2025 09:27, Michał Pecio wrote:

> Can you post "lsusb -v" for this device?

Bus 003 Device 004: ID 1c75:af20 Arturia AF16Rig Audio
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x1c75 Arturia
  idProduct          0xaf20
  bcdDevice            2.01
  iManufacturer           1 ARTURIA
  iProduct                3 AF16Rig Audio
  iSerial                 2 8850400254010429
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x02e2
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass          1 Audio
      bFunctionSubClass       0
      bFunctionProtocol      32
      iFunction               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol     32
      iInterface              3
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               2.00
        bCategory               8
        wTotalLength       0x0190
        bmControls           0x00
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               41
        bmAttributes            3 Internal programmable clock
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource            9
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               43
        bmAttributes            0 External clock
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource           10
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               44
        bmAttributes            0 External clock
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource           11
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype     11 (CLOCK_SELECTOR)
        bClockID               40
        bNrInPins               3
        baCSourceID(0)         41
        baCSourceID(1)         43
        baCSourceID(2)         44
        bmControls           0x03
          Clock Selector Control (read/write)
        iClockSelector          8
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels            34
        bmChannelConfig    0x00000000
        iChannelNames          13
        bmControls         0x0000
        iTerminal               6
      AudioControl Interface Descriptor:
        bLength               146
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                12
        bSourceID               2
        bmaControls(0)    0x00000000
        bmaControls(1)    0x00000000
        bmaControls(2)    0x00000000
        bmaControls(3)    0x00000000
        bmaControls(4)    0x00000000
        bmaControls(5)    0x00000000
        bmaControls(6)    0x00000000
        bmaControls(7)    0x00000000
        bmaControls(8)    0x00000000
        bmaControls(9)    0x00000000
        bmaControls(10)    0x00000000
        bmaControls(11)    0x00000000
        bmaControls(12)    0x00000000
        bmaControls(13)    0x00000000
        bmaControls(14)    0x00000000
        bmaControls(15)    0x00000000
        bmaControls(16)    0x00000000
        bmaControls(17)    0x00000000
        bmaControls(18)    0x00000000
        bmaControls(19)    0x00000000
        bmaControls(20)    0x00000000
        bmaControls(21)    0x00000000
        bmaControls(22)    0x00000000
        bmaControls(23)    0x00000000
        bmaControls(24)    0x00000000
        bmaControls(25)    0x00000000
        bmaControls(26)    0x00000000
        bmaControls(27)    0x00000000
        bmaControls(28)    0x00000000
        bmaControls(29)    0x00000000
        bmaControls(30)    0x00000000
        bmaControls(31)    0x00000000
        bmaControls(32)    0x00000000
        bmaControls(33)    0x00000000
        bmaControls(34)    0x00000000
        iFeature                0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            20
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID              12
        bCSourceID             40
        bmControls         0x0000
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels            34
        bmChannelConfig    0x00000000
        iChannelNames          47
        bmControls         0x0000
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength               146
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                11
        bSourceID               1
        bmaControls(0)    0x00000000
        bmaControls(1)    0x00000000
        bmaControls(2)    0x00000000
        bmaControls(3)    0x00000000
        bmaControls(4)    0x00000000
        bmaControls(5)    0x00000000
        bmaControls(6)    0x00000000
        bmaControls(7)    0x00000000
        bmaControls(8)    0x00000000
        bmaControls(9)    0x00000000
        bmaControls(10)    0x00000000
        bmaControls(11)    0x00000000
        bmaControls(12)    0x00000000
        bmaControls(13)    0x00000000
        bmaControls(14)    0x00000000
        bmaControls(15)    0x00000000
        bmaControls(16)    0x00000000
        bmaControls(17)    0x00000000
        bmaControls(18)    0x00000000
        bmaControls(19)    0x00000000
        bmaControls(20)    0x00000000
        bmaControls(21)    0x00000000
        bmaControls(22)    0x00000000
        bmaControls(23)    0x00000000
        bmaControls(24)    0x00000000
        bmaControls(25)    0x00000000
        bmaControls(26)    0x00000000
        bmaControls(27)    0x00000000
        bmaControls(28)    0x00000000
        bmaControls(29)    0x00000000
        bmaControls(30)    0x00000000
        bmaControls(31)    0x00000000
        bmaControls(32)    0x00000000
        bmaControls(33)    0x00000000
        bmaControls(34)    0x00000000
        iFeature                0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            22
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID              11
        bCSourceID             40
        bmControls         0x0000
        iTerminal               7
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0006  1x 6 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32
      iInterface              4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32
      iInterface              4
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bmControls           0x05
          Active Alternate Setting Control (read-only)
          Valid Alternate Setting Control (read-only)
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            34
        bmChannelConfig    0x00000000
        iChannelNames          13
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x03b8  1x 952 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay         0x0200
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32
      iInterface              4
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bmControls           0x05
          Active Alternate Setting Control (read-only)
          Valid Alternate Setting Control (read-only)
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            18
        bmChannelConfig    0x00000000
        iChannelNames          13
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x03a8  1x 936 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay         0x0200
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32
      iInterface              4
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bmControls           0x05
          Active Alternate Setting Control (read-only)
          Valid Alternate Setting Control (read-only)
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            10
        bmChannelConfig    0x00000000
        iChannelNames          13
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x03e8  1x 1000 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay         0x0200
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32
      iInterface              5
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32
      iInterface              5
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          22
        bmControls           0x05
          Active Alternate Setting Control (read-only)
          Valid Alternate Setting Control (read-only)
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            34
        bmChannelConfig    0x00000000
        iChannelNames          47
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           37
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x03b8  1x 952 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay         0x0200
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32
      iInterface              5
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          22
        bmControls           0x05
          Active Alternate Setting Control (read-only)
          Valid Alternate Setting Control (read-only)
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            18
        bmChannelConfig    0x00000000
        iChannelNames          47
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           37
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x03a8  1x 936 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay         0x0200
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32
      iInterface              5
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          22
        bmControls           0x05
          Active Alternate Setting Control (read-only)
          Valid Alternate Setting Control (read-only)
        bFormatType             1
        bmFormats          0x00000001
          PCM
        bNrChannels            10
        bmChannelConfig    0x00000000
        iChannelNames          47
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           37
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x03e8  1x 1000 bytes
        bInterval               1
        AudioStreaming Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay         0x0200
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      1
      iInterface             12
      Device Firmware Upgrade Interface Descriptor:
        bLength                             9
        bDescriptorType                    33
        bmAttributes                        7
          Will Not Detach
          Manifestation Tolerant
          Upload Supported
          Download Supported
        wDetachTimeout                    250 milliseconds
        wTransferSize                      64 bytes
        bcdDFUVersion                   1.10


Cheers,

Bob


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 2913 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
  2025-07-31 10:11     ` Robert Ham
@ 2025-07-31 14:26       ` Mathias Nyman
  2025-08-02  8:43         ` Robert Ham
  0 siblings, 1 reply; 9+ messages in thread
From: Mathias Nyman @ 2025-07-31 14:26 UTC (permalink / raw)
  To: Robert Ham, Michał Pecio; +Cc: linux-usb

On 31.7.2025 13.11, Robert Ham wrote:
> I managed to sort out the tracing and debug output. Updated kernel log
> and trace:
> 
> https://settrans.net/~rah/misc/xhci-kernel-log-2.txt
> 
> https://settrans.net/~rah/misc/xhci-kernel-trace-2.txt
> 
> 
> On 31/07/2025 09:27, Michał Pecio wrote:
> 
>> Can you post "lsusb -v" for this device?
> 

Looks like The lengths and offsets in the URB, passed by audio driver does
not match the transfer sizes the device reports it will send.

The audio device reports its isoc endpoint will send 1000 bytes
every 125 microseconds:
(from your lsusb)

>        Endpoint Descriptor:
>          bLength                 7
>          bDescriptorType         5
>          bEndpointAddress     0x81  EP 1 IN
>          bmAttributes           37
>            Transfer Type            Isochronous
>            Synch Type               Asynchronous
>            Usage Type               Implicit feedback Data
>          wMaxPacketSize     0x03e8  1x 1000 bytes
>          bInterval               1

Trace shows xhci sets up the endpoint correctly,
expecting 1000 bytes every 125 mictoseconds:

pulseaudio-1435    [000] .....    55.126749: xhci_ring_alloc: ISOC 00000000c42321b6: enq 0x00000002483a2000(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
pulseaudio-1435    [000] .....    55.126750: xhci_add_endpoint: State disabled mult 1 max P. Streams 0 interval 125 us max ESIT payload 1000 CErr 0 Type Isoc IN burst 0 maxp 1000 deq 00000002483a2001 avg trb len 1000

but the URB queued from class driver to xhci doesn't match this.
Looks like one URB contains 8 isoc transfers, (one filled every 125us) but URB expects
only 2880 bytes in total, leading to only 360 bytes per isoc transfer.

I'd take a closer look at the values filled by the audio driver to the
struct usb_iso_packet_descriptor iso_frame_desc[] array, and number_of_packets
in the URB

usbmon might show these, don't remember if it shows all isoc related fields

Trace shoes the URB turned into Isoc TRBs of 360 bytes by xhci driver.
Notice that the Buffer address also increases only by 360 bytes (0x168)
  
55.198885: xhci_urb_enqueue: 3-5.1 ep1in-isoc: urb 0000000052d17659 pipe 33920 slot 3 length 0/2880 sgs 0/0 stream 0 flags 00000204
55.198892: xhci_queue_trb: ISOC: Buffer 0000000104735000 length 360 TD size 0 intr 0 type 'Isoch' flags B:i:I:c:s:I:e:c
55.198892: xhci_inc_enq: ISOC 00000000c42321b6: enq 0x00000002483a2010(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
55.198894: xhci_queue_trb: ISOC: Buffer 0000000104735168 length 360 TD size 0 intr 0 type 'Isoch' flags B:i:I:c:s:I:e:C
55.198894: xhci_inc_enq: ISOC 00000000c42321b6: enq 0x00000002483a2020(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
55.198895: xhci_queue_trb: ISOC: Buffer 00000001047352d0 length 360 TD size 0 intr 0 type 'Isoch' flags B:i:I:c:s:I:e:C
55.198896: xhci_inc_enq: ISOC 00000000c42321b6: enq 0x00000002483a2030(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
55.198897: xhci_queue_trb: ISOC: Buffer 0000000104735438 length 360 TD size 0 intr 0 type 'Isoch' flags B:i:I:c:s:I:e:C
55.198897: xhci_inc_enq: ISOC 00000000c42321b6: enq 0x00000002483a2040(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
55.198899: xhci_queue_trb: ISOC: Buffer 00000001047355a0 length 360 TD size 0 intr 0 type 'Isoch' flags B:i:I:c:s:I:e:C
55.198899: xhci_inc_enq: ISOC 00000000c42321b6: enq 0x00000002483a2050(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
55.198900: xhci_queue_trb: ISOC: Buffer 0000000104735708 length 360 TD size 0 intr 0 type 'Isoch' flags B:i:I:c:s:I:e:C
55.198900: xhci_inc_enq: ISOC 00000000c42321b6: enq 0x00000002483a2060(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
55.198901: xhci_queue_trb: ISOC: Buffer 0000000104735870 length 360 TD size 0 intr 0 type 'Isoch' flags B:i:I:c:s:I:e:C
55.198902: xhci_inc_enq: ISOC 00000000c42321b6: enq 0x00000002483a2070(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
55.198903: xhci_queue_trb: ISOC: Buffer 00000001047359d8 length 360 TD size 0 intr 0 type 'Isoch' flags b:i:I:c:s:I:e:C
55.198903: xhci_inc_enq: ISOC 00000000c42321b6: enq 0x00000002483a2080(0x00000002483a2000) deq 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
55.198903: xhci_ring_ep_doorbell: Ring doorbell for Slot 3 ep1in

The audio device probably sends the 1000 bytes per isoc tranfers as it stated, but
xhci expects 360 bytes, which leads to  buffer overrun errors

55.213952: xhci_handle_event: EVENT: TRB 00000002483a2000 status 'Isoch Buffer Overrun' len 360 slot 3 ep 3 type 'Transfer Event' flags e:C
55.222154: xhci_handle_transfer: ISOC: Buffer 0000000104735000 length 360 TD size 0 intr 0 type 'Isoch' flags B:i:I:c:s:I:e:C

Thanks
Mathias


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
  2025-07-31 10:04   ` Robert Ham
@ 2025-07-31 20:21     ` Michał Pecio
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Pecio @ 2025-07-31 20:21 UTC (permalink / raw)
  To: Robert Ham; +Cc: linux-usb

On Thu, 31 Jul 2025 11:04:40 +0100, Robert Ham wrote:
> On 31/07/2025 09:17, Michał Pecio wrote:
> > Can you mount debugfs and see if you can find the directory below? It
> > would tell if there is anything unusual about those 1 in 65 buffers.
> > 
> > /sys/kernel/debug/usb/xhci/0000:00:14.0/  
> 
> Umm.. and this is with the device connected and snd-usb-audio loaded,
> which might be more helpful :-)
> 
> /sys/kernel/debug/usb/xhci/0000:00:14.0/
> /sys/kernel/debug/usb/xhci/0000:00:14.0/ports
> /sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port01
> /sys/kernel/debug/usb/xhci/0000:00:14.0/ports/port01/portsc
> [...]

Actually, the useful stuff would be contents of some of those files,
but the trace you posted later provides similar information. And it
looks like you will need to dig into snd-usb-audio some more.

FYI, scripts/get_maintainer says that the relevant mailing list for
that driver is linux-sound.

Regards,
Michal

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages
  2025-07-31 14:26       ` Mathias Nyman
@ 2025-08-02  8:43         ` Robert Ham
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Ham @ 2025-08-02  8:43 UTC (permalink / raw)
  To: Mathias Nyman, Michał Pecio; +Cc: linux-usb


[-- Attachment #1.1: Type: text/plain, Size: 2365 bytes --]

On 31/07/2025 15:26, Mathias Nyman wrote:
> On 31.7.2025 13.11, Robert Ham wrote:
>> I managed to sort out the tracing and debug output. Updated kernel log
>> and trace:
>>
>> https://settrans.net/~rah/misc/xhci-kernel-log-2.txt
>>
>> https://settrans.net/~rah/misc/xhci-kernel-trace-2.txt
>>
>>
>> On 31/07/2025 09:27, Michał Pecio wrote:
>>
>>> Can you post "lsusb -v" for this device?
>>
> 
> Looks like The lengths and offsets in the URB, passed by audio driver does
> not match the transfer sizes the device reports it will send.
> 
> The audio device reports its isoc endpoint will send 1000 bytes
> every 125 microseconds:
> (from your lsusb)
> 
>>        Endpoint Descriptor:
>>          bLength                 7
>>          bDescriptorType         5
>>          bEndpointAddress     0x81  EP 1 IN
>>          bmAttributes           37
>>            Transfer Type            Isochronous
>>            Synch Type               Asynchronous
>>            Usage Type               Implicit feedback Data
>>          wMaxPacketSize     0x03e8  1x 1000 bytes
>>          bInterval               1
> 
> Trace shows xhci sets up the endpoint correctly,
> expecting 1000 bytes every 125 mictoseconds:
> 
> pulseaudio-1435    [000] .....    55.126749: xhci_ring_alloc: ISOC
> 00000000c42321b6: enq 0x00000002483a2000(0x00000002483a2000) deq
> 0x00000002483a2000(0x00000002483a2000) segs 2 stream 0 bounce 1000 cycle 1
> pulseaudio-1435    [000] .....    55.126750: xhci_add_endpoint: State
> disabled mult 1 max P. Streams 0 interval 125 us max ESIT payload 1000
> CErr 0 Type Isoc IN burst 0 maxp 1000 deq 00000002483a2001 avg trb len 1000
> 
> but the URB queued from class driver to xhci doesn't match this.
> Looks like one URB contains 8 isoc transfers, (one filled every 125us)
> but URB expects
> only 2880 bytes in total, leading to only 360 bytes per isoc transfer.
> 
> I'd take a closer look at the values filled by the audio driver to the
> struct usb_iso_packet_descriptor iso_frame_desc[] array, and
> number_of_packets
> in the URB

Thanks for your response, that's really helpful.

Cheers,

Bob


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 2913 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-08-02  8:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30 20:02 Audio interface causing "xhci_hcd ... WARN: buffer overrun event" messages Bob Ham
2025-07-31  8:17 ` Michał Pecio
2025-07-31  8:27   ` Michał Pecio
2025-07-31 10:11     ` Robert Ham
2025-07-31 14:26       ` Mathias Nyman
2025-08-02  8:43         ` Robert Ham
2025-07-31  9:56   ` Robert Ham
2025-07-31 10:04   ` Robert Ham
2025-07-31 20:21     ` Michał Pecio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox