All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Monitoring ALSA's write pointer (appl_ptr)?
       [not found] <20081103234028.PAVUM.84220.imail@fed1rmwml28>
@ 2008-11-04 16:33 ` Takashi Iwai
  2008-11-05  3:10   ` Brian Welch
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2008-11-04 16:33 UTC (permalink / raw)
  To: brian-welch; +Cc: alsa-devel

At Mon, 3 Nov 2008 23:40:28 -0500,
<brian-welch@cox.net> wrote:
> 
> Hello List,
> 
> My first post, so excuse any ignorance.
> 
> Is there a definitive/safe way to monitor ALSA's write pointer in the 
> dma_area?  It seems like the ack callback and the appl_ptr is the 
> correct way, but I was told by another developer that appl_ptr doesn't 
> work in all cases.
> 
> As a future optimization for my hardware, I may want to tell ALSA to use 
> a specific area of physical memory for it's dma_area, what is the best 
> way to do that?

A good question.  The ack callback is called only when the explicit
read/write method is used.  When mmap access is used, it won't be
called.

One hack would be to check appl_ptr in the pointer callback.  This
callback is called in snd_pcm_hwsync(), too.  So, if you watch the
appl_ptr change as frequently as possible, it'd be a good place for
that.


Takashi

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

* Re: Monitoring ALSA's write pointer (appl_ptr)?
  2008-11-04 16:33 ` Monitoring ALSA's write pointer (appl_ptr)? Takashi Iwai
@ 2008-11-05  3:10   ` Brian Welch
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Welch @ 2008-11-05  3:10 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel


>> Is there a definitive/safe way to monitor ALSA's write pointer in the
>> dma_area?  It seems like the ack callback and the appl_ptr is the
>> correct way, but I was told by another developer that appl_ptr doesn't
>> work in all cases.
>>
>> As a future optimization for my hardware, I may want to tell ALSA to use
>> a specific area of physical memory for it's dma_area, what is the best
>> way to do that?
>
> A good question.  The ack callback is called only when the explicit
> read/write method is used.  When mmap access is used, it won't be
> called.
>
> One hack would be to check appl_ptr in the pointer callback.  This
> callback is called in snd_pcm_hwsync(), too.  So, if you watch the
> appl_ptr change as frequently as possible, it'd be a good place for
> that.
>
> Takashi

Thanks.  I'll try reading appl_ptr from within the pointer callback.

Brian 

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

end of thread, other threads:[~2008-11-05  3:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20081103234028.PAVUM.84220.imail@fed1rmwml28>
2008-11-04 16:33 ` Monitoring ALSA's write pointer (appl_ptr)? Takashi Iwai
2008-11-05  3:10   ` Brian Welch

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.