Hi,
I see the following behavior and have a couple of questions that would help me debug my new driver/hardware.
snd_pcm_lib_read1() - > snd_pcm_update_hw_ptr() ->ops->ack() This enables the driver to send data to hardware for capture snd_pcm_period_elapsed() -> hw_ptr_interrupt This updates the runtime->hw_ptr_jiffies. The jdelta calculated is proper and I find no issues with this. snd_pcm_lib_read1() is returned back
Alsa calls driver's ack inbetween here snd_pcm_period_elapsed() -> snd_pcm_update_ hw_ptr_interrupt This updates the runtime->hw_ptr_jiffies. The jdelta calculated is proper and I find no issues with this.
snd_pcm_lib_read1() - > snd_pcm_update_ hw_ptr() Here the runtime->hw_ptr_jiffies is updated and this causes my next jdelta to be very less in snd_pcm_period_elapsed() -> snd_pcm_update_hw_ptr_interrupt.
Why is runtime->hw_ptr_jiffies updated in hw_ptr()? This should be only updated in the interrupt context right? Without this statement, my driver/hardware works fine. Or is there any constraint I can set somehow such that the hw_ptr_jiffies is only updated in the hw_ptr_interrupt function?
Thanks, Harsha