aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h39
1 files changed, 33 insertions, 6 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 3a4bd3a3c68..6424b10ac29 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -203,6 +203,16 @@
203 SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues) 203 SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
204 204
205/* 205/*
206 * Component probe and remove ordering levels for components with runtime
207 * dependencies.
208 */
209#define SND_SOC_COMP_ORDER_FIRST -2
210#define SND_SOC_COMP_ORDER_EARLY -1
211#define SND_SOC_COMP_ORDER_NORMAL 0
212#define SND_SOC_COMP_ORDER_LATE 1
213#define SND_SOC_COMP_ORDER_LAST 2
214
215/*
206 * Bias levels 216 * Bias levels
207 * 217 *
208 * @ON: Bias is fully on for audio playback and capture operations. 218 * @ON: Bias is fully on for audio playback and capture operations.
@@ -214,10 +224,10 @@
214 * @OFF: Power Off. No restrictions on transition times. 224 * @OFF: Power Off. No restrictions on transition times.
215 */ 225 */
216enum snd_soc_bias_level { 226enum snd_soc_bias_level {
217 SND_SOC_BIAS_OFF, 227 SND_SOC_BIAS_OFF = 0,
218 SND_SOC_BIAS_STANDBY, 228 SND_SOC_BIAS_STANDBY = 1,
219 SND_SOC_BIAS_PREPARE, 229 SND_SOC_BIAS_PREPARE = 2,
220 SND_SOC_BIAS_ON, 230 SND_SOC_BIAS_ON = 3,
221}; 231};
222 232
223struct snd_jack; 233struct snd_jack;
@@ -258,6 +268,11 @@ enum snd_soc_compress_type {
258 SND_SOC_RBTREE_COMPRESSION 268 SND_SOC_RBTREE_COMPRESSION
259}; 269};
260 270
271enum snd_soc_pcm_subclass {
272 SND_SOC_PCM_CLASS_PCM = 0,
273 SND_SOC_PCM_CLASS_BE = 1,
274};
275
261int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id, 276int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
262 unsigned int freq, int dir); 277 unsigned int freq, int dir);
263int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, 278int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
@@ -612,6 +627,10 @@ struct snd_soc_codec_driver {
612 627
613 void (*seq_notifier)(struct snd_soc_dapm_context *, 628 void (*seq_notifier)(struct snd_soc_dapm_context *,
614 enum snd_soc_dapm_type, int); 629 enum snd_soc_dapm_type, int);
630
631 /* probe ordering - for components with runtime dependencies */
632 int probe_order;
633 int remove_order;
615}; 634};
616 635
617/* SoC platform interface */ 636/* SoC platform interface */
@@ -623,8 +642,7 @@ struct snd_soc_platform_driver {
623 int (*resume)(struct snd_soc_dai *dai); 642 int (*resume)(struct snd_soc_dai *dai);
624 643
625 /* pcm creation and destruction */ 644 /* pcm creation and destruction */
626 int (*pcm_new)(struct snd_card *, struct snd_soc_dai *, 645 int (*pcm_new)(struct snd_soc_pcm_runtime *);
627 struct snd_pcm *);
628 void (*pcm_free)(struct snd_pcm *); 646 void (*pcm_free)(struct snd_pcm *);
629 647
630 /* 648 /*
@@ -636,6 +654,10 @@ struct snd_soc_platform_driver {
636 654
637 /* platform stream ops */ 655 /* platform stream ops */
638 struct snd_pcm_ops *ops; 656 struct snd_pcm_ops *ops;
657
658 /* probe ordering - for components with runtime dependencies */
659 int probe_order;
660 int remove_order;
639}; 661};
640 662
641struct snd_soc_platform { 663struct snd_soc_platform {
@@ -725,8 +747,10 @@ struct snd_soc_card {
725 747
726 /* callbacks */ 748 /* callbacks */
727 int (*set_bias_level)(struct snd_soc_card *, 749 int (*set_bias_level)(struct snd_soc_card *,
750 struct snd_soc_dapm_context *dapm,
728 enum snd_soc_bias_level level); 751 enum snd_soc_bias_level level);
729 int (*set_bias_level_post)(struct snd_soc_card *, 752 int (*set_bias_level_post)(struct snd_soc_card *,
753 struct snd_soc_dapm_context *dapm,
730 enum snd_soc_bias_level level); 754 enum snd_soc_bias_level level);
731 755
732 long pmdown_time; 756 long pmdown_time;
@@ -789,6 +813,9 @@ struct snd_soc_pcm_runtime {
789 struct device dev; 813 struct device dev;
790 struct snd_soc_card *card; 814 struct snd_soc_card *card;
791 struct snd_soc_dai_link *dai_link; 815 struct snd_soc_dai_link *dai_link;
816 struct mutex pcm_mutex;
817 enum snd_soc_pcm_subclass pcm_subclass;
818 struct snd_pcm_ops ops;
792 819
793 unsigned int complete:1; 820 unsigned int complete:1;
794 unsigned int dev_registered:1; 821 unsigned int dev_registered:1;