ALSA: pcm: add locks for accessing runtime resource

Add spin lock to resolve race conditions while
accessing substream runtime resource.

CRs-fixed: 2112713
Change-Id: I8db743303ceb50205d62adfc02caf6ecab635d47
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
This commit is contained in:
Karthikeyan Mani 2017-11-28 18:07:44 -08:00
parent 2e22873571
commit 4e0e2d6a6e

View file

@ -466,6 +466,7 @@ struct snd_pcm_substream {
const struct snd_pcm_ops *ops;
/* -- runtime information -- */
struct snd_pcm_runtime *runtime;
spinlock_t runtime_lock;
/* -- timer section -- */
struct snd_timer *timer; /* timer */
unsigned timer_running: 1; /* time is running */