Commit 6a7eba24 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mauro Carvalho Chehab

V4L/DVB (8157): gspca: all subdrivers

- remaning subdrivers added
- remove the decoding helper and some specific frame decodings
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent d43fa32f
This diff is collapsed.
...@@ -117,6 +117,7 @@ obj-$(CONFIG_USB_SN9C102) += sn9c102/ ...@@ -117,6 +117,7 @@ obj-$(CONFIG_USB_SN9C102) += sn9c102/
obj-$(CONFIG_USB_ET61X251) += et61x251/ obj-$(CONFIG_USB_ET61X251) += et61x251/
obj-$(CONFIG_USB_PWC) += pwc/ obj-$(CONFIG_USB_PWC) += pwc/
obj-$(CONFIG_USB_ZC0301) += zc0301/ obj-$(CONFIG_USB_ZC0301) += zc0301/
obj-$(CONFIG_USB_GSPCA) += gspca/
obj-$(CONFIG_USB_IBMCAM) += usbvideo/ obj-$(CONFIG_USB_IBMCAM) += usbvideo/
obj-$(CONFIG_USB_KONICAWC) += usbvideo/ obj-$(CONFIG_USB_KONICAWC) += usbvideo/
......
...@@ -2,7 +2,7 @@ config USB_GSPCA ...@@ -2,7 +2,7 @@ config USB_GSPCA
tristate "USB GSPCA driver" tristate "USB GSPCA driver"
depends on VIDEO_V4L2 depends on VIDEO_V4L2
---help--- ---help---
Say Y here if you want support for various USB cameras. Say Y here if you want support for various USB webcams.
See <file:Documentation/video4linux/gspca.txt> for more info. See <file:Documentation/video4linux/gspca.txt> for more info.
......
obj-$(CONFIG_GSPCA) += gspca_main.o \ obj-$(CONFIG_USB_GSPCA) += gspca_main.o \
gspca_pac207.o gspca_stk014.o gspca_zc3xx.o gspca_conex.o gspca_etoms.o gspca_mars.o \
gspca_ov519.o gspca_pac207.o gspca_pac7311.o \
gspca_sonixb.o gspca_sonixj.o gspca_spca500.o gspca_spca501.o \
gspca_spca505.o gspca_spca506.o gspca_spca508.o gspca_spca561.o \
gspca_sunplus.o gspca_stk014.o gspca_t613.o gspca_tv8532.o \
gspca_vc032x.o gspca_zc3xx.o
gspca_main-objs := gspca.o gspca_main-objs := gspca.o
gspca_conex-objs := conex.o
gspca_etoms-objs := etoms.o
gspca_mars-objs := mars.o
gspca_ov519-objs := ov519.o
gspca_pac207-objs := pac207.o gspca_pac207-objs := pac207.o
gspca_pac7311-objs := pac7311.o
gspca_sonixb-objs := sonixb.o
gspca_sonixj-objs := sonixj.o
gspca_spca500-objs := spca500.o
gspca_spca501-objs := spca501.o
gspca_spca505-objs := spca505.o
gspca_spca506-objs := spca506.o
gspca_spca508-objs := spca508.o
gspca_spca561-objs := spca561.o
gspca_stk014-objs := stk014.o gspca_stk014-objs := stk014.o
gspca_sunplus-objs := sunplus.o
gspca_t613-objs := t613.o
gspca_tv8532-objs := tv8532.o
gspca_vc032x-objs := vc032x.o
gspca_zc3xx-objs := zc3xx.o gspca_zc3xx-objs := zc3xx.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -9,7 +9,26 @@ ...@@ -9,7 +9,26 @@
#include <media/v4l2-common.h> #include <media/v4l2-common.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#ifdef GSPCA_DEBUG /* values in 2.6.27 */
#ifndef V4L2_PIX_FMT_SPCA501
#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1')
#endif
#ifndef V4L2_PIX_FMT_SPCA561
#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1')
#endif
/* values in 2.6.26 */
#ifndef V4L2_CID_POWER_LINE_FREQUENCY
#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
#endif
#ifndef V4L2_CID_WHITE_BALANCE_TEMPERATURE
#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE + 26)
#endif
#ifndef V4L2_CID_SHARPNESS
#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
#endif
#ifdef VIDEO_ADV_DEBUG
/* GSPCA our debug messages */ /* GSPCA our debug messages */
extern int gspca_debug; extern int gspca_debug;
#define PDEBUG(level, fmt, args...) \ #define PDEBUG(level, fmt, args...) \
...@@ -47,7 +66,7 @@ extern int gspca_debug; ...@@ -47,7 +66,7 @@ extern int gspca_debug;
#define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */ #define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */
/* ISOC transfers */ /* ISOC transfers */
#define MAX_NURBS 32 /* max number of URBs (read & userptr) */ #define MAX_NURBS 16 /* max number of URBs */
#define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */ #define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */
#define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */ #define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */
...@@ -79,7 +98,7 @@ typedef int (*cam_qmnu_op) (struct gspca_dev *, ...@@ -79,7 +98,7 @@ typedef int (*cam_qmnu_op) (struct gspca_dev *,
struct v4l2_querymenu *); struct v4l2_querymenu *);
typedef void (*cam_pkt_op) (struct gspca_dev *gspca_dev, typedef void (*cam_pkt_op) (struct gspca_dev *gspca_dev,
struct gspca_frame *frame, struct gspca_frame *frame,
unsigned char *data, __u8 *data,
int len); int len);
struct ctrl { struct ctrl {
...@@ -116,8 +135,8 @@ struct sd_desc { ...@@ -116,8 +135,8 @@ struct sd_desc {
#define LAST_PACKET 3 #define LAST_PACKET 3
struct gspca_frame { struct gspca_frame {
unsigned char *data; /* frame buffer */ __u8 *data; /* frame buffer */
unsigned char *data_end; /* end of frame while filling */ __u8 *data_end; /* end of frame while filling */
int vma_use_count; int vma_use_count;
struct v4l2_buffer v4l2_buf; struct v4l2_buffer v4l2_buf;
}; };
...@@ -135,7 +154,7 @@ struct gspca_dev { ...@@ -135,7 +154,7 @@ struct gspca_dev {
__u8 *frbuf; /* buffer for nframes */ __u8 *frbuf; /* buffer for nframes */
struct gspca_frame frame[GSPCA_MAX_FRAMES]; struct gspca_frame frame[GSPCA_MAX_FRAMES];
unsigned int frsz; /* frame size */ __u32 frsz; /* frame size */
char nframes; /* number of frames */ char nframes; /* number of frames */
char fr_i; /* frame being filled */ char fr_i; /* frame being filled */
char fr_q; /* next frame to queue */ char fr_q; /* next frame to queue */
...@@ -145,10 +164,10 @@ struct gspca_dev { ...@@ -145,10 +164,10 @@ struct gspca_dev {
__u8 iface; /* USB interface number */ __u8 iface; /* USB interface number */
__u8 alt; /* USB alternate setting */ __u8 alt; /* USB alternate setting */
unsigned char curr_mode; /* current camera mode */ __u8 curr_mode; /* current camera mode */
__u32 pixfmt; /* current mode parameters */ __u32 pixfmt; /* current mode parameters */
short width; __u16 width;
short height; __u16 height;
atomic_t nevent; /* number of frames done */ atomic_t nevent; /* number of frames done */
wait_queue_head_t wq; /* wait queue */ wait_queue_head_t wq; /* wait queue */
...@@ -176,6 +195,6 @@ void gspca_disconnect(struct usb_interface *intf); ...@@ -176,6 +195,6 @@ void gspca_disconnect(struct usb_interface *intf);
struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev, struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
int packet_type, int packet_type,
struct gspca_frame *frame, struct gspca_frame *frame,
unsigned char *data, __u8 *data,
int len); int len);
#endif /* GSPCAV2_H */ #endif /* GSPCAV2_H */
This diff is collapsed.
This diff is collapsed.
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
#include "gspca.h" #include "gspca.h"
#define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 2, 15) #define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 0)
static const char version[] = "0.2.15"; static const char version[] = "2.1.0";
MODULE_AUTHOR("Hans de Goede <j.w.r.degoede@hhs.nl>"); MODULE_AUTHOR("Hans de Goede <j.w.r.degoede@hhs.nl>");
MODULE_DESCRIPTION("Pixart PAC207"); MODULE_DESCRIPTION("Pixart PAC207");
...@@ -297,7 +297,6 @@ static int sd_open(struct gspca_dev *gspca_dev) ...@@ -297,7 +297,6 @@ static int sd_open(struct gspca_dev *gspca_dev)
struct sd *sd = (struct sd *) gspca_dev; struct sd *sd = (struct sd *) gspca_dev;
sd->autogain = 1; sd->autogain = 1;
return 0; return 0;
} }
...@@ -338,7 +337,7 @@ static void sd_start(struct gspca_dev *gspca_dev) ...@@ -338,7 +337,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
pac207_write_reg(gspca_dev, 0x13, 0x01); /* Bit 0, auto clear */ pac207_write_reg(gspca_dev, 0x13, 0x01); /* Bit 0, auto clear */
pac207_write_reg(gspca_dev, 0x1c, 0x01); /* not documented */ pac207_write_reg(gspca_dev, 0x1c, 0x01); /* not documented */
udelay(1000); /* taken from gspca */ msleep(10);
pac207_write_reg(gspca_dev, 0x40, 0x01); /* Start ISO pipe */ pac207_write_reg(gspca_dev, 0x40, 0x01); /* Start ISO pipe */
sd->sof_read = 0; sd->sof_read = 0;
...@@ -743,8 +742,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, ...@@ -743,8 +742,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
PDEBUG(D_STREAM, "Incomplete frame"); PDEBUG(D_STREAM, "Incomplete frame");
} }
pac207_decode_frame_init(gspca_dev); pac207_decode_frame_init(gspca_dev);
gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL, gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL, 0);
0);
len -= sof - data; len -= sof - data;
data = sof; data = sof;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -324,6 +324,8 @@ struct v4l2_pix_format ...@@ -324,6 +324,8 @@ struct v4l2_pix_format
#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */
#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */
#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */
#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S','5','0','1') /* YUYV per line */
#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S','5','6','1') /* compressed BGGR bayer */
/* /*
* F O R M A T E N U M E R A T I O N * F O R M A T E N U M E R A T I O N
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment