aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-22 08:06:30 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-22 13:20:57 -0400
commitd5021ec9fc32edc6f512c2375923d757e9825f6a (patch)
treee3e216f8f39d724dfb6e41cc2d1158cdc5aa3319 /include/sound/soc.h
parentc96907f21f26a1f8c1a1a9096a22500e4d158c4f (diff)
ASoC: Add a notifier for jack status changes
Some systems provide both mechanical and electrical detection of jack status changes. On such systems power savings can be achieved by only enabling the electrical detection methods when physical insertion has been detected. Begin supporting such systems by providing a notifier for jack status changes which can be used to trigger any reconfiguration. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index b8bac6ae6244..80dfac162723 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -15,6 +15,7 @@
15 15
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/notifier.h>
18#include <linux/workqueue.h> 19#include <linux/workqueue.h>
19#include <linux/interrupt.h> 20#include <linux/interrupt.h>
20#include <linux/kernel.h> 21#include <linux/kernel.h>
@@ -261,6 +262,10 @@ int snd_soc_jack_new(struct snd_soc_card *card, const char *id, int type,
261void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask); 262void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask);
262int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count, 263int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
263 struct snd_soc_jack_pin *pins); 264 struct snd_soc_jack_pin *pins);
265void snd_soc_jack_notifier_register(struct snd_soc_jack *jack,
266 struct notifier_block *nb);
267void snd_soc_jack_notifier_unregister(struct snd_soc_jack *jack,
268 struct notifier_block *nb);
264#ifdef CONFIG_GPIOLIB 269#ifdef CONFIG_GPIOLIB
265int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, 270int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
266 struct snd_soc_jack_gpio *gpios); 271 struct snd_soc_jack_gpio *gpios);
@@ -364,6 +369,7 @@ struct snd_soc_jack {
364 struct snd_soc_card *card; 369 struct snd_soc_card *card;
365 struct list_head pins; 370 struct list_head pins;
366 int status; 371 int status;
372 struct blocking_notifier_head notifier;
367}; 373};
368 374
369/* SoC PCM stream information */ 375/* SoC PCM stream information */