midi only use audio 1.0 without IAD
This commit is contained in:
@@ -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);
|
(*p_length) = sizeof(tusb_desc_interface_t);
|
||||||
|
|
||||||
// Skip over the class specific descriptor.
|
// 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);
|
p_desc = tu_desc_next(p_desc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( AUDIO_SUBCLASS_MIDI_STREAMING != p_interface_desc->bInterfaceSubClass ||
|
TU_VERIFY(AUDIO_SUBCLASS_MIDI_STREAMING == p_interface_desc->bInterfaceSubClass &&
|
||||||
p_interface_desc->bInterfaceProtocol != AUDIO_PROTOCOL_V1 ) {
|
AUDIO_PROTOCOL_V1 == p_interface_desc->bInterfaceProtocol );
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find available interface
|
// Find available interface
|
||||||
midid_interface_t * p_midi = NULL;
|
midid_interface_t * p_midi = NULL;
|
||||||
|
@@ -174,14 +174,12 @@ TU_ATTR_WEAK void tud_resume_cb(void);
|
|||||||
//------------- MIDI -------------//
|
//------------- MIDI -------------//
|
||||||
|
|
||||||
// Length of template descriptor (96 bytes)
|
// 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
|
// MIDI simple descriptor
|
||||||
// - 1 Embedded Jack In connected to 1 External Jack Out
|
// - 1 Embedded Jack In connected to 1 External Jack Out
|
||||||
// - 1 Embedded Jack out connected to 1 External Jack In
|
// - 1 Embedded Jack out connected to 1 External Jack In
|
||||||
#define TUD_MIDI_DESCRIPTOR(_itfnum, _stridx, _epin, _epout, _epsize) \
|
#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 */\
|
/* Audio Control (AC) Interface */\
|
||||||
9, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_CONTROL, AUDIO_PROTOCOL_V1, _stridx,\
|
9, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUSB_CLASS_AUDIO, AUDIO_SUBCLASS_CONTROL, AUDIO_PROTOCOL_V1, _stridx,\
|
||||||
/* AC Header */\
|
/* AC Header */\
|
||||||
|
Reference in New Issue
Block a user