diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:09:16 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:09:16 -0800 |
commit | 6a5df38f5f07981dda5457ec6c05efe1c4200d84 (patch) | |
tree | d82c3862f7ba719d7723111140a0c89e6387cb19 /Documentation/DocBook | |
parent | 9cfc86249f32d984339c6d1f8a1fd1326989b3b8 (diff) | |
parent | 262ab9ac0daadebcece8e3cbf3ae66ee8774cfd7 (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: (116 commits)
V4L/DVB (13698): pms: replace asm/uaccess.h to linux/uaccess.h
V4L/DVB (13690): radio/si470x: #include <sched.h>
V4L/DVB (13688): au8522: modify the attributes of local filter coefficients
V4L/DVB (13687): cx231xx: use NULL when pointer is needed
V4L/DVB: Davinci VPFE Capture: remove unused #include <linux/version.h>
V4L/DVB (13685): Correct code taking the size of a pointer
V4L/DVB (13684): Fix some cut-and-paste noise in dib0090.h
V4L/DVB (13683): sanio-ms: clean up init, exit and id_table
V4L/DVB (13682): dib8000: make some constant static
V4L/DVB: lgs8gxx: Use shifts rather than multiply/divide when possible
V4L/DVB (13680b): DocBook/media: create links for included sources
V4L/DVB (13680a): DocBook/media: copy images after building HTML
V4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices
V4L/DVB (13676): configurable IRQ mode on NetUP Dual DVB-S2 CI; IRQ from CAM processing (CI interface works faster)
V4L/DVB (13674): stv090x: Add DiSEqC envelope mode
V4L/DVB (13673): lnbp21: Implement 22 kHz tone control
V4L/DVB (13671): sh_mobile_ceu_camera: Remove frame size page alignment
V4L/DVB (13670): soc-camera: Add mt9t112 camera driver
V4L/DVB (13669): tw9910: Add sync polarity support
V4L/DVB (13668): tw9910: remove cropping
...
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/Makefile | 21 | ||||
-rw-r--r-- | Documentation/DocBook/media-entities.tmpl | 18 | ||||
-rw-r--r-- | Documentation/DocBook/media-indices.tmpl | 4 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/common.xml | 35 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/compat.xml | 16 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/v4l2.xml | 26 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/videodev2.h.xml | 116 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml | 238 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-enuminput.xml | 36 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-enumoutput.xml | 36 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-g-dv-preset.xml | 111 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-g-dv-timings.xml | 224 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-g-std.xml | 6 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-query-dv-preset.xml | 85 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-querystd.xml | 6 |
15 files changed, 962 insertions, 16 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index ee34ceb9ad5..325cfd1d6d9 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -32,10 +32,10 @@ PS_METHOD = $(prefer-db2x) ### # The targets that may be used. -PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs media +PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) -xmldocs: $(BOOKS) +xmldocs: $(BOOKS) xmldoclinks sgmldocs: xmldocs PS := $(patsubst %.xml, %.ps, $(BOOKS)) @@ -45,15 +45,24 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS)) pdfdocs: $(PDF) HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) -htmldocs: media $(HTML) +htmldocs: $(HTML) $(call build_main_index) + $(call build_images) MAN := $(patsubst %.xml, %.9, $(BOOKS)) mandocs: $(MAN) -media: - mkdir -p $(srctree)/Documentation/DocBook/media/ - cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(srctree)/Documentation/DocBook/media/ +build_images = mkdir -p $(objtree)/Documentation/DocBook/media/ && \ + cp $(srctree)/Documentation/DocBook/dvb/*.png $(srctree)/Documentation/DocBook/v4l/*.gif $(objtree)/Documentation/DocBook/media/ + +xmldoclinks: +ifneq ($(objtree),$(srctree)) + for dep in dvb media-entities.tmpl media-indices.tmpl v4l; do \ + rm -f $(objtree)/Documentation/DocBook/$$dep \ + && ln -s $(srctree)/Documentation/DocBook/$$dep $(objtree)/Documentation/DocBook/ \ + || exit; \ + done +endif installmandocs: mandocs mkdir -p /usr/local/man/man9/ diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index bb5ab741220..c725cb852c5 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl @@ -23,6 +23,7 @@ <!ENTITY VIDIOC-ENUMINPUT "<link linkend='vidioc-enuminput'><constant>VIDIOC_ENUMINPUT</constant></link>"> <!ENTITY VIDIOC-ENUMOUTPUT "<link linkend='vidioc-enumoutput'><constant>VIDIOC_ENUMOUTPUT</constant></link>"> <!ENTITY VIDIOC-ENUMSTD "<link linkend='vidioc-enumstd'><constant>VIDIOC_ENUMSTD</constant></link>"> +<!ENTITY VIDIOC-ENUM-DV-PRESETS "<link linkend='vidioc-enum-dv-presets'><constant>VIDIOC_ENUM_DV_PRESETS</constant></link>"> <!ENTITY VIDIOC-ENUM-FMT "<link linkend='vidioc-enum-fmt'><constant>VIDIOC_ENUM_FMT</constant></link>"> <!ENTITY VIDIOC-ENUM-FRAMEINTERVALS "<link linkend='vidioc-enum-frameintervals'><constant>VIDIOC_ENUM_FRAMEINTERVALS</constant></link>"> <!ENTITY VIDIOC-ENUM-FRAMESIZES "<link linkend='vidioc-enum-framesizes'><constant>VIDIOC_ENUM_FRAMESIZES</constant></link>"> @@ -30,6 +31,8 @@ <!ENTITY VIDIOC-G-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_G_AUDOUT</constant></link>"> <!ENTITY VIDIOC-G-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_G_CROP</constant></link>"> <!ENTITY VIDIOC-G-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_G_CTRL</constant></link>"> +<!ENTITY VIDIOC-G-DV-PRESET "<link linkend='vidioc-g-dv-preset'><constant>VIDIOC_G_DV_PRESET</constant></link>"> +<!ENTITY VIDIOC-G-DV-TIMINGS "<link linkend='vidioc-g-dv-timings'><constant>VIDIOC_G_DV_TIMINGS</constant></link>"> <!ENTITY VIDIOC-G-ENC-INDEX "<link linkend='vidioc-g-enc-index'><constant>VIDIOC_G_ENC_INDEX</constant></link>"> <!ENTITY VIDIOC-G-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_G_EXT_CTRLS</constant></link>"> <!ENTITY VIDIOC-G-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_G_FBUF</constant></link>"> @@ -53,6 +56,7 @@ <!ENTITY VIDIOC-QUERYCTRL "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYCTRL</constant></link>"> <!ENTITY VIDIOC-QUERYMENU "<link linkend='vidioc-queryctrl'><constant>VIDIOC_QUERYMENU</constant></link>"> <!ENTITY VIDIOC-QUERYSTD "<link linkend='vidioc-querystd'><constant>VIDIOC_QUERYSTD</constant></link>"> +<!ENTITY VIDIOC-QUERY-DV-PRESET "<link linkend='vidioc-query-dv-preset'><constant>VIDIOC_QUERY_DV_PRESET</constant></link>"> <!ENTITY VIDIOC-REQBUFS "<link linkend='vidioc-reqbufs'><constant>VIDIOC_REQBUFS</constant></link>"> <!ENTITY VIDIOC-STREAMOFF "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMOFF</constant></link>"> <!ENTITY VIDIOC-STREAMON "<link linkend='vidioc-streamon'><constant>VIDIOC_STREAMON</constant></link>"> @@ -60,6 +64,8 @@ <!ENTITY VIDIOC-S-AUDOUT "<link linkend='vidioc-g-audioout'><constant>VIDIOC_S_AUDOUT</constant></link>"> <!ENTITY VIDIOC-S-CROP "<link linkend='vidioc-g-crop'><constant>VIDIOC_S_CROP</constant></link>"> <!ENTITY VIDIOC-S-CTRL "<link linkend='vidioc-g-ctrl'><constant>VIDIOC_S_CTRL</constant></link>"> +<!ENTITY VIDIOC-S-DV-PRESET "<link linkend='vidioc-g-dv-preset'><constant>VIDIOC_S_DV_PRESET</constant></link>"> +<!ENTITY VIDIOC-S-DV-TIMINGS "<link linkend='vidioc-g-dv-timings'><constant>VIDIOC_S_DV_TIMINGS</constant></link>"> <!ENTITY VIDIOC-S-EXT-CTRLS "<link linkend='vidioc-g-ext-ctrls'><constant>VIDIOC_S_EXT_CTRLS</constant></link>"> <!ENTITY VIDIOC-S-FBUF "<link linkend='vidioc-g-fbuf'><constant>VIDIOC_S_FBUF</constant></link>"> <!ENTITY VIDIOC-S-FMT "<link linkend='vidioc-g-fmt'><constant>VIDIOC_S_FMT</constant></link>"> @@ -118,6 +124,7 @@ <!-- Structures --> <!ENTITY v4l2-audio "struct <link linkend='v4l2-audio'>v4l2_audio</link>"> <!ENTITY v4l2-audioout "struct <link linkend='v4l2-audioout'>v4l2_audioout</link>"> +<!ENTITY v4l2-bt-timings "struct <link linkend='v4l2-bt-timings'>v4l2_bt_timings</link>"> <!ENTITY v4l2-buffer "struct <link linkend='v4l2-buffer'>v4l2_buffer</link>"> <!ENTITY v4l2-capability "struct <link linkend='v4l2-capability'>v4l2_capability</link>"> <!ENTITY v4l2-captureparm "struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link>"> @@ -128,6 +135,9 @@ <!ENTITY v4l2-dbg-chip-ident "struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link>"> <!ENTITY v4l2-dbg-match "struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link>"> <!ENTITY v4l2-dbg-register "struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link>"> +<!ENTITY v4l2-dv-enum-preset "struct <link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link>"> +<!ENTITY v4l2-dv-preset "struct <link linkend='v4l2-dv-preset'>v4l2_dv_preset</link>"> +<!ENTITY v4l2-dv-timings "struct <link linkend='v4l2-dv-timings'>v4l2_dv_timings</link>"> <!ENTITY v4l2-enc-idx "struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link>"> <!ENTITY v4l2-enc-idx-entry "struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link>"> <!ENTITY v4l2-encoder-cmd "struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link>"> @@ -243,6 +253,10 @@ <!ENTITY sub-enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> <!ENTITY sub-enuminput SYSTEM "v4l/vidioc-enuminput.xml"> <!ENTITY sub-enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> +<!ENTITY sub-enum-dv-presets SYSTEM "v4l/vidioc-enum-dv-presets.xml"> +<!ENTITY sub-g-dv-preset SYSTEM "v4l/vidioc-g-dv-preset.xml"> +<!ENTITY sub-query-dv-preset SYSTEM "v4l/vidioc-query-dv-preset.xml"> +<!ENTITY sub-g-dv-timings SYSTEM "v4l/vidioc-g-dv-timings.xml"> <!ENTITY sub-enumstd SYSTEM "v4l/vidioc-enumstd.xml"> <!ENTITY sub-g-audio SYSTEM "v4l/vidioc-g-audio.xml"> <!ENTITY sub-g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> @@ -333,6 +347,10 @@ <!ENTITY enumaudioout SYSTEM "v4l/vidioc-enumaudioout.xml"> <!ENTITY enuminput SYSTEM "v4l/vidioc-enuminput.xml"> <!ENTITY enumoutput SYSTEM "v4l/vidioc-enumoutput.xml"> +<!ENTITY enum-dv-presets SYSTEM "v4l/vidioc-enum-dv-presets.xml"> +<!ENTITY g-dv-preset SYSTEM "v4l/vidioc-g-dv-preset.xml"> +<!ENTITY query-dv-preset SYSTEM "v4l/vidioc-query-dv-preset.xml"> +<!ENTITY g-dv-timings SYSTEM "v4l/vidioc-g-dv-timings.xml"> <!ENTITY enumstd SYSTEM "v4l/vidioc-enumstd.xml"> <!ENTITY g-audio SYSTEM "v4l/vidioc-g-audio.xml"> <!ENTITY g-audioout SYSTEM "v4l/vidioc-g-audioout.xml"> diff --git a/Documentation/DocBook/media-indices.tmpl b/Documentation/DocBook/media-indices.tmpl index 9e30a236d74..78d6031de00 100644 --- a/Documentation/DocBook/media-indices.tmpl +++ b/Documentation/DocBook/media-indices.tmpl @@ -36,6 +36,7 @@ <indexentry><primaryie>enum <link linkend='v4l2-preemphasis'>v4l2_preemphasis</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-audio'>v4l2_audio</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-audioout'>v4l2_audioout</link></primaryie></indexentry> +<indexentry><primaryie>struct <link linkend='v4l2-bt-timings'>v4l2_bt_timings</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-buffer'>v4l2_buffer</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-capability'>v4l2_capability</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-captureparm'>v4l2_captureparm</link></primaryie></indexentry> @@ -46,6 +47,9 @@ <indexentry><primaryie>struct <link linkend='v4l2-dbg-chip-ident'>v4l2_dbg_chip_ident</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-dbg-match'>v4l2_dbg_match</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-dbg-register'>v4l2_dbg_register</link></primaryie></indexentry> +<indexentry><primaryie>struct <link linkend='v4l2-dv-enum-preset'>v4l2_dv_enum_preset</link></primaryie></indexentry> +<indexentry><primaryie>struct <link linkend='v4l2-dv-preset'>v4l2_dv_preset</link></primaryie></indexentry> +<indexentry><primaryie>struct <link linkend='v4l2-dv-timings'>v4l2_dv_timings</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-enc-idx'>v4l2_enc_idx</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-enc-idx-entry'>v4l2_enc_idx_entry</link></primaryie></indexentry> <indexentry><primaryie>struct <link linkend='v4l2-encoder-cmd'>v4l2_encoder_cmd</link></primaryie></indexentry> diff --git a/Documentation/DocBook/v4l/common.xml b/Documentation/DocBook/v4l/common.xml index b1a81d246d5..c65f0ac9b6e 100644 --- a/Documentation/DocBook/v4l/common.xml +++ b/Documentation/DocBook/v4l/common.xml @@ -716,6 +716,41 @@ if (-1 == ioctl (fd, &VIDIOC-S-STD;, &std_id)) { } </programlisting> </example> + <section id="dv-timings"> + <title>Digital Video (DV) Timings</title> + <para> + The video standards discussed so far has been dealing with Analog TV and the +corresponding video timings. Today there are many more different hardware interfaces +such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry +video signals and there is a need to extend the API to select the video timings +for these interfaces. Since it is not possible to extend the &v4l2-std-id; due to +the limited bits available, a new set of IOCTLs is added to set/get video timings at +the input and output: </para><itemizedlist> + <listitem> + <para>DV Presets: Digital Video (DV) presets. These are IDs representing a +video timing at the input/output. Presets are pre-defined timings implemented +by the hardware according to video standards. A __u32 data type is used to represent +a preset unlike the bit mask that is used in &v4l2-std-id; allowing future extensions +to support as many different presets as needed.</para> + </listitem> + <listitem> + <para>Custom DV Timings: This will allow applications to define more detailed +custom video timings for the interface. This includes parameters such as width, height, +polarities, frontporch, backporch etc. + </para> + </listitem> + </itemizedlist> + <para>To enumerate and query the attributes of DV presets supported by a device, +applications use the &VIDIOC-ENUM-DV-PRESETS; ioctl. To get the current DV preset, +applications use the &VIDIOC-G-DV-PRESET; ioctl and to set a preset they use the +&VIDIOC-S-DV-PRESET; ioctl.</para> + <para>To set custom DV timings for the device, applications use the +&VIDIOC-S-DV-TIMINGS; ioctl and to get current custom DV timings they use the +&VIDIOC-G-DV-TIMINGS; ioctl.</para> + <para>Applications can make use of the <xref linkend="input-capabilities" /> and +<xref linkend="output-capabilities"/> flags to decide what ioctls are available to set the +video timings for the device.</para> + </section> </section> &sub-controls; diff --git a/Documentation/DocBook/v4l/compat.xml b/Documentation/DocBook/v4l/compat.xml index 4d1902a54d6..b9dbdf9e6d2 100644 --- a/Documentation/DocBook/v4l/compat.xml +++ b/Documentation/DocBook/v4l/compat.xml @@ -2291,8 +2291,8 @@ was renamed to <structname id="v4l2-chip-ident-old">v4l2_chip_ident_old</structn <listitem> <para>New control <constant>V4L2_CID_COLORFX</constant> was added.</para> </listitem> - </orderedlist> - </section> + </orderedlist> + </section> <section> <title>V4L2 in Linux 2.6.32</title> <orderedlist> @@ -2322,8 +2322,16 @@ more information.</para> <listitem> <para>Added Remote Controller chapter, describing the default Remote Controller mapping for media devices.</para> </listitem> - </orderedlist> - </section> + </orderedlist> + </section> + <section> + <title>V4L2 in Linux 2.6.33</title> + <orderedlist> + <listitem> + <para>Added support for Digital Video timings in order to support HDTV receivers and transmitters.</para> + </listitem> + </orderedlist> + </section> </section> <section id="other"> diff --git a/Documentation/DocBook/v4l/v4l2.xml b/Documentation/DocBook/v4l/v4l2.xml index 937b4157a5d..060105af49e 100644 --- a/Documentation/DocBook/v4l/v4l2.xml +++ b/Documentation/DocBook/v4l/v4l2.xml @@ -74,6 +74,17 @@ Remote Controller chapter.</contrib> </address> </affiliation> </author> + + <author> + <firstname>Muralidharan</firstname> + <surname>Karicheri</surname> + <contrib>Documented the Digital Video timings API.</contrib> + <affiliation> + <address> + <email>m-karicheri2@ti.com</email> + </address> + </affiliation> + </author> </authorgroup> <copyright> @@ -89,7 +100,7 @@ Remote Controller chapter.</contrib> <year>2008</year> <year>2009</year> <holder>Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin -Rubli, Andy Walls, Mauro Carvalho Chehab</holder> +Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab</holder> </copyright> <legalnotice> <para>Except when explicitly stated as GPL, programming examples within @@ -103,6 +114,13 @@ structs, ioctls) must be noted in more detail in the history chapter applications. --> <revision> + <revnumber>2.6.33</revnumber> + <date>2009-12-03</date> + <authorinitials>mk</authorinitials> + <revremark>Added documentation for the Digital Video timings API.</revremark> + </revision> + + <revision> <revnumber>2.6.32</revnumber> <date>2009-08-31</date> <authorinitials>mcc</authorinitials> @@ -355,7 +373,7 @@ and discussions on the V4L mailing list.</revremark> </partinfo> <title>Video for Linux Two API Specification</title> - <subtitle>Revision 2.6.32</subtitle> + <subtitle>Revision 2.6.33</subtitle> <chapter id="common"> &sub-common; @@ -411,6 +429,7 @@ and discussions on the V4L mailing list.</revremark> &sub-encoder-cmd; &sub-enumaudio; &sub-enumaudioout; + &sub-enum-dv-presets; &sub-enum-fmt; &sub-enum-framesizes; &sub-enum-frameintervals; @@ -421,6 +440,8 @@ and discussions on the V4L mailing list.</revremark> &sub-g-audioout; &sub-g-crop; &sub-g-ctrl; + &sub-g-dv-preset; + &sub-g-dv-timings; &sub-g-enc-index; &sub-g-ext-ctrls; &sub-g-fbuf; @@ -441,6 +462,7 @@ and discussions on the V4L mailing list.</revremark> &sub-querybuf; &sub-querycap; &sub-queryctrl; + &sub-query-dv-preset; &sub-querystd; &sub-reqbufs; &sub-s-hw-freq-seek; diff --git a/Documentation/DocBook/v4l/videodev2.h.xml b/Documentation/DocBook/v4l/videodev2.h.xml index 3e282ed9f59..06832594065 100644 --- a/Documentation/DocBook/v4l/videodev2.h.xml +++ b/Documentation/DocBook/v4l/videodev2.h.xml @@ -734,6 +734,99 @@ struct <link linkend="v4l2-standard">v4l2_standard</link> { }; /* + * V I D E O T I M I N G S D V P R E S E T + */ +struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link> { + __u32 preset; + __u32 reserved[4]; +}; + +/* + * D V P R E S E T S E N U M E R A T I O N + */ +struct <link linkend="v4l2-dv-enum-preset">v4l2_dv_enum_preset</link> { + __u32 index; + __u32 preset; + __u8 name[32]; /* Name of the preset timing */ + __u32 width; + __u32 height; + __u32 reserved[4]; +}; + +/* + * D V P R E S E T V A L U E S + */ +#define V4L2_DV_INVALID 0 +#define V4L2_DV_480P59_94 1 /* BT.1362 */ +#define V4L2_DV_576P50 2 /* BT.1362 */ +#define V4L2_DV_720P24 3 /* SMPTE 296M */ +#define V4L2_DV_720P25 4 /* SMPTE 296M */ +#define V4L2_DV_720P30 5 /* SMPTE 296M */ +#define V4L2_DV_720P50 6 /* SMPTE 296M */ +#define V4L2_DV_720P59_94 7 /* SMPTE 274M */ +#define V4L2_DV_720P60 8 /* SMPTE 274M/296M */ +#define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */ +#define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */ +#define V4L2_DV_1080I25 11 /* BT.1120 */ +#define V4L2_DV_1080I50 12 /* SMPTE 296M */ +#define V4L2_DV_1080I60 13 /* SMPTE 296M */ +#define V4L2_DV_1080P24 14 /* SMPTE 296M */ +#define V4L2_DV_1080P25 15 /* SMPTE 296M */ +#define V4L2_DV_1080P30 16 /* SMPTE 296M */ +#define V4L2_DV_1080P50 17 /* BT.1120 */ +#define V4L2_DV_1080P60 18 /* BT.1120 */ + +/* + * D V B T T I M I N G S + */ + +/* BT.656/BT.1120 timing data */ +struct <link linkend="v4l2-bt-timings">v4l2_bt_timings</link> { + __u32 width; /* width in pixels */ + __u32 height; /* height in lines */ + __u32 interlaced; /* Interlaced or progressive */ + __u32 polarities; /* Positive or negative polarity */ + __u64 pixelclock; /* Pixel clock in HZ. Ex. 74.25MHz->74250000 */ + __u32 hfrontporch; /* Horizpontal front porch in pixels */ + __u32 hsync; /* Horizontal Sync length in pixels */ + __u32 hbackporch; /* Horizontal back porch in pixels */ + __u32 vfrontporch; /* Vertical front porch in pixels */ + __u32 vsync; /* Vertical Sync length in lines */ + __u32 vbackporch; /* Vertical back porch in lines */ + __u32 il_vfrontporch; /* Vertical front porch for bottom field of + * interlaced field formats + */ + __u32 il_vsync; /* Vertical sync length for bottom field of + * interlaced field formats + */ + __u32 il_vbackporch; /* Vertical back porch for bottom field of + * interlaced field formats + */ + __u32 reserved[16]; +} __attribute__ ((packed)); + +/* Interlaced or progressive format */ +#define V4L2_DV_PROGRESSIVE 0 +#define V4L2_DV_INTERLACED 1 + +/* Polarities. If bit is not set, it is assumed to be negative polarity */ +#define V4L2_DV_VSYNC_POS_POL 0x00000001 +#define V4L2_DV_HSYNC_POS_POL 0x00000002 + + +/* DV timings */ +struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link> { + __u32 type; + union { + struct <link linkend="v4l2-bt-timings">v4l2_bt_timings</link> bt; + __u32 reserved[32]; + }; +} __attribute__ ((packed)); + +/* Values for the type field */ +#define V4L2_DV_BT_656_1120 0 /* BT.656/1120 timing type */ + +/* * V I D E O I N P U T S */ struct <link linkend="v4l2-input">v4l2_input</link> { @@ -744,7 +837,8 @@ struct <link linkend="v4l2-input">v4l2_input</link> { __u32 tuner; /* Associated tuner */ v4l2_std_id std; __u32 status; - __u32 reserved[4]; + __u32 capabilities; + __u32 reserved[3]; }; /* Values for the 'type' field */ @@ -775,6 +869,11 @@ struct <link linkend="v4l2-input">v4l2_input</link> { #define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ +/* capabilities flags */ +#define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ +#define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ +#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ + /* * V I D E O O U T P U T S */ @@ -785,13 +884,19 @@ struct <link linkend="v4l2-output">v4l2_output</link> { __u32 audioset; /* Associated audios (bitfield) */ __u32 modulator; /* Associated modulator */ v4l2_std_id std; - __u32 reserved[4]; + __u32 capabilities; + __u32 reserved[3]; }; /* Values for the 'type' field */ #define V4L2_OUTPUT_TYPE_MODULATOR 1 #define V4L2_OUTPUT_TYPE_ANALOG 2 #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 +/* capabilities flags */ +#define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */ +#define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ +#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ + /* * C O N T R O L S */ @@ -1626,6 +1731,13 @@ struct <link linkend="v4l2-dbg-chip-ident">v4l2_dbg_chip_ident</link> { #endif #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct <link linkend="v4l2-hw-freq-seek">v4l2_hw_freq_seek</link>) +#define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct <link linkend="v4l2-dv-enum-preset">v4l2_dv_enum_preset</link>) +#define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) +#define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) +#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct <link linkend="v4l2-dv-preset">v4l2_dv_preset</link>) +#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) +#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct <link linkend="v4l2-dv-timings">v4l2_dv_timings</link>) + /* Reminder: when adding new ioctls please add support for them to drivers/media/video/v4l2-compat-ioctl32.c as well! */ diff --git a/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml b/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml new file mode 100644 index 00000000000..1d31427edd1 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-enum-dv-presets.xml @@ -0,0 +1,238 @@ +<refentry id="vidioc-enum-dv-presets"> + <refmeta> + <refentrytitle>ioctl VIDIOC_ENUM_DV_PRESETS</refentrytitle> + &manvol; + </refmeta> + + <refnamediv> + <refname>VIDIOC_ENUM_DV_PRESETS</refname> + <refpurpose>Enumerate supported Digital Video presets</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ioctl</function></funcdef> + <paramdef>int <parameter>fd</parameter></paramdef> + <paramdef>int <parameter>request</parameter></paramdef> + <paramdef>struct v4l2_dv_enum_preset *<parameter>argp</parameter></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1> + <title>Arguments</title> + + <variablelist> + <varlistentry> + <term><parameter>fd</parameter></term> + <listitem> + <para>&fd;</para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>request</parameter></term> + <listitem> + <para>VIDIOC_ENUM_DV_PRESETS</para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>argp</parameter></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1> + <title>Description</title> + + <para>To query the attributes of a DV preset, applications initialize the +<structfield>index</structfield> field and zero the reserved array of &v4l2-dv-enum-preset; +and call the <constant>VIDIOC_ENUM_DV_PRESETS</constant> ioctl with a pointer to this +structure. Drivers fill the rest of the structure or return an +&EINVAL; when the index is out of bounds. To enumerate all DV Presets supported, +applications shall begin at index zero, incrementing by one until the +driver returns <errorcode>EINVAL</errorcode>. Drivers may enumerate a +different set of DV presets after switching the video input or +output.</para> + + <table pgwide="1" frame="none" id="v4l2-dv-enum-preset"> + <title>struct <structname>v4l2_dv_enum_presets</structname></title> + <tgroup cols="3"> + &cs-str; + <tbody valign="top"> + <row> + <entry>__u32</entry> + <entry><structfield>index</structfield></entry> + <entry>Number of the DV preset, set by the +application.</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>preset</structfield></entry> + <entry>This field identifies one of the DV preset values listed in <xref linkend="v4l2-dv-presets-vals"/>.</entry> + </row> + <row> + <entry>__u8</entry> + <entry><structfield>name</structfield>[24]</entry> + <entry>Name of the preset, a NUL-terminated ASCII string, for example: "720P-60", "1080I-60". This information is +intended for the user.</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>width</structfield></entry> + <entry>Width of the active video in pixels for the DV preset.</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>height</structfield></entry> + <entry>Height of the active video in lines for the DV preset.</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>reserved</structfield>[4]</entry> + <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> + </row> + </tbody> + </tgroup> + </table> + + <table pgwide="1" frame="none" id="v4l2-dv-presets-vals"> + <title>struct <structname>DV Presets</structname></title> + <tgroup cols="3"> + &cs-str; + <tbody valign="top"> + <row> + <entry>Preset</entry> + <entry>Preset value</entry> + <entry>Description</entry> + </row> + <row> + <entry></entry> + <entry></entry> + <entry></entry> + </row> + <row> + <entry>V4L2_DV_INVALID</entry> + <entry>0</entry> + <entry>Invalid preset value.</entry> + </row> + <row> + <entry>V4L2_DV_480P59_94</entry> + <entry>1</entry> + <entry>720x480 progressive video at 59.94 fps as per BT.1362.</entry> + </row> + <row> + <entry>V4L2_DV_576P50</entry> + <entry>2</entry> + <entry>720x576 progressive video at 50 fps as per BT.1362.</entry> + </row> + <row> + <entry>V4L2_DV_720P24</entry> + <entry>3</entry> + <entry>1280x720 progressive video at 24 fps as per SMPTE 296M.</entry> + </row> + <row> + <entry>V4L2_DV_720P25</entry> + <entry>4</entry> + <entry>1280x720 progressive video at 25 fps as per SMPTE 296M.</entry> + </row> + <row> + <entry>V4L2_DV_720P30</entry> + <entry>5</entry> + <entry>1280x720 progressive video at 30 fps as per SMPTE 296M.</entry> + </row> + <row> + <entry>V4L2_DV_720P50</entry> + <entry>6</entry> + <entry>1280x720 progressive video at 50 fps as per SMPTE 296M.</entry> + </row> + <row> + <entry>V4L2_DV_720P59_94</entry> + <entry>7</entry> + <entry>1280x720 progressive video at 59.94 fps as per SMPTE 274M.</entry> + </row> + <row> + <entry>V4L2_DV_720P60</entry> + <entry>8</entry> + <entry>1280x720 progressive video at 60 fps as per SMPTE 274M/296M.</entry> + </row> + <row> + <entry>V4L2_DV_1080I29_97</entry> + <entry>9</entry> + <entry>1920x1080 interlaced video at 29.97 fps as per BT.1120/SMPTE 274M.</entry> + </row> + <row> + <entry>V4L2_DV_1080I30</entry> + <entry>10</entry> + <entry>1920x1080 interlaced video at 30 fps as per BT.1120/SMPTE 274M.</entry> + </row> + <row> + <entry>V4L2_DV_1080I25</entry> + <entry>11</entry> + <entry>1920x1080 interlaced video at 25 fps as per BT.1120.</entry> + </row> + <row> + <entry>V4L2_DV_1080I50</entry> + <entry>12</entry> + <entry>1920x1080 interlaced video at 50 fps as per SMPTE 296M.</entry> + </row> + <row> + <entry>V4L2_DV_1080I60</entry> + <entry>13</entry> + <entry>1920x1080 interlaced video at 60 fps as per SMPTE 296M.</entry> + </row> + <row> + <entry>V4L2_DV_1080P24</entry> + <entry>14</entry> + <entry>1920x1080 progressive video at 24 fps as per SMPTE 296M.</entry> + </row> + <row> + <entry>V4L2_DV_1080P25</entry> + <entry>15</entry> + <entry>1920x1080 progressive video at 25 fps as per SMPTE 296M.</entry> + </row> |