diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 0f2ba9a40d17..0a73e8bf0d6e 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -109,6 +109,7 @@ | |||
109 | #define EM2882_BOARD_EVGA_INDTUBE 70 | 109 | #define EM2882_BOARD_EVGA_INDTUBE 70 |
110 | #define EM2820_BOARD_SILVERCREST_WEBCAM 71 | 110 | #define EM2820_BOARD_SILVERCREST_WEBCAM 71 |
111 | #define EM2861_BOARD_GADMEI_UTV330PLUS 72 | 111 | #define EM2861_BOARD_GADMEI_UTV330PLUS 72 |
112 | #define EM2870_BOARD_REDDO_DVB_C_USB_BOX 73 | ||
112 | 113 | ||
113 | /* Limits minimum and default number of buffers */ | 114 | /* Limits minimum and default number of buffers */ |
114 | #define EM28XX_MIN_BUF 4 | 115 | #define EM28XX_MIN_BUF 4 |
@@ -214,7 +215,8 @@ struct em28xx_usb_isoc_ctl { | |||
214 | int tmp_buf_len; | 215 | int tmp_buf_len; |
215 | 216 | ||
216 | /* Stores already requested buffers */ | 217 | /* Stores already requested buffers */ |
217 | struct em28xx_buffer *buf; | 218 | struct em28xx_buffer *vid_buf; |
219 | struct em28xx_buffer *vbi_buf; | ||
218 | 220 | ||
219 | /* Stores the number of received fields */ | 221 | /* Stores the number of received fields */ |
220 | int nfields; | 222 | int nfields; |
@@ -443,6 +445,10 @@ enum em28xx_dev_state { | |||
443 | #define EM28XX_AUDIO 0x10 | 445 | #define EM28XX_AUDIO 0x10 |
444 | #define EM28XX_DVB 0x20 | 446 | #define EM28XX_DVB 0x20 |
445 | 447 | ||
448 | /* em28xx resource types (used for res_get/res_lock etc */ | ||
449 | #define EM28XX_RESOURCE_VIDEO 0x01 | ||
450 | #define EM28XX_RESOURCE_VBI 0x02 | ||
451 | |||
446 | struct em28xx_audio { | 452 | struct em28xx_audio { |
447 | char name[50]; | 453 | char name[50]; |
448 | char *transfer_buffer[EM28XX_AUDIO_BUFS]; | 454 | char *transfer_buffer[EM28XX_AUDIO_BUFS]; |
@@ -463,10 +469,11 @@ struct em28xx; | |||
463 | 469 | ||
464 | struct em28xx_fh { | 470 | struct em28xx_fh { |
465 | struct em28xx *dev; | 471 | struct em28xx *dev; |
466 | unsigned int stream_on:1; /* Locks streams */ | ||
467 | int radio; | 472 | int radio; |
473 | unsigned int resources; | ||
468 | 474 | ||
469 | struct videobuf_queue vb_vidq; | 475 | struct videobuf_queue vb_vidq; |
476 | struct videobuf_queue vb_vbiq; | ||
470 | 477 | ||
471 | enum v4l2_buf_type type; | 478 | enum v4l2_buf_type type; |
472 | }; | 479 | }; |
@@ -493,7 +500,6 @@ struct em28xx { | |||
493 | /* Vinmode/Vinctl used at the driver */ | 500 | /* Vinmode/Vinctl used at the driver */ |
494 | int vinmode, vinctl; | 501 | int vinmode, vinctl; |
495 | 502 | ||
496 | unsigned int stream_on:1; /* Locks streams */ | ||
497 | unsigned int has_audio_class:1; | 503 | unsigned int has_audio_class:1; |
498 | unsigned int has_alsa_audio:1; | 504 | unsigned int has_alsa_audio:1; |
499 | 505 | ||
@@ -544,6 +550,12 @@ struct em28xx { | |||
544 | enum em28xx_dev_state state; | 550 | enum em28xx_dev_state state; |
545 | enum em28xx_io_method io; | 551 | enum em28xx_io_method io; |
546 | 552 | ||
553 | /* vbi related state tracking */ | ||
554 | int capture_type; | ||
555 | int vbi_read; | ||
556 | unsigned char cur_field; | ||
557 | |||
558 | |||
547 | struct work_struct request_module_wk; | 559 | struct work_struct request_module_wk; |
548 | 560 | ||
549 | /* locks */ | 561 | /* locks */ |
@@ -555,10 +567,14 @@ struct em28xx { | |||
555 | struct video_device *vbi_dev; | 567 | struct video_device *vbi_dev; |
556 | struct video_device *radio_dev; | 568 | struct video_device *radio_dev; |
557 | 569 | ||
570 | /* resources in use */ | ||
571 | unsigned int resources; | ||
572 | |||
558 | unsigned char eedata[256]; | 573 | unsigned char eedata[256]; |
559 | 574 | ||
560 | /* Isoc control struct */ | 575 | /* Isoc control struct */ |
561 | struct em28xx_dmaqueue vidq; | 576 | struct em28xx_dmaqueue vidq; |
577 | struct em28xx_dmaqueue vbiq; | ||
562 | struct em28xx_usb_isoc_ctl isoc_ctl; | 578 | struct em28xx_usb_isoc_ctl isoc_ctl; |
563 | spinlock_t slock; | 579 | spinlock_t slock; |
564 | 580 | ||
@@ -639,6 +655,7 @@ int em28xx_audio_setup(struct em28xx *dev); | |||
639 | 655 | ||
640 | int em28xx_colorlevels_set_default(struct em28xx *dev); | 656 | int em28xx_colorlevels_set_default(struct em28xx *dev); |
641 | int em28xx_capture_start(struct em28xx *dev, int start); | 657 | int em28xx_capture_start(struct em28xx *dev, int start); |
658 | int em28xx_vbi_supported(struct em28xx *dev); | ||
642 | int em28xx_set_outfmt(struct em28xx *dev); | 659 | int em28xx_set_outfmt(struct em28xx *dev); |
643 | int em28xx_resolution_set(struct em28xx *dev); | 660 | int em28xx_resolution_set(struct em28xx *dev); |
644 | int em28xx_set_alternate(struct em28xx *dev); | 661 | int em28xx_set_alternate(struct em28xx *dev); |
@@ -686,6 +703,9 @@ void em28xx_deregister_snapshot_button(struct em28xx *dev); | |||
686 | int em28xx_ir_init(struct em28xx *dev); | 703 | int em28xx_ir_init(struct em28xx *dev); |
687 | int em28xx_ir_fini(struct em28xx *dev); | 704 | int em28xx_ir_fini(struct em28xx *dev); |
688 | 705 | ||
706 | /* Provided by em28xx-vbi.c */ | ||
707 | extern struct videobuf_queue_ops em28xx_vbi_qops; | ||
708 | |||
689 | /* printk macros */ | 709 | /* printk macros */ |
690 | 710 | ||
691 | #define em28xx_err(fmt, arg...) do {\ | 711 | #define em28xx_err(fmt, arg...) do {\ |