aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-15 12:22:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-15 12:22:18 -0400
commit043fe50f8085c12651c96f04576eae4d8a22f3d8 (patch)
tree214b4f985ce7d3b1a4961620e2c2f4f5f06e1c35 /include
parent227423904c709a8e60245c97081bbeb4fb500655 (diff)
parentea47689e74a1637fac4f5fc44890f3662c976849 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (213 commits) V4L/DVB (12720): em28xx-cards: Add vendor/product id for Kworld DVD Maker 2 V4L/DVB (12713): em28xx: Cleanups at ir_i2c handler V4L/DVB (12712): em28xx: properly load ir-kbd-i2c when needed V4L/DVB (12701): saa7134: ir-kbd-i2c init data needs a persistent object V4L/DVB (12699): cx18: ir-kbd-i2c initialization data should point to a persistent object V4L/DVB (12698): em28xx: ir-kbd-i2c init data needs a persistent object V4L/DVB (12707): gspca - sn9c20x: Add SXGA support to MT9M111 V4L/DVB (12706): gspca - sn9c20x: disable exposure/gain controls for MT9M111 sensors. V4L/DVB (12705): gspca - sn9c20x: Add SXGA support to SOI968 V4L/DVB (12703): gspca - sn9c20x: Reduces size of object V4L/DVB (12704): gspca - sn9c20x: Fix exposure on SOI968 sensors V4L/DVB (12696): gspca - sonixj / sn9c102: Two drivers for 0c45:60fc and 0c45:613e. V4L/DVB (12695): gspca - vc032x: Do the LED work with the sensor hv7131r. V4L/DVB (12694): gspca - vc032x: Change the start exchanges of the sensor hv7131r. V4L/DVB (12693): gspca - sunplus: The brightness is signed. V4L/DVB (12692): gspca - sunplus: Optimize code. V4L/DVB (12691): gspca - sonixj: Don't use mdelay(). V4L/DVB (12690): gspca - pac7311: Webcam 06f8:3009 added. V4L/DVB (12686): dvb-core: check supported QAM modulations V4L/DVB (12685): dvb-core: check fe->ops.set_frontend return value ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/dvb/dmx.h2
-rw-r--r--include/linux/usb/video.h164
-rw-r--r--include/linux/videodev2.h105
-rw-r--r--include/media/ir-common.h138
-rw-r--r--include/media/ir-kbd-i2c.h22
-rw-r--r--include/media/radio-si4713.h30
-rw-r--r--include/media/si4713.h49
-rw-r--r--include/media/tuner.h1
-rw-r--r--include/media/v4l2-subdev.h5
9 files changed, 429 insertions, 87 deletions
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h
index fef943738a24..f078f3ac82d4 100644
--- a/include/linux/dvb/dmx.h
+++ b/include/linux/dvb/dmx.h
@@ -151,5 +151,7 @@ struct dmx_stc {
151#define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t) 151#define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t)
152#define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t) 152#define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t)
153#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc) 153#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
154#define DMX_ADD_PID _IOW('o', 51, __u16)
155#define DMX_REMOVE_PID _IOW('o', 52, __u16)
154 156
155#endif /*_DVBDMX_H_*/ 157#endif /*_DVBDMX_H_*/
diff --git a/include/linux/usb/video.h b/include/linux/usb/video.h
new file mode 100644
index 000000000000..be436d9ee479
--- /dev/null
+++ b/include/linux/usb/video.h
@@ -0,0 +1,164 @@
1/*
2 * USB Video Class definitions.
3 *
4 * Copyright (C) 2009 Laurent Pinchart <laurent.pinchart@skynet.be>
5 *
6 * This file holds USB constants and structures defined by the USB Device
7 * Class Definition for Video Devices. Unless otherwise stated, comments
8 * below reference relevant sections of the USB Video Class 1.1 specification
9 * available at
10 *
11 * http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1.zip
12 */
13
14#ifndef __LINUX_USB_VIDEO_H
15#define __LINUX_USB_VIDEO_H
16
17#include <linux/types.h>
18
19/* --------------------------------------------------------------------------
20 * UVC constants
21 */
22
23/* A.2. Video Interface Subclass Codes */
24#define UVC_SC_UNDEFINED 0x00
25#define UVC_SC_VIDEOCONTROL 0x01
26#define UVC_SC_VIDEOSTREAMING 0x02
27#define UVC_SC_VIDEO_INTERFACE_COLLECTION 0x03
28
29/* A.3. Video Interface Protocol Codes */
30#define UVC_PC_PROTOCOL_UNDEFINED 0x00
31
32/* A.5. Video Class-Specific VC Interface Descriptor Subtypes */
33#define UVC_VC_DESCRIPTOR_UNDEFINED 0x00
34#define UVC_VC_HEADER 0x01
35#define UVC_VC_INPUT_TERMINAL 0x02
36#define UVC_VC_OUTPUT_TERMINAL 0x03
37#define UVC_VC_SELECTOR_UNIT 0x04
38#define UVC_VC_PROCESSING_UNIT 0x05
39#define UVC_VC_EXTENSION_UNIT 0x06
40
41/* A.6. Video Class-Specific VS Interface Descriptor Subtypes */
42#define UVC_VS_UNDEFINED 0x00
43#define UVC_VS_INPUT_HEADER 0x01
44#define UVC_VS_OUTPUT_HEADER 0x02
45#define UVC_VS_STILL_IMAGE_FRAME 0x03
46#define UVC_VS_FORMAT_UNCOMPRESSED 0x04
47#define UVC_VS_FRAME_UNCOMPRESSED 0x05
48#define UVC_VS_FORMAT_MJPEG 0x06
49#define UVC_VS_FRAME_MJPEG 0x07
50#define UVC_VS_FORMAT_MPEG2TS 0x0a
51#define UVC_VS_FORMAT_DV 0x0c
52#define UVC_VS_COLORFORMAT 0x0d
53#define UVC_VS_FORMAT_FRAME_BASED 0x10
54#define UVC_VS_FRAME_FRAME_BASED 0x11
55#define UVC_VS_FORMAT_STREAM_BASED 0x12
56
57/* A.7. Video Class-Specific Endpoint Descriptor Subtypes */
58#define UVC_EP_UNDEFINED 0x00
59#define UVC_EP_GENERAL 0x01
60#define UVC_EP_ENDPOINT 0x02
61#define UVC_EP_INTERRUPT 0x03
62
63/* A.8. Video Class-Specific Request Codes */
64#define UVC_RC_UNDEFINED 0x00
65#define UVC_SET_CUR 0x01
66#define UVC_GET_CUR 0x81
67#define UVC_GET_MIN 0x82
68#define UVC_GET_MAX 0x83
69#define UVC_GET_RES 0x84
70#define UVC_GET_LEN 0x85
71#define UVC_GET_INFO 0x86
72#define UVC_GET_DEF 0x87
73
74/* A.9.1. VideoControl Interface Control Selectors */
75#define UVC_VC_CONTROL_UNDEFINED 0x00
76#define UVC_VC_VIDEO_POWER_MODE_CONTROL 0x01
77#define UVC_VC_REQUEST_ERROR_CODE_CONTROL 0x02
78
79/* A.9.2. Terminal Control Selectors */
80#define UVC_TE_CONTROL_UNDEFINED 0x00
81
82/* A.9.3. Selector Unit Control Selectors */
83#define UVC_SU_CONTROL_UNDEFINED 0x00
84#define UVC_SU_INPUT_SELECT_CONTROL 0x01
85
86/* A.9.4. Camera Terminal Control Selectors */
87#define UVC_CT_CONTROL_UNDEFINED 0x00
88#define UVC_CT_SCANNING_MODE_CONTROL 0x01
89#define UVC_CT_AE_MODE_CONTROL 0x02
90#define UVC_CT_AE_PRIORITY_CONTROL 0x03
91#define UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04
92#define UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05
93#define UVC_CT_FOCUS_ABSOLUTE_CONTROL 0x06
94#define UVC_CT_FOCUS_RELATIVE_CONTROL 0x07
95#define UVC_CT_FOCUS_AUTO_CONTROL 0x08
96#define UVC_CT_IRIS_ABSOLUTE_CONTROL 0x09
97#define UVC_CT_IRIS_RELATIVE_CONTROL 0x0a
98#define UVC_CT_ZOOM_ABSOLUTE_CONTROL 0x0b
99#define UVC_CT_ZOOM_RELATIVE_CONTROL 0x0c
100#define UVC_CT_PANTILT_ABSOLUTE_CONTROL 0x0d
101#define UVC_CT_PANTILT_RELATIVE_CONTROL 0x0e
102#define UVC_CT_ROLL_ABSOLUTE_CONTROL 0x0f
103#define UVC_CT_ROLL_RELATIVE_CONTROL 0x10
104#define UVC_CT_PRIVACY_CONTROL 0x11
105
106/* A.9.5. Processing Unit Control Selectors */
107#define UVC_PU_CONTROL_UNDEFINED 0x00
108#define UVC_PU_BACKLIGHT_COMPENSATION_CONTROL 0x01
109#define UVC_PU_BRIGHTNESS_CONTROL 0x02
110#define UVC_PU_CONTRAST_CONTROL 0x03
111#define UVC_PU_GAIN_CONTROL 0x04
112#define UVC_PU_POWER_LINE_FREQUENCY_CONTROL 0x05
113#define UVC_PU_HUE_CONTROL 0x06
114#define UVC_PU_SATURATION_CONTROL 0x07
115#define UVC_PU_SHARPNESS_CONTROL 0x08
116#define UVC_PU_GAMMA_CONTROL 0x09
117#define UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a
118#define UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b
119#define UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c
120#define UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d
121#define UVC_PU_DIGITAL_MULTIPLIER_CONTROL 0x0e
122#define UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f
123#define UVC_PU_HUE_AUTO_CONTROL 0x10
124#define UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11
125#define UVC_PU_ANALOG_LOCK_STATUS_CONTROL 0x12
126
127/* A.9.7. VideoStreaming Interface Control Selectors */
128#define UVC_VS_CONTROL_UNDEFINED 0x00
129#define UVC_VS_PROBE_CONTROL 0x01
130#define UVC_VS_COMMIT_CONTROL 0x02
131#define UVC_VS_STILL_PROBE_CONTROL 0x03
132#define UVC_VS_STILL_COMMIT_CONTROL 0x04
133#define UVC_VS_STILL_IMAGE_TRIGGER_CONTROL 0x05
134#define UVC_VS_STREAM_ERROR_CODE_CONTROL 0x06
135#define UVC_VS_GENERATE_KEY_FRAME_CONTROL 0x07
136#define UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08
137#define UVC_VS_SYNC_DELAY_CONTROL 0x09
138
139/* B.1. USB Terminal Types */
140#define UVC_TT_VENDOR_SPECIFIC 0x0100
141#define UVC_TT_STREAMING 0x0101
142
143/* B.2. Input Terminal Types */
144#define UVC_ITT_VENDOR_SPECIFIC 0x0200
145#define UVC_ITT_CAMERA 0x0201
146#define UVC_ITT_MEDIA_TRANSPORT_INPUT 0x0202
147
148/* B.3. Output Terminal Types */
149#define UVC_OTT_VENDOR_SPECIFIC 0x0300
150#define UVC_OTT_DISPLAY 0x0301
151#define UVC_OTT_MEDIA_TRANSPORT_OUTPUT 0x0302
152
153/* B.4. External Terminal Types */
154#define UVC_EXTERNAL_VENDOR_SPECIFIC 0x0400
155#define UVC_COMPOSITE_CONNECTOR 0x0401
156#define UVC_SVIDEO_CONNECTOR 0x0402
157#define UVC_COMPONENT_CONNECTOR 0x0403
158
159/* 2.4.2.2. Status Packet Type */
160#define UVC_STATUS_TYPE_CONTROL 1
161#define UVC_STATUS_TYPE_STREAMING 2
162
163#endif /* __LINUX_USB_VIDEO_H */
164
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 74f16876f38d..3689d7d81fe9 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -167,6 +167,7 @@ enum v4l2_ctrl_type {
167 V4L2_CTRL_TYPE_BUTTON = 4, 167 V4L2_CTRL_TYPE_BUTTON = 4,
168 V4L2_CTRL_TYPE_INTEGER64 = 5, 168 V4L2_CTRL_TYPE_INTEGER64 = 5,
169 V4L2_CTRL_TYPE_CTRL_CLASS = 6, 169 V4L2_CTRL_TYPE_CTRL_CLASS = 6,
170 V4L2_CTRL_TYPE_STRING = 7,
170}; 171};
171 172
172enum v4l2_tuner_type { 173enum v4l2_tuner_type {
@@ -252,10 +253,12 @@ struct v4l2_capability {
252#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ 253#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
253#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */ 254#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */
254#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ 255#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */
256#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */
255 257
256#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ 258#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
257#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ 259#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
258#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ 260#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
261#define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */
259 262
260#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ 263#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
261#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ 264#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
@@ -275,7 +278,9 @@ struct v4l2_pix_format {
275 __u32 priv; /* private data, depends on pixelformat */ 278 __u32 priv; /* private data, depends on pixelformat */
276}; 279};
277 280
278/* Pixel format FOURCC depth Description */ 281/* Pixel format FOURCC depth Description */
282
283/* RGB formats */
279#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ 284#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */
280#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ 285#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */
281#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ 286#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
@@ -286,12 +291,20 @@ struct v4l2_pix_format {
286#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ 291#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
287#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ 292#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
288#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ 293#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */
294
295/* Grey formats */
289#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ 296#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
290#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ 297#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
298
299/* Palette formats */
291#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ 300#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */
301
302/* Luminance+Chrominance formats */
292#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ 303#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */
293#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ 304#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */
294#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */ 305#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */
306#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */
307#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */
295#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */ 308#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */
296#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */ 309#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */
297#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ 310#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */
@@ -301,6 +314,10 @@ struct v4l2_pix_format {
301#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ 314#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
302#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ 315#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
303#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ 316#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
317#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */
318#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */
319#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */
320#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */
304 321
305/* two planes -- one Y, one Cr + Cb interleaved */ 322/* two planes -- one Y, one Cr + Cb interleaved */
306#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ 323#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */
@@ -308,25 +325,17 @@ struct v4l2_pix_format {
308#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ 325#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */
309#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ 326#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */
310 327
311/* The following formats are not defined in the V4L2 specification */ 328/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
312#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */
313#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */
314#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */
315#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */
316#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */
317
318/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
319#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ 329#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
320#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ 330#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
321#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ 331#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */
322 332#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10bit raw bayer */
323/* 333 /* 10bit raw bayer DPCM compressed to 8 bits */
324 * 10bit raw bayer, expanded to 16 bits
325 * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
326 */
327#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
328/* 10bit raw bayer DPCM compressed to 8 bits */
329#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') 334#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
335 /*
336 * 10bit raw bayer, expanded to 16 bits
337 * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
338 */
330#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ 339#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */
331 340
332/* compressed formats */ 341/* compressed formats */
@@ -350,7 +359,6 @@ struct v4l2_pix_format {
350#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ 359#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
351#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ 360#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */
352#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ 361#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
353#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */
354#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ 362#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
355#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ 363#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
356 364
@@ -367,6 +375,7 @@ struct v4l2_fmtdesc {
367}; 375};
368 376
369#define V4L2_FMT_FLAG_COMPRESSED 0x0001 377#define V4L2_FMT_FLAG_COMPRESSED 0x0001
378#define V4L2_FMT_FLAG_EMULATED 0x0002
370 379
371#if 1 380#if 1
372 /* Experimental Frame Size and frame rate enumeration */ 381 /* Experimental Frame Size and frame rate enumeration */
@@ -788,11 +797,12 @@ struct v4l2_control {
788 797
789struct v4l2_ext_control { 798struct v4l2_ext_control {
790 __u32 id; 799 __u32 id;
791 __u32 reserved2[2]; 800 __u32 size;
801 __u32 reserved2[1];
792 union { 802 union {
793 __s32 value; 803 __s32 value;
794 __s64 value64; 804 __s64 value64;
795 void *reserved; 805 char *string;
796 }; 806 };
797} __attribute__ ((packed)); 807} __attribute__ ((packed));
798 808
@@ -808,6 +818,7 @@ struct v4l2_ext_controls {
808#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ 818#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
809#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ 819#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
810#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ 820#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */
821#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */
811 822
812#define V4L2_CTRL_ID_MASK (0x0fffffff) 823#define V4L2_CTRL_ID_MASK (0x0fffffff)
813#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) 824#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
@@ -1147,6 +1158,39 @@ enum v4l2_exposure_auto_type {
1147 1158
1148#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) 1159#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
1149 1160
1161/* FM Modulator class control IDs */
1162#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
1163#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
1164
1165#define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1)
1166#define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2)
1167#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3)
1168#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5)
1169#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6)
1170
1171#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64)
1172#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65)
1173#define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66)
1174
1175#define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80)
1176#define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81)
1177#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82)
1178#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
1179#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84)
1180
1181#define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96)
1182#define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97)
1183#define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98)
1184
1185#define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112)
1186enum v4l2_preemphasis {
1187 V4L2_PREEMPHASIS_DISABLED = 0,
1188 V4L2_PREEMPHASIS_50_uS = 1,
1189 V4L2_PREEMPHASIS_75_uS = 2,
1190};
1191#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113)
1192#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114)
1193
1150/* 1194/*
1151 * T U N I N G 1195 * T U N I N G
1152 */ 1196 */
@@ -1181,6 +1225,7 @@ struct v4l2_modulator {
1181#define V4L2_TUNER_CAP_LANG2 0x0020 1225#define V4L2_TUNER_CAP_LANG2 0x0020
1182#define V4L2_TUNER_CAP_SAP 0x0020 1226#define V4L2_TUNER_CAP_SAP 0x0020
1183#define V4L2_TUNER_CAP_LANG1 0x0040 1227#define V4L2_TUNER_CAP_LANG1 0x0040
1228#define V4L2_TUNER_CAP_RDS 0x0080
1184 1229
1185/* Flags for the 'rxsubchans' field */ 1230/* Flags for the 'rxsubchans' field */
1186#define V4L2_TUNER_SUB_MONO 0x0001 1231#define V4L2_TUNER_SUB_MONO 0x0001
@@ -1188,6 +1233,7 @@ struct v4l2_modulator {
1188#define V4L2_TUNER_SUB_LANG2 0x0004 1233#define V4L2_TUNER_SUB_LANG2 0x0004
1189#define V4L2_TUNER_SUB_SAP 0x0004 1234#define V4L2_TUNER_SUB_SAP 0x0004
1190#define V4L2_TUNER_SUB_LANG1 0x0008 1235#define V4L2_TUNER_SUB_LANG1 0x0008
1236#define V4L2_TUNER_SUB_RDS 0x0010
1191 1237
1192/* Values for the 'audmode' field */ 1238/* Values for the 'audmode' field */
1193#define V4L2_TUNER_MODE_MONO 0x0000 1239#define V4L2_TUNER_MODE_MONO 0x0000
@@ -1213,6 +1259,27 @@ struct v4l2_hw_freq_seek {
1213}; 1259};
1214 1260
1215/* 1261/*
1262 * R D S
1263 */
1264
1265struct v4l2_rds_data {
1266 __u8 lsb;
1267 __u8 msb;
1268 __u8 block;
1269} __attribute__ ((packed));
1270
1271#define V4L2_RDS_BLOCK_MSK 0x7
1272#define V4L2_RDS_BLOCK_A 0
1273#define V4L2_RDS_BLOCK_B 1
1274#define V4L2_RDS_BLOCK_C 2
1275#define V4L2_RDS_BLOCK_D 3
1276#define V4L2_RDS_BLOCK_C_ALT 4
1277#define V4L2_RDS_BLOCK_INVALID 7
1278
1279#define V4L2_RDS_BLOCK_CORRECTED 0x40
1280#define V4L2_RDS_BLOCK_ERROR 0x80
1281
1282/*
1216 * A U D I O 1283 * A U D I O
1217 */ 1284 */
1218struct v4l2_audio { 1285struct v4l2_audio {
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 9dcb632f6083..29f0e53cff94 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -31,8 +31,18 @@
31#define IR_TYPE_PD 2 /* Pulse distance encoded IR */ 31#define IR_TYPE_PD 2 /* Pulse distance encoded IR */
32#define IR_TYPE_OTHER 99 32#define IR_TYPE_OTHER 99
33 33
34#define IR_KEYTAB_TYPE u32 34#define IR_KEYTAB_TYPE u32
35#define IR_KEYTAB_SIZE 128 // enougth for rc5, probably need more some day ... 35#define IR_KEYTAB_SIZE 128 /* enougth for rc5, probably need more some day */
36
37struct ir_scancode {
38 u16 scancode;
39 u32 keycode;
40};
41
42struct ir_scancode_table {
43 struct ir_scancode *scan;
44 int size;
45};
36 46
37#define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \ 47#define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \
38 ? tab[code] : KEY_RESERVED) 48 ? tab[code] : KEY_RESERVED)
@@ -93,7 +103,7 @@ struct card_ir {
93}; 103};
94 104
95void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, 105void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
96 int ir_type, IR_KEYTAB_TYPE *ir_codes); 106 int ir_type, struct ir_scancode_table *ir_codes);
97void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); 107void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
98void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir, 108void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
99 u32 ir_key, u32 ir_raw); 109 u32 ir_key, u32 ir_raw);
@@ -107,67 +117,63 @@ void ir_rc5_timer_keyup(unsigned long data);
107 117
108/* Keymaps to be used by other modules */ 118/* Keymaps to be used by other modules */
109 119
110extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; 120extern struct ir_scancode_table ir_codes_empty_table;
111extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE]; 121extern struct ir_scancode_table ir_codes_avermedia_table;
112extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE]; 122extern struct ir_scancode_table ir_codes_avermedia_dvbt_table;
113extern IR_KEYTAB_TYPE ir_codes_avermedia_m135a[IR_KEYTAB_SIZE]; 123extern struct ir_scancode_table ir_codes_avermedia_m135a_table;
114extern IR_KEYTAB_TYPE ir_codes_avermedia_cardbus[IR_KEYTAB_SIZE]; 124extern struct ir_scancode_table ir_codes_avermedia_cardbus_table;
115extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE]; 125extern struct ir_scancode_table ir_codes_apac_viewcomp_table;
116extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE]; 126extern struct ir_scancode_table ir_codes_pixelview_table;
117extern IR_KEYTAB_TYPE ir_codes_pixelview_new[IR_KEYTAB_SIZE]; 127extern struct ir_scancode_table ir_codes_pixelview_new_table;
118extern IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE]; 128extern struct ir_scancode_table ir_codes_nebula_table;
119extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE]; 129extern struct ir_scancode_table ir_codes_dntv_live_dvb_t_table;
120extern IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE]; 130extern struct ir_scancode_table ir_codes_iodata_bctv7e_table;
121extern IR_KEYTAB_TYPE ir_codes_adstech_dvb_t_pci[IR_KEYTAB_SIZE]; 131extern struct ir_scancode_table ir_codes_adstech_dvb_t_pci_table;
122extern IR_KEYTAB_TYPE ir_codes_msi_tvanywhere[IR_KEYTAB_SIZE]; 132extern struct ir_scancode_table ir_codes_msi_tvanywhere_table;
123extern IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE]; 133extern struct ir_scancode_table ir_codes_cinergy_1400_table;
124extern IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE]; 134extern struct ir_scancode_table ir_codes_avertv_303_table;
125extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE]; 135extern struct ir_scancode_table ir_codes_dntv_live_dvbt_pro_table;
126extern IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE]; 136extern struct ir_scancode_table ir_codes_em_terratec_table;
127extern IR_KEYTAB_TYPE ir_codes_pinnacle_grey[IR_KEYTAB_SIZE]; 137extern struct ir_scancode_table ir_codes_pinnacle_grey_table;
128extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE]; 138extern struct ir_scancode_table ir_codes_flyvideo_table;
129extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE]; 139extern struct ir_scancode_table ir_codes_flydvb_table;
130extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE]; 140extern struct ir_scancode_table ir_codes_cinergy_table;
131extern IR_KEYTAB_TYPE ir_codes_eztv[IR_KEYTAB_SIZE]; 141extern struct ir_scancode_table ir_codes_eztv_table;
132extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE]; 142extern struct ir_scancode_table ir_codes_avermedia_table;
133extern IR_KEYTAB_TYPE ir_codes_videomate_tv_pvr[IR_KEYTAB_SIZE]; 143extern struct ir_scancode_table ir_codes_videomate_tv_pvr_table;
134extern IR_KEYTAB_TYPE ir_codes_manli[IR_KEYTAB_SIZE]; 144extern struct ir_scancode_table ir_codes_manli_table;
135extern IR_KEYTAB_TYPE ir_codes_gotview7135[IR_KEYTAB_SIZE]; 145extern struct ir_scancode_table ir_codes_gotview7135_table;
136extern IR_KEYTAB_TYPE ir_codes_purpletv[IR_KEYTAB_SIZE]; 146extern struct ir_scancode_table ir_codes_purpletv_table;
137extern IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE]; 147extern struct ir_scancode_table ir_codes_pctv_sedna_table;
138extern IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE]; 148extern struct ir_scancode_table ir_codes_pv951_table;
139extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; 149extern struct ir_scancode_table ir_codes_rc5_tv_table;
140extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; 150extern struct ir_scancode_table ir_codes_winfast_table;
141extern IR_KEYTAB_TYPE ir_codes_pinnacle_color[IR_KEYTAB_SIZE]; 151extern struct ir_scancode_table ir_codes_pinnacle_color_table;
142extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; 152extern struct ir_scancode_table ir_codes_hauppauge_new_table;
143extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE]; 153extern struct ir_scancode_table ir_codes_npgtech_table;
144extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE]; 154extern struct ir_scancode_table ir_codes_norwood_table;
145extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE]; 155extern struct ir_scancode_table ir_codes_proteus_2309_table;
146extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; 156extern struct ir_scancode_table ir_codes_budget_ci_old_table;
147extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE]; 157extern struct ir_scancode_table ir_codes_asus_pc39_table;
148extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; 158extern struct ir_scancode_table ir_codes_encore_enltv_table;
149extern IR_KEYTAB_TYPE ir_codes_encore_enltv2[IR_KEYTAB_SIZE]; 159extern struct ir_scancode_table ir_codes_encore_enltv2_table;
150extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; 160extern struct ir_scancode_table ir_codes_tt_1500_table;
151extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; 161extern struct ir_scancode_table ir_codes_fusionhdtv_mce_table;
152extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE]; 162extern struct ir_scancode_table ir_codes_behold_table;
153extern IR_KEYTAB_TYPE ir_codes_behold_columbus[IR_KEYTAB_SIZE]; 163extern struct ir_scancode_table ir_codes_behold_columbus_table;
154extern IR_KEYTAB_TYPE ir_codes_pinnacle_pctv_hd[IR_KEYTAB_SIZE]; 164extern struct ir_scancode_table ir_codes_pinnacle_pctv_hd_table;
155extern IR_KEYTAB_TYPE ir_codes_genius_tvgo_a11mce[IR_KEYTAB_SIZE]; 165extern struct ir_scancode_table ir_codes_genius_tvgo_a11mce_table;
156extern IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE]; 166extern struct ir_scancode_table ir_codes_powercolor_real_angel_table;
157extern IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE]; 167extern struct ir_scancode_table ir_codes_avermedia_a16d_table;
158extern IR_KEYTAB_TYPE ir_codes_encore_enltv_fm53[IR_KEYTAB_SIZE]; 168extern struct ir_scancode_table ir_codes_encore_enltv_fm53_table;
159extern IR_KEYTAB_TYPE ir_codes_real_audio_220_32_keys[IR_KEYTAB_SIZE]; 169extern struct ir_scancode_table ir_codes_real_audio_220_32_keys_table;
160extern IR_KEYTAB_TYPE ir_codes_msi_tvanywhere_plus[IR_KEYTAB_SIZE]; 170extern struct ir_scancode_table ir_codes_msi_tvanywhere_plus_table;
161extern IR_KEYTAB_TYPE ir_codes_ati_tv_wonder_hd_600[IR_KEYTAB_SIZE]; 171extern struct ir_scancode_table ir_codes_ati_tv_wonder_hd_600_table;
162extern IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE]; 172extern struct ir_scancode_table ir_codes_kworld_plus_tv_analog_table;
163extern IR_KEYTAB_TYPE ir_codes_kaiomy[IR_KEYTAB_SIZE]; 173extern struct ir_scancode_table ir_codes_kaiomy_table;
164extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE]; 174extern struct ir_scancode_table ir_codes_dm1105_nec_table;
165extern IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE]; 175extern struct ir_scancode_table ir_codes_evga_indtube_table;
166 176extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table;
177extern struct ir_scancode_table ir_codes_videomate_s350_table;
178extern struct ir_scancode_table ir_codes_gadmei_rm008z_table;
167#endif 179#endif
168
169/*
170 * Local variables:
171 * c-basic-offset: 8
172 * End:
173 */
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h
index 3ad4ed5402fb..aaf65e8b1a40 100644
--- a/include/media/ir-kbd-i2c.h
+++ b/include/media/ir-kbd-i2c.h
@@ -6,7 +6,8 @@
6struct IR_i2c; 6struct IR_i2c;
7 7
8struct IR_i2c { 8struct IR_i2c {
9 IR_KEYTAB_TYPE *ir_codes; 9 struct ir_scancode_table *ir_codes;
10
10 struct i2c_client *c; 11 struct i2c_client *c;
11 struct input_dev *input; 12 struct input_dev *input;
12 struct ir_input_state ir; 13 struct ir_input_state ir;
@@ -20,10 +21,27 @@ struct IR_i2c {
20 int (*get_key)(struct IR_i2c*, u32*, u32*); 21 int (*get_key)(struct IR_i2c*, u32*, u32*);
21}; 22};
22 23
24enum ir_kbd_get_key_fn {
25 IR_KBD_GET_KEY_CUSTOM = 0,
26 IR_KBD_GET_KEY_PIXELVIEW,
27 IR_KBD_GET_KEY_PV951,
28 IR_KBD_GET_KEY_HAUP,
29 IR_KBD_GET_KEY_KNC1,
30 IR_KBD_GET_KEY_FUSIONHDTV,
31 IR_KBD_GET_KEY_HAUP_XVR,
32 IR_KBD_GET_KEY_AVERMEDIA_CARDBUS,
33};
34
23/* Can be passed when instantiating an ir_video i2c device */ 35/* Can be passed when instantiating an ir_video i2c device */
24struct IR_i2c_init_data { 36struct IR_i2c_init_data {
25 IR_KEYTAB_TYPE *ir_codes; 37 struct ir_scancode_table *ir_codes;
26 const char *name; 38 const char *name;
39 int type; /* IR_TYPE_RC5, IR_TYPE_PD, etc */
40 /*
41 * Specify either a function pointer or a value indicating one of
42 * ir_kbd_i2c's internal get_key functions
43 */
27 int (*get_key)(struct IR_i2c*, u32*, u32*); 44 int (*get_key)(struct IR_i2c*, u32*, u32*);
45 enum ir_kbd_get_key_fn internal_get_key_func;
28}; 46};
29#endif 47#endif
diff --git a/include/media/radio-si4713.h b/include/media/radio-si4713.h
new file mode 100644
index 000000000000..f6aae29c7741
--- /dev/null
+++ b/include/media/radio-si4713.h
@@ -0,0 +1,30 @@
1/*
2 * include/media/radio-si4713.h
3 *
4 * Board related data definitions for Si4713 radio transmitter chip.
5 *
6 * Copyright (c) 2009 Nokia Corporation
7 * Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
8 *
9 * This file is licensed under the terms of the GNU General Public License
10 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied.
12 *
13 */
14
15#ifndef RADIO_SI4713_H
16#define RADIO_SI4713_H
17
18#include <linux/i2c.h>
19
20#define SI4713_NAME "radio-si4713"
21
22/*
23 * Platform dependent definition
24 */
25struct radio_si4713_platform_data {
26 int i2c_bus;
27 struct i2c_board_info *subdev_board_info;
28};
29
30#endif /* ifndef RADIO_SI4713_H*/
diff --git a/include/media/si4713.h b/include/media/si4713.h
new file mode 100644
index 000000000000..99850a54ed09
--- /dev/null
+++ b/include/media/si4713.h
@@ -0,0 +1,49 @@
1/*
2 * include/media/si4713.h
3 *
4 * Board related data definitions for Si4713 i2c device driver.
5 *
6 * Copyright (c) 2009 Nokia Corporation
7 * Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
8 *
9 * This file is licensed under the terms of the GNU General Public License
10 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied.
12 *
13 */
14
15#ifndef SI4713_H
16#define SI4713_H
17
18/* The SI4713 I2C sensor chip has a fixed slave address of 0xc6 or 0x22. */
19#define SI4713_I2C_ADDR_BUSEN_HIGH 0x63
20#define SI4713_I2C_ADDR_BUSEN_LOW 0x11
21
22/*
23 * Platform dependent definition
24 */
25struct si4713_platform_data {
26 /* Set power state, zero is off, non-zero is on. */
27 int (*set_power)(int power);
28};
29
30/*
31 * Structure to query for Received Noise Level (RNL).
32 */
33struct si4713_rnl {
34 __u32 index; /* modulator index */
35 __u32 frequency; /* frequency to peform rnl measurement */
36 __s32 rnl; /* result of measurement in dBuV */
37 __u32 reserved[4]; /* drivers and apps must init this to 0 */
38};
39
40/*
41 * This is the ioctl number to query for rnl. Users must pass a
42 * struct si4713_rnl pointer specifying desired frequency in 'frequency' field
43 * following driver capabilities (i.e V4L2_TUNER_CAP_LOW).
44 * Driver must return measured value in the same struture, filling 'rnl' field.
45 */
46#define SI4713_IOC_MEASURE_RNL _IOWR('V', BASE_VIDIOC_PRIVATE + 0, \
47 struct si4713_rnl)
48
49#endif /* ifndef SI4713_H*/
diff --git a/include/media/tuner.h b/include/media/tuner.h
index cbf97f45fbec..c146f2f530b0 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -126,6 +126,7 @@
126#define TUNER_PHILIPS_FMD1216MEX_MK3 78 126#define TUNER_PHILIPS_FMD1216MEX_MK3 78
127#define TUNER_PHILIPS_FM1216MK5 79 127#define TUNER_PHILIPS_FM1216MK5 79
128#define TUNER_PHILIPS_FQ1216LME_MK3 80 /* Active loopthrough, no FM */ 128#define TUNER_PHILIPS_FQ1216LME_MK3 80 /* Active loopthrough, no FM */
129#define TUNER_PARTSNIC_PTI_5NF05 81
129 130
130/* tv card specific */ 131/* tv card specific */
131#define TDA9887_PRESENT (1<<0) 132#define TDA9887_PRESENT (1<<0)
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 5dcb36785529..d411345f244b 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -137,6 +137,8 @@ struct v4l2_subdev_tuner_ops {
137 int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq); 137 int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
138 int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt); 138 int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
139 int (*s_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt); 139 int (*s_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
140 int (*g_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
141 int (*s_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
140 int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type); 142 int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
141 int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config); 143 int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
142 int (*s_standby)(struct v4l2_subdev *sd); 144 int (*s_standby)(struct v4l2_subdev *sd);
@@ -220,6 +222,9 @@ struct v4l2_subdev_video_ops {
220 int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); 222 int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
221 int (*try_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); 223 int (*try_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
222 int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); 224 int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
225 int (*cropcap)(struct v4l2_subdev *sd, struct v4l2_cropcap *cc);
226 int (*g_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
227 int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
223 int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); 228 int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
224 int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); 229 int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
225 int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); 230 int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize);