USBX Audio Class frame done callback not called
I've set up my STM32U5A9J-DK to use ThreadX and connect to my PC via USBX and Audio Class.
I'm correctly see the Audio Device on my PC and I can easily stream audio to it. The only thing is that, for some reason, the callback for new frame done is not fired
audio_stream_parameter[0].ux_device_class_audio_stream_parameter_callbacks.ux_device_class_audio_stream_change
= USBD_AUDIO_PlaybackStreamChange;
audio_stream_parameter[0].ux_device_class_audio_stream_parameter_callbacks.ux_device_class_audio_stream_frame_done
= USBD_AUDIO_PlaybackStreamFrameDone;The strage thing is that USBD_AUDIO_PlaybackStreamChange is correctly called
VOID USBD_AUDIO_PlaybackStreamChange(UX_DEVICE_CLASS_AUDIO_STREAM *audio_play_stream,
ULONG alternate_setting)
{
/* USER CODE BEGIN USBD_AUDIO_PlaybackStreamChange */
/* Do nothing if alternate setting is 0 (stream closed). */
if (alternate_setting == 0)
{
return;
}
BufferCtl.state = PLAY_BUFFER_OFFSET_UNKNOWN;
/* Start reception (stream opened). */
ux_device_class_audio_reception_start(audio_play_stream);
/* USER CODE END USBD_AUDIO_PlaybackStreamChange */
return;
}Instead, USBD_AUDIO_PlaybackStreamFrameDone is never called
VOID USBD_AUDIO_PlaybackStreamFrameDone(UX_DEVICE_CLASS_AUDIO_STREAM *audio_play_stream,
ULONG length)
{
/* USER CODE BEGIN USBD_AUDIO_PlaybackStreamFrameDone */
UCHAR *frame_buffer;
ULONG frame_length;
/* Get access to first audio input frame. */
ux_device_class_audio_read_frame_get(audio_play_stream, &frame_buffer, &frame_length);
...
}