Skip to content
Commit c83649e3 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Mark Brown
Browse files

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: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent b9d4cf74
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment