All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Daniel Griscom <griscom@suitable.com>
Cc: Alsa Developer <alsa-devel@alsa-project.org>,
	Daniel Mack <zonque@gmail.com>
Subject: Re: Missing exactly 3 of 8 audio packets?
Date: Sun, 06 Jan 2013 18:42:03 +0100	[thread overview]
Message-ID: <50E9B76B.5030107@ladisch.de> (raw)
In-Reply-To: <p06240802ccdd6fe50ce5@[192.168.1.8]>

Sorry for the delay.

Daniel Griscom wrote:
> I'd like to conclude this thread if I could. It seems clear that
> configuring our USB audio card's descriptor with a bInterval value of
> 1 (a packet every microframe) was too aggressive, and was part of what
> caused the packet stuttering issue. (Right?)

Yes.

> We almost certainly should increase bInterval; I'll try 2, and if that
> seems stable will probably go to 3 (4 microframes) for some margin.
> However, I'm still concerned that the symptoms don't sound like
> a simple starvation issue, where I'd expect to have a missing frame
> every once in a while. Instead, we were seeing reliable operation
> interspersed with periods where lots of packets were being consistently
> omitted. To me, this suggests that there's some other issue going on,
> either in the USB stack or in the USB hardware itself.

The starvation seems to be in either the memory controller or in the
coherence traffic between the MC and the CPU cache.  I'd guess that
something else does enough I/O to affect this.

As I've already said, the pattern could be explained by some memory
read packet arriving too late at the USB controller, thus not only
making it impossible to send the current packet, but also delaying the
memory accesses of the next packet.

> Given that, I'm worried that increasing bInterval will just move the
> symptoms around, making it harder to duplicate but not truly becoming
> robust.

You could try to trigger the problem by doing many memory access (more
than fit into the cache), or by doing I/O through other PCI devices.

But if increasing bInterval works, you can be sure that some effect of
the increased USB transaction management is responsible for the problem.


Regards,
Clemens

  reply	other threads:[~2013-01-06 17:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 20:35 Missing exactly 3 of 8 audio packets? Daniel Griscom
2013-01-06 17:42 ` Clemens Ladisch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-11-21 20:13 Daniel Griscom
2012-11-22 21:01 ` Daniel Mack
2012-11-22 21:32 ` Daniel Mack
2012-11-25  3:33   ` Daniel Griscom
2012-11-25 12:43     ` Daniel Mack
2012-11-25 16:39       ` Clemens Ladisch
2012-11-26  3:14         ` Daniel Griscom
2012-11-26 21:32           ` Clemens Ladisch
2012-11-25 22:23       ` Daniel Griscom
2012-11-26  7:19         ` Daniel Mack
2012-11-26 21:23           ` Daniel Griscom
2012-11-27 11:48             ` [alsa-devel] " Daniel Mack
2012-11-27 17:01               ` Daniel Griscom
2012-11-27 17:21                 ` Clemens Ladisch
2012-11-27 18:40                   ` Daniel Griscom
2012-11-27 19:46                     ` Clemens Ladisch
2012-11-27 20:10                       ` Daniel Griscom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50E9B76B.5030107@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=griscom@suitable.com \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.