aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-10-26 17:51:48 -0400
committerTakashi Iwai <tiwai@suse.de>2011-10-26 17:51:48 -0400
commit9430148d800dd929ad73da4c6afb67f793f8af43 (patch)
tree437d0aec41428cbb310a202100ba581c63fbe89e /include
parentd22665702226e9c40bc331098559e3d55e7cd43d (diff)
parent88e24c3a4b30a6bd361f2b5ce602667a8161b2e8 (diff)
Merge branch 'topic/remove-irqf_disable' into for-linus
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/twl6040.h8
-rw-r--r--include/linux/mfd/wm8994/registers.h84
-rw-r--r--include/linux/regmap.h52
-rw-r--r--include/linux/regulator/consumer.h7
-rw-r--r--include/linux/regulator/driver.h3
-rw-r--r--include/sound/adau1373.h34
-rw-r--r--include/sound/initval.h2
-rw-r--r--include/sound/saif.h16
-rw-r--r--include/sound/soc-dapm.h2
-rw-r--r--include/sound/soc.h16
10 files changed, 217 insertions, 7 deletions
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
index 4c806f6d663e..ec1ec794fa23 100644
--- a/include/linux/mfd/twl6040.h
+++ b/include/linux/mfd/twl6040.h
@@ -70,9 +70,6 @@
70 70
71#define TWL6040_CACHEREGNUM (TWL6040_REG_STATUS + 1) 71#define TWL6040_CACHEREGNUM (TWL6040_REG_STATUS + 1)
72 72
73#define TWL6040_VIOREGNUM 18
74#define TWL6040_VDDREGNUM 21
75
76/* INTID (0x03) fields */ 73/* INTID (0x03) fields */
77 74
78#define TWL6040_THINT 0x01 75#define TWL6040_THINT 0x01
@@ -225,4 +222,9 @@ unsigned int twl6040_get_sysclk(struct twl6040 *twl6040);
225int twl6040_irq_init(struct twl6040 *twl6040); 222int twl6040_irq_init(struct twl6040 *twl6040);
226void twl6040_irq_exit(struct twl6040 *twl6040); 223void twl6040_irq_exit(struct twl6040 *twl6040);
227 224
225static inline int twl6040_get_revid(struct twl6040 *twl6040)
226{
227 return twl6040->rev;
228}
229
228#endif /* End of __TWL6040_CODEC_H__ */ 230#endif /* End of __TWL6040_CODEC_H__ */
diff --git a/include/linux/mfd/wm8994/registers.h b/include/linux/mfd/wm8994/registers.h
index f3ee84284670..83ecdcd8aaf9 100644
--- a/include/linux/mfd/wm8994/registers.h
+++ b/include/linux/mfd/wm8994/registers.h
@@ -72,6 +72,7 @@
72#define WM8994_DC_SERVO_2 0x55 72#define WM8994_DC_SERVO_2 0x55
73#define WM8994_DC_SERVO_4 0x57 73#define WM8994_DC_SERVO_4 0x57
74#define WM8994_DC_SERVO_READBACK 0x58 74#define WM8994_DC_SERVO_READBACK 0x58
75#define WM8994_DC_SERVO_4E 0x59
75#define WM8994_ANALOGUE_HP_1 0x60 76#define WM8994_ANALOGUE_HP_1 0x60
76#define WM8958_MIC_DETECT_1 0xD0 77#define WM8958_MIC_DETECT_1 0xD0
77#define WM8958_MIC_DETECT_2 0xD1 78#define WM8958_MIC_DETECT_2 0xD1
@@ -133,6 +134,8 @@
133#define WM8994_AIF1_DAC1_FILTERS_2 0x421 134#define WM8994_AIF1_DAC1_FILTERS_2 0x421
134#define WM8994_AIF1_DAC2_FILTERS_1 0x422 135#define WM8994_AIF1_DAC2_FILTERS_1 0x422
135#define WM8994_AIF1_DAC2_FILTERS_2 0x423 136#define WM8994_AIF1_DAC2_FILTERS_2 0x423
137#define WM8958_AIF1_DAC1_NOISE_GATE 0x430
138#define WM8958_AIF1_DAC2_NOISE_GATE 0x431
136#define WM8994_AIF1_DRC1_1 0x440 139#define WM8994_AIF1_DRC1_1 0x440
137#define WM8994_AIF1_DRC1_2 0x441 140#define WM8994_AIF1_DRC1_2 0x441
138#define WM8994_AIF1_DRC1_3 0x442 141#define WM8994_AIF1_DRC1_3 0x442
@@ -190,6 +193,7 @@
190#define WM8994_AIF2_ADC_FILTERS 0x510 193#define WM8994_AIF2_ADC_FILTERS 0x510
191#define WM8994_AIF2_DAC_FILTERS_1 0x520 194#define WM8994_AIF2_DAC_FILTERS_1 0x520
192#define WM8994_AIF2_DAC_FILTERS_2 0x521 195#define WM8994_AIF2_DAC_FILTERS_2 0x521
196#define WM8958_AIF2_DAC_NOISE_GATE 0x530
193#define WM8994_AIF2_DRC_1 0x540 197#define WM8994_AIF2_DRC_1 0x540
194#define WM8994_AIF2_DRC_2 0x541 198#define WM8994_AIF2_DRC_2 0x541
195#define WM8994_AIF2_DRC_3 0x542 199#define WM8994_AIF2_DRC_3 0x542
@@ -1921,6 +1925,44 @@
1921#define WM8994_LDO2_DISCH_WIDTH 1 /* LDO2_DISCH */ 1925#define WM8994_LDO2_DISCH_WIDTH 1 /* LDO2_DISCH */
1922 1926
1923/* 1927/*
1928 * R61 (0x3D) - MICBIAS1
1929 */
1930#define WM8958_MICB1_RATE 0x0020 /* MICB1_RATE */
1931#define WM8958_MICB1_RATE_MASK 0x0020 /* MICB1_RATE */
1932#define WM8958_MICB1_RATE_SHIFT 5 /* MICB1_RATE */
1933#define WM8958_MICB1_RATE_WIDTH 1 /* MICB1_RATE */
1934#define WM8958_MICB1_MODE 0x0010 /* MICB1_MODE */
1935#define WM8958_MICB1_MODE_MASK 0x0010 /* MICB1_MODE */
1936#define WM8958_MICB1_MODE_SHIFT 4 /* MICB1_MODE */
1937#define WM8958_MICB1_MODE_WIDTH 1 /* MICB1_MODE */
1938#define WM8958_MICB1_LVL_MASK 0x000E /* MICB1_LVL - [3:1] */
1939#define WM8958_MICB1_LVL_SHIFT 1 /* MICB1_LVL - [3:1] */
1940#define WM8958_MICB1_LVL_WIDTH 3 /* MICB1_LVL - [3:1] */
1941#define WM8958_MICB1_DISCH 0x0001 /* MICB1_DISCH */
1942#define WM8958_MICB1_DISCH_MASK 0x0001 /* MICB1_DISCH */
1943#define WM8958_MICB1_DISCH_SHIFT 0 /* MICB1_DISCH */
1944#define WM8958_MICB1_DISCH_WIDTH 1 /* MICB1_DISCH */
1945
1946/*
1947 * R62 (0x3E) - MICBIAS2
1948 */
1949#define WM8958_MICB2_RATE 0x0020 /* MICB2_RATE */
1950#define WM8958_MICB2_RATE_MASK 0x0020 /* MICB2_RATE */
1951#define WM8958_MICB2_RATE_SHIFT 5 /* MICB2_RATE */
1952#define WM8958_MICB2_RATE_WIDTH 1 /* MICB2_RATE */
1953#define WM8958_MICB2_MODE 0x0010 /* MICB2_MODE */
1954#define WM8958_MICB2_MODE_MASK 0x0010 /* MICB2_MODE */
1955#define WM8958_MICB2_MODE_SHIFT 4 /* MICB2_MODE */
1956#define WM8958_MICB2_MODE_WIDTH 1 /* MICB2_MODE */
1957#define WM8958_MICB2_LVL_MASK 0x000E /* MICB2_LVL - [3:1] */
1958#define WM8958_MICB2_LVL_SHIFT 1 /* MICB2_LVL - [3:1] */
1959#define WM8958_MICB2_LVL_WIDTH 3 /* MICB2_LVL - [3:1] */
1960#define WM8958_MICB2_DISCH 0x0001 /* MICB2_DISCH */
1961#define WM8958_MICB2_DISCH_MASK 0x0001 /* MICB2_DISCH */
1962#define WM8958_MICB2_DISCH_SHIFT 0 /* MICB2_DISCH */
1963#define WM8958_MICB2_DISCH_WIDTH 1 /* MICB2_DISCH */
1964
1965/*
1924 * R76 (0x4C) - Charge Pump (1) 1966 * R76 (0x4C) - Charge Pump (1)
1925 */ 1967 */
1926#define WM8994_CP_ENA 0x8000 /* CP_ENA */ 1968#define WM8994_CP_ENA 0x8000 /* CP_ENA */
@@ -2949,6 +2991,34 @@
2949#define WM8994_AIF1DAC2_3D_ENA_WIDTH 1 /* AIF1DAC2_3D_ENA */ 2991#define WM8994_AIF1DAC2_3D_ENA_WIDTH 1 /* AIF1DAC2_3D_ENA */
2950 2992
2951/* 2993/*
2994 * R1072 (0x430) - AIF1 DAC1 Noise Gate
2995 */
2996#define WM8958_AIF1DAC1_NG_HLD_MASK 0x0060 /* AIF1DAC1_NG_HLD - [6:5] */
2997#define WM8958_AIF1DAC1_NG_HLD_SHIFT 5 /* AIF1DAC1_NG_HLD - [6:5] */
2998#define WM8958_AIF1DAC1_NG_HLD_WIDTH 2 /* AIF1DAC1_NG_HLD - [6:5] */
2999#define WM8958_AIF1DAC1_NG_THR_MASK 0x000E /* AIF1DAC1_NG_THR - [3:1] */
3000#define WM8958_AIF1DAC1_NG_THR_SHIFT 1 /* AIF1DAC1_NG_THR - [3:1] */
3001#define WM8958_AIF1DAC1_NG_THR_WIDTH 3 /* AIF1DAC1_NG_THR - [3:1] */
3002#define WM8958_AIF1DAC1_NG_ENA 0x0001 /* AIF1DAC1_NG_ENA */
3003#define WM8958_AIF1DAC1_NG_ENA_MASK 0x0001 /* AIF1DAC1_NG_ENA */
3004#define WM8958_AIF1DAC1_NG_ENA_SHIFT 0 /* AIF1DAC1_NG_ENA */
3005#define WM8958_AIF1DAC1_NG_ENA_WIDTH 1 /* AIF1DAC1_NG_ENA */
3006
3007/*
3008 * R1073 (0x431) - AIF1 DAC2 Noise Gate
3009 */
3010#define WM8958_AIF1DAC2_NG_HLD_MASK 0x0060 /* AIF1DAC2_NG_HLD - [6:5] */
3011#define WM8958_AIF1DAC2_NG_HLD_SHIFT 5 /* AIF1DAC2_NG_HLD - [6:5] */
3012#define WM8958_AIF1DAC2_NG_HLD_WIDTH 2 /* AIF1DAC2_NG_HLD - [6:5] */
3013#define WM8958_AIF1DAC2_NG_THR_MASK 0x000E /* AIF1DAC2_NG_THR - [3:1] */
3014#define WM8958_AIF1DAC2_NG_THR_SHIFT 1 /* AIF1DAC2_NG_THR - [3:1] */
3015#define WM8958_AIF1DAC2_NG_THR_WIDTH 3 /* AIF1DAC2_NG_THR - [3:1] */
3016#define WM8958_AIF1DAC2_NG_ENA 0x0001 /* AIF1DAC2_NG_ENA */
3017#define WM8958_AIF1DAC2_NG_ENA_MASK 0x0001 /* AIF1DAC2_NG_ENA */
3018#define WM8958_AIF1DAC2_NG_ENA_SHIFT 0 /* AIF1DAC2_NG_ENA */
3019#define WM8958_AIF1DAC2_NG_ENA_WIDTH 1 /* AIF1DAC2_NG_ENA */
3020
3021/*
2952 * R1088 (0x440) - AIF1 DRC1 (1) 3022 * R1088 (0x440) - AIF1 DRC1 (1)
2953 */ 3023 */
2954#define WM8994_AIF1DRC1_SIG_DET_RMS_MASK 0xF800 /* AIF1DRC1_SIG_DET_RMS - [15:11] */ 3024#define WM8994_AIF1DRC1_SIG_DET_RMS_MASK 0xF800 /* AIF1DRC1_SIG_DET_RMS - [15:11] */
@@ -3560,6 +3630,20 @@
3560#define WM8994_AIF2DAC_3D_ENA_WIDTH 1 /* AIF2DAC_3D_ENA */ 3630#define WM8994_AIF2DAC_3D_ENA_WIDTH 1 /* AIF2DAC_3D_ENA */
3561 3631
3562/* 3632/*
3633 * R1328 (0x530) - AIF2 DAC Noise Gate
3634 */
3635#define WM8958_AIF2DAC_NG_HLD_MASK 0x0060 /* AIF2DAC_NG_HLD - [6:5] */
3636#define WM8958_AIF2DAC_NG_HLD_SHIFT 5 /* AIF2DAC_NG_HLD - [6:5] */
3637#define WM8958_AIF2DAC_NG_HLD_WIDTH 2 /* AIF2DAC_NG_HLD - [6:5] */
3638#define WM8958_AIF2DAC_NG_THR_MASK 0x000E /* AIF2DAC_NG_THR - [3:1] */
3639#define WM8958_AIF2DAC_NG_THR_SHIFT 1 /* AIF2DAC_NG_THR - [3:1] */
3640#define WM8958_AIF2DAC_NG_THR_WIDTH 3 /* AIF2DAC_NG_THR - [3:1] */
3641#define WM8958_AIF2DAC_NG_ENA 0x0001 /* AIF2DAC_NG_ENA */
3642#define WM8958_AIF2DAC_NG_ENA_MASK 0x0001 /* AIF2DAC_NG_ENA */
3643#define WM8958_AIF2DAC_NG_ENA_SHIFT 0 /* AIF2DAC_NG_ENA */
3644#define WM8958_AIF2DAC_NG_ENA_WIDTH 1 /* AIF2DAC_NG_ENA */
3645
3646/*
3563 * R1344 (0x540) - AIF2 DRC (1) 3647 * R1344 (0x540) - AIF2 DRC (1)
3564 */ 3648 */
3565#define WM8994_AIF2DRC_SIG_DET_RMS_MASK 0xF800 /* AIF2DRC_SIG_DET_RMS - [15:11] */ 3649#define WM8994_AIF2DRC_SIG_DET_RMS_MASK 0xF800 /* AIF2DRC_SIG_DET_RMS - [15:11] */
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 60a65cd7e1a0..003c05349ae5 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -20,9 +20,61 @@
20struct i2c_client; 20struct i2c_client;
21struct spi_device; 21struct spi_device;
22 22
23/**
24 * Default value for a register. We use an array of structs rather
25 * than a simple array as many modern devices have very sparse
26 * register maps.
27 *
28 * @reg: Register address.
29 * @def: Register default value.
30 */
31struct reg_default {
32 unsigned int reg;
33 unsigned int def;
34};
35
36/**
37 * Configuration for the register map of a device.
38 *
39 * @reg_bits: Number of bits in a register address, mandatory.
40 * @val_bits: Number of bits in a register value, mandatory.
41 *
42 * @writeable_reg: Optional callback returning true if the register
43 * can be written to.
44 * @readable_reg: Optional callback returning true if the register
45 * can be read from.
46 * @volatile_reg: Optional callback returning true if the register
47 * value can't be cached.
48 * @precious_reg: Optional callback returning true if the rgister
49 * should not be read outside of a call from the driver
50 * (eg, a clear on read interrupt status register).
51 *
52 * @max_register: Optional, specifies the maximum valid register index.
53 * @reg_defaults: Power on reset values for registers (for use with
54 * register cache support).
55 * @num_reg_defaults: Number of elements in reg_defaults.
56 *
57 * @read_flag_mask: Mask to be set in the top byte of the register when doing
58 * a read.
59 * @write_flag_mask: Mask to be set in the top byte of the register when doing
60 * a write. If both read_flag_mask and write_flag_mask are
61 * empty the regmap_bus default masks are used.
62 */
23struct regmap_config { 63struct regmap_config {
24 int reg_bits; 64 int reg_bits;
25 int val_bits; 65 int val_bits;
66
67 bool (*writeable_reg)(struct device *dev, unsigned int reg);
68 bool (*readable_reg)(struct device *dev, unsigned int reg);
69 bool (*volatile_reg)(struct device *dev, unsigned int reg);
70 bool (*precious_reg)(struct device *dev, unsigned int reg);
71
72 unsigned int max_register;
73 struct reg_default *reg_defaults;
74 int num_reg_defaults;
75
76 u8 read_flag_mask;
77 u8 write_flag_mask;
26}; 78};
27 79
28typedef int (*regmap_hw_write)(struct device *dev, const void *data, 80typedef int (*regmap_hw_write)(struct device *dev, const void *data,
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 26f6ea4444e3..6fae97a6ce7d 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -141,6 +141,7 @@ int regulator_enable(struct regulator *regulator);
141int regulator_disable(struct regulator *regulator); 141int regulator_disable(struct regulator *regulator);
142int regulator_force_disable(struct regulator *regulator); 142int regulator_force_disable(struct regulator *regulator);
143int regulator_is_enabled(struct regulator *regulator); 143int regulator_is_enabled(struct regulator *regulator);
144int regulator_disable_deferred(struct regulator *regulator, int ms);
144 145
145int regulator_bulk_get(struct device *dev, int num_consumers, 146int regulator_bulk_get(struct device *dev, int num_consumers,
146 struct regulator_bulk_data *consumers); 147 struct regulator_bulk_data *consumers);
@@ -211,6 +212,12 @@ static inline int regulator_disable(struct regulator *regulator)
211 return 0; 212 return 0;
212} 213}
213 214
215static inline int regulator_disable_deferred(struct regulator *regulator,
216 int ms)
217{
218 return 0;
219}
220
214static inline int regulator_is_enabled(struct regulator *regulator) 221static inline int regulator_is_enabled(struct regulator *regulator)
215{ 222{
216 return 1; 223 return 1;
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 1a80bc77517d..12a1aa04b720 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -199,6 +199,9 @@ struct regulator_dev {
199 struct regulation_constraints *constraints; 199 struct regulation_constraints *constraints;
200 struct regulator *supply; /* for tree */ 200 struct regulator *supply; /* for tree */
201 201
202 struct delayed_work disable_work;
203 int deferred_disables;
204
202 void *reg_data; /* regulator_dev data */ 205 void *reg_data; /* regulator_dev data */
203 206
204#ifdef CONFIG_DEBUG_FS 207#ifdef CONFIG_DEBUG_FS
diff --git a/include/sound/adau1373.h b/include/sound/adau1373.h
new file mode 100644
index 000000000000..1b19c7666574
--- /dev/null
+++ b/include/sound/adau1373.h
@@ -0,0 +1,34 @@
1/*
2 * Analog Devices ADAU1373 Audio Codec drive
3 *
4 * Copyright 2011 Analog Devices Inc.
5 * Author: Lars-Peter Clausen <lars@metafoo.de>
6 *
7 * Licensed under the GPL-2 or later.
8 */
9
10#ifndef __SOUND_ADAU1373_H__
11#define __SOUND_ADAU1373_H__
12
13enum adau1373_micbias_voltage {
14 ADAU1373_MICBIAS_2_9V = 0,
15 ADAU1373_MICBIAS_2_2V = 1,
16 ADAU1373_MICBIAS_2_6V = 2,
17 ADAU1373_MICBIAS_1_8V = 3,
18};
19
20#define ADAU1373_DRC_SIZE 13
21
22struct adau1373_platform_data {
23 bool input_differential[4];
24 bool lineout_differential;
25 bool lineout_ground_sense;
26
27 unsigned int num_drc;
28 uint8_t drc_setting[3][ADAU1373_DRC_SIZE];
29
30 enum adau1373_micbias_voltage micbias1;
31 enum adau1373_micbias_voltage micbias2;
32};
33
34#endif
diff --git a/include/sound/initval.h b/include/sound/initval.h
index 1daa6dff8297..f99a0d2ddfe7 100644
--- a/include/sound/initval.h
+++ b/include/sound/initval.h
@@ -62,7 +62,7 @@ static int snd_legacy_find_free_irq(int *irq_table)
62{ 62{
63 while (*irq_table != -1) { 63 while (*irq_table != -1) {
64 if (!request_irq(*irq_table, snd_legacy_empty_irq_handler, 64 if (!request_irq(*irq_table, snd_legacy_empty_irq_handler,
65 IRQF_DISABLED | IRQF_PROBE_SHARED, "ALSA Test IRQ", 65 IRQF_PROBE_SHARED, "ALSA Test IRQ",
66 (void *) irq_table)) { 66 (void *) irq_table)) {
67 free_irq(*irq_table, (void *) irq_table); 67 free_irq(*irq_table, (void *) irq_table);
68 return *irq_table; 68 return *irq_table;
diff --git a/include/sound/saif.h b/include/sound/saif.h
new file mode 100644
index 000000000000..d0e0de7984ec
--- /dev/null
+++ b/include/sound/saif.h
@@ -0,0 +1,16 @@
1/*
2 * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __SOUND_SAIF_H__
10#define __SOUND_SAIF_H__
11
12struct mxs_saif_platform_data {
13 int (*init) (void);
14 int (*get_master_id) (unsigned int saif_id);
15};
16#endif
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index e0583b7769cb..350b1b395cac 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -524,6 +524,8 @@ struct snd_soc_dapm_context {
524 enum snd_soc_bias_level target_bias_level; 524 enum snd_soc_bias_level target_bias_level;
525 struct list_head list; 525 struct list_head list;
526 526
527 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
528
527#ifdef CONFIG_DEBUG_FS 529#ifdef CONFIG_DEBUG_FS
528 struct dentry *debugfs_dapm; 530 struct dentry *debugfs_dapm;
529#endif 531#endif
diff --git a/include/sound/soc.h b/include/sound/soc.h
index aa19f5a32ba8..24e17be38c19 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -19,6 +19,7 @@
19#include <linux/workqueue.h> 19#include <linux/workqueue.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/regmap.h>
22#include <sound/core.h> 23#include <sound/core.h>
23#include <sound/pcm.h> 24#include <sound/pcm.h>
24#include <sound/control.h> 25#include <sound/control.h>
@@ -260,6 +261,7 @@ extern struct snd_ac97_bus_ops soc_ac97_ops;
260enum snd_soc_control_type { 261enum snd_soc_control_type {
261 SND_SOC_I2C = 1, 262 SND_SOC_I2C = 1,
262 SND_SOC_SPI, 263 SND_SOC_SPI,
264 SND_SOC_REGMAP,
263}; 265};
264 266
265enum snd_soc_compress_type { 267enum snd_soc_compress_type {
@@ -274,7 +276,7 @@ enum snd_soc_pcm_subclass {
274}; 276};
275 277
276int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id, 278int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
277 unsigned int freq, int dir); 279 int source, unsigned int freq, int dir);
278int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, 280int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
279 unsigned int freq_in, unsigned int freq_out); 281 unsigned int freq_in, unsigned int freq_out);
280 282
@@ -576,6 +578,7 @@ struct snd_soc_codec {
576 const void *reg_def_copy; 578 const void *reg_def_copy;
577 const struct snd_soc_cache_ops *cache_ops; 579 const struct snd_soc_cache_ops *cache_ops;
578 struct mutex cache_rw_mutex; 580 struct mutex cache_rw_mutex;
581 int val_bytes;
579 582
580 /* dapm */ 583 /* dapm */
581 struct snd_soc_dapm_context dapm; 584 struct snd_soc_dapm_context dapm;
@@ -607,7 +610,7 @@ struct snd_soc_codec_driver {
607 610
608 /* codec wide operations */ 611 /* codec wide operations */
609 int (*set_sysclk)(struct snd_soc_codec *codec, 612 int (*set_sysclk)(struct snd_soc_codec *codec,
610 int clk_id, unsigned int freq, int dir); 613 int clk_id, int source, unsigned int freq, int dir);
611 int (*set_pll)(struct snd_soc_codec *codec, int pll_id, int source, 614 int (*set_pll)(struct snd_soc_codec *codec, int pll_id, int source,
612 unsigned int freq_in, unsigned int freq_out); 615 unsigned int freq_in, unsigned int freq_out);
613 616
@@ -619,7 +622,7 @@ struct snd_soc_codec_driver {
619 int (*volatile_register)(struct snd_soc_codec *, unsigned int); 622 int (*volatile_register)(struct snd_soc_codec *, unsigned int);
620 int (*readable_register)(struct snd_soc_codec *, unsigned int); 623 int (*readable_register)(struct snd_soc_codec *, unsigned int);
621 int (*writable_register)(struct snd_soc_codec *, unsigned int); 624 int (*writable_register)(struct snd_soc_codec *, unsigned int);
622 short reg_cache_size; 625 unsigned int reg_cache_size;
623 short reg_cache_step; 626 short reg_cache_step;
624 short reg_word_size; 627 short reg_word_size;
625 const void *reg_cache_default; 628 const void *reg_cache_default;
@@ -630,10 +633,14 @@ struct snd_soc_codec_driver {
630 /* codec bias level */ 633 /* codec bias level */
631 int (*set_bias_level)(struct snd_soc_codec *, 634 int (*set_bias_level)(struct snd_soc_codec *,
632 enum snd_soc_bias_level level); 635 enum snd_soc_bias_level level);
636 bool idle_bias_off;
633 637
634 void (*seq_notifier)(struct snd_soc_dapm_context *, 638 void (*seq_notifier)(struct snd_soc_dapm_context *,
635 enum snd_soc_dapm_type, int); 639 enum snd_soc_dapm_type, int);
636 640
641 /* codec stream completion event */
642 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
643
637 /* probe ordering - for components with runtime dependencies */ 644 /* probe ordering - for components with runtime dependencies */
638 int probe_order; 645 int probe_order;
639 int remove_order; 646 int remove_order;
@@ -669,6 +676,9 @@ struct snd_soc_platform_driver {
669 /* platform stream ops */ 676 /* platform stream ops */
670 struct snd_pcm_ops *ops; 677 struct snd_pcm_ops *ops;
671 678
679 /* platform stream completion event */
680 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
681
672 /* probe ordering - for components with runtime dependencies */ 682 /* probe ordering - for components with runtime dependencies */
673 int probe_order; 683 int probe_order;
674 int remove_order; 684 int remove_order;