alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: core - Add platform component mutex.
@ 2012-03-06 18:16 Liam Girdwood
  2012-03-06 18:16 ` [PATCH 2/2] ASoC: DAPM - Make sure DAPM widget IO ops hold the " Liam Girdwood
  2012-03-06 20:09 ` [PATCH 1/2] ASoC: core - Add platform " Mark Brown
  0 siblings, 2 replies; 16+ messages in thread
From: Liam Girdwood @ 2012-03-06 18:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Liam Girdwood

Add mutex support for platform IO operations. e.g. can be used
for platform DAPM widget IO ops.

Signed-off-by: Liam Girdwood <lrg@ti.com>
---
 include/sound/soc.h  |    1 +
 sound/soc/soc-core.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 82bd773..2ebf787 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -718,6 +718,7 @@ struct snd_soc_platform {
 	int id;
 	struct device *dev;
 	struct snd_soc_platform_driver *driver;
+	struct mutex mutex;
 
 	unsigned int suspended:1; /* platform is suspended */
 	unsigned int probed:1;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 7978f6c..c90bb01 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3382,6 +3382,7 @@ int snd_soc_register_platform(struct device *dev,
 	platform->dapm.dev = dev;
 	platform->dapm.platform = platform;
 	platform->dapm.stream_event = platform_drv->stream_event;
+	mutex_init(&platform->mutex);
 
 	mutex_lock(&client_mutex);
 	list_add(&platform->list, &platform_list);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-03-12 10:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-06 18:16 [PATCH 1/2] ASoC: core - Add platform component mutex Liam Girdwood
2012-03-06 18:16 ` [PATCH 2/2] ASoC: DAPM - Make sure DAPM widget IO ops hold the " Liam Girdwood
2012-03-06 20:03   ` Mark Brown
2012-03-07 10:11     ` Liam Girdwood
2012-03-07 10:54       ` Mark Brown
2012-03-07 11:13         ` Liam Girdwood
2012-03-07 20:00           ` Mark Brown
2012-03-09 17:26   ` Tabi Timur-B04825
2012-03-09 18:14     ` Liam Girdwood
2012-03-09 19:11       ` Timur Tabi
2012-03-11 12:55         ` Mark Brown
2012-03-11 13:58           ` Tabi Timur-B04825
2012-03-12  9:12           ` Shawn Guo
2012-03-12  9:27             ` Liam Girdwood
2012-03-12 10:42               ` Mark Brown
2012-03-06 20:09 ` [PATCH 1/2] ASoC: core - Add platform " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).