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.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a40bc6f316fc..cf6111d72b17 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -118,6 +118,14 @@
118 .info = snd_soc_info_volsw, \ 118 .info = snd_soc_info_volsw, \
119 .get = xhandler_get, .put = xhandler_put, \ 119 .get = xhandler_get, .put = xhandler_put, \
120 .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) } 120 .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) }
121#define SOC_DOUBLE_EXT(xname, xreg, shift_left, shift_right, xmax, xinvert,\
122 xhandler_get, xhandler_put) \
123{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
124 .info = snd_soc_info_volsw, \
125 .get = xhandler_get, .put = xhandler_put, \
126 .private_value = (unsigned long)&(struct soc_mixer_control) \
127 {.reg = xreg, .shift = shift_left, .rshift = shift_right, \
128 .max = xmax, .invert = xinvert} }
121#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\ 129#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\
122 xhandler_get, xhandler_put, tlv_array) \ 130 xhandler_get, xhandler_put, tlv_array) \
123{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 131{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
@@ -206,10 +214,6 @@ void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
206 struct snd_soc_jack_gpio *gpios); 214 struct snd_soc_jack_gpio *gpios);
207#endif 215#endif
208 216
209/* codec IO */
210#define snd_soc_read(codec, reg) codec->read(codec, reg)
211#define snd_soc_write(codec, reg, value) codec->write(codec, reg, value)
212
213/* codec register bit access */ 217/* codec register bit access */
214int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, 218int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,
215 unsigned short mask, unsigned short value); 219 unsigned short mask, unsigned short value);
@@ -331,6 +335,7 @@ struct snd_soc_codec {
331 struct module *owner; 335 struct module *owner;
332 struct mutex mutex; 336 struct mutex mutex;
333 struct device *dev; 337 struct device *dev;
338 struct snd_soc_device *socdev;
334 339
335 struct list_head list; 340 struct list_head list;
336 341
@@ -364,6 +369,8 @@ struct snd_soc_codec {
364 enum snd_soc_bias_level bias_level; 369 enum snd_soc_bias_level bias_level;
365 enum snd_soc_bias_level suspend_bias_level; 370 enum snd_soc_bias_level suspend_bias_level;
366 struct delayed_work delayed_work; 371 struct delayed_work delayed_work;
372 struct list_head up_list;
373 struct list_head down_list;
367 374
368 /* codec DAI's */ 375 /* codec DAI's */
369 struct snd_soc_dai *dai; 376 struct snd_soc_dai *dai;
@@ -417,6 +424,12 @@ struct snd_soc_dai_link {
417 /* codec/machine specific init - e.g. add machine controls */ 424 /* codec/machine specific init - e.g. add machine controls */
418 int (*init)(struct snd_soc_codec *codec); 425 int (*init)(struct snd_soc_codec *codec);
419 426
427 /* Symmetry requirements */
428 unsigned int symmetric_rates:1;
429
430 /* Symmetry data - only valid if symmetry is being enforced */
431 unsigned int rate;
432
420 /* DAI pcm */ 433 /* DAI pcm */
421 struct snd_pcm *pcm; 434 struct snd_pcm *pcm;
422}; 435};
@@ -490,6 +503,19 @@ struct soc_enum {
490 void *dapm; 503 void *dapm;
491}; 504};
492 505
506/* codec IO */
507static inline unsigned int snd_soc_read(struct snd_soc_codec *codec,
508 unsigned int reg)
509{
510 return codec->read(codec, reg);
511}
512
513static inline unsigned int snd_soc_write(struct snd_soc_codec *codec,
514 unsigned int reg, unsigned int val)
515{
516 return codec->write(codec, reg, val);
517}
518
493#include <sound/soc-dai.h> 519#include <sound/soc-dai.h>
494 520
495#endif 521#endif