summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvision/usbvision-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-01-09 22:39:42 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-09 22:39:42 -0200
commitbd7bb69be657ca3ab2bcb1a327ab33655077aa3b (patch)
treee9760d779572d694589127558f9743dd2e713c17 /linux/drivers/media/video/usbvision/usbvision-core.c
parentd87e760250d55cf7fc00d4c7724d62451ba6609e (diff)
parent8e53f8116552eb5c0d207265d210c76040e2dbea (diff)
downloadmediapointer-dvb-s2-bd7bb69be657ca3ab2bcb1a327ab33655077aa3b.tar.gz
mediapointer-dvb-s2-bd7bb69be657ca3ab2bcb1a327ab33655077aa3b.tar.bz2
merge: http://linuxtv.org/hg/~tmerle/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/usbvision/usbvision-core.c')
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-core.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c
index 96fcd5987..945616613 100644
--- a/linux/drivers/media/video/usbvision/usbvision-core.c
+++ b/linux/drivers/media/video/usbvision/usbvision-core.c
@@ -75,6 +75,15 @@ static int SwitchSVideoInput = 0; // To help people with Black and White outpu
module_param(SwitchSVideoInput, int, 0444);
MODULE_PARM_DESC(SwitchSVideoInput, " Set the S-Video input. Some cables and input device are wired differently. Default: 0 (Off)");
+static unsigned int adjust_X_Offset = -1;
+module_param(adjust_X_Offset, int, 0644);
+MODULE_PARM_DESC(adjust_X_Offset, "adjust X offset display [core]");
+
+static unsigned int adjust_Y_Offset = -1;
+module_param(adjust_Y_Offset, int, 0644);
+MODULE_PARM_DESC(adjust_Y_Offset, "adjust Y offset display [core]");
+
+
#define ENABLE_HEXDUMP 0 /* Enable if you need it */
@@ -2159,11 +2168,21 @@ int usbvision_set_input(struct usb_usbvision *usbvision)
value[5]=(usbvision_device_data[usbvision->DevModel].X_Offset & 0x0300) >> 8;
}
+ if (adjust_X_Offset != -1) {
+ value[4] = adjust_X_Offset & 0xff;
+ value[5] = (adjust_X_Offset & 0x0300) >> 8;
+ }
+
if (usbvision_device_data[usbvision->DevModel].Y_Offset >= 0) {
value[6]=usbvision_device_data[usbvision->DevModel].Y_Offset & 0xff;
value[7]=(usbvision_device_data[usbvision->DevModel].Y_Offset & 0x0300) >> 8;
}
+ if (adjust_Y_Offset != -1) {
+ value[6] = adjust_Y_Offset & 0xff;
+ value[7] = (adjust_Y_Offset & 0x0300) >> 8;
+ }
+
rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1),
USBVISION_OP_CODE, /* USBVISION specific code */
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, 0,