diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-05-26 12:11:38 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-05-27 03:49:22 -0400 |
commit | 43b8e3bc4af0b435fddaa59e827ca1010b024492 (patch) | |
tree | f5d6a8e46a9ae219b7c3fb9297ad08c6c901359a /include/linux | |
parent | 8d0912427113723c3f3a4dca631638844c4ab649 (diff) |
ALSA: usb-audio: parse UAC2 endpoint descriptors correctly
UAC2 devices have their information about pitch control stored in a
different field. Parse it, and emulate the bits for a v1 device.
A new struct uac2_iso_endpoint_descriptor is added.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/usb/audio-v2.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h index 2389f93a28b5..92f1d99f0f17 100644 --- a/include/linux/usb/audio-v2.h +++ b/include/linux/usb/audio-v2.h | |||
@@ -105,6 +105,22 @@ struct uac_as_header_descriptor_v2 { | |||
105 | __u8 iChannelNames; | 105 | __u8 iChannelNames; |
106 | } __attribute__((packed)); | 106 | } __attribute__((packed)); |
107 | 107 | ||
108 | /* 4.10.1.2 Class-Specific AS Isochronous Audio Data Endpoint Descriptor */ | ||
109 | |||
110 | struct uac2_iso_endpoint_descriptor { | ||
111 | __u8 bLength; /* in bytes: 8 */ | ||
112 | __u8 bDescriptorType; /* USB_DT_CS_ENDPOINT */ | ||
113 | __u8 bDescriptorSubtype; /* EP_GENERAL */ | ||
114 | __u8 bmAttributes; | ||
115 | __u8 bmControls; | ||
116 | __u8 bLockDelayUnits; | ||
117 | __le16 wLockDelay; | ||
118 | } __attribute__((packed)); | ||
119 | |||
120 | #define UAC2_CONTROL_PITCH (3 << 0) | ||
121 | #define UAC2_CONTROL_DATA_OVERRUN (3 << 2) | ||
122 | #define UAC2_CONTROL_DATA_UNDERRUN (3 << 4) | ||
123 | |||
108 | /* 6.1 Interrupt Data Message */ | 124 | /* 6.1 Interrupt Data Message */ |
109 | 125 | ||
110 | #define UAC2_INTERRUPT_DATA_MSG_VENDOR (1 << 0) | 126 | #define UAC2_INTERRUPT_DATA_MSG_VENDOR (1 << 0) |