summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-09-02 14:55:16 +0200
committerhans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain>2009-09-02 14:55:16 +0200
commit187a80bf44bebae8fd3a7ff804ecc523aaf6f3ea (patch)
treed869392d023d3ff472716f86dd5c20e341d1a49e /linux
parent36dfe1e93c14212a6fd2939344018445f132789e (diff)
downloadmediapointer-dvb-s2-187a80bf44bebae8fd3a7ff804ecc523aaf6f3ea.tar.gz
mediapointer-dvb-s2-187a80bf44bebae8fd3a7ff804ecc523aaf6f3ea.tar.bz2
gspca_mr97310a: Allow overriding of detected sensor type
From: Hans de Goede <hdegoede@redhat.com> gspca_mr97310a: Allow overriding of detected sensor type Priority: normal Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/gspca/mr97310a.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/video/gspca/mr97310a.c b/linux/drivers/media/video/gspca/mr97310a.c
index 8190a1d4d..169cdb65c 100644
--- a/linux/drivers/media/video/gspca/mr97310a.c
+++ b/linux/drivers/media/video/gspca/mr97310a.c
@@ -57,6 +57,11 @@ MODULE_AUTHOR("Kyle Guinn <elyk03@gmail.com>,"
MODULE_DESCRIPTION("GSPCA/Mars-Semi MR97310A USB Camera Driver");
MODULE_LICENSE("GPL");
+/* global parameters */
+int force_sensor_type = -1;
+module_param(force_sensor_type, int, 0644);
+MODULE_PARM_DESC(force_sensor_type, "Force sensor type (-1 (auto), 0 or 1)");
+
/* specific webcam descriptor */
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
@@ -401,6 +406,12 @@ static int sd_config(struct gspca_dev *gspca_dev,
PDEBUG(D_PROBE, "MR97310A CIF camera detected, sensor: %d",
sd->sensor_type);
+ if (force_sensor_type != -1) {
+ sd->sensor_type = !! force_sensor_type;
+ PDEBUG(D_PROBE, "Forcing sensor type to: %d",
+ sd->sensor_type);
+ }
+
if (sd->sensor_type == 0)
gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX);
} else {
@@ -606,6 +617,12 @@ static int start_vga_cam(struct gspca_dev *gspca_dev)
msleep(200);
}
+ if (force_sensor_type != -1) {
+ sd->sensor_type = !! force_sensor_type;
+ PDEBUG(D_PROBE, "Forcing sensor type to: %d",
+ sd->sensor_type);
+ }
+
/*
* Known VGA cameras.
* This test is only run if the previous test returned 0x30, but