aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dapm.h3
-rw-r--r--include/sound/soc.h28
2 files changed, 26 insertions, 5 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index bf4cf0c1d37f..f8223fae5804 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -221,7 +221,8 @@ int snd_soc_dapm_add_routes(struct snd_soc_codec *codec,
221/* dapm events */ 221/* dapm events */
222int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, char *stream, 222int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, char *stream,
223 int event); 223 int event);
224int snd_soc_dapm_device_event(struct snd_soc_device *socdev, int event); 224int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
225 enum snd_soc_bias_level level);
225 226
226/* dapm sys fs - used by the core */ 227/* dapm sys fs - used by the core */
227int snd_soc_dapm_sys_add(struct device *dev); 228int snd_soc_dapm_sys_add(struct device *dev);
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 73accbcfbd2d..bca9538d9e50 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -103,6 +103,24 @@
103 .private_value = (unsigned long)&xenum } 103 .private_value = (unsigned long)&xenum }
104 104
105/* 105/*
106 * Bias levels
107 *
108 * @ON: Bias is fully on for audio playback and capture operations.
109 * @PREPARE: Prepare for audio operations. Called before DAPM switching for
110 * stream start and stop operations.
111 * @STANDBY: Low power standby state when no playback/capture operations are
112 * in progress. NOTE: The transition time between STANDBY and ON
113 * should be as fast as possible and no longer than 10ms.
114 * @OFF: Power Off. No restrictions on transition times.
115 */
116enum snd_soc_bias_level {
117 SND_SOC_BIAS_ON,
118 SND_SOC_BIAS_PREPARE,
119 SND_SOC_BIAS_STANDBY,
120 SND_SOC_BIAS_OFF,
121};
122
123/*
106 * Digital Audio Interface (DAI) types 124 * Digital Audio Interface (DAI) types
107 */ 125 */
108#define SND_SOC_DAI_AC97 0x1 126#define SND_SOC_DAI_AC97 0x1
@@ -356,7 +374,8 @@ struct snd_soc_codec {
356 struct mutex mutex; 374 struct mutex mutex;
357 375
358 /* callbacks */ 376 /* callbacks */
359 int (*dapm_event)(struct snd_soc_codec *codec, int event); 377 int (*set_bias_level)(struct snd_soc_codec *,
378 enum snd_soc_bias_level level);
360 379
361 /* runtime */ 380 /* runtime */
362 struct snd_card *card; 381 struct snd_card *card;
@@ -378,8 +397,8 @@ struct snd_soc_codec {
378 /* dapm */ 397 /* dapm */
379 struct list_head dapm_widgets; 398 struct list_head dapm_widgets;
380 struct list_head dapm_paths; 399 struct list_head dapm_paths;
381 unsigned int dapm_state; 400 enum snd_soc_bias_level bias_level;
382 unsigned int suspend_dapm_state; 401 enum snd_soc_bias_level suspend_bias_level;
383 struct delayed_work delayed_work; 402 struct delayed_work delayed_work;
384 403
385 /* codec DAI's */ 404 /* codec DAI's */
@@ -449,7 +468,8 @@ struct snd_soc_machine {
449 int (*resume_post)(struct platform_device *pdev); 468 int (*resume_post)(struct platform_device *pdev);
450 469
451 /* callbacks */ 470 /* callbacks */
452 int (*dapm_event)(struct snd_soc_machine *, int event); 471 int (*set_bias_level)(struct snd_soc_machine *,
472 enum snd_soc_bias_level level);
453 473
454 /* CPU <--> Codec DAI links */ 474 /* CPU <--> Codec DAI links */
455 struct snd_soc_dai_link *dai_link; 475 struct snd_soc_dai_link *dai_link;