本來這個blog是記錄開發輸入法的點滴的,後來越來越雜,現在什麼都記錄了。

2012年10月11日 星期四

Nexus7 USB configuration after requested USB Accessory and USB Audio

With the help from this website:
http://forum.xda-developers.com/showthread.php?t=1852343

The USB configuration of Nexus 7, after claiming the USB accessory and USB Audio, is shown below. The tools used is lsusb.

I think there is bugs:
(1)  Line 73 to 75, I think it should be:
    73         bInCollection           1
    74         baInterfaceNr( 0)       2
  
The Audio streaming interface has number 2, should I think line 74 should be 2.

2) Line 132, I think it should be:


bTerminalLink           3

It should be 3 instead of 1, to match the terminal ID on line 93.

Can someone tell me if this is correct?

1 Bus 001 Device 005: ID 18d1:2d05 Google Inc. 2 Device Descriptor: 3 bLength 18 4 bDescriptorType 1 5 bcdUSB 2.00 6 bDeviceClass 0 (Defined at Interface level) 7 bDeviceSubClass 0 8 bDeviceProtocol 0 9 bMaxPacketSize0 64 10 idVendor 0x18d1 Google Inc. 11 idProduct 0x2d05 12 bcdDevice 99.99 13 iManufacturer 2 asus 14 iProduct 3 Nexus 15 iSerial 4 015d188495400a11 16 bNumConfigurations 1 17 Configuration Descriptor: 18 bLength 9 19 bDescriptorType 2 20 wTotalLength 156 21 bNumInterfaces 4 22 bConfigurationValue 1 23 iConfiguration 0 24 bmAttributes 0x80 25 (Bus Powered) 26 MaxPower 500mA 27 Interface Descriptor: 28 bLength 9 29 bDescriptorType 4 30 bInterfaceNumber 0 31 bAlternateSetting 0 32 bNumEndpoints 2 33 bInterfaceClass 255 Vendor Specific Class 34 bInterfaceSubClass 255 Vendor Specific Subclass 35 bInterfaceProtocol 0 36 iInterface 6 Android Accessory Interface 37 Endpoint Descriptor: 38 bLength 7 39 bDescriptorType 5 40 bEndpointAddress 0x81 EP 1 IN 41 bmAttributes 2 42 Transfer Type Bulk 43 Synch Type None 44 Usage Type Data 45 wMaxPacketSize 0x0200 1x 512 bytes 46 bInterval 0 47 Endpoint Descriptor: 48 bLength 7 49 bDescriptorType 5 50 bEndpointAddress 0x02 EP 2 OUT 51 bmAttributes 2 52 Transfer Type Bulk 53 Synch Type None 54 Usage Type Data 55 wMaxPacketSize 0x0200 1x 512 bytes 56 bInterval 0 57 Interface Descriptor: 58 bLength 9 59 bDescriptorType 4 60 bInterfaceNumber 1 61 bAlternateSetting 0 62 bNumEndpoints 0 63 bInterfaceClass 1 Audio 64 bInterfaceSubClass 1 Control Device 65 bInterfaceProtocol 0 66 iInterface 0 67 AudioControl Interface Descriptor: 68 bLength 10 69 bDescriptorType 36 70 bDescriptorSubtype 1 (HEADER) 71 bcdADC 1.00 72 wTotalLength 40 73 bInCollection 2 74 baInterfaceNr( 0) 0 75 baInterfaceNr( 1) 1 76 AudioControl Interface Descriptor: 77 bLength 12 78 bDescriptorType 36 79 bDescriptorSubtype 2 (INPUT_TERMINAL) 80 bTerminalID 1 81 wTerminalType 0x0201 Microphone 82 bAssocTerminal 0 83 bNrChannels 2 84 wChannelConfig 0x0003 85 Left Front (L) 86 Right Front (R) 87 iChannelNames 0 88 iTerminal 0 89 AudioControl Interface Descriptor: 90 bLength 9 91 bDescriptorType 36 92 bDescriptorSubtype 3 (OUTPUT_TERMINAL) 93 bTerminalID 3 94 wTerminalType 0x0101 USB Streaming 95 bAssocTerminal 2 96 bSourceID 2 97 iTerminal 0 98 AudioControl Interface Descriptor: 99 bLength 9 100 bDescriptorType 36 101 bDescriptorSubtype 6 (FEATURE_UNIT) 102 bUnitID 2 103 bSourceID 1 104 bControlSize 2 105 bmaControls( 0) 0x00 106 bmaControls( 0) 0x00 107 iFeature 0 108 Interface Descriptor: 109 bLength 9 110 bDescriptorType 4 111 bInterfaceNumber 2 112 bAlternateSetting 0 113 bNumEndpoints 0 114 bInterfaceClass 1 Audio 115 bInterfaceSubClass 2 Streaming 116 bInterfaceProtocol 0 117 iInterface 0 118 Interface Descriptor: 119 bLength 9 120 bDescriptorType 4 121 bInterfaceNumber 2 122 bAlternateSetting 1 123 bNumEndpoints 1 124 bInterfaceClass 1 Audio 125 bInterfaceSubClass 2 Streaming 126 bInterfaceProtocol 0 127 iInterface 0 128 AudioStreaming Interface Descriptor: 129 bLength 7 130 bDescriptorType 36 131 bDescriptorSubtype 1 (AS_GENERAL) 132 bTerminalLink 1 133 bDelay 1 frames 134 wFormatTag 1 PCM 135 AudioStreaming Interface Descriptor: 136 bLength 11 137 bDescriptorType 36 138 bDescriptorSubtype 2 (FORMAT_TYPE) 139 bFormatType 1 (FORMAT_TYPE_I) 140 bNrChannels 2 141 bSubframeSize 2 142 bBitResolution 16 143 bSamFreqType 1 Discrete 144 tSamFreq[ 0] 44100 145 Endpoint Descriptor: 146 bLength 9 147 bDescriptorType 5 148 bEndpointAddress 0x83 EP 3 IN 149 bmAttributes 13 150 Transfer Type Isochronous 151 Synch Type Synchronous 152 Usage Type Data 153 wMaxPacketSize 0x0100 1x 256 bytes 154 bInterval 4 155 bRefresh 0 156 bSynchAddress 0 157 AudioControl Endpoint Descriptor: 158 bLength 7 159 bDescriptorType 37 160 bDescriptorSubtype 1 (EP_GENERAL) 161 bmAttributes 0x01 162 Sampling Frequency 163 bLockDelayUnits 1 Milliseconds 164 wLockDelay 1 Milliseconds 165 Interface Descriptor: 166 bLength 9 167 bDescriptorType 4 168 bInterfaceNumber 3 169 bAlternateSetting 0 170 bNumEndpoints 2 171 bInterfaceClass 255 Vendor Specific Class 172 bInterfaceSubClass 66 173 bInterfaceProtocol 1 174 iInterface 0 175 Endpoint Descriptor: 176 bLength 7 177 bDescriptorType 5 178 bEndpointAddress 0x82 EP 2 IN 179 bmAttributes 2 180 Transfer Type Bulk 181 Synch Type None 182 Usage Type Data 183 wMaxPacketSize 0x0200 1x 512 bytes 184 bInterval 0 185 Endpoint Descriptor: 186 bLength 7 187 bDescriptorType 5 188 bEndpointAddress 0x03 EP 3 OUT 189 bmAttributes 2 190 Transfer Type Bulk 191 Synch Type None 192 Usage Type Data 193 wMaxPacketSize 0x0200 1x 512 bytes 194 bInterval 0 195 Device Qualifier (for other device speed): 196 bLength 10 197 bDescriptorType 6 198 bcdUSB 2.00 199 bDeviceClass 0 (Defined at Interface level) 200 bDeviceSubClass 0 201 bDeviceProtocol 0 202 bMaxPacketSize0 64 203 bNumConfigurations 1 204 Device Status: 0x0000 205 (Bus Powered)