diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-27 10:40:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-27 10:40:47 -0400 |
commit | 38f7d75edcf8ced03d03131005ed806bee746699 (patch) | |
tree | 1baf728abcc490365f499eef8c1b35b25435da5a /include/sound/soc.h | |
parent | c22cff947a98ecd10c42974a39ced1819e5c868a (diff) | |
parent | 34742cb02bd368c1af3349c041d3e4446f7ac6ef (diff) |
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-core
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index 6f86a4187f58..d57a04e7553d 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -30,13 +30,13 @@ | |||
30 | /* | 30 | /* |
31 | * Convenience kcontrol builders | 31 | * Convenience kcontrol builders |
32 | */ | 32 | */ |
33 | #define SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, xmax, xinvert) \ | 33 | #define SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, xmax, xinvert, xautodisable) \ |
34 | ((unsigned long)&(struct soc_mixer_control) \ | 34 | ((unsigned long)&(struct soc_mixer_control) \ |
35 | {.reg = xreg, .rreg = xreg, .shift = shift_left, \ | 35 | {.reg = xreg, .rreg = xreg, .shift = shift_left, \ |
36 | .rshift = shift_right, .max = xmax, .platform_max = xmax, \ | 36 | .rshift = shift_right, .max = xmax, .platform_max = xmax, \ |
37 | .invert = xinvert}) | 37 | .invert = xinvert, .autodisable = xautodisable}) |
38 | #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \ | 38 | #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, xautodisable) \ |
39 | SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert) | 39 | SOC_DOUBLE_VALUE(xreg, xshift, xshift, xmax, xinvert, xautodisable) |
40 | #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ | 40 | #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ |
41 | ((unsigned long)&(struct soc_mixer_control) \ | 41 | ((unsigned long)&(struct soc_mixer_control) \ |
42 | {.reg = xreg, .max = xmax, .platform_max = xmax, .invert = xinvert}) | 42 | {.reg = xreg, .max = xmax, .platform_max = xmax, .invert = xinvert}) |
@@ -52,7 +52,7 @@ | |||
52 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 52 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
53 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ | 53 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ |
54 | .put = snd_soc_put_volsw, \ | 54 | .put = snd_soc_put_volsw, \ |
55 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } | 55 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) } |
56 | #define SOC_SINGLE_RANGE(xname, xreg, xshift, xmin, xmax, xinvert) \ | 56 | #define SOC_SINGLE_RANGE(xname, xreg, xshift, xmin, xmax, xinvert) \ |
57 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ | 57 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ |
58 | .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \ | 58 | .info = snd_soc_info_volsw_range, .get = snd_soc_get_volsw_range, \ |
@@ -68,7 +68,7 @@ | |||
68 | .tlv.p = (tlv_array), \ | 68 | .tlv.p = (tlv_array), \ |
69 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ | 69 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ |
70 | .put = snd_soc_put_volsw, \ | 70 | .put = snd_soc_put_volsw, \ |
71 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) } | 71 | .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) } |
72 | #define SOC_SINGLE_SX_TLV(xname, xreg, xshift, xmin, xmax, tlv_array) \ | 72 | #define SOC_SINGLE_SX_TLV(xname, xreg, xshift, xmin, xmax, tlv_array) \ |
73 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 73 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
74 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | 74 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ |
@@ -97,7 +97,7 @@ | |||
97 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ | 97 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ |
98 | .put = snd_soc_put_volsw, \ | 98 | .put = snd_soc_put_volsw, \ |
99 | .private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \ | 99 | .private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \ |
100 | max, invert) } | 100 | max, invert, 0) } |
101 | #define SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert) \ | 101 | #define SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert) \ |
102 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 102 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ |
103 | .info = snd_soc_info_volsw, \ | 103 | .info = snd_soc_info_volsw, \ |
@@ -119,7 +119,7 @@ | |||
119 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ | 119 | .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ |
120 | .put = snd_soc_put_volsw, \ | 120 | .put = snd_soc_put_volsw, \ |
121 | .private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \ | 121 | .private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \ |
122 | max, invert) } | 122 | max, invert, 0) } |
123 | #define SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array) \ | 123 | #define SOC_DOUBLE_R_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert, tlv_array) \ |
124 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ | 124 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ |
125 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | 125 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ |
@@ -190,14 +190,14 @@ | |||
190 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 190 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
191 | .info = snd_soc_info_volsw, \ | 191 | .info = snd_soc_info_volsw, \ |
192 | .get = xhandler_get, .put = xhandler_put, \ | 192 | .get = xhandler_get, .put = xhandler_put, \ |
193 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) } | 193 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, 0) } |
194 | #define SOC_DOUBLE_EXT(xname, reg, shift_left, shift_right, max, invert,\ | 194 | #define SOC_DOUBLE_EXT(xname, reg, shift_left, shift_right, max, invert,\ |
195 | xhandler_get, xhandler_put) \ | 195 | xhandler_get, xhandler_put) \ |
196 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ | 196 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\ |
197 | .info = snd_soc_info_volsw, \ | 197 | .info = snd_soc_info_volsw, \ |
198 | .get = xhandler_get, .put = xhandler_put, \ | 198 | .get = xhandler_get, .put = xhandler_put, \ |
199 | .private_value = \ | 199 | .private_value = \ |
200 | SOC_DOUBLE_VALUE(reg, shift_left, shift_right, max, invert) } | 200 | SOC_DOUBLE_VALUE(reg, shift_left, shift_right, max, invert, 0) } |
201 | #define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\ | 201 | #define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\ |
202 | xhandler_get, xhandler_put, tlv_array) \ | 202 | xhandler_get, xhandler_put, tlv_array) \ |
203 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 203 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
@@ -206,7 +206,7 @@ | |||
206 | .tlv.p = (tlv_array), \ | 206 | .tlv.p = (tlv_array), \ |
207 | .info = snd_soc_info_volsw, \ | 207 | .info = snd_soc_info_volsw, \ |
208 | .get = xhandler_get, .put = xhandler_put, \ | 208 | .get = xhandler_get, .put = xhandler_put, \ |
209 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) } | 209 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert, 0) } |
210 | #define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\ | 210 | #define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\ |
211 | xhandler_get, xhandler_put, tlv_array) \ | 211 | xhandler_get, xhandler_put, tlv_array) \ |
212 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 212 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ |
@@ -216,7 +216,7 @@ | |||
216 | .info = snd_soc_info_volsw, \ | 216 | .info = snd_soc_info_volsw, \ |
217 | .get = xhandler_get, .put = xhandler_put, \ | 217 | .get = xhandler_get, .put = xhandler_put, \ |
218 | .private_value = SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, \ | 218 | .private_value = SOC_DOUBLE_VALUE(xreg, shift_left, shift_right, \ |
219 | xmax, xinvert) } | 219 | xmax, xinvert, 0) } |
220 | #define SOC_DOUBLE_R_EXT_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert,\ | 220 | #define SOC_DOUBLE_R_EXT_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert,\ |
221 | xhandler_get, xhandler_put, tlv_array) \ | 221 | xhandler_get, xhandler_put, tlv_array) \ |
222 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | 222 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ |
@@ -1038,6 +1038,7 @@ struct snd_soc_card { | |||
1038 | /* Generic DAPM context for the card */ | 1038 | /* Generic DAPM context for the card */ |
1039 | struct snd_soc_dapm_context dapm; | 1039 | struct snd_soc_dapm_context dapm; |
1040 | struct snd_soc_dapm_stats dapm_stats; | 1040 | struct snd_soc_dapm_stats dapm_stats; |
1041 | struct snd_soc_dapm_update *update; | ||
1041 | 1042 | ||
1042 | #ifdef CONFIG_DEBUG_FS | 1043 | #ifdef CONFIG_DEBUG_FS |
1043 | struct dentry *debugfs_card_root; | 1044 | struct dentry *debugfs_card_root; |
@@ -1083,7 +1084,9 @@ struct snd_soc_pcm_runtime { | |||
1083 | /* mixer control */ | 1084 | /* mixer control */ |
1084 | struct soc_mixer_control { | 1085 | struct soc_mixer_control { |
1085 | int min, max, platform_max; | 1086 | int min, max, platform_max; |
1086 | unsigned int reg, rreg, shift, rshift, invert; | 1087 | unsigned int reg, rreg, shift, rshift; |
1088 | unsigned int invert:1; | ||
1089 | unsigned int autodisable:1; | ||
1087 | }; | 1090 | }; |
1088 | 1091 | ||
1089 | struct soc_bytes { | 1092 | struct soc_bytes { |