Ticket #4463: usb_midi.2.diff
File usb_midi.2.diff, 2.3 KB (added by , 14 years ago) |
---|
-
BFS_User/haiku/haiku/src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.c
274 274 DPRINTF_ERR((MY_ID "cannot get default configuration\n")); 275 275 return B_ERROR; 276 276 } 277 DPRINTF_INFO(("Interface count = %ld\n", conf->interface_count);) 277 278 278 279 for (ifno = 0; ifno < conf->interface_count; ifno++) { 279 280 /* This is C; I can use "class" :-> */ … … 284 285 class = intf->descr->interface_class; 285 286 subclass = intf->descr->interface_subclass; 286 287 protocol = intf->descr->interface_protocol; 287 DPRINTF_INFO((MY_ID "interface %d, alt : %d: class %d, subclass %d, protocol %d\n", 288 ifno, alt, class, subclass, protocol)); 288 DPRINTF_INFO(( 289 MY_ID "interface %d, alt : %d: class %d, subclass %d, protocol %d\n", 290 ifno, alt, class, subclass, protocol)); 289 291 290 292 if (class == USB_AUDIO_DEVICE_CLASS 291 293 && subclass == USB_AUDIO_INTERFACE_MIDISTREAMING_SUBCLASS) … … 319 321 320 322 DPRINTF_INFO((MY_ID "my_dev = %p endpoint count = %ld\n", 321 323 my_dev, intf->endpoint_count)); 322 DPRINTF_INFO((MY_ID " input endpoint = %p\n", 323 &intf->endpoint[0])); 324 DPRINTF_INFO((MY_ID " output endpoint = %p\n", 325 &intf->endpoint[1])); 324 DPRINTF_INFO((MY_ID "endpoint 0 = %p %s\n", 325 &intf->endpoint[0], 326 intf->endpoint[0].descr->endpoint_address & 0x80? "IN" : "OUT")); 327 DPRINTF_INFO((MY_ID "endpoint 1 = %p %s\n", 328 &intf->endpoint[1], 329 intf->endpoint[1].descr->endpoint_address & 0x80? "IN" : "OUT")); 326 330 usb->clear_feature(intf->endpoint[0].handle, USB_FEATURE_ENDPOINT_HALT); 327 331 /* This may need more thought... */ 328 my_dev->ept_in = &intf->endpoint[0]; /* bulk IN */ 329 my_dev->ept_out = &intf->endpoint[1]; /* OUT */ 332 if (intf->endpoint[0].descr->endpoint_address & 0x80) { 333 /* assume one IN, one OUT */ 334 my_dev->ept_in = &intf->endpoint[0]; /* bulk IN*/ 335 my_dev->ept_out = &intf->endpoint[1]; /* OUT */ 336 } else { 337 my_dev->ept_in = &intf->endpoint[1]; /* Other way round... */ 338 my_dev->ept_out = &intf->endpoint[0]; 339 } 330 340 331 341 my_dev->timestamp = system_time(); 332 342