pac7302.c (0d4a42f6bd298e826620585e766a154ab460617a) | pac7302.c (977ba3b1b73f24fae2d0c8bd59d7a4696f1e0ccc) |
---|---|
1/* 2 * Pixart PAC7302 driver 3 * 4 * Copyright (C) 2008-2012 Jean-Francois Moine <http://moinejf.free.fr> 5 * Copyright (C) 2005 Thomas Kaiser thomas@kaiser-linux.li 6 * 7 * Separated from Pixart PAC7311 library by Márton Németh 8 * Camera button input handling by Márton Németh <nm127@freemail.hu> --- 330 unchanged lines hidden (view full) --- 339 len = *seq++; 340 switch (len) { 341 case END_OF_SEQUENCE: 342 return; 343 case LOAD_PAGE3: 344 reg_w_page(gspca_dev, page3, page3_len); 345 break; 346 default: | 1/* 2 * Pixart PAC7302 driver 3 * 4 * Copyright (C) 2008-2012 Jean-Francois Moine <http://moinejf.free.fr> 5 * Copyright (C) 2005 Thomas Kaiser thomas@kaiser-linux.li 6 * 7 * Separated from Pixart PAC7311 library by Márton Németh 8 * Camera button input handling by Márton Németh <nm127@freemail.hu> --- 330 unchanged lines hidden (view full) --- 339 len = *seq++; 340 switch (len) { 341 case END_OF_SEQUENCE: 342 return; 343 case LOAD_PAGE3: 344 reg_w_page(gspca_dev, page3, page3_len); 345 break; 346 default: |
347#ifdef GSPCA_DEBUG | |
348 if (len > USB_BUF_SZ) { | 347 if (len > USB_BUF_SZ) { |
349 PDEBUG(D_ERR|D_STREAM, 350 "Incorrect variable sequence"); | 348 PERR("Incorrect variable sequence"); |
351 return; 352 } | 349 return; 350 } |
353#endif | |
354 while (len > 0) { 355 if (len < 8) { 356 reg_w_buf(gspca_dev, 357 index, seq, len); 358 seq += len; 359 break; 360 } 361 reg_w_buf(gspca_dev, index, seq, 8); --- 428 unchanged lines hidden (view full) --- 790static void sd_pkt_scan(struct gspca_dev *gspca_dev, 791 u8 *data, /* isoc packet */ 792 int len) /* iso packet length */ 793{ 794 struct sd *sd = (struct sd *) gspca_dev; 795 u8 *image; 796 u8 *sof; 797 | 351 while (len > 0) { 352 if (len < 8) { 353 reg_w_buf(gspca_dev, 354 index, seq, len); 355 seq += len; 356 break; 357 } 358 reg_w_buf(gspca_dev, index, seq, 8); --- 428 unchanged lines hidden (view full) --- 787static void sd_pkt_scan(struct gspca_dev *gspca_dev, 788 u8 *data, /* isoc packet */ 789 int len) /* iso packet length */ 790{ 791 struct sd *sd = (struct sd *) gspca_dev; 792 u8 *image; 793 u8 *sof; 794 |
798 sof = pac_find_sof(&sd->sof_read, data, len); | 795 sof = pac_find_sof(gspca_dev, &sd->sof_read, data, len); |
799 if (sof) { 800 int n, lum_offset, footer_length; 801 802 /* 803 * 6 bytes after the FF D9 EOF marker a number of lumination 804 * bytes are send corresponding to different parts of the 805 * image, the 14th and 15th byte after the EOF seem to 806 * correspond to the center of the image. --- 31 unchanged lines hidden (view full) --- 838 gspca_frame_add(gspca_dev, FIRST_PACKET, 839 jpeg_header, sizeof jpeg_header); 840 } 841 gspca_frame_add(gspca_dev, INTER_PACKET, data, len); 842} 843 844#ifdef CONFIG_VIDEO_ADV_DEBUG 845static int sd_dbg_s_register(struct gspca_dev *gspca_dev, | 796 if (sof) { 797 int n, lum_offset, footer_length; 798 799 /* 800 * 6 bytes after the FF D9 EOF marker a number of lumination 801 * bytes are send corresponding to different parts of the 802 * image, the 14th and 15th byte after the EOF seem to 803 * correspond to the center of the image. --- 31 unchanged lines hidden (view full) --- 835 gspca_frame_add(gspca_dev, FIRST_PACKET, 836 jpeg_header, sizeof jpeg_header); 837 } 838 gspca_frame_add(gspca_dev, INTER_PACKET, data, len); 839} 840 841#ifdef CONFIG_VIDEO_ADV_DEBUG 842static int sd_dbg_s_register(struct gspca_dev *gspca_dev, |
846 struct v4l2_dbg_register *reg) | 843 const struct v4l2_dbg_register *reg) |
847{ 848 u8 index; 849 u8 value; 850 851 /* 852 * reg->reg: bit0..15: reserved for register index (wIndex is 16bit 853 * long on the USB bus) 854 */ --- 131 unchanged lines hidden --- | 844{ 845 u8 index; 846 u8 value; 847 848 /* 849 * reg->reg: bit0..15: reserved for register index (wIndex is 16bit 850 * long on the USB bus) 851 */ --- 131 unchanged lines hidden --- |