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);
if !is_in && req.b_request == UVC_SET_CUR {
if interface != interfaces.streaming {
let _ = send_stall(fd, uvc_send_response);
return;
}
*pending = Some(PendingRequest { interface, selector });
if debug {
eprintln!(
"[lesavka-uvc] SET_CUR queued len={} iface={} sel={}",
if !is_in && req.b_request == UVC_SET_CUR {
if interface != interfaces.streaming {
let _ = send_stall(fd, uvc_send_response);
return;
}
*pending = Some(PendingRequest { interface, selector });
let len = req.w_length as usize;
let payload = vec![0u8; len.min(UVC_DATA_SIZE)];
let _ = send_response(fd, uvc_send_response, &payload);
if debug {
eprintln!(
"[lesavka-uvc] SET_CUR queued len={} iface={} sel={}",
req.w_length, interface, selector
);
}