On Tue, Aug 18, 2015 at 05:33:33PM +0000, Fang, Yang A wrote:
We should not read sst hw_ptr and pcm_delay in sst_platform_pcm_pointer Since it will be ricky if sst_platform_pcm_pointer is called while dsp is updating the timestamp.Now read sst hw_ptr after period elapse interrupt occurs.
So I guess there's still some risk that we could run into problems here if we take too long to service the interrupt and/or the period is very short? Is there anything we can do to improve that?
I think before and after the patch. There is no difference in term of handling the period elapse interrupt . because before the patch sst_period_elapsed calls the snd_pcm_period_elapsed which in turn calling the sst_platform_pcm_pointer which calls the stream_read_tstamp.
I'm not sure I understand what the patch fixes then? My concern is that we're just moving the timing around which changes but doesn't address the race condition.