aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r--Documentation/video4linux/API.html2
-rw-r--r--Documentation/video4linux/CARDLIST.cx238852
-rw-r--r--Documentation/video4linux/CARDLIST.cx881
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx2
-rw-r--r--Documentation/video4linux/CARDLIST.saa71344
-rw-r--r--Documentation/video4linux/CARDLIST.tuner2
-rw-r--r--Documentation/video4linux/CARDLIST.usbvision2
-rw-r--r--Documentation/video4linux/README.davinci-vpbe93
-rw-r--r--Documentation/video4linux/v4l2-controls.txt69
-rw-r--r--Documentation/video4linux/v4l2-framework.txt59
10 files changed, 204 insertions, 32 deletions
diff --git a/Documentation/video4linux/API.html b/Documentation/video4linux/API.html
index d72fd2aa915..256f8efa992 100644
--- a/Documentation/video4linux/API.html
+++ b/Documentation/video4linux/API.html
@@ -9,7 +9,7 @@
9 <table border="0"> 9 <table border="0">
10 <tr> 10 <tr>
11 <td> 11 <td>
12 <a href="http://www.linuxtv.org/downloads/video4linux/API/V4L1_API.html">V4L original API</a> 12 <a href="http://linuxtv.org/downloads/legacy/video4linux/API/V4L1_API.html">V4L original API</a>
13 </td> 13 </td>
14 <td> 14 <td>
15 Obsoleted by V4L2 API 15 Obsoleted by V4L2 API
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index 87c46347bd6..8910449d23a 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -27,3 +27,5 @@
27 26 -> Hauppauge WinTV-HVR1290 [0070:8551] 27 26 -> Hauppauge WinTV-HVR1290 [0070:8551]
28 27 -> Mygica X8558 PRO DMB-TH [14f1:8578] 28 27 -> Mygica X8558 PRO DMB-TH [14f1:8578]
29 28 -> LEADTEK WinFast PxTV1200 [107d:6f22] 29 28 -> LEADTEK WinFast PxTV1200 [107d:6f22]
30 29 -> GoTView X5 3D Hybrid [5654:2390]
31 30 -> NetUP Dual DVB-T/C-CI RF [1b55:e2e4]
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index 42517d9121d..d9c0f119196 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -84,3 +84,4 @@
84 83 -> Prof 7301 DVB-S/S2 [b034:3034] 84 83 -> Prof 7301 DVB-S/S2 [b034:3034]
85 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd] 85 84 -> Samsung SMT 7020 DVB-S [18ac:dc00,18ac:dccd]
86 85 -> Twinhan VP-1027 DVB-S [1822:0023] 86 85 -> Twinhan VP-1027 DVB-S [1822:0023]
87 86 -> TeVii S464 DVB-S/S2 [d464:9022]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 9aae449440d..4a7b3df6d8b 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -74,3 +74,5 @@
74 74 -> Actionmaster/LinXcel/Digitus VC211A (em2800) 74 74 -> Actionmaster/LinXcel/Digitus VC211A (em2800)
75 75 -> Dikom DK300 (em2882) 75 75 -> Dikom DK300 (em2882)
76 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340] 76 76 -> KWorld PlusTV 340U or UB435-Q (ATSC) (em2870) [1b80:a340]
77 77 -> EM2874 Leadership ISDBT (em2874)
78 78 -> PCTV nanoStick T2 290e (em28174)
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 6b4c72d8862..7efae9bd73e 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -182,3 +182,7 @@
182181 -> TechoTrend TT-budget T-3000 [13c2:2804] 182181 -> TechoTrend TT-budget T-3000 [13c2:2804]
183182 -> Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid [17de:b136] 183182 -> Kworld PCI SBTVD/ISDB-T Full-Seg Hybrid [17de:b136]
184183 -> Compro VideoMate Vista M1F [185b:c900] 184183 -> Compro VideoMate Vista M1F [185b:c900]
185184 -> Encore ENLTV-FM 3 [1a7f:2108]
186185 -> MagicPro ProHDTV Pro2 DMB-TH/Hybrid [17de:d136]
187186 -> Beholder BeholdTV 501 [5ace:5010]
188187 -> Beholder BeholdTV 503 FM [5ace:5030]
diff --git a/Documentation/video4linux/CARDLIST.tuner b/Documentation/video4linux/CARDLIST.tuner
index e67c1db9685..6323b7a2071 100644
--- a/Documentation/video4linux/CARDLIST.tuner
+++ b/Documentation/video4linux/CARDLIST.tuner
@@ -78,8 +78,10 @@ tuner=77 - TCL tuner MF02GIP-5N-E
78tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner 78tuner=78 - Philips FMD1216MEX MK3 Hybrid Tuner
79tuner=79 - Philips PAL/SECAM multi (FM1216 MK5) 79tuner=79 - Philips PAL/SECAM multi (FM1216 MK5)
80tuner=80 - Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough 80tuner=80 - Philips FQ1216LME MK3 PAL/SECAM w/active loopthrough
81tuner=81 - Xceive 4000 tuner
81tuner=81 - Partsnic (Daewoo) PTI-5NF05 82tuner=81 - Partsnic (Daewoo) PTI-5NF05
82tuner=82 - Philips CU1216L 83tuner=82 - Philips CU1216L
83tuner=83 - NXP TDA18271 84tuner=83 - NXP TDA18271
84tuner=84 - Sony BTF-Pxn01Z 85tuner=84 - Sony BTF-Pxn01Z
85tuner=85 - Philips FQ1236 MK5 86tuner=85 - Philips FQ1236 MK5
87tuner=86 - Tena TNF5337 MFD
diff --git a/Documentation/video4linux/CARDLIST.usbvision b/Documentation/video4linux/CARDLIST.usbvision
index 0b72d3fee17..6fd1af36514 100644
--- a/Documentation/video4linux/CARDLIST.usbvision
+++ b/Documentation/video4linux/CARDLIST.usbvision
@@ -63,3 +63,5 @@
63 62 -> Pinnacle PCTV Bungee USB (PAL) FM [2304:0419] 63 62 -> Pinnacle PCTV Bungee USB (PAL) FM [2304:0419]
64 63 -> Hauppauge WinTv-USB [2400:4200] 64 63 -> Hauppauge WinTv-USB [2400:4200]
65 64 -> Pinnacle Studio PCTV USB (NTSC) FM V3 [2304:0113] 65 64 -> Pinnacle Studio PCTV USB (NTSC) FM V3 [2304:0113]
66 65 -> Nogatech USB MicroCam NTSC (NV3000N) [0573:3000]
67 66 -> Nogatech USB MicroCam PAL (NV3001P) [0573:3001]
diff --git a/Documentation/video4linux/README.davinci-vpbe b/Documentation/video4linux/README.davinci-vpbe
new file mode 100644
index 00000000000..7a460b0685b
--- /dev/null
+++ b/Documentation/video4linux/README.davinci-vpbe
@@ -0,0 +1,93 @@
1
2 VPBE V4L2 driver design
3 ======================================================================
4
5 File partitioning
6 -----------------
7 V4L2 display device driver
8 drivers/media/video/davinci/vpbe_display.c
9 drivers/media/video/davinci/vpbe_display.h
10
11 VPBE display controller
12 drivers/media/video/davinci/vpbe.c
13 drivers/media/video/davinci/vpbe.h
14
15 VPBE venc sub device driver
16 drivers/media/video/davinci/vpbe_venc.c
17 drivers/media/video/davinci/vpbe_venc.h
18 drivers/media/video/davinci/vpbe_venc_regs.h
19
20 VPBE osd driver
21 drivers/media/video/davinci/vpbe_osd.c
22 drivers/media/video/davinci/vpbe_osd.h
23 drivers/media/video/davinci/vpbe_osd_regs.h
24
25 Functional partitioning
26 -----------------------
27
28 Consists of the following (in the same order as the list under file
29 partitioning):-
30
31 1. V4L2 display driver
32 Implements creation of video2 and video3 device nodes and
33 provides v4l2 device interface to manage VID0 and VID1 layers.
34
35 2. Display controller
36 Loads up VENC, OSD and external encoders such as ths8200. It provides
37 a set of API calls to V4L2 drivers to set the output/standards
38 in the VENC or external sub devices. It also provides
39 a device object to access the services from OSD subdevice
40 using sub device ops. The connection of external encoders to VENC LCD
41 controller port is done at init time based on default output and standard
42 selection or at run time when application change the output through
43 V4L2 IOCTLs.
44
45 When connected to an external encoder, vpbe controller is also responsible
46 for setting up the interface between VENC and external encoders based on
47 board specific settings (specified in board-xxx-evm.c). This allows
48 interfacing external encoders such as ths8200. The setup_if_config()
49 is implemented for this as well as configure_venc() (part of the next patch)
50 API to set timings in VENC for a specific display resolution. As of this
51 patch series, the interconnection and enabling and setting of the external
52 encoders is not present, and would be a part of the next patch series.
53
54 3. VENC subdevice module
55 Responsible for setting outputs provided through internal DACs and also
56 setting timings at LCD controller port when external encoders are connected
57 at the port or LCD panel timings required. When external encoder/LCD panel
58 is connected, the timings for a specific standard/preset is retrieved from
59 the board specific table and the values are used to set the timings in
60 venc using non-standard timing mode.
61
62 Support LCD Panel displays using the VENC. For example to support a Logic
63 PD display, it requires setting up the LCD controller port with a set of
64 timings for the resolution supported and setting the dot clock. So we could
65 add the available outputs as a board specific entry (i.e add the "LogicPD"
66 output name to board-xxx-evm.c). A table of timings for various LCDs
67 supported can be maintained in the board specific setup file to support
68 various LCD displays.As of this patch a basic driver is present, and this
69 support for external encoders and displays forms a part of the next
70 patch series.
71
72 4. OSD module
73 OSD module implements all OSD layer management and hardware specific
74 features. The VPBE module interacts with the OSD for enabling and
75 disabling appropriate features of the OSD.
76
77 Current status:-
78
79 A fully functional working version of the V4L2 driver is available. This
80 driver has been tested with NTSC and PAL standards and buffer streaming.
81
82 Following are TBDs.
83
84 vpbe display controller
85 - Add support for external encoders.
86 - add support for selecting external encoder as default at probe time.
87
88 vpbe venc sub device
89 - add timings for supporting ths8200
90 - add support for LogicPD LCD.
91
92 FB drivers
93 - Add support for fbdev drivers.- Ready and part of subsequent patches.
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt
index 881e7f44491..9346fc8cbf2 100644
--- a/Documentation/video4linux/v4l2-controls.txt
+++ b/Documentation/video4linux/v4l2-controls.txt
@@ -277,16 +277,13 @@ implement g_volatile_ctrl like this:
277 { 277 {
278 switch (ctrl->id) { 278 switch (ctrl->id) {
279 case V4L2_CID_BRIGHTNESS: 279 case V4L2_CID_BRIGHTNESS:
280 ctrl->cur.val = read_reg(0x123); 280 ctrl->val = read_reg(0x123);
281 break; 281 break;
282 } 282 }
283 } 283 }
284 284
285The 'new value' union is not used in g_volatile_ctrl. In general controls 285Note that you use the 'new value' union as well in g_volatile_ctrl. In general
286that need to implement g_volatile_ctrl are read-only controls. 286controls that need to implement g_volatile_ctrl are read-only controls.
287
288Note that if one or more controls in a control cluster are marked as volatile,
289then all the controls in the cluster are seen as volatile.
290 287
291To mark a control as volatile you have to set the is_volatile flag: 288To mark a control as volatile you have to set the is_volatile flag:
292 289
@@ -453,6 +450,25 @@ In the example above the following are equivalent for the VOLUME case:
453 ctrl == ctrl->cluster[AUDIO_CL_VOLUME] == state->audio_cluster[AUDIO_CL_VOLUME] 450 ctrl == ctrl->cluster[AUDIO_CL_VOLUME] == state->audio_cluster[AUDIO_CL_VOLUME]
454 ctrl->cluster[AUDIO_CL_MUTE] == state->audio_cluster[AUDIO_CL_MUTE] 451 ctrl->cluster[AUDIO_CL_MUTE] == state->audio_cluster[AUDIO_CL_MUTE]
455 452
453In practice using cluster arrays like this becomes very tiresome. So instead
454the following equivalent method is used:
455
456 struct {
457 /* audio cluster */
458 struct v4l2_ctrl *volume;
459 struct v4l2_ctrl *mute;
460 };
461
462The anonymous struct is used to clearly 'cluster' these two control pointers,
463but it serves no other purpose. The effect is the same as creating an
464array with two control pointers. So you can just do:
465
466 state->volume = v4l2_ctrl_new_std(&state->ctrl_handler, ...);
467 state->mute = v4l2_ctrl_new_std(&state->ctrl_handler, ...);
468 v4l2_ctrl_cluster(2, &state->volume);
469
470And in foo_s_ctrl you can use these pointers directly: state->mute->val.
471
456Note that controls in a cluster may be NULL. For example, if for some 472Note that controls in a cluster may be NULL. For example, if for some
457reason mute was never added (because the hardware doesn't support that 473reason mute was never added (because the hardware doesn't support that
458particular feature), then mute will be NULL. So in that case we have a 474particular feature), then mute will be NULL. So in that case we have a
@@ -475,6 +491,43 @@ controls, then the 'is_new' flag would be 1 for both controls.
475The 'is_new' flag is always 1 when called from v4l2_ctrl_handler_setup(). 491The 'is_new' flag is always 1 when called from v4l2_ctrl_handler_setup().
476 492
477 493
494Handling autogain/gain-type Controls with Auto Clusters
495=======================================================
496
497A common type of control cluster is one that handles 'auto-foo/foo'-type
498controls. Typical examples are autogain/gain, autoexposure/exposure,
499autowhitebalance/red balance/blue balance. In all cases you have one controls
500that determines whether another control is handled automatically by the hardware,
501or whether it is under manual control from the user.
502
503If the cluster is in automatic mode, then the manual controls should be
504marked inactive. When the volatile controls are read the g_volatile_ctrl
505operation should return the value that the hardware's automatic mode set up
506automatically.
507
508If the cluster is put in manual mode, then the manual controls should become
509active again and the is_volatile flag should be ignored (so g_volatile_ctrl is
510no longer called while in manual mode).
511
512Finally the V4L2_CTRL_FLAG_UPDATE should be set for the auto control since
513changing that control affects the control flags of the manual controls.
514
515In order to simplify this a special variation of v4l2_ctrl_cluster was
516introduced:
517
518void v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls,
519 u8 manual_val, bool set_volatile);
520
521The first two arguments are identical to v4l2_ctrl_cluster. The third argument
522tells the framework which value switches the cluster into manual mode. The
523last argument will optionally set the is_volatile flag for the non-auto controls.
524
525The first control of the cluster is assumed to be the 'auto' control.
526
527Using this function will ensure that you don't need to handle all the complex
528flag and volatile handling.
529
530
478VIDIOC_LOG_STATUS Support 531VIDIOC_LOG_STATUS Support
479========================= 532=========================
480 533
@@ -636,9 +689,7 @@ button controls are write-only controls.
636-EINVAL as the spec says. 689-EINVAL as the spec says.
637 690
6385) The spec does not mention what should happen when you try to set/get a 6915) The spec does not mention what should happen when you try to set/get a
639control class controls. ivtv currently returns -EINVAL (indicating that the 692control class controls. The framework will return -EACCES.
640control ID does not exist) while the framework will return -EACCES, which
641makes more sense.
642 693
643 694
644Proposals for Extensions 695Proposals for Extensions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index cf21f7aae97..f8dcabf7852 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -817,11 +817,7 @@ int my_open(struct file *file)
817 817
818 ... 818 ...
819 819
820 ret = v4l2_fh_init(&my_fh->fh, vfd); 820 v4l2_fh_init(&my_fh->fh, vfd);
821 if (ret) {
822 kfree(my_fh);
823 return ret;
824 }
825 821
826 ... 822 ...
827 823
@@ -844,7 +840,7 @@ int my_release(struct file *file)
844 840
845Below is a short description of the v4l2_fh functions used: 841Below is a short description of the v4l2_fh functions used:
846 842
847int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) 843void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
848 844
849 Initialise the file handle. This *MUST* be performed in the driver's 845 Initialise the file handle. This *MUST* be performed in the driver's
850 v4l2_file_operations->open() handler. 846 v4l2_file_operations->open() handler.
@@ -901,14 +897,38 @@ V4L2 events
901The V4L2 events provide a generic way to pass events to user space. 897The V4L2 events provide a generic way to pass events to user space.
902The driver must use v4l2_fh to be able to support V4L2 events. 898The driver must use v4l2_fh to be able to support V4L2 events.
903 899
904Useful functions: 900Events are defined by a type and an optional ID. The ID may refer to a V4L2
901object such as a control ID. If unused, then the ID is 0.
902
903When the user subscribes to an event the driver will allocate a number of
904kevent structs for that event. So every (type, ID) event tuple will have
905its own set of kevent structs. This guarantees that if a driver is generating
906lots of events of one type in a short time, then that will not overwrite
907events of another type.
908
909But if you get more events of one type than the number of kevents that were
910reserved, then the oldest event will be dropped and the new one added.
911
912Furthermore, the internal struct v4l2_subscribed_event has merge() and
913replace() callbacks which drivers can set. These callbacks are called when
914a new event is raised and there is no more room. The replace() callback
915allows you to replace the payload of the old event with that of the new event,
916merging any relevant data from the old payload into the new payload that
917replaces it. It is called when this event type has only one kevent struct
918allocated. The merge() callback allows you to merge the oldest event payload
919into that of the second-oldest event payload. It is called when there are two
920or more kevent structs allocated.
905 921
906- v4l2_event_alloc() 922This way no status information is lost, just the intermediate steps leading
923up to that state.
907 924
908 To use events, the driver must allocate events for the file handle. By 925A good example of these replace/merge callbacks is in v4l2-event.c:
909 calling the function more than once, the driver may assure that at least n 926ctrls_replace() and ctrls_merge() callbacks for the control event.
910 events in total have been allocated. The function may not be called in 927
911 atomic context. 928Note: these callbacks can be called from interrupt context, so they must be
929fast.
930
931Useful functions:
912 932
913- v4l2_event_queue() 933- v4l2_event_queue()
914 934
@@ -920,7 +940,9 @@ Useful functions:
920 940
921 The video_device->ioctl_ops->vidioc_subscribe_event must check the driver 941 The video_device->ioctl_ops->vidioc_subscribe_event must check the driver
922 is able to produce events with specified event id. Then it calls 942 is able to produce events with specified event id. Then it calls
923 v4l2_event_subscribe() to subscribe the event. 943 v4l2_event_subscribe() to subscribe the event. The last argument is the
944 size of the event queue for this event. If it is 0, then the framework
945 will fill in a default value (this depends on the event type).
924 946
925- v4l2_event_unsubscribe() 947- v4l2_event_unsubscribe()
926 948
@@ -935,14 +957,8 @@ Useful functions:
935 957
936 Returns the number of pending events. Useful when implementing poll. 958 Returns the number of pending events. Useful when implementing poll.
937 959
938Drivers do not initialise events directly. The events are initialised
939through v4l2_fh_init() if video_device->ioctl_ops->vidioc_subscribe_event is
940non-NULL. This *MUST* be performed in the driver's
941v4l2_file_operations->open() handler.
942
943Events are delivered to user space through the poll system call. The driver 960Events are delivered to user space through the poll system call. The driver
944can use v4l2_fh->events->wait wait_queue_head_t as the argument for 961can use v4l2_fh->wait (a wait_queue_head_t) as the argument for poll_wait().
945poll_wait().
946 962
947There are standard and private events. New standard events must use the 963There are standard and private events. New standard events must use the
948smallest available event type. The drivers must allocate their events from 964smallest available event type. The drivers must allocate their events from
@@ -952,5 +968,4 @@ The first event type in the class is reserved for future use, so the first
952available event type is 'class base + 1'. 968available event type is 'class base + 1'.
953 969
954An example on how the V4L2 events may be used can be found in the OMAP 970An example on how the V4L2 events may be used can be found in the OMAP
9553 ISP driver available at <URL:http://gitorious.org/omap3camera> as of 9713 ISP driver (drivers/media/video/omap3isp).
956writing this.