diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-12-07 01:28:35 -0500 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-12-07 01:29:22 -0500 |
commit | 6548698f929814375fa5d62ae1db96959b0418c1 (patch) | |
tree | 340924ae82cb0946aa15045b2b72186de52a8146 /include/sound/soc.h | |
parent | 1d2c6cfd40b2dece3bb958cbbc405a2c1536ab75 (diff) | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
Merge commit 'v2.6.32' into reiserfs/kill-bkl
Merge-reason: The tree was based 2.6.31. It's better to be up to date
with 2.6.32. Although no conflicting changes were made in between,
it gives benchmarking results closer to the lastest kernel behaviour.
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index cf6111d72b17..475cb7ed6bec 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -135,6 +135,28 @@ | |||
135 | .info = snd_soc_info_volsw, \ | 135 | .info = snd_soc_info_volsw, \ |
136 | .get = xhandler_get, .put = xhandler_put, \ | 136 | .get = xhandler_get, .put = xhandler_put, \ |
137 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) } | 137 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) } |
138 | #define SOC_DOUBLE_EXT_TLV(xname, xreg, shift_left, shift_right, xmax, xinvert,\ | ||
139 | xhandler_get, xhandler_put, tlv_array) \ | ||
140 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | ||
141 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | ||
142 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | ||
143 | .tlv.p = (tlv_array), \ | ||
144 | .info = snd_soc_info_volsw, \ | ||
145 | .get = xhandler_get, .put = xhandler_put, \ | ||
146 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | ||
147 | {.reg = xreg, .shift = shift_left, .rshift = shift_right, \ | ||
148 | .max = xmax, .invert = xinvert} } | ||
149 | #define SOC_DOUBLE_R_EXT_TLV(xname, reg_left, reg_right, xshift, xmax, xinvert,\ | ||
150 | xhandler_get, xhandler_put, tlv_array) \ | ||
151 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | ||
152 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | ||
153 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | ||
154 | .tlv.p = (tlv_array), \ | ||
155 | .info = snd_soc_info_volsw_2r, \ | ||
156 | .get = xhandler_get, .put = xhandler_put, \ | ||
157 | .private_value = (unsigned long)&(struct soc_mixer_control) \ | ||
158 | {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ | ||
159 | .max = xmax, .invert = xinvert} } | ||
138 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ | 160 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ |
139 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 161 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
140 | .info = snd_soc_info_bool_ext, \ | 162 | .info = snd_soc_info_bool_ext, \ |
@@ -183,14 +205,28 @@ struct snd_soc_jack_gpio; | |||
183 | #endif | 205 | #endif |
184 | 206 | ||
185 | typedef int (*hw_write_t)(void *,const char* ,int); | 207 | typedef int (*hw_write_t)(void *,const char* ,int); |
186 | typedef int (*hw_read_t)(void *,char* ,int); | ||
187 | 208 | ||
188 | extern struct snd_ac97_bus_ops soc_ac97_ops; | 209 | extern struct snd_ac97_bus_ops soc_ac97_ops; |
189 | 210 | ||
211 | enum snd_soc_control_type { | ||
212 | SND_SOC_CUSTOM, | ||
213 | SND_SOC_I2C, | ||
214 | SND_SOC_SPI, | ||
215 | }; | ||
216 | |||
190 | int snd_soc_register_platform(struct snd_soc_platform *platform); | 217 | int snd_soc_register_platform(struct snd_soc_platform *platform); |
191 | void snd_soc_unregister_platform(struct snd_soc_platform *platform); | 218 | void snd_soc_unregister_platform(struct snd_soc_platform *platform); |
192 | int snd_soc_register_codec(struct snd_soc_codec *codec); | 219 | int snd_soc_register_codec(struct snd_soc_codec *codec); |
193 | void snd_soc_unregister_codec(struct snd_soc_codec *codec); | 220 | void snd_soc_unregister_codec(struct snd_soc_codec *codec); |
221 | int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, int reg); | ||
222 | int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | ||
223 | int addr_bits, int data_bits, | ||
224 | enum snd_soc_control_type control); | ||
225 | |||
226 | #ifdef CONFIG_PM | ||
227 | int snd_soc_suspend_device(struct device *dev); | ||
228 | int snd_soc_resume_device(struct device *dev); | ||
229 | #endif | ||
194 | 230 | ||
195 | /* pcm <-> DAI connect */ | 231 | /* pcm <-> DAI connect */ |
196 | void snd_soc_free_pcms(struct snd_soc_device *socdev); | 232 | void snd_soc_free_pcms(struct snd_soc_device *socdev); |
@@ -216,9 +252,9 @@ void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, | |||
216 | 252 | ||
217 | /* codec register bit access */ | 253 | /* codec register bit access */ |
218 | int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, | 254 | int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, |
219 | unsigned short mask, unsigned short value); | 255 | unsigned int mask, unsigned int value); |
220 | int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg, | 256 | int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg, |
221 | unsigned short mask, unsigned short value); | 257 | unsigned int mask, unsigned int value); |
222 | 258 | ||
223 | int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, | 259 | int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, |
224 | struct snd_ac97_bus_ops *ops, int num); | 260 | struct snd_ac97_bus_ops *ops, int num); |
@@ -356,8 +392,10 @@ struct snd_soc_codec { | |||
356 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); | 392 | int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); |
357 | int (*display_register)(struct snd_soc_codec *, char *, | 393 | int (*display_register)(struct snd_soc_codec *, char *, |
358 | size_t, unsigned int); | 394 | size_t, unsigned int); |
395 | int (*volatile_register)(unsigned int); | ||
396 | int (*readable_register)(unsigned int); | ||
359 | hw_write_t hw_write; | 397 | hw_write_t hw_write; |
360 | hw_read_t hw_read; | 398 | unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); |
361 | void *reg_cache; | 399 | void *reg_cache; |
362 | short reg_cache_size; | 400 | short reg_cache_size; |
363 | short reg_cache_step; | 401 | short reg_cache_step; |
@@ -369,8 +407,6 @@ struct snd_soc_codec { | |||
369 | enum snd_soc_bias_level bias_level; | 407 | enum snd_soc_bias_level bias_level; |
370 | enum snd_soc_bias_level suspend_bias_level; | 408 | enum snd_soc_bias_level suspend_bias_level; |
371 | struct delayed_work delayed_work; | 409 | struct delayed_work delayed_work; |
372 | struct list_head up_list; | ||
373 | struct list_head down_list; | ||
374 | 410 | ||
375 | /* codec DAI's */ | 411 | /* codec DAI's */ |
376 | struct snd_soc_dai *dai; | 412 | struct snd_soc_dai *dai; |
@@ -379,6 +415,7 @@ struct snd_soc_codec { | |||
379 | #ifdef CONFIG_DEBUG_FS | 415 | #ifdef CONFIG_DEBUG_FS |
380 | struct dentry *debugfs_reg; | 416 | struct dentry *debugfs_reg; |
381 | struct dentry *debugfs_pop_time; | 417 | struct dentry *debugfs_pop_time; |
418 | struct dentry *debugfs_dapm; | ||
382 | #endif | 419 | #endif |
383 | }; | 420 | }; |
384 | 421 | ||