|
|
@@ -1629,8 +1629,6 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
|
|
|
#endif
|
|
|
|
|
|
#endif
|
|
|
- // Invoke callback - can be used to trigger data sampling if not already running
|
|
|
- // if (tud_audio_set_itf_cb) TU_VERIFY(tud_audio_set_itf_cb(rhport, p_request));
|
|
|
|
|
|
// Schedule first transmit if alternate interface is not zero i.e. streaming is disabled - in case no sample data is available a ZLP is loaded
|
|
|
// It is necessary to trigger this here since the refill is done with an RX FIFO empty interrupt which can only trigger if something was in there
|
|
|
@@ -1662,16 +1660,6 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
-#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
|
|
|
- // In case of asynchronous EP, call Cb after ep_fb is set
|
|
|
- // if ( !(desc_ep->bmAttributes.sync == 0x01 && audio->ep_fb == 0) )
|
|
|
- // {
|
|
|
- // if (tud_audio_set_itf_cb) TU_VERIFY(tud_audio_set_itf_cb(rhport, p_request));
|
|
|
- // }
|
|
|
-#else
|
|
|
- // Invoke callback
|
|
|
- if (tud_audio_set_itf_cb) TU_VERIFY(tud_audio_set_itf_cb(rhport, p_request));
|
|
|
-#endif
|
|
|
// Prepare for incoming data
|
|
|
#if USE_LINEAR_BUFFER_RX
|
|
|
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz), false);
|
|
|
@@ -1688,12 +1676,6 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
|
|
|
|
|
|
// Enable SOF interrupt if callback is implemented
|
|
|
if (tud_audio_feedback_interval_isr) usbd_sof_enable(rhport, true);
|
|
|
-
|
|
|
- // // Invoke callback after ep_out is set
|
|
|
- // if (audio->ep_out != 0)
|
|
|
- // {
|
|
|
- // if (tud_audio_set_itf_cb) TU_VERIFY(tud_audio_set_itf_cb(rhport, p_request));
|
|
|
- // }
|
|
|
}
|
|
|
#endif
|
|
|
#endif // CFG_TUD_AUDIO_ENABLE_EP_OUT
|
|
|
@@ -1705,10 +1687,10 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
|
|
|
|
|
|
TU_VERIFY(foundEPs == nEps);
|
|
|
|
|
|
-#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
|
|
|
// Invoke one callback for a final set interface
|
|
|
if (tud_audio_set_itf_cb) TU_VERIFY(tud_audio_set_itf_cb(rhport, p_request));
|
|
|
|
|
|
+#if CFG_TUD_AUDIO_ENABLE_FEEDBACK_EP
|
|
|
// Prepare feedback computation if callback is available
|
|
|
if (tud_audio_feedback_params_cb)
|
|
|
{
|