@@ -503,10 +503,10 @@ static bool audiod_rx_xfer_isr(uint8_t rhport, audiod_function_t* audio, uint16_
503503 TU_VERIFY (0 < tu_fifo_write_n (& audio -> ep_out_ff , audio -> lin_buf_out , n_bytes_received ));
504504
505505 // Schedule for next receive
506- TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_out , audio -> lin_buf_out , audio -> ep_out_sz ), false );
506+ TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_out , audio -> lin_buf_out , audio -> ep_out_sz , true) );
507507 #else
508508 // Data is already placed in EP FIFO, schedule for next receive
509- TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_out , & audio -> ep_out_ff , audio -> ep_out_sz ), false );
509+ TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_out , & audio -> ep_out_ff , audio -> ep_out_sz , true) );
510510 #endif
511511
512512 #if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
@@ -574,10 +574,10 @@ static bool audiod_tx_xfer_isr(uint8_t rhport, audiod_function_t * audio, uint16
574574 #endif
575575 #if USE_LINEAR_BUFFER_TX
576576 tu_fifo_read_n (& audio -> ep_in_ff , audio -> lin_buf_in , n_bytes_tx );
577- TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_in , audio -> lin_buf_in , n_bytes_tx ));
577+ TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_in , audio -> lin_buf_in , n_bytes_tx , true ));
578578 #else
579579 // Send everything in ISO EP FIFO
580- TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_in , & audio -> ep_in_ff , n_bytes_tx ));
580+ TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_in , & audio -> ep_in_ff , n_bytes_tx , true ));
581581 #endif
582582
583583 // Call a weak callback here - a possibility for user to get informed former TX was completed and data gets now loaded into EP in buffer
@@ -610,7 +610,7 @@ bool tud_audio_int_n_write(uint8_t func_id, const audio_interrupt_data_t *data)
610610 // Check length
611611 if (tu_memcpy_s (int_ep_buf [func_id ].buf , sizeof (int_ep_buf [func_id ].buf ), data , size ) == 0 ) {
612612 // Schedule transmit
613- TU_ASSERT (usbd_edpt_xfer (_audiod_fct [func_id ].rhport , _audiod_fct [func_id ].ep_int , int_ep_buf [func_id ].buf , size ), 0 );
613+ TU_ASSERT (usbd_edpt_xfer (_audiod_fct [func_id ].rhport , _audiod_fct [func_id ].ep_int , int_ep_buf [func_id ].buf , size , false) );
614614 } else {
615615 // Release endpoint since we don't make any transfer
616616 usbd_edpt_release (_audiod_fct [func_id ].rhport , _audiod_fct [func_id ].ep_int );
@@ -622,7 +622,7 @@ bool tud_audio_int_n_write(uint8_t func_id, const audio_interrupt_data_t *data)
622622
623623#if CFG_TUD_AUDIO_ENABLE_EP_OUT && CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
624624// This function is called once a transmit of a feedback packet was successfully completed. Here, we get the next feedback value to be sent
625- static inline bool audiod_fb_send (uint8_t func_id ) {
625+ static inline bool audiod_fb_send (uint8_t func_id , bool is_isr ) {
626626 audiod_function_t * audio = & _audiod_fct [func_id ];
627627 uint8_t uac_version = tud_audio_n_version (func_id );
628628 // Format the feedback value
@@ -638,7 +638,7 @@ static inline bool audiod_fb_send(uint8_t func_id) {
638638 * audio -> fb_buf = audio -> feedback .value ;
639639 }
640640
641- return usbd_edpt_xfer (audio -> rhport , audio -> ep_fb , (uint8_t * ) audio -> fb_buf , uac_version == 1 ? 3 : 4 );
641+ return usbd_edpt_xfer (audio -> rhport , audio -> ep_fb , (uint8_t * ) audio -> fb_buf , uac_version == 1 ? 3 : 4 , is_isr );
642642}
643643
644644uint32_t tud_audio_feedback_update (uint8_t func_id , uint32_t cycles ) {
@@ -1208,10 +1208,10 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
12081208 #endif
12091209 // Schedule first transmit if alternate interface is not zero, as sample data is available a ZLP is loaded
12101210 #if USE_LINEAR_BUFFER_TX
1211- TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_in , audio -> lin_buf_in , 0 ));
1211+ TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_in , audio -> lin_buf_in , 0 , false ));
12121212 #else
12131213 // Send everything in ISO EP FIFO
1214- TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_in , & audio -> ep_in_ff , 0 ));
1214+ TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_in , & audio -> ep_in_ff , 0 , false ));
12151215 #endif
12161216 }
12171217#endif // CFG_TUD_AUDIO_ENABLE_EP_IN
@@ -1227,9 +1227,9 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
12271227
12281228 // Prepare for incoming data
12291229 #if USE_LINEAR_BUFFER_RX
1230- TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_out , audio -> lin_buf_out , audio -> ep_out_sz ) , false);
1230+ TU_VERIFY (usbd_edpt_xfer (rhport , audio -> ep_out , audio -> lin_buf_out , audio -> ep_out_sz , false) );
12311231 #else
1232- TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_out , & audio -> ep_out_ff , audio -> ep_out_sz ) , false);
1232+ TU_VERIFY (usbd_edpt_xfer_fifo (rhport , audio -> ep_out , & audio -> ep_out_ff , audio -> ep_out_sz , false) );
12331233 #endif
12341234 }
12351235
@@ -1239,7 +1239,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *p
12391239 audio -> ep_fb = ep_addr ;
12401240 audio -> feedback .frame_shift = desc_ep -> bInterval - 1 ;
12411241 // Schedule first feedback transmit
1242- audiod_fb_send (func_id );
1242+ audiod_fb_send (func_id , false );
12431243 }
12441244 #else
12451245 (void ) is_feedback_ep ;
@@ -1538,7 +1538,7 @@ bool audiod_xfer_isr(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint
15381538 if (audio -> ep_fb == ep_addr ) {
15391539 // Schedule a transmit with the new value if EP is not busy
15401540 // Schedule next transmission - value is changed bytud_audio_n_fb_set() in the meantime or the old value gets sent
1541- audiod_fb_send (func_id );
1541+ audiod_fb_send (func_id , true );
15421542 return true;
15431543 }
15441544 #endif
0 commit comments