diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-08-05 05:17:04 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-08-05 05:17:04 -0400 |
commit | 74bf40f0793fed9e01eb6164c2ce63e8c27ca205 (patch) | |
tree | f41312c0943978842ac258873b29da04d72d0625 /include | |
parent | e71981343ad29b5d929f82ac56c0b27b8ea0e540 (diff) | |
parent | c4685849b4d725ab80cd29f5e09f5f128b4724b5 (diff) |
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/audio-v2.h | 17 | ||||
-rw-r--r-- | include/linux/usb/audio.h | 12 | ||||
-rw-r--r-- | include/sound/asound.h | 6 | ||||
-rw-r--r-- | include/sound/pcm.h | 6 |
4 files changed, 32 insertions, 9 deletions
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h index 383b94ba8c20..964cb603f7c7 100644 --- a/include/linux/usb/audio-v2.h +++ b/include/linux/usb/audio-v2.h | |||
@@ -18,6 +18,21 @@ | |||
18 | /* v1.0 and v2.0 of this standard have many things in common. For the rest | 18 | /* v1.0 and v2.0 of this standard have many things in common. For the rest |
19 | * of the definitions, please refer to audio.h */ | 19 | * of the definitions, please refer to audio.h */ |
20 | 20 | ||
21 | /* | ||
22 | * bmControl field decoders | ||
23 | * | ||
24 | * From the USB Audio spec v2.0: | ||
25 | * | ||
26 | * bmaControls() is a (ch+1)-element array of 4-byte bitmaps, | ||
27 | * each containing a set of bit pairs. If a Control is present, | ||
28 | * it must be Host readable. If a certain Control is not | ||
29 | * present then the bit pair must be set to 0b00. | ||
30 | * If a Control is present but read-only, the bit pair must be | ||
31 | * set to 0b01. If a Control is also Host programmable, the bit | ||
32 | * pair must be set to 0b11. The value 0b10 is not allowed. | ||
33 | * | ||
34 | */ | ||
35 | |||
21 | static inline bool uac2_control_is_readable(u32 bmControls, u8 control) | 36 | static inline bool uac2_control_is_readable(u32 bmControls, u8 control) |
22 | { | 37 | { |
23 | return (bmControls >> (control * 2)) & 0x1; | 38 | return (bmControls >> (control * 2)) & 0x1; |
@@ -121,7 +136,7 @@ struct uac2_feature_unit_descriptor { | |||
121 | 136 | ||
122 | /* 4.9.2 Class-Specific AS Interface Descriptor */ | 137 | /* 4.9.2 Class-Specific AS Interface Descriptor */ |
123 | 138 | ||
124 | struct uac_as_header_descriptor_v2 { | 139 | struct uac2_as_header_descriptor { |
125 | __u8 bLength; | 140 | __u8 bLength; |
126 | __u8 bDescriptorType; | 141 | __u8 bDescriptorType; |
127 | __u8 bDescriptorSubtype; | 142 | __u8 bDescriptorSubtype; |
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index c51200c715e5..a54b8255d75f 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
@@ -39,8 +39,8 @@ | |||
39 | #define UAC_MIXER_UNIT 0x04 | 39 | #define UAC_MIXER_UNIT 0x04 |
40 | #define UAC_SELECTOR_UNIT 0x05 | 40 | #define UAC_SELECTOR_UNIT 0x05 |
41 | #define UAC_FEATURE_UNIT 0x06 | 41 | #define UAC_FEATURE_UNIT 0x06 |
42 | #define UAC_PROCESSING_UNIT_V1 0x07 | 42 | #define UAC1_PROCESSING_UNIT 0x07 |
43 | #define UAC_EXTENSION_UNIT_V1 0x08 | 43 | #define UAC1_EXTENSION_UNIT 0x08 |
44 | 44 | ||
45 | /* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */ | 45 | /* A.6 Audio Class-Specific AS Interface Descriptor Subtypes */ |
46 | #define UAC_AS_GENERAL 0x01 | 46 | #define UAC_AS_GENERAL 0x01 |
@@ -151,7 +151,7 @@ | |||
151 | 151 | ||
152 | /* Terminal Control Selectors */ | 152 | /* Terminal Control Selectors */ |
153 | /* 4.3.2 Class-Specific AC Interface Descriptor */ | 153 | /* 4.3.2 Class-Specific AC Interface Descriptor */ |
154 | struct uac_ac_header_descriptor_v1 { | 154 | struct uac1_ac_header_descriptor { |
155 | __u8 bLength; /* 8 + n */ | 155 | __u8 bLength; /* 8 + n */ |
156 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | 156 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ |
157 | __u8 bDescriptorSubtype; /* UAC_MS_HEADER */ | 157 | __u8 bDescriptorSubtype; /* UAC_MS_HEADER */ |
@@ -165,7 +165,7 @@ struct uac_ac_header_descriptor_v1 { | |||
165 | 165 | ||
166 | /* As above, but more useful for defining your own descriptors: */ | 166 | /* As above, but more useful for defining your own descriptors: */ |
167 | #define DECLARE_UAC_AC_HEADER_DESCRIPTOR(n) \ | 167 | #define DECLARE_UAC_AC_HEADER_DESCRIPTOR(n) \ |
168 | struct uac_ac_header_descriptor_v1_##n { \ | 168 | struct uac1_ac_header_descriptor_##n { \ |
169 | __u8 bLength; \ | 169 | __u8 bLength; \ |
170 | __u8 bDescriptorType; \ | 170 | __u8 bDescriptorType; \ |
171 | __u8 bDescriptorSubtype; \ | 171 | __u8 bDescriptorSubtype; \ |
@@ -205,7 +205,7 @@ struct uac_input_terminal_descriptor { | |||
205 | #define UAC_TERMINAL_CS_COPY_PROTECT_CONTROL 0x01 | 205 | #define UAC_TERMINAL_CS_COPY_PROTECT_CONTROL 0x01 |
206 | 206 | ||
207 | /* 4.3.2.2 Output Terminal Descriptor */ | 207 | /* 4.3.2.2 Output Terminal Descriptor */ |
208 | struct uac_output_terminal_descriptor_v1 { | 208 | struct uac1_output_terminal_descriptor { |
209 | __u8 bLength; /* in bytes: 9 */ | 209 | __u8 bLength; /* in bytes: 9 */ |
210 | __u8 bDescriptorType; /* CS_INTERFACE descriptor type */ | 210 | __u8 bDescriptorType; /* CS_INTERFACE descriptor type */ |
211 | __u8 bDescriptorSubtype; /* OUTPUT_TERMINAL descriptor subtype */ | 211 | __u8 bDescriptorSubtype; /* OUTPUT_TERMINAL descriptor subtype */ |
@@ -395,7 +395,7 @@ static inline __u8 *uac_processing_unit_specific(struct uac_processing_unit_desc | |||
395 | } | 395 | } |
396 | 396 | ||
397 | /* 4.5.2 Class-Specific AS Interface Descriptor */ | 397 | /* 4.5.2 Class-Specific AS Interface Descriptor */ |
398 | struct uac_as_header_descriptor_v1 { | 398 | struct uac1_as_header_descriptor { |
399 | __u8 bLength; /* in bytes: 7 */ | 399 | __u8 bLength; /* in bytes: 7 */ |
400 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ | 400 | __u8 bDescriptorType; /* USB_DT_CS_INTERFACE */ |
401 | __u8 bDescriptorSubtype; /* AS_GENERAL */ | 401 | __u8 bDescriptorSubtype; /* AS_GENERAL */ |
diff --git a/include/sound/asound.h b/include/sound/asound.h index 9f1eecf99e6b..a1803ecea34d 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
@@ -212,7 +212,11 @@ typedef int __bitwise snd_pcm_format_t; | |||
212 | #define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41) /* in three bytes */ | 212 | #define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41) /* in three bytes */ |
213 | #define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42) /* in three bytes */ | 213 | #define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42) /* in three bytes */ |
214 | #define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43) /* in three bytes */ | 214 | #define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43) /* in three bytes */ |
215 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_U18_3BE | 215 | #define SNDRV_PCM_FORMAT_G723_24 ((__force snd_pcm_format_t) 44) /* 8 samples in 3 bytes */ |
216 | #define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) /* 1 sample in 1 byte */ | ||
217 | #define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */ | ||
218 | #define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) /* 1 sample in 1 byte */ | ||
219 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_G723_40_1B | ||
216 | 220 | ||
217 | #ifdef SNDRV_LITTLE_ENDIAN | 221 | #ifdef SNDRV_LITTLE_ENDIAN |
218 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE | 222 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index dd76cdede64d..304025b23520 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -174,6 +174,10 @@ struct snd_pcm_ops { | |||
174 | #define SNDRV_PCM_FMTBIT_U18_3LE (1ULL << SNDRV_PCM_FORMAT_U18_3LE) | 174 | #define SNDRV_PCM_FMTBIT_U18_3LE (1ULL << SNDRV_PCM_FORMAT_U18_3LE) |
175 | #define SNDRV_PCM_FMTBIT_S18_3BE (1ULL << SNDRV_PCM_FORMAT_S18_3BE) | 175 | #define SNDRV_PCM_FMTBIT_S18_3BE (1ULL << SNDRV_PCM_FORMAT_S18_3BE) |
176 | #define SNDRV_PCM_FMTBIT_U18_3BE (1ULL << SNDRV_PCM_FORMAT_U18_3BE) | 176 | #define SNDRV_PCM_FMTBIT_U18_3BE (1ULL << SNDRV_PCM_FORMAT_U18_3BE) |
177 | #define SNDRV_PCM_FMTBIT_G723_24 (1ULL << SNDRV_PCM_FORMAT_G723_24) | ||
178 | #define SNDRV_PCM_FMTBIT_G723_24_1B (1ULL << SNDRV_PCM_FORMAT_G723_24_1B) | ||
179 | #define SNDRV_PCM_FMTBIT_G723_40 (1ULL << SNDRV_PCM_FORMAT_G723_40) | ||
180 | #define SNDRV_PCM_FMTBIT_G723_40_1B (1ULL << SNDRV_PCM_FORMAT_G723_40_1B) | ||
177 | 181 | ||
178 | #ifdef SNDRV_LITTLE_ENDIAN | 182 | #ifdef SNDRV_LITTLE_ENDIAN |
179 | #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE | 183 | #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE |
@@ -313,7 +317,7 @@ struct snd_pcm_runtime { | |||
313 | struct snd_pcm_mmap_control *control; | 317 | struct snd_pcm_mmap_control *control; |
314 | 318 | ||
315 | /* -- locking / scheduling -- */ | 319 | /* -- locking / scheduling -- */ |
316 | unsigned int twake: 1; /* do transfer (!poll) wakeup */ | 320 | snd_pcm_uframes_t twake; /* do transfer (!poll) wakeup if non-zero */ |
317 | wait_queue_head_t sleep; /* poll sleep */ | 321 | wait_queue_head_t sleep; /* poll sleep */ |
318 | wait_queue_head_t tsleep; /* transfer sleep */ | 322 | wait_queue_head_t tsleep; /* transfer sleep */ |
319 | struct fasync_struct *fasync; | 323 | struct fasync_struct *fasync; |