aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/audio-v2.h
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-05-11 12:13:50 -0400
committerTakashi Iwai <tiwai@suse.de>2010-05-11 16:44:07 -0400
commite213e9cf707c51808e372dabd1070a61af17e77b (patch)
tree320ddb8fce3b554d1555c698c840437250928ca2 /include/linux/usb/audio-v2.h
parent0350b6a0cbeaf46e0883d8c79ede2efd49965472 (diff)
ALSA: sound/usb: add preliminary support for UAC2 interrupts
For both UAC1 and UAC2, interrupt endpoint messages are now parsed with structs rather that with anonymous buffer array accesses. For UAC2, only CUR interrupt notifications are supported for now. snd_usb_mixer_status_complete() was renamed to snd_usb_mixer_interrupt(). Fixed one indentation flaw on the way. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/usb/audio-v2.h')
-rw-r--r--include/linux/usb/audio-v2.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/usb/audio-v2.h b/include/linux/usb/audio-v2.h
index 0952231e6c3..2389f93a28b 100644
--- a/include/linux/usb/audio-v2.h
+++ b/include/linux/usb/audio-v2.h
@@ -105,6 +105,17 @@ struct uac_as_header_descriptor_v2 {
105 __u8 iChannelNames; 105 __u8 iChannelNames;
106} __attribute__((packed)); 106} __attribute__((packed));
107 107
108/* 6.1 Interrupt Data Message */
109
110#define UAC2_INTERRUPT_DATA_MSG_VENDOR (1 << 0)
111#define UAC2_INTERRUPT_DATA_MSG_EP (1 << 1)
112
113struct uac2_interrupt_data_msg {
114 __u8 bInfo;
115 __u8 bAttribute;
116 __le16 wValue;
117 __le16 wIndex;
118} __attribute__((packed));
108 119
109/* A.7 Audio Function Category Codes */ 120/* A.7 Audio Function Category Codes */
110#define UAC2_FUNCTION_SUBCLASS_UNDEFINED 0x00 121#define UAC2_FUNCTION_SUBCLASS_UNDEFINED 0x00
@@ -153,6 +164,7 @@ struct uac_as_header_descriptor_v2 {
153/* A.14 Audio Class-Specific Request Codes */ 164/* A.14 Audio Class-Specific Request Codes */
154#define UAC2_CS_CUR 0x01 165#define UAC2_CS_CUR 0x01
155#define UAC2_CS_RANGE 0x02 166#define UAC2_CS_RANGE 0x02
167#define UAC2_CS_MEM 0x03
156 168
157/* A.15 Encoder Type Codes */ 169/* A.15 Encoder Type Codes */
158#define UAC2_ENCODER_UNDEFINED 0x00 170#define UAC2_ENCODER_UNDEFINED 0x00