From: Daniel Mack <zonque@gmail.com>
To: Grant Diffey <gdiffey@gmail.com>
Cc: alsa-devel@alsa-project.org, Felix Homann <linuxaudio@showlabor.de>
Subject: Re: Fast Track Ultra latency and new streaming logic.
Date: Wed, 02 May 2012 10:41:39 +0200 [thread overview]
Message-ID: <4FA0F343.3060702@gmail.com> (raw)
In-Reply-To: <CACckToWK=Si8-8rPKgo-ZWA+ncTVb7zW8jHZvf7VbKT1sMM32Q@mail.gmail.com>
On 01.05.2012 02:18, Grant Diffey wrote:
> In continuing my personal habit of looking gift horses in the mouth...
Testing is much appreciated :)
> I can't seem to get below 512frames in flight (2 256sample frames or 4
> 128 or 8 64's) without consistant overruns.
>
> I have a feeling that the pcm <-> urb layer is buffering until a urb is
> max urbsize from a quick look at the code does this seem like the right
> track?
No, it doesn't. The implicit feedback streaming model waits for capture
urbs to arrive and then sends back an urb with the same amount of data
for playback. Hence, the number of bytes per playback urb is defined by
the device and the stream it sends to the host.
> This leads to rather high latencies (22ms+) or is this conclusion bogus?
The urb length can't possibly lead to such latencies. With a sample
frequency of 44100 Hz and a stereo stream @16bit, we're dealing with a
data rate of 176400 bytes/s. Even with max urbsizes of 512 bytes, an urb
can only hold ~2,9ms of audio data. With more streams, higher sample
rates or deeper samples, this number is declining. So this can't be the
reason.
Also, I doubt that the rewrite of the streaming code is to blame for
what you're seeing, as it just changed the logical view on internal
structures. The streaming behaviour itself should remain the same.
What you could do, though, is disabling the FTU quirk in
sound/usb/pcm.c:set_format(). That should in theory restore the old
streaming logic. Does that change anything?
Daniel
next prev parent reply other threads:[~2012-05-02 8:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 0:18 Fast Track Ultra latency and new streaming logic Grant Diffey
2012-05-01 13:09 ` Felix Homann
2012-05-02 8:41 ` Daniel Mack [this message]
2012-05-03 8:39 ` Felix Homann
2012-05-03 14:03 ` Felix Homann
[not found] ` <CAFz=ag4j2OZTZqzeo+h210AaVgToA93hTs5QPL1UPHCCCLJkZg@mail.gmail.com>
2012-05-09 13:12 ` Takashi Iwai
2012-05-09 18:13 ` Felix Homann
2012-05-09 15:07 ` Felix Homann
2012-05-03 14:13 ` Clemens Ladisch
[not found] ` <CAFz=ag7fvr5+Pz0jePNZ+7xhXZ7n1Td4v3=ZZFQcb6Sqy+RQXw@mail.gmail.com>
2012-05-03 15:21 ` Clemens Ladisch
-- strict thread matches above, loose matches on Subject: below --
2012-05-08 17:07 Aurélien Leblond
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=4FA0F343.3060702@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=gdiffey@gmail.com \
--cc=linuxaudio@showlabor.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).