[alsa-devel] Could you help me about the ALSA?

Zhang wei zhangwei at vimicro.com
Mon Dec 17 10:43:50 CET 2012


 

> 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



More information about the Alsa-devel mailing list