All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
To: jamesm <jamesm@filmlight.ltd.uk>
Cc: alsa-devel@alsa-project.org
Subject: Re: Issue with RME HDSPe AIO latency
Date: Mon, 07 May 2012 18:32:43 +0200	[thread overview]
Message-ID: <4FA7F92B.8090107@drcomp.erfurt.thur.de> (raw)
In-Reply-To: <966796f1b91b7bc3fee7ce5b7779be75@filmlight.ltd.uk>

On 04/30/2012 06:03 PM, jamesm wrote:

> Hello all,

Hi!

> The latest hdspm driver code from alsa and kernel.org indicates that
> the HDSPe AIO card has a fixed buffer size of 16384. I've chosen a
> period size of 1024, which gives me 16 periods.

Exactly.

> The issue I have is that whenever I play audio through the hdspm
> driver, the delay between the hw pointer and sw pointer is always close
> to the maximum buffer size (approx 16000). This leaves me with a large
> delay between writing data into the PCM and it coming out of the card.
> I'd like this to be between 1024 and 2048, I could probably crank the
> period down further to 512.

I suggest to try jackd1 and see if you can achieve the desired latency.
There's a tool jack_iodelay that helps you to measure the round trip
latency.

If it works, have a look at the code in drivers/alsa/ how jackd
configures the device.

I don't know what happened in alsa-lib between 1.0.17 and 1.0.25 wrt to
PCM streams, so if in doubt, update that library, too, maybe on a
different system if you don't want to touch your RHEL-5.5 installation.

> Does anyone have any suggestions as to why the hdspm driver hw pointer
> is not following the application pointer more closely?

The hw pointer is the hw pointer, it's the hardware, not the driver.
The hardware just cycles through its 16k sample buffer, so it's up to
the software (read: alsa-lib and/or application) to write to the
appropriate address.

It works just fine here on my RayDAT (also has a 16k sample buffer) down
to 32 samples per period via the MMAP interface.


Cheers

  reply	other threads:[~2012-05-07 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 16:03 Issue with RME HDSPe AIO latency jamesm
2012-05-07 16:32 ` Adrian Knoth [this message]
2012-05-07 17:02   ` James Milne

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=4FA7F92B.8090107@drcomp.erfurt.thur.de \
    --to=adi@drcomp.erfurt.thur.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=jamesm@filmlight.ltd.uk \
    /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.