@@ -520,10 +520,10 @@ static bool audiod_rx_xfer_isr(uint8_t rhport, audiod_function_t* audio, uint16_
520520 TU_VERIFY (tu_fifo_write_n (& audio -> ep_out_ff , audio -> lin_buf_out , n_bytes_received ));
521521
522522 // Schedule for next receive
523- TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_out , audio -> lin_buf_out , audio -> ep_out_sz , true), false );
523+ TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_out , audio -> lin_buf_out , audio -> ep_out_sz , true));
524524 #else
525525 // Data is already placed in EP FIFO, schedule for next receive
526- TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_out , & audio -> ep_out_ff , audio -> ep_out_sz , true), false );
526+ TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_out , & audio -> ep_out_ff , audio -> ep_out_sz , true));
527527 #endif
528528
529529 #if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
@@ -607,7 +607,7 @@ bool tud_audio_int_n_write(uint8_t func_id, const audio_interrupt_data_t *data)
607607 // Check length
608608 if (tu_memcpy_s (int_ep_buf [func_id ].buf , sizeof (int_ep_buf [func_id ].buf ), data , sizeof (audio_interrupt_data_t )) == 0 ) {
609609 // Schedule transmit
610- TU_ASSERT (usbd_edpt_xfer (_audiod_fct [func_id ].rhport , _audiod_fct [func_id ].ep_int , int_ep_buf [func_id ].buf , sizeof (int_ep_buf [func_id ].buf )), 0 );
610+ TU_ASSERT (usbd_edpt_xfer (_audiod_fct [func_id ].rhport , _audiod_fct [func_id ].ep_int , int_ep_buf [func_id ].buf , sizeof (int_ep_buf [func_id ].buf ), false) );
611611 } else {
612612 // Release endpoint since we don't make any transfer
613613 usbd_edpt_release (_audiod_fct [func_id ].rhport , _audiod_fct [func_id ].ep_int );
@@ -619,7 +619,7 @@ bool tud_audio_int_n_write(uint8_t func_id, const audio_interrupt_data_t *data)
619619
620620#if CFG_TUD_AUDIO_ENABLE_EP_OUT && CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
621621// This function is called once a transmit of a feedback packet was successfully completed. Here, we get the next feedback value to be sent
622- static inline bool audiod_fb_send (audiod_function_t * audio ) {
622+ static inline bool audiod_fb_send (audiod_function_t * audio , bool is_isr ) {
623623 bool apply_correction = (TUSB_SPEED_FULL == tud_speed_get ()) && audio -> feedback .format_correction ;
624624 // Format the feedback value
625625 if (apply_correction ) {
@@ -647,7 +647,7 @@ static inline bool audiod_fb_send(audiod_function_t *audio) {
647647 // 10.14 3 3 Linux, OSX
648648 //
649649 // We send 3 bytes since sending packet larger than wMaxPacketSize is pretty ugly
650- return usbd_edpt_xfer (audio -> rhport , audio -> ep_fb , (uint8_t * ) audio -> fb_buf , apply_correction ? 3 : 4 );
650+ return usbd_edpt_xfer (audio -> rhport , audio -> ep_fb , (uint8_t * ) audio -> fb_buf , apply_correction ? 3 : 4 , is_isr );
651651}
652652#endif
653653
@@ -1133,10 +1133,10 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
11331133 #endif
11341134 // Schedule first transmit if alternate interface is not zero, as sample data is available a ZLP is loaded
11351135 #if USE_LINEAR_BUFFER_TX
1136- TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_in , audio -> lin_buf_in , 0 ));
1136+ TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_in , audio -> lin_buf_in , 0 , false ));
11371137 #else
11381138 // Send everything in ISO EP FIFO
1139- TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_in , & audio -> ep_in_ff , 0 ));
1139+ TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_in , & audio -> ep_in_ff , 0 , false ));
11401140 #endif
11411141 }
11421142#endif // CFG_TUD_AUDIO_ENABLE_EP_IN
@@ -1152,9 +1152,9 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
11521152
11531153 // Prepare for incoming data
11541154 #if USE_LINEAR_BUFFER_RX
1155- TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_out , audio -> lin_buf_out , audio -> ep_out_sz ) , false);
1155+ TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_out , audio -> lin_buf_out , audio -> ep_out_sz , false) );
11561156 #else
1157- TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_out , & audio -> ep_out_ff , audio -> ep_out_sz ) , false);
1157+ TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_out , & audio -> ep_out_ff , audio -> ep_out_sz , false) );
11581158 #endif
11591159 }
11601160
@@ -1164,7 +1164,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
11641164 audio -> ep_fb = ep_addr ;
11651165 audio -> feedback .frame_shift = desc_ep -> bInterval - 1 ;
11661166 // Schedule first feedback transmit
1167- audiod_fb_send (audio );
1167+ audiod_fb_send (audio , false );
11681168 }
11691169 #endif
11701170#endif // CFG_TUD_AUDIO_ENABLE_EP_OUT
@@ -1472,7 +1472,7 @@ bool audiod_xfer_isr(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint
14721472 if (audio -> ep_fb == ep_addr ) {
14731473 // Schedule a transmit with the new value if EP is not busy
14741474 // Schedule next transmission - value is changed bytud_audio_n_fb_set() in the meantime or the old value gets sent
1475- audiod_fb_send (audio );
1475+ audiod_fb_send (audio , true );
14761476 return true;
14771477 }
14781478 #endif
0 commit comments