Skip to content

Commit

Permalink
Enabling more video controls: Contrast, Hue, Sharpness, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
tuyenld committed Dec 8, 2020
1 parent daa3dd7 commit 8ba054b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions configs/config
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_PIWEBCAM=y
BR2_PACKAGE_CAMERA_CONTROL=y
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_PICAM_PATH)/patches/linux-custom"
15 changes: 15 additions & 0 deletions patches/linux-custom/0001-linux-enable-more-video-controls.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index fb0a892..5c850be 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -814,8 +814,8 @@ static struct usb_function_instance *uvc_alloc_inst(void)
pd->bSourceID = 1;
pd->wMaxMultiplier = cpu_to_le16(16*1024);
pd->bControlSize = 2;
- pd->bmControls[0] = 1;
- pd->bmControls[1] = 0;
+ pd->bmControls[0] = 255;
+ pd->bmControls[1] = 6;
pd->iProcessing = 0;

od = &opts->uvc_output_terminal;

0 comments on commit 8ba054b

Please sign in to comment.