staging: easycap: drop redunant backslashes from the code

remove \ from the code where C syntex doesnt require it

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Tomas Winkler 2011-01-19 00:24:06 +02:00 committed by Greg Kroah-Hartman
parent 2a9a05c432
commit 1dc6e41825
6 changed files with 1081 additions and 1082 deletions

View file

@ -384,9 +384,9 @@ int video_eof;
int video_junk;
struct data_buffer video_isoc_buffer[VIDEO_ISOC_BUFFER_MANY];
struct data_buffer \
struct data_buffer
field_buffer[FIELD_BUFFER_MANY][(FIELD_BUFFER_SIZE/PAGE_SIZE)];
struct data_buffer \
struct data_buffer
frame_buffer[FRAME_BUFFER_MANY][(FRAME_BUFFER_SIZE/PAGE_SIZE)];
struct list_head urb_video_head;
@ -518,9 +518,9 @@ struct data_buffer audio_buffer[];
void easycap_complete(struct urb *);
int easycap_open(struct inode *, struct file *);
int easycap_release(struct inode *, struct file *);
long easycap_ioctl_noinode(struct file *, unsigned int, \
long easycap_ioctl_noinode(struct file *, unsigned int,
unsigned long);
int easycap_ioctl(struct inode *, struct file *, unsigned int, \
int easycap_ioctl(struct inode *, struct file *, unsigned int,
unsigned long);
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
@ -532,7 +532,7 @@ int videodev_release(struct video_device *);
unsigned int easycap_poll(struct file *, poll_table *);
int easycap_mmap(struct file *, struct vm_area_struct *);
int easycap_usb_probe(struct usb_interface *, \
int easycap_usb_probe(struct usb_interface *,
const struct usb_device_id *);
void easycap_usb_disconnect(struct usb_interface *);
void easycap_delete(struct kref *);
@ -544,14 +544,14 @@ int easycap_dqbuf(struct easycap *, int);
int submit_video_urbs(struct easycap *);
int kill_video_urbs(struct easycap *);
int field2frame(struct easycap *);
int redaub(struct easycap *, void *, void *, \
int redaub(struct easycap *, void *, void *,
int, int, __u8, __u8, bool);
void easycap_testcard(struct easycap *, int);
int fillin_formats(void);
int reset(struct easycap *);
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);
@ -569,15 +569,14 @@ int easycap_alsa_probe(struct easycap *);
void easycap_alsa_complete(struct urb *);
int easycap_alsa_open(struct snd_pcm_substream *);
int easycap_alsa_close(struct snd_pcm_substream *);
int easycap_alsa_hw_params(struct snd_pcm_substream *, \
int easycap_alsa_hw_params(struct snd_pcm_substream *,
struct snd_pcm_hw_params *);
int easycap_alsa_vmalloc(struct snd_pcm_substream *, size_t);
int easycap_alsa_hw_free(struct snd_pcm_substream *);
int easycap_alsa_prepare(struct snd_pcm_substream *);
int easycap_alsa_ack(struct snd_pcm_substream *);
int easycap_alsa_trigger(struct snd_pcm_substream *, int);
snd_pcm_uframes_t \
easycap_alsa_pointer(struct snd_pcm_substream *);
snd_pcm_uframes_t easycap_alsa_pointer(struct snd_pcm_substream *);
struct page *easycap_alsa_page(struct snd_pcm_substream *, unsigned long);
#else
@ -585,9 +584,9 @@ void easyoss_complete(struct urb *);
ssize_t easyoss_read(struct file *, char __user *, size_t, loff_t *);
int easyoss_open(struct inode *, struct file *);
int easyoss_release(struct inode *, struct file *);
long easyoss_ioctl_noinode(struct file *, unsigned int, \
long easyoss_ioctl_noinode(struct file *, unsigned int,
unsigned long);
int easyoss_ioctl(struct inode *, struct file *, unsigned int, \
int easyoss_ioctl(struct inode *, struct file *, unsigned int,
unsigned long);
unsigned int easyoss_poll(struct file *, poll_table *);
void easyoss_delete(struct kref *);
@ -619,7 +618,7 @@ int ready_saa(struct usb_device *);
int merit_saa(struct usb_device *);
int check_vt(struct usb_device *);
int select_input(struct usb_device *, int, int);
int set_resolution(struct usb_device *, \
int set_resolution(struct usb_device *,
__u16, __u16, __u16, __u16);
int read_saa(struct usb_device *, __u16);

File diff suppressed because it is too large Load diff

View file

@ -259,28 +259,28 @@ GET(p, 0x0114, &get4);
GET(p, 0x0115, &get5);
GET(p, 0x0116, &get6);
GET(p, 0x0117, &get7);
JOT(8, "0x%03X, 0x%03X, " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X\n", \
JOT(8, "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X\n",
get0, get1, get2, get3, get4, get5, get6, get7);
JOT(8, "....cf PAL_720x526: " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X\n", \
JOT(8, "....cf PAL_720x526: "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X\n",
0x000, 0x000, 0x001, 0x000, 0x5A0, 0x005, 0x121, 0x001);
JOT(8, "....cf PAL_704x526: " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X\n", \
JOT(8, "....cf PAL_704x526: "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X\n",
0x004, 0x000, 0x001, 0x000, 0x584, 0x005, 0x121, 0x001);
JOT(8, "....cf VGA_640x480: " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X, " \
"0x%03X, 0x%03X\n", \
JOT(8, "....cf VGA_640x480: "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X, "
"0x%03X, 0x%03X\n",
0x008, 0x000, 0x020, 0x000, 0x508, 0x005, 0x110, 0x001);
return 0;
}
@ -336,13 +336,13 @@ if (NULL == p)
i0 = 0;
if (true == ntsc) {
while (0xFF != saa7113configNTSC[i0].reg) {
ir = write_saa(p, saa7113configNTSC[i0].reg, \
ir = write_saa(p, saa7113configNTSC[i0].reg,
saa7113configNTSC[i0].set);
i0++;
}
} else {
while (0xFF != saa7113configPAL[i0].reg) {
ir = write_saa(p, saa7113configPAL[i0].reg, \
ir = write_saa(p, saa7113configPAL[i0].reg,
saa7113configPAL[i0].set);
i0++;
}
@ -400,7 +400,7 @@ SET(p, 0x0500, 0x008B);
GET(p, 0x0502, &igot); got502 = (0xFF & igot);
GET(p, 0x0503, &igot); got503 = (0xFF & igot);
JOT(16, "write_vt(., 0x%04X, 0x%04X): was 0x%04X\n", \
JOT(16, "write_vt(., 0x%04X, 0x%04X): was 0x%04X\n",
reg0, set0, ((got503 << 8) | got502));
set502 = (0x00FF & set0);
@ -485,9 +485,9 @@ if (true == ntsc) {
ir = read_saa(p, saa7113configNTSC[i0].reg);
if (ir != saa7113configNTSC[i0].set) {
SAY("SAA register 0x%02X has 0x%02X, " \
"expected 0x%02X\n", \
saa7113configNTSC[i0].reg, \
SAY("SAA register 0x%02X has 0x%02X, "
"expected 0x%02X\n",
saa7113configNTSC[i0].reg,
ir, saa7113configNTSC[i0].set);
rc--;
}
@ -502,9 +502,9 @@ if (true == ntsc) {
ir = read_saa(p, saa7113configPAL[i0].reg);
if (ir != saa7113configPAL[i0].set) {
SAY("SAA register 0x%02X has 0x%02X, " \
"expected 0x%02X\n", \
saa7113configPAL[i0].reg, \
SAY("SAA register 0x%02X has 0x%02X, "
"expected 0x%02X\n",
saa7113configPAL[i0].reg,
ir, saa7113configPAL[i0].set);
rc--;
}
@ -603,23 +603,23 @@ if (true == ntsc) {
}
ir = read_stk(p, stk1160configNTSC[i0].reg);
if (0x100 == stk1160configNTSC[i0].reg) {
if ((ir != (0xFF & stk1160configNTSC[i0].set)) && \
(ir != (0x80 | (0xFF & \
stk1160configNTSC[i0].set))) && \
(0xFFFF != \
if ((ir != (0xFF & stk1160configNTSC[i0].set)) &&
(ir != (0x80 | (0xFF &
stk1160configNTSC[i0].set))) &&
(0xFFFF !=
stk1160configNTSC[i0].set)) {
SAY("STK register 0x%03X has 0x%02X, " \
"expected 0x%02X\n", \
stk1160configNTSC[i0].reg, \
SAY("STK register 0x%03X has 0x%02X, "
"expected 0x%02X\n",
stk1160configNTSC[i0].reg,
ir, stk1160configNTSC[i0].set);
}
i0++; continue;
}
if ((ir != (0xFF & stk1160configNTSC[i0].set)) && \
if ((ir != (0xFF & stk1160configNTSC[i0].set)) &&
(0xFFFF != stk1160configNTSC[i0].set)) {
SAY("STK register 0x%03X has 0x%02X, " \
"expected 0x%02X\n", \
stk1160configNTSC[i0].reg, \
SAY("STK register 0x%03X has 0x%02X, "
"expected 0x%02X\n",
stk1160configNTSC[i0].reg,
ir, stk1160configNTSC[i0].set);
}
i0++;
@ -634,23 +634,23 @@ if (true == ntsc) {
}
ir = read_stk(p, stk1160configPAL[i0].reg);
if (0x100 == stk1160configPAL[i0].reg) {
if ((ir != (0xFF & stk1160configPAL[i0].set)) && \
(ir != (0x80 | (0xFF & \
stk1160configPAL[i0].set))) && \
(0xFFFF != \
if ((ir != (0xFF & stk1160configPAL[i0].set)) &&
(ir != (0x80 | (0xFF &
stk1160configPAL[i0].set))) &&
(0xFFFF !=
stk1160configPAL[i0].set)) {
SAY("STK register 0x%03X has 0x%02X, " \
"expected 0x%02X\n", \
stk1160configPAL[i0].reg, \
SAY("STK register 0x%03X has 0x%02X, "
"expected 0x%02X\n",
stk1160configPAL[i0].reg,
ir, stk1160configPAL[i0].set);
}
i0++; continue;
}
if ((ir != (0xFF & stk1160configPAL[i0].set)) && \
if ((ir != (0xFF & stk1160configPAL[i0].set)) &&
(0xFFFF != stk1160configPAL[i0].set)) {
SAY("STK register 0x%03X has 0x%02X, " \
"expected 0x%02X\n", \
stk1160configPAL[i0].reg, \
SAY("STK register 0x%03X has 0x%02X, "
"expected 0x%02X\n",
stk1160configPAL[i0].reg,
ir, stk1160configPAL[i0].set);
}
i0++;
@ -717,7 +717,7 @@ switch (input) {
case 0:
case 1: {
if (0 != write_saa(p, 0x02, 0x80)) {
SAY("ERROR: failed to set SAA register 0x02 for input %i\n", \
SAY("ERROR: failed to set SAA register 0x02 for input %i\n",
input);
}
SET(p, 0x0000, 0x0098);
@ -726,7 +726,7 @@ case 1: {
}
case 2: {
if (0 != write_saa(p, 0x02, 0x80)) {
SAY("ERROR: failed to set SAA register 0x02 for input %i\n", \
SAY("ERROR: failed to set SAA register 0x02 for input %i\n",
input);
}
SET(p, 0x0000, 0x0090);
@ -735,7 +735,7 @@ case 2: {
}
case 3: {
if (0 != write_saa(p, 0x02, 0x80)) {
SAY("ERROR: failed to set SAA register 0x02 for input %i\n", \
SAY("ERROR: failed to set SAA register 0x02 for input %i\n",
input);
}
SET(p, 0x0000, 0x0088);
@ -744,7 +744,7 @@ case 3: {
}
case 4: {
if (0 != write_saa(p, 0x02, 0x80)) {
SAY("ERROR: failed to set SAA register 0x02 for input %i\n", \
SAY("ERROR: failed to set SAA register 0x02 for input %i\n",
input);
}
SET(p, 0x0000, 0x0080);
@ -757,22 +757,22 @@ case 5: {
switch (mode) {
case 7: {
if (0 != write_saa(p, 0x02, 0x87)) {
SAY("ERROR: failed to set SAA register 0x02 " \
SAY("ERROR: failed to set SAA register 0x02 "
"for input %i\n", input);
}
if (0 != write_saa(p, 0x05, 0xFF)) {
SAY("ERROR: failed to set SAA register 0x05 " \
SAY("ERROR: failed to set SAA register 0x05 "
"for input %i\n", input);
}
break;
}
case 9: {
if (0 != write_saa(p, 0x02, 0x89)) {
SAY("ERROR: failed to set SAA register 0x02 " \
SAY("ERROR: failed to set SAA register 0x02 "
"for input %i\n", input);
}
if (0 != write_saa(p, 0x05, 0x00)) {
SAY("ERROR: failed to set SAA register 0x05 " \
SAY("ERROR: failed to set SAA register 0x05 "
"for input %i\n", input);
}
break;
@ -783,11 +783,11 @@ case 5: {
}
}
if (0 != write_saa(p, 0x04, 0x00)) {
SAY("ERROR: failed to set SAA register 0x04 for input %i\n", \
SAY("ERROR: failed to set SAA register 0x04 for input %i\n",
input);
}
if (0 != write_saa(p, 0x09, 0x80)) {
SAY("ERROR: failed to set SAA register 0x09 for input %i\n", \
SAY("ERROR: failed to set SAA register 0x09 for input %i\n",
input);
}
SET(p, 0x0002, 0x0093);
@ -809,7 +809,7 @@ return 0;
}
/****************************************************************************/
int
set_resolution(struct usb_device *p, \
set_resolution(struct usb_device *p,
__u16 set0, __u16 set1, __u16 set2, __u16 set3)
{
__u16 u0x0111, u0x0113, u0x0115, u0x0117;
@ -915,25 +915,25 @@ 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, \
(void *)NULL, \
(__u16)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,
(void *)NULL,
(__u16)0,
(int)500);
#if defined(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, \
(void *)&igot, \
(__u16)sizeof(__u16), \
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,
(void *)&igot,
(__u16)sizeof(__u16),
(int)50000);
igot = 0xFF & igot;
switch (index) {
@ -951,15 +951,15 @@ case 0x205:
case 0x350:
case 0x351: {
if (0 != (0xFF & igot)) {
JOT(8, "unexpected 0x%02X for STK register 0x%03X\n", \
JOT(8, "unexpected 0x%02X for STK register 0x%03X\n",
igot, index);
}
break;
}
default: {
if ((0xFF & value) != (0xFF & igot)) {
JOT(8, "unexpected 0x%02X != 0x%02X " \
"for STK register 0x%03X\n", \
JOT(8, "unexpected 0x%02X != 0x%02X "
"for STK register 0x%03X\n",
igot, value, index);
}
break;
@ -977,13 +977,13 @@ 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, \
(void *)pvoid, \
sizeof(__u8), \
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,
(void *)pvoid,
sizeof(__u8),
(int)50000);
return 0xFF & ir;
}
@ -993,13 +993,13 @@ wakeup_device(struct usb_device *pusb_device)
{
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), \
USB_DEVICE_REMOTE_WAKEUP, \
(__u16)0, \
(void *) NULL, \
(__u16)0, \
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),
USB_DEVICE_REMOTE_WAKEUP,
(__u16)0,
(void *) NULL,
(__u16)0,
(int)50000);
}
/*****************************************************************************/
@ -1018,7 +1018,7 @@ int rc, id1, id2;
*/
/*---------------------------------------------------------------------------*/
const __u8 request = 0x01;
const __u8 requesttype = \
const __u8 requesttype =
(__u8)(USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE);
const __u16 value_unmute = 0x0200;
const __u16 index = 0x0301;
@ -1031,24 +1031,24 @@ pusb_device = peasycap->pusb_device;
if (NULL == pusb_device)
return -ENODEV;
JOM(8, "%02X %02X %02X %02X %02X %02X %02X %02X\n", \
requesttype, request, \
(0x00FF & value_unmute), \
(0xFF00 & value_unmute) >> 8, \
(0x00FF & index), \
(0xFF00 & index) >> 8, \
(0x00FF & length), \
JOM(8, "%02X %02X %02X %02X %02X %02X %02X %02X\n",
requesttype, request,
(0x00FF & value_unmute),
(0xFF00 & value_unmute) >> 8,
(0x00FF & index),
(0xFF00 & index) >> 8,
(0x00FF & length),
(0xFF00 & length) >> 8);
buffer[0] = 0x01;
rc = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0), \
(__u8)request, \
(__u8)requesttype, \
(__u16)value_unmute, \
(__u16)index, \
(void *)&buffer[0], \
(__u16)length, \
rc = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
(__u8)request,
(__u8)requesttype,
(__u16)value_unmute,
(__u16)index,
(void *)&buffer[0],
(__u16)length,
(int)50000);
JOT(8, "0x%02X=buffer\n", *((__u8 *) &buffer[0]));
@ -1209,7 +1209,7 @@ if (0 > igot) {
mute = 0x8000 & ((unsigned int)igot);
mute = 0;
JOT(8, "0x%04X=(mute|u8|(u8<<8)) for VT1612A register 0x10,...0x18\n", \
JOT(8, "0x%04X=(mute|u8|(u8<<8)) for VT1612A register 0x10,...0x18\n",
mute | u8 | (u8 << 8));
write_vt(pusb_device, 0x0010, (mute | u8 | (u8 << 8)));
write_vt(pusb_device, 0x0012, (mute | u8 | (u8 << 8)));
@ -1230,7 +1230,7 @@ if (16 <= loud)
else
u8 = 0;
JOT(8, "0x%04X=(mute|u8|(u8<<8)) for VT1612A register 0x1C\n", \
JOT(8, "0x%04X=(mute|u8|(u8<<8)) for VT1612A register 0x1C\n",
mute | u8 | (u8 << 8));
write_vt(pusb_device, 0x001C, (mute | u8 | (u8 << 8)));
write_vt(pusb_device, 0x001A, 0x0404);

File diff suppressed because it is too large Load diff

View file

@ -44,7 +44,7 @@ const struct easycap_standard easycap_standard[] = {
.mask = 0x00FF & PAL_BGHIN ,
.v4l2_standard = {
.index = PAL_BGHIN,
.id = (V4L2_STD_PAL_B | V4L2_STD_PAL_G | V4L2_STD_PAL_H | \
.id = (V4L2_STD_PAL_B | V4L2_STD_PAL_G | V4L2_STD_PAL_H |
V4L2_STD_PAL_I | V4L2_STD_PAL_N),
.name = "PAL_BGHIN",
.frameperiod = {1, 25},
@ -165,8 +165,8 @@ const struct easycap_standard easycap_standard[] = {
.mask = 0x8000 | (0x00FF & PAL_BGHIN_SLOW),
.v4l2_standard = {
.index = PAL_BGHIN_SLOW,
.id = (V4L2_STD_PAL_B | V4L2_STD_PAL_G | V4L2_STD_PAL_H | \
V4L2_STD_PAL_I | V4L2_STD_PAL_N | \
.id = (V4L2_STD_PAL_B | V4L2_STD_PAL_G | V4L2_STD_PAL_H |
V4L2_STD_PAL_I | V4L2_STD_PAL_N |
(((v4l2_std_id)0x01) << 32)),
.name = "PAL_BGHIN_SLOW",
.frameperiod = {1, 5},
@ -573,25 +573,25 @@ for (i = 0, n = 0; i < STANDARD_MANY; i++) {
strcat(&easycap_format[n].name[0], &name2[0]);
strcat(&easycap_format[n].name[0], &name3[0]);
strcat(&easycap_format[n].name[0], &name4[0]);
easycap_format[n].mask = \
easycap_format[n].mask =
mask1 | mask2 | mask3 | mask4;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.fmt.pix.width = width;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.fmt.pix.height = height;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.fmt.pix.pixelformat = pixelformat;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.fmt.pix.field = field;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.fmt.pix.bytesperline = bytesperline;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.fmt.pix.sizeimage = sizeimage;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.fmt.pix.colorspace = colorspace;
easycap_format[n].v4l2_format\
easycap_format[n].v4l2_format
.fmt.pix.priv = 0;
n++;
}
@ -604,7 +604,7 @@ easycap_format[n].mask = 0xFFFF;
return n;
}
/*---------------------------------------------------------------------------*/
struct v4l2_queryctrl easycap_control[] = \
struct v4l2_queryctrl easycap_control[] =
{{
.id = V4L2_CID_BRIGHTNESS,
.type = V4L2_CTRL_TYPE_INTEGER,

View file

@ -48,7 +48,7 @@ static const struct snd_pcm_hardware alsa_hardware = {
.rate_max = 48000,
.channels_min = 2,
.channels_max = 2,
.buffer_bytes_max = PAGE_SIZE * PAGES_PER_AUDIO_FRAGMENT * \
.buffer_bytes_max = PAGE_SIZE * PAGES_PER_AUDIO_FRAGMENT *
AUDIO_FRAGMENT_MANY,
.period_bytes_min = PAGE_SIZE * PAGES_PER_AUDIO_FRAGMENT,
.period_bytes_max = PAGE_SIZE * PAGES_PER_AUDIO_FRAGMENT * 2,
@ -108,14 +108,14 @@ if (true == peasycap->microphone) {
}
#if defined(EASYCAP_NEEDS_CARD_CREATE)
if (0 != snd_card_create(SNDRV_DEFAULT_IDX1, "easycap_alsa", \
THIS_MODULE, 0, \
if (0 != snd_card_create(SNDRV_DEFAULT_IDX1, "easycap_alsa",
THIS_MODULE, 0,
&psnd_card)) {
SAY("ERROR: Cannot do ALSA snd_card_create()\n");
return -EFAULT;
}
#else
psnd_card = snd_card_new(SNDRV_DEFAULT_IDX1, "easycap_alsa", \
psnd_card = snd_card_new(SNDRV_DEFAULT_IDX1, "easycap_alsa",
THIS_MODULE, 0);
if (NULL == psnd_card) {
SAY("ERROR: Cannot do ALSA snd_card_new()\n");
@ -139,7 +139,7 @@ if (true == peasycap->microphone) {
return -EFAULT;
}
snd_pcm_set_ops(psnd_pcm, SNDRV_PCM_STREAM_CAPTURE, \
snd_pcm_set_ops(psnd_pcm, SNDRV_PCM_STREAM_CAPTURE,
&easycap_alsa_pcm_ops);
psnd_pcm->info_flags = 0;
strcpy(&psnd_pcm->name[0], &psnd_card->id[0]);
@ -199,7 +199,7 @@ if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
}
much = 0;
if (peasycap->audio_idle) {
JOM(16, "%i=audio_idle %i=audio_isoc_streaming\n", \
JOM(16, "%i=audio_idle %i=audio_isoc_streaming\n",
peasycap->audio_idle, peasycap->audio_isoc_streaming);
if (peasycap->audio_isoc_streaming)
goto resubmit;
@ -410,12 +410,12 @@ for (i = 0; i < purb->number_of_packets; i++) {
peasycap->audio_mt++;
else {
if (peasycap->audio_mt) {
JOM(12, "%4i empty audio urb frames\n", \
JOM(12, "%4i empty audio urb frames\n",
peasycap->audio_mt);
peasycap->audio_mt = 0;
}
p1 = (__u8 *)(purb->transfer_buffer + \
p1 = (__u8 *)(purb->transfer_buffer +
purb->iso_frame_desc[i].offset);
/*---------------------------------------------------------------------------*/
@ -442,39 +442,39 @@ for (i = 0; i < purb->number_of_packets; i++) {
if (false == peasycap->microphone) {
if (much > more)
much = more;
memcpy(prt->dma_area + \
peasycap->dma_fill, \
memcpy(prt->dma_area +
peasycap->dma_fill,
p1, much);
p1 += much;
more -= much;
} else {
#if defined(UPSAMPLE)
if (much % 16)
JOM(8, "MISTAKE? much" \
JOM(8, "MISTAKE? much"
" is not divisible by 16\n");
if (much > (16 * \
if (much > (16 *
more))
much = 16 * \
much = 16 *
more;
p2 = (__u8 *)(prt->dma_area + \
p2 = (__u8 *)(prt->dma_area +
peasycap->dma_fill);
for (j = 0; j < (much/16); j++) {
newaudio = ((int) *p1) - 128;
newaudio = 128 * \
newaudio = 128 *
newaudio;
delta = (newaudio - oldaudio) \
delta = (newaudio - oldaudio)
/ 4;
s16 = oldaudio + delta;
for (k = 0; k < 4; k++) {
*p2 = (0x00FF & s16);
*(p2 + 1) = (0xFF00 & \
*(p2 + 1) = (0xFF00 &
s16) >> 8;
p2 += 2;
*p2 = (0x00FF & s16);
*(p2 + 1) = (0xFF00 & \
*(p2 + 1) = (0xFF00 &
s16) >> 8;
p2 += 2;
s16 += delta;
@ -486,15 +486,15 @@ for (i = 0; i < purb->number_of_packets; i++) {
#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++) {
s16 = ((int) *p1) - 128;
s16 = 128 * \
s16 = 128 *
s16;
*p2 = (0x00FF & s16);
*(p2 + 1) = (0xFF00 & s16) >> \
*(p2 + 1) = (0xFF00 & s16) >>
8;
p1++; p2 += 2;
more--;
@ -503,25 +503,25 @@ for (i = 0; i < purb->number_of_packets; i++) {
}
peasycap->dma_fill += much;
if (peasycap->dma_fill >= peasycap->dma_next) {
isfragment = peasycap->dma_fill / \
isfragment = peasycap->dma_fill /
fragment_bytes;
if (0 > isfragment) {
SAM("MISTAKE: isfragment is " \
SAM("MISTAKE: isfragment is "
"negative\n");
return;
}
peasycap->dma_read = (isfragment \
peasycap->dma_read = (isfragment
- 1) * fragment_bytes;
peasycap->dma_next = (isfragment \
peasycap->dma_next = (isfragment
+ 1) * fragment_bytes;
if (dma_bytes < peasycap->dma_next) {
peasycap->dma_next = \
peasycap->dma_next =
fragment_bytes;
}
if (0 <= peasycap->dma_read) {
JOM(8, "snd_pcm_period_elap" \
"sed(), %i=" \
"isfragment\n", \
JOM(8, "snd_pcm_period_elap"
"sed(), %i="
"isfragment\n",
isfragment);
snd_pcm_period_elapsed(pss);
}
@ -529,8 +529,8 @@ for (i = 0; i < purb->number_of_packets; i++) {
}
}
} else {
JOM(12, "discarding audio samples because " \
"%i=purb->iso_frame_desc[i].status\n", \
JOM(12, "discarding audio samples because "
"%i=purb->iso_frame_desc[i].status\n",
purb->iso_frame_desc[i].status);
}
@ -549,8 +549,8 @@ if (peasycap->audio_isoc_streaming) {
rc = usb_submit_urb(purb, GFP_ATOMIC);
if (0 != rc) {
if ((-ENODEV != rc) && (-ENOENT != rc)) {
SAM("ERROR: while %i=audio_idle, " \
"usb_submit_urb() failed " \
SAM("ERROR: while %i=audio_idle, "
"usb_submit_urb() failed "
"with rc:\n", peasycap->audio_idle);
}
switch (rc) {
@ -685,7 +685,7 @@ return 0;
}
/*****************************************************************************/
int
easycap_alsa_hw_params(struct snd_pcm_substream *pss, \
easycap_alsa_hw_params(struct snd_pcm_substream *pss,
struct snd_pcm_hw_params *phw)
{
int rc;
@ -785,7 +785,7 @@ JOM(16, "ALSA decides %8i =sample_bits\n", (int)pss->runtime->sample_bits);
JOM(16, "ALSA decides %8i =frame_bits\n", (int)pss->runtime->frame_bits);
JOM(16, "ALSA decides %8i =min_align\n", (int)pss->runtime->min_align);
JOM(12, "ALSA decides %8i =hw_ptr_base\n", (int)pss->runtime->hw_ptr_base);
JOM(12, "ALSA decides %8i =hw_ptr_interrupt\n", \
JOM(12, "ALSA decides %8i =hw_ptr_interrupt\n",
(int)pss->runtime->hw_ptr_interrupt);
if (prt->dma_bytes != 4 * ((int)prt->period_size) * ((int)prt->periods)) {
SAY("MISTAKE: unexpected ALSA parameters\n");
@ -806,7 +806,7 @@ easycap_alsa_trigger(struct snd_pcm_substream *pss, int cmd)
struct easycap *peasycap;
int retval;
JOT(4, "%i=cmd cf %i=START %i=STOP\n", cmd, SNDRV_PCM_TRIGGER_START, \
JOT(4, "%i=cmd cf %i=START %i=STOP\n", cmd, SNDRV_PCM_TRIGGER_START,
SNDRV_PCM_TRIGGER_STOP);
if (NULL == pss) {
SAY("ERROR: pss is NULL\n");
@ -858,8 +858,8 @@ if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
return -EFAULT;
}
if ((0 != peasycap->audio_eof) || (0 != peasycap->audio_idle)) {
JOM(8, "returning -EIO because " \
"%i=audio_idle %i=audio_eof\n", \
JOM(8, "returning -EIO because "
"%i=audio_idle %i=audio_eof\n",
peasycap->audio_idle, peasycap->audio_eof);
return -EIO;
}
@ -870,9 +870,9 @@ if (0 > peasycap->dma_read) {
}
offset = ((snd_pcm_uframes_t)peasycap->dma_read)/4;
JOM(8, "ALSA decides %8i =hw_ptr_base\n", (int)pss->runtime->hw_ptr_base);
JOM(8, "ALSA decides %8i =hw_ptr_interrupt\n", \
JOM(8, "ALSA decides %8i =hw_ptr_interrupt\n",
(int)pss->runtime->hw_ptr_interrupt);
JOM(8, "%7i=offset %7i=dma_read %7i=dma_next\n", \
JOM(8, "%7i=offset %7i=dma_read %7i=dma_next\n",
(int)offset, peasycap->dma_read, peasycap->dma_next);
return offset;
}
@ -951,14 +951,14 @@ if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
}
much = 0;
if (peasycap->audio_idle) {
JOM(16, "%i=audio_idle %i=audio_isoc_streaming\n", \
JOM(16, "%i=audio_idle %i=audio_isoc_streaming\n",
peasycap->audio_idle, peasycap->audio_isoc_streaming);
if (peasycap->audio_isoc_streaming) {
rc = usb_submit_urb(purb, GFP_ATOMIC);
if (0 != rc) {
if (-ENODEV != rc && -ENOENT != rc) {
SAM("ERROR: while %i=audio_idle, " \
"usb_submit_urb() failed with rc:\n", \
SAM("ERROR: while %i=audio_idle, "
"usb_submit_urb() failed with rc:\n",
peasycap->audio_idle);
}
switch (rc) {
@ -1212,12 +1212,12 @@ for (i = 0; i < purb->number_of_packets; i++) {
peasycap->audio_mt++;
else {
if (peasycap->audio_mt) {
JOM(12, "%4i empty audio urb frames\n", \
JOM(12, "%4i empty audio urb frames\n",
peasycap->audio_mt);
peasycap->audio_mt = 0;
}
p1 = (__u8 *)(purb->transfer_buffer + \
p1 = (__u8 *)(purb->transfer_buffer +
purb->iso_frame_desc[i].offset);
leap = 0;
@ -1234,64 +1234,64 @@ for (i = 0; i < purb->number_of_packets; i++) {
SAM("MISTAKE: more is negative\n");
return;
}
if (peasycap->audio_buffer_page_many <= \
if (peasycap->audio_buffer_page_many <=
peasycap->audio_fill) {
SAM("ERROR: bad " \
SAM("ERROR: bad "
"peasycap->audio_fill\n");
return;
}
paudio_buffer = &peasycap->audio_buffer\
paudio_buffer = &peasycap->audio_buffer
[peasycap->audio_fill];
if (PAGE_SIZE < (paudio_buffer->pto - \
if (PAGE_SIZE < (paudio_buffer->pto -
paudio_buffer->pgo)) {
SAM("ERROR: bad paudio_buffer->pto\n");
return;
}
if (PAGE_SIZE == (paudio_buffer->pto - \
if (PAGE_SIZE == (paudio_buffer->pto -
paudio_buffer->pgo)) {
#if defined(TESTTONE)
easyoss_testtone(peasycap, \
easyoss_testtone(peasycap,
peasycap->audio_fill);
#endif /*TESTTONE*/
paudio_buffer->pto = \
paudio_buffer->pto =
paudio_buffer->pgo;
(peasycap->audio_fill)++;
if (peasycap->\
audio_buffer_page_many <= \
if (peasycap->
audio_buffer_page_many <=
peasycap->audio_fill)
peasycap->audio_fill = 0;
JOM(8, "bumped peasycap->" \
"audio_fill to %i\n", \
JOM(8, "bumped peasycap->"
"audio_fill to %i\n",
peasycap->audio_fill);
paudio_buffer = &peasycap->\
audio_buffer\
paudio_buffer = &peasycap->
audio_buffer
[peasycap->audio_fill];
paudio_buffer->pto = \
paudio_buffer->pto =
paudio_buffer->pgo;
if (!(peasycap->audio_fill % \
peasycap->\
if (!(peasycap->audio_fill %
peasycap->
audio_pages_per_fragment)) {
JOM(12, "wakeup call on wq_" \
"audio, %i=frag reading %i" \
"=fragment fill\n", \
(peasycap->audio_read / \
peasycap->\
audio_pages_per_fragment), \
(peasycap->audio_fill / \
peasycap->\
JOM(12, "wakeup call on wq_"
"audio, %i=frag reading %i"
"=fragment fill\n",
(peasycap->audio_read /
peasycap->
audio_pages_per_fragment),
(peasycap->audio_fill /
peasycap->
audio_pages_per_fragment));
wake_up_interruptible\
wake_up_interruptible
(&(peasycap->wq_audio));
}
}
much = PAGE_SIZE - (int)(paudio_buffer->pto -\
much = PAGE_SIZE - (int)(paudio_buffer->pto -
paudio_buffer->pgo);
if (false == peasycap->microphone) {
@ -1304,30 +1304,30 @@ for (i = 0; i < purb->number_of_packets; i++) {
} else {
#if defined(UPSAMPLE)
if (much % 16)
JOM(8, "MISTAKE? much" \
JOM(8, "MISTAKE? much"
" is not divisible by 16\n");
if (much > (16 * \
if (much > (16 *
more))
much = 16 * \
much = 16 *
more;
p2 = (__u8 *)paudio_buffer->pto;
for (j = 0; j < (much/16); j++) {
newaudio = ((int) *p1) - 128;
newaudio = 128 * \
newaudio = 128 *
newaudio;
delta = (newaudio - oldaudio) \
delta = (newaudio - oldaudio)
/ 4;
s16 = oldaudio + delta;
for (k = 0; k < 4; k++) {
*p2 = (0x00FF & s16);
*(p2 + 1) = (0xFF00 & \
*(p2 + 1) = (0xFF00 &
s16) >> 8;
p2 += 2;
*p2 = (0x00FF & s16);
*(p2 + 1) = (0xFF00 & \
*(p2 + 1) = (0xFF00 &
s16) >> 8;
p2 += 2;
@ -1344,10 +1344,10 @@ for (i = 0; i < purb->number_of_packets; i++) {
for (j = 0; j < (much / 2); j++) {
s16 = ((int) *p1) - 128;
s16 = 128 * \
s16 = 128 *
s16;
*p2 = (0x00FF & s16);
*(p2 + 1) = (0xFF00 & s16) >> \
*(p2 + 1) = (0xFF00 & s16) >>
8;
p1++; p2 += 2;
more--;
@ -1358,8 +1358,8 @@ for (i = 0; i < purb->number_of_packets; i++) {
}
}
} else {
JOM(12, "discarding audio samples because " \
"%i=purb->iso_frame_desc[i].status\n", \
JOM(12, "discarding audio samples because "
"%i=purb->iso_frame_desc[i].status\n",
purb->iso_frame_desc[i].status);
}
@ -1378,8 +1378,8 @@ if (peasycap->audio_isoc_streaming) {
rc = usb_submit_urb(purb, GFP_ATOMIC);
if (0 != rc) {
if (-ENODEV != rc && -ENOENT != rc) {
SAM("ERROR: while %i=audio_idle, " \
"usb_submit_urb() failed " \
SAM("ERROR: while %i=audio_idle, "
"usb_submit_urb() failed "
"with rc:\n", peasycap->audio_idle);
}
switch (rc) {
@ -1489,7 +1489,7 @@ if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: pv4l2_device is NULL\n");
return -EFAULT;
}
peasycap = (struct easycap *) \
peasycap = (struct easycap *)
container_of(pv4l2_device, struct easycap, v4l2_device);
}
#endif /*EASYCAP_NEEDS_V4L2_DEVICE_H*/
@ -1537,7 +1537,7 @@ return 0;
}
/*****************************************************************************/
ssize_t
easyoss_read(struct file *file, char __user *puserspacebuffer, \
easyoss_read(struct file *file, char __user *puserspacebuffer,
size_t kount, loff_t *poff)
{
struct timeval timeval;
@ -1609,7 +1609,7 @@ if (0 <= kd && DONGLE_MANY > kd) {
return -ERESTARTSYS;
}
if (memcmp(&peasycap->telltale[0], TELLTALE, strlen(TELLTALE))) {
SAY("ERROR: bad peasycap: 0x%08lX\n", \
SAY("ERROR: bad peasycap: 0x%08lX\n",
(unsigned long int) peasycap);
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -ERESTARTSYS;
@ -1634,7 +1634,7 @@ if (file->f_flags & O_NONBLOCK)
else
JOT(8, "BLOCKING kount=%i, *poff=%i\n", (int)kount, (int)(*poff));
if ((0 > peasycap->audio_read) || \
if ((0 > peasycap->audio_read) ||
(peasycap->audio_buffer_page_many <= peasycap->audio_read)) {
SAM("ERROR: peasycap->audio_read out of range\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
@ -1646,22 +1646,22 @@ if ((struct data_buffer *)NULL == pdata_buffer) {
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -EFAULT;
}
JOM(12, "before wait, %i=frag read %i=frag fill\n", \
(peasycap->audio_read / peasycap->audio_pages_per_fragment), \
JOM(12, "before wait, %i=frag read %i=frag fill\n",
(peasycap->audio_read / peasycap->audio_pages_per_fragment),
(peasycap->audio_fill / peasycap->audio_pages_per_fragment));
fragment = (peasycap->audio_read / peasycap->audio_pages_per_fragment);
while ((fragment == (peasycap->audio_fill / \
peasycap->audio_pages_per_fragment)) || \
while ((fragment == (peasycap->audio_fill /
peasycap->audio_pages_per_fragment)) ||
(0 == (PAGE_SIZE - (pdata_buffer->pto - pdata_buffer->pgo)))) {
if (file->f_flags & O_NONBLOCK) {
JOM(16, "returning -EAGAIN as instructed\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return -EAGAIN;
}
rc = wait_event_interruptible(peasycap->wq_audio, \
(peasycap->audio_idle || peasycap->audio_eof || \
((fragment != (peasycap->audio_fill / \
peasycap->audio_pages_per_fragment)) && \
rc = wait_event_interruptible(peasycap->wq_audio,
(peasycap->audio_idle || peasycap->audio_eof ||
((fragment != (peasycap->audio_fill /
peasycap->audio_pages_per_fragment)) &&
(0 < (PAGE_SIZE - (pdata_buffer->pto - pdata_buffer->pgo))))));
if (0 != rc) {
SAM("aborted by signal\n");
@ -1669,14 +1669,14 @@ while ((fragment == (peasycap->audio_fill / \
return -ERESTARTSYS;
}
if (peasycap->audio_eof) {
JOM(8, "returning 0 because %i=audio_eof\n", \
JOM(8, "returning 0 because %i=audio_eof\n",
peasycap->audio_eof);
kill_audio_urbs(peasycap);
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return 0;
}
if (peasycap->audio_idle) {
JOM(16, "returning 0 because %i=audio_idle\n", \
JOM(16, "returning 0 because %i=audio_idle\n",
peasycap->audio_idle);
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
return 0;
@ -1687,12 +1687,12 @@ while ((fragment == (peasycap->audio_fill / \
return 0;
}
}
JOM(12, "after wait, %i=frag read %i=frag fill\n", \
(peasycap->audio_read / peasycap->audio_pages_per_fragment), \
JOM(12, "after wait, %i=frag read %i=frag fill\n",
(peasycap->audio_read / peasycap->audio_pages_per_fragment),
(peasycap->audio_fill / peasycap->audio_pages_per_fragment));
szret = (size_t)0;
fragment = (peasycap->audio_read / peasycap->audio_pages_per_fragment);
while (fragment == (peasycap->audio_read / \
while (fragment == (peasycap->audio_read /
peasycap->audio_pages_per_fragment)) {
if (NULL == pdata_buffer->pgo) {
SAM("ERROR: pdata_buffer->pgo is NULL\n");
@ -1714,15 +1714,15 @@ while (fragment == (peasycap->audio_read / \
(peasycap->audio_read)++;
if (peasycap->audio_buffer_page_many <= peasycap->audio_read)
peasycap->audio_read = 0;
JOM(12, "bumped peasycap->audio_read to %i\n", \
JOM(12, "bumped peasycap->audio_read to %i\n",
peasycap->audio_read);
if (fragment != (peasycap->audio_read / \
if (fragment != (peasycap->audio_read /
peasycap->audio_pages_per_fragment))
break;
if ((0 > peasycap->audio_read) || \
(peasycap->audio_buffer_page_many <= \
if ((0 > peasycap->audio_read) ||
(peasycap->audio_buffer_page_many <=
peasycap->audio_read)) {
SAM("ERROR: peasycap->audio_read out of range\n");
mutex_unlock(&easycapdc60_dongle[kd].mutex_audio);
@ -1751,7 +1751,7 @@ while (fragment == (peasycap->audio_read / \
more = kount1;
if (more > kount)
more = kount;
JOM(12, "agreed to send %li bytes from page %i\n", \
JOM(12, "agreed to send %li bytes from page %i\n",
more, peasycap->audio_read);
if (!more)
break;
@ -1763,7 +1763,7 @@ while (fragment == (peasycap->audio_read / \
/*---------------------------------------------------------------------------*/
p0 = (unsigned char *)pdata_buffer->pgo; l0 = 0; lm = more/2;
while (l0 < lm) {
SUMMER(p0, &peasycap->audio_sample, &peasycap->audio_niveau, \
SUMMER(p0, &peasycap->audio_sample, &peasycap->audio_niveau,
&peasycap->audio_square); l0++; p0 += 2;
}
/*---------------------------------------------------------------------------*/
@ -1779,11 +1779,11 @@ while (fragment == (peasycap->audio_read / \
puserspacebuffer += more;
kount -= (size_t)more;
}
JOM(12, "after read, %i=frag read %i=frag fill\n", \
(peasycap->audio_read / peasycap->audio_pages_per_fragment), \
JOM(12, "after read, %i=frag read %i=frag fill\n",
(peasycap->audio_read / peasycap->audio_pages_per_fragment),
(peasycap->audio_fill / peasycap->audio_pages_per_fragment));
if (kount < 0) {
SAM("MISTAKE: %li=kount %li=szret\n", \
SAM("MISTAKE: %li=kount %li=szret\n",
(long int)kount, (long int)szret);
}
/*---------------------------------------------------------------------------*/
@ -1799,7 +1799,7 @@ if (peasycap->audio_sample) {
mean = peasycap->audio_niveau;
sdr = signed_div(mean, peasycap->audio_sample);
JOM(8, "%8lli=mean %8lli=meansquare after %lli samples, =>\n", \
JOM(8, "%8lli=mean %8lli=meansquare after %lli samples, =>\n",
sdr.quotient, above, peasycap->audio_sample);
sdr = signed_div(above, 32768);
@ -1818,9 +1818,9 @@ if (!peasycap->timeval1.tv_sec) {
sdr.quotient = 192000;
} else {
peasycap->audio_bytes += (long long int) szret;
below = ((long long int)(1000000)) * \
((long long int)(timeval.tv_sec - \
peasycap->timeval3.tv_sec)) + \
below = ((long long int)(1000000)) *
((long long int)(timeval.tv_sec -
peasycap->timeval3.tv_sec)) +
(long long int)(timeval.tv_usec - peasycap->timeval3.tv_usec);
above = 1000000 * ((long long int) peasycap->audio_bytes);
@ -1881,9 +1881,9 @@ if ((struct usb_device *)NULL == peasycap->pusb_device) {
SAM("ERROR: peasycap->pusb_device has become NULL\n");
return -ENODEV;
}
rc = usb_set_interface(peasycap->pusb_device, peasycap->audio_interface, \
rc = usb_set_interface(peasycap->pusb_device, peasycap->audio_interface,
peasycap->audio_altsetting_on);
JOM(8, "usb_set_interface(.,%i,%i) returned %i\n", peasycap->audio_interface, \
JOM(8, "usb_set_interface(.,%i,%i) returned %i\n", peasycap->audio_interface,
peasycap->audio_altsetting_on, rc);
rc = wakeup_device(peasycap->pusb_device);
@ -1930,10 +1930,10 @@ if ((struct usb_device *)NULL == peasycap->pusb_device) {
if (!peasycap->audio_isoc_streaming) {
JOM(4, "initial submission of all audio urbs\n");
rc = usb_set_interface(peasycap->pusb_device,
peasycap->audio_interface, \
peasycap->audio_interface,
peasycap->audio_altsetting_on);
JOM(8, "usb_set_interface(.,%i,%i) returned %i\n", \
peasycap->audio_interface, \
JOM(8, "usb_set_interface(.,%i,%i) returned %i\n",
peasycap->audio_interface,
peasycap->audio_altsetting_on, rc);
isbad = 0; nospc = 0; m = 0;
@ -1946,13 +1946,13 @@ if (!peasycap->audio_isoc_streaming) {
purb->interval = 1;
purb->dev = peasycap->pusb_device;
purb->pipe = \
usb_rcvisocpipe(peasycap->pusb_device,\
purb->pipe =
usb_rcvisocpipe(peasycap->pusb_device,
peasycap->audio_endpointnumber);
purb->transfer_flags = URB_ISO_ASAP;
purb->transfer_buffer = \
purb->transfer_buffer =
peasycap->audio_isoc_buffer[isbuf].pgo;
purb->transfer_buffer_length = \
purb->transfer_buffer_length =
peasycap->audio_isoc_buffer_size;
#if defined(EASYCAP_NEEDS_ALSA)
purb->complete = easycap_alsa_complete;
@ -1961,23 +1961,23 @@ if (!peasycap->audio_isoc_streaming) {
#endif /*EASYCAP_NEEDS_ALSA*/
purb->context = peasycap;
purb->start_frame = 0;
purb->number_of_packets = \
purb->number_of_packets =
peasycap->audio_isoc_framesperdesc;
for (j = 0; j < peasycap->\
audio_isoc_framesperdesc; \
for (j = 0; j < peasycap->
audio_isoc_framesperdesc;
j++) {
purb->iso_frame_desc[j].offset = j * \
peasycap->\
purb->iso_frame_desc[j].offset = j *
peasycap->
audio_isoc_maxframesize;
purb->iso_frame_desc[j].length = \
peasycap->\
purb->iso_frame_desc[j].length =
peasycap->
audio_isoc_maxframesize;
}
rc = usb_submit_urb(purb, GFP_KERNEL);
if (0 != rc) {
isbad++;
SAM("ERROR: usb_submit_urb() failed" \
SAM("ERROR: usb_submit_urb() failed"
" for urb with rc:\n");
switch (rc) {
case -ENODEV: {
@ -2047,7 +2047,7 @@ if (!peasycap->audio_isoc_streaming) {
if (isbad) {
JOM(4, "attempting cleanup instead of submitting\n");
list_for_each(plist_head, (peasycap->purb_audio_head)) {
pdata_urb = list_entry(plist_head, struct data_urb, \
pdata_urb = list_entry(plist_head, struct data_urb,
list_head);
if (NULL != pdata_urb) {
purb = pdata_urb->purb;
@ -2103,7 +2103,7 @@ if (peasycap->audio_isoc_streaming) {
return -EFAULT;
}
} else {
JOM(8, "%i=audio_isoc_streaming, no audio urbs killed\n", \
JOM(8, "%i=audio_isoc_streaming, no audio urbs killed\n",
peasycap->audio_isoc_streaming);
}
return 0;