Commit 055e3a3a authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging/easycap: replace underscored types with regular once

the underscored types should be used in user space headers only
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1a4cb0fb
...@@ -259,8 +259,8 @@ struct data_buffer { ...@@ -259,8 +259,8 @@ struct data_buffer {
struct list_head list_head; struct list_head list_head;
void *pgo; void *pgo;
void *pto; void *pto;
__u16 kount; u16 kount;
__u16 input; u16 input;
}; };
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
struct data_urb { struct data_urb {
...@@ -271,11 +271,11 @@ struct data_urb { ...@@ -271,11 +271,11 @@ struct data_urb {
}; };
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
struct easycap_standard { struct easycap_standard {
__u16 mask; u16 mask;
struct v4l2_standard v4l2_standard; struct v4l2_standard v4l2_standard;
}; };
struct easycap_format { struct easycap_format {
__u16 mask; u16 mask;
char name[128]; char name[128];
struct v4l2_format v4l2_format; struct v4l2_format v4l2_format;
}; };
...@@ -323,7 +323,7 @@ struct easycap { ...@@ -323,7 +323,7 @@ struct easycap {
#define UPSAMPLE #define UPSAMPLE
#ifdef UPSAMPLE #ifdef UPSAMPLE
__s16 oldaudio; s16 oldaudio;
#endif /*UPSAMPLE*/ #endif /*UPSAMPLE*/
int ilk; int ilk;
...@@ -388,12 +388,12 @@ struct easycap { ...@@ -388,12 +388,12 @@ struct easycap {
struct list_head urb_video_head; struct list_head urb_video_head;
struct list_head *purb_video_head; struct list_head *purb_video_head;
__u8 cache[8]; u8 cache[8];
__u8 *pcache; u8 *pcache;
int video_mt; int video_mt;
int audio_mt; int audio_mt;
long long audio_bytes; long long audio_bytes;
__u32 isequence; u32 isequence;
int vma_many; int vma_many;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -418,7 +418,7 @@ struct easycap { ...@@ -418,7 +418,7 @@ struct easycap {
* IMAGE PROPERTIES * IMAGE PROPERTIES
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
__u32 pixelformat; u32 pixelformat;
int width; int width;
int height; int height;
int bytesperpixel; int bytesperpixel;
...@@ -516,12 +516,12 @@ int submit_video_urbs(struct easycap *); ...@@ -516,12 +516,12 @@ int submit_video_urbs(struct easycap *);
int kill_video_urbs(struct easycap *); int kill_video_urbs(struct easycap *);
int field2frame(struct easycap *); int field2frame(struct easycap *);
int redaub(struct easycap *, void *, void *, int redaub(struct easycap *, void *, void *,
int, int, __u8, __u8, bool); int, int, u8, u8, bool);
void easycap_testcard(struct easycap *, int); void easycap_testcard(struct easycap *, int);
int fillin_formats(void); int fillin_formats(void);
int newinput(struct easycap *, int); int newinput(struct easycap *, int);
int adjust_standard(struct easycap *, v4l2_std_id); int adjust_standard(struct easycap *, v4l2_std_id);
int adjust_format(struct easycap *, __u32, __u32, __u32, int adjust_format(struct easycap *, u32, u32, u32,
int, bool); int, bool);
int adjust_brightness(struct easycap *, int); int adjust_brightness(struct easycap *, int);
int adjust_contrast(struct easycap *, int); int adjust_contrast(struct easycap *, int);
...@@ -551,9 +551,9 @@ int audio_setup(struct easycap *); ...@@ -551,9 +551,9 @@ int audio_setup(struct easycap *);
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int audio_gainget(struct usb_device *); int audio_gainget(struct usb_device *);
int audio_gainset(struct usb_device *, __s8); int audio_gainset(struct usb_device *, s8);
int set_interface(struct usb_device *, __u16); int set_interface(struct usb_device *, u16);
int wakeup_device(struct usb_device *); int wakeup_device(struct usb_device *);
int confirm_resolution(struct usb_device *); int confirm_resolution(struct usb_device *);
int confirm_stream(struct usb_device *); int confirm_stream(struct usb_device *);
...@@ -568,20 +568,20 @@ int merit_saa(struct usb_device *); ...@@ -568,20 +568,20 @@ int merit_saa(struct usb_device *);
int check_vt(struct usb_device *); int check_vt(struct usb_device *);
int select_input(struct usb_device *, int, int); int select_input(struct usb_device *, int, int);
int set_resolution(struct usb_device *, int set_resolution(struct usb_device *,
__u16, __u16, __u16, __u16); u16, u16, u16, u16);
int read_saa(struct usb_device *, __u16); int read_saa(struct usb_device *, u16);
int read_stk(struct usb_device *, __u32); int read_stk(struct usb_device *, u32);
int write_saa(struct usb_device *, __u16, __u16); int write_saa(struct usb_device *, u16, u16);
int wait_i2c(struct usb_device *); int wait_i2c(struct usb_device *);
int write_000(struct usb_device *, __u16, __u16); int write_000(struct usb_device *, u16, u16);
int start_100(struct usb_device *); int start_100(struct usb_device *);
int stop_100(struct usb_device *); int stop_100(struct usb_device *);
int write_300(struct usb_device *); int write_300(struct usb_device *);
int read_vt(struct usb_device *, __u16); int read_vt(struct usb_device *, u16);
int write_vt(struct usb_device *, __u16, __u16); int write_vt(struct usb_device *, u16, u16);
int regset(struct usb_device *, __u16, __u16); int regset(struct usb_device *, u16, u16);
int regget(struct usb_device *, __u16, void *); int regget(struct usb_device *, u16, void *);
int isdongle(struct easycap *); int isdongle(struct easycap *);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
struct signed_div_result { struct signed_div_result {
...@@ -597,7 +597,7 @@ struct signed_div_result { ...@@ -597,7 +597,7 @@ struct signed_div_result {
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#define GET(X, Y, Z) do { \ #define GET(X, Y, Z) do { \
int rc; \ int rc; \
*(Z) = (__u16)0; \ *(Z) = (u16)0; \
rc = regget(X, Y, Z); \ rc = regget(X, Y, Z); \
if (0 > rc) { \ if (0 > rc) { \
JOT(8, ":-(%i\n", __LINE__); return(rc); \ JOT(8, ":-(%i\n", __LINE__); return(rc); \
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
int adjust_standard(struct easycap *peasycap, v4l2_std_id std_id) int adjust_standard(struct easycap *peasycap, v4l2_std_id std_id)
{ {
struct easycap_standard const *peasycap_standard; struct easycap_standard const *peasycap_standard;
__u16 reg, set; u16 reg, set;
int ir, rc, need, k; int ir, rc, need, k;
unsigned int itwas, isnow; unsigned int itwas, isnow;
bool resubmit; bool resubmit;
...@@ -340,14 +340,14 @@ return 0; ...@@ -340,14 +340,14 @@ return 0;
*/ */
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
int adjust_format(struct easycap *peasycap, int adjust_format(struct easycap *peasycap,
__u32 width, __u32 height, __u32 pixelformat, int field, bool try) u32 width, u32 height, u32 pixelformat, int field, bool try)
{ {
struct easycap_format *peasycap_format, *peasycap_best_format; struct easycap_format *peasycap_format, *peasycap_best_format;
__u16 mask; u16 mask;
struct usb_device *p; struct usb_device *p;
int miss, multiplier, best, k; int miss, multiplier, best, k;
char bf[5], fo[32], *pc; char bf[5], fo[32], *pc;
__u32 uc; u32 uc;
bool resubmit; bool resubmit;
if (NULL == peasycap) { if (NULL == peasycap) {
...@@ -855,7 +855,7 @@ return -ENOENT; ...@@ -855,7 +855,7 @@ return -ENOENT;
/*****************************************************************************/ /*****************************************************************************/
int adjust_volume(struct easycap *peasycap, int value) int adjust_volume(struct easycap *peasycap, int value)
{ {
__s8 mood; s8 mood;
int i1; int i1;
if (NULL == peasycap) { if (NULL == peasycap) {
...@@ -883,7 +883,7 @@ while (0xFFFFFFFF != easycap_control[i1].id) { ...@@ -883,7 +883,7 @@ while (0xFFFFFFFF != easycap_control[i1].id) {
peasycap->volume = value; peasycap->volume = value;
mood = (16 > peasycap->volume) ? 16 : mood = (16 > peasycap->volume) ? 16 :
((31 < peasycap->volume) ? 31 : ((31 < peasycap->volume) ? 31 :
(__s8) peasycap->volume); (s8) peasycap->volume);
if (!audio_gainset(peasycap->pusb_device, mood)) { if (!audio_gainset(peasycap->pusb_device, mood)) {
SAM("adjusting volume to 0x%02X\n", mood); SAM("adjusting volume to 0x%02X\n", mood);
return 0; return 0;
...@@ -1093,7 +1093,7 @@ case VIDIOC_QUERYCAP: { ...@@ -1093,7 +1093,7 @@ case VIDIOC_QUERYCAP: {
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_ENUMINPUT: { case VIDIOC_ENUMINPUT: {
struct v4l2_input v4l2_input; struct v4l2_input v4l2_input;
__u32 index; u32 index;
JOM(8, "VIDIOC_ENUMINPUT\n"); JOM(8, "VIDIOC_ENUMINPUT\n");
...@@ -1195,12 +1195,12 @@ case VIDIOC_ENUMINPUT: { ...@@ -1195,12 +1195,12 @@ case VIDIOC_ENUMINPUT: {
} }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_G_INPUT: { case VIDIOC_G_INPUT: {
__u32 index; u32 index;
JOM(8, "VIDIOC_G_INPUT\n"); JOM(8, "VIDIOC_G_INPUT\n");
index = (__u32)peasycap->input; index = (u32)peasycap->input;
JOM(8, "user is told: %i\n", index); JOM(8, "user is told: %i\n", index);
if (0 != copy_to_user((void __user *)arg, &index, sizeof(__u32))) { if (0 != copy_to_user((void __user *)arg, &index, sizeof(u32))) {
mutex_unlock(&easycapdc60_dongle[kd].mutex_video); mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -EFAULT; return -EFAULT;
} }
...@@ -1209,12 +1209,12 @@ case VIDIOC_G_INPUT: { ...@@ -1209,12 +1209,12 @@ case VIDIOC_G_INPUT: {
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_S_INPUT: case VIDIOC_S_INPUT:
{ {
__u32 index; u32 index;
int rc; int rc;
JOM(8, "VIDIOC_S_INPUT\n"); JOM(8, "VIDIOC_S_INPUT\n");
if (0 != copy_from_user(&index, (void __user *)arg, sizeof(__u32))) { if (0 != copy_from_user(&index, (void __user *)arg, sizeof(u32))) {
mutex_unlock(&easycapdc60_dongle[kd].mutex_video); mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
return -EFAULT; return -EFAULT;
} }
...@@ -1465,7 +1465,7 @@ case VIDIOC_S_EXT_CTRLS: { ...@@ -1465,7 +1465,7 @@ case VIDIOC_S_EXT_CTRLS: {
} }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_ENUM_FMT: { case VIDIOC_ENUM_FMT: {
__u32 index; u32 index;
struct v4l2_fmtdesc v4l2_fmtdesc; struct v4l2_fmtdesc v4l2_fmtdesc;
JOM(8, "VIDIOC_ENUM_FMT\n"); JOM(8, "VIDIOC_ENUM_FMT\n");
...@@ -1545,7 +1545,7 @@ case VIDIOC_ENUM_FMT: { ...@@ -1545,7 +1545,7 @@ case VIDIOC_ENUM_FMT: {
*/ */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_ENUM_FRAMESIZES: { case VIDIOC_ENUM_FRAMESIZES: {
__u32 index; u32 index;
struct v4l2_frmsizeenum v4l2_frmsizeenum; struct v4l2_frmsizeenum v4l2_frmsizeenum;
JOM(8, "VIDIOC_ENUM_FRAMESIZES\n"); JOM(8, "VIDIOC_ENUM_FRAMESIZES\n");
...@@ -1558,7 +1558,7 @@ case VIDIOC_ENUM_FRAMESIZES: { ...@@ -1558,7 +1558,7 @@ case VIDIOC_ENUM_FRAMESIZES: {
index = v4l2_frmsizeenum.index; index = v4l2_frmsizeenum.index;
v4l2_frmsizeenum.type = (__u32) V4L2_FRMSIZE_TYPE_DISCRETE; v4l2_frmsizeenum.type = (u32) V4L2_FRMSIZE_TYPE_DISCRETE;
if (true == peasycap->ntsc) { if (true == peasycap->ntsc) {
switch (index) { switch (index) {
...@@ -1681,7 +1681,7 @@ case VIDIOC_ENUM_FRAMESIZES: { ...@@ -1681,7 +1681,7 @@ case VIDIOC_ENUM_FRAMESIZES: {
*/ */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_ENUM_FRAMEINTERVALS: { case VIDIOC_ENUM_FRAMEINTERVALS: {
__u32 index; u32 index;
int denominator; int denominator;
struct v4l2_frmivalenum v4l2_frmivalenum; struct v4l2_frmivalenum v4l2_frmivalenum;
...@@ -1704,7 +1704,7 @@ case VIDIOC_ENUM_FRAMEINTERVALS: { ...@@ -1704,7 +1704,7 @@ case VIDIOC_ENUM_FRAMEINTERVALS: {
index = v4l2_frmivalenum.index; index = v4l2_frmivalenum.index;
v4l2_frmivalenum.type = (__u32) V4L2_FRMIVAL_TYPE_DISCRETE; v4l2_frmivalenum.type = (u32) V4L2_FRMIVAL_TYPE_DISCRETE;
switch (index) { switch (index) {
case 0: { case 0: {
...@@ -1904,7 +1904,7 @@ case VIDIOC_QUERYSTD: { ...@@ -1904,7 +1904,7 @@ case VIDIOC_QUERYSTD: {
case VIDIOC_ENUMSTD: { case VIDIOC_ENUMSTD: {
int last0 = -1, last1 = -1, last2 = -1, last3 = -1; int last0 = -1, last1 = -1, last2 = -1, last3 = -1;
struct v4l2_standard v4l2_standard; struct v4l2_standard v4l2_standard;
__u32 index; u32 index;
struct easycap_standard const *peasycap_standard; struct easycap_standard const *peasycap_standard;
JOM(8, "VIDIOC_ENUMSTD\n"); JOM(8, "VIDIOC_ENUMSTD\n");
...@@ -2054,7 +2054,7 @@ case VIDIOC_REQBUFS: { ...@@ -2054,7 +2054,7 @@ case VIDIOC_REQBUFS: {
} }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_QUERYBUF: { case VIDIOC_QUERYBUF: {
__u32 index; u32 index;
struct v4l2_buffer v4l2_buffer; struct v4l2_buffer v4l2_buffer;
JOM(8, "VIDIOC_QUERYBUF\n"); JOM(8, "VIDIOC_QUERYBUF\n");
...@@ -2167,7 +2167,7 @@ case VIDIOC_DQBUF: ...@@ -2167,7 +2167,7 @@ case VIDIOC_DQBUF:
int i, j; int i, j;
struct v4l2_buffer v4l2_buffer; struct v4l2_buffer v4l2_buffer;
int rcdq; int rcdq;
__u16 input; u16 input;
JOM(8, "VIDIOC_DQBUF\n"); JOM(8, "VIDIOC_DQBUF\n");
......
...@@ -252,7 +252,7 @@ static const struct saa7113config saa7113configNTSC[256] = { ...@@ -252,7 +252,7 @@ static const struct saa7113config saa7113configNTSC[256] = {
int int
confirm_resolution(struct usb_device *p) confirm_resolution(struct usb_device *p)
{ {
__u8 get0, get1, get2, get3, get4, get5, get6, get7; u8 get0, get1, get2, get3, get4, get5, get6, get7;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -293,8 +293,8 @@ return 0; ...@@ -293,8 +293,8 @@ return 0;
int int
confirm_stream(struct usb_device *p) confirm_stream(struct usb_device *p)
{ {
__u16 get2; u16 get2;
__u8 igot; u8 igot;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -356,9 +356,9 @@ return 0; ...@@ -356,9 +356,9 @@ return 0;
} }
/****************************************************************************/ /****************************************************************************/
int int
write_000(struct usb_device *p, __u16 set2, __u16 set0) write_000(struct usb_device *p, u16 set2, u16 set0)
{ {
__u8 igot0, igot2; u8 igot0, igot2;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -370,7 +370,7 @@ return 0; ...@@ -370,7 +370,7 @@ return 0;
} }
/****************************************************************************/ /****************************************************************************/
int int
write_saa(struct usb_device *p, __u16 reg0, __u16 set0) write_saa(struct usb_device *p, u16 reg0, u16 set0)
{ {
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -391,11 +391,11 @@ return wait_i2c(p); ...@@ -391,11 +391,11 @@ return wait_i2c(p);
*/ */
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
int int
write_vt(struct usb_device *p, __u16 reg0, __u16 set0) write_vt(struct usb_device *p, u16 reg0, u16 set0)
{ {
__u8 igot; u8 igot;
__u16 got502, got503; u16 got502, got503;
__u16 set502, set503; u16 set502, set503;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -429,10 +429,10 @@ return 0; ...@@ -429,10 +429,10 @@ return 0;
*/ */
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
int int
read_vt(struct usb_device *p, __u16 reg0) read_vt(struct usb_device *p, u16 reg0)
{ {
__u8 igot; u8 igot;
__u16 got502, got503; u16 got502, got503;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -665,9 +665,9 @@ return 0; ...@@ -665,9 +665,9 @@ return 0;
} }
/****************************************************************************/ /****************************************************************************/
int int
read_saa(struct usb_device *p, __u16 reg0) read_saa(struct usb_device *p, u16 reg0)
{ {
__u8 igot; u8 igot;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -681,9 +681,9 @@ return igot; ...@@ -681,9 +681,9 @@ return igot;
} }
/****************************************************************************/ /****************************************************************************/
int int
read_stk(struct usb_device *p, __u32 reg0) read_stk(struct usb_device *p, u32 reg0)
{ {
__u8 igot; u8 igot;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -815,9 +815,9 @@ return 0; ...@@ -815,9 +815,9 @@ return 0;
/****************************************************************************/ /****************************************************************************/
int int
set_resolution(struct usb_device *p, set_resolution(struct usb_device *p,
__u16 set0, __u16 set1, __u16 set2, __u16 set3) u16 set0, u16 set1, u16 set2, u16 set3)
{ {
__u16 u0x0111, u0x0113, u0x0115, u0x0117; u16 u0x0111, u0x0113, u0x0115, u0x0117;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -841,8 +841,8 @@ return 0; ...@@ -841,8 +841,8 @@ return 0;
int int
start_100(struct usb_device *p) start_100(struct usb_device *p)
{ {
__u16 get116, get117, get0; u16 get116, get117, get0;
__u8 igot116, igot117, igot; u8 igot116, igot117, igot;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -866,8 +866,8 @@ return 0; ...@@ -866,8 +866,8 @@ return 0;
int int
stop_100(struct usb_device *p) stop_100(struct usb_device *p)
{ {
__u16 get0; u16 get0;
__u8 igot; u8 igot;
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
...@@ -885,8 +885,8 @@ return 0; ...@@ -885,8 +885,8 @@ return 0;
int int
wait_i2c(struct usb_device *p) wait_i2c(struct usb_device *p)
{ {
__u16 get0; u16 get0;
__u8 igot; u8 igot;
const int max = 2; const int max = 2;
int k; int k;
...@@ -912,33 +912,33 @@ return -1; ...@@ -912,33 +912,33 @@ return -1;
} }
/****************************************************************************/ /****************************************************************************/
int int
regset(struct usb_device *pusb_device, __u16 index, __u16 value) regset(struct usb_device *pusb_device, u16 index, u16 value)
{ {
__u16 igot; u16 igot;
int rc0, rc1; int rc0, rc1;
if (!pusb_device) if (!pusb_device)
return -ENODEV; return -ENODEV;
rc1 = 0; igot = 0; rc1 = 0; igot = 0;
rc0 = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0), rc0 = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
(__u8)0x01, (u8)0x01,
(__u8)(USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE), (u8)(USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
(__u16)value, (u16)value,
(__u16)index, (u16)index,
NULL, NULL,
(__u16)0, (u16)0,
(int)500); (int)500);
#ifdef NOREADBACK #ifdef NOREADBACK
# #
#else #else
rc1 = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0), rc1 = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0),
(__u8)0x00, (u8)0x00,
(__u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE), (u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
(__u16)0x00, (u16)0x00,
(__u16)index, (u16)index,
(void *)&igot, (void *)&igot,
(__u16)sizeof(__u16), (u16)sizeof(u16),
(int)50000); (int)50000);
igot = 0xFF & igot; igot = 0xFF & igot;
switch (index) { switch (index) {
...@@ -976,19 +976,19 @@ return (0 > rc0) ? rc0 : rc1; ...@@ -976,19 +976,19 @@ return (0 > rc0) ? rc0 : rc1;
} }
/*****************************************************************************/ /*****************************************************************************/
int int
regget(struct usb_device *pusb_device, __u16 index, void *pvoid) regget(struct usb_device *pusb_device, u16 index, void *pvoid)
{ {
int ir; int ir;
if (!pusb_device) if (!pusb_device)
return -ENODEV; return -ENODEV;
ir = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0), ir = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0),
(__u8)0x00, (u8)0x00,
(__u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE), (u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
(__u16)0x00, (u16)0x00,
(__u16)index, (u16)index,
(void *)pvoid, (void *)pvoid,
sizeof(__u8), sizeof(u8),
(int)50000); (int)50000);
return 0xFF & ir; return 0xFF & ir;
} }
...@@ -999,12 +999,12 @@ wakeup_device(struct usb_device *pusb_device) ...@@ -999,12 +999,12 @@ wakeup_device(struct usb_device *pusb_device)
if (!pusb_device) if (!pusb_device)
return -ENODEV; return -ENODEV;
return usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0), return usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
(__u8)USB_REQ_SET_FEATURE, (u8)USB_REQ_SET_FEATURE,
(__u8)(USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE), (u8)(USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE),
USB_DEVICE_REMOTE_WAKEUP, USB_DEVICE_REMOTE_WAKEUP,
(__u16)0, (u16)0,
(void *) NULL, (void *) NULL,
(__u16)0, (u16)0,
(int)50000); (int)50000);
} }
/*****************************************************************************/ /*****************************************************************************/
...@@ -1022,12 +1022,12 @@ int rc, id1, id2; ...@@ -1022,12 +1022,12 @@ int rc, id1, id2;
* TO ENABLE AUDIO THE VALUE 0x0200 MUST BE SENT. * TO ENABLE AUDIO THE VALUE 0x0200 MUST BE SENT.
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
const __u8 request = 0x01; const u8 request = 0x01;
const __u8 requesttype = const u8 requesttype =
(__u8)(USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE); (u8)(USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE);
const __u16 value_unmute = 0x0200; const u16 value_unmute = 0x0200;
const __u16 index = 0x0301; const u16 index = 0x0301;
const __u16 length = 1; const u16 length = 1;
if (NULL == peasycap) if (NULL == peasycap)
return -EFAULT; return -EFAULT;
...@@ -1048,15 +1048,15 @@ JOM(8, "%02X %02X %02X %02X %02X %02X %02X %02X\n", ...@@ -1048,15 +1048,15 @@ JOM(8, "%02X %02X %02X %02X %02X %02X %02X %02X\n",
buffer[0] = 0x01; buffer[0] = 0x01;
rc = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0), rc = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
(__u8)request, (u8)request,
(__u8)requesttype, (u8)requesttype,
(__u16)value_unmute, (u16)value_unmute,
(__u16)index, (u16)index,
(void *)&buffer[0], (void *)&buffer[0],
(__u16)length, (u16)length,
(int)50000); (int)50000);
JOT(8, "0x%02X=buffer\n", *((__u8 *) &buffer[0])); JOT(8, "0x%02X=buffer\n", *((u8 *) &buffer[0]));
if (rc != (int)length) { if (rc != (int)length) {
switch (rc) { switch (rc) {
case -EPIPE: { case -EPIPE: {
...@@ -1175,11 +1175,11 @@ return 0; ...@@ -1175,11 +1175,11 @@ return 0;
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int int
audio_gainset(struct usb_device *pusb_device, __s8 loud) audio_gainset(struct usb_device *pusb_device, s8 loud)
{ {
int igot; int igot;
__u8 tmp; u8 tmp;
__u16 mute; u16 mute;
if (NULL == pusb_device) if (NULL == pusb_device)
return -ENODEV; return -ENODEV;
...@@ -1199,7 +1199,7 @@ if (0 > igot) { ...@@ -1199,7 +1199,7 @@ if (0 > igot) {
mute = 0; mute = 0;
if (16 > loud) if (16 > loud)
tmp = 0x01 | (0x001F & (((__u8)(15 - loud)) << 1)); tmp = 0x01 | (0x001F & (((u8)(15 - loud)) << 1));
else else
tmp = 0; tmp = 0;
...@@ -1231,7 +1231,7 @@ if (0 > igot) { ...@@ -1231,7 +1231,7 @@ if (0 > igot) {
mute = 0; mute = 0;
if (16 <= loud) if (16 <= loud)
tmp = 0x000F & (__u8)(loud - 16); tmp = 0x000F & (u8)(loud - 16);
else else
tmp = 0; tmp = 0;
......
...@@ -1336,14 +1336,14 @@ field2frame(struct easycap *peasycap) ...@@ -1336,14 +1336,14 @@ field2frame(struct easycap *peasycap)
{ {
struct timeval timeval; struct timeval timeval;
long long int above, below; long long int above, below;
__u32 remainder; u32 remainder;
struct signed_div_result sdr; struct signed_div_result sdr;
void *pex, *pad; void *pex, *pad;
int kex, kad, mex, mad, rex, rad, rad2; int kex, kad, mex, mad, rex, rad, rad2;
int c2, c3, w2, w3, cz, wz; int c2, c3, w2, w3, cz, wz;
int rc, bytesperpixel, multiplier, much, more, over, rump, caches, input; int rc, bytesperpixel, multiplier, much, more, over, rump, caches, input;
__u8 mask, margin; u8 mask, margin;
bool odd, isuy, decimatepixel, offerfields, badinput; bool odd, isuy, decimatepixel, offerfields, badinput;
if (NULL == peasycap) { if (NULL == peasycap) {
...@@ -1464,13 +1464,13 @@ while (cz < wz) { ...@@ -1464,13 +1464,13 @@ while (cz < wz) {
much) / 2) - rad; much) / 2) - rad;
more = rad; more = rad;
} }
mask = (__u8)rump; mask = (u8)rump;
margin = 0; margin = 0;
if (much == rex) { if (much == rex) {
mask |= 0x04; mask |= 0x04;
if ((mex + 1) < FIELD_BUFFER_SIZE/ if ((mex + 1) < FIELD_BUFFER_SIZE/
PAGE_SIZE) { PAGE_SIZE) {
margin = *((__u8 *)(peasycap-> margin = *((u8 *)(peasycap->
field_buffer field_buffer
[kex][mex + 1].pgo)); [kex][mex + 1].pgo));
} else } else
...@@ -1588,13 +1588,13 @@ while (cz < wz) { ...@@ -1588,13 +1588,13 @@ while (cz < wz) {
much) / 4) - rad; much) / 4) - rad;
more = rad; more = rad;
} }
mask = (__u8)rump; mask = (u8)rump;
margin = 0; margin = 0;
if (much == rex) { if (much == rex) {
mask |= 0x04; mask |= 0x04;
if ((mex + 1) < FIELD_BUFFER_SIZE/ if ((mex + 1) < FIELD_BUFFER_SIZE/
PAGE_SIZE) { PAGE_SIZE) {
margin = *((__u8 *)(peasycap-> margin = *((u8 *)(peasycap->
field_buffer field_buffer
[kex][mex + 1].pgo)); [kex][mex + 1].pgo));
} }
...@@ -1737,7 +1737,7 @@ if (peasycap->timeval6.tv_sec) { ...@@ -1737,7 +1737,7 @@ if (peasycap->timeval6.tv_sec) {
sdr = signed_div(above, below); sdr = signed_div(above, below);
above = sdr.quotient; above = sdr.quotient;
remainder = (__u32)sdr.remainder; remainder = (u32)sdr.remainder;
JOM(8, "video streaming at %3lli.%03i fields per second\n", above, JOM(8, "video streaming at %3lli.%03i fields per second\n", above,
(remainder/1000)); (remainder/1000));
...@@ -1795,11 +1795,11 @@ return sdr; ...@@ -1795,11 +1795,11 @@ return sdr;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int int
redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more,
__u8 mask, __u8 margin, bool isuy) u8 mask, u8 margin, bool isuy)
{ {
static s32 ay[256], bu[256], rv[256], gu[256], gv[256]; static s32 ay[256], bu[256], rv[256], gu[256], gv[256];
__u8 *pcache; u8 *pcache;
__u8 r, g, b, y, u, v, c, *p2, *p3, *pz, *pr; u8 r, g, b, y, u, v, c, *p2, *p3, *pz, *pr;
int bytesperpixel; int bytesperpixel;
bool byteswaporder, decimatepixel, last; bool byteswaporder, decimatepixel, last;
int j, rump; int j, rump;
...@@ -1857,7 +1857,7 @@ if (!pcache) { ...@@ -1857,7 +1857,7 @@ if (!pcache) {
if (pcache != &peasycap->cache[0]) if (pcache != &peasycap->cache[0])
JOM(16, "cache has %i bytes\n", (int)(pcache - &peasycap->cache[0])); JOM(16, "cache has %i bytes\n", (int)(pcache - &peasycap->cache[0]));
p2 = &peasycap->cache[0]; p2 = &peasycap->cache[0];
p3 = (__u8 *)pad - (int)(pcache - &peasycap->cache[0]); p3 = (u8 *)pad - (int)(pcache - &peasycap->cache[0]);
while (p2 < pcache) { while (p2 < pcache) {
*p3++ = *p2; p2++; *p3++ = *p2; p2++;
} }
...@@ -1869,7 +1869,7 @@ if (p3 != pad) { ...@@ -1869,7 +1869,7 @@ if (p3 != pad) {
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
rump = (int)(0x03 & mask); rump = (int)(0x03 & mask);
u = 0; v = 0; u = 0; v = 0;
p2 = (__u8 *)pex; pz = p2 + much; pr = p3 + more; last = false; p2 = (u8 *)pex; pz = p2 + much; pr = p3 + more; last = false;
p2++; p2++;
if (true == isuy) if (true == isuy)
...@@ -1898,7 +1898,7 @@ case 2: { ...@@ -1898,7 +1898,7 @@ case 2: {
** YUYV ** YUYV
*/ */
/*---------------------------------------------------*/ /*---------------------------------------------------*/
p3 = (__u8 *)pad; pz = p3 + much; p3 = (u8 *)pad; pz = p3 + much;
while (pz > p3) { while (pz > p3) {
c = *p3; c = *p3;
*p3 = *(p3 + 1); *p3 = *(p3 + 1);
...@@ -1914,7 +1914,7 @@ case 2: { ...@@ -1914,7 +1914,7 @@ case 2: {
** UYVY DECIMATED ** UYVY DECIMATED
*/ */
/*---------------------------------------------------*/ /*---------------------------------------------------*/
p2 = (__u8 *)pex; p3 = (__u8 *)pad; pz = p2 + much; p2 = (u8 *)pex; p3 = (u8 *)pad; pz = p2 + much;
while (pz > p2) { while (pz > p2) {
*p3 = *p2; *p3 = *p2;
*(p3 + 1) = *(p2 + 1); *(p3 + 1) = *(p2 + 1);
...@@ -1929,7 +1929,7 @@ case 2: { ...@@ -1929,7 +1929,7 @@ case 2: {
** YUYV DECIMATED ** YUYV DECIMATED
**/ **/
/*---------------------------------------------------*/ /*---------------------------------------------------*/
p2 = (__u8 *)pex; p3 = (__u8 *)pad; pz = p2 + much; p2 = (u8 *)pex; p3 = (u8 *)pad; pz = p2 + much;
while (pz > p2) { while (pz > p2) {
*p3 = *(p2 + 1); *p3 = *(p2 + 1);
*(p3 + 1) = *p2; *(p3 + 1) = *p2;
...@@ -1975,13 +1975,13 @@ case 3: ...@@ -1975,13 +1975,13 @@ case 3:
tmp = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - gv[(int)v]; tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2048,13 +2048,13 @@ case 3: ...@@ -2048,13 +2048,13 @@ case 3:
tmp = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - gv[(int)v]; tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2123,14 +2123,14 @@ case 3: ...@@ -2123,14 +2123,14 @@ case 3:
if (true == isuy) { if (true == isuy) {
tmp = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v]; gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2199,14 +2199,14 @@ case 3: ...@@ -2199,14 +2199,14 @@ case 3:
tmp = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v]; gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2280,13 +2280,13 @@ case 4: ...@@ -2280,13 +2280,13 @@ case 4:
tmp = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - gv[(int)v]; tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2362,13 +2362,13 @@ case 4: ...@@ -2362,13 +2362,13 @@ case 4:
tmp = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - gv[(int)v]; tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2448,14 +2448,14 @@ case 4: ...@@ -2448,14 +2448,14 @@ case 4:
tmp = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v]; gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2533,14 +2533,14 @@ case 4: ...@@ -2533,14 +2533,14 @@ case 4:
if (true == isuy) { if (true == isuy) {
tmp = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v]; gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)tmp); 0 : (u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2754,7 +2754,7 @@ int i, more, much, leap, rc, last; ...@@ -2754,7 +2754,7 @@ int i, more, much, leap, rc, last;
int videofieldamount; int videofieldamount;
unsigned int override, bad; unsigned int override, bad;
int framestatus, framelength, frameactual, frameoffset; int framestatus, framelength, frameactual, frameoffset;
__u8 *pu; u8 *pu;
if (NULL == purb) { if (NULL == purb) {
SAY("ERROR: easycap_complete(): purb is NULL\n"); SAY("ERROR: easycap_complete(): purb is NULL\n");
...@@ -2862,7 +2862,7 @@ if (purb->status) { ...@@ -2862,7 +2862,7 @@ if (purb->status) {
} }
pfield_buffer = &peasycap->field_buffer pfield_buffer = &peasycap->field_buffer
[peasycap->field_fill][peasycap->field_page]; [peasycap->field_fill][peasycap->field_page];
pu = (__u8 *)(purb->transfer_buffer + pu = (u8 *)(purb->transfer_buffer +
purb->iso_frame_desc[i].offset); purb->iso_frame_desc[i].offset);
if (0x80 & *pu) if (0x80 & *pu)
leap = 8; leap = 8;
...@@ -3159,19 +3159,19 @@ int ISOCwMaxPacketSize; ...@@ -3159,19 +3159,19 @@ int ISOCwMaxPacketSize;
int BULKwMaxPacketSize; int BULKwMaxPacketSize;
int INTwMaxPacketSize; int INTwMaxPacketSize;
int CTRLwMaxPacketSize; int CTRLwMaxPacketSize;
__u8 bEndpointAddress; u8 bEndpointAddress;
__u8 ISOCbEndpointAddress; u8 ISOCbEndpointAddress;
__u8 INTbEndpointAddress; u8 INTbEndpointAddress;
int isin, i, j, k, m, rc; int isin, i, j, k, m, rc;
__u8 bInterfaceNumber; u8 bInterfaceNumber;
__u8 bInterfaceClass; u8 bInterfaceClass;
__u8 bInterfaceSubClass; u8 bInterfaceSubClass;
void *pbuf; void *pbuf;
int okalt[8], isokalt; int okalt[8], isokalt;
int okepn[8]; int okepn[8];
int okmps[8]; int okmps[8];
int maxpacketsize; int maxpacketsize;
__u16 mask; u16 mask;
s32 value; s32 value;
struct easycap_format *peasycap_format; struct easycap_format *peasycap_format;
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
...@@ -4552,7 +4552,7 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface) ...@@ -4552,7 +4552,7 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
{ {
struct usb_host_interface *pusb_host_interface; struct usb_host_interface *pusb_host_interface;
struct usb_interface_descriptor *pusb_interface_descriptor; struct usb_interface_descriptor *pusb_interface_descriptor;
__u8 bInterfaceNumber; u8 bInterfaceNumber;
struct easycap *peasycap; struct easycap *peasycap;
struct list_head *plist_head; struct list_head *plist_head;
......
...@@ -314,10 +314,10 @@ int ...@@ -314,10 +314,10 @@ int
fillin_formats(void) fillin_formats(void)
{ {
int i, j, k, m, n; int i, j, k, m, n;
__u32 width, height, pixelformat, bytesperline, sizeimage; u32 width, height, pixelformat, bytesperline, sizeimage;
enum v4l2_field field; enum v4l2_field field;
enum v4l2_colorspace colorspace; enum v4l2_colorspace colorspace;
__u16 mask1, mask2, mask3, mask4; u16 mask1, mask2, mask3, mask4;
char name1[32], name2[32], name3[32], name4[32]; char name1[32], name2[32], name3[32], name4[32];
for (i = 0, n = 0; i < STANDARD_MANY; i++) { for (i = 0, n = 0; i < STANDARD_MANY; i++) {
mask1 = 0x0000; mask1 = 0x0000;
......
...@@ -72,12 +72,12 @@ struct snd_pcm_substream *pss; ...@@ -72,12 +72,12 @@ struct snd_pcm_substream *pss;
struct snd_pcm_runtime *prt; struct snd_pcm_runtime *prt;
int dma_bytes, fragment_bytes; int dma_bytes, fragment_bytes;
int isfragment; int isfragment;
__u8 *p1, *p2; u8 *p1, *p2;
__s16 tmp; s16 tmp;
int i, j, more, much, rc; int i, j, more, much, rc;
#ifdef UPSAMPLE #ifdef UPSAMPLE
int k; int k;
__s16 oldaudio, newaudio, delta; s16 oldaudio, newaudio, delta;
#endif /*UPSAMPLE*/ #endif /*UPSAMPLE*/
JOT(16, "\n"); JOT(16, "\n");
...@@ -152,7 +152,7 @@ for (i = 0; i < purb->number_of_packets; i++) { ...@@ -152,7 +152,7 @@ for (i = 0; i < purb->number_of_packets; i++) {
peasycap->audio_mt = 0; peasycap->audio_mt = 0;
} }
p1 = (__u8 *)(purb->transfer_buffer + p1 = (u8 *)(purb->transfer_buffer +
purb->iso_frame_desc[i].offset); purb->iso_frame_desc[i].offset);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
...@@ -193,7 +193,7 @@ for (i = 0; i < purb->number_of_packets; i++) { ...@@ -193,7 +193,7 @@ for (i = 0; i < purb->number_of_packets; i++) {
more)) more))
much = 16 * much = 16 *
more; more;
p2 = (__u8 *)(prt->dma_area + p2 = (u8 *)(prt->dma_area +
peasycap->dma_fill); peasycap->dma_fill);
for (j = 0; j < (much/16); j++) { for (j = 0; j < (much/16); j++) {
...@@ -223,7 +223,7 @@ for (i = 0; i < purb->number_of_packets; i++) { ...@@ -223,7 +223,7 @@ for (i = 0; i < purb->number_of_packets; i++) {
#else /*!UPSAMPLE*/ #else /*!UPSAMPLE*/
if (much > (2 * more)) if (much > (2 * more))
much = 2 * more; much = 2 * more;
p2 = (__u8 *)(prt->dma_area + p2 = (u8 *)(prt->dma_area +
peasycap->dma_fill); peasycap->dma_fill);
for (j = 0; j < (much / 2); j++) { for (j = 0; j < (much / 2); j++) {
......
...@@ -53,12 +53,12 @@ easyoss_complete(struct urb *purb) ...@@ -53,12 +53,12 @@ easyoss_complete(struct urb *purb)
{ {
struct easycap *peasycap; struct easycap *peasycap;
struct data_buffer *paudio_buffer; struct data_buffer *paudio_buffer;
__u8 *p1, *p2; u8 *p1, *p2;
__s16 tmp; s16 tmp;
int i, j, more, much, leap, rc; int i, j, more, much, leap, rc;
#ifdef UPSAMPLE #ifdef UPSAMPLE
int k; int k;
__s16 oldaudio, newaudio, delta; s16 oldaudio, newaudio, delta;
#endif /*UPSAMPLE*/ #endif /*UPSAMPLE*/
JOT(16, "\n"); JOT(16, "\n");
...@@ -133,7 +133,7 @@ for (i = 0; i < purb->number_of_packets; i++) { ...@@ -133,7 +133,7 @@ for (i = 0; i < purb->number_of_packets; i++) {
peasycap->audio_mt = 0; peasycap->audio_mt = 0;
} }
p1 = (__u8 *)(purb->transfer_buffer + p1 = (u8 *)(purb->transfer_buffer +
purb->iso_frame_desc[i].offset); purb->iso_frame_desc[i].offset);
leap = 0; leap = 0;
...@@ -226,7 +226,7 @@ for (i = 0; i < purb->number_of_packets; i++) { ...@@ -226,7 +226,7 @@ for (i = 0; i < purb->number_of_packets; i++) {
more)) more))
much = 16 * much = 16 *
more; more;
p2 = (__u8 *)paudio_buffer->pto; p2 = (u8 *)paudio_buffer->pto;
for (j = 0; j < (much/16); j++) { for (j = 0; j < (much/16); j++) {
newaudio = ((int) *p1) - 128; newaudio = ((int) *p1) - 128;
...@@ -256,7 +256,7 @@ for (i = 0; i < purb->number_of_packets; i++) { ...@@ -256,7 +256,7 @@ for (i = 0; i < purb->number_of_packets; i++) {
#else /*!UPSAMPLE*/ #else /*!UPSAMPLE*/
if (much > (2 * more)) if (much > (2 * more))
much = 2 * more; much = 2 * more;
p2 = (__u8 *)paudio_buffer->pto; p2 = (u8 *)paudio_buffer->pto;
for (j = 0; j < (much / 2); j++) { for (j = 0; j < (much / 2); j++) {
tmp = ((int) *p1) - 128; tmp = ((int) *p1) - 128;
......
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