midi only use audio 1.0 without IAD
This commit is contained in:
parent
f16ebd512b
commit
216ccc6e93
|
@ -250,15 +250,13 @@ bool midid_open(uint8_t rhport, tusb_desc_interface_t const * p_interface_desc,
|
|||
(*p_length) = sizeof(tusb_desc_interface_t);
|
||||
|
||||
// Skip over the class specific descriptor.
|
||||
(*p_length) += p_desc[DESC_OFFSET_LEN];
|
||||
(*p_length) += tu_desc_len(p_desc);
|
||||
p_desc = tu_desc_next(p_desc);
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( AUDIO_SUBCLASS_MIDI_STREAMING != p_interface_desc->bInterfaceSubClass ||
|
||||
p_interface_desc->bInterfaceProtocol != AUDIO_PROTOCOL_V1 ) {
|
||||
return false;
|
||||
}
|
||||
TU_VERIFY(AUDIO_SUBCLASS_MIDI_STREAMING == p_interface_desc->bInterfaceSubClass &&
|
||||
AUDIO_PROTOCOL_V1 == p_interface_desc->bInterfaceProtocol );
|
||||
|
||||
// Find available interface
|
||||
midid_interface_t * p_midi = NULL;
|
||||
|
|
|
@ -174,14 +174,12 @@ TU_ATTR_WEAK void tud_resume_cb(void);
|
|||
//------------- MIDI -------------//
|
||||
|
||||
// Length of template descriptor (96 bytes)
|
||||
#define TUD_MIDI_DESC_LEN (8 + 9 + 9 + 9 + 7 + 6 + 6 + 9 + 9 + 7 + 5 + 7 + 5)
|
||||
#define TUD_MIDI_DESC_LEN (9 + 9 + 9 + 7 + 6 + 6 + 9 + 9 + 7 + 5 + 7 + 5)
|
||||
|
||||
// MIDI simple descriptor
|
||||
// - 1 Embedded Jack In connected to 1 External Jack Out
|
||||
// - 1 Embedded Jack out connected to 1 External Jack In
|
||||
#define TUD_MIDI_DESCRIPTOR(_itfnum, _stridx, _epin, _epout, _epsize) \
|
||||
/* Interface Associate */\
|
||||
8, TUSB_DESC_INTERFACE_ASSOCIATION, _itfnum, 2, TUSB_CLASS_AUDIO, 0x00, AUDIO_PROTOCOL_V1, 0,\
|
||||
/* Audio Control (AC) Interface */\
|
||||
9, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_CONTROL, AUDIO_PROTOCOL_V1, _stridx,\
|
||||
/* AC Header */\
|
||||
|
|
Loading…
Reference in New Issue