提交 1dc6e418 编写于 作者: T Tomas Winkler 提交者: Greg Kroah-Hartman

staging: easycap: drop redunant backslashes from the code

remove \ from the code where C syntex doesnt require it
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 2a9a05c4
...@@ -384,9 +384,9 @@ int video_eof; ...@@ -384,9 +384,9 @@ int video_eof;
int video_junk; int video_junk;
struct data_buffer video_isoc_buffer[VIDEO_ISOC_BUFFER_MANY]; 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)]; 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)]; frame_buffer[FRAME_BUFFER_MANY][(FRAME_BUFFER_SIZE/PAGE_SIZE)];
struct list_head urb_video_head; struct list_head urb_video_head;
...@@ -518,9 +518,9 @@ struct data_buffer audio_buffer[]; ...@@ -518,9 +518,9 @@ struct data_buffer audio_buffer[];
void easycap_complete(struct urb *); void easycap_complete(struct urb *);
int easycap_open(struct inode *, struct file *); int easycap_open(struct inode *, struct file *);
int easycap_release(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); unsigned long);
int easycap_ioctl(struct inode *, struct file *, unsigned int, \ int easycap_ioctl(struct inode *, struct file *, unsigned int,
unsigned long); unsigned long);
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT) #if defined(EASYCAP_IS_VIDEODEV_CLIENT)
...@@ -532,7 +532,7 @@ int videodev_release(struct video_device *); ...@@ -532,7 +532,7 @@ int videodev_release(struct video_device *);
unsigned int easycap_poll(struct file *, poll_table *); unsigned int easycap_poll(struct file *, poll_table *);
int easycap_mmap(struct file *, struct vm_area_struct *); 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 *); const struct usb_device_id *);
void easycap_usb_disconnect(struct usb_interface *); void easycap_usb_disconnect(struct usb_interface *);
void easycap_delete(struct kref *); void easycap_delete(struct kref *);
...@@ -544,14 +544,14 @@ int easycap_dqbuf(struct easycap *, int); ...@@ -544,14 +544,14 @@ int easycap_dqbuf(struct easycap *, int);
int submit_video_urbs(struct easycap *); 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 reset(struct easycap *); int reset(struct easycap *);
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);
...@@ -569,15 +569,14 @@ int easycap_alsa_probe(struct easycap *); ...@@ -569,15 +569,14 @@ int easycap_alsa_probe(struct easycap *);
void easycap_alsa_complete(struct urb *); void easycap_alsa_complete(struct urb *);
int easycap_alsa_open(struct snd_pcm_substream *); int easycap_alsa_open(struct snd_pcm_substream *);
int easycap_alsa_close(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 *); struct snd_pcm_hw_params *);
int easycap_alsa_vmalloc(struct snd_pcm_substream *, size_t); int easycap_alsa_vmalloc(struct snd_pcm_substream *, size_t);
int easycap_alsa_hw_free(struct snd_pcm_substream *); int easycap_alsa_hw_free(struct snd_pcm_substream *);
int easycap_alsa_prepare(struct snd_pcm_substream *); int easycap_alsa_prepare(struct snd_pcm_substream *);
int easycap_alsa_ack(struct snd_pcm_substream *); int easycap_alsa_ack(struct snd_pcm_substream *);
int easycap_alsa_trigger(struct snd_pcm_substream *, int); int easycap_alsa_trigger(struct snd_pcm_substream *, int);
snd_pcm_uframes_t \ snd_pcm_uframes_t easycap_alsa_pointer(struct snd_pcm_substream *);
easycap_alsa_pointer(struct snd_pcm_substream *);
struct page *easycap_alsa_page(struct snd_pcm_substream *, unsigned long); struct page *easycap_alsa_page(struct snd_pcm_substream *, unsigned long);
#else #else
...@@ -585,9 +584,9 @@ void easyoss_complete(struct urb *); ...@@ -585,9 +584,9 @@ void easyoss_complete(struct urb *);
ssize_t easyoss_read(struct file *, char __user *, size_t, loff_t *); ssize_t easyoss_read(struct file *, char __user *, size_t, loff_t *);
int easyoss_open(struct inode *, struct file *); int easyoss_open(struct inode *, struct file *);
int easyoss_release(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); unsigned long);
int easyoss_ioctl(struct inode *, struct file *, unsigned int, \ int easyoss_ioctl(struct inode *, struct file *, unsigned int,
unsigned long); unsigned long);
unsigned int easyoss_poll(struct file *, poll_table *); unsigned int easyoss_poll(struct file *, poll_table *);
void easyoss_delete(struct kref *); void easyoss_delete(struct kref *);
...@@ -619,7 +618,7 @@ int ready_saa(struct usb_device *); ...@@ -619,7 +618,7 @@ int ready_saa(struct usb_device *);
int merit_saa(struct usb_device *); 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);
......
...@@ -259,28 +259,28 @@ GET(p, 0x0114, &get4); ...@@ -259,28 +259,28 @@ GET(p, 0x0114, &get4);
GET(p, 0x0115, &get5); GET(p, 0x0115, &get5);
GET(p, 0x0116, &get6); GET(p, 0x0116, &get6);
GET(p, 0x0117, &get7); GET(p, 0x0117, &get7);
JOT(8, "0x%03X, 0x%03X, " \ JOT(8, "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X\n", \ "0x%03X, 0x%03X\n",
get0, get1, get2, get3, get4, get5, get6, get7); get0, get1, get2, get3, get4, get5, get6, get7);
JOT(8, "....cf PAL_720x526: " \ JOT(8, "....cf PAL_720x526: "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X\n", \ "0x%03X, 0x%03X\n",
0x000, 0x000, 0x001, 0x000, 0x5A0, 0x005, 0x121, 0x001); 0x000, 0x000, 0x001, 0x000, 0x5A0, 0x005, 0x121, 0x001);
JOT(8, "....cf PAL_704x526: " \ JOT(8, "....cf PAL_704x526: "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X\n", \ "0x%03X, 0x%03X\n",
0x004, 0x000, 0x001, 0x000, 0x584, 0x005, 0x121, 0x001); 0x004, 0x000, 0x001, 0x000, 0x584, 0x005, 0x121, 0x001);
JOT(8, "....cf VGA_640x480: " \ JOT(8, "....cf VGA_640x480: "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X, " \ "0x%03X, 0x%03X, "
"0x%03X, 0x%03X\n", \ "0x%03X, 0x%03X\n",
0x008, 0x000, 0x020, 0x000, 0x508, 0x005, 0x110, 0x001); 0x008, 0x000, 0x020, 0x000, 0x508, 0x005, 0x110, 0x001);
return 0; return 0;
} }
...@@ -336,13 +336,13 @@ if (NULL == p) ...@@ -336,13 +336,13 @@ if (NULL == p)
i0 = 0; i0 = 0;
if (true == ntsc) { if (true == ntsc) {
while (0xFF != saa7113configNTSC[i0].reg) { while (0xFF != saa7113configNTSC[i0].reg) {
ir = write_saa(p, saa7113configNTSC[i0].reg, \ ir = write_saa(p, saa7113configNTSC[i0].reg,
saa7113configNTSC[i0].set); saa7113configNTSC[i0].set);
i0++; i0++;
} }
} else { } else {
while (0xFF != saa7113configPAL[i0].reg) { while (0xFF != saa7113configPAL[i0].reg) {
ir = write_saa(p, saa7113configPAL[i0].reg, \ ir = write_saa(p, saa7113configPAL[i0].reg,
saa7113configPAL[i0].set); saa7113configPAL[i0].set);
i0++; i0++;
} }
...@@ -400,7 +400,7 @@ SET(p, 0x0500, 0x008B); ...@@ -400,7 +400,7 @@ SET(p, 0x0500, 0x008B);
GET(p, 0x0502, &igot); got502 = (0xFF & igot); GET(p, 0x0502, &igot); got502 = (0xFF & igot);
GET(p, 0x0503, &igot); got503 = (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)); reg0, set0, ((got503 << 8) | got502));
set502 = (0x00FF & set0); set502 = (0x00FF & set0);
...@@ -485,9 +485,9 @@ if (true == ntsc) { ...@@ -485,9 +485,9 @@ if (true == ntsc) {
ir = read_saa(p, saa7113configNTSC[i0].reg); ir = read_saa(p, saa7113configNTSC[i0].reg);
if (ir != saa7113configNTSC[i0].set) { if (ir != saa7113configNTSC[i0].set) {
SAY("SAA register 0x%02X has 0x%02X, " \ SAY("SAA register 0x%02X has 0x%02X, "
"expected 0x%02X\n", \ "expected 0x%02X\n",
saa7113configNTSC[i0].reg, \ saa7113configNTSC[i0].reg,
ir, saa7113configNTSC[i0].set); ir, saa7113configNTSC[i0].set);
rc--; rc--;
} }
...@@ -502,9 +502,9 @@ if (true == ntsc) { ...@@ -502,9 +502,9 @@ if (true == ntsc) {
ir = read_saa(p, saa7113configPAL[i0].reg); ir = read_saa(p, saa7113configPAL[i0].reg);
if (ir != saa7113configPAL[i0].set) { if (ir != saa7113configPAL[i0].set) {
SAY("SAA register 0x%02X has 0x%02X, " \ SAY("SAA register 0x%02X has 0x%02X, "
"expected 0x%02X\n", \ "expected 0x%02X\n",
saa7113configPAL[i0].reg, \ saa7113configPAL[i0].reg,
ir, saa7113configPAL[i0].set); ir, saa7113configPAL[i0].set);
rc--; rc--;
} }
...@@ -603,23 +603,23 @@ if (true == ntsc) { ...@@ -603,23 +603,23 @@ if (true == ntsc) {
} }
ir = read_stk(p, stk1160configNTSC[i0].reg); ir = read_stk(p, stk1160configNTSC[i0].reg);
if (0x100 == stk1160configNTSC[i0].reg) { if (0x100 == stk1160configNTSC[i0].reg) {
if ((ir != (0xFF & stk1160configNTSC[i0].set)) && \ if ((ir != (0xFF & stk1160configNTSC[i0].set)) &&
(ir != (0x80 | (0xFF & \ (ir != (0x80 | (0xFF &
stk1160configNTSC[i0].set))) && \ stk1160configNTSC[i0].set))) &&
(0xFFFF != \ (0xFFFF !=
stk1160configNTSC[i0].set)) { stk1160configNTSC[i0].set)) {
SAY("STK register 0x%03X has 0x%02X, " \ SAY("STK register 0x%03X has 0x%02X, "
"expected 0x%02X\n", \ "expected 0x%02X\n",
stk1160configNTSC[i0].reg, \ stk1160configNTSC[i0].reg,
ir, stk1160configNTSC[i0].set); ir, stk1160configNTSC[i0].set);
} }
i0++; continue; i0++; continue;
} }
if ((ir != (0xFF & stk1160configNTSC[i0].set)) && \ if ((ir != (0xFF & stk1160configNTSC[i0].set)) &&
(0xFFFF != stk1160configNTSC[i0].set)) { (0xFFFF != stk1160configNTSC[i0].set)) {
SAY("STK register 0x%03X has 0x%02X, " \ SAY("STK register 0x%03X has 0x%02X, "
"expected 0x%02X\n", \ "expected 0x%02X\n",
stk1160configNTSC[i0].reg, \ stk1160configNTSC[i0].reg,
ir, stk1160configNTSC[i0].set); ir, stk1160configNTSC[i0].set);
} }
i0++; i0++;
...@@ -634,23 +634,23 @@ if (true == ntsc) { ...@@ -634,23 +634,23 @@ if (true == ntsc) {
} }
ir = read_stk(p, stk1160configPAL[i0].reg); ir = read_stk(p, stk1160configPAL[i0].reg);
if (0x100 == stk1160configPAL[i0].reg) { if (0x100 == stk1160configPAL[i0].reg) {
if ((ir != (0xFF & stk1160configPAL[i0].set)) && \ if ((ir != (0xFF & stk1160configPAL[i0].set)) &&
(ir != (0x80 | (0xFF & \ (ir != (0x80 | (0xFF &
stk1160configPAL[i0].set))) && \ stk1160configPAL[i0].set))) &&
(0xFFFF != \ (0xFFFF !=
stk1160configPAL[i0].set)) { stk1160configPAL[i0].set)) {
SAY("STK register 0x%03X has 0x%02X, " \ SAY("STK register 0x%03X has 0x%02X, "
"expected 0x%02X\n", \ "expected 0x%02X\n",
stk1160configPAL[i0].reg, \ stk1160configPAL[i0].reg,
ir, stk1160configPAL[i0].set); ir, stk1160configPAL[i0].set);
} }
i0++; continue; i0++; continue;
} }
if ((ir != (0xFF & stk1160configPAL[i0].set)) && \ if ((ir != (0xFF & stk1160configPAL[i0].set)) &&
(0xFFFF != stk1160configPAL[i0].set)) { (0xFFFF != stk1160configPAL[i0].set)) {
SAY("STK register 0x%03X has 0x%02X, " \ SAY("STK register 0x%03X has 0x%02X, "
"expected 0x%02X\n", \ "expected 0x%02X\n",
stk1160configPAL[i0].reg, \ stk1160configPAL[i0].reg,
ir, stk1160configPAL[i0].set); ir, stk1160configPAL[i0].set);
} }
i0++; i0++;
...@@ -717,7 +717,7 @@ switch (input) { ...@@ -717,7 +717,7 @@ switch (input) {
case 0: case 0:
case 1: { case 1: {
if (0 != write_saa(p, 0x02, 0x80)) { 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); input);
} }
SET(p, 0x0000, 0x0098); SET(p, 0x0000, 0x0098);
...@@ -726,7 +726,7 @@ case 1: { ...@@ -726,7 +726,7 @@ case 1: {
} }
case 2: { case 2: {
if (0 != write_saa(p, 0x02, 0x80)) { 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); input);
} }
SET(p, 0x0000, 0x0090); SET(p, 0x0000, 0x0090);
...@@ -735,7 +735,7 @@ case 2: { ...@@ -735,7 +735,7 @@ case 2: {
} }
case 3: { case 3: {
if (0 != write_saa(p, 0x02, 0x80)) { 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); input);
} }
SET(p, 0x0000, 0x0088); SET(p, 0x0000, 0x0088);
...@@ -744,7 +744,7 @@ case 3: { ...@@ -744,7 +744,7 @@ case 3: {
} }
case 4: { case 4: {
if (0 != write_saa(p, 0x02, 0x80)) { 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); input);
} }
SET(p, 0x0000, 0x0080); SET(p, 0x0000, 0x0080);
...@@ -757,22 +757,22 @@ case 5: { ...@@ -757,22 +757,22 @@ case 5: {
switch (mode) { switch (mode) {
case 7: { case 7: {
if (0 != write_saa(p, 0x02, 0x87)) { 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); "for input %i\n", input);
} }
if (0 != write_saa(p, 0x05, 0xFF)) { 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); "for input %i\n", input);
} }
break; break;
} }
case 9: { case 9: {
if (0 != write_saa(p, 0x02, 0x89)) { 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); "for input %i\n", input);
} }
if (0 != write_saa(p, 0x05, 0x00)) { 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); "for input %i\n", input);
} }
break; break;
...@@ -783,11 +783,11 @@ case 5: { ...@@ -783,11 +783,11 @@ case 5: {
} }
} }
if (0 != write_saa(p, 0x04, 0x00)) { 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); input);
} }
if (0 != write_saa(p, 0x09, 0x80)) { 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); input);
} }
SET(p, 0x0002, 0x0093); SET(p, 0x0002, 0x0093);
...@@ -809,7 +809,7 @@ return 0; ...@@ -809,7 +809,7 @@ 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;
...@@ -915,25 +915,25 @@ int rc0, rc1; ...@@ -915,25 +915,25 @@ 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,
(void *)NULL, \ (void *)NULL,
(__u16)0, \ (__u16)0,
(int)500); (int)500);
#if defined(NOREADBACK) #if defined(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) {
...@@ -951,15 +951,15 @@ case 0x205: ...@@ -951,15 +951,15 @@ case 0x205:
case 0x350: case 0x350:
case 0x351: { case 0x351: {
if (0 != (0xFF & igot)) { 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); igot, index);
} }
break; break;
} }
default: { default: {
if ((0xFF & value) != (0xFF & igot)) { if ((0xFF & value) != (0xFF & igot)) {
JOT(8, "unexpected 0x%02X != 0x%02X " \ JOT(8, "unexpected 0x%02X != 0x%02X "
"for STK register 0x%03X\n", \ "for STK register 0x%03X\n",
igot, value, index); igot, value, index);
} }
break; break;
...@@ -977,13 +977,13 @@ int ir; ...@@ -977,13 +977,13 @@ 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;
} }
...@@ -993,13 +993,13 @@ wakeup_device(struct usb_device *pusb_device) ...@@ -993,13 +993,13 @@ 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);
} }
/*****************************************************************************/ /*****************************************************************************/
...@@ -1018,7 +1018,7 @@ int rc, id1, id2; ...@@ -1018,7 +1018,7 @@ int rc, id1, id2;
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
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;
...@@ -1031,24 +1031,24 @@ pusb_device = peasycap->pusb_device; ...@@ -1031,24 +1031,24 @@ pusb_device = peasycap->pusb_device;
if (NULL == pusb_device) if (NULL == pusb_device)
return -ENODEV; return -ENODEV;
JOM(8, "%02X %02X %02X %02X %02X %02X %02X %02X\n", \ JOM(8, "%02X %02X %02X %02X %02X %02X %02X %02X\n",
requesttype, request, \ requesttype, request,
(0x00FF & value_unmute), \ (0x00FF & value_unmute),
(0xFF00 & value_unmute) >> 8, \ (0xFF00 & value_unmute) >> 8,
(0x00FF & index), \ (0x00FF & index),
(0xFF00 & index) >> 8, \ (0xFF00 & index) >> 8,
(0x00FF & length), \ (0x00FF & length),
(0xFF00 & length) >> 8); (0xFF00 & length) >> 8);
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]));
...@@ -1209,7 +1209,7 @@ if (0 > igot) { ...@@ -1209,7 +1209,7 @@ if (0 > igot) {
mute = 0x8000 & ((unsigned int)igot); mute = 0x8000 & ((unsigned int)igot);
mute = 0; 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)); mute | u8 | (u8 << 8));
write_vt(pusb_device, 0x0010, (mute | u8 | (u8 << 8))); write_vt(pusb_device, 0x0010, (mute | u8 | (u8 << 8)));
write_vt(pusb_device, 0x0012, (mute | u8 | (u8 << 8))); write_vt(pusb_device, 0x0012, (mute | u8 | (u8 << 8)));
...@@ -1230,7 +1230,7 @@ if (16 <= loud) ...@@ -1230,7 +1230,7 @@ if (16 <= loud)
else else
u8 = 0; 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)); mute | u8 | (u8 << 8));
write_vt(pusb_device, 0x001C, (mute | u8 | (u8 << 8))); write_vt(pusb_device, 0x001C, (mute | u8 | (u8 << 8)));
write_vt(pusb_device, 0x001A, 0x0404); write_vt(pusb_device, 0x001A, 0x0404);
......
...@@ -44,7 +44,7 @@ const struct easycap_standard easycap_standard[] = { ...@@ -44,7 +44,7 @@ const struct easycap_standard easycap_standard[] = {
.mask = 0x00FF & PAL_BGHIN , .mask = 0x00FF & PAL_BGHIN ,
.v4l2_standard = { .v4l2_standard = {
.index = PAL_BGHIN, .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), V4L2_STD_PAL_I | V4L2_STD_PAL_N),
.name = "PAL_BGHIN", .name = "PAL_BGHIN",
.frameperiod = {1, 25}, .frameperiod = {1, 25},
...@@ -165,8 +165,8 @@ const struct easycap_standard easycap_standard[] = { ...@@ -165,8 +165,8 @@ const struct easycap_standard easycap_standard[] = {
.mask = 0x8000 | (0x00FF & PAL_BGHIN_SLOW), .mask = 0x8000 | (0x00FF & PAL_BGHIN_SLOW),
.v4l2_standard = { .v4l2_standard = {
.index = PAL_BGHIN_SLOW, .index = PAL_BGHIN_SLOW,
.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 | \ V4L2_STD_PAL_I | V4L2_STD_PAL_N |
(((v4l2_std_id)0x01) << 32)), (((v4l2_std_id)0x01) << 32)),
.name = "PAL_BGHIN_SLOW", .name = "PAL_BGHIN_SLOW",
.frameperiod = {1, 5}, .frameperiod = {1, 5},
...@@ -573,25 +573,25 @@ for (i = 0, n = 0; i < STANDARD_MANY; i++) { ...@@ -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], &name2[0]);
strcat(&easycap_format[n].name[0], &name3[0]); strcat(&easycap_format[n].name[0], &name3[0]);
strcat(&easycap_format[n].name[0], &name4[0]); strcat(&easycap_format[n].name[0], &name4[0]);
easycap_format[n].mask = \ easycap_format[n].mask =
mask1 | mask2 | mask3 | mask4; mask1 | mask2 | mask3 | mask4;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; .type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.fmt.pix.width = width; .fmt.pix.width = width;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.fmt.pix.height = height; .fmt.pix.height = height;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.fmt.pix.pixelformat = pixelformat; .fmt.pix.pixelformat = pixelformat;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.fmt.pix.field = field; .fmt.pix.field = field;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.fmt.pix.bytesperline = bytesperline; .fmt.pix.bytesperline = bytesperline;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.fmt.pix.sizeimage = sizeimage; .fmt.pix.sizeimage = sizeimage;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.fmt.pix.colorspace = colorspace; .fmt.pix.colorspace = colorspace;
easycap_format[n].v4l2_format\ easycap_format[n].v4l2_format
.fmt.pix.priv = 0; .fmt.pix.priv = 0;
n++; n++;
} }
...@@ -604,7 +604,7 @@ easycap_format[n].mask = 0xFFFF; ...@@ -604,7 +604,7 @@ easycap_format[n].mask = 0xFFFF;
return n; return n;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
struct v4l2_queryctrl easycap_control[] = \ struct v4l2_queryctrl easycap_control[] =
{{ {{
.id = V4L2_CID_BRIGHTNESS, .id = V4L2_CID_BRIGHTNESS,
.type = V4L2_CTRL_TYPE_INTEGER, .type = V4L2_CTRL_TYPE_INTEGER,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册