uvc: queue buffers for SET_CUR
This commit is contained in:
parent
04afb7603f
commit
41cf36a812
@ -317,6 +317,9 @@ fn handle_setup(
|
||||
|
||||
if !is_in && req.b_request == UVC_SET_CUR {
|
||||
*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);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -344,12 +347,10 @@ fn handle_data(
|
||||
data: UvcRequestData,
|
||||
) {
|
||||
let Some(p) = pending.take() else {
|
||||
let _ = send_response(fd, uvc_send_response, &[]);
|
||||
return;
|
||||
};
|
||||
|
||||
if data.length < 0 {
|
||||
let _ = send_stall(fd, uvc_send_response);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -366,8 +367,6 @@ fn handle_data(
|
||||
state.commit = sanitized;
|
||||
}
|
||||
}
|
||||
|
||||
let _ = send_response(fd, uvc_send_response, &[]);
|
||||
}
|
||||
|
||||
fn build_in_response(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user