aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca
diff options
context:
space:
mode:
authorJose Alberto Reguero <jareguero@telefonica.net>2011-12-15 13:54:35 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-06 05:51:02 -0500
commit965b37a477915b75ec09cd38d077d0eee9e71abf (patch)
treeae101e73fbee2fbd6d3aede47619f16c2a08f371 /drivers/media/video/gspca
parent2a5fc873d6a1976b7ed47f074fc46abb9f822e32 (diff)
[media] gspca - ov534_9: New sensor ov5621 and webcam 05a9:1550
This path add support to "OmniVision Technologies, Inc. VEHO Filmscanner". Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r--drivers/media/video/gspca/ov534_9.c141
1 files changed, 140 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/ov534_9.c b/drivers/media/video/gspca/ov534_9.c
index b3b1ea60a841..b50c7a3fabfb 100644
--- a/drivers/media/video/gspca/ov534_9.c
+++ b/drivers/media/video/gspca/ov534_9.c
@@ -71,6 +71,7 @@ struct sd {
71enum sensors { 71enum sensors {
72 SENSOR_OV965x, /* ov9657 */ 72 SENSOR_OV965x, /* ov9657 */
73 SENSOR_OV971x, /* ov9712 */ 73 SENSOR_OV971x, /* ov9712 */
74 SENSOR_OV562x, /* ov5621 */
74 NSENSORS 75 NSENSORS
75}; 76};
76 77
@@ -207,6 +208,14 @@ static const struct v4l2_pix_format ov971x_mode[] = {
207 } 208 }
208}; 209};
209 210
211static const struct v4l2_pix_format ov562x_mode[] = {
212 {2592, 1680, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
213 .bytesperline = 2592,
214 .sizeimage = 2592 * 1680,
215 .colorspace = V4L2_COLORSPACE_SRGB
216 }
217};
218
210static const u8 bridge_init[][2] = { 219static const u8 bridge_init[][2] = {
211 {0x88, 0xf8}, 220 {0x88, 0xf8},
212 {0x89, 0xff}, 221 {0x89, 0xff},
@@ -830,6 +839,124 @@ static const u8 ov965x_start_2_sxga[][2] = {
830 {0xa3, 0x41}, /* bd60 */ 839 {0xa3, 0x41}, /* bd60 */
831}; 840};
832 841
842static const u8 ov562x_init[][2] = {
843 {0x88, 0x20},
844 {0x89, 0x0a},
845 {0x8a, 0x90},
846 {0x8b, 0x06},
847 {0x8c, 0x01},
848 {0x8d, 0x10},
849 {0x1c, 0x00},
850 {0x1d, 0x48},
851 {0x1d, 0x00},
852 {0x1d, 0xff},
853 {0x1c, 0x0a},
854 {0x1d, 0x2e},
855 {0x1d, 0x1e},
856};
857
858static const u8 ov562x_init_2[][2] = {
859 {0x12, 0x80},
860 {0x11, 0x41},
861 {0x13, 0x00},
862 {0x10, 0x1e},
863 {0x3b, 0x07},
864 {0x5b, 0x40},
865 {0x39, 0x07},
866 {0x53, 0x02},
867 {0x54, 0x60},
868 {0x04, 0x20},
869 {0x27, 0x04},
870 {0x3d, 0x40},
871 {0x36, 0x00},
872 {0xc5, 0x04},
873 {0x4e, 0x00},
874 {0x4f, 0x93},
875 {0x50, 0x7b},
876 {0xca, 0x0c},
877 {0xcb, 0x0f},
878 {0x39, 0x07},
879 {0x4a, 0x10},
880 {0x3e, 0x0a},
881 {0x3d, 0x00},
882 {0x0c, 0x38},
883 {0x38, 0x90},
884 {0x46, 0x30},
885 {0x4f, 0x93},
886 {0x50, 0x7b},
887 {0xab, 0x00},
888 {0xca, 0x0c},
889 {0xcb, 0x0f},
890 {0x37, 0x02},
891 {0x44, 0x48},
892 {0x8d, 0x44},
893 {0x2a, 0x00},
894 {0x2b, 0x00},
895 {0x32, 0x00},
896 {0x38, 0x90},
897 {0x53, 0x02},
898 {0x54, 0x60},
899 {0x12, 0x00},
900 {0x17, 0x12},
901 {0x18, 0xb4},
902 {0x19, 0x0c},
903 {0x1a, 0xf4},
904 {0x03, 0x4a},
905 {0x89, 0x20},
906 {0x83, 0x80},
907 {0xb7, 0x9d},
908 {0xb6, 0x11},
909 {0xb5, 0x55},
910 {0xb4, 0x00},
911 {0xa9, 0xf0},
912 {0xa8, 0x0a},
913 {0xb8, 0xf0},
914 {0xb9, 0xf0},
915 {0xba, 0xf0},
916 {0x81, 0x07},
917 {0x63, 0x44},
918 {0x13, 0xc7},
919 {0x14, 0x60},
920 {0x33, 0x75},
921 {0x2c, 0x00},
922 {0x09, 0x00},
923 {0x35, 0x30},
924 {0x27, 0x04},
925 {0x3c, 0x07},
926 {0x3a, 0x0a},
927 {0x3b, 0x07},
928 {0x01, 0x40},
929 {0x02, 0x40},
930 {0x16, 0x40},
931 {0x52, 0xb0},
932 {0x51, 0x83},
933 {0x21, 0xbb},
934 {0x22, 0x10},
935 {0x23, 0x03},
936 {0x35, 0x38},
937 {0x20, 0x90},
938 {0x28, 0x30},
939 {0x73, 0xe1},
940 {0x6c, 0x00},
941 {0x6d, 0x80},
942 {0x6e, 0x00},
943 {0x70, 0x04},
944 {0x71, 0x00},
945 {0x8d, 0x04},
946 {0x64, 0x00},
947 {0x65, 0x00},
948 {0x66, 0x00},
949 {0x67, 0x00},
950 {0x68, 0x00},
951 {0x69, 0x00},
952 {0x6a, 0x00},
953 {0x6b, 0x00},
954 {0x71, 0x94},
955 {0x74, 0x20},
956 {0x80, 0x09},
957 {0x85, 0xc0},
958};
959
833static void reg_w_i(struct gspca_dev *gspca_dev, u16 reg, u8 val) 960static void reg_w_i(struct gspca_dev *gspca_dev, u16 reg, u8 val)
834{ 961{
835 struct usb_device *udev = gspca_dev->dev; 962 struct usb_device *udev = gspca_dev->dev;
@@ -1210,6 +1337,17 @@ static int sd_init(struct gspca_dev *gspca_dev)
1210 reg_w(gspca_dev, 0x56, 0x1f); 1337 reg_w(gspca_dev, 0x56, 0x1f);
1211 else 1338 else
1212 reg_w(gspca_dev, 0x56, 0x17); 1339 reg_w(gspca_dev, 0x56, 0x17);
1340 } else if ((sensor_id & 0xfff0) == 0x5620) {
1341 sd->sensor = SENSOR_OV562x;
1342
1343 gspca_dev->cam.cam_mode = ov562x_mode;
1344 gspca_dev->cam.nmodes = ARRAY_SIZE(ov562x_mode);
1345
1346 reg_w_array(gspca_dev, ov562x_init,
1347 ARRAY_SIZE(ov562x_init));
1348 sccb_w_array(gspca_dev, ov562x_init_2,
1349 ARRAY_SIZE(ov562x_init_2));
1350 reg_w(gspca_dev, 0xe0, 0x00);
1213 } else { 1351 } else {
1214 err("Unknown sensor %04x", sensor_id); 1352 err("Unknown sensor %04x", sensor_id);
1215 return -EINVAL; 1353 return -EINVAL;
@@ -1222,7 +1360,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
1222{ 1360{
1223 struct sd *sd = (struct sd *) gspca_dev; 1361 struct sd *sd = (struct sd *) gspca_dev;
1224 1362
1225 if (sd->sensor == SENSOR_OV971x) 1363 if (sd->sensor == SENSOR_OV971x || sd->sensor == SENSOR_OV562x)
1226 return gspca_dev->usb_err; 1364 return gspca_dev->usb_err;
1227 switch (gspca_dev->curr_mode) { 1365 switch (gspca_dev->curr_mode) {
1228 case QVGA_MODE: /* 320x240 */ 1366 case QVGA_MODE: /* 320x240 */
@@ -1409,6 +1547,7 @@ static const struct sd_desc sd_desc = {
1409static const struct usb_device_id device_table[] = { 1547static const struct usb_device_id device_table[] = {
1410 {USB_DEVICE(0x05a9, 0x8065)}, 1548 {USB_DEVICE(0x05a9, 0x8065)},
1411 {USB_DEVICE(0x06f8, 0x3003)}, 1549 {USB_DEVICE(0x06f8, 0x3003)},
1550 {USB_DEVICE(0x05a9, 0x1550)},
1412 {} 1551 {}
1413}; 1552};
1414 1553