diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/twl.h | 4 | ||||
-rw-r--r-- | include/linux/usb/audio.h | 120 | ||||
-rw-r--r-- | include/sound/core.h | 3 | ||||
-rw-r--r-- | include/sound/cs46xx_dsp_spos.h | 6 | ||||
-rw-r--r-- | include/sound/pcm.h | 54 | ||||
-rw-r--r-- | include/sound/pcm_oss.h | 2 | ||||
-rw-r--r-- | include/sound/sb.h | 1 | ||||
-rw-r--r-- | include/sound/soc-dai.h | 2 | ||||
-rw-r--r-- | include/sound/soc-dapm.h | 32 | ||||
-rw-r--r-- | include/sound/soc.h | 26 | ||||
-rw-r--r-- | include/sound/tlv320dac33-plat.h | 1 | ||||
-rw-r--r-- | include/sound/tpa6130a2-plat.h | 6 | ||||
-rw-r--r-- | include/sound/version.h | 2 | ||||
-rw-r--r-- | include/sound/wm2000.h | 26 | ||||
-rw-r--r-- | include/sound/wm8904.h | 57 | ||||
-rw-r--r-- | include/sound/wm8955.h | 26 |
16 files changed, 357 insertions, 11 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index bf1c5be1f5b6..7897f3096560 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -547,6 +547,10 @@ struct twl4030_codec_data { | |||
547 | unsigned int audio_mclk; | 547 | unsigned int audio_mclk; |
548 | struct twl4030_codec_audio_data *audio; | 548 | struct twl4030_codec_audio_data *audio; |
549 | struct twl4030_codec_vibra_data *vibra; | 549 | struct twl4030_codec_vibra_data *vibra; |
550 | |||
551 | /* twl6030 */ | ||
552 | int audpwron_gpio; /* audio power-on gpio */ | ||
553 | int naudint_irq; /* audio interrupt */ | ||
550 | }; | 554 | }; |
551 | 555 | ||
552 | struct twl4030_platform_data { | 556 | struct twl4030_platform_data { |
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index eaf9dffe0a01..6bb293684eb8 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
@@ -25,6 +25,9 @@ | |||
25 | #define USB_SUBCLASS_AUDIOSTREAMING 0x02 | 25 | #define USB_SUBCLASS_AUDIOSTREAMING 0x02 |
26 | #define USB_SUBCLASS_MIDISTREAMING 0x03 | 26 | #define USB_SUBCLASS_MIDISTREAMING 0x03 |
27 | 27 | ||
28 | #define UAC_VERSION_1 0x00 | ||
29 | #define UAC_VERSION_2 0x20 | ||
30 | |||
28 | /* A.5 Audio Class-Specific AC Interface Descriptor Subtypes */ | 31 | /* A.5 Audio Class-Specific AC Interface Descriptor Subtypes */ |
29 | #define UAC_HEADER 0x01 | 32 | #define UAC_HEADER 0x01 |
30 | #define UAC_INPUT_TERMINAL 0x02 | 33 | #define UAC_INPUT_TERMINAL 0x02 |
@@ -32,8 +35,17 @@ | |||
32 | #define UAC_MIXER_UNIT 0x04 | 35 | #define UAC_MIXER_UNIT 0x04 |
33 | #define UAC_SELECTOR_UNIT 0x05 | 36 | #define UAC_SELECTOR_UNIT 0x05 |
34 | #define UAC_FEATURE_UNIT 0x06 | 37 | #define UAC_FEATURE_UNIT 0x06 |
35 | #define UAC_PROCESSING_UNIT 0x07 | 38 | #define UAC_PROCESSING_UNIT_V1 0x07 |
36 | #define UAC_EXTENSION_UNIT 0x08 | 39 | #define UAC_EXTENSION_UNIT_V1 0x08 |
40 | |||
41 | /* UAC v2.0 types */ | ||
42 | #define UAC_EFFECT_UNIT 0x07 | ||
43 | #define UAC_PROCESSING_UNIT_V2 0x08 | ||
44 | #define UAC_EXTENSION_UNIT_V2 0x09 | ||
45 | #define UAC_CLOCK_SOURCE 0x0a | ||
46 | #define UAC_CLOCK_SELECTOR 0x0b | ||
47 | #define UAC_CLOCK_MULTIPLIER 0x0c | ||
48 | #define UAC_SAMPLE_RATE_CONVERTER 0x0d | ||
37 | 49 | ||
38 | /* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */ | 50 | /* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */ |
39 | #define UAC_AS_GENERAL 0x01 | 51 | #define UAC_AS_GENERAL 0x01 |
@@ -66,6 +78,10 @@ | |||
66 | 78 | ||
67 | #define UAC_GET_STAT 0xff | 79 | #define UAC_GET_STAT 0xff |
68 | 80 | ||
81 | /* Audio class v2.0 handles all the parameter calls differently */ | ||
82 | #define UAC2_CS_CUR 0x01 | ||
83 | #define UAC2_CS_RANGE 0x02 | ||
84 | |||
69 | /* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */ | 85 | /* MIDI - A.1 MS Class-Specific Interface Descriptor Subtypes */ |
70 | #define UAC_MS_HEADER 0x01 | 86 | #define UAC_MS_HEADER 0x01 |
71 | #define UAC_MIDI_IN_JACK 0x02 | 87 | #define UAC_MIDI_IN_JACK 0x02 |
@@ -81,7 +97,7 @@ | |||
81 | 97 | ||
82 | /* Terminal Control Selectors */ | 98 | /* Terminal Control Selectors */ |
83 | /* 4.3.2 Class-Specific AC Interface Descriptor */ | 99 | /* 4.3.2 Class-Specific AC Interface Descriptor */ |
84 | struct uac_ac_header_descriptor { | 100 | struct uac_ac_header_descriptor_v1 { |
85 | __u8 bLength; /* 8 + n */ | 101 | __u8 bLength; /* 8 + n */ |
86 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | 102 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ |
87 | __u8 bDescriptorSubtype; /* UAC_MS_HEADER */ | 103 | __u8 bDescriptorSubtype; /* UAC_MS_HEADER */ |
@@ -95,7 +111,7 @@ struct uac_ac_header_descriptor { | |||
95 | 111 | ||
96 | /* As above, but more useful for defining your own descriptors: */ | 112 | /* As above, but more useful for defining your own descriptors: */ |
97 | #define DECLARE_UAC_AC_HEADER_DESCRIPTOR(n) \ | 113 | #define DECLARE_UAC_AC_HEADER_DESCRIPTOR(n) \ |
98 | struct uac_ac_header_descriptor_##n { \ | 114 | struct uac_ac_header_descriptor_v1_##n { \ |
99 | __u8 bLength; \ | 115 | __u8 bLength; \ |
100 | __u8 bDescriptorType; \ | 116 | __u8 bDescriptorType; \ |
101 | __u8 bDescriptorSubtype; \ | 117 | __u8 bDescriptorSubtype; \ |
@@ -130,8 +146,12 @@ struct uac_input_terminal_descriptor { | |||
130 | #define UAC_INPUT_TERMINAL_MICROPHONE_ARRAY 0x205 | 146 | #define UAC_INPUT_TERMINAL_MICROPHONE_ARRAY 0x205 |
131 | #define UAC_INPUT_TERMINAL_PROC_MICROPHONE_ARRAY 0x206 | 147 | #define UAC_INPUT_TERMINAL_PROC_MICROPHONE_ARRAY 0x206 |
132 | 148 | ||
149 | /* Terminals - control selectors */ | ||
150 | |||
151 | #define UAC_TERMINAL_CS_COPY_PROTECT_CONTROL 0x01 | ||
152 | |||
133 | /* 4.3.2.2 Output Terminal Descriptor */ | 153 | /* 4.3.2.2 Output Terminal Descriptor */ |
134 | struct uac_output_terminal_descriptor { | 154 | struct uac_output_terminal_descriptor_v1 { |
135 | __u8 bLength; /* in bytes: 9 */ | 155 | __u8 bLength; /* in bytes: 9 */ |
136 | __u8 bDescriptorType; /* CS_INTERFACE descriptor type */ | 156 | __u8 bDescriptorType; /* CS_INTERFACE descriptor type */ |
137 | __u8 bDescriptorSubtype; /* OUTPUT_TERMINAL descriptor subtype */ | 157 | __u8 bDescriptorSubtype; /* OUTPUT_TERMINAL descriptor subtype */ |
@@ -171,7 +191,7 @@ struct uac_feature_unit_descriptor_##ch { \ | |||
171 | } __attribute__ ((packed)) | 191 | } __attribute__ ((packed)) |
172 | 192 | ||
173 | /* 4.5.2 Class-Specific AS Interface Descriptor */ | 193 | /* 4.5.2 Class-Specific AS Interface Descriptor */ |
174 | struct uac_as_header_descriptor { | 194 | struct uac_as_header_descriptor_v1 { |
175 | __u8 bLength; /* in bytes: 7 */ | 195 | __u8 bLength; /* in bytes: 7 */ |
176 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | 196 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ |
177 | __u8 bDescriptorSubtype; /* AS_GENERAL */ | 197 | __u8 bDescriptorSubtype; /* AS_GENERAL */ |
@@ -180,6 +200,19 @@ struct uac_as_header_descriptor { | |||
180 | __le16 wFormatTag; /* The Audio Data Format */ | 200 | __le16 wFormatTag; /* The Audio Data Format */ |
181 | } __attribute__ ((packed)); | 201 | } __attribute__ ((packed)); |
182 | 202 | ||
203 | struct uac_as_header_descriptor_v2 { | ||
204 | __u8 bLength; | ||
205 | __u8 bDescriptorType; | ||
206 | __u8 bDescriptorSubtype; | ||
207 | __u8 bTerminalLink; | ||
208 | __u8 bmControls; | ||
209 | __u8 bFormatType; | ||
210 | __u32 bmFormats; | ||
211 | __u8 bNrChannels; | ||
212 | __u32 bmChannelConfig; | ||
213 | __u8 iChannelNames; | ||
214 | } __attribute__((packed)); | ||
215 | |||
183 | #define UAC_DT_AS_HEADER_SIZE 7 | 216 | #define UAC_DT_AS_HEADER_SIZE 7 |
184 | 217 | ||
185 | /* Formats - A.1.1 Audio Data Format Type I Codes */ | 218 | /* Formats - A.1.1 Audio Data Format Type I Codes */ |
@@ -232,11 +265,62 @@ struct uac_format_type_i_discrete_descriptor_##n { \ | |||
232 | 265 | ||
233 | #define UAC_FORMAT_TYPE_I_DISCRETE_DESC_SIZE(n) (8 + (n * 3)) | 266 | #define UAC_FORMAT_TYPE_I_DISCRETE_DESC_SIZE(n) (8 + (n * 3)) |
234 | 267 | ||
268 | struct uac_format_type_i_ext_descriptor { | ||
269 | __u8 bLength; | ||
270 | __u8 bDescriptorType; | ||
271 | __u8 bDescriptorSubtype; | ||
272 | __u8 bSubslotSize; | ||
273 | __u8 bFormatType; | ||
274 | __u8 bBitResolution; | ||
275 | __u8 bHeaderLength; | ||
276 | __u8 bControlSize; | ||
277 | __u8 bSideBandProtocol; | ||
278 | } __attribute__((packed)); | ||
279 | |||
280 | |||
281 | /* Formats - Audio Data Format Type I Codes */ | ||
282 | |||
283 | #define UAC_FORMAT_TYPE_II_MPEG 0x1001 | ||
284 | #define UAC_FORMAT_TYPE_II_AC3 0x1002 | ||
285 | |||
286 | struct uac_format_type_ii_discrete_descriptor { | ||
287 | __u8 bLength; | ||
288 | __u8 bDescriptorType; | ||
289 | __u8 bDescriptorSubtype; | ||
290 | __u8 bFormatType; | ||
291 | __le16 wMaxBitRate; | ||
292 | __le16 wSamplesPerFrame; | ||
293 | __u8 bSamFreqType; | ||
294 | __u8 tSamFreq[][3]; | ||
295 | } __attribute__((packed)); | ||
296 | |||
297 | struct uac_format_type_ii_ext_descriptor { | ||
298 | __u8 bLength; | ||
299 | __u8 bDescriptorType; | ||
300 | __u8 bDescriptorSubtype; | ||
301 | __u8 bFormatType; | ||
302 | __u16 wMaxBitRate; | ||
303 | __u16 wSamplesPerFrame; | ||
304 | __u8 bHeaderLength; | ||
305 | __u8 bSideBandProtocol; | ||
306 | } __attribute__((packed)); | ||
307 | |||
308 | /* type III */ | ||
309 | #define UAC_FORMAT_TYPE_III_IEC1937_AC3 0x2001 | ||
310 | #define UAC_FORMAT_TYPE_III_IEC1937_MPEG1_LAYER1 0x2002 | ||
311 | #define UAC_FORMAT_TYPE_III_IEC1937_MPEG2_NOEXT 0x2003 | ||
312 | #define UAC_FORMAT_TYPE_III_IEC1937_MPEG2_EXT 0x2004 | ||
313 | #define UAC_FORMAT_TYPE_III_IEC1937_MPEG2_LAYER1_LS 0x2005 | ||
314 | #define UAC_FORMAT_TYPE_III_IEC1937_MPEG2_LAYER23_LS 0x2006 | ||
315 | |||
235 | /* Formats - A.2 Format Type Codes */ | 316 | /* Formats - A.2 Format Type Codes */ |
236 | #define UAC_FORMAT_TYPE_UNDEFINED 0x0 | 317 | #define UAC_FORMAT_TYPE_UNDEFINED 0x0 |
237 | #define UAC_FORMAT_TYPE_I 0x1 | 318 | #define UAC_FORMAT_TYPE_I 0x1 |
238 | #define UAC_FORMAT_TYPE_II 0x2 | 319 | #define UAC_FORMAT_TYPE_II 0x2 |
239 | #define UAC_FORMAT_TYPE_III 0x3 | 320 | #define UAC_FORMAT_TYPE_III 0x3 |
321 | #define UAC_EXT_FORMAT_TYPE_I 0x81 | ||
322 | #define UAC_EXT_FORMAT_TYPE_II 0x82 | ||
323 | #define UAC_EXT_FORMAT_TYPE_III 0x83 | ||
240 | 324 | ||
241 | struct uac_iso_endpoint_descriptor { | 325 | struct uac_iso_endpoint_descriptor { |
242 | __u8 bLength; /* in bytes: 7 */ | 326 | __u8 bLength; /* in bytes: 7 */ |
@@ -252,7 +336,31 @@ struct uac_iso_endpoint_descriptor { | |||
252 | #define UAC_EP_CS_ATTR_PITCH_CONTROL 0x02 | 336 | #define UAC_EP_CS_ATTR_PITCH_CONTROL 0x02 |
253 | #define UAC_EP_CS_ATTR_FILL_MAX 0x80 | 337 | #define UAC_EP_CS_ATTR_FILL_MAX 0x80 |
254 | 338 | ||
339 | /* Audio class v2.0: CLOCK_SOURCE descriptor */ | ||
340 | |||
341 | struct uac_clock_source_descriptor { | ||
342 | __u8 bLength; | ||
343 | __u8 bDescriptorType; | ||
344 | __u8 bDescriptorSubtype; | ||
345 | __u8 bClockID; | ||
346 | __u8 bmAttributes; | ||
347 | __u8 bmControls; | ||
348 | __u8 bAssocTerminal; | ||
349 | __u8 iClockSource; | ||
350 | } __attribute__((packed)); | ||
351 | |||
255 | /* A.10.2 Feature Unit Control Selectors */ | 352 | /* A.10.2 Feature Unit Control Selectors */ |
353 | |||
354 | struct uac_feature_unit_descriptor { | ||
355 | __u8 bLength; | ||
356 | __u8 bDescriptorType; | ||
357 | __u8 bDescriptorSubtype; | ||
358 | __u8 bUnitID; | ||
359 | __u8 bSourceID; | ||
360 | __u8 bControlSize; | ||
361 | __u8 controls[0]; /* variable length */ | ||
362 | } __attribute__((packed)); | ||
363 | |||
256 | #define UAC_FU_CONTROL_UNDEFINED 0x00 | 364 | #define UAC_FU_CONTROL_UNDEFINED 0x00 |
257 | #define UAC_MUTE_CONTROL 0x01 | 365 | #define UAC_MUTE_CONTROL 0x01 |
258 | #define UAC_VOLUME_CONTROL 0x02 | 366 | #define UAC_VOLUME_CONTROL 0x02 |
diff --git a/include/sound/core.h b/include/sound/core.h index a61499c22b0b..89e0ac17f44a 100644 --- a/include/sound/core.h +++ b/include/sound/core.h | |||
@@ -458,5 +458,8 @@ struct snd_pci_quirk { | |||
458 | const struct snd_pci_quirk * | 458 | const struct snd_pci_quirk * |
459 | snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list); | 459 | snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list); |
460 | 460 | ||
461 | const struct snd_pci_quirk * | ||
462 | snd_pci_quirk_lookup_id(u16 vendor, u16 device, | ||
463 | const struct snd_pci_quirk *list); | ||
461 | 464 | ||
462 | #endif /* __SOUND_CORE_H */ | 465 | #endif /* __SOUND_CORE_H */ |
diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h index 7c44667e79a6..49b03c9e5e55 100644 --- a/include/sound/cs46xx_dsp_spos.h +++ b/include/sound/cs46xx_dsp_spos.h | |||
@@ -118,9 +118,11 @@ struct dsp_scb_descriptor { | |||
118 | 118 | ||
119 | struct snd_info_entry *proc_info; | 119 | struct snd_info_entry *proc_info; |
120 | int ref_count; | 120 | int ref_count; |
121 | spinlock_t lock; | ||
122 | 121 | ||
123 | int deleted; | 122 | u16 volume[2]; |
123 | unsigned int deleted :1; | ||
124 | unsigned int updated :1; | ||
125 | unsigned int volume_set :1; | ||
124 | }; | 126 | }; |
125 | 127 | ||
126 | struct dsp_task_descriptor { | 128 | struct dsp_task_descriptor { |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index c83a4a79f16b..8b611a561985 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -262,6 +262,8 @@ struct snd_pcm_hw_constraint_list { | |||
262 | unsigned int mask; | 262 | unsigned int mask; |
263 | }; | 263 | }; |
264 | 264 | ||
265 | struct snd_pcm_hwptr_log; | ||
266 | |||
265 | struct snd_pcm_runtime { | 267 | struct snd_pcm_runtime { |
266 | /* -- Status -- */ | 268 | /* -- Status -- */ |
267 | struct snd_pcm_substream *trigger_master; | 269 | struct snd_pcm_substream *trigger_master; |
@@ -310,7 +312,9 @@ struct snd_pcm_runtime { | |||
310 | struct snd_pcm_mmap_control *control; | 312 | struct snd_pcm_mmap_control *control; |
311 | 313 | ||
312 | /* -- locking / scheduling -- */ | 314 | /* -- locking / scheduling -- */ |
313 | wait_queue_head_t sleep; | 315 | unsigned int twake: 1; /* do transfer (!poll) wakeup */ |
316 | wait_queue_head_t sleep; /* poll sleep */ | ||
317 | wait_queue_head_t tsleep; /* transfer sleep */ | ||
314 | struct fasync_struct *fasync; | 318 | struct fasync_struct *fasync; |
315 | 319 | ||
316 | /* -- private section -- */ | 320 | /* -- private section -- */ |
@@ -340,6 +344,10 @@ struct snd_pcm_runtime { | |||
340 | /* -- OSS things -- */ | 344 | /* -- OSS things -- */ |
341 | struct snd_pcm_oss_runtime oss; | 345 | struct snd_pcm_oss_runtime oss; |
342 | #endif | 346 | #endif |
347 | |||
348 | #ifdef CONFIG_SND_PCM_XRUN_DEBUG | ||
349 | struct snd_pcm_hwptr_log *hwptr_log; | ||
350 | #endif | ||
343 | }; | 351 | }; |
344 | 352 | ||
345 | struct snd_pcm_group { /* keep linked substreams */ | 353 | struct snd_pcm_group { /* keep linked substreams */ |
@@ -834,6 +842,8 @@ void snd_pcm_set_sync(struct snd_pcm_substream *substream); | |||
834 | int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream); | 842 | int snd_pcm_lib_interleave_len(struct snd_pcm_substream *substream); |
835 | int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, | 843 | int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream, |
836 | unsigned int cmd, void *arg); | 844 | unsigned int cmd, void *arg); |
845 | int snd_pcm_update_state(struct snd_pcm_substream *substream, | ||
846 | struct snd_pcm_runtime *runtime); | ||
837 | int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); | 847 | int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream); |
838 | int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream); | 848 | int snd_pcm_playback_xrun_check(struct snd_pcm_substream *substream); |
839 | int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream); | 849 | int snd_pcm_capture_xrun_check(struct snd_pcm_substream *substream); |
@@ -905,6 +915,44 @@ int snd_pcm_lib_preallocate_pages_for_all(struct snd_pcm *pcm, | |||
905 | int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size); | 915 | int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size); |
906 | int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream); | 916 | int snd_pcm_lib_free_pages(struct snd_pcm_substream *substream); |
907 | 917 | ||
918 | int _snd_pcm_lib_alloc_vmalloc_buffer(struct snd_pcm_substream *substream, | ||
919 | size_t size, gfp_t gfp_flags); | ||
920 | int snd_pcm_lib_free_vmalloc_buffer(struct snd_pcm_substream *substream); | ||
921 | struct page *snd_pcm_lib_get_vmalloc_page(struct snd_pcm_substream *substream, | ||
922 | unsigned long offset); | ||
923 | #if 0 /* for kernel-doc */ | ||
924 | /** | ||
925 | * snd_pcm_lib_alloc_vmalloc_buffer - allocate virtual DMA buffer | ||
926 | * @substream: the substream to allocate the buffer to | ||
927 | * @size: the requested buffer size, in bytes | ||
928 | * | ||
929 | * Allocates the PCM substream buffer using vmalloc(), i.e., the memory is | ||
930 | * contiguous in kernel virtual space, but not in physical memory. Use this | ||
931 | * if the buffer is accessed by kernel code but not by device DMA. | ||
932 | * | ||
933 | * Returns 1 if the buffer was changed, 0 if not changed, or a negative error | ||
934 | * code. | ||
935 | */ | ||
936 | static int snd_pcm_lib_alloc_vmalloc_buffer | ||
937 | (struct snd_pcm_substream *substream, size_t size); | ||
938 | /** | ||
939 | * snd_pcm_lib_alloc_vmalloc_32_buffer - allocate 32-bit-addressable buffer | ||
940 | * @substream: the substream to allocate the buffer to | ||
941 | * @size: the requested buffer size, in bytes | ||
942 | * | ||
943 | * This function works like snd_pcm_lib_alloc_vmalloc_buffer(), but uses | ||
944 | * vmalloc_32(), i.e., the pages are allocated from 32-bit-addressable memory. | ||
945 | */ | ||
946 | static int snd_pcm_lib_alloc_vmalloc_32_buffer | ||
947 | (struct snd_pcm_substream *substream, size_t size); | ||
948 | #endif | ||
949 | #define snd_pcm_lib_alloc_vmalloc_buffer(subs, size) \ | ||
950 | _snd_pcm_lib_alloc_vmalloc_buffer \ | ||
951 | (subs, size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO) | ||
952 | #define snd_pcm_lib_alloc_vmalloc_32_buffer(subs, size) \ | ||
953 | _snd_pcm_lib_alloc_vmalloc_buffer \ | ||
954 | (subs, size, GFP_KERNEL | GFP_DMA32 | __GFP_ZERO) | ||
955 | |||
908 | #ifdef CONFIG_SND_DMA_SGBUF | 956 | #ifdef CONFIG_SND_DMA_SGBUF |
909 | /* | 957 | /* |
910 | * SG-buffer handling | 958 | * SG-buffer handling |
@@ -975,6 +1023,10 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s | |||
975 | #define snd_pcm_lib_mmap_iomem NULL | 1023 | #define snd_pcm_lib_mmap_iomem NULL |
976 | #endif | 1024 | #endif |
977 | 1025 | ||
1026 | int snd_pcm_lib_mmap_noncached(struct snd_pcm_substream *substream, | ||
1027 | struct vm_area_struct *area); | ||
1028 | #define snd_pcm_lib_mmap_vmalloc snd_pcm_lib_mmap_noncached | ||
1029 | |||
978 | static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) | 1030 | static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) |
979 | { | 1031 | { |
980 | *max = dma < 4 ? 64 * 1024 : 128 * 1024; | 1032 | *max = dma < 4 ? 64 * 1024 : 128 * 1024; |
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h index cc4e226f35fd..760c969d885d 100644 --- a/include/sound/pcm_oss.h +++ b/include/sound/pcm_oss.h | |||
@@ -61,7 +61,7 @@ struct snd_pcm_oss_runtime { | |||
61 | struct snd_pcm_plugin *plugin_first; | 61 | struct snd_pcm_plugin *plugin_first; |
62 | struct snd_pcm_plugin *plugin_last; | 62 | struct snd_pcm_plugin *plugin_last; |
63 | #endif | 63 | #endif |
64 | unsigned int prev_hw_ptr_interrupt; | 64 | unsigned int prev_hw_ptr_period; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct snd_pcm_oss_file { | 67 | struct snd_pcm_oss_file { |
diff --git a/include/sound/sb.h b/include/sound/sb.h index 4e62ee1e4115..95353542256a 100644 --- a/include/sound/sb.h +++ b/include/sound/sb.h | |||
@@ -33,6 +33,7 @@ enum sb_hw_type { | |||
33 | SB_HW_20, | 33 | SB_HW_20, |
34 | SB_HW_201, | 34 | SB_HW_201, |
35 | SB_HW_PRO, | 35 | SB_HW_PRO, |
36 | SB_HW_JAZZ16, /* Media Vision Jazz16 */ | ||
36 | SB_HW_16, | 37 | SB_HW_16, |
37 | SB_HW_16CSP, /* SB16 with CSP chip */ | 38 | SB_HW_16CSP, /* SB16 with CSP chip */ |
38 | SB_HW_ALS100, /* Avance Logic ALS100 chip */ | 39 | SB_HW_ALS100, /* Avance Logic ALS100 chip */ |
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index ca24e7f7a3f5..061f16d4c878 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -16,6 +16,8 @@ | |||
16 | 16 | ||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | 18 | ||
19 | #include <sound/soc.h> | ||
20 | |||
19 | struct snd_pcm_substream; | 21 | struct snd_pcm_substream; |
20 | 22 | ||
21 | /* | 23 | /* |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index c5c95e1da65b..c0922a034223 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -95,6 +95,21 @@ | |||
95 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | 95 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ |
96 | .num_kcontrols = 1} | 96 | .num_kcontrols = 1} |
97 | 97 | ||
98 | /* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ | ||
99 | #define SOC_PGA_ARRAY(wname, wreg, wshift, winvert,\ | ||
100 | wcontrols) \ | ||
101 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | ||
102 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} | ||
103 | #define SOC_MIXER_ARRAY(wname, wreg, wshift, winvert, \ | ||
104 | wcontrols)\ | ||
105 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | ||
106 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols)} | ||
107 | #define SOC_MIXER_NAMED_CTL_ARRAY(wname, wreg, wshift, winvert, \ | ||
108 | wcontrols)\ | ||
109 | { .id = snd_soc_dapm_mixer_named_ctl, .name = wname, .reg = wreg, \ | ||
110 | .shift = wshift, .invert = winvert, .kcontrols = wcontrols, \ | ||
111 | .num_kcontrols = ARRAY_SIZE(wcontrols)} | ||
112 | |||
98 | /* path domain with event - event handler must return 0 for success */ | 113 | /* path domain with event - event handler must return 0 for success */ |
99 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ | 114 | #define SND_SOC_DAPM_PGA_E(wname, wreg, wshift, winvert, wcontrols, \ |
100 | wncontrols, wevent, wflags) \ | 115 | wncontrols, wevent, wflags) \ |
@@ -126,6 +141,23 @@ | |||
126 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ | 141 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \ |
127 | .event = wevent, .event_flags = wflags} | 142 | .event = wevent, .event_flags = wflags} |
128 | 143 | ||
144 | /* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */ | ||
145 | #define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ | ||
146 | wevent, wflags) \ | ||
147 | { .id = snd_soc_dapm_pga, .name = wname, .reg = wreg, .shift = wshift, \ | ||
148 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ | ||
149 | .event = wevent, .event_flags = wflags} | ||
150 | #define SOC_MIXER_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \ | ||
151 | wevent, wflags) \ | ||
152 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | ||
153 | .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = ARRAY_SIZE(wcontrols), \ | ||
154 | .event = wevent, .event_flags = wflags} | ||
155 | #define SOC_MIXER_NAMED_CTL_E_ARRAY(wname, wreg, wshift, winvert, \ | ||
156 | wcontrols, wevent, wflags) \ | ||
157 | { .id = snd_soc_dapm_mixer, .name = wname, .reg = wreg, .shift = wshift, \ | ||
158 | .invert = winvert, .kcontrols = wcontrols, \ | ||
159 | .num_kcontrols = ARRAY_SIZE(wcontrols), .event = wevent, .event_flags = wflags} | ||
160 | |||
129 | /* events that are pre and post DAPM */ | 161 | /* events that are pre and post DAPM */ |
130 | #define SND_SOC_DAPM_PRE(wname, wevent) \ | 162 | #define SND_SOC_DAPM_PRE(wname, wevent) \ |
131 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ | 163 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 0d7718f9280d..5d234a8c2506 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -169,6 +169,23 @@ | |||
169 | .private_value = (unsigned long)&xenum } | 169 | .private_value = (unsigned long)&xenum } |
170 | 170 | ||
171 | /* | 171 | /* |
172 | * Simplified versions of above macros, declaring a struct and calculating | ||
173 | * ARRAY_SIZE internally | ||
174 | */ | ||
175 | #define SOC_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xtexts) \ | ||
176 | struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \ | ||
177 | ARRAY_SIZE(xtexts), xtexts) | ||
178 | #define SOC_ENUM_SINGLE_DECL(name, xreg, xshift, xtexts) \ | ||
179 | SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts) | ||
180 | #define SOC_ENUM_SINGLE_EXT_DECL(name, xtexts) \ | ||
181 | struct soc_enum name = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(xtexts), xtexts) | ||
182 | #define SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift_l, xshift_r, xmask, xtexts, xvalues) \ | ||
183 | struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \ | ||
184 | ARRAY_SIZE(xtexts), xtexts, xvalues) | ||
185 | #define SOC_VALUE_ENUM_SINGLE_DECL(name, xreg, xshift, xmask, xtexts, xvalues) \ | ||
186 | SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues) | ||
187 | |||
188 | /* | ||
172 | * Bias levels | 189 | * Bias levels |
173 | * | 190 | * |
174 | * @ON: Bias is fully on for audio playback and capture operations. | 191 | * @ON: Bias is fully on for audio playback and capture operations. |
@@ -253,6 +270,9 @@ void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, | |||
253 | /* codec register bit access */ | 270 | /* codec register bit access */ |
254 | int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, | 271 | int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, |
255 | unsigned int mask, unsigned int value); | 272 | unsigned int mask, unsigned int value); |
273 | int snd_soc_update_bits_locked(struct snd_soc_codec *codec, | ||
274 | unsigned short reg, unsigned int mask, | ||
275 | unsigned int value); | ||
256 | int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg, | 276 | int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg, |
257 | unsigned int mask, unsigned int value); | 277 | unsigned int mask, unsigned int value); |
258 | 278 | ||
@@ -402,6 +422,10 @@ struct snd_soc_codec { | |||
402 | short reg_cache_size; | 422 | short reg_cache_size; |
403 | short reg_cache_step; | 423 | short reg_cache_step; |
404 | 424 | ||
425 | unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */ | ||
426 | unsigned int cache_only:1; /* Suppress writes to hardware */ | ||
427 | unsigned int cache_sync:1; /* Cache needs to be synced to hardware */ | ||
428 | |||
405 | /* dapm */ | 429 | /* dapm */ |
406 | u32 pop_time; | 430 | u32 pop_time; |
407 | struct list_head dapm_widgets; | 431 | struct list_head dapm_widgets; |
@@ -497,6 +521,8 @@ struct snd_soc_card { | |||
497 | int (*set_bias_level)(struct snd_soc_card *, | 521 | int (*set_bias_level)(struct snd_soc_card *, |
498 | enum snd_soc_bias_level level); | 522 | enum snd_soc_bias_level level); |
499 | 523 | ||
524 | long pmdown_time; | ||
525 | |||
500 | /* CPU <--> Codec DAI links */ | 526 | /* CPU <--> Codec DAI links */ |
501 | struct snd_soc_dai_link *dai_link; | 527 | struct snd_soc_dai_link *dai_link; |
502 | int num_links; | 528 | int num_links; |
diff --git a/include/sound/tlv320dac33-plat.h b/include/sound/tlv320dac33-plat.h index 5858d06a7ffa..ac0665264bdf 100644 --- a/include/sound/tlv320dac33-plat.h +++ b/include/sound/tlv320dac33-plat.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | struct tlv320dac33_platform_data { | 16 | struct tlv320dac33_platform_data { |
17 | int power_gpio; | 17 | int power_gpio; |
18 | u8 burst_bclkdiv; | ||
18 | }; | 19 | }; |
19 | 20 | ||
20 | #endif /* __TLV320DAC33_PLAT_H */ | 21 | #endif /* __TLV320DAC33_PLAT_H */ |
diff --git a/include/sound/tpa6130a2-plat.h b/include/sound/tpa6130a2-plat.h index e8c901e749d8..e29fde6b5cbe 100644 --- a/include/sound/tpa6130a2-plat.h +++ b/include/sound/tpa6130a2-plat.h | |||
@@ -23,7 +23,13 @@ | |||
23 | #ifndef TPA6130A2_PLAT_H | 23 | #ifndef TPA6130A2_PLAT_H |
24 | #define TPA6130A2_PLAT_H | 24 | #define TPA6130A2_PLAT_H |
25 | 25 | ||
26 | enum tpa_model { | ||
27 | TPA6130A2, | ||
28 | TPA6140A2, | ||
29 | }; | ||
30 | |||
26 | struct tpa6130a2_platform_data { | 31 | struct tpa6130a2_platform_data { |
32 | enum tpa_model id; | ||
27 | int power_gpio; | 33 | int power_gpio; |
28 | }; | 34 | }; |
29 | 35 | ||
diff --git a/include/sound/version.h b/include/sound/version.h index 22939142dd23..7fed23442db8 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.21" | 2 | #define CONFIG_SND_VERSION "1.0.22.1" |
3 | #define CONFIG_SND_DATE "" | 3 | #define CONFIG_SND_DATE "" |
diff --git a/include/sound/wm2000.h b/include/sound/wm2000.h new file mode 100644 index 000000000000..aa388ca9ec64 --- /dev/null +++ b/include/sound/wm2000.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * linux/sound/wm2000.h -- Platform data for WM2000 | ||
3 | * | ||
4 | * Copyright 2010 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_WM2000_H | ||
12 | #define __LINUX_SND_WM2000_H | ||
13 | |||
14 | struct wm2000_platform_data { | ||
15 | /** Filename for system-specific image to download to device. */ | ||
16 | const char *download_file; | ||
17 | |||
18 | /** Divide MCLK by 2 for system clock? */ | ||
19 | unsigned int mclkdiv2:1; | ||
20 | |||
21 | /** Disable speech clarity enhancement, for use when an | ||
22 | * external algorithm is used. */ | ||
23 | unsigned int speech_enh_disable:1; | ||
24 | }; | ||
25 | |||
26 | #endif | ||
diff --git a/include/sound/wm8904.h b/include/sound/wm8904.h new file mode 100644 index 000000000000..d66575a601be --- /dev/null +++ b/include/sound/wm8904.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Platform data for WM8904 | ||
3 | * | ||
4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
5 | * | ||
6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __MFD_WM8994_PDATA_H__ | ||
16 | #define __MFD_WM8994_PDATA_H__ | ||
17 | |||
18 | #define WM8904_DRC_REGS 4 | ||
19 | #define WM8904_EQ_REGS 25 | ||
20 | |||
21 | /** | ||
22 | * DRC configurations are specified with a label and a set of register | ||
23 | * values to write (the enable bits will be ignored). At runtime an | ||
24 | * enumerated control will be presented for each DRC block allowing | ||
25 | * the user to choose the configration to use. | ||
26 | * | ||
27 | * Configurations may be generated by hand or by using the DRC control | ||
28 | * panel provided by the WISCE - see http://www.wolfsonmicro.com/wisce/ | ||
29 | * for details. | ||
30 | */ | ||
31 | struct wm8904_drc_cfg { | ||
32 | const char *name; | ||
33 | u16 regs[WM8904_DRC_REGS]; | ||
34 | }; | ||
35 | |||
36 | /** | ||
37 | * ReTune Mobile configurations are specified with a label, sample | ||
38 | * rate and set of values to write (the enable bits will be ignored). | ||
39 | * | ||
40 | * Configurations are expected to be generated using the ReTune Mobile | ||
41 | * control panel in WISCE - see http://www.wolfsonmicro.com/wisce/ | ||
42 | */ | ||
43 | struct wm8904_retune_mobile_cfg { | ||
44 | const char *name; | ||
45 | unsigned int rate; | ||
46 | u16 regs[WM8904_EQ_REGS]; | ||
47 | }; | ||
48 | |||
49 | struct wm8904_pdata { | ||
50 | int num_drc_cfgs; | ||
51 | struct wm8904_drc_cfg *drc_cfgs; | ||
52 | |||
53 | int num_retune_mobile_cfgs; | ||
54 | struct wm8904_retune_mobile_cfg *retune_mobile_cfgs; | ||
55 | }; | ||
56 | |||
57 | #endif | ||
diff --git a/include/sound/wm8955.h b/include/sound/wm8955.h new file mode 100644 index 000000000000..5074ef499f40 --- /dev/null +++ b/include/sound/wm8955.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Platform data for WM8955 | ||
3 | * | ||
4 | * Copyright 2009 Wolfson Microelectronics PLC. | ||
5 | * | ||
6 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __WM8955_PDATA_H__ | ||
16 | #define __WM8955_PDATA_H__ | ||
17 | |||
18 | struct wm8955_pdata { | ||
19 | /* Configure LOUT2/ROUT2 to drive a speaker */ | ||
20 | unsigned int out2_speaker:1; | ||
21 | |||
22 | /* Configure MONOIN+/- in differential mode */ | ||
23 | unsigned int monoin_diff:1; | ||
24 | }; | ||
25 | |||
26 | #endif | ||