aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-22 02:28:35 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-22 02:28:35 -0400
commit57b8628bb0ac4e47c806e45c5bbd89282e93869b (patch)
treeee9289f0898054474b7e5054abdb3ffb78666436 /include/sound
parent486c8aba39e5f194519cd5c0e85e5d1de8b74b03 (diff)
parent66f75a5d028beaf67c931435fdc3e7823125730c (diff)
Merge commit 'v3.4-rc4' into next
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/compress_params.h2
-rw-r--r--include/sound/control.h7
-rw-r--r--include/sound/core.h15
-rw-r--r--include/sound/dmaengine_pcm.h49
-rw-r--r--include/sound/jack.h3
-rw-r--r--include/sound/max9768.h24
-rw-r--r--include/sound/pcm.h9
-rw-r--r--include/sound/sh_fsi.h12
-rw-r--r--include/sound/soc-dai.h11
-rw-r--r--include/sound/soc-dapm.h36
-rw-r--r--include/sound/soc.h45
-rw-r--r--include/sound/tea575x-tuner.h6
-rw-r--r--include/sound/version.h2
-rw-r--r--include/sound/wm2200.h41
-rw-r--r--include/sound/wm8962.h6
-rw-r--r--include/sound/ymfpci.h2
16 files changed, 244 insertions, 26 deletions
diff --git a/include/sound/compress_params.h b/include/sound/compress_params.h
index d97d69f81a7d..da4a456de032 100644
--- a/include/sound/compress_params.h
+++ b/include/sound/compress_params.h
@@ -51,6 +51,8 @@
51#ifndef __SND_COMPRESS_PARAMS_H 51#ifndef __SND_COMPRESS_PARAMS_H
52#define __SND_COMPRESS_PARAMS_H 52#define __SND_COMPRESS_PARAMS_H
53 53
54#include <linux/types.h>
55
54/* AUDIO CODECS SUPPORTED */ 56/* AUDIO CODECS SUPPORTED */
55#define MAX_NUM_CODECS 32 57#define MAX_NUM_CODECS 32
56#define MAX_NUM_CODEC_DESCRIPTORS 32 58#define MAX_NUM_CODEC_DESCRIPTORS 32
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
230int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl,
231 void (*hook)(void *private_data, int),
232 void *private_data);
233void 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/core.h b/include/sound/core.h
index cea1b5426dfa..bc056687f647 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -26,7 +26,6 @@
26#include <linux/mutex.h> /* struct mutex */ 26#include <linux/mutex.h> /* struct mutex */
27#include <linux/rwsem.h> /* struct rw_semaphore */ 27#include <linux/rwsem.h> /* struct rw_semaphore */
28#include <linux/pm.h> /* pm_message_t */ 28#include <linux/pm.h> /* pm_message_t */
29#include <linux/device.h>
30#include <linux/stringify.h> 29#include <linux/stringify.h>
31 30
32/* number of supported soundcards */ 31/* number of supported soundcards */
@@ -39,10 +38,10 @@
39#define CONFIG_SND_MAJOR 116 /* standard configuration */ 38#define CONFIG_SND_MAJOR 116 /* standard configuration */
40 39
41/* forward declarations */ 40/* forward declarations */
42#ifdef CONFIG_PCI
43struct pci_dev; 41struct pci_dev;
44#endif
45struct module; 42struct module;
43struct device;
44struct device_attribute;
46 45
47/* device allocation stuff */ 46/* device allocation stuff */
48 47
@@ -326,6 +325,13 @@ void release_and_free_resource(struct resource *res);
326 325
327/* --- */ 326/* --- */
328 327
328/* sound printk debug levels */
329enum {
330 SND_PR_ALWAYS,
331 SND_PR_DEBUG,
332 SND_PR_VERBOSE,
333};
334
329#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) 335#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
330__printf(4, 5) 336__printf(4, 5)
331void __snd_printk(unsigned int level, const char *file, int line, 337void __snd_printk(unsigned int level, const char *file, int line,
@@ -355,6 +361,8 @@ void __snd_printk(unsigned int level, const char *file, int line,
355 */ 361 */
356#define snd_printd(fmt, args...) \ 362#define snd_printd(fmt, args...) \
357 __snd_printk(1, __FILE__, __LINE__, fmt, ##args) 363 __snd_printk(1, __FILE__, __LINE__, fmt, ##args)
364#define _snd_printd(level, fmt, args...) \
365 __snd_printk(level, __FILE__, __LINE__, fmt, ##args)
358 366
359/** 367/**
360 * snd_BUG - give a BUG warning message and stack trace 368 * snd_BUG - give a BUG warning message and stack trace
@@ -384,6 +392,7 @@ void __snd_printk(unsigned int level, const char *file, int line,
384#else /* !CONFIG_SND_DEBUG */ 392#else /* !CONFIG_SND_DEBUG */
385 393
386#define snd_printd(fmt, args...) do { } while (0) 394#define snd_printd(fmt, args...) do { } while (0)
395#define _snd_printd(level, fmt, args...) do { } while (0)
387#define snd_BUG() do { } while (0) 396#define snd_BUG() do { } while (0)
388static inline int __snd_bug_on(int cond) 397static inline int __snd_bug_on(int cond)
389{ 398{
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 */
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/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
56struct snd_jack { 59struct 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 */
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 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
265struct snd_pcm_hw_constraint_list { 265struct 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];
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);
@@ -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);
782void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k, 786void 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);
784int snd_interval_list(struct snd_interval *i, unsigned int count, unsigned int *list, unsigned int mask); 788int snd_interval_list(struct snd_interval *i, unsigned int count,
789 const unsigned int *list, unsigned int mask);
785int snd_interval_ratnum(struct snd_interval *i, 790int 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
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 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
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 d26a9b784772..8da3c2409060 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -13,10 +13,11 @@
13#ifndef __LINUX_SND_SOC_DAPM_H 13#ifndef __LINUX_SND_SOC_DAPM_H
14#define __LINUX_SND_SOC_DAPM_H 14#define __LINUX_SND_SOC_DAPM_H
15 15
16#include <linux/device.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <sound/control.h> 17#include <sound/control.h>
19 18
19struct device;
20
20/* widget has no PM register bit */ 21/* widget has no PM register bit */
21#define SND_SOC_NOPM -1 22#define SND_SOC_NOPM -1
22 23
@@ -243,6 +244,10 @@
243{ .id = snd_soc_dapm_supply, .name = wname, .reg = wreg, \ 244{ .id = snd_soc_dapm_supply, .name = wname, .reg = wreg, \
244 .shift = wshift, .invert = winvert, .event = wevent, \ 245 .shift = wshift, .invert = winvert, .event = wevent, \
245 .event_flags = wflags} 246 .event_flags = wflags}
247#define SND_SOC_DAPM_REGULATOR_SUPPLY(wname, wdelay) \
248{ .id = snd_soc_dapm_regulator_supply, .name = wname, \
249 .reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \
250 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD }
246 251
247/* dapm kcontrol types */ 252/* dapm kcontrol types */
248#define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ 253#define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \
@@ -322,6 +327,8 @@ struct snd_soc_dapm_context;
322 327
323int dapm_reg_event(struct snd_soc_dapm_widget *w, 328int dapm_reg_event(struct snd_soc_dapm_widget *w,
324 struct snd_kcontrol *kcontrol, int event); 329 struct snd_kcontrol *kcontrol, int event);
330int dapm_regulator_event(struct snd_soc_dapm_widget *w,
331 struct snd_kcontrol *kcontrol, int event);
325 332
326/* dapm controls */ 333/* dapm controls */
327int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, 334int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
@@ -346,11 +353,12 @@ int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol,
346 struct snd_ctl_elem_value *uncontrol); 353 struct snd_ctl_elem_value *uncontrol);
347int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol, 354int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
348 struct snd_ctl_elem_value *uncontrol); 355 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, 356int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
352 const struct snd_soc_dapm_widget *widget, 357 const struct snd_soc_dapm_widget *widget,
353 int num); 358 int num);
359int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
360 struct snd_soc_dai *dai);
361int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card);
354 362
355/* dapm path setup */ 363/* dapm path setup */
356int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm); 364int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm);
@@ -361,10 +369,16 @@ int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
361 const struct snd_soc_dapm_route *route, int num); 369 const struct snd_soc_dapm_route *route, int num);
362 370
363/* dapm events */ 371/* dapm events */
364int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, 372int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
365 const char *stream, int event); 373 struct snd_soc_dai *dai, int event);
366void snd_soc_dapm_shutdown(struct snd_soc_card *card); 374void snd_soc_dapm_shutdown(struct snd_soc_card *card);
367 375
376/* external DAPM widget events */
377int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
378 struct snd_kcontrol *kcontrol, int connect);
379int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
380 struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e);
381
368/* dapm sys fs - used by the core */ 382/* dapm sys fs - used by the core */
369int snd_soc_dapm_sys_add(struct device *dev); 383int snd_soc_dapm_sys_add(struct device *dev);
370void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, 384void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
@@ -411,9 +425,11 @@ enum snd_soc_dapm_type {
411 snd_soc_dapm_pre, /* machine specific pre widget - exec first */ 425 snd_soc_dapm_pre, /* machine specific pre widget - exec first */
412 snd_soc_dapm_post, /* machine specific post widget - exec last */ 426 snd_soc_dapm_post, /* machine specific post widget - exec last */
413 snd_soc_dapm_supply, /* power/clock supply */ 427 snd_soc_dapm_supply, /* power/clock supply */
428 snd_soc_dapm_regulator_supply, /* external regulator */
414 snd_soc_dapm_aif_in, /* audio interface input */ 429 snd_soc_dapm_aif_in, /* audio interface input */
415 snd_soc_dapm_aif_out, /* audio interface output */ 430 snd_soc_dapm_aif_out, /* audio interface output */
416 snd_soc_dapm_siggen, /* signal generator */ 431 snd_soc_dapm_siggen, /* signal generator */
432 snd_soc_dapm_dai, /* link to DAI structure */
417}; 433};
418 434
419/* 435/*
@@ -434,8 +450,8 @@ struct snd_soc_dapm_route {
434 450
435/* dapm audio path between two widgets */ 451/* dapm audio path between two widgets */
436struct snd_soc_dapm_path { 452struct snd_soc_dapm_path {
437 char *name; 453 const char *name;
438 char *long_name; 454 const char *long_name;
439 455
440 /* source (input) and sink (output) widgets */ 456 /* source (input) and sink (output) widgets */
441 struct snd_soc_dapm_widget *source; 457 struct snd_soc_dapm_widget *source;
@@ -458,13 +474,15 @@ struct snd_soc_dapm_path {
458/* dapm widget */ 474/* dapm widget */
459struct snd_soc_dapm_widget { 475struct snd_soc_dapm_widget {
460 enum snd_soc_dapm_type id; 476 enum snd_soc_dapm_type id;
461 char *name; /* widget name */ 477 const char *name; /* widget name */
462 char *sname; /* stream name */ 478 const char *sname; /* stream name */
463 struct snd_soc_codec *codec; 479 struct snd_soc_codec *codec;
464 struct snd_soc_platform *platform; 480 struct snd_soc_platform *platform;
465 struct list_head list; 481 struct list_head list;
466 struct snd_soc_dapm_context *dapm; 482 struct snd_soc_dapm_context *dapm;
467 483
484 void *priv; /* widget specific data */
485
468 /* dapm control */ 486 /* dapm control */
469 short reg; /* negative reg = no direct dapm */ 487 short reg; /* negative reg = no direct dapm */
470 unsigned char shift; /* bits to shift */ 488 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 */
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/tea575x-tuner.h b/include/sound/tea575x-tuner.h
index 726e94742a5c..ec3f910aa40b 100644
--- a/include/sound/tea575x-tuner.h
+++ b/include/sound/tea575x-tuner.h
@@ -25,6 +25,7 @@
25#include <linux/videodev2.h> 25#include <linux/videodev2.h>
26#include <media/v4l2-ctrls.h> 26#include <media/v4l2-ctrls.h>
27#include <media/v4l2-dev.h> 27#include <media/v4l2-dev.h>
28#include <media/v4l2-device.h>
28 29
29#define TEA575X_FMIF 10700 30#define TEA575X_FMIF 10700
30 31
@@ -42,13 +43,16 @@ struct snd_tea575x_ops {
42}; 43};
43 44
44struct snd_tea575x { 45struct snd_tea575x {
46 struct v4l2_device *v4l2_dev;
45 struct video_device vd; /* video device */ 47 struct video_device vd; /* video device */
48 int radio_nr; /* radio_nr */
46 bool tea5759; /* 5759 chip is present */ 49 bool tea5759; /* 5759 chip is present */
50 bool cannot_read_data; /* Device cannot read the data pin */
47 bool mute; /* Device is muted? */ 51 bool mute; /* Device is muted? */
48 bool stereo; /* receiving stereo */ 52 bool stereo; /* receiving stereo */
49 bool tuned; /* tuned to a station */ 53 bool tuned; /* tuned to a station */
50 unsigned int val; /* hw value */ 54 unsigned int val; /* hw value */
51 unsigned long freq; /* frequency */ 55 u32 freq; /* frequency */
52 struct mutex mutex; 56 struct mutex mutex;
53 struct snd_tea575x_ops *ops; 57 struct snd_tea575x_ops *ops;
54 void *private_data; 58 void *private_data;
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
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 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