struct list_head list_head;
void *pgo;
void *pto;
- __u16 kount;
- __u16 input;
+ u16 kount;
+ u16 input;
};
/*---------------------------------------------------------------------------*/
struct data_urb {
};
/*---------------------------------------------------------------------------*/
struct easycap_standard {
- __u16 mask;
+ u16 mask;
struct v4l2_standard v4l2_standard;
};
struct easycap_format {
- __u16 mask;
+ u16 mask;
char name[128];
struct v4l2_format v4l2_format;
};
#define UPSAMPLE
#ifdef UPSAMPLE
- __s16 oldaudio;
+ s16 oldaudio;
#endif /*UPSAMPLE*/
int ilk;
struct list_head urb_video_head;
struct list_head *purb_video_head;
- __u8 cache[8];
- __u8 *pcache;
+ u8 cache[8];
+ u8 *pcache;
int video_mt;
int audio_mt;
long long audio_bytes;
- __u32 isequence;
+ u32 isequence;
int vma_many;
/*---------------------------------------------------------------------------*/
* IMAGE PROPERTIES
*/
/*---------------------------------------------------------------------------*/
- __u32 pixelformat;
+ u32 pixelformat;
int width;
int height;
int bytesperpixel;
int kill_video_urbs(struct easycap *);
int field2frame(struct easycap *);
int redaub(struct easycap *, void *, void *,
- int, int, __u8, __u8, bool);
+ int, int, u8, u8, bool);
void easycap_testcard(struct easycap *, int);
int fillin_formats(void);
int newinput(struct easycap *, int);
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 adjust_brightness(struct easycap *, int);
int adjust_contrast(struct easycap *, int);
*/
/*---------------------------------------------------------------------------*/
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 confirm_resolution(struct usb_device *);
int confirm_stream(struct usb_device *);
int check_vt(struct usb_device *);
int select_input(struct usb_device *, int, int);
int set_resolution(struct usb_device *,
- __u16, __u16, __u16, __u16);
+ u16, u16, u16, u16);
-int read_saa(struct usb_device *, __u16);
-int read_stk(struct usb_device *, __u32);
-int write_saa(struct usb_device *, __u16, __u16);
+int read_saa(struct usb_device *, u16);
+int read_stk(struct usb_device *, u32);
+int write_saa(struct usb_device *, u16, u16);
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 stop_100(struct usb_device *);
int write_300(struct usb_device *);
-int read_vt(struct usb_device *, __u16);
-int write_vt(struct usb_device *, __u16, __u16);
-int regset(struct usb_device *, __u16, __u16);
-int regget(struct usb_device *, __u16, void *);
+int read_vt(struct usb_device *, u16);
+int write_vt(struct usb_device *, u16, u16);
+int regset(struct usb_device *, u16, u16);
+int regget(struct usb_device *, u16, void *);
int isdongle(struct easycap *);
/*---------------------------------------------------------------------------*/
struct signed_div_result {
/*---------------------------------------------------------------------------*/
#define GET(X, Y, Z) do { \
int rc; \
- *(Z) = (__u16)0; \
+ *(Z) = (u16)0; \
rc = regget(X, Y, Z); \
if (0 > rc) { \
JOT(8, ":-(%i\n", __LINE__); return(rc); \
int adjust_standard(struct easycap *peasycap, v4l2_std_id std_id)
{
struct easycap_standard const *peasycap_standard;
-__u16 reg, set;
+u16 reg, set;
int ir, rc, need, k;
unsigned int itwas, isnow;
bool resubmit;
*/
/*--------------------------------------------------------------------------*/
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;
-__u16 mask;
+u16 mask;
struct usb_device *p;
int miss, multiplier, best, k;
char bf[5], fo[32], *pc;
-__u32 uc;
+u32 uc;
bool resubmit;
if (NULL == peasycap) {
/*****************************************************************************/
int adjust_volume(struct easycap *peasycap, int value)
{
-__s8 mood;
+s8 mood;
int i1;
if (NULL == peasycap) {
peasycap->volume = value;
mood = (16 > peasycap->volume) ? 16 :
((31 < peasycap->volume) ? 31 :
- (__s8) peasycap->volume);
+ (s8) peasycap->volume);
if (!audio_gainset(peasycap->pusb_device, mood)) {
SAM("adjusting volume to 0x%02X\n", mood);
return 0;
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_ENUMINPUT: {
struct v4l2_input v4l2_input;
- __u32 index;
+ u32 index;
JOM(8, "VIDIOC_ENUMINPUT\n");
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_G_INPUT: {
- __u32 index;
+ u32 index;
JOM(8, "VIDIOC_G_INPUT\n");
- index = (__u32)peasycap->input;
+ index = (u32)peasycap->input;
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);
return -EFAULT;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_S_INPUT:
{
- __u32 index;
+ u32 index;
int rc;
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);
return -EFAULT;
}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_ENUM_FMT: {
- __u32 index;
+ u32 index;
struct v4l2_fmtdesc v4l2_fmtdesc;
JOM(8, "VIDIOC_ENUM_FMT\n");
*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_ENUM_FRAMESIZES: {
- __u32 index;
+ u32 index;
struct v4l2_frmsizeenum v4l2_frmsizeenum;
JOM(8, "VIDIOC_ENUM_FRAMESIZES\n");
index = v4l2_frmsizeenum.index;
- v4l2_frmsizeenum.type = (__u32) V4L2_FRMSIZE_TYPE_DISCRETE;
+ v4l2_frmsizeenum.type = (u32) V4L2_FRMSIZE_TYPE_DISCRETE;
if (true == peasycap->ntsc) {
switch (index) {
*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_ENUM_FRAMEINTERVALS: {
- __u32 index;
+ u32 index;
int denominator;
struct v4l2_frmivalenum v4l2_frmivalenum;
index = v4l2_frmivalenum.index;
- v4l2_frmivalenum.type = (__u32) V4L2_FRMIVAL_TYPE_DISCRETE;
+ v4l2_frmivalenum.type = (u32) V4L2_FRMIVAL_TYPE_DISCRETE;
switch (index) {
case 0: {
case VIDIOC_ENUMSTD: {
int last0 = -1, last1 = -1, last2 = -1, last3 = -1;
struct v4l2_standard v4l2_standard;
- __u32 index;
+ u32 index;
struct easycap_standard const *peasycap_standard;
JOM(8, "VIDIOC_ENUMSTD\n");
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_QUERYBUF: {
- __u32 index;
+ u32 index;
struct v4l2_buffer v4l2_buffer;
JOM(8, "VIDIOC_QUERYBUF\n");
int i, j;
struct v4l2_buffer v4l2_buffer;
int rcdq;
- __u16 input;
+ u16 input;
JOM(8, "VIDIOC_DQBUF\n");
int
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)
return -ENODEV;
int
confirm_stream(struct usb_device *p)
{
-__u16 get2;
-__u8 igot;
+u16 get2;
+u8 igot;
if (NULL == p)
return -ENODEV;
}
/****************************************************************************/
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)
return -ENODEV;
}
/****************************************************************************/
int
-write_saa(struct usb_device *p, __u16 reg0, __u16 set0)
+write_saa(struct usb_device *p, u16 reg0, u16 set0)
{
if (NULL == p)
return -ENODEV;
*/
/*--------------------------------------------------------------------------*/
int
-write_vt(struct usb_device *p, __u16 reg0, __u16 set0)
+write_vt(struct usb_device *p, u16 reg0, u16 set0)
{
-__u8 igot;
-__u16 got502, got503;
-__u16 set502, set503;
+u8 igot;
+u16 got502, got503;
+u16 set502, set503;
if (NULL == p)
return -ENODEV;
*/
/*--------------------------------------------------------------------------*/
int
-read_vt(struct usb_device *p, __u16 reg0)
+read_vt(struct usb_device *p, u16 reg0)
{
-__u8 igot;
-__u16 got502, got503;
+u8 igot;
+u16 got502, got503;
if (NULL == p)
return -ENODEV;
}
/****************************************************************************/
int
-read_saa(struct usb_device *p, __u16 reg0)
+read_saa(struct usb_device *p, u16 reg0)
{
-__u8 igot;
+u8 igot;
if (NULL == p)
return -ENODEV;
}
/****************************************************************************/
int
-read_stk(struct usb_device *p, __u32 reg0)
+read_stk(struct usb_device *p, u32 reg0)
{
-__u8 igot;
+u8 igot;
if (NULL == p)
return -ENODEV;
/****************************************************************************/
int
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)
return -ENODEV;
int
start_100(struct usb_device *p)
{
-__u16 get116, get117, get0;
-__u8 igot116, igot117, igot;
+u16 get116, get117, get0;
+u8 igot116, igot117, igot;
if (NULL == p)
return -ENODEV;
int
stop_100(struct usb_device *p)
{
-__u16 get0;
-__u8 igot;
+u16 get0;
+u8 igot;
if (NULL == p)
return -ENODEV;
int
wait_i2c(struct usb_device *p)
{
-__u16 get0;
-__u8 igot;
+u16 get0;
+u8 igot;
const int max = 2;
int k;
}
/****************************************************************************/
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;
if (!pusb_device)
return -ENODEV;
rc1 = 0; igot = 0;
rc0 = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
- (__u8)0x01,
- (__u8)(USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
- (__u16)value,
- (__u16)index,
+ (u8)0x01,
+ (u8)(USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
+ (u16)value,
+ (u16)index,
NULL,
- (__u16)0,
+ (u16)0,
(int)500);
#ifdef NOREADBACK
#
#else
rc1 = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0),
- (__u8)0x00,
- (__u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
- (__u16)0x00,
- (__u16)index,
+ (u8)0x00,
+ (u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
+ (u16)0x00,
+ (u16)index,
(void *)&igot,
- (__u16)sizeof(__u16),
+ (u16)sizeof(u16),
(int)50000);
igot = 0xFF & igot;
switch (index) {
}
/*****************************************************************************/
int
-regget(struct usb_device *pusb_device, __u16 index, void *pvoid)
+regget(struct usb_device *pusb_device, u16 index, void *pvoid)
{
int ir;
if (!pusb_device)
return -ENODEV;
ir = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0),
- (__u8)0x00,
- (__u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
- (__u16)0x00,
- (__u16)index,
+ (u8)0x00,
+ (u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
+ (u16)0x00,
+ (u16)index,
(void *)pvoid,
- sizeof(__u8),
+ sizeof(u8),
(int)50000);
return 0xFF & ir;
}
if (!pusb_device)
return -ENODEV;
return usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
- (__u8)USB_REQ_SET_FEATURE,
- (__u8)(USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE),
+ (u8)USB_REQ_SET_FEATURE,
+ (u8)(USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE),
USB_DEVICE_REMOTE_WAKEUP,
- (__u16)0,
+ (u16)0,
(void *) NULL,
- (__u16)0,
+ (u16)0,
(int)50000);
}
/*****************************************************************************/
* TO ENABLE AUDIO THE VALUE 0x0200 MUST BE SENT.
*/
/*---------------------------------------------------------------------------*/
-const __u8 request = 0x01;
-const __u8 requesttype =
- (__u8)(USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE);
-const __u16 value_unmute = 0x0200;
-const __u16 index = 0x0301;
-const __u16 length = 1;
+const u8 request = 0x01;
+const u8 requesttype =
+ (u8)(USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE);
+const u16 value_unmute = 0x0200;
+const u16 index = 0x0301;
+const u16 length = 1;
if (NULL == peasycap)
return -EFAULT;
buffer[0] = 0x01;
rc = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
- (__u8)request,
- (__u8)requesttype,
- (__u16)value_unmute,
- (__u16)index,
+ (u8)request,
+ (u8)requesttype,
+ (u16)value_unmute,
+ (u16)index,
(void *)&buffer[0],
- (__u16)length,
+ (u16)length,
(int)50000);
-JOT(8, "0x%02X=buffer\n", *((__u8 *) &buffer[0]));
+JOT(8, "0x%02X=buffer\n", *((u8 *) &buffer[0]));
if (rc != (int)length) {
switch (rc) {
case -EPIPE: {
*/
/*---------------------------------------------------------------------------*/
int
-audio_gainset(struct usb_device *pusb_device, __s8 loud)
+audio_gainset(struct usb_device *pusb_device, s8 loud)
{
int igot;
-__u8 tmp;
-__u16 mute;
+u8 tmp;
+u16 mute;
if (NULL == pusb_device)
return -ENODEV;
mute = 0;
if (16 > loud)
- tmp = 0x01 | (0x001F & (((__u8)(15 - loud)) << 1));
+ tmp = 0x01 | (0x001F & (((u8)(15 - loud)) << 1));
else
tmp = 0;
mute = 0;
if (16 <= loud)
- tmp = 0x000F & (__u8)(loud - 16);
+ tmp = 0x000F & (u8)(loud - 16);
else
tmp = 0;
{
struct timeval timeval;
long long int above, below;
-__u32 remainder;
+u32 remainder;
struct signed_div_result sdr;
void *pex, *pad;
int kex, kad, mex, mad, rex, rad, rad2;
int c2, c3, w2, w3, cz, wz;
int rc, bytesperpixel, multiplier, much, more, over, rump, caches, input;
-__u8 mask, margin;
+u8 mask, margin;
bool odd, isuy, decimatepixel, offerfields, badinput;
if (NULL == peasycap) {
much) / 2) - rad;
more = rad;
}
- mask = (__u8)rump;
+ mask = (u8)rump;
margin = 0;
if (much == rex) {
mask |= 0x04;
if ((mex + 1) < FIELD_BUFFER_SIZE/
PAGE_SIZE) {
- margin = *((__u8 *)(peasycap->
+ margin = *((u8 *)(peasycap->
field_buffer
[kex][mex + 1].pgo));
} else
much) / 4) - rad;
more = rad;
}
- mask = (__u8)rump;
+ mask = (u8)rump;
margin = 0;
if (much == rex) {
mask |= 0x04;
if ((mex + 1) < FIELD_BUFFER_SIZE/
PAGE_SIZE) {
- margin = *((__u8 *)(peasycap->
+ margin = *((u8 *)(peasycap->
field_buffer
[kex][mex + 1].pgo));
}
sdr = signed_div(above, below);
above = sdr.quotient;
- remainder = (__u32)sdr.remainder;
+ remainder = (u32)sdr.remainder;
JOM(8, "video streaming at %3lli.%03i fields per second\n", above,
(remainder/1000));
/*---------------------------------------------------------------------------*/
int
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];
-__u8 *pcache;
-__u8 r, g, b, y, u, v, c, *p2, *p3, *pz, *pr;
+u8 *pcache;
+u8 r, g, b, y, u, v, c, *p2, *p3, *pz, *pr;
int bytesperpixel;
bool byteswaporder, decimatepixel, last;
int j, rump;
if (pcache != &peasycap->cache[0])
JOM(16, "cache has %i bytes\n", (int)(pcache - &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) {
*p3++ = *p2; p2++;
}
/*---------------------------------------------------------------------------*/
rump = (int)(0x03 & mask);
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++;
if (true == isuy)
** YUYV
*/
/*---------------------------------------------------*/
- p3 = (__u8 *)pad; pz = p3 + much;
+ p3 = (u8 *)pad; pz = p3 + much;
while (pz > p3) {
c = *p3;
*p3 = *(p3 + 1);
** UYVY DECIMATED
*/
/*---------------------------------------------------*/
- p2 = (__u8 *)pex; p3 = (__u8 *)pad; pz = p2 + much;
+ p2 = (u8 *)pex; p3 = (u8 *)pad; pz = p2 + much;
while (pz > p2) {
*p3 = *p2;
*(p3 + 1) = *(p2 + 1);
** YUYV DECIMATED
**/
/*---------------------------------------------------*/
- p2 = (__u8 *)pex; p3 = (__u8 *)pad; pz = p2 + much;
+ p2 = (u8 *)pex; p3 = (u8 *)pad; pz = p2 + much;
while (pz > p2) {
*p3 = *(p2 + 1);
*(p3 + 1) = *p2;
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
if ((true == last) && rump) {
pcache = &peasycap->cache[0];
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
if ((true == last) && rump) {
pcache = &peasycap->cache[0];
if (true == isuy) {
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
if ((true == last) && rump) {
pcache = &peasycap->cache[0];
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
if ((true == last) && rump) {
pcache = &peasycap->cache[0];
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
if ((true == last) && rump) {
pcache = &peasycap->cache[0];
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
if ((true == last) && rump) {
pcache = &peasycap->cache[0];
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
if ((true == last) && rump) {
pcache = &peasycap->cache[0];
if (true == isuy) {
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v];
g = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
tmp = ay[(int)y] + bu[(int)u];
b = (255 < tmp) ? 255 : ((0 > tmp) ?
- 0 : (__u8)tmp);
+ 0 : (u8)tmp);
if ((true == last) && rump) {
pcache = &peasycap->cache[0];
int videofieldamount;
unsigned int override, bad;
int framestatus, framelength, frameactual, frameoffset;
-__u8 *pu;
+u8 *pu;
if (NULL == purb) {
SAY("ERROR: easycap_complete(): purb is NULL\n");
}
pfield_buffer = &peasycap->field_buffer
[peasycap->field_fill][peasycap->field_page];
- pu = (__u8 *)(purb->transfer_buffer +
+ pu = (u8 *)(purb->transfer_buffer +
purb->iso_frame_desc[i].offset);
if (0x80 & *pu)
leap = 8;
int BULKwMaxPacketSize;
int INTwMaxPacketSize;
int CTRLwMaxPacketSize;
-__u8 bEndpointAddress;
-__u8 ISOCbEndpointAddress;
-__u8 INTbEndpointAddress;
+u8 bEndpointAddress;
+u8 ISOCbEndpointAddress;
+u8 INTbEndpointAddress;
int isin, i, j, k, m, rc;
-__u8 bInterfaceNumber;
-__u8 bInterfaceClass;
-__u8 bInterfaceSubClass;
+u8 bInterfaceNumber;
+u8 bInterfaceClass;
+u8 bInterfaceSubClass;
void *pbuf;
int okalt[8], isokalt;
int okepn[8];
int okmps[8];
int maxpacketsize;
-__u16 mask;
+u16 mask;
s32 value;
struct easycap_format *peasycap_format;
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
{
struct usb_host_interface *pusb_host_interface;
struct usb_interface_descriptor *pusb_interface_descriptor;
-__u8 bInterfaceNumber;
+u8 bInterfaceNumber;
struct easycap *peasycap;
struct list_head *plist_head;
fillin_formats(void)
{
int i, j, k, m, n;
-__u32 width, height, pixelformat, bytesperline, sizeimage;
+u32 width, height, pixelformat, bytesperline, sizeimage;
enum v4l2_field field;
enum v4l2_colorspace colorspace;
-__u16 mask1, mask2, mask3, mask4;
+u16 mask1, mask2, mask3, mask4;
char name1[32], name2[32], name3[32], name4[32];
for (i = 0, n = 0; i < STANDARD_MANY; i++) {
mask1 = 0x0000;
struct snd_pcm_runtime *prt;
int dma_bytes, fragment_bytes;
int isfragment;
-__u8 *p1, *p2;
-__s16 tmp;
+u8 *p1, *p2;
+s16 tmp;
int i, j, more, much, rc;
#ifdef UPSAMPLE
int k;
-__s16 oldaudio, newaudio, delta;
+s16 oldaudio, newaudio, delta;
#endif /*UPSAMPLE*/
JOT(16, "\n");
peasycap->audio_mt = 0;
}
- p1 = (__u8 *)(purb->transfer_buffer +
+ p1 = (u8 *)(purb->transfer_buffer +
purb->iso_frame_desc[i].offset);
/*---------------------------------------------------------------------------*/
more))
much = 16 *
more;
- p2 = (__u8 *)(prt->dma_area +
+ p2 = (u8 *)(prt->dma_area +
peasycap->dma_fill);
for (j = 0; j < (much/16); j++) {
#else /*!UPSAMPLE*/
if (much > (2 * more))
much = 2 * more;
- p2 = (__u8 *)(prt->dma_area +
+ p2 = (u8 *)(prt->dma_area +
peasycap->dma_fill);
for (j = 0; j < (much / 2); j++) {
{
struct easycap *peasycap;
struct data_buffer *paudio_buffer;
-__u8 *p1, *p2;
-__s16 tmp;
+u8 *p1, *p2;
+s16 tmp;
int i, j, more, much, leap, rc;
#ifdef UPSAMPLE
int k;
-__s16 oldaudio, newaudio, delta;
+s16 oldaudio, newaudio, delta;
#endif /*UPSAMPLE*/
JOT(16, "\n");
peasycap->audio_mt = 0;
}
- p1 = (__u8 *)(purb->transfer_buffer +
+ p1 = (u8 *)(purb->transfer_buffer +
purb->iso_frame_desc[i].offset);
leap = 0;
more))
much = 16 *
more;
- p2 = (__u8 *)paudio_buffer->pto;
+ p2 = (u8 *)paudio_buffer->pto;
for (j = 0; j < (much/16); j++) {
newaudio = ((int) *p1) - 128;
#else /*!UPSAMPLE*/
if (much > (2 * more))
much = 2 * more;
- p2 = (__u8 *)paudio_buffer->pto;
+ p2 = (u8 *)paudio_buffer->pto;
for (j = 0; j < (much / 2); j++) {
tmp = ((int) *p1) - 128;