aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans de Goede <j.w.r.degoede@hhs.nl>2008-09-03 16:12:14 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 17:37:25 -0400
commit221e7dbe55fe515ff786142bac64b507fa9f26de (patch)
tree4e87e92a3f824ecf8f579c17601894ab87d6cdc9 /drivers/media
parent327c4abf74a4426676df6c359b2a3dea2a5d126e (diff)
V4L/DVB (8813): gspca: Adjust SOF detection for pac73xx.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/pac7311.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c
index bed04cc9a584..3c5142852f27 100644
--- a/drivers/media/video/gspca/pac7311.c
+++ b/drivers/media/video/gspca/pac7311.c
@@ -70,7 +70,6 @@ struct sd {
70#define SENSOR_PAC7311 1 70#define SENSOR_PAC7311 1
71 71
72 u8 sof_read; 72 u8 sof_read;
73 u8 header_read;
74 u8 autogain_ignore_frames; 73 u8 autogain_ignore_frames;
75 74
76 atomic_t avg_lum; 75 atomic_t avg_lum;
@@ -709,8 +708,6 @@ static const unsigned char pac7311_jpeg_header2[] = {
709/* Include pac common sof detection functions */ 708/* Include pac common sof detection functions */
710#include "pac_common.h" 709#include "pac_common.h"
711 710
712#define HEADER_LENGTH 2
713
714/* this function is run at interrupt level */ 711/* this function is run at interrupt level */
715static void sd_pkt_scan(struct gspca_dev *gspca_dev, 712static void sd_pkt_scan(struct gspca_dev *gspca_dev,
716 struct gspca_frame *frame, /* target */ 713 struct gspca_frame *frame, /* target */
@@ -784,22 +781,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
784 gspca_frame_add(gspca_dev, INTER_PACKET, frame, tmpbuf, 4); 781 gspca_frame_add(gspca_dev, INTER_PACKET, frame, tmpbuf, 4);
785 gspca_frame_add(gspca_dev, INTER_PACKET, frame, 782 gspca_frame_add(gspca_dev, INTER_PACKET, frame,
786 pac7311_jpeg_header2, sizeof(pac7311_jpeg_header2)); 783 pac7311_jpeg_header2, sizeof(pac7311_jpeg_header2));
787
788 sd->header_read = 0;
789 } 784 }
790
791 if (sd->header_read < HEADER_LENGTH) {
792 /* skip the variable part of the sof header */
793 int needed = HEADER_LENGTH - sd->header_read;
794 if (len <= needed) {
795 sd->header_read += len;
796 return;
797 }
798 data += needed;
799 len -= needed;
800 sd->header_read = HEADER_LENGTH;
801 }
802
803 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); 785 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
804} 786}
805 787