From: Jarkko Nikula Date: Thu, 8 May 2014 13:07:21 +0000 (+0300) Subject: ASoC: Intel: Sample Baytrail DSP DMA pointer only after each period X-Git-Tag: firefly_0821_release~176^2~3750^2~24^2~7^3~23 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c83649e3cdb6e78cfbc3abda7207ff44ba7bea75;hp=c83649e3cdb6e78cfbc3abda7207ff44ba7bea75;p=firefly-linux-kernel-4.4.55.git ASoC: Intel: Sample Baytrail DSP DMA pointer only after each period This is for preparing suspend/resume support but can give also more safeguard against concurrent timestamp structure access between DSP firmware and host. Now DSP DMA pointer is sampled in each pcm pointer callback in sst_byt_pcm_pointer() but that is unneeded since DSP updates the timestamp period basis and can potentially be racy if sst_byt_pcm_pointer() is called when DSP is updating the timestamp. By taking DSP DMA pointer only after period elapsed IPC messages in byt_notify_pointer() and returning stored hw pointer in sst_byt_pcm_pointer() there is less risk for concurrent access. The same stored hw pointer can be also used in suspend/resume code for restarting the stream at the same position. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown ---