uvc: ack SET_CUR then send status

This commit is contained in:
Brad Stein 2026-01-07 03:24:17 -03:00
parent 1b9a0f7ee2
commit 86656054c5

View File

@ -378,15 +378,18 @@ fn handle_setup(
} }
let interface = map_interface(interface_raw, selector, interfaces, debug); let interface = map_interface(interface_raw, selector, interfaces, debug);
if !is_in && req.b_request == UVC_SET_CUR { if !is_in && req.b_request == UVC_SET_CUR {
if interface != interfaces.streaming { if interface != interfaces.streaming {
let _ = send_stall(fd, uvc_send_response); let _ = send_stall(fd, uvc_send_response);
return; return;
} }
*pending = Some(PendingRequest { interface, selector }); *pending = Some(PendingRequest { interface, selector });
if debug { let len = req.w_length as usize;
eprintln!( let payload = vec![0u8; len.min(UVC_DATA_SIZE)];
"[lesavka-uvc] SET_CUR queued len={} iface={} sel={}", let _ = send_response(fd, uvc_send_response, &payload);
if debug {
eprintln!(
"[lesavka-uvc] SET_CUR queued len={} iface={} sel={}",
req.w_length, interface, selector req.w_length, interface, selector
); );
} }