* how to update hw_ptr and appl_ptr
@ 2012-06-26 5:40 Zhen Fu
2012-06-26 9:34 ` Clemens Ladisch
0 siblings, 1 reply; 7+ messages in thread
From: Zhen Fu @ 2012-06-26 5:40 UTC (permalink / raw)
To: alsa-devel@alsa-project.org; +Cc: Zhen Fu
Hi developer,
I recently look the function snd_pcm_update_hw_ptr0 want to find how to update status->hw_ptr and control->appl_ptr. If you have to know this, can you tell me? Thank you very much.
--
Best Regards,
Zhen Fu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to update hw_ptr and appl_ptr
2012-06-26 5:40 how to update hw_ptr and appl_ptr Zhen Fu
@ 2012-06-26 9:34 ` Clemens Ladisch
2012-06-26 9:37 ` Zhen Fu
2012-06-26 9:43 ` Zhen Fu
0 siblings, 2 replies; 7+ messages in thread
From: Clemens Ladisch @ 2012-06-26 9:34 UTC (permalink / raw)
To: Zhen Fu; +Cc: alsa-devel@alsa-project.org
Zhen Fu wrote:
> I recently look the function snd_pcm_update_hw_ptr0 want to find how
> to update status->hw_ptr and control->appl_ptr.
status->hw_ptr is updated by snd_pcm_update_hw_ptr0. control->appl_ptr
is updated by snd_pcm_lib_write1.
Why are you asking?
Regards,
Clemens
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to update hw_ptr and appl_ptr
2012-06-26 9:34 ` Clemens Ladisch
@ 2012-06-26 9:37 ` Zhen Fu
2012-06-26 9:43 ` Zhen Fu
1 sibling, 0 replies; 7+ messages in thread
From: Zhen Fu @ 2012-06-26 9:37 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel@alsa-project.org
Yes, I know this. I want to know how about updated by snd_pcm_update_hw_ptr0.
--
Best Regards,
Zhen Fu
-----Original Message-----
From: Clemens Ladisch [mailto:clemens@ladisch.de]
Sent: Tuesday, June 26, 2012 5:35 PM
To: Zhen Fu
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] how to update hw_ptr and appl_ptr
Zhen Fu wrote:
> I recently look the function snd_pcm_update_hw_ptr0 want to find how
> to update status->hw_ptr and control->appl_ptr.
status->hw_ptr is updated by snd_pcm_update_hw_ptr0. control->appl_ptr
is updated by snd_pcm_lib_write1.
Why are you asking?
Regards,
Clemens
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to update hw_ptr and appl_ptr
2012-06-26 9:34 ` Clemens Ladisch
2012-06-26 9:37 ` Zhen Fu
@ 2012-06-26 9:43 ` Zhen Fu
2012-06-26 12:27 ` Clemens Ladisch
1 sibling, 1 reply; 7+ messages in thread
From: Zhen Fu @ 2012-06-26 9:43 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel@alsa-project.org, Zhen Fu
I recently write squ driver and when DMA handler called snd_pcm_period_elapsed, so I want to know how about update hw_ptr in ALSA.
--
Best Regards,
Zhen Fu
-----Original Message-----
From: Clemens Ladisch [mailto:clemens@ladisch.de]
Sent: Tuesday, June 26, 2012 5:35 PM
To: Zhen Fu
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] how to update hw_ptr and appl_ptr
Zhen Fu wrote:
> I recently look the function snd_pcm_update_hw_ptr0 want to find how
> to update status->hw_ptr and control->appl_ptr.
status->hw_ptr is updated by snd_pcm_update_hw_ptr0. control->appl_ptr
is updated by snd_pcm_lib_write1.
Why are you asking?
Regards,
Clemens
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to update hw_ptr and appl_ptr
2012-06-26 9:43 ` Zhen Fu
@ 2012-06-26 12:27 ` Clemens Ladisch
2012-06-27 3:13 ` Zhen Fu
0 siblings, 1 reply; 7+ messages in thread
From: Clemens Ladisch @ 2012-06-26 12:27 UTC (permalink / raw)
To: Zhen Fu; +Cc: alsa-devel
Zhen Fu wrote:
> when DMA handler called snd_pcm_period_elapsed, so I want to know how
> about update hw_ptr in ALSA.
snd_pcm_period_elapsed() calls snd_pcm_update_hw_ptr0(), which calls
your driver's .pointer callback. The value returned by that callback
essentially is the hw_ptr (although it doesn't wrap around at the end
of the buffer).
Why do you care about hw_ptr?
Regards,
Clemens
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to update hw_ptr and appl_ptr
2012-06-26 12:27 ` Clemens Ladisch
@ 2012-06-27 3:13 ` Zhen Fu
2012-06-27 19:24 ` Clemens Ladisch
0 siblings, 1 reply; 7+ messages in thread
From: Zhen Fu @ 2012-06-27 3:13 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel@alsa-project.org, Zhen Fu
Because when I use aplay playback wav file, appear underrun phenomenon. So I want to ALSA driver how to handle xrun.
--
Best Regards,
Zhen Fu
-----Original Message-----
From: Clemens Ladisch [mailto:clemens@ladisch.de]
Sent: Tuesday, June 26, 2012 8:27 PM
To: Zhen Fu
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] how to update hw_ptr and appl_ptr
Zhen Fu wrote:
> when DMA handler called snd_pcm_period_elapsed, so I want to know how
> about update hw_ptr in ALSA.
snd_pcm_period_elapsed() calls snd_pcm_update_hw_ptr0(), which calls
your driver's .pointer callback. The value returned by that callback
essentially is the hw_ptr (although it doesn't wrap around at the end
of the buffer).
Why do you care about hw_ptr?
Regards,
Clemens
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: how to update hw_ptr and appl_ptr
2012-06-27 3:13 ` Zhen Fu
@ 2012-06-27 19:24 ` Clemens Ladisch
0 siblings, 0 replies; 7+ messages in thread
From: Clemens Ladisch @ 2012-06-27 19:24 UTC (permalink / raw)
To: Zhen Fu; +Cc: alsa-devel@alsa-project.org
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Zhen Fu wrote:
> Because when I use aplay playback wav file, appear underrun phenomenon. So I want to ALSA driver how to handle xrun.
The most likely reason is that the .pointer callback returns wrong values.
Regards,
Clemens
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-27 19:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-26 5:40 how to update hw_ptr and appl_ptr Zhen Fu
2012-06-26 9:34 ` Clemens Ladisch
2012-06-26 9:37 ` Zhen Fu
2012-06-26 9:43 ` Zhen Fu
2012-06-26 12:27 ` Clemens Ladisch
2012-06-27 3:13 ` Zhen Fu
2012-06-27 19:24 ` Clemens Ladisch
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.