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.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 0d7718f9280..a57fbfcd4c8 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -169,6 +169,23 @@
169 .private_value = (unsigned long)&xenum } 169 .private_value = (unsigned long)&xenum }
170 170
171/* 171/*
172 * Simplified versions of above macros, declaring a struct and calculating
173 * ARRAY_SIZE internally
174 */
175#define SOC_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xtexts) \
176 struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
177 ARRAY_SIZE(xtexts), xtexts)
178#define SOC_ENUM_SINGLE_DECL(name, xreg, xshift, xtexts) \
179 SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts)
180#define SOC_ENUM_SINGLE_EXT_DECL(name, xtexts) \
181 struct soc_enum name = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(xtexts), xtexts)
182#define SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xmask, xtexts, xvalues) \
183 struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \
184 ARRAY_SIZE(xtexts), xtexts, xvalues)
185#define SOC_VALUE_ENUM_SINGLE_DECL(name, xreg, xshift, xmask, xtexts, xvalues) \
186 SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues)
187
188/*
172 * Bias levels 189 * Bias levels
173 * 190 *
174 * @ON: Bias is fully on for audio playback and capture operations. 191 * @ON: Bias is fully on for audio playback and capture operations.
@@ -253,6 +270,9 @@ void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
253/* codec register bit access */ 270/* codec register bit access */
254int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, 271int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,
255 unsigned int mask, unsigned int value); 272 unsigned int mask, unsigned int value);
273int snd_soc_update_bits_locked(struct snd_soc_codec *codec,
274 unsigned short reg, unsigned int mask,
275 unsigned int value);
256int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg, 276int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg,
257 unsigned int mask, unsigned int value); 277 unsigned int mask, unsigned int value);
258 278
@@ -355,6 +375,7 @@ struct snd_soc_pcm_stream {
355 unsigned int channels_min; /* min channels */ 375 unsigned int channels_min; /* min channels */
356 unsigned int channels_max; /* max channels */ 376 unsigned int channels_max; /* max channels */
357 unsigned int active:1; /* stream is in use */ 377 unsigned int active:1; /* stream is in use */
378 void *dma_data; /* used by platform code */
358}; 379};
359 380
360/* SoC audio ops */ 381/* SoC audio ops */
@@ -402,6 +423,10 @@ struct snd_soc_codec {
402 short reg_cache_size; 423 short reg_cache_size;
403 short reg_cache_step; 424 short reg_cache_step;
404 425
426 unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
427 unsigned int cache_only:1; /* Suppress writes to hardware */
428 unsigned int cache_sync:1; /* Cache needs to be synced to hardware */
429
405 /* dapm */ 430 /* dapm */
406 u32 pop_time; 431 u32 pop_time;
407 struct list_head dapm_widgets; 432 struct list_head dapm_widgets;
@@ -497,6 +522,8 @@ struct snd_soc_card {
497 int (*set_bias_level)(struct snd_soc_card *, 522 int (*set_bias_level)(struct snd_soc_card *,
498 enum snd_soc_bias_level level); 523 enum snd_soc_bias_level level);
499 524
525 long pmdown_time;
526
500 /* CPU <--> Codec DAI links */ 527 /* CPU <--> Codec DAI links */
501 struct snd_soc_dai_link *dai_link; 528 struct snd_soc_dai_link *dai_link;
502 int num_links; 529 int num_links;