Skip to content

Commit a52966b

Browse files
vbrzeskikartben
authored andcommitted
uac2: rate limit ops->get_recv_buf error log
Rate limit the get_recv_buf() callback from the application to reduce system trash when buffer pressure gets high. Signed-off-by: Victor Brzeski <[email protected]>
1 parent e0ce77d commit a52966b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/usb/device_next/class/usbd_uac2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ static void schedule_iso_out_read(struct usbd_class_data *const c_data,
378378
/* Prepare transfer to read audio OUT data from host */
379379
data_buf = ctx->ops->get_recv_buf(dev, terminal, mps, ctx->user_data);
380380
if (!data_buf) {
381-
LOG_ERR("No data buffer for terminal %d", terminal);
381+
LOG_ERR_RATELIMIT("No data buffer for terminal %d", terminal);
382382
atomic_clear_bit(queued_bits, as_idx);
383383
return;
384384
}

0 commit comments

Comments
 (0)