diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-18 13:31:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 13:31:12 -0400 |
commit | 3e370b29d35fb01bfb92c2814d6f79bf6a2cb970 (patch) | |
tree | 3b8fb467d60bfe6a34686f4abdc3a60050ba40a4 /include/sound | |
parent | 88d1dce3a74367291f65a757fbdcaf17f042f30c (diff) | |
parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) |
Merge branch 'linus' into x86/pci-ioapic-boot-irq-quirks
Conflicts:
drivers/pci/quirks.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/ad1843.h | 46 | ||||
-rw-r--r-- | include/sound/control.h | 3 | ||||
-rw-r--r-- | include/sound/core.h | 8 | ||||
-rw-r--r-- | include/sound/cs4231-regs.h | 8 | ||||
-rw-r--r-- | include/sound/cs4231.h | 3 | ||||
-rw-r--r-- | include/sound/emu10k1.h | 1 | ||||
-rw-r--r-- | include/sound/seq_kernel.h | 2 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 42 | ||||
-rw-r--r-- | include/sound/soc.h | 175 | ||||
-rw-r--r-- | include/sound/uda1341.h | 2 | ||||
-rw-r--r-- | include/sound/version.h | 4 |
11 files changed, 201 insertions, 93 deletions
diff --git a/include/sound/ad1843.h b/include/sound/ad1843.h new file mode 100644 index 000000000000..b236a9d1d6e4 --- /dev/null +++ b/include/sound/ad1843.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright 2003 Vivien Chappelier <vivien.chappelier@linux-mips.org> | ||
7 | * Copyright 2008 Thomas Bogendoerfer <tsbogend@franken.de> | ||
8 | */ | ||
9 | |||
10 | #ifndef __SOUND_AD1843_H | ||
11 | #define __SOUND_AD1843_H | ||
12 | |||
13 | struct snd_ad1843 { | ||
14 | void *chip; | ||
15 | int (*read)(void *chip, int reg); | ||
16 | int (*write)(void *chip, int reg, int val); | ||
17 | }; | ||
18 | |||
19 | #define AD1843_GAIN_RECLEV 0 | ||
20 | #define AD1843_GAIN_LINE 1 | ||
21 | #define AD1843_GAIN_LINE_2 2 | ||
22 | #define AD1843_GAIN_MIC 3 | ||
23 | #define AD1843_GAIN_PCM_0 4 | ||
24 | #define AD1843_GAIN_PCM_1 5 | ||
25 | #define AD1843_GAIN_SIZE (AD1843_GAIN_PCM_1+1) | ||
26 | |||
27 | int ad1843_get_gain_max(struct snd_ad1843 *ad1843, int id); | ||
28 | int ad1843_get_gain(struct snd_ad1843 *ad1843, int id); | ||
29 | int ad1843_set_gain(struct snd_ad1843 *ad1843, int id, int newval); | ||
30 | int ad1843_get_recsrc(struct snd_ad1843 *ad1843); | ||
31 | int ad1843_set_recsrc(struct snd_ad1843 *ad1843, int newsrc); | ||
32 | void ad1843_setup_dac(struct snd_ad1843 *ad1843, | ||
33 | unsigned int id, | ||
34 | unsigned int framerate, | ||
35 | snd_pcm_format_t fmt, | ||
36 | unsigned int channels); | ||
37 | void ad1843_shutdown_dac(struct snd_ad1843 *ad1843, | ||
38 | unsigned int id); | ||
39 | void ad1843_setup_adc(struct snd_ad1843 *ad1843, | ||
40 | unsigned int framerate, | ||
41 | snd_pcm_format_t fmt, | ||
42 | unsigned int channels); | ||
43 | void ad1843_shutdown_adc(struct snd_ad1843 *ad1843); | ||
44 | int ad1843_init(struct snd_ad1843 *ad1843); | ||
45 | |||
46 | #endif /* __SOUND_AD1843_H */ | ||
diff --git a/include/sound/control.h b/include/sound/control.h index 3dc1291f52db..4721b4bba053 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -129,9 +129,6 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn); | |||
129 | #define snd_ctl_unregister_ioctl_compat(fcn) | 129 | #define snd_ctl_unregister_ioctl_compat(fcn) |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control); | ||
133 | int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file, struct snd_ctl_elem_value *control); | ||
134 | |||
135 | static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) | 132 | static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) |
136 | { | 133 | { |
137 | return id->numid - kctl->id.numid; | 134 | return id->numid - kctl->id.numid; |
diff --git a/include/sound/core.h b/include/sound/core.h index 695ee53488a3..558b96284bd2 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -412,13 +412,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...) | |||
412 | 412 | ||
413 | #endif /* CONFIG_SND_DEBUG */ | 413 | #endif /* CONFIG_SND_DEBUG */ |
414 | 414 | ||
415 | #ifdef CONFIG_SND_DEBUG_DETECT | 415 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
416 | /** | 416 | /** |
417 | * snd_printdd - debug printk | 417 | * snd_printdd - debug printk |
418 | * @format: format string | 418 | * @format: format string |
419 | * | 419 | * |
420 | * Works like snd_printk() for debugging purposes. | 420 | * Works like snd_printk() for debugging purposes. |
421 | * Ignored when CONFIG_SND_DEBUG_DETECT is not set. | 421 | * Ignored when CONFIG_SND_DEBUG_VERBOSE is not set. |
422 | */ | 422 | */ |
423 | #define snd_printdd(format, args...) snd_printk(format, ##args) | 423 | #define snd_printdd(format, args...) snd_printk(format, ##args) |
424 | #else | 424 | #else |
@@ -442,7 +442,7 @@ struct snd_pci_quirk { | |||
442 | unsigned short subvendor; /* PCI subvendor ID */ | 442 | unsigned short subvendor; /* PCI subvendor ID */ |
443 | unsigned short subdevice; /* PCI subdevice ID */ | 443 | unsigned short subdevice; /* PCI subdevice ID */ |
444 | int value; /* value */ | 444 | int value; /* value */ |
445 | #ifdef CONFIG_SND_DEBUG_DETECT | 445 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
446 | const char *name; /* name of the device (optional) */ | 446 | const char *name; /* name of the device (optional) */ |
447 | #endif | 447 | #endif |
448 | }; | 448 | }; |
@@ -450,7 +450,7 @@ struct snd_pci_quirk { | |||
450 | #define _SND_PCI_QUIRK_ID(vend,dev) \ | 450 | #define _SND_PCI_QUIRK_ID(vend,dev) \ |
451 | .subvendor = (vend), .subdevice = (dev) | 451 | .subvendor = (vend), .subdevice = (dev) |
452 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} | 452 | #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} |
453 | #ifdef CONFIG_SND_DEBUG_DETECT | 453 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
454 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ | 454 | #define SND_PCI_QUIRK(vend,dev,xname,val) \ |
455 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} | 455 | {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} |
456 | #else | 456 | #else |
diff --git a/include/sound/cs4231-regs.h b/include/sound/cs4231-regs.h index e8d1f3e31f9e..92647532c454 100644 --- a/include/sound/cs4231-regs.h +++ b/include/sound/cs4231-regs.h | |||
@@ -177,4 +177,12 @@ | |||
177 | #define CS4236_RIGHT_WAVE 0x1c /* right wavetable serial port volume */ | 177 | #define CS4236_RIGHT_WAVE 0x1c /* right wavetable serial port volume */ |
178 | #define CS4236_VERSION 0x9c /* chip version and ID */ | 178 | #define CS4236_VERSION 0x9c /* chip version and ID */ |
179 | 179 | ||
180 | /* definitions for extended registers - OPTI93X */ | ||
181 | #define OPTi931_AUX_LEFT_INPUT 0x10 | ||
182 | #define OPTi931_AUX_RIGHT_INPUT 0x11 | ||
183 | #define OPTi93X_MIC_LEFT_INPUT 0x14 | ||
184 | #define OPTi93X_MIC_RIGHT_INPUT 0x15 | ||
185 | #define OPTi93X_OUT_LEFT 0x16 | ||
186 | #define OPTi93X_OUT_RIGHT 0x17 | ||
187 | |||
180 | #endif /* __SOUND_CS4231_REGS_H */ | 188 | #endif /* __SOUND_CS4231_REGS_H */ |
diff --git a/include/sound/cs4231.h b/include/sound/cs4231.h index 66055d702aa3..f0785f9f4ae4 100644 --- a/include/sound/cs4231.h +++ b/include/sound/cs4231.h | |||
@@ -58,6 +58,7 @@ | |||
58 | /* compatible, but clones */ | 58 | /* compatible, but clones */ |
59 | #define CS4231_HW_INTERWAVE 0x1000 /* InterWave chip */ | 59 | #define CS4231_HW_INTERWAVE 0x1000 /* InterWave chip */ |
60 | #define CS4231_HW_OPL3SA2 0x1101 /* OPL3-SA2 chip, similar to cs4231 */ | 60 | #define CS4231_HW_OPL3SA2 0x1101 /* OPL3-SA2 chip, similar to cs4231 */ |
61 | #define CS4231_HW_OPTI93X 0x1102 /* Opti 930/931/933 */ | ||
61 | 62 | ||
62 | /* defines for codec.hwshare */ | 63 | /* defines for codec.hwshare */ |
63 | #define CS4231_HWSHARE_IRQ (1<<0) | 64 | #define CS4231_HWSHARE_IRQ (1<<0) |
@@ -120,6 +121,8 @@ unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg); | |||
120 | void snd_cs4231_mce_up(struct snd_cs4231 *chip); | 121 | void snd_cs4231_mce_up(struct snd_cs4231 *chip); |
121 | void snd_cs4231_mce_down(struct snd_cs4231 *chip); | 122 | void snd_cs4231_mce_down(struct snd_cs4231 *chip); |
122 | 123 | ||
124 | void snd_cs4231_overrange(struct snd_cs4231 *chip); | ||
125 | |||
123 | irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id); | 126 | irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id); |
124 | 127 | ||
125 | const char *snd_cs4231_chip_id(struct snd_cs4231 *chip); | 128 | const char *snd_cs4231_chip_id(struct snd_cs4231 *chip); |
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 7b7b9b13b4dd..10ee28eac018 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -1670,6 +1670,7 @@ struct snd_emu_chip_details { | |||
1670 | unsigned char spi_dac; /* SPI interface for DAC */ | 1670 | unsigned char spi_dac; /* SPI interface for DAC */ |
1671 | unsigned char i2c_adc; /* I2C interface for ADC */ | 1671 | unsigned char i2c_adc; /* I2C interface for ADC */ |
1672 | unsigned char adc_1361t; /* Use Philips 1361T ADC */ | 1672 | unsigned char adc_1361t; /* Use Philips 1361T ADC */ |
1673 | unsigned char invert_shared_spdif; /* analog/digital switch inverted */ | ||
1673 | const char *driver; | 1674 | const char *driver; |
1674 | const char *name; | 1675 | const char *name; |
1675 | const char *id; /* for backward compatibility - can be NULL if not needed */ | 1676 | const char *id; /* for backward compatibility - can be NULL if not needed */ |
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h index f023c1b97f8c..3d9afb6a8c9c 100644 --- a/include/sound/seq_kernel.h +++ b/include/sound/seq_kernel.h | |||
@@ -105,7 +105,7 @@ int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp, | |||
105 | int cap, int type, int midi_channels, int midi_voices, char *portname); | 105 | int cap, int type, int midi_channels, int midi_voices, char *portname); |
106 | int snd_seq_event_port_detach(int client, int port); | 106 | int snd_seq_event_port_detach(int client, int port); |
107 | 107 | ||
108 | #ifdef CONFIG_KMOD | 108 | #ifdef CONFIG_MODULES |
109 | void snd_seq_autoload_lock(void); | 109 | void snd_seq_autoload_lock(void); |
110 | void snd_seq_autoload_unlock(void); | 110 | void snd_seq_autoload_unlock(void); |
111 | #else | 111 | #else |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index a105b01e06d5..3030fdc6981d 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -130,6 +130,13 @@ | |||
130 | { .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \ | 130 | { .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \ |
131 | .shift = wshift, .invert = winvert} | 131 | .shift = wshift, .invert = winvert} |
132 | 132 | ||
133 | /* generic register modifier widget */ | ||
134 | #define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ | ||
135 | { .id = wid, .name = wname, .kcontrols = NULL, .num_kcontrols = 0, \ | ||
136 | .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \ | ||
137 | .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \ | ||
138 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | ||
139 | |||
133 | /* dapm kcontrol types */ | 140 | /* dapm kcontrol types */ |
134 | #define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ | 141 | #define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ |
135 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 142 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
@@ -193,6 +200,7 @@ struct snd_soc_dapm_widget; | |||
193 | enum snd_soc_dapm_type; | 200 | enum snd_soc_dapm_type; |
194 | struct snd_soc_dapm_path; | 201 | struct snd_soc_dapm_path; |
195 | struct snd_soc_dapm_pin; | 202 | struct snd_soc_dapm_pin; |
203 | struct snd_soc_dapm_route; | ||
196 | 204 | ||
197 | /* dapm controls */ | 205 | /* dapm controls */ |
198 | int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | 206 | int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, |
@@ -205,25 +213,32 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, | |||
205 | struct snd_ctl_elem_value *ucontrol); | 213 | struct snd_ctl_elem_value *ucontrol); |
206 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, | 214 | int snd_soc_dapm_new_control(struct snd_soc_codec *codec, |
207 | const struct snd_soc_dapm_widget *widget); | 215 | const struct snd_soc_dapm_widget *widget); |
216 | int snd_soc_dapm_new_controls(struct snd_soc_codec *codec, | ||
217 | const struct snd_soc_dapm_widget *widget, | ||
218 | int num); | ||
208 | 219 | ||
209 | /* dapm path setup */ | 220 | /* dapm path setup */ |
210 | int snd_soc_dapm_connect_input(struct snd_soc_codec *codec, | 221 | int __deprecated snd_soc_dapm_connect_input(struct snd_soc_codec *codec, |
211 | const char *sink_name, const char *control_name, const char *src_name); | 222 | const char *sink_name, const char *control_name, const char *src_name); |
212 | int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec); | 223 | int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec); |
213 | void snd_soc_dapm_free(struct snd_soc_device *socdev); | 224 | void snd_soc_dapm_free(struct snd_soc_device *socdev); |
225 | int snd_soc_dapm_add_routes(struct snd_soc_codec *codec, | ||
226 | const struct snd_soc_dapm_route *route, int num); | ||
214 | 227 | ||
215 | /* dapm events */ | 228 | /* dapm events */ |
216 | int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, char *stream, | 229 | int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, char *stream, |
217 | int event); | 230 | int event); |
218 | int snd_soc_dapm_device_event(struct snd_soc_device *socdev, int event); | 231 | int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev, |
232 | enum snd_soc_bias_level level); | ||
219 | 233 | ||
220 | /* dapm sys fs - used by the core */ | 234 | /* dapm sys fs - used by the core */ |
221 | int snd_soc_dapm_sys_add(struct device *dev); | 235 | int snd_soc_dapm_sys_add(struct device *dev); |
222 | 236 | ||
223 | /* dapm audio endpoint control */ | 237 | /* dapm audio pin control and status */ |
224 | int snd_soc_dapm_set_endpoint(struct snd_soc_codec *codec, | 238 | int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, char *pin); |
225 | char *pin, int status); | 239 | int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, char *pin); |
226 | int snd_soc_dapm_sync_endpoints(struct snd_soc_codec *codec); | 240 | int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, char *pin); |
241 | int snd_soc_dapm_sync(struct snd_soc_codec *codec); | ||
227 | 242 | ||
228 | /* dapm widget types */ | 243 | /* dapm widget types */ |
229 | enum snd_soc_dapm_type { | 244 | enum snd_soc_dapm_type { |
@@ -245,6 +260,18 @@ enum snd_soc_dapm_type { | |||
245 | snd_soc_dapm_post, /* machine specific post widget - exec last */ | 260 | snd_soc_dapm_post, /* machine specific post widget - exec last */ |
246 | }; | 261 | }; |
247 | 262 | ||
263 | /* | ||
264 | * DAPM audio route definition. | ||
265 | * | ||
266 | * Defines an audio route originating at source via control and finishing | ||
267 | * at sink. | ||
268 | */ | ||
269 | struct snd_soc_dapm_route { | ||
270 | const char *sink; | ||
271 | const char *control; | ||
272 | const char *source; | ||
273 | }; | ||
274 | |||
248 | /* dapm audio path between two widgets */ | 275 | /* dapm audio path between two widgets */ |
249 | struct snd_soc_dapm_path { | 276 | struct snd_soc_dapm_path { |
250 | char *name; | 277 | char *name; |
@@ -277,6 +304,9 @@ struct snd_soc_dapm_widget { | |||
277 | unsigned char shift; /* bits to shift */ | 304 | unsigned char shift; /* bits to shift */ |
278 | unsigned int saved_value; /* widget saved value */ | 305 | unsigned int saved_value; /* widget saved value */ |
279 | unsigned int value; /* widget current value */ | 306 | unsigned int value; /* widget current value */ |
307 | unsigned int mask; /* non-shifted mask */ | ||
308 | unsigned int on_val; /* on state value */ | ||
309 | unsigned int off_val; /* off state value */ | ||
280 | unsigned char power:1; /* block power status */ | 310 | unsigned char power:1; /* block power status */ |
281 | unsigned char invert:1; /* invert the power bit */ | 311 | unsigned char invert:1; /* invert the power bit */ |
282 | unsigned char active:1; /* active stream on DAC, ADC's */ | 312 | unsigned char active:1; /* active stream on DAC, ADC's */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index d3c8c033dff8..1890d87c5204 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -73,6 +73,15 @@ | |||
73 | .get = snd_soc_get_volsw_2r, .put = snd_soc_put_volsw_2r, \ | 73 | .get = snd_soc_get_volsw_2r, .put = snd_soc_put_volsw_2r, \ |
74 | .private_value = (reg_left) | ((shift) << 8) | \ | 74 | .private_value = (reg_left) | ((shift) << 8) | \ |
75 | ((max) << 12) | ((invert) << 20) | ((reg_right) << 24) } | 75 | ((max) << 12) | ((invert) << 20) | ((reg_right) << 24) } |
76 | #define SOC_DOUBLE_S8_TLV(xname, reg, min, max, tlv_array) \ | ||
77 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ | ||
78 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \ | ||
79 | SNDRV_CTL_ELEM_ACCESS_READWRITE, \ | ||
80 | .tlv.p = (tlv_array), \ | ||
81 | .info = snd_soc_info_volsw_s8, .get = snd_soc_get_volsw_s8, \ | ||
82 | .put = snd_soc_put_volsw_s8, \ | ||
83 | .private_value = (reg) | (((signed char)max) << 16) | \ | ||
84 | (((signed char)min) << 24) } | ||
76 | #define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \ | 85 | #define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \ |
77 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ | 86 | { .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \ |
78 | .mask = xmask, .texts = xtexts } | 87 | .mask = xmask, .texts = xtexts } |
@@ -91,6 +100,15 @@ | |||
91 | .info = snd_soc_info_volsw, \ | 100 | .info = snd_soc_info_volsw, \ |
92 | .get = xhandler_get, .put = xhandler_put, \ | 101 | .get = xhandler_get, .put = xhandler_put, \ |
93 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmask, xinvert) } | 102 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmask, xinvert) } |
103 | #define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmask, xinvert,\ | ||
104 | xhandler_get, xhandler_put, tlv_array) \ | ||
105 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | ||
106 | .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ | ||
107 | SNDRV_CTL_ELEM_ACCESS_READWRITE,\ | ||
108 | .tlv.p = (tlv_array), \ | ||
109 | .info = snd_soc_info_volsw, \ | ||
110 | .get = xhandler_get, .put = xhandler_put, \ | ||
111 | .private_value = SOC_SINGLE_VALUE(xreg, xshift, xmask, xinvert) } | ||
94 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ | 112 | #define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \ |
95 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 113 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
96 | .info = snd_soc_info_bool_ext, \ | 114 | .info = snd_soc_info_bool_ext, \ |
@@ -103,6 +121,24 @@ | |||
103 | .private_value = (unsigned long)&xenum } | 121 | .private_value = (unsigned long)&xenum } |
104 | 122 | ||
105 | /* | 123 | /* |
124 | * Bias levels | ||
125 | * | ||
126 | * @ON: Bias is fully on for audio playback and capture operations. | ||
127 | * @PREPARE: Prepare for audio operations. Called before DAPM switching for | ||
128 | * stream start and stop operations. | ||
129 | * @STANDBY: Low power standby state when no playback/capture operations are | ||
130 | * in progress. NOTE: The transition time between STANDBY and ON | ||
131 | * should be as fast as possible and no longer than 10ms. | ||
132 | * @OFF: Power Off. No restrictions on transition times. | ||
133 | */ | ||
134 | enum snd_soc_bias_level { | ||
135 | SND_SOC_BIAS_ON, | ||
136 | SND_SOC_BIAS_PREPARE, | ||
137 | SND_SOC_BIAS_STANDBY, | ||
138 | SND_SOC_BIAS_OFF, | ||
139 | }; | ||
140 | |||
141 | /* | ||
106 | * Digital Audio Interface (DAI) types | 142 | * Digital Audio Interface (DAI) types |
107 | */ | 143 | */ |
108 | #define SND_SOC_DAI_AC97 0x1 | 144 | #define SND_SOC_DAI_AC97 0x1 |
@@ -185,8 +221,7 @@ struct snd_soc_pcm_stream; | |||
185 | struct snd_soc_ops; | 221 | struct snd_soc_ops; |
186 | struct snd_soc_dai_mode; | 222 | struct snd_soc_dai_mode; |
187 | struct snd_soc_pcm_runtime; | 223 | struct snd_soc_pcm_runtime; |
188 | struct snd_soc_codec_dai; | 224 | struct snd_soc_dai; |
189 | struct snd_soc_cpu_dai; | ||
190 | struct snd_soc_codec; | 225 | struct snd_soc_codec; |
191 | struct snd_soc_machine_config; | 226 | struct snd_soc_machine_config; |
192 | struct soc_enum; | 227 | struct soc_enum; |
@@ -221,6 +256,27 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, | |||
221 | struct snd_ac97_bus_ops *ops, int num); | 256 | struct snd_ac97_bus_ops *ops, int num); |
222 | void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); | 257 | void snd_soc_free_ac97_codec(struct snd_soc_codec *codec); |
223 | 258 | ||
259 | /* Digital Audio Interface clocking API.*/ | ||
260 | int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id, | ||
261 | unsigned int freq, int dir); | ||
262 | |||
263 | int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai, | ||
264 | int div_id, int div); | ||
265 | |||
266 | int snd_soc_dai_set_pll(struct snd_soc_dai *dai, | ||
267 | int pll_id, unsigned int freq_in, unsigned int freq_out); | ||
268 | |||
269 | /* Digital Audio interface formatting */ | ||
270 | int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt); | ||
271 | |||
272 | int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai, | ||
273 | unsigned int mask, int slots); | ||
274 | |||
275 | int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate); | ||
276 | |||
277 | /* Digital Audio Interface mute */ | ||
278 | int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute); | ||
279 | |||
224 | /* | 280 | /* |
225 | *Controls | 281 | *Controls |
226 | */ | 282 | */ |
@@ -249,6 +305,12 @@ int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol, | |||
249 | struct snd_ctl_elem_value *ucontrol); | 305 | struct snd_ctl_elem_value *ucontrol); |
250 | int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, | 306 | int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, |
251 | struct snd_ctl_elem_value *ucontrol); | 307 | struct snd_ctl_elem_value *ucontrol); |
308 | int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol, | ||
309 | struct snd_ctl_elem_info *uinfo); | ||
310 | int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol, | ||
311 | struct snd_ctl_elem_value *ucontrol); | ||
312 | int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, | ||
313 | struct snd_ctl_elem_value *ucontrol); | ||
252 | 314 | ||
253 | /* SoC PCM stream information */ | 315 | /* SoC PCM stream information */ |
254 | struct snd_soc_pcm_stream { | 316 | struct snd_soc_pcm_stream { |
@@ -272,87 +334,45 @@ struct snd_soc_ops { | |||
272 | int (*trigger)(struct snd_pcm_substream *, int); | 334 | int (*trigger)(struct snd_pcm_substream *, int); |
273 | }; | 335 | }; |
274 | 336 | ||
275 | /* ASoC codec DAI ops */ | 337 | /* ASoC DAI ops */ |
276 | struct snd_soc_codec_ops { | 338 | struct snd_soc_dai_ops { |
277 | /* codec DAI clocking configuration */ | 339 | /* DAI clocking configuration */ |
278 | int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai, | 340 | int (*set_sysclk)(struct snd_soc_dai *dai, |
279 | int clk_id, unsigned int freq, int dir); | 341 | int clk_id, unsigned int freq, int dir); |
280 | int (*set_pll)(struct snd_soc_codec_dai *codec_dai, | 342 | int (*set_pll)(struct snd_soc_dai *dai, |
281 | int pll_id, unsigned int freq_in, unsigned int freq_out); | 343 | int pll_id, unsigned int freq_in, unsigned int freq_out); |
282 | int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai, | 344 | int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div); |
283 | int div_id, int div); | ||
284 | 345 | ||
285 | /* CPU DAI format configuration */ | 346 | /* DAI format configuration */ |
286 | int (*set_fmt)(struct snd_soc_codec_dai *codec_dai, | 347 | int (*set_fmt)(struct snd_soc_dai *dai, unsigned int fmt); |
287 | unsigned int fmt); | 348 | int (*set_tdm_slot)(struct snd_soc_dai *dai, |
288 | int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai, | ||
289 | unsigned int mask, int slots); | 349 | unsigned int mask, int slots); |
290 | int (*set_tristate)(struct snd_soc_codec_dai *, int tristate); | 350 | int (*set_tristate)(struct snd_soc_dai *dai, int tristate); |
291 | 351 | ||
292 | /* digital mute */ | 352 | /* digital mute */ |
293 | int (*digital_mute)(struct snd_soc_codec_dai *, int mute); | 353 | int (*digital_mute)(struct snd_soc_dai *dai, int mute); |
294 | }; | ||
295 | |||
296 | /* ASoC cpu DAI ops */ | ||
297 | struct snd_soc_cpu_ops { | ||
298 | /* CPU DAI clocking configuration */ | ||
299 | int (*set_sysclk)(struct snd_soc_cpu_dai *cpu_dai, | ||
300 | int clk_id, unsigned int freq, int dir); | ||
301 | int (*set_clkdiv)(struct snd_soc_cpu_dai *cpu_dai, | ||
302 | int div_id, int div); | ||
303 | int (*set_pll)(struct snd_soc_cpu_dai *cpu_dai, | ||
304 | int pll_id, unsigned int freq_in, unsigned int freq_out); | ||
305 | |||
306 | /* CPU DAI format configuration */ | ||
307 | int (*set_fmt)(struct snd_soc_cpu_dai *cpu_dai, | ||
308 | unsigned int fmt); | ||
309 | int (*set_tdm_slot)(struct snd_soc_cpu_dai *cpu_dai, | ||
310 | unsigned int mask, int slots); | ||
311 | int (*set_tristate)(struct snd_soc_cpu_dai *, int tristate); | ||
312 | }; | ||
313 | |||
314 | /* SoC Codec DAI */ | ||
315 | struct snd_soc_codec_dai { | ||
316 | char *name; | ||
317 | int id; | ||
318 | unsigned char type; | ||
319 | |||
320 | /* DAI capabilities */ | ||
321 | struct snd_soc_pcm_stream playback; | ||
322 | struct snd_soc_pcm_stream capture; | ||
323 | |||
324 | /* DAI runtime info */ | ||
325 | struct snd_soc_codec *codec; | ||
326 | unsigned int active; | ||
327 | unsigned char pop_wait:1; | ||
328 | |||
329 | /* ops */ | ||
330 | struct snd_soc_ops ops; | ||
331 | struct snd_soc_codec_ops dai_ops; | ||
332 | |||
333 | /* DAI private data */ | ||
334 | void *private_data; | ||
335 | }; | 354 | }; |
336 | 355 | ||
337 | /* SoC CPU DAI */ | 356 | /* SoC DAI (Digital Audio Interface) */ |
338 | struct snd_soc_cpu_dai { | 357 | struct snd_soc_dai { |
339 | |||
340 | /* DAI description */ | 358 | /* DAI description */ |
341 | char *name; | 359 | char *name; |
342 | unsigned int id; | 360 | unsigned int id; |
343 | unsigned char type; | 361 | unsigned char type; |
344 | 362 | ||
345 | /* DAI callbacks */ | 363 | /* DAI callbacks */ |
346 | int (*probe)(struct platform_device *pdev); | 364 | int (*probe)(struct platform_device *pdev, |
347 | void (*remove)(struct platform_device *pdev); | 365 | struct snd_soc_dai *dai); |
366 | void (*remove)(struct platform_device *pdev, | ||
367 | struct snd_soc_dai *dai); | ||
348 | int (*suspend)(struct platform_device *pdev, | 368 | int (*suspend)(struct platform_device *pdev, |
349 | struct snd_soc_cpu_dai *cpu_dai); | 369 | struct snd_soc_dai *dai); |
350 | int (*resume)(struct platform_device *pdev, | 370 | int (*resume)(struct platform_device *pdev, |
351 | struct snd_soc_cpu_dai *cpu_dai); | 371 | struct snd_soc_dai *dai); |
352 | 372 | ||
353 | /* ops */ | 373 | /* ops */ |
354 | struct snd_soc_ops ops; | 374 | struct snd_soc_ops ops; |
355 | struct snd_soc_cpu_ops dai_ops; | 375 | struct snd_soc_dai_ops dai_ops; |
356 | 376 | ||
357 | /* DAI capabilities */ | 377 | /* DAI capabilities */ |
358 | struct snd_soc_pcm_stream capture; | 378 | struct snd_soc_pcm_stream capture; |
@@ -360,7 +380,9 @@ struct snd_soc_cpu_dai { | |||
360 | 380 | ||
361 | /* DAI runtime info */ | 381 | /* DAI runtime info */ |
362 | struct snd_pcm_runtime *runtime; | 382 | struct snd_pcm_runtime *runtime; |
363 | unsigned char active:1; | 383 | struct snd_soc_codec *codec; |
384 | unsigned int active; | ||
385 | unsigned char pop_wait:1; | ||
364 | void *dma_data; | 386 | void *dma_data; |
365 | 387 | ||
366 | /* DAI private data */ | 388 | /* DAI private data */ |
@@ -374,7 +396,8 @@ struct snd_soc_codec { | |||
374 | struct mutex mutex; | 396 | struct mutex mutex; |
375 | 397 | ||
376 | /* callbacks */ | 398 | /* callbacks */ |
377 | int (*dapm_event)(struct snd_soc_codec *codec, int event); | 399 | int (*set_bias_level)(struct snd_soc_codec *, |
400 | enum snd_soc_bias_level level); | ||
378 | 401 | ||
379 | /* runtime */ | 402 | /* runtime */ |
380 | struct snd_card *card; | 403 | struct snd_card *card; |
@@ -396,12 +419,12 @@ struct snd_soc_codec { | |||
396 | /* dapm */ | 419 | /* dapm */ |
397 | struct list_head dapm_widgets; | 420 | struct list_head dapm_widgets; |
398 | struct list_head dapm_paths; | 421 | struct list_head dapm_paths; |
399 | unsigned int dapm_state; | 422 | enum snd_soc_bias_level bias_level; |
400 | unsigned int suspend_dapm_state; | 423 | enum snd_soc_bias_level suspend_bias_level; |
401 | struct delayed_work delayed_work; | 424 | struct delayed_work delayed_work; |
402 | 425 | ||
403 | /* codec DAI's */ | 426 | /* codec DAI's */ |
404 | struct snd_soc_codec_dai *dai; | 427 | struct snd_soc_dai *dai; |
405 | unsigned int num_dai; | 428 | unsigned int num_dai; |
406 | }; | 429 | }; |
407 | 430 | ||
@@ -420,12 +443,12 @@ struct snd_soc_platform { | |||
420 | int (*probe)(struct platform_device *pdev); | 443 | int (*probe)(struct platform_device *pdev); |
421 | int (*remove)(struct platform_device *pdev); | 444 | int (*remove)(struct platform_device *pdev); |
422 | int (*suspend)(struct platform_device *pdev, | 445 | int (*suspend)(struct platform_device *pdev, |
423 | struct snd_soc_cpu_dai *cpu_dai); | 446 | struct snd_soc_dai *dai); |
424 | int (*resume)(struct platform_device *pdev, | 447 | int (*resume)(struct platform_device *pdev, |
425 | struct snd_soc_cpu_dai *cpu_dai); | 448 | struct snd_soc_dai *dai); |
426 | 449 | ||
427 | /* pcm creation and destruction */ | 450 | /* pcm creation and destruction */ |
428 | int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, | 451 | int (*pcm_new)(struct snd_card *, struct snd_soc_dai *, |
429 | struct snd_pcm *); | 452 | struct snd_pcm *); |
430 | void (*pcm_free)(struct snd_pcm *); | 453 | void (*pcm_free)(struct snd_pcm *); |
431 | 454 | ||
@@ -439,8 +462,8 @@ struct snd_soc_dai_link { | |||
439 | char *stream_name; /* Stream name */ | 462 | char *stream_name; /* Stream name */ |
440 | 463 | ||
441 | /* DAI */ | 464 | /* DAI */ |
442 | struct snd_soc_codec_dai *codec_dai; | 465 | struct snd_soc_dai *codec_dai; |
443 | struct snd_soc_cpu_dai *cpu_dai; | 466 | struct snd_soc_dai *cpu_dai; |
444 | 467 | ||
445 | /* machine stream operations */ | 468 | /* machine stream operations */ |
446 | struct snd_soc_ops *ops; | 469 | struct snd_soc_ops *ops; |
@@ -467,7 +490,8 @@ struct snd_soc_machine { | |||
467 | int (*resume_post)(struct platform_device *pdev); | 490 | int (*resume_post)(struct platform_device *pdev); |
468 | 491 | ||
469 | /* callbacks */ | 492 | /* callbacks */ |
470 | int (*dapm_event)(struct snd_soc_machine *, int event); | 493 | int (*set_bias_level)(struct snd_soc_machine *, |
494 | enum snd_soc_bias_level level); | ||
471 | 495 | ||
472 | /* CPU <--> Codec DAI links */ | 496 | /* CPU <--> Codec DAI links */ |
473 | struct snd_soc_dai_link *dai_link; | 497 | struct snd_soc_dai_link *dai_link; |
@@ -482,6 +506,7 @@ struct snd_soc_device { | |||
482 | struct snd_soc_codec *codec; | 506 | struct snd_soc_codec *codec; |
483 | struct snd_soc_codec_device *codec_dev; | 507 | struct snd_soc_codec_device *codec_dev; |
484 | struct delayed_work delayed_work; | 508 | struct delayed_work delayed_work; |
509 | struct work_struct deferred_resume_work; | ||
485 | void *codec_data; | 510 | void *codec_data; |
486 | }; | 511 | }; |
487 | 512 | ||
diff --git a/include/sound/uda1341.h b/include/sound/uda1341.h index 2e564bfb37fe..110d5dc3a2be 100644 --- a/include/sound/uda1341.h +++ b/include/sound/uda1341.h | |||
@@ -15,8 +15,6 @@ | |||
15 | * features support | 15 | * features support |
16 | */ | 16 | */ |
17 | 17 | ||
18 | /* $Id: uda1341.h,v 1.8 2005/11/17 14:17:21 tiwai Exp $ */ | ||
19 | |||
20 | #define UDA1341_ALSA_NAME "snd-uda1341" | 18 | #define UDA1341_ALSA_NAME "snd-uda1341" |
21 | 19 | ||
22 | /* | 20 | /* |
diff --git a/include/sound/version.h b/include/sound/version.h index ed6fb2eb1eac..6b78aff273a8 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h */ |
2 | #define CONFIG_SND_VERSION "1.0.16" | 2 | #define CONFIG_SND_VERSION "1.0.17" |
3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |