diff options
Diffstat (limited to 'drivers/media/video/usbvision/usbvision.h')
-rw-r--r-- | drivers/media/video/usbvision/usbvision.h | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h index 42189e500143..514115930b4a 100644 --- a/drivers/media/video/usbvision/usbvision.h +++ b/drivers/media/video/usbvision/usbvision.h | |||
@@ -132,15 +132,15 @@ | |||
132 | #define MAX_BYTES_PER_PIXEL 4 | 132 | #define MAX_BYTES_PER_PIXEL 4 |
133 | 133 | ||
134 | #define MIN_FRAME_WIDTH 64 | 134 | #define MIN_FRAME_WIDTH 64 |
135 | #define MAX_USB_WIDTH 320 //384 | 135 | #define MAX_USB_WIDTH 320 /* 384 */ |
136 | #define MAX_FRAME_WIDTH 320 //384 /*streching sometimes causes crashes*/ | 136 | #define MAX_FRAME_WIDTH 320 /* 384 */ /* streching sometimes causes crashes*/ |
137 | 137 | ||
138 | #define MIN_FRAME_HEIGHT 48 | 138 | #define MIN_FRAME_HEIGHT 48 |
139 | #define MAX_USB_HEIGHT 240 //288 | 139 | #define MAX_USB_HEIGHT 240 /* 288 */ |
140 | #define MAX_FRAME_HEIGHT 240 //288 /*Streching sometimes causes crashes*/ | 140 | #define MAX_FRAME_HEIGHT 240 /* 288 */ /* Streching sometimes causes crashes*/ |
141 | 141 | ||
142 | #define MAX_FRAME_SIZE (MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT * MAX_BYTES_PER_PIXEL) | 142 | #define MAX_FRAME_SIZE (MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT * MAX_BYTES_PER_PIXEL) |
143 | #define USBVISION_CLIPMASK_SIZE (MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT / 8) //bytesize of clipmask | 143 | #define USBVISION_CLIPMASK_SIZE (MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT / 8) /* bytesize of clipmask */ |
144 | 144 | ||
145 | #define USBVISION_URB_FRAMES 32 | 145 | #define USBVISION_URB_FRAMES 32 |
146 | 146 | ||
@@ -148,7 +148,7 @@ | |||
148 | #define USBVISION_NUMFRAMES 3 /* Maximum number of frames an application can get */ | 148 | #define USBVISION_NUMFRAMES 3 /* Maximum number of frames an application can get */ |
149 | #define USBVISION_NUMSBUF 2 /* Dimensioning the USB S buffering */ | 149 | #define USBVISION_NUMSBUF 2 /* Dimensioning the USB S buffering */ |
150 | 150 | ||
151 | #define USBVISION_POWEROFF_TIME 3 * (HZ) // 3 seconds | 151 | #define USBVISION_POWEROFF_TIME 3 * (HZ) /* 3 seconds */ |
152 | 152 | ||
153 | 153 | ||
154 | #define FRAMERATE_MIN 0 | 154 | #define FRAMERATE_MIN 0 |
@@ -287,7 +287,7 @@ struct usbvision_frame_header { | |||
287 | unsigned char magic_1; /* 0 magic */ | 287 | unsigned char magic_1; /* 0 magic */ |
288 | unsigned char magic_2; /* 1 magic */ | 288 | unsigned char magic_2; /* 1 magic */ |
289 | unsigned char header_length; /* 2 */ | 289 | unsigned char header_length; /* 2 */ |
290 | unsigned char frame_num; /* 3 */ | 290 | unsigned char frame_num; /* 3 */ |
291 | unsigned char frame_phase; /* 4 */ | 291 | unsigned char frame_phase; /* 4 */ |
292 | unsigned char frame_latency; /* 5 */ | 292 | unsigned char frame_latency; /* 5 */ |
293 | unsigned char data_format; /* 6 */ | 293 | unsigned char data_format; /* 6 */ |
@@ -322,7 +322,7 @@ struct usbvision_frame { | |||
322 | struct usbvision_v4l2_format_st v4l2_format; /* format the user needs*/ | 322 | struct usbvision_v4l2_format_st v4l2_format; /* format the user needs*/ |
323 | int v4l2_linesize; /* bytes for one videoline*/ | 323 | int v4l2_linesize; /* bytes for one videoline*/ |
324 | struct timeval timestamp; | 324 | struct timeval timestamp; |
325 | int sequence; // How many video frames we send to user | 325 | int sequence; /* How many video frames we send to user */ |
326 | }; | 326 | }; |
327 | 327 | ||
328 | #define CODEC_SAA7113 7113 | 328 | #define CODEC_SAA7113 7113 |
@@ -369,19 +369,19 @@ struct usb_usbvision { | |||
369 | unsigned char ctrl_urb_buffer[8]; | 369 | unsigned char ctrl_urb_buffer[8]; |
370 | int ctrl_urb_busy; | 370 | int ctrl_urb_busy; |
371 | struct usb_ctrlrequest ctrl_urb_setup; | 371 | struct usb_ctrlrequest ctrl_urb_setup; |
372 | wait_queue_head_t ctrl_urb_wq; // Processes waiting | 372 | wait_queue_head_t ctrl_urb_wq; /* Processes waiting */ |
373 | 373 | ||
374 | /* configuration part */ | 374 | /* configuration part */ |
375 | int have_tuner; | 375 | int have_tuner; |
376 | int tuner_type; | 376 | int tuner_type; |
377 | int bridge_type; // NT1003, NT1004, NT1005 | 377 | int bridge_type; /* NT1003, NT1004, NT1005 */ |
378 | int radio; | 378 | int radio; |
379 | int video_inputs; // # of inputs | 379 | int video_inputs; /* # of inputs */ |
380 | unsigned long freq; | 380 | unsigned long freq; |
381 | int audio_mute; | 381 | int audio_mute; |
382 | int audio_channel; | 382 | int audio_channel; |
383 | int isoc_mode; // format of video data for the usb isoc-transfer | 383 | int isoc_mode; /* format of video data for the usb isoc-transfer */ |
384 | unsigned int nr; // Number of the device | 384 | unsigned int nr; /* Number of the device */ |
385 | 385 | ||
386 | /* Device structure */ | 386 | /* Device structure */ |
387 | struct usb_device *dev; | 387 | struct usb_device *dev; |
@@ -389,7 +389,7 @@ struct usb_usbvision { | |||
389 | int num_alt; /* Number of alternative settings */ | 389 | int num_alt; /* Number of alternative settings */ |
390 | unsigned int *alt_max_pkt_size; /* array of max_packet_size */ | 390 | unsigned int *alt_max_pkt_size; /* array of max_packet_size */ |
391 | unsigned char iface; /* Video interface number */ | 391 | unsigned char iface; /* Video interface number */ |
392 | unsigned char iface_alt; /* Alt settings */ | 392 | unsigned char iface_alt; /* Alt settings */ |
393 | unsigned char vin_reg2_preset; | 393 | unsigned char vin_reg2_preset; |
394 | struct mutex v4l2_lock; | 394 | struct mutex v4l2_lock; |
395 | struct timer_list power_off_timer; | 395 | struct timer_list power_off_timer; |
@@ -411,10 +411,10 @@ struct usb_usbvision { | |||
411 | struct list_head inqueue, outqueue; /* queued frame list and ready to dequeue frame list */ | 411 | struct list_head inqueue, outqueue; /* queued frame list and ready to dequeue frame list */ |
412 | wait_queue_head_t wait_frame; /* Processes waiting */ | 412 | wait_queue_head_t wait_frame; /* Processes waiting */ |
413 | wait_queue_head_t wait_stream; /* Processes waiting */ | 413 | wait_queue_head_t wait_stream; /* Processes waiting */ |
414 | struct usbvision_frame *cur_frame; // pointer to current frame, set by usbvision_find_header | 414 | struct usbvision_frame *cur_frame; /* pointer to current frame, set by usbvision_find_header */ |
415 | struct usbvision_frame frame[USBVISION_NUMFRAMES]; // frame buffer | 415 | struct usbvision_frame frame[USBVISION_NUMFRAMES]; /* frame buffer */ |
416 | int num_frames; // number of frames allocated | 416 | int num_frames; /* number of frames allocated */ |
417 | struct usbvision_sbuf sbuf[USBVISION_NUMSBUF]; // S buffering | 417 | struct usbvision_sbuf sbuf[USBVISION_NUMSBUF]; /* S buffering */ |
418 | volatile int remove_pending; /* If set then about to exit */ | 418 | volatile int remove_pending; /* If set then about to exit */ |
419 | 419 | ||
420 | /* Scratch space from the Isochronous Pipe.*/ | 420 | /* Scratch space from the Isochronous Pipe.*/ |
@@ -432,32 +432,32 @@ struct usb_usbvision { | |||
432 | v4l2_std_id tvnorm_id; /* selected tv norm */ | 432 | v4l2_std_id tvnorm_id; /* selected tv norm */ |
433 | unsigned char video_endp; /* 0x82 for USBVISION devices based */ | 433 | unsigned char video_endp; /* 0x82 for USBVISION devices based */ |
434 | 434 | ||
435 | // Decompression stuff: | 435 | /* Decompression stuff: */ |
436 | unsigned char *intra_frame_buffer; /* Buffer for reference frame */ | 436 | unsigned char *intra_frame_buffer; /* Buffer for reference frame */ |
437 | int block_pos; //for test only | 437 | int block_pos; /* for test only */ |
438 | int request_intra; // 0 = normal; 1 = intra frame is requested; | 438 | int request_intra; /* 0 = normal; 1 = intra frame is requested; */ |
439 | int last_isoc_frame_num; // check for lost isoc frames | 439 | int last_isoc_frame_num; /* check for lost isoc frames */ |
440 | int isoc_packet_size; // need to calculate used_bandwidth | 440 | int isoc_packet_size; /* need to calculate used_bandwidth */ |
441 | int used_bandwidth; // used bandwidth 0-100%, need to set compr_level | 441 | int used_bandwidth; /* used bandwidth 0-100%, need to set compr_level */ |
442 | int compr_level; // How strong (100) or weak (0) is compression | 442 | int compr_level; /* How strong (100) or weak (0) is compression */ |
443 | int last_compr_level; // How strong (100) or weak (0) was compression | 443 | int last_compr_level; /* How strong (100) or weak (0) was compression */ |
444 | int usb_bandwidth; /* Mbit/s */ | 444 | int usb_bandwidth; /* Mbit/s */ |
445 | 445 | ||
446 | /* Statistics that can be overlayed on the screen */ | 446 | /* Statistics that can be overlayed on the screen */ |
447 | unsigned long isoc_urb_count; // How many URBs we received so far | 447 | unsigned long isoc_urb_count; /* How many URBs we received so far */ |
448 | unsigned long urb_length; /* Length of last URB */ | 448 | unsigned long urb_length; /* Length of last URB */ |
449 | unsigned long isoc_data_count; /* How many bytes we received */ | 449 | unsigned long isoc_data_count; /* How many bytes we received */ |
450 | unsigned long header_count; /* How many frame headers we found */ | 450 | unsigned long header_count; /* How many frame headers we found */ |
451 | unsigned long scratch_ovf_count; /* How many times we overflowed scratch */ | 451 | unsigned long scratch_ovf_count; /* How many times we overflowed scratch */ |
452 | unsigned long isoc_skip_count; /* How many empty ISO packets received */ | 452 | unsigned long isoc_skip_count; /* How many empty ISO packets received */ |
453 | unsigned long isoc_err_count; /* How many bad ISO packets received */ | 453 | unsigned long isoc_err_count; /* How many bad ISO packets received */ |
454 | unsigned long isoc_packet_count; // How many packets we totally got | 454 | unsigned long isoc_packet_count; /* How many packets we totally got */ |
455 | unsigned long time_in_irq; // How long do we need for interrupt | 455 | unsigned long time_in_irq; /* How long do we need for interrupt */ |
456 | int isoc_measure_bandwidth_count; | 456 | int isoc_measure_bandwidth_count; |
457 | int frame_num; // How many video frames we send to user | 457 | int frame_num; /* How many video frames we send to user */ |
458 | int max_strip_len; // How big is the biggest strip | 458 | int max_strip_len; /* How big is the biggest strip */ |
459 | int comprblock_pos; | 459 | int comprblock_pos; |
460 | int strip_len_errors; // How many times was block_pos greater than strip_len | 460 | int strip_len_errors; /* How many times was block_pos greater than strip_len */ |
461 | int strip_magic_errors; | 461 | int strip_magic_errors; |
462 | int strip_line_number_errors; | 462 | int strip_line_number_errors; |
463 | int compr_block_types[4]; | 463 | int compr_block_types[4]; |