aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-03-18 13:22:37 -0400
committerTakashi Iwai <tiwai@suse.de>2012-03-18 13:22:37 -0400
commitcb3f2adc03ab055b19c677a6283523861fafebdd (patch)
tree59cfb6800f0635a4aec16c8e0da619f27e51ee79 /include/sound
parent44c76a960a62fcc46cbcaa0a22a34e666a729329 (diff)
parent828006de1bddf83b6ecf03ec459c15f7c7c22db7 (diff)
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/control.h2
-rw-r--r--include/sound/dmaengine_pcm.h49
-rw-r--r--include/sound/max9768.h24
-rw-r--r--include/sound/pcm.h4
-rw-r--r--include/sound/sh_fsi.h12
-rw-r--r--include/sound/soc-dai.h11
-rw-r--r--include/sound/soc-dapm.h33
-rw-r--r--include/sound/soc.h45
-rw-r--r--include/sound/wm2200.h41
-rw-r--r--include/sound/wm8962.h6
10 files changed, 209 insertions, 18 deletions
diff --git a/include/sound/control.h b/include/sound/control.h
index eff96dc7a27..8332e865c75 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 */
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h
new file mode 100644
index 00000000000..a8fcaa6d531
--- /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 */
26static inline enum dma_transfer_direction
27snd_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
35void snd_dmaengine_pcm_set_data(struct snd_pcm_substream *substream, void *data);
36void *snd_dmaengine_pcm_get_data(struct snd_pcm_substream *substream);
37
38int 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);
40int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd);
41snd_pcm_uframes_t snd_dmaengine_pcm_pointer(struct snd_pcm_substream *substream);
42
43int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
44 dma_filter_fn filter_fn, void *filter_data);
45int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream);
46
47struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream);
48
49#endif
diff --git a/include/sound/max9768.h b/include/sound/max9768.h
new file mode 100644
index 00000000000..0f78b41d030
--- /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 */
17struct 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 4ae9e22c482..0d1112815be 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -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];
475int snd_pcm_new(struct snd_card *card, const char *id, int device, 476int 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);
479int 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);
478int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count); 482int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count);
479 483
480int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree); 484int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree);
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h
index 9b1aacaa82f..b457e87fbd0 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
75struct 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
75struct sh_fsi_platform_info { 82struct 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 2413acc5488..c429f248cf4 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
19struct snd_pcm_substream; 19struct snd_pcm_substream;
20struct 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 d26a9b78477..e46107fffeb 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
323int dapm_reg_event(struct snd_soc_dapm_widget *w, 327int dapm_reg_event(struct snd_soc_dapm_widget *w,
324 struct snd_kcontrol *kcontrol, int event); 328 struct snd_kcontrol *kcontrol, int event);
329int dapm_regulator_event(struct snd_soc_dapm_widget *w,
330 struct snd_kcontrol *kcontrol, int event);
325 331
326/* dapm controls */ 332/* dapm controls */
327int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, 333int 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);
347int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, 353int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
348 struct snd_ctl_elem_value *uncontrol); 354 struct snd_ctl_elem_value *uncontrol);
349int snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
350 const struct snd_soc_dapm_widget *widget);
351int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm, 355int 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);
358int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
359 struct snd_soc_dai *dai);
360int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card);
354 361
355/* dapm path setup */ 362/* dapm path setup */
356int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm); 363int 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 */
364int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, 371int 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);
366void snd_soc_dapm_shutdown(struct snd_soc_card *card); 373void snd_soc_dapm_shutdown(struct snd_soc_card *card);
367 374
375/* external DAPM widget events */
376int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
377 struct snd_kcontrol *kcontrol, int connect);
378int 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 */
369int snd_soc_dapm_sys_add(struct device *dev); 382int snd_soc_dapm_sys_add(struct device *dev);
370void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, 383void 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 */
436struct snd_soc_dapm_path { 451struct 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 */
459struct snd_soc_dapm_widget { 474struct 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 0992dff5595..2ebf7877c14 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 */
368struct snd_kcontrol *snd_soc_cnew(const struct snd_kcontrol_new *_template, 382struct 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);
371int snd_soc_add_controls(struct snd_soc_codec *codec, 385int 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);
373int snd_soc_add_platform_controls(struct snd_soc_platform *platform, 387int 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);
389int snd_soc_add_card_controls(struct snd_soc_card *soc_card,
390 const struct snd_kcontrol_new *controls, int num_controls);
391int snd_soc_add_dai_controls(struct snd_soc_dai *dai,
392 const struct snd_kcontrol_new *controls, int num_controls);
375int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol, 393int snd_soc_info_enum_double(struct snd_kcontrol *kcontrol,
376 struct snd_ctl_elem_info *uinfo); 394 struct snd_ctl_elem_info *uinfo);
377int snd_soc_info_enum_ext(struct snd_kcontrol *kcontrol, 395int 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);
410int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol, 428int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol,
411 struct snd_ctl_elem_value *ucontrol); 429 struct snd_ctl_elem_value *ucontrol);
430int snd_soc_bytes_info(struct snd_kcontrol *kcontrol,
431 struct snd_ctl_elem_info *uinfo);
432int snd_soc_bytes_get(struct snd_kcontrol *kcontrol,
433 struct snd_ctl_elem_value *ucontrol);
434int 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
703struct snd_soc_dai_link { 738struct 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
913struct soc_bytes {
914 int base;
915 int num_regs;
916 u32 mask;
917};
918
878/* enumerated kcontrol */ 919/* enumerated kcontrol */
879struct soc_enum { 920struct soc_enum {
880 unsigned short reg; 921 unsigned short reg;
diff --git a/include/sound/wm2200.h b/include/sound/wm2200.h
new file mode 100644
index 00000000000..79bf55be7ff
--- /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
16enum wm2200_in_mode {
17 WM2200_IN_SE = 0,
18 WM2200_IN_DIFF = 1,
19 WM2200_IN_DMIC = 2,
20};
21
22enum wm2200_dmic_sup {
23 WM2200_DMIC_SUP_MICVDD = 0,
24 WM2200_DMIC_SUP_MICBIAS1 = 1,
25 WM2200_DMIC_SUP_MICBIAS2 = 2,
26};
27
28struct 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 1750bed7c2f..79e6d427b85 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