From: "Steve Spano" <steve@fl-eng.com>
To: alsa-devel@alsa-project.org
Subject: ### Question on HW Pointer
Date: Tue, 5 Oct 2010 20:35:15 -0400 [thread overview]
Message-ID: <001201cb64ee$5beec5c0$13cc5140$@fl-eng.com> (raw)
Hello Folks,
I am wondering if someone can help clarify how the hw pointer is used by the
ALSA layer.
I have a 24 channel soundcard that we have developed, using a Xilinx fpga.
The system is working, in that I can receive inbound samples on all 24
inputs and transmit samples on all 24 outputs.
But something isn't completely right.
We can xrun's and reports of very high cpu utilization.even though I know we
are in and out of our interrupts within 100uS for a 2.7mS interrupt period.
Interesting that our xruns cite a "0mS delay" or sometimes a 4mS delay (1.5
periods?)
I think the issue has to do with how we are presenting the response to the
hw-pointer request OR how/when we are calling the pcm_snd_elapsed.
I think the flow should be as follows (lets consider the dac part)
Step #1 ) interrupt occurs
Step #2) dma/transfer begins as kicked off in interrupt routine
Step #3) we advance the buffer pointer for the alsa buffer
Step #4) we exit the interrupt
. then the hardware should start advancing its pointer as it is reading the
new samples
.. then sometime later, the alsa layer calls the "hw_pointer" function
And then we return the current value of the hardware pointer from the board?
So alsa knows how many samples the board has processed from the interrupt?
We should be pretty close, because it is working for the most part..but I
think this pointer is not right.
Can someone explain how this pointer/etc is supposed to flow and what alsa
may be using it for? Maybe some latency calculation in a an upper layer?
Thanks again
Steve Spano
next reply other threads:[~2010-10-06 0:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 0:35 Steve Spano [this message]
2010-10-06 6:46 ` ### Question on HW Pointer Clemens Ladisch
2010-10-06 7:15 ` Eliot Blennerhassett
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='001201cb64ee$5beec5c0$13cc5140$@fl-eng.com' \
--to=steve@fl-eng.com \
--cc=alsa-devel@alsa-project.org \
/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.