Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/usb/usb_device_uac/usb_device_uac.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,12 @@ static void usb_spk_task(void *pvParam)
#if CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_RX
static void usb_mic_task(void *pvParam)
{
TickType_t xLastWakeTime = xTaskGetTickCount();
while (1) {
if (s_uac_device->mic_active == false) {
// clear the notification
ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
xLastWakeTime = xTaskGetTickCount();
continue;
}
// clear the notification
Expand All @@ -479,6 +481,8 @@ static void usb_mic_task(void *pvParam)
s_uac_device->mic_data_size = bytes_read;
UAC_EXIT_CRITICAL();
}

vTaskDelayUntil(&xLastWakeTime, pdMS_TO_TICKS(MIC_INTERVAL_MS));
}
}
#endif
Expand Down