alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Re: Could you help me about the ALSA?
@ 2012-12-17  9:43 Zhang wei
  0 siblings, 0 replies; 8+ messages in thread
From: Zhang wei @ 2012-12-17  9:43 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: ALSA development

 

> Yes,when buffer_size wraped the 'pos' is smallar than last one.If we

> want to confirm the hw_base need to adjust there must be consider

> another confidition:

> 

> hdelta = jiffies - runtime->hw_ptr_jiffies;

> 

>               if (hdelta > runtime->hw_ptr_buffer_jiffies/2)

> 

> how to connect this code with checking unnormal interrupt(lost or
delayed)?

 

This condition is for the double interrupt acknowledge problems (see

comment). It makes sure, that the DMA buffer position was wrapped using

another external timing source. Indeed, it's mostly a lowlevel driver

fault to call this pointer update routine with the in_interrupt flag

when the period was not really elapsed.

 

--------------------------------------

I am sorry. I forget signed my info and this mail sent  by me.

 

Yes,I saw the comment and known the target of the pices of code and
known alsa use jiffies as another timing source to detect the wrap
situation,but I do not understand how to detect or check that case.In
other word,why does alsa use the value runtime->hw_ptr_buffer_jiffies/2
not runtime->hw_ptr_buffer_jiffies/3 or runtime->hw_ptr_buffer_jiffies/4
...?

 

Best Regards

zw

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

end of thread, other threads:[~2012-12-17  9:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <6B947C8AC4195040A8C6876A496C644A07BAB641@BJ-MAIL-04.vimicro.com>
2012-12-14  8:36 ` Could you help me about the ALSA? Jaroslav Kysela
2012-12-14  8:55   ` 答复: " Zhang wei
2012-12-14  9:46     ` Jaroslav Kysela
2012-12-14 10:46       ` Zhang wei
2012-12-14 11:01         ` Jaroslav Kysela
2012-12-16 14:13           ` l9jj
2012-12-17  2:09           ` Zhang wei
2012-12-17  9:43 Zhang wei

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