diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/control.h | 7 | ||||
-rw-r--r-- | include/sound/dmaengine_pcm.h | 49 | ||||
-rw-r--r-- | include/sound/jack.h | 3 | ||||
-rw-r--r-- | include/sound/max9768.h | 24 | ||||
-rw-r--r-- | include/sound/pcm.h | 9 | ||||
-rw-r--r-- | include/sound/sh_fsi.h | 12 | ||||
-rw-r--r-- | include/sound/soc-dai.h | 11 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 33 | ||||
-rw-r--r-- | include/sound/soc.h | 45 | ||||
-rw-r--r-- | include/sound/version.h | 2 | ||||
-rw-r--r-- | include/sound/wm2200.h | 41 | ||||
-rw-r--r-- | include/sound/wm8962.h | 6 | ||||
-rw-r--r-- | include/sound/ymfpci.h | 2 |
13 files changed, 223 insertions, 21 deletions
diff --git a/include/sound/control.h b/include/sound/control.h index b2796e83c7ac..8332e865c759 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -40,7 +40,7 @@ struct snd_kcontrol_new { | |||
40 | snd_ctl_elem_iface_t iface; /* interface identifier */ | 40 | snd_ctl_elem_iface_t iface; /* interface identifier */ |
41 | unsigned int device; /* device/client number */ | 41 | unsigned int device; /* device/client number */ |
42 | unsigned int subdevice; /* subdevice (substream) number */ | 42 | unsigned int subdevice; /* subdevice (substream) number */ |
43 | unsigned char *name; /* ASCII name of item */ | 43 | const unsigned char *name; /* ASCII name of item */ |
44 | unsigned int index; /* index of item */ | 44 | unsigned int index; /* index of item */ |
45 | unsigned int access; /* access rights */ | 45 | unsigned int access; /* access rights */ |
46 | unsigned int count; /* count of same elements */ | 46 | unsigned int count; /* count of same elements */ |
@@ -227,6 +227,11 @@ snd_ctl_add_slave_uncached(struct snd_kcontrol *master, | |||
227 | return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); | 227 | return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); |
228 | } | 228 | } |
229 | 229 | ||
230 | int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl, | ||
231 | void (*hook)(void *private_data, int), | ||
232 | void *private_data); | ||
233 | void snd_ctl_sync_vmaster_hook(struct snd_kcontrol *kctl); | ||
234 | |||
230 | /* | 235 | /* |
231 | * Helper functions for jack-detection controls | 236 | * Helper functions for jack-detection controls |
232 | */ | 237 | */ |
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h new file mode 100644 index 000000000000..a8fcaa6d531f --- /dev/null +++ b/include/sound/dmaengine_pcm.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012, Analog Devices Inc. | ||
3 | * Author: Lars-Peter Clausen <lars@metafoo.de> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published by the | ||
7 | * Free Software Foundation; either version 2 of the License, or (at your | ||
8 | * option) any later version. | ||
9 | * | ||
10 | * You should have received a copy of the GNU General Public License along | ||
11 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
12 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
13 | * | ||
14 | */ | ||
15 | #ifndef __SOUND_DMAENGINE_PCM_H__ | ||
16 | #define __SOUND_DMAENGINE_PCM_H__ | ||
17 | |||
18 | #include <sound/pcm.h> | ||
19 | #include <linux/dmaengine.h> | ||
20 | |||
21 | /** | ||
22 | * snd_pcm_substream_to_dma_direction - Get dma_transfer_direction for a PCM | ||
23 | * substream | ||
24 | * @substream: PCM substream | ||
25 | */ | ||
26 | static inline enum dma_transfer_direction | ||
27 | snd_pcm_substream_to_dma_direction(const struct snd_pcm_substream *substream) | ||
28 | { | ||
29 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | ||
30 | return DMA_MEM_TO_DEV; | ||
31 | else | ||
32 | return DMA_DEV_TO_MEM; | ||
33 | } | ||
34 | |||
35 | void snd_dmaengine_pcm_set_data(struct snd_pcm_substream *substream, void *data); | ||
36 | void *snd_dmaengine_pcm_get_data(struct snd_pcm_substream *substream); | ||
37 | |||
38 | int snd_hwparams_to_dma_slave_config(const struct snd_pcm_substream *substream, | ||
39 | const struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config); | ||
40 | int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd); | ||
41 | snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream); | ||
42 | |||
43 | int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream, | ||
44 | dma_filter_fn filter_fn, void *filter_data); | ||
45 | int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream); | ||
46 | |||
47 | struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream); | ||
48 | |||
49 | #endif | ||
diff --git a/include/sound/jack.h b/include/sound/jack.h index 63c790742db4..58916573db58 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h | |||
@@ -53,6 +53,9 @@ enum snd_jack_types { | |||
53 | SND_JACK_BTN_5 = 0x0200, | 53 | SND_JACK_BTN_5 = 0x0200, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | /* Keep in sync with definitions above */ | ||
57 | #define SND_JACK_SWITCH_TYPES 6 | ||
58 | |||
56 | struct snd_jack { | 59 | struct snd_jack { |
57 | struct input_dev *input_dev; | 60 | struct input_dev *input_dev; |
58 | int registered; | 61 | int registered; |
diff --git a/include/sound/max9768.h b/include/sound/max9768.h new file mode 100644 index 000000000000..0f78b41d030e --- /dev/null +++ b/include/sound/max9768.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Platform data for MAX9768 | ||
3 | * Copyright (C) 2011, 2012 by Wolfram Sang, Pengutronix e.K. | ||
4 | * same licence as the driver | ||
5 | */ | ||
6 | |||
7 | #ifndef __SOUND_MAX9768_PDATA_H__ | ||
8 | #define __SOUND_MAX9768_PDATA_H__ | ||
9 | |||
10 | /** | ||
11 | * struct max9768_pdata - optional platform specific MAX9768 configuration | ||
12 | * @shdn_gpio: GPIO to SHDN pin. If not valid, pin must be hardwired HIGH | ||
13 | * @mute_gpio: GPIO to MUTE pin. If not valid, control for mute won't be added | ||
14 | * @flags: configuration flags, e.g. set classic PWM mode (check datasheet | ||
15 | * regarding "filterless modulation" which is default). | ||
16 | */ | ||
17 | struct max9768_pdata { | ||
18 | int shdn_gpio; | ||
19 | int mute_gpio; | ||
20 | unsigned flags; | ||
21 | #define MAX9768_FLAG_CLASSIC_PWM (1 << 0) | ||
22 | }; | ||
23 | |||
24 | #endif /* __SOUND_MAX9768_PDATA_H__*/ | ||
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 0cf91b2f08ca..0d1112815be3 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -264,7 +264,7 @@ struct snd_pcm_hw_constraint_ratdens { | |||
264 | 264 | ||
265 | struct snd_pcm_hw_constraint_list { | 265 | struct snd_pcm_hw_constraint_list { |
266 | unsigned int count; | 266 | unsigned int count; |
267 | unsigned int *list; | 267 | const unsigned int *list; |
268 | unsigned int mask; | 268 | unsigned int mask; |
269 | }; | 269 | }; |
270 | 270 | ||
@@ -454,6 +454,7 @@ struct snd_pcm { | |||
454 | void *private_data; | 454 | void *private_data; |
455 | void (*private_free) (struct snd_pcm *pcm); | 455 | void (*private_free) (struct snd_pcm *pcm); |
456 | struct device *dev; /* actual hw device this belongs to */ | 456 | struct device *dev; /* actual hw device this belongs to */ |
457 | bool internal; /* pcm is for internal use only */ | ||
457 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | 458 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) |
458 | struct snd_pcm_oss oss; | 459 | struct snd_pcm_oss oss; |
459 | #endif | 460 | #endif |
@@ -475,6 +476,9 @@ extern const struct file_operations snd_pcm_f_ops[2]; | |||
475 | int snd_pcm_new(struct snd_card *card, const char *id, int device, | 476 | int snd_pcm_new(struct snd_card *card, const char *id, int device, |
476 | int playback_count, int capture_count, | 477 | int playback_count, int capture_count, |
477 | struct snd_pcm **rpcm); | 478 | struct snd_pcm **rpcm); |
479 | int snd_pcm_new_internal(struct snd_card *card, const char *id, int device, | ||
480 | int playback_count, int capture_count, | ||
481 | struct snd_pcm **rpcm); | ||
478 | int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count); | 482 | int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count); |
479 | 483 | ||
480 | int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree); | 484 | int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree); |
@@ -781,7 +785,8 @@ void snd_interval_muldivk(const struct snd_interval *a, const struct snd_interva | |||
781 | unsigned int k, struct snd_interval *c); | 785 | unsigned int k, struct snd_interval *c); |
782 | void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, | 786 | void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, |
783 | const struct snd_interval *b, struct snd_interval *c); | 787 | const struct snd_interval *b, struct snd_interval *c); |
784 | int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask); | 788 | int snd_interval_list(struct snd_interval *i, unsigned int count, |
789 | const unsigned int *list, unsigned int mask); | ||
785 | int snd_interval_ratnum(struct snd_interval *i, | 790 | int snd_interval_ratnum(struct snd_interval *i, |
786 | unsigned int rats_count, struct snd_ratnum *rats, | 791 | unsigned int rats_count, struct snd_ratnum *rats, |
787 | unsigned int *nump, unsigned int *denp); | 792 | unsigned int *nump, unsigned int *denp); |
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h index 9b1aacaa82fe..b457e87fbd08 100644 --- a/include/sound/sh_fsi.h +++ b/include/sound/sh_fsi.h | |||
@@ -72,10 +72,16 @@ | |||
72 | #define SH_FSI_BPFMD_32 (5 << 4) | 72 | #define SH_FSI_BPFMD_32 (5 << 4) |
73 | #define SH_FSI_BPFMD_16 (6 << 4) | 73 | #define SH_FSI_BPFMD_16 (6 << 4) |
74 | 74 | ||
75 | struct sh_fsi_port_info { | ||
76 | unsigned long flags; | ||
77 | int tx_id; | ||
78 | int rx_id; | ||
79 | int (*set_rate)(struct device *dev, int rate, int enable); | ||
80 | }; | ||
81 | |||
75 | struct sh_fsi_platform_info { | 82 | struct sh_fsi_platform_info { |
76 | unsigned long porta_flags; | 83 | struct sh_fsi_port_info port_a; |
77 | unsigned long portb_flags; | 84 | struct sh_fsi_port_info port_b; |
78 | int (*set_rate)(struct device *dev, int is_porta, int rate, int enable); | ||
79 | }; | 85 | }; |
80 | 86 | ||
81 | /* | 87 | /* |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 2413acc54883..c429f248cf4e 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | 18 | ||
19 | struct snd_pcm_substream; | 19 | struct snd_pcm_substream; |
20 | struct snd_soc_dapm_widget; | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * DAI hardware audio formats. | 23 | * DAI hardware audio formats. |
@@ -238,6 +239,9 @@ struct snd_soc_dai { | |||
238 | unsigned char pop_wait:1; | 239 | unsigned char pop_wait:1; |
239 | unsigned char probed:1; | 240 | unsigned char probed:1; |
240 | 241 | ||
242 | struct snd_soc_dapm_widget *playback_widget; | ||
243 | struct snd_soc_dapm_widget *capture_widget; | ||
244 | |||
241 | /* DAI DMA data */ | 245 | /* DAI DMA data */ |
242 | void *playback_dma_data; | 246 | void *playback_dma_data; |
243 | void *capture_dma_data; | 247 | void *capture_dma_data; |
@@ -246,10 +250,9 @@ struct snd_soc_dai { | |||
246 | unsigned int rate; | 250 | unsigned int rate; |
247 | 251 | ||
248 | /* parent platform/codec */ | 252 | /* parent platform/codec */ |
249 | union { | 253 | struct snd_soc_platform *platform; |
250 | struct snd_soc_platform *platform; | 254 | struct snd_soc_codec *codec; |
251 | struct snd_soc_codec *codec; | 255 | |
252 | }; | ||
253 | struct snd_soc_card *card; | 256 | struct snd_soc_card *card; |
254 | 257 | ||
255 | struct list_head list; | 258 | struct list_head list; |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index d26a9b784772..e46107fffeb4 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -243,6 +243,10 @@ | |||
243 | { .id = snd_soc_dapm_supply, .name = wname, .reg = wreg, \ | 243 | { .id = snd_soc_dapm_supply, .name = wname, .reg = wreg, \ |
244 | .shift = wshift, .invert = winvert, .event = wevent, \ | 244 | .shift = wshift, .invert = winvert, .event = wevent, \ |
245 | .event_flags = wflags} | 245 | .event_flags = wflags} |
246 | #define SND_SOC_DAPM_REGULATOR_SUPPLY(wname, wdelay) \ | ||
247 | { .id = snd_soc_dapm_regulator_supply, .name = wname, \ | ||
248 | .reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \ | ||
249 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD } | ||
246 | 250 | ||
247 | /* dapm kcontrol types */ | 251 | /* dapm kcontrol types */ |
248 | #define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ | 252 | #define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ |
@@ -322,6 +326,8 @@ struct snd_soc_dapm_context; | |||
322 | 326 | ||
323 | int dapm_reg_event(struct snd_soc_dapm_widget *w, | 327 | int dapm_reg_event(struct snd_soc_dapm_widget *w, |
324 | struct snd_kcontrol *kcontrol, int event); | 328 | struct snd_kcontrol *kcontrol, int event); |
329 | int dapm_regulator_event(struct snd_soc_dapm_widget *w, | ||
330 | struct snd_kcontrol *kcontrol, int event); | ||
325 | 331 | ||
326 | /* dapm controls */ | 332 | /* dapm controls */ |
327 | int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | 333 | int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, |
@@ -346,11 +352,12 @@ int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol, | |||
346 | struct snd_ctl_elem_value *uncontrol); | 352 | struct snd_ctl_elem_value *uncontrol); |
347 | int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, | 353 | int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, |
348 | struct snd_ctl_elem_value *uncontrol); | 354 | struct snd_ctl_elem_value *uncontrol); |
349 | int snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, | ||
350 | const struct snd_soc_dapm_widget *widget); | ||
351 | int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, | 355 | int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, |
352 | const struct snd_soc_dapm_widget *widget, | 356 | const struct snd_soc_dapm_widget *widget, |
353 | int num); | 357 | int num); |
358 | int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, | ||
359 | struct snd_soc_dai *dai); | ||
360 | int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card); | ||
354 | 361 | ||
355 | /* dapm path setup */ | 362 | /* dapm path setup */ |
356 | int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm); | 363 | int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm); |
@@ -361,10 +368,16 @@ int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm, | |||
361 | const struct snd_soc_dapm_route *route, int num); | 368 | const struct snd_soc_dapm_route *route, int num); |
362 | 369 | ||
363 | /* dapm events */ | 370 | /* dapm events */ |
364 | int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, | 371 | int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream, |
365 | const char *stream, int event); | 372 | struct snd_soc_dai *dai, int event); |
366 | void snd_soc_dapm_shutdown(struct snd_soc_card *card); | 373 | void snd_soc_dapm_shutdown(struct snd_soc_card *card); |
367 | 374 | ||
375 | /* external DAPM widget events */ | ||
376 | int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget, | ||
377 | struct snd_kcontrol *kcontrol, int connect); | ||
378 | int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget, | ||
379 | struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e); | ||
380 | |||
368 | /* dapm sys fs - used by the core */ | 381 | /* dapm sys fs - used by the core */ |
369 | int snd_soc_dapm_sys_add(struct device *dev); | 382 | int snd_soc_dapm_sys_add(struct device *dev); |
370 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, | 383 | void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, |
@@ -411,9 +424,11 @@ enum snd_soc_dapm_type { | |||
411 | snd_soc_dapm_pre, /* machine specific pre widget - exec first */ | 424 | snd_soc_dapm_pre, /* machine specific pre widget - exec first */ |
412 | snd_soc_dapm_post, /* machine specific post widget - exec last */ | 425 | snd_soc_dapm_post, /* machine specific post widget - exec last */ |
413 | snd_soc_dapm_supply, /* power/clock supply */ | 426 | snd_soc_dapm_supply, /* power/clock supply */ |
427 | snd_soc_dapm_regulator_supply, /* external regulator */ | ||
414 | snd_soc_dapm_aif_in, /* audio interface input */ | 428 | snd_soc_dapm_aif_in, /* audio interface input */ |
415 | snd_soc_dapm_aif_out, /* audio interface output */ | 429 | snd_soc_dapm_aif_out, /* audio interface output */ |
416 | snd_soc_dapm_siggen, /* signal generator */ | 430 | snd_soc_dapm_siggen, /* signal generator */ |
431 | snd_soc_dapm_dai, /* link to DAI structure */ | ||
417 | }; | 432 | }; |
418 | 433 | ||
419 | /* | 434 | /* |
@@ -434,8 +449,8 @@ struct snd_soc_dapm_route { | |||
434 | 449 | ||
435 | /* dapm audio path between two widgets */ | 450 | /* dapm audio path between two widgets */ |
436 | struct snd_soc_dapm_path { | 451 | struct snd_soc_dapm_path { |
437 | char *name; | 452 | const char *name; |
438 | char *long_name; | 453 | const char *long_name; |
439 | 454 | ||
440 | /* source (input) and sink (output) widgets */ | 455 | /* source (input) and sink (output) widgets */ |
441 | struct snd_soc_dapm_widget *source; | 456 | struct snd_soc_dapm_widget *source; |
@@ -458,13 +473,15 @@ struct snd_soc_dapm_path { | |||
458 | /* dapm widget */ | 473 | /* dapm widget */ |
459 | struct snd_soc_dapm_widget { | 474 | struct snd_soc_dapm_widget { |
460 | enum snd_soc_dapm_type id; | 475 | enum snd_soc_dapm_type id; |
461 | char *name; /* widget name */ | 476 | const char *name; /* widget name */ |
462 | char *sname; /* stream name */ | 477 | const char *sname; /* stream name */ |
463 | struct snd_soc_codec *codec; | 478 | struct snd_soc_codec *codec; |
464 | struct snd_soc_platform *platform; | 479 | struct snd_soc_platform *platform; |
465 | struct list_head list; | 480 | struct list_head list; |
466 | struct snd_soc_dapm_context *dapm; | 481 | struct snd_soc_dapm_context *dapm; |
467 | 482 | ||
483 | void *priv; /* widget specific data */ | ||
484 | |||
468 | /* dapm control */ | 485 | /* dapm control */ |
469 | short reg; /* negative reg = no direct dapm */ | 486 | short reg; /* negative reg = no direct dapm */ |
470 | unsigned char shift; /* bits to shift */ | 487 | unsigned char shift; /* bits to shift */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 0992dff55959..2ebf7877c148 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -185,6 +185,20 @@ | |||
185 | .rreg = xreg_right, .shift = xshift, \ | 185 | .rreg = xreg_right, .shift = xshift, \ |
186 | .min = xmin, .max = xmax} } | 186 | .min = xmin, .max = xmax} } |
187 | 187 | ||
188 | #define SND_SOC_BYTES(xname, xbase, xregs) \ | ||
189 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
190 | .info = snd_soc_bytes_info, .get = snd_soc_bytes_get, \ | ||
191 | .put = snd_soc_bytes_put, .private_value = \ | ||
192 | ((unsigned long)&(struct soc_bytes) \ | ||
193 | {.base = xbase, .num_regs = xregs }) } | ||
194 | |||
195 | #define SND_SOC_BYTES_MASK(xname, xbase, xregs, xmask) \ | ||
196 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
197 | .info = snd_soc_bytes_info, .get = snd_soc_bytes_get, \ | ||
198 | .put = snd_soc_bytes_put, .private_value = \ | ||
199 | ((unsigned long)&(struct soc_bytes) \ | ||
200 | {.base = xbase, .num_regs = xregs, \ | ||
201 | .mask = xmask }) } | ||
188 | 202 | ||
189 | /* | 203 | /* |
190 | * Simplified versions of above macros, declaring a struct and calculating | 204 | * Simplified versions of above macros, declaring a struct and calculating |
@@ -366,12 +380,16 @@ void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | |||
366 | *Controls | 380 | *Controls |
367 | */ | 381 | */ |
368 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, | 382 | struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, |
369 | void *data, char *long_name, | 383 | void *data, const char *long_name, |
370 | const char *prefix); | 384 | const char *prefix); |
371 | int snd_soc_add_controls(struct snd_soc_codec *codec, | 385 | int snd_soc_add_codec_controls(struct snd_soc_codec *codec, |
372 | const struct snd_kcontrol_new *controls, int num_controls); | 386 | const struct snd_kcontrol_new *controls, int num_controls); |
373 | int snd_soc_add_platform_controls(struct snd_soc_platform *platform, | 387 | int snd_soc_add_platform_controls(struct snd_soc_platform *platform, |
374 | const struct snd_kcontrol_new *controls, int num_controls); | 388 | const struct snd_kcontrol_new *controls, int num_controls); |
389 | int snd_soc_add_card_controls(struct snd_soc_card *soc_card, | ||
390 | const struct snd_kcontrol_new *controls, int num_controls); | ||
391 | int snd_soc_add_dai_controls(struct snd_soc_dai *dai, | ||
392 | const struct snd_kcontrol_new *controls, int num_controls); | ||
375 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, | 393 | int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, |
376 | struct snd_ctl_elem_info *uinfo); | 394 | struct snd_ctl_elem_info *uinfo); |
377 | int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, | 395 | int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, |
@@ -409,6 +427,13 @@ int snd_soc_get_volsw_2r_sx(struct snd_kcontrol *kcontrol, | |||
409 | struct snd_ctl_elem_value *ucontrol); | 427 | struct snd_ctl_elem_value *ucontrol); |
410 | int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol, | 428 | int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol, |
411 | struct snd_ctl_elem_value *ucontrol); | 429 | struct snd_ctl_elem_value *ucontrol); |
430 | int snd_soc_bytes_info(struct snd_kcontrol *kcontrol, | ||
431 | struct snd_ctl_elem_info *uinfo); | ||
432 | int snd_soc_bytes_get(struct snd_kcontrol *kcontrol, | ||
433 | struct snd_ctl_elem_value *ucontrol); | ||
434 | int snd_soc_bytes_put(struct snd_kcontrol *kcontrol, | ||
435 | struct snd_ctl_elem_value *ucontrol); | ||
436 | |||
412 | 437 | ||
413 | /** | 438 | /** |
414 | * struct snd_soc_reg_access - Describes whether a given register is | 439 | * struct snd_soc_reg_access - Describes whether a given register is |
@@ -505,6 +530,7 @@ struct snd_soc_pcm_stream { | |||
505 | unsigned int rate_max; /* max rate */ | 530 | unsigned int rate_max; /* max rate */ |
506 | unsigned int channels_min; /* min channels */ | 531 | unsigned int channels_min; /* min channels */ |
507 | unsigned int channels_max; /* max channels */ | 532 | unsigned int channels_max; /* max channels */ |
533 | unsigned int sig_bits; /* number of bits of content */ | ||
508 | }; | 534 | }; |
509 | 535 | ||
510 | /* SoC audio ops */ | 536 | /* SoC audio ops */ |
@@ -559,6 +585,7 @@ struct snd_soc_codec { | |||
559 | unsigned int ac97_created:1; /* Codec has been created by SoC */ | 585 | unsigned int ac97_created:1; /* Codec has been created by SoC */ |
560 | unsigned int sysfs_registered:1; /* codec has been sysfs registered */ | 586 | unsigned int sysfs_registered:1; /* codec has been sysfs registered */ |
561 | unsigned int cache_init:1; /* codec cache has been initialized */ | 587 | unsigned int cache_init:1; /* codec cache has been initialized */ |
588 | unsigned int using_regmap:1; /* using regmap access */ | ||
562 | u32 cache_only; /* Suppress writes to hardware */ | 589 | u32 cache_only; /* Suppress writes to hardware */ |
563 | u32 cache_sync; /* Cache needs to be synced to hardware */ | 590 | u32 cache_sync; /* Cache needs to be synced to hardware */ |
564 | 591 | ||
@@ -637,6 +664,8 @@ struct snd_soc_codec_driver { | |||
637 | /* codec stream completion event */ | 664 | /* codec stream completion event */ |
638 | int (*stream_event)(struct snd_soc_dapm_context *dapm, int event); | 665 | int (*stream_event)(struct snd_soc_dapm_context *dapm, int event); |
639 | 666 | ||
667 | bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */ | ||
668 | |||
640 | /* probe ordering - for components with runtime dependencies */ | 669 | /* probe ordering - for components with runtime dependencies */ |
641 | int probe_order; | 670 | int probe_order; |
642 | int remove_order; | 671 | int remove_order; |
@@ -689,6 +718,7 @@ struct snd_soc_platform { | |||
689 | int id; | 718 | int id; |
690 | struct device *dev; | 719 | struct device *dev; |
691 | struct snd_soc_platform_driver *driver; | 720 | struct snd_soc_platform_driver *driver; |
721 | struct mutex mutex; | ||
692 | 722 | ||
693 | unsigned int suspended:1; /* platform is suspended */ | 723 | unsigned int suspended:1; /* platform is suspended */ |
694 | unsigned int probed:1; | 724 | unsigned int probed:1; |
@@ -698,6 +728,11 @@ struct snd_soc_platform { | |||
698 | struct list_head card_list; | 728 | struct list_head card_list; |
699 | 729 | ||
700 | struct snd_soc_dapm_context dapm; | 730 | struct snd_soc_dapm_context dapm; |
731 | |||
732 | #ifdef CONFIG_DEBUG_FS | ||
733 | struct dentry *debugfs_platform_root; | ||
734 | struct dentry *debugfs_dapm; | ||
735 | #endif | ||
701 | }; | 736 | }; |
702 | 737 | ||
703 | struct snd_soc_dai_link { | 738 | struct snd_soc_dai_link { |
@@ -875,6 +910,12 @@ struct soc_mixer_control { | |||
875 | unsigned int reg, rreg, shift, rshift, invert; | 910 | unsigned int reg, rreg, shift, rshift, invert; |
876 | }; | 911 | }; |
877 | 912 | ||
913 | struct soc_bytes { | ||
914 | int base; | ||
915 | int num_regs; | ||
916 | u32 mask; | ||
917 | }; | ||
918 | |||
878 | /* enumerated kcontrol */ | 919 | /* enumerated kcontrol */ |
879 | struct soc_enum { | 920 | struct soc_enum { |
880 | unsigned short reg; | 921 | unsigned short reg; |
diff --git a/include/sound/version.h b/include/sound/version.h index 8fc5321e1ecc..cc75024c1089 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h */ | 1 | /* include/version.h */ |
2 | #define CONFIG_SND_VERSION "1.0.24" | 2 | #define CONFIG_SND_VERSION "1.0.25" |
3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |
diff --git a/include/sound/wm2200.h b/include/sound/wm2200.h new file mode 100644 index 000000000000..79bf55be7ffa --- /dev/null +++ b/include/sound/wm2200.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * linux/sound/wm2200.h -- Platform data for WM2200 | ||
3 | * | ||
4 | * Copyright 2012 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_WM2200_H | ||
12 | #define __LINUX_SND_WM2200_H | ||
13 | |||
14 | #define WM2200_GPIO_SET 0x10000 | ||
15 | |||
16 | enum wm2200_in_mode { | ||
17 | WM2200_IN_SE = 0, | ||
18 | WM2200_IN_DIFF = 1, | ||
19 | WM2200_IN_DMIC = 2, | ||
20 | }; | ||
21 | |||
22 | enum wm2200_dmic_sup { | ||
23 | WM2200_DMIC_SUP_MICVDD = 0, | ||
24 | WM2200_DMIC_SUP_MICBIAS1 = 1, | ||
25 | WM2200_DMIC_SUP_MICBIAS2 = 2, | ||
26 | }; | ||
27 | |||
28 | struct wm2200_pdata { | ||
29 | int reset; /** GPIO controlling /RESET, if any */ | ||
30 | int ldo_ena; /** GPIO controlling LODENA, if any */ | ||
31 | int irq_flags; | ||
32 | |||
33 | int gpio_defaults[4]; | ||
34 | |||
35 | enum wm2200_in_mode in_mode[3]; | ||
36 | enum wm2200_dmic_sup dmic_sup[3]; | ||
37 | |||
38 | int micbias_cfg[2]; /** Register value to configure MICBIAS */ | ||
39 | }; | ||
40 | |||
41 | #endif | ||
diff --git a/include/sound/wm8962.h b/include/sound/wm8962.h index 1750bed7c2f6..79e6d427b858 100644 --- a/include/sound/wm8962.h +++ b/include/sound/wm8962.h | |||
@@ -49,6 +49,12 @@ struct wm8962_pdata { | |||
49 | bool irq_active_low; | 49 | bool irq_active_low; |
50 | 50 | ||
51 | bool spk_mono; /* Speaker outputs tied together as mono */ | 51 | bool spk_mono; /* Speaker outputs tied together as mono */ |
52 | |||
53 | /** | ||
54 | * This flag should be set if one or both IN4 inputs is wired | ||
55 | * in a DC measurement configuration. | ||
56 | */ | ||
57 | bool in4_dc_measure; | ||
52 | }; | 58 | }; |
53 | 59 | ||
54 | #endif | 60 | #endif |
diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h index 444cd6ba0ba7..41199664666b 100644 --- a/include/sound/ymfpci.h +++ b/include/sound/ymfpci.h | |||
@@ -366,6 +366,8 @@ struct snd_ymfpci { | |||
366 | #ifdef CONFIG_PM | 366 | #ifdef CONFIG_PM |
367 | u32 *saved_regs; | 367 | u32 *saved_regs; |
368 | u32 saved_ydsxgr_mode; | 368 | u32 saved_ydsxgr_mode; |
369 | u16 saved_dsxg_legacy; | ||
370 | u16 saved_dsxg_elegacy; | ||
369 | #endif | 371 | #endif |
370 | }; | 372 | }; |
371 | 373 | ||