aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-10-27 04:43:40 -0400
committerTakashi Iwai <tiwai@suse.de>2011-10-27 04:43:40 -0400
commitbb14eb0da72afb69be261b28ec858cbd5a35e089 (patch)
treefa72a87d21e506c990b63657d782936311cfa7cf /include/sound
parent9430148d800dd929ad73da4c6afb67f793f8af43 (diff)
parent5927f94700e860ae27ff24e7f3bc9e4f7b9922eb (diff)
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dai.h37
-rw-r--r--include/sound/soc-dapm.h14
-rw-r--r--include/sound/soc.h91
-rw-r--r--include/sound/tpa6130a2-plat.h6
-rw-r--r--include/sound/wm1250-ev1.h27
-rw-r--r--include/sound/wm5100.h59
6 files changed, 171 insertions, 63 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 5ad5f3a50c68..2413acc54883 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -24,13 +24,13 @@ struct snd_pcm_substream;
24 * Describes the physical PCM data formating and clocking. Add new formats 24 * Describes the physical PCM data formating and clocking. Add new formats
25 * to the end. 25 * to the end.
26 */ 26 */
27#define SND_SOC_DAIFMT_I2S 0 /* I2S mode */ 27#define SND_SOC_DAIFMT_I2S 1 /* I2S mode */
28#define SND_SOC_DAIFMT_RIGHT_J 1 /* Right Justified mode */ 28#define SND_SOC_DAIFMT_RIGHT_J 2 /* Right Justified mode */
29#define SND_SOC_DAIFMT_LEFT_J 2 /* Left Justified mode */ 29#define SND_SOC_DAIFMT_LEFT_J 3 /* Left Justified mode */
30#define SND_SOC_DAIFMT_DSP_A 3 /* L data MSB after FRM LRC */ 30#define SND_SOC_DAIFMT_DSP_A 4 /* L data MSB after FRM LRC */
31#define SND_SOC_DAIFMT_DSP_B 4 /* L data MSB during FRM LRC */ 31#define SND_SOC_DAIFMT_DSP_B 5 /* L data MSB during FRM LRC */
32#define SND_SOC_DAIFMT_AC97 5 /* AC97 */ 32#define SND_SOC_DAIFMT_AC97 6 /* AC97 */
33#define SND_SOC_DAIFMT_PDM 6 /* Pulse density modulation */ 33#define SND_SOC_DAIFMT_PDM 7 /* Pulse density modulation */
34 34
35/* left and right justified also known as MSB and LSB respectively */ 35/* left and right justified also known as MSB and LSB respectively */
36#define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J 36#define SND_SOC_DAIFMT_MSB SND_SOC_DAIFMT_LEFT_J
@@ -42,8 +42,8 @@ struct snd_pcm_substream;
42 * DAI bit clocks can be be gated (disabled) when the DAI is not 42 * DAI bit clocks can be be gated (disabled) when the DAI is not
43 * sending or receiving PCM data in a frame. This can be used to save power. 43 * sending or receiving PCM data in a frame. This can be used to save power.
44 */ 44 */
45#define SND_SOC_DAIFMT_CONT (0 << 4) /* continuous clock */ 45#define SND_SOC_DAIFMT_CONT (1 << 4) /* continuous clock */
46#define SND_SOC_DAIFMT_GATED (1 << 4) /* clock is gated */ 46#define SND_SOC_DAIFMT_GATED (2 << 4) /* clock is gated */
47 47
48/* 48/*
49 * DAI hardware signal inversions. 49 * DAI hardware signal inversions.
@@ -51,10 +51,10 @@ struct snd_pcm_substream;
51 * Specifies whether the DAI can also support inverted clocks for the specified 51 * Specifies whether the DAI can also support inverted clocks for the specified
52 * format. 52 * format.
53 */ 53 */
54#define SND_SOC_DAIFMT_NB_NF (0 << 8) /* normal bit clock + frame */ 54#define SND_SOC_DAIFMT_NB_NF (1 << 8) /* normal bit clock + frame */
55#define SND_SOC_DAIFMT_NB_IF (1 << 8) /* normal BCLK + inv FRM */ 55#define SND_SOC_DAIFMT_NB_IF (2 << 8) /* normal BCLK + inv FRM */
56#define SND_SOC_DAIFMT_IB_NF (2 << 8) /* invert BCLK + nor FRM */ 56#define SND_SOC_DAIFMT_IB_NF (3 << 8) /* invert BCLK + nor FRM */
57#define SND_SOC_DAIFMT_IB_IF (3 << 8) /* invert BCLK + FRM */ 57#define SND_SOC_DAIFMT_IB_IF (4 << 8) /* invert BCLK + FRM */
58 58
59/* 59/*
60 * DAI hardware clock masters. 60 * DAI hardware clock masters.
@@ -63,10 +63,10 @@ struct snd_pcm_substream;
63 * i.e. if the codec is clk and FRM master then the interface is 63 * i.e. if the codec is clk and FRM master then the interface is
64 * clk and frame slave. 64 * clk and frame slave.
65 */ 65 */
66#define SND_SOC_DAIFMT_CBM_CFM (0 << 12) /* codec clk & FRM master */ 66#define SND_SOC_DAIFMT_CBM_CFM (1 << 12) /* codec clk & FRM master */
67#define SND_SOC_DAIFMT_CBS_CFM (1 << 12) /* codec clk slave & FRM master */ 67#define SND_SOC_DAIFMT_CBS_CFM (2 << 12) /* codec clk slave & FRM master */
68#define SND_SOC_DAIFMT_CBM_CFS (2 << 12) /* codec clk master & frame slave */ 68#define SND_SOC_DAIFMT_CBM_CFS (3 << 12) /* codec clk master & frame slave */
69#define SND_SOC_DAIFMT_CBS_CFS (3 << 12) /* codec clk & FRM slave */ 69#define SND_SOC_DAIFMT_CBS_CFS (4 << 12) /* codec clk & FRM slave */
70 70
71#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f 71#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f
72#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0 72#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0
@@ -242,6 +242,9 @@ struct snd_soc_dai {
242 void *playback_dma_data; 242 void *playback_dma_data;
243 void *capture_dma_data; 243 void *capture_dma_data;
244 244
245 /* Symmetry data - only valid if symmetry is being enforced */
246 unsigned int rate;
247
245 /* parent platform/codec */ 248 /* parent platform/codec */
246 union { 249 union {
247 struct snd_soc_platform *platform; 250 struct snd_soc_platform *platform;
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 350b1b395cac..17a4c17f19f5 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -381,6 +381,9 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
381int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, 381int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
382 const char *pin); 382 const char *pin);
383 383
384/* Mostly internal - should not normally be used */
385void dapm_mark_dirty(struct snd_soc_dapm_widget *w, const char *reason);
386
384/* dapm widget types */ 387/* dapm widget types */
385enum snd_soc_dapm_type { 388enum snd_soc_dapm_type {
386 snd_soc_dapm_input = 0, /* input pin */ 389 snd_soc_dapm_input = 0, /* input pin */
@@ -473,6 +476,8 @@ struct snd_soc_dapm_widget {
473 unsigned char ext:1; /* has external widgets */ 476 unsigned char ext:1; /* has external widgets */
474 unsigned char force:1; /* force state */ 477 unsigned char force:1; /* force state */
475 unsigned char ignore_suspend:1; /* kept enabled over suspend */ 478 unsigned char ignore_suspend:1; /* kept enabled over suspend */
479 unsigned char new_power:1; /* power from this run */
480 unsigned char power_checked:1; /* power checked this run */
476 int subseq; /* sort within widget type */ 481 int subseq; /* sort within widget type */
477 482
478 int (*power_check)(struct snd_soc_dapm_widget *w); 483 int (*power_check)(struct snd_soc_dapm_widget *w);
@@ -492,6 +497,9 @@ struct snd_soc_dapm_widget {
492 497
493 /* used during DAPM updates */ 498 /* used during DAPM updates */
494 struct list_head power_list; 499 struct list_head power_list;
500 struct list_head dirty;
501 int inputs;
502 int outputs;
495}; 503};
496 504
497struct snd_soc_dapm_update { 505struct snd_soc_dapm_update {
@@ -537,4 +545,10 @@ struct snd_soc_dapm_widget_list {
537 struct snd_soc_dapm_widget *widgets[0]; 545 struct snd_soc_dapm_widget *widgets[0];
538}; 546};
539 547
548struct snd_soc_dapm_stats {
549 int power_checks;
550 int path_checks;
551 int neighbour_checks;
552};
553
540#endif 554#endif
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 24e17be38c19..11cfb5953e06 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -28,13 +28,20 @@
28/* 28/*
29 * Convenience kcontrol builders 29 * Convenience kcontrol builders
30 */ 30 */
31#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \ 31#define SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, xmax, xinvert) \
32 ((unsigned long)&(struct soc_mixer_control) \ 32 ((unsigned long)&(struct soc_mixer_control) \
33 {.reg = xreg, .shift = xshift, .rshift = xshift, .max = xmax, \ 33 {.reg = xreg, .rreg = xreg, .shift = shift_left, \
34 .platform_max = xmax, .invert = xinvert}) 34 .rshift = shift_right, .max = xmax, .platform_max = xmax, \
35 .invert = xinvert})
36#define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \
37 SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert)
35#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ 38#define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \
36 ((unsigned long)&(struct soc_mixer_control) \ 39 ((unsigned long)&(struct soc_mixer_control) \
37 {.reg = xreg, .max = xmax, .platform_max = xmax, .invert = xinvert}) 40 {.reg = xreg, .max = xmax, .platform_max = xmax, .invert = xinvert})
41#define SOC_DOUBLE_R_VALUE(xlreg, xrreg, xshift, xmax, xinvert) \
42 ((unsigned long)&(struct soc_mixer_control) \
43 {.reg = xlreg, .rreg = xrreg, .shift = xshift, .rshift = xshift, \
44 .max = xmax, .platform_max = xmax, .invert = xinvert})
38#define SOC_SINGLE(xname, reg, shift, max, invert) \ 45#define SOC_SINGLE(xname, reg, shift, max, invert) \
39{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 46{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
40 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ 47 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
@@ -48,40 +55,36 @@
48 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ 55 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
49 .put = snd_soc_put_volsw, \ 56 .put = snd_soc_put_volsw, \
50 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } 57 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
51#define SOC_DOUBLE(xname, xreg, shift_left, shift_right, xmax, xinvert) \ 58#define SOC_DOUBLE(xname, reg, shift_left, shift_right, max, invert) \
52{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 59{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
53 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ 60 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \
54 .put = snd_soc_put_volsw, \ 61 .put = snd_soc_put_volsw, \
55 .private_value = (unsigned long)&(struct soc_mixer_control) \ 62 .private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \
56 {.reg = xreg, .shift = shift_left, .rshift = shift_right, \ 63 max, invert) }
57 .max = xmax, .platform_max = xmax, .invert = xinvert} }
58#define SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert) \ 64#define SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert) \
59{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ 65{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
60 .info = snd_soc_info_volsw_2r, \ 66 .info = snd_soc_info_volsw, \
61 .get = snd_soc_get_volsw_2r, .put = snd_soc_put_volsw_2r, \ 67 .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
62 .private_value = (unsigned long)&(struct soc_mixer_control) \ 68 .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
63 {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ 69 xmax, xinvert) }
64 .max = xmax, .platform_max = xmax, .invert = xinvert} } 70#define SOC_DOUBLE_TLV(xname, reg, shift_left, shift_right, max, invert, tlv_array) \
65#define SOC_DOUBLE_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert, tlv_array) \
66{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 71{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
67 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ 72 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
68 SNDRV_CTL_ELEM_ACCESS_READWRITE,\ 73 SNDRV_CTL_ELEM_ACCESS_READWRITE,\
69 .tlv.p = (tlv_array), \ 74 .tlv.p = (tlv_array), \
70 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ 75 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \
71 .put = snd_soc_put_volsw, \ 76 .put = snd_soc_put_volsw, \
72 .private_value = (unsigned long)&(struct soc_mixer_control) \ 77 .private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \
73 {.reg = xreg, .shift = shift_left, .rshift = shift_right,\ 78 max, invert) }
74 .max = xmax, .platform_max = xmax, .invert = xinvert} }
75#define SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array) \ 79#define SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array) \
76{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 80{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
77 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ 81 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
78 SNDRV_CTL_ELEM_ACCESS_READWRITE,\ 82 SNDRV_CTL_ELEM_ACCESS_READWRITE,\
79 .tlv.p = (tlv_array), \ 83 .tlv.p = (tlv_array), \
80 .info = snd_soc_info_volsw_2r, \ 84 .info = snd_soc_info_volsw, \
81 .get = snd_soc_get_volsw_2r, .put = snd_soc_put_volsw_2r, \ 85 .get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
82 .private_value = (unsigned long)&(struct soc_mixer_control) \ 86 .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
83 {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ 87 xmax, xinvert) }
84 .max = xmax, .platform_max = xmax, .invert = xinvert} }
85#define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \ 88#define SOC_DOUBLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \
86{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ 89{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
87 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ 90 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
@@ -121,14 +124,13 @@
121 .info = snd_soc_info_volsw, \ 124 .info = snd_soc_info_volsw, \
122 .get = xhandler_get, .put = xhandler_put, \ 125 .get = xhandler_get, .put = xhandler_put, \
123 .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) } 126 .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) }
124#define SOC_DOUBLE_EXT(xname, xreg, shift_left, shift_right, xmax, xinvert,\ 127#define SOC_DOUBLE_EXT(xname, reg, shift_left, shift_right, max, invert,\
125 xhandler_get, xhandler_put) \ 128 xhandler_get, xhandler_put) \
126{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ 129{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
127 .info = snd_soc_info_volsw, \ 130 .info = snd_soc_info_volsw, \
128 .get = xhandler_get, .put = xhandler_put, \ 131 .get = xhandler_get, .put = xhandler_put, \
129 .private_value = (unsigned long)&(struct soc_mixer_control) \ 132 .private_value = \
130 {.reg = xreg, .shift = shift_left, .rshift = shift_right, \ 133 SOC_DOUBLE_VALUE(reg, shift_left, shift_right, max, invert) }
131 .max = xmax, .platform_max = xmax, .invert = xinvert} }
132#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\ 134#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\
133 xhandler_get, xhandler_put, tlv_array) \ 135 xhandler_get, xhandler_put, tlv_array) \
134{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 136{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
@@ -146,20 +148,18 @@
146 .tlv.p = (tlv_array), \ 148 .tlv.p = (tlv_array), \
147 .info = snd_soc_info_volsw, \ 149 .info = snd_soc_info_volsw, \
148 .get = xhandler_get, .put = xhandler_put, \ 150 .get = xhandler_get, .put = xhandler_put, \
149 .private_value = (unsigned long)&(struct soc_mixer_control) \ 151 .private_value = SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, \
150 {.reg = xreg, .shift = shift_left, .rshift = shift_right, \ 152 xmax, xinvert) }
151 .max = xmax, .platform_max = xmax, .invert = xinvert} }
152#define SOC_DOUBLE_R_EXT_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert,\ 153#define SOC_DOUBLE_R_EXT_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert,\
153 xhandler_get, xhandler_put, tlv_array) \ 154 xhandler_get, xhandler_put, tlv_array) \
154{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ 155{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
155 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ 156 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
156 SNDRV_CTL_ELEM_ACCESS_READWRITE, \ 157 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
157 .tlv.p = (tlv_array), \ 158 .tlv.p = (tlv_array), \
158 .info = snd_soc_info_volsw_2r, \ 159 .info = snd_soc_info_volsw, \
159 .get = xhandler_get, .put = xhandler_put, \ 160 .get = xhandler_get, .put = xhandler_put, \
160 .private_value = (unsigned long)&(struct soc_mixer_control) \ 161 .private_value = SOC_DOUBLE_R_VALUE(reg_left, reg_right, xshift, \
161 {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ 162 xmax, xinvert) }
162 .max = xmax, .platform_max = xmax, .invert = xinvert} }
163#define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ 163#define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \
164{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 164{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
165 .info = snd_soc_info_bool_ext, \ 165 .info = snd_soc_info_bool_ext, \
@@ -393,12 +393,8 @@ int snd_soc_get_volsw(struct snd_kcontrol *kcontrol,
393 struct snd_ctl_elem_value *ucontrol); 393 struct snd_ctl_elem_value *ucontrol);
394int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, 394int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
395 struct snd_ctl_elem_value *ucontrol); 395 struct snd_ctl_elem_value *ucontrol);
396int snd_soc_info_volsw_2r(struct snd_kcontrol *kcontrol, 396#define snd_soc_get_volsw_2r snd_soc_get_volsw
397 struct snd_ctl_elem_info *uinfo); 397#define snd_soc_put_volsw_2r snd_soc_put_volsw
398int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol,
399 struct snd_ctl_elem_value *ucontrol);
400int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol,
401 struct snd_ctl_elem_value *ucontrol);
402int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol, 398int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol,
403 struct snd_ctl_elem_info *uinfo); 399 struct snd_ctl_elem_info *uinfo);
404int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, 400int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
@@ -582,6 +578,7 @@ struct snd_soc_codec {
582 578
583 /* dapm */ 579 /* dapm */
584 struct snd_soc_dapm_context dapm; 580 struct snd_soc_dapm_context dapm;
581 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
585 582
586#ifdef CONFIG_DEBUG_FS 583#ifdef CONFIG_DEBUG_FS
587 struct dentry *debugfs_codec_root; 584 struct dentry *debugfs_codec_root;
@@ -713,6 +710,8 @@ struct snd_soc_dai_link {
713 const char *cpu_dai_name; 710 const char *cpu_dai_name;
714 const char *codec_dai_name; 711 const char *codec_dai_name;
715 712
713 unsigned int dai_fmt; /* format to set on init */
714
716 /* Keep DAI active over suspend */ 715 /* Keep DAI active over suspend */
717 unsigned int ignore_suspend:1; 716 unsigned int ignore_suspend:1;
718 717
@@ -825,9 +824,11 @@ struct snd_soc_card {
825 struct list_head widgets; 824 struct list_head widgets;
826 struct list_head paths; 825 struct list_head paths;
827 struct list_head dapm_list; 826 struct list_head dapm_list;
827 struct list_head dapm_dirty;
828 828
829 /* Generic DAPM context for the card */ 829 /* Generic DAPM context for the card */
830 struct snd_soc_dapm_context dapm; 830 struct snd_soc_dapm_context dapm;
831 struct snd_soc_dapm_stats dapm_stats;
831 832
832#ifdef CONFIG_DEBUG_FS 833#ifdef CONFIG_DEBUG_FS
833 struct dentry *debugfs_card_root; 834 struct dentry *debugfs_card_root;
@@ -850,8 +851,6 @@ struct snd_soc_pcm_runtime {
850 unsigned int complete:1; 851 unsigned int complete:1;
851 unsigned int dev_registered:1; 852 unsigned int dev_registered:1;
852 853
853 /* Symmetry data - only valid if symmetry is being enforced */
854 unsigned int rate;
855 long pmdown_time; 854 long pmdown_time;
856 855
857 /* runtime devices */ 856 /* runtime devices */
@@ -946,6 +945,18 @@ static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
946 INIT_LIST_HEAD(&card->dapm_list); 945 INIT_LIST_HEAD(&card->dapm_list);
947} 946}
948 947
948static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
949{
950 if (mc->reg == mc->rreg && mc->shift == mc->rshift)
951 return 0;
952 /*
953 * mc->reg == mc->rreg && mc->shift != mc->rshift, or
954 * mc->reg != mc->rreg means that the control is
955 * stereo (bits in one register or in two registers)
956 */
957 return 1;
958}
959
949int snd_soc_util_init(void); 960int snd_soc_util_init(void);
950void snd_soc_util_exit(void); 961void snd_soc_util_exit(void);
951 962
diff --git a/include/sound/tpa6130a2-plat.h b/include/sound/tpa6130a2-plat.h
index 89beccb57edd..4cc1093844c8 100644
--- a/include/sound/tpa6130a2-plat.h
+++ b/include/sound/tpa6130a2-plat.h
@@ -23,13 +23,7 @@
23#ifndef TPA6130A2_PLAT_H 23#ifndef TPA6130A2_PLAT_H
24#define TPA6130A2_PLAT_H 24#define TPA6130A2_PLAT_H
25 25
26enum tpa_model {
27 TPA6130A2,
28 TPA6140A2,
29};
30
31struct tpa6130a2_platform_data { 26struct tpa6130a2_platform_data {
32 enum tpa_model id;
33 int power_gpio; 27 int power_gpio;
34}; 28};
35 29
diff --git a/include/sound/wm1250-ev1.h b/include/sound/wm1250-ev1.h
new file mode 100644
index 000000000000..7dff82834123
--- /dev/null
+++ b/include/sound/wm1250-ev1.h
@@ -0,0 +1,27 @@
1/*
2 * linux/sound/wm1250-ev1.h - Platform data for WM1250-EV1
3 *
4 * Copyright 2011 Wolfson Microelectronics. PLC.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __LINUX_SND_WM1250_EV1_H
12#define __LINUX_SND_WM1250_EV1_H
13
14#define WM1250_EV1_NUM_GPIOS 5
15
16#define WM1250_EV1_GPIO_CLK_ENA 0
17#define WM1250_EV1_GPIO_CLK_SEL0 1
18#define WM1250_EV1_GPIO_CLK_SEL1 2
19#define WM1250_EV1_GPIO_OSR 3
20#define WM1250_EV1_GPIO_MASTER 4
21
22
23struct wm1250_ev1_pdata {
24 int gpios[WM1250_EV1_NUM_GPIOS];
25};
26
27#endif
diff --git a/include/sound/wm5100.h b/include/sound/wm5100.h
new file mode 100644
index 000000000000..617d0c4a159f
--- /dev/null
+++ b/include/sound/wm5100.h
@@ -0,0 +1,59 @@
1/*
2 * linux/sound/wm5100.h -- Platform data for WM5100
3 *
4 * Copyright 2011 Wolfson Microelectronics. PLC.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __LINUX_SND_WM5100_H
12#define __LINUX_SND_WM5100_H
13
14enum wm5100_in_mode {
15 WM5100_IN_SE = 0,
16 WM5100_IN_DIFF = 1,
17 WM5100_IN_DMIC = 2,
18};
19
20enum wm5100_dmic_sup {
21 WM5100_DMIC_SUP_MICVDD = 0,
22 WM5100_DMIC_SUP_MICBIAS1 = 1,
23 WM5100_DMIC_SUP_MICBIAS2 = 2,
24 WM5100_DMIC_SUP_MICBIAS3 = 3,
25};
26
27enum wm5100_micdet_bias {
28 WM5100_MICDET_MICBIAS1 = 0,
29 WM5100_MICDET_MICBIAS2 = 1,
30 WM5100_MICDET_MICBIAS3 = 2,
31};
32
33struct wm5100_jack_mode {
34 enum wm5100_micdet_bias bias;
35 int hp_pol;
36 int micd_src;
37};
38
39#define WM5100_GPIO_SET 0x10000
40
41struct wm5100_pdata {
42 int reset; /** GPIO controlling /RESET, if any */
43 int ldo_ena; /** GPIO controlling LODENA, if any */
44 int hp_pol; /** GPIO controlling headset polarity, if any */
45 int irq_flags;
46 int gpio_base;
47
48 struct wm5100_jack_mode jack_modes[2];
49
50 /* Input pin mode selection */
51 enum wm5100_in_mode in_mode[4];
52
53 /* DMIC supply selection */
54 enum wm5100_dmic_sup dmic_sup[4];
55
56 int gpio_defaults[6];
57};
58
59#endif