This commit is contained in:
hathach
2025-02-12 11:34:32 +07:00
parent 87adc63226
commit 85247e50dd
5 changed files with 31 additions and 28 deletions

View File

@@ -1032,14 +1032,13 @@ static bool process_set_config(uint8_t rhport, uint8_t cfg_num)
#endif
#if CFG_TUD_MIDI
if ( driver->open == midid_open )
{
// If there is a class-compliant Audio Control Class, then 2 interfaces
// Otherwise, only one
if (driver->open == midid_open) {
// If there is a class-compliant Audio Control Class, then 2 interfaces. Otherwise, only one
if (TUSB_CLASS_AUDIO == desc_itf->bInterfaceClass &&
AUDIO_SUBCLASS_CONTROL == desc_itf->bInterfaceSubClass &&
AUDIO_FUNC_PROTOCOL_CODE_UNDEF == desc_itf->bInterfaceProtocol)
assoc_itf_count = 2;
AUDIO_SUBCLASS_CONTROL == desc_itf->bInterfaceSubClass &&
AUDIO_FUNC_PROTOCOL_CODE_UNDEF == desc_itf->bInterfaceProtocol) {
assoc_itf_count = 2;
}
}
#endif