alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* ### Question on HW Pointer
@ 2010-10-06  0:35 Steve Spano
  2010-10-06  6:46 ` Clemens Ladisch
  2010-10-06  7:15 ` Eliot Blennerhassett
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Spano @ 2010-10-06  0:35 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-06  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06  0:35 ### Question on HW Pointer Steve Spano
2010-10-06  6:46 ` Clemens Ladisch
2010-10-06  7:15 ` Eliot Blennerhassett

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).