Ticket #32 (closed bug: worksforme)

Opened 17 years ago

Last modified 16 years ago

high latency on Focusrite Saffire LE

Reported by: benbooth5 Assigned to: ppalmers
Priority: major Milestone: FFADO 2.0
Component: Version: FreeBoB 1.0.3
Keywords: firebox latency saffire interrupts modules Cc:
The device the bug applies to: Focusrite Saffire LE

Description

Please try using a Focusrite Saffire and verify that the latency is acceptable. Even though qjackctl listed my latency as from 1 to 4 ms, I noticed that the latency seemed much higher.

Change History

08/31/07 00:29:24 changed by ppalmers

  • owner set to ppalmers.
  • status changed from new to assigned.
  • device_name set to Focusrite Saffire LE.

Does this also happen with freebob?

08/31/07 00:44:10 changed by ppalmers

  • version set to FreeBoB 1.0.3.

Adding two relevant messages from freebob-devel

Hi,

I'm trying to figure out how to best set up my Focusrite Saffire LE. I'm still getting occasional Xruns while playing, and the latency seems to be really bad.

Here is my set up:

P4 2.8ghz 512MB Toshiba laptop,
Ubuntu 7.04 with the 2.6.20-16-realtime kernel from the http://www.texware.it repository
I'm using the most recent libfreebob-1.0 from svn with the Saffire and Firepod MIDI fix (revision 513).

/etc/security/limits.conf has this at the end:

@audio - rtprio 99
@audio - memlock 400000
@audio - nice -10

My user is in the audio group.
Here are my qjackctl settings:

realtime enabled, Priority 0, frames/period 64, samplerate 48000, periods/buffer 3, port maximum 128, input latency 0, output latency 0.

The weird thing is qjackctl says the latency should be 4 ms. But I can tell the latency is not that good. In fact, the latency is very high to the point where it is difficult to play anything with my keyboard. For example, if I connect ZynAddSubFX to Jack and try to play, the latency is really high.

Do I need to somehow start every audio app with realtime priority? If so, how do I do that? Also, how can I get rid of the occasional xruns? I get them in the middle of playing, not while starting and stopping programs.

Any advice would be appreciated.

Thanks,
Ben
I've been trying to fix my latency issues. Here are some of my results:

Realtime Priority 70
Frames/Periods 16
Sample Rate 48000
Periods/Buffer 2
qjackctl says my latency should be 0.667 ms
jdelay lists my latency as 16 ms

Realtime Priority 70
Frames/Periods 32
Sample Rate 48000
Periods/Buffer 2
qjackctl says my latency should be 1.33 ms
jdelay lists my latency as 32 ms

Realtime Priority 70
Frames/Periods 64
Sample Rate 48000
Periods/Buffer 2
qjackctl says my latency should be 2.67 ms
jdelay lists my latency as 64 ms

Realtime Priority 70
Frames/Periods 64
Sample Rate 48000
Periods/Buffer 3
qjackctl says my latency should be 4 ms
jdelay lists my latency as 64 ms

Realtime Priority 70
Frames/Periods 64
Sample Rate 48000
Periods/Buffer 4
qjackctl says my latency should be 5.33 ms
jdelay lists my latency as 64 ms

Realtime Priority 70
Frames/Periods 128
Sample Rate 48000
Periods/Buffer 4
qjackctl says my latency should be 5.33 ms
jdelay lists my latency as 128 ms

It seems like my Frames/Periods value is directly related to my latency time in miliseconds. Increasing periods/buffer has no effect on latency.

Also, for some reason the following options are grayed out in qjackctl:
Soft Mode
Monitor
Force 16bit
H/w Monitor
H/W meter
Ignore H/W

Does anyone have any advice? Thanks.

Ben

On 8/6/07, Ben Booth <benbooth5@gmail.com> wrote:

    Hi,

    I'm trying to figure out how to best set up my Focusrite Saffire LE. I'm still getting occasional Xruns while playing, and the latency seems to be really bad.

    Here is my set up:

    P4 2.8ghz 512MB Toshiba laptop,
    Ubuntu 7.04 with the 2.6.20-16-realtime kernel from the http://www.texware.it repository
    I'm using the most recent libfreebob-1.0 from svn with the Saffire and Firepod MIDI fix (revision 513).

    /etc/security/limits.conf has this at the end:

    @audio - rtprio 99
    @audio - memlock 400000
    @audio - nice -10

    My user is in the audio group.
    Here are my qjackctl settings:

    realtime enabled, Priority 0, frames/period 64, samplerate 48000, periods/buffer 3, port maximum 128, input latency 0, output latency 0.

    The weird thing is qjackctl says the latency should be 4 ms. But I can tell the latency is not that good. In fact, the latency is very high to the point where it is difficult to play anything with my keyboard. For example, if I connect ZynAddSubFX to Jack and try to play, the latency is really high.

    Do I need to somehow start every audio app with realtime priority? If so, how do I do that? Also, how can I get rid of the occasional xruns? I get them in the middle of playing, not while starting and stopping programs.

    Any advice would be appreciated.

    Thanks,
    Ben

08/31/07 00:51:09 changed by ppalmers

When running jackd with default parameters (-p1024 -n3) I get a roundtrip latency of 3429 frames between headphone out and the first input. This is as expected since BeBoB on the DM1000 adds approx 360 frames at 48k, and 3x1024+360 = 3432.

I have no idea on what is happening with your device. Do you have another OS to check whether it happens there too?

10/21/07 05:42:07 changed by ppalmers

  • status changed from assigned to closed.
  • resolution set to worksforme.

02/20/08 22:01:12 changed by phobbes

  • status changed from closed to reopened.
  • keywords set to firebox latency.
  • resolution deleted.

I'm experiencing similar(the same?) behavior on my new firebox. It seems to work fine and low-latency for about a minute or so after I start jackd, but then it starts stuttering for 10 seconds or so, and then smooths out but with lots of latency. I've tried both 1.0.3 (ubuntu package) and 1.0.7 downloaded from the website.

I'm using the ubuntu linux-rt kernel

02/20/08 22:02:30 changed by phobbes

  • keywords changed from firebox latency to firebox latency saffire.

ack, i thought the keywords were only for my post, not the whole thread

02/21/08 15:19:37 changed by phobbes

  • keywords changed from firebox latency saffire to firebox latency saffire interrupts modules.
  • status changed from reopened to closed.
  • resolution set to worksforme.

seems to have cleared up after unloading modules both for my onboard sound and wifi, both of which were on the same interrupt as my firewire controller. Thanks freebob/ffado! I'll restore the status to worksforme.