Skip to contentSkip to conversation

pcm_lib.c . how does delta show wrong int. ack?

DISCUSSION Pannaga Bhushan 1 participant 1 message Oct 21, 2002

lore
Share & tools
lore
#0 lore raw

Hi all,
In the file pcm_lib.c and in the funtion -
snd_pcm_hw_ptr_interrupt() , there are the following lines --

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

delta = hw_ptr_interrupt - new_hw_ptr;
if(delta > 0) {
if( delta < runtime->buffer_size / 2) {
snd_printd("Unexpected hw_pointer value .... wrong interrupt

acknowledge?\n"...);
        return 0;
    }
    runtime->hw_ptr_base += runtime->buffer_size;
    -------
    ------
    -------
}

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

Can you pls clarify what these lines are doing? what is the significance of delta and the significance of delta > 0 but less than
runtime->buffer_size/2 being a case of wrong interrupt ack.

thanx in advance,
Pannaga Bhushan

-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD