diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 17:39:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 17:39:09 -0400 |
commit | e317234975cb7463b8ca21a93bb6862d9dcf113f (patch) | |
tree | 4446fa3a21364f3cba23a22aa2a94027f169d8df /drivers/media/video/em28xx/em28xx.h | |
parent | f37ab0fba271e43edab0e3ae9fe644fcda455402 (diff) | |
parent | 7483d45f0aee3afc0646d185cabd4af9f6cab58c (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- V4L2 API additions to better support JPEG compression control
- media API additions to properly support MPEG decoders
- V4L2 API additions for image crop/scaling
- a few other V4L2 API DocBook fixes/improvements
- two new DVB frontend drivers: m88rs2000 and rtl2830
- two new DVB drivers: az6007 and rtl28xxu
- a framework for ISA drivers, that removed lots of common code found
at the ISA radio drivers
- a new FM transmitter driver (radio-keene)
- a GPIO-based IR receiver driver
- a new sensor driver: mt9m032
- some new video drivers: adv7183, blackfin, mx2_emmaprp, sii9234_drv,
vs6624
- several new board additions, driver fixes, improvements and cleanups.
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (295 commits)
[media] update CARDLIST.em28xx
[media] partially reverts changeset fa5527c
[media] stb0899: fix the limits for signal strength values
[media] em28xx: support for 2304:0242 PCTV QuatroStick (510e)
[media] em28xx: support for 2013:0251 PCTV QuatroStick nano (520e)
[media] -EINVAL -> -ENOTTY
[media] gspca - sn9c20x: Cleanup source
[media] gspca - sn9c20x: Simplify register write for capture start/stop
[media] gspca - sn9c20x: Add automatic JPEG compression mechanism
[media] gspca - sn9c20x: Greater delay in case of sensor no response
[media] gspca - sn9c20x: Optimize the code of write sequences
[media] gspca - sn9c20x: Add the JPEG compression quality control
[media] gspca - sn9c20x: Add a delay after Omnivision sensor reset
[media] gspca - sn9c20x: Propagate USB errors to higher level
[media] gspca - sn9c20x: Use the new video control mechanism
[media] gspca - sn9c20x: Fix loss of frame start
[media] gspca - zc3xx: Lack of register 08 value for sensor cs2102k
[media] gspca - ov534_9: Add brightness to OmniVision 5621 sensor
[media] gspca - zc3xx: Add V4L2_CID_JPEG_COMPRESSION_QUALITY control support
[media] pvrusb2: fix 7MHz & 8MHz DVB-T tuner support for HVR1900 rev D1F5
...
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 22e252bcc41e..2868b19f8b54 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -125,6 +125,9 @@ | |||
125 | #define EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C 81 | 125 | #define EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C 81 |
126 | #define EM2884_BOARD_CINERGY_HTC_STICK 82 | 126 | #define EM2884_BOARD_CINERGY_HTC_STICK 82 |
127 | #define EM2860_BOARD_HT_VIDBOX_NW03 83 | 127 | #define EM2860_BOARD_HT_VIDBOX_NW03 83 |
128 | #define EM2874_BOARD_MAXMEDIA_UB425_TC 84 | ||
129 | #define EM2884_BOARD_PCTV_510E 85 | ||
130 | #define EM2884_BOARD_PCTV_520E 86 | ||
128 | 131 | ||
129 | /* Limits minimum and default number of buffers */ | 132 | /* Limits minimum and default number of buffers */ |
130 | #define EM28XX_MIN_BUF 4 | 133 | #define EM28XX_MIN_BUF 4 |
@@ -151,12 +154,14 @@ | |||
151 | 154 | ||
152 | /* number of buffers for isoc transfers */ | 155 | /* number of buffers for isoc transfers */ |
153 | #define EM28XX_NUM_BUFS 5 | 156 | #define EM28XX_NUM_BUFS 5 |
157 | #define EM28XX_DVB_NUM_BUFS 5 | ||
154 | 158 | ||
155 | /* number of packets for each buffer | 159 | /* number of packets for each buffer |
156 | windows requests only 64 packets .. so we better do the same | 160 | windows requests only 64 packets .. so we better do the same |
157 | this is what I found out for all alternate numbers there! | 161 | this is what I found out for all alternate numbers there! |
158 | */ | 162 | */ |
159 | #define EM28XX_NUM_PACKETS 64 | 163 | #define EM28XX_NUM_PACKETS 64 |
164 | #define EM28XX_DVB_MAX_PACKETS 64 | ||
160 | 165 | ||
161 | #define EM28XX_INTERLACED_DEFAULT 1 | 166 | #define EM28XX_INTERLACED_DEFAULT 1 |
162 | 167 | ||
@@ -197,10 +202,13 @@ enum em28xx_mode { | |||
197 | 202 | ||
198 | struct em28xx; | 203 | struct em28xx; |
199 | 204 | ||
200 | struct em28xx_usb_isoc_ctl { | 205 | struct em28xx_usb_isoc_bufs { |
201 | /* max packet size of isoc transaction */ | 206 | /* max packet size of isoc transaction */ |
202 | int max_pkt_size; | 207 | int max_pkt_size; |
203 | 208 | ||
209 | /* number of packets in each buffer */ | ||
210 | int num_packets; | ||
211 | |||
204 | /* number of allocated urbs */ | 212 | /* number of allocated urbs */ |
205 | int num_bufs; | 213 | int num_bufs; |
206 | 214 | ||
@@ -209,6 +217,14 @@ struct em28xx_usb_isoc_ctl { | |||
209 | 217 | ||
210 | /* transfer buffers for isoc transfer */ | 218 | /* transfer buffers for isoc transfer */ |
211 | char **transfer_buffer; | 219 | char **transfer_buffer; |
220 | }; | ||
221 | |||
222 | struct em28xx_usb_isoc_ctl { | ||
223 | /* isoc transfer buffers for analog mode */ | ||
224 | struct em28xx_usb_isoc_bufs analog_bufs; | ||
225 | |||
226 | /* isoc transfer buffers for digital mode */ | ||
227 | struct em28xx_usb_isoc_bufs digital_bufs; | ||
212 | 228 | ||
213 | /* Last buffer command and region */ | 229 | /* Last buffer command and region */ |
214 | u8 cmd; | 230 | u8 cmd; |
@@ -600,9 +616,6 @@ struct em28xx { | |||
600 | unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */ | 616 | unsigned int *alt_max_pkt_size; /* array of wMaxPacketSize */ |
601 | int dvb_alt; /* alternate for DVB */ | 617 | int dvb_alt; /* alternate for DVB */ |
602 | unsigned int dvb_max_pkt_size; /* wMaxPacketSize for DVB */ | 618 | unsigned int dvb_max_pkt_size; /* wMaxPacketSize for DVB */ |
603 | struct urb *urb[EM28XX_NUM_BUFS]; /* urb for isoc transfers */ | ||
604 | char *transfer_buffer[EM28XX_NUM_BUFS]; /* transfer buffers for isoc | ||
605 | transfer */ | ||
606 | char urb_buf[URB_MAX_CTRL_SIZE]; /* urb control msg buffer */ | 619 | char urb_buf[URB_MAX_CTRL_SIZE]; /* urb control msg buffer */ |
607 | 620 | ||
608 | /* helper funcs that call usb_control_msg */ | 621 | /* helper funcs that call usb_control_msg */ |
@@ -676,10 +689,12 @@ int em28xx_vbi_supported(struct em28xx *dev); | |||
676 | int em28xx_set_outfmt(struct em28xx *dev); | 689 | int em28xx_set_outfmt(struct em28xx *dev); |
677 | int em28xx_resolution_set(struct em28xx *dev); | 690 | int em28xx_resolution_set(struct em28xx *dev); |
678 | int em28xx_set_alternate(struct em28xx *dev); | 691 | int em28xx_set_alternate(struct em28xx *dev); |
679 | int em28xx_init_isoc(struct em28xx *dev, int max_packets, | 692 | int em28xx_alloc_isoc(struct em28xx *dev, enum em28xx_mode mode, |
680 | int num_bufs, int max_pkt_size, | 693 | int max_packets, int num_bufs, int max_pkt_size); |
694 | int em28xx_init_isoc(struct em28xx *dev, enum em28xx_mode mode, | ||
695 | int max_packets, int num_bufs, int max_pkt_size, | ||
681 | int (*isoc_copy) (struct em28xx *dev, struct urb *urb)); | 696 | int (*isoc_copy) (struct em28xx *dev, struct urb *urb)); |
682 | void em28xx_uninit_isoc(struct em28xx *dev); | 697 | void em28xx_uninit_isoc(struct em28xx *dev, enum em28xx_mode mode); |
683 | int em28xx_isoc_dvb_max_packetsize(struct em28xx *dev); | 698 | int em28xx_isoc_dvb_max_packetsize(struct em28xx *dev); |
684 | int em28xx_set_mode(struct em28xx *dev, enum em28xx_mode set_mode); | 699 | int em28xx_set_mode(struct em28xx *dev, enum em28xx_mode set_mode); |
685 | int em28xx_gpio_set(struct em28xx *dev, struct em28xx_reg_seq *gpio); | 700 | int em28xx_gpio_set(struct em28xx *dev, struct em28xx_reg_seq *gpio); |