ANDROID: GKI: ALSA: pcm: add locks for accessing runtime resource

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

Change-Id: I8db743303ceb50205d62adfc02caf6ecab635d47
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Bug: 151372815
(cherry picked from commit f5879f2128)
Signed-off-by: Saravana Kannan <saravanak@google.com>
This commit is contained in:
Karthikeyan Mani 2017-09-28 10:54:21 -07:00 committed by Saravana Kannan
parent 8898725bba
commit 8c62976a01

View file

@ -476,6 +476,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 */