diff options
Diffstat (limited to 'drivers/media/video/usbvision')
-rw-r--r-- | drivers/media/video/usbvision/usbvision-core.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c index 9e404b87d000..1e52a0387aa5 100644 --- a/drivers/media/video/usbvision/usbvision-core.c +++ b/drivers/media/video/usbvision/usbvision-core.c | |||
@@ -69,6 +69,15 @@ static int SwitchSVideoInput = 0; // To help people with Black and White outpu | |||
69 | module_param(SwitchSVideoInput, int, 0444); | 69 | module_param(SwitchSVideoInput, int, 0444); |
70 | MODULE_PARM_DESC(SwitchSVideoInput, " Set the S-Video input. Some cables and input device are wired differently. Default: 0 (Off)"); | 70 | MODULE_PARM_DESC(SwitchSVideoInput, " Set the S-Video input. Some cables and input device are wired differently. Default: 0 (Off)"); |
71 | 71 | ||
72 | static unsigned int adjust_X_Offset = -1; | ||
73 | module_param(adjust_X_Offset, int, 0644); | ||
74 | MODULE_PARM_DESC(adjust_X_Offset, "adjust X offset display [core]"); | ||
75 | |||
76 | static unsigned int adjust_Y_Offset = -1; | ||
77 | module_param(adjust_Y_Offset, int, 0644); | ||
78 | MODULE_PARM_DESC(adjust_Y_Offset, "adjust Y offset display [core]"); | ||
79 | |||
80 | |||
72 | #define ENABLE_HEXDUMP 0 /* Enable if you need it */ | 81 | #define ENABLE_HEXDUMP 0 /* Enable if you need it */ |
73 | 82 | ||
74 | 83 | ||
@@ -2097,11 +2106,21 @@ int usbvision_set_input(struct usb_usbvision *usbvision) | |||
2097 | value[5]=(usbvision_device_data[usbvision->DevModel].X_Offset & 0x0300) >> 8; | 2106 | value[5]=(usbvision_device_data[usbvision->DevModel].X_Offset & 0x0300) >> 8; |
2098 | } | 2107 | } |
2099 | 2108 | ||
2109 | if (adjust_X_Offset != -1) { | ||
2110 | value[4] = adjust_X_Offset & 0xff; | ||
2111 | value[5] = (adjust_X_Offset & 0x0300) >> 8; | ||
2112 | } | ||
2113 | |||
2100 | if (usbvision_device_data[usbvision->DevModel].Y_Offset >= 0) { | 2114 | if (usbvision_device_data[usbvision->DevModel].Y_Offset >= 0) { |
2101 | value[6]=usbvision_device_data[usbvision->DevModel].Y_Offset & 0xff; | 2115 | value[6]=usbvision_device_data[usbvision->DevModel].Y_Offset & 0xff; |
2102 | value[7]=(usbvision_device_data[usbvision->DevModel].Y_Offset & 0x0300) >> 8; | 2116 | value[7]=(usbvision_device_data[usbvision->DevModel].Y_Offset & 0x0300) >> 8; |
2103 | } | 2117 | } |
2104 | 2118 | ||
2119 | if (adjust_Y_Offset != -1) { | ||
2120 | value[6] = adjust_Y_Offset & 0xff; | ||
2121 | value[7] = (adjust_Y_Offset & 0x0300) >> 8; | ||
2122 | } | ||
2123 | |||
2105 | rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), | 2124 | rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), |
2106 | USBVISION_OP_CODE, /* USBVISION specific code */ | 2125 | USBVISION_OP_CODE, /* USBVISION specific code */ |
2107 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, 0, | 2126 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, 0, |