diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-06 09:27:19 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-07-06 09:27:19 +0200 |
commit | 1cc2bcdebab8f8ecb9e95fb82ca21e0e90a48006 (patch) | |
tree | 3963a8f6cb05a38d99bad8da878c1f5a02ebdb51 | |
parent | 849d243de76543de421f8fe7632e9cd69c853977 (diff) | |
download | mediapointer-dvb-s2-1cc2bcdebab8f8ecb9e95fb82ca21e0e90a48006.tar.gz mediapointer-dvb-s2-1cc2bcdebab8f8ecb9e95fb82ca21e0e90a48006.tar.bz2 |
gspca: Size of frame header adjusted according to sn9c10x in sonixb.
From: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-rw-r--r-- | linux/drivers/media/video/gspca/sonixb.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/linux/drivers/media/video/gspca/sonixb.c b/linux/drivers/media/video/gspca/sonixb.c index 773d92e60..3272593c5 100644 --- a/linux/drivers/media/video/gspca/sonixb.c +++ b/linux/drivers/media/video/gspca/sonixb.c @@ -38,6 +38,7 @@ struct sd { unsigned char brightness; unsigned char contrast; + unsigned char fr_h_sz; /* size of frame header */ char sensor; /* Type of image sensor chip */ #define SENSOR_HV7131R 0 #define SENSOR_OV6650 1 @@ -518,6 +519,7 @@ static int sd_config(struct gspca_dev *gspca_dev, __u16 product; int sif = 0; + sd->fr_h_sz = 12; /* default size of the frame header */ /* vendor = id->idVendor; */ product = id->idProduct; /* switch (vendor) { */ @@ -546,6 +548,7 @@ static int sd_config(struct gspca_dev *gspca_dev, break; case 0x60b0: /* SN9C103 */ sd->sensor = SENSOR_OV7630_3; + sd->fr_h_sz = 18; /* size of frame header */ break; case 0x6024: /* SN9C102 */ case 0x6025: /* SN9C102 */ @@ -559,6 +562,7 @@ static int sd_config(struct gspca_dev *gspca_dev, break; case 0x60af: /* SN9C103 */ sd->sensor = SENSOR_PAS202; + sd->fr_h_sz = 18; /* size of frame header (?) */ break; } /* break; */ @@ -783,6 +787,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, unsigned char *data, /* isoc packet */ int len) /* iso packet length */ { + struct sd *sd; int i; if (len > 6 && len < 24) { @@ -795,8 +800,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, && data[5 + i] == 0x96) { /* start of frame */ frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0); - data += i + 12; - len -= i + 12; + sd = (struct sd *) gspca_dev; + data += i + sd->fr_h_sz; + len -= i + sd->fr_h_sz; gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, len); return; |