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.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 0d7718f9280d..5d234a8c2506 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
@@ -402,6 +422,10 @@ struct snd_soc_codec {
402 short reg_cache_size; 422 short reg_cache_size;
403 short reg_cache_step; 423 short reg_cache_step;
404 424
425 unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
426 unsigned int cache_only:1; /* Suppress writes to hardware */
427 unsigned int cache_sync:1; /* Cache needs to be synced to hardware */
428
405 /* dapm */ 429 /* dapm */
406 u32 pop_time; 430 u32 pop_time;
407 struct list_head dapm_widgets; 431 struct list_head dapm_widgets;
@@ -497,6 +521,8 @@ struct snd_soc_card {
497 int (*set_bias_level)(struct snd_soc_card *, 521 int (*set_bias_level)(struct snd_soc_card *,
498 enum snd_soc_bias_level level); 522 enum snd_soc_bias_level level);
499 523
524 long pmdown_time;
525
500 /* CPU <--> Codec DAI links */ 526 /* CPU <--> Codec DAI links */
501 struct snd_soc_dai_link *dai_link; 527 struct snd_soc_dai_link *dai_link;
502 int num_links; 528 int num_links;