diff options
Diffstat (limited to 'Documentation/DocBook')
29 files changed, 1597 insertions, 919 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index ab8300f6718..325cfd1d6d9 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile @@ -8,7 +8,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ - procfs-guide.xml writing_usb_driver.xml networking.xml \ + writing_usb_driver.xml networking.xml \ kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ @@ -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/ @@ -65,7 +74,7 @@ KERNELDOC = $(srctree)/scripts/kernel-doc DOCPROC = $(objtree)/scripts/basic/docproc XMLTOFLAGS = -m $(srctree)/Documentation/DocBook/stylesheet.xsl -#XMLTOFLAGS += --skip-validation +XMLTOFLAGS += --skip-validation ### # DOCPROC is used for two purposes: @@ -101,17 +110,6 @@ endif # Changes in kernel-doc force a rebuild of all documentation $(BOOKS): $(KERNELDOC) -### -# procfs guide uses a .c file as example code. -# This requires an explicit dependency -C-procfs-example = procfs_example.xml -C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) -$(obj)/procfs-guide.xml: $(C-procfs-example2) - -# List of programs to build -##oops, this is a kernel module::hostprogs-y := procfs_example -obj-m += procfs_example.o - # Tell kbuild to always build the programs always := $(hostprogs-y) @@ -238,7 +236,7 @@ clean-files := $(DOCBOOKS) \ $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \ $(patsubst %.xml, %.html, $(DOCBOOKS)) \ $(patsubst %.xml, %.9, $(DOCBOOKS)) \ - $(C-procfs-example) $(index) + $(index) clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index 94a20fe8fed..f9a6e2c75f1 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl @@ -293,10 +293,23 @@ X!Idrivers/video/console/fonts.c <chapter id="input_subsystem"> <title>Input Subsystem</title> + <sect1><title>Input core</title> !Iinclude/linux/input.h !Edrivers/input/input.c !Edrivers/input/ff-core.c !Edrivers/input/ff-memless.c + </sect1> + <sect1><title>Polled input devices</title> +!Iinclude/linux/input-polldev.h +!Edrivers/input/input-polldev.c + </sect1> + <sect1><title>Matrix keyboars/keypads</title> +!Iinclude/linux/input/matrix_keypad.h + </sect1> + <sect1><title>Sparse keymap support</title> +!Iinclude/linux/input/sparse-keymap.h +!Edrivers/input/sparse-keymap.c + </sect1> </chapter> <chapter id="spi"> diff --git a/Documentation/DocBook/dvb/dvbapi.xml b/Documentation/DocBook/dvb/dvbapi.xml index 4fc5b23470a..63c528fee62 100644 --- a/Documentation/DocBook/dvb/dvbapi.xml +++ b/Documentation/DocBook/dvb/dvbapi.xml @@ -30,6 +30,14 @@ <revhistory> <!-- Put document revisions here, newest first. --> <revision> + <revnumber>2.0.2</revnumber> + <date>2009-10-25</date> + <authorinitials>mcc</authorinitials> + <revremark> + documents FE_SET_FRONTEND_TUNE_MODE and FE_DISHETWORK_SEND_LEGACY_CMD ioctls. + </revremark> +</revision> +<revision> <revnumber>2.0.1</revnumber> <date>2009-09-16</date> <authorinitials>mcc</authorinitials> @@ -85,3 +93,8 @@ Added ISDB-T test originally written by Patrick Boettcher &sub-examples; </chapter> <!-- END OF CHAPTERS --> + <appendix id="frontend_h"> + <title>DVB Frontend Header File</title> + &sub-frontend-h; + </appendix> + diff --git a/Documentation/DocBook/dvb/isdbt.xml b/Documentation/DocBook/dvb/dvbproperty.xml index 92855222fcc..5f57c7ccd4b 100644 --- a/Documentation/DocBook/dvb/isdbt.xml +++ b/Documentation/DocBook/dvb/dvbproperty.xml @@ -1,3 +1,6 @@ +<section id="FE_GET_PROPERTY"> +<title>FE_GET_PROPERTY/FE_SET_PROPERTY</title> + <section id="isdbt"> <title>ISDB-T frontend</title> <para>This section describes shortly what are the possible parameters in the Linux @@ -312,3 +315,4 @@ </section> </section> </section> +</section> diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml new file mode 100644 index 00000000000..b99644f5340 --- /dev/null +++ b/Documentation/DocBook/dvb/frontend.h.xml @@ -0,0 +1,415 @@ +<programlisting> +/* + * frontend.h + * + * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de> + * Ralph Metzler <ralph@convergence.de> + * Holger Waechtler <holger@convergence.de> + * Andre Draszik <ad@convergence.de> + * for convergence integrated media GmbH + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#ifndef _DVBFRONTEND_H_ +#define _DVBFRONTEND_H_ + +#include <linux/types.h> + +typedef enum fe_type { + FE_QPSK, + FE_QAM, + FE_OFDM, + FE_ATSC +} fe_type_t; + + +typedef enum fe_caps { + FE_IS_STUPID = 0, + FE_CAN_INVERSION_AUTO = 0x1, + FE_CAN_FEC_1_2 = 0x2, + FE_CAN_FEC_2_3 = 0x4, + FE_CAN_FEC_3_4 = 0x8, + FE_CAN_FEC_4_5 = 0x10, + FE_CAN_FEC_5_6 = 0x20, + FE_CAN_FEC_6_7 = 0x40, + FE_CAN_FEC_7_8 = 0x80, + FE_CAN_FEC_8_9 = 0x100, + FE_CAN_FEC_AUTO = 0x200, + FE_CAN_QPSK = 0x400, + FE_CAN_QAM_16 = 0x800, + FE_CAN_QAM_32 = 0x1000, + FE_CAN_QAM_64 = 0x2000, + FE_CAN_QAM_128 = 0x4000, + FE_CAN_QAM_256 = 0x8000, + FE_CAN_QAM_AUTO = 0x10000, + FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000, + FE_CAN_BANDWIDTH_AUTO = 0x40000, + FE_CAN_GUARD_INTERVAL_AUTO = 0x80000, + FE_CAN_HIERARCHY_AUTO = 0x100000, + FE_CAN_8VSB = 0x200000, + FE_CAN_16VSB = 0x400000, + FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ + FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ + FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ + FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */ + FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */ +} fe_caps_t; + + +struct dvb_frontend_info { + char name[128]; + fe_type_t type; + __u32 frequency_min; + __u32 frequency_max; + __u32 frequency_stepsize; + __u32 frequency_tolerance; + __u32 symbol_rate_min; + __u32 symbol_rate_max; + __u32 symbol_rate_tolerance; /* ppm */ + __u32 notifier_delay; /* DEPRECATED */ + fe_caps_t caps; +}; + + +/** + * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for + * the meaning of this struct... + */ +struct dvb_diseqc_master_cmd { + __u8 msg [6]; /* { framing, address, command, data [3] } */ + __u8 msg_len; /* valid values are 3...6 */ +}; + + +struct dvb_diseqc_slave_reply { + __u8 msg [4]; /* { framing, data [3] } */ + __u8 msg_len; /* valid values are 0...4, 0 means no msg */ + int timeout; /* return from ioctl after timeout ms with */ +}; /* errorcode when no message was received */ + + +typedef enum fe_sec_voltage { + SEC_VOLTAGE_13, + SEC_VOLTAGE_18, + SEC_VOLTAGE_OFF +} fe_sec_voltage_t; + + +typedef enum fe_sec_tone_mode { + SEC_TONE_ON, + SEC_TONE_OFF +} fe_sec_tone_mode_t; + + +typedef enum fe_sec_mini_cmd { + SEC_MINI_A, + SEC_MINI_B +} fe_sec_mini_cmd_t; + + +typedef enum fe_status { + FE_HAS_SIGNAL = 0x01, /* found something above the noise level */ + FE_HAS_CARRIER = 0x02, /* found a DVB signal */ + FE_HAS_VITERBI = 0x04, /* FEC is stable */ + FE_HAS_SYNC = 0x08, /* found sync bytes */ + FE_HAS_LOCK = 0x10, /* everything's working... */ + FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */ + FE_REINIT = 0x40 /* frontend was reinitialized, */ +} fe_status_t; /* application is recommended to reset */ + /* DiSEqC, tone and parameters */ + +typedef enum fe_spectral_inversion { + INVERSION_OFF, + INVERSION_ON, + INVERSION_AUTO +} fe_spectral_inversion_t; + + +typedef enum fe_code_rate { + FEC_NONE = 0, + FEC_1_2, + FEC_2_3, + FEC_3_4, + FEC_4_5, + FEC_5_6, + FEC_6_7, + FEC_7_8, + FEC_8_9, + FEC_AUTO, + FEC_3_5, + FEC_9_10, +} fe_code_rate_t; + + +typedef enum fe_modulation { + QPSK, + QAM_16, + QAM_32, + QAM_64, + QAM_128, + QAM_256, + QAM_AUTO, + VSB_8, + VSB_16, + PSK_8, + APSK_16, + APSK_32, + DQPSK, +} fe_modulation_t; + +typedef enum fe_transmit_mode { + TRANSMISSION_MODE_2K, + TRANSMISSION_MODE_8K, + TRANSMISSION_MODE_AUTO, + TRANSMISSION_MODE_4K +} fe_transmit_mode_t; + +typedef enum fe_bandwidth { + BANDWIDTH_8_MHZ, + BANDWIDTH_7_MHZ, + BANDWIDTH_6_MHZ, + BANDWIDTH_AUTO +} fe_bandwidth_t; + + +typedef enum fe_guard_interval { + GUARD_INTERVAL_1_32, + GUARD_INTERVAL_1_16, + GUARD_INTERVAL_1_8, + GUARD_INTERVAL_1_4, + GUARD_INTERVAL_AUTO +} fe_guard_interval_t; + + +typedef enum fe_hierarchy { + HIERARCHY_NONE, + HIERARCHY_1, + HIERARCHY_2, + HIERARCHY_4, + HIERARCHY_AUTO +} fe_hierarchy_t; + + +struct dvb_qpsk_parameters { + __u32 symbol_rate; /* symbol rate in Symbols per second */ + fe_code_rate_t fec_inner; /* forward error correction (see above) */ +}; + +struct dvb_qam_parameters { + __u32 symbol_rate; /* symbol rate in Symbols per second */ + fe_code_rate_t fec_inner; /* forward error correction (see above) */ + fe_modulation_t modulation; /* modulation type (see above) */ +}; + +struct dvb_vsb_parameters { + fe_modulation_t modulation; /* modulation type (see above) */ +}; + +struct dvb_ofdm_parameters { + fe_bandwidth_t bandwidth; + fe_code_rate_t code_rate_HP; /* high priority stream code rate */ + fe_code_rate_t code_rate_LP; /* low priority stream code rate */ + fe_modulation_t constellation; /* modulation type (see above) */ + fe_transmit_mode_t transmission_mode; + fe_guard_interval_t guard_interval; + fe_hierarchy_t hierarchy_information; +}; + + +struct dvb_frontend_parameters { + __u32 frequency; /* (absolute) frequency in Hz for QAM/OFDM/ATSC */ + /* intermediate frequency in kHz for QPSK */ + fe_spectral_inversion_t inversion; + union { + struct dvb_qpsk_parameters qpsk; + struct dvb_qam_parameters qam; + struct dvb_ofdm_parameters ofdm; + struct dvb_vsb_parameters vsb; + } u; +}; + + +struct dvb_frontend_event { + fe_status_t status; + struct dvb_frontend_parameters parameters; +}; + +/* S2API Commands */ +#define DTV_UNDEFINED 0 +#define DTV_TUNE 1 +#define DTV_CLEAR 2 +#define DTV_FREQUENCY 3 +#define DTV_MODULATION 4 +#define DTV_BANDWIDTH_HZ 5 +#define DTV_INVERSION 6 +#define DTV_DISEQC_MASTER 7 +#define DTV_SYMBOL_RATE 8 +#define DTV_INNER_FEC 9 +#define DTV_VOLTAGE 10 +#define DTV_TONE 11 +#define DTV_PILOT 12 +#define DTV_ROLLOFF 13 +#define DTV_DISEQC_SLAVE_REPLY 14 + +/* Basic enumeration set for querying unlimited capabilities */ +#define DTV_FE_CAPABILITY_COUNT 15 +#define DTV_FE_CAPABILITY 16 +#define DTV_DELIVERY_SYSTEM 17 + +/* ISDB-T and ISDB-Tsb */ +#define DTV_ISDBT_PARTIAL_RECEPTION 18 +#define DTV_ISDBT_SOUND_BROADCASTING 19 + +#define DTV_ISDBT_SB_SUBCHANNEL_ID 20 +#define DTV_ISDBT_SB_SEGMENT_IDX 21 +#define DTV_ISDBT_SB_SEGMENT_COUNT 22 + +#define DTV_ISDBT_LAYERA_FEC 23 +#define DTV_ISDBT_LAYERA_MODULATION 24 +#define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25 +#define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26 + +#define DTV_ISDBT_LAYERB_FEC 27 +#define DTV_ISDBT_LAYERB_MODULATION 28 +#define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29 +#define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30 + +#define DTV_ISDBT_LAYERC_FEC 31 +#define DTV_ISDBT_LAYERC_MODULATION 32 +#define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33 +#define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34 + +#define DTV_API_VERSION 35 + +#define DTV_CODE_RATE_HP 36 +#define DTV_CODE_RATE_LP 37 +#define DTV_GUARD_INTERVAL 38 +#define DTV_TRANSMISSION_MODE 39 +#define DTV_HIERARCHY 40 + +#define DTV_ISDBT_LAYER_ENABLED 41 + +#define DTV_ISDBS_TS_ID 42 + +#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID + +typedef enum fe_pilot { + PILOT_ON, + PILOT_OFF, + PILOT_AUTO, +} fe_pilot_t; + +typedef enum fe_rolloff { + ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */ + ROLLOFF_20, + ROLLOFF_25, + ROLLOFF_AUTO, +} fe_rolloff_t; + +typedef enum fe_delivery_system { + SYS_UNDEFINED, + SYS_DVBC_ANNEX_AC, + SYS_DVBC_ANNEX_B, + SYS_DVBT, + SYS_DSS, + SYS_DVBS, + SYS_DVBS2, + SYS_DVBH, + SYS_ISDBT, + SYS_ISDBS, + SYS_ISDBC, + SYS_ATSC, + SYS_ATSCMH, + SYS_DMBTH, + SYS_CMMB, + SYS_DAB, +} fe_delivery_system_t; + +struct dtv_cmds_h { + char *name; /* A display name for debugging purposes */ + + __u32 cmd; /* A unique ID */ + + /* Flags */ + __u32 set:1; /* Either a set or get property */ + __u32 buffer:1; /* Does this property use the buffer? */ + __u32 reserved:30; /* Align */ +}; + +struct dtv_property { + __u32 cmd; + __u32 reserved[3]; + union { + __u32 data; + struct { + __u8 data[32]; + __u32 len; + __u32 reserved1[3]; + void *reserved2; + } buffer; + } u; + int result; +} __attribute__ ((packed)); + +/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */ +#define DTV_IOCTL_MAX_MSGS 64 + +struct dtv_properties { + __u32 num; + struct dtv_property *props; +}; + +#define <link linkend="FE_GET_PROPERTY">FE_SET_PROPERTY</link> _IOW('o', 82, struct dtv_properties) +#define <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link> _IOR('o', 83, struct dtv_properties) + + +/** + * When set, this flag will disable any zigzagging or other "normal" tuning + * behaviour. Additionally, there will be no automatic monitoring of the lock + * status, and hence no frontend events will be generated. If a frontend device + * is closed, this flag will be automatically turned off when the device is + * reopened read-write. + */ +#define FE_TUNE_MODE_ONESHOT 0x01 + + +#define <link linkend="FE_GET_INFO">FE_GET_INFO</link> _IOR('o', 61, struct dvb_frontend_info) + +#define <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> _IO('o', 62) +#define <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> _IOW('o', 63, struct dvb_diseqc_master_cmd) +#define <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> _IOR('o', 64, struct dvb_diseqc_slave_reply) +#define <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> _IO('o', 65) /* fe_sec_mini_cmd_t */ + +#define <link linkend="FE_SET_TONE">FE_SET_TONE</link> _IO('o', 66) /* fe_sec_tone_mode_t */ +#define <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> _IO('o', 67) /* fe_sec_voltage_t */ +#define <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link> _IO('o', 68) /* int */ + +#define <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> _IOR('o', 69, fe_status_t) +#define <link linkend="FE_READ_BER">FE_READ_BER</link> _IOR('o', 70, __u32) +#define <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> _IOR('o', 71, __u16) +#define <link linkend="FE_READ_SNR">FE_READ_SNR</link> _IOR('o', 72, __u16) +#define <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> _IOR('o', 73, __u32) + +#define <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> _IOW('o', 76, struct dvb_frontend_parameters) +#define <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link> _IOR('o', 77, struct dvb_frontend_parameters) +#define <link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link> _IO('o', 81) /* unsigned int */ +#define <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> _IOR('o', 78, struct dvb_frontend_event) + +#define <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link> _IO('o', 80) /* unsigned int */ + +#endif /*_DVBFRONTEND_H_*/ +</programlisting> diff --git a/Documentation/DocBook/dvb/frontend.xml b/Documentation/DocBook/dvb/frontend.xml index 9d89a7b94fd..300ba1f0417 100644 --- a/Documentation/DocBook/dvb/frontend.xml +++ b/Documentation/DocBook/dvb/frontend.xml @@ -73,7 +73,8 @@ a specific frontend type.</para> <section id="frontend_info"> <title>frontend information</title> -<para>Information about the frontend ca be queried with FE_GET_INFO.</para> +<para>Information about the frontend ca be queried with + <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para> <programlisting> struct dvb_frontend_info { @@ -338,7 +339,7 @@ modulation mode which can be one of the following: <entry align="char"> <para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0) for subsequent use. Usually the first thing to do after a successful open is to - find out the frontend type with FE_GET_INFO.</para> + find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para> <para>The device can be opened in read-only mode, which only allows monitoring of device status and statistics, or read/write mode, which allows any kind of use (e.g. performing tuning operations.) @@ -478,7 +479,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_read_status"> +<section id="FE_READ_STATUS"> <title>FE_READ_STATUS</title> <para>DESCRIPTION </para> @@ -492,7 +493,7 @@ modulation mode which can be one of the following: </para> <informaltable><tgroup cols="1"><tbody><row><entry align="char"> -<para>int ioctl(int fd, int request = FE_READ_STATUS, +<para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>, fe_status_t ⋆status);</para> </entry> </row></tbody></tgroup></informaltable> @@ -511,7 +512,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_READ_STATUS for this command.</para> +<para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -542,7 +543,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_read_ber"> +<section id="FE_READ_BER"> <title>FE_READ_BER</title> <para>DESCRIPTION </para> @@ -557,7 +558,7 @@ modulation mode which can be one of the following: </para> <informaltable><tgroup cols="1"><tbody><row><entry align="char"> -<para>int ioctl(int fd, int request = FE_READ_BER, +<para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>, uint32_t ⋆ber);</para> </entry> </row></tbody></tgroup></informaltable> @@ -575,7 +576,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_READ_BER for this command.</para> +<para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -619,7 +620,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_read_snr"> +<section id="FE_READ_SNR"> <title>FE_READ_SNR</title> <para>DESCRIPTION @@ -634,7 +635,7 @@ modulation mode which can be one of the following: </para> <informaltable><tgroup cols="1"><tbody><row><entry align="char"> -<para>int ioctl(int fd, int request = FE_READ_SNR, int16_t +<para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t ⋆snr);</para> </entry> </row></tbody></tgroup></informaltable> @@ -652,7 +653,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_READ_SNR for this command.</para> +<para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -697,7 +698,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_read_signal_strength"> +<section id="FE_READ_SIGNAL_STRENGTH"> <title>FE_READ_SIGNAL_STRENGTH</title> <para>DESCRIPTION </para> @@ -712,7 +713,7 @@ modulation mode which can be one of the following: <informaltable><tgroup cols="1"><tbody><row><entry align="char"> <para>int ioctl( int fd, int request = - FE_READ_SIGNAL_STRENGTH, int16_t ⋆strength);</para> + <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t ⋆strength);</para> </entry> </row></tbody></tgroup></informaltable> @@ -730,7 +731,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_READ_SIGNAL_STRENGTH for this +<para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this command.</para> </entry> </row><row><entry @@ -775,7 +776,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_read_ub"> +<section id="FE_READ_UNCORRECTED_BLOCKS"> <title>FE_READ_UNCORRECTED_BLOCKS</title> <para>DESCRIPTION </para> @@ -797,7 +798,7 @@ modulation mode which can be one of the following: <informaltable><tgroup cols="1"><tbody><row><entry align="char"> <para>int ioctl( int fd, int request = - FE_READ_UNCORRECTED_BLOCKS, uint32_t ⋆ublocks);</para> + <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t ⋆ublocks);</para> </entry> </row></tbody></tgroup></informaltable> <para>PARAMETERS @@ -814,7 +815,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_READ_UNCORRECTED_BLOCKS for this +<para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this command.</para> </entry> </row><row><entry @@ -852,7 +853,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_set_fe"> +<section id="FE_SET_FRONTEND"> <title>FE_SET_FRONTEND</title> <para>DESCRIPTION </para> @@ -861,8 +862,8 @@ modulation mode which can be one of the following: <para>This ioctl call starts a tuning operation using specified parameters. The result of this call will be successful if the parameters were valid and the tuning could be initiated. The result of the tuning operation in itself, however, will arrive - asynchronously as an event (see documentation for FE_GET_EVENT and - FrontendEvent.) If a new FE_SET_FRONTEND operation is initiated before + asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and + FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before the previous one was completed, the previous operation will be aborted in favor of the new one. This command requires read/write access to the device.</para> </entry> @@ -872,7 +873,7 @@ modulation mode which can be one of the following: </para> <informaltable><tgroup cols="1"><tbody><row><entry align="char"> -<para>int ioctl(int fd, int request = FE_SET_FRONTEND, +<para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>, struct dvb_frontend_parameters ⋆p);</para> </entry> </row></tbody></tgroup></informaltable> @@ -890,7 +891,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_SET_FRONTEND for this command.</para> +<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -928,7 +929,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_get_fe"> +<section id="FE_GET_FRONTEND"> <title>FE_GET_FRONTEND</title> <para>DESCRIPTION </para> @@ -943,7 +944,7 @@ modulation mode which can be one of the following: </para> <informaltable><tgroup cols="1"><tbody><row><entry align="char"> -<para>int ioctl(int fd, int request = FE_GET_FRONTEND, +<para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>, struct dvb_frontend_parameters ⋆p);</para> </entry> </row></tbody></tgroup></informaltable> @@ -962,7 +963,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_SET_FRONTEND for this command.</para> +<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -1003,7 +1004,7 @@ modulation mode which can be one of the following: </section> -<section id="frontend_get_event"> +<section id="FE_GET_EVENT"> <title>FE_GET_EVENT</title> <para>DESCRIPTION </para> @@ -1024,7 +1025,8 @@ modulation mode which can be one of the following: rather small (room for 8 events), the queue must be serviced regularly to avoid overflow. If an overflow happens, the oldest event is discarded from the queue, and an error (EOVERFLOW) occurs the next time the queue is read. After - reporting the error condition in this fashion, subsequent FE_GET_EVENT + reporting the error condition in this fashion, subsequent + <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> calls will return events from the queue as usual.</para> </entry> </row><row><entry @@ -1057,7 +1059,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_GET_EVENT for this command.</para> +<para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -1115,7 +1117,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_get_info"> +<section id="FE_GET_INFO"> <title>FE_GET_INFO</title> <para>DESCRIPTION </para> @@ -1130,7 +1132,7 @@ modulation mode which can be one of the following: <informaltable><tgroup cols="1"><tbody><row><entry align="char"> -<para> int ioctl(int fd, int request = FE_GET_INFO, struct +<para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct dvb_frontend_info ⋆info);</para> </entry> </row></tbody></tgroup></informaltable> @@ -1149,7 +1151,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_GET_INFO for this command.</para> +<para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -1181,7 +1183,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_diseqc_reset_overload"> +<section id="FE_DISEQC_RESET_OVERLOAD"> <title>FE_DISEQC_RESET_OVERLOAD</title> <para>DESCRIPTION </para> @@ -1199,7 +1201,7 @@ modulation mode which can be one of the following: <informaltable><tgroup cols="1"><tbody><row><entry align="char"> <para>int ioctl(int fd, int request = - FE_DISEQC_RESET_OVERLOAD);</para> + <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para> </entry> </row></tbody></tgroup></informaltable> <para>PARAMETERS @@ -1216,7 +1218,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_DISEQC_RESET_OVERLOAD for this +<para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this command.</para> </entry> </row></tbody></tgroup></informaltable> @@ -1247,7 +1249,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_diseqc_send_master_cmd"> +<section id="FE_DISEQC_SEND_MASTER_CMD"> <title>FE_DISEQC_SEND_MASTER_CMD</title> <para>DESCRIPTION </para> @@ -1261,7 +1263,7 @@ modulation mode which can be one of the following: <informaltable><tgroup cols="1"><tbody><row><entry align="char"> <para>int ioctl(int fd, int request = - FE_DISEQC_SEND_MASTER_CMD, struct + <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct dvb_diseqc_master_cmd ⋆cmd);</para> </entry> </row></tbody></tgroup></informaltable> @@ -1280,7 +1282,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_DISEQC_SEND_MASTER_CMD for this +<para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this command.</para> </entry> </row><row><entry @@ -1335,7 +1337,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_diseqc_recv_slave_reply"> +<section id="FE_DISEQC_RECV_SLAVE_REPLY"> <title>FE_DISEQC_RECV_SLAVE_REPLY</title> <para>DESCRIPTION </para> @@ -1350,7 +1352,7 @@ modulation mode which can be one of the following: <informaltable><tgroup cols="1"><tbody><row><entry align="char"> <para>int ioctl(int fd, int request = - FE_DISEQC_RECV_SLAVE_REPLY, struct + <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct dvb_diseqc_slave_reply ⋆reply);</para> </entry> </row></tbody></tgroup></informaltable> @@ -1369,7 +1371,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_DISEQC_RECV_SLAVE_REPLY for this +<para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this command.</para> </entry> </row><row><entry @@ -1423,7 +1425,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_diseqc_send_burst"> +<section id="FE_DISEQC_SEND_BURST"> <title>FE_DISEQC_SEND_BURST</title> <para>DESCRIPTION </para> @@ -1438,7 +1440,7 @@ modulation mode which can be one of the following: <informaltable><tgroup cols="1"><tbody><row><entry align="char"> <para>int ioctl(int fd, int request = - FE_DISEQC_SEND_BURST, fe_sec_mini_cmd_t burst);</para> + <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para> </entry> </row></tbody></tgroup></informaltable> @@ -1456,7 +1458,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_DISEQC_SEND_BURST for this command.</para> +<para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -1509,7 +1511,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_set_tone"> +<section id="FE_SET_TONE"> <title>FE_SET_TONE</title> <para>DESCRIPTION </para> @@ -1523,7 +1525,7 @@ modulation mode which can be one of the following: </para> <informaltable><tgroup cols="1"><tbody><row><entry align="char"> -<para>int ioctl(int fd, int request = FE_SET_TONE, +<para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>, fe_sec_tone_mode_t tone);</para> </entry> </row></tbody></tgroup></informaltable> @@ -1541,7 +1543,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_SET_TONE for this command.</para> +<para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -1592,7 +1594,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="fe_set_voltage"> +<section id="FE_SET_VOLTAGE"> <title>FE_SET_VOLTAGE</title> <para>DESCRIPTION </para> @@ -1606,7 +1608,7 @@ modulation mode which can be one of the following: </para> <informaltable><tgroup cols="1"><tbody><row><entry align="char"> -<para>int ioctl(int fd, int request = FE_SET_VOLTAGE, +<para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>, fe_sec_voltage_t voltage);</para> </entry> </row></tbody></tgroup></informaltable> @@ -1625,7 +1627,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_SET_VOLTAGE for this command.</para> +<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -1677,7 +1679,7 @@ modulation mode which can be one of the following: </row></tbody></tgroup></informaltable> </section> -<section id="frontend_enable_high_lnb_volt"> +<section id="FE_ENABLE_HIGH_LNB_VOLTAGE"> <title>FE_ENABLE_HIGH_LNB_VOLTAGE</title> <para>DESCRIPTION </para> @@ -1694,7 +1696,7 @@ modulation mode which can be one of the following: <informaltable><tgroup cols="1"><tbody><row><entry align="char"> <para>int ioctl(int fd, int request = - FE_ENABLE_HIGH_LNB_VOLTAGE, int high);</para> + <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para> </entry> </row></tbody></tgroup></informaltable> @@ -1712,7 +1714,7 @@ modulation mode which can be one of the following: <para>int request</para> </entry><entry align="char"> -<para>Equals FE_SET_VOLTAGE for this command.</para> +<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para> </entry> </row><row><entry align="char"> @@ -1762,5 +1764,82 @@ modulation mode which can be one of the following: </entry> </row></tbody></tgroup></informaltable> </section> + +<section id="FE_SET_FRONTEND_TUNE_MODE"> +<title>FE_SET_FRONTEND_TUNE_MODE</title> +<para>DESCRIPTION</para> +<informaltable><tgroup cols="1"><tbody><row> +<entry align="char"> +<para>Allow setting tuner mode flags to the frontend.</para> +</entry> +</row></tbody></tgroup></informaltable> + +<para>SYNOPSIS</para> +<informaltable><tgroup cols="1"><tbody><row> +<entry align="char"> +<para>int ioctl(int fd, int request = +<link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para> +</entry> +</row></tbody></tgroup></informaltable> + +<para>PARAMETERS</para> +<informaltable><tgroup cols="2"><tbody><row> +<entry align="char"> + <para>unsigned int flags</para> +</entry> +<entry align="char"> +<para> +FE_TUNE_MODE_ONESHOT When set, this flag will disable any zigzagging or other "normal" tuning behaviour. Additionally, there will be no automatic monitoring of the lock status, and hence no frontend events will be generated. If a frontend device is closed, this flag will be automatically turned off when the device is reopened read-write. +</para> +</entry> + </row></tbody></tgroup></informaltable> + +<para>ERRORS</para> +<informaltable><tgroup cols="2"><tbody><row> +<entry align="char"><para>EINVAL</para></entry> +<entry align="char"><para>Invalid argument.</para></entry> + </row></tbody></tgroup></informaltable> </section> -&sub-isdbt; + +<section id="FE_DISHNETWORK_SEND_LEGACY_CMD"> + <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title> +<para>DESCRIPTION</para> +<informaltable><tgroup cols="1"><tbody><row> +<entry align="char"> +<para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para> +<para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para> +<para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para> +</entry> +</row></tbody></tgroup></informaltable> + +<para>SYNOPSIS</para> +<informaltable><tgroup cols="1"><tbody><row> +<entry align="char"> +<para>int ioctl(int fd, int request = + <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para> +</entry> +</row></tbody></tgroup></informaltable> + +<para>PARAMETERS</para> +<informaltable><tgroup cols="2"><tbody><row> +<entry align="char"> + <para>unsigned long cmd</para> +</entry> +<entry align="char"> +<para> +sends the specified raw cmd to the dish via DISEqC. +</para> +</entry> + </row></tbody></tgroup></informaltable> + +<para>ERRORS</para> +<informaltable><tgroup cols="1"><tbody><row> +<entry align="char"> + <para>There are no errors in use for this call</para> +</entry> +</row></tbody></tgroup></informaltable> +</section> + +</section> + +&sub-dvbproperty; diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl index c671a016809..1448b33fd22 100644 --- a/Documentation/DocBook/genericirq.tmpl +++ b/Documentation/DocBook/genericirq.tmpl @@ -417,8 +417,8 @@ desc->chip->end(); </para> <para> To make use of the split implementation, replace the call to - __do_IRQ by a call to desc->chip->handle_irq() and associate - the appropriate handler function to desc->chip->handle_irq(). + __do_IRQ by a call to desc->handle_irq() and associate + the appropriate handler function to desc->handle_irq(). In most cases the generic handler implementations should be sufficient. </para> diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl index 992e67e6be7..7b3f4936341 100644 --- a/Documentation/DocBook/kernel-hacking.tmpl +++ b/Documentation/DocBook/kernel-hacking.tmpl @@ -352,7 +352,7 @@ asmlinkage long sys_mycall(int arg) </para> <programlisting> -if (signal_pending()) +if (signal_pending(current)) return -ERESTARTSYS; </programlisting> diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index 0eb43c1970b..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"> @@ -280,7 +294,7 @@ <!ENTITY sub-v4l2 SYSTEM "v4l/v4l2.xml"> <!ENTITY sub-intro SYSTEM "dvb/intro.xml"> <!ENTITY sub-frontend SYSTEM "dvb/frontend.xml"> -<!ENTITY sub-isdbt SYSTEM "dvb/isdbt.xml"> +<!ENTITY sub-dvbproperty SYSTEM "dvb/dvbproperty.xml"> <!ENTITY sub-demux SYSTEM "dvb/demux.xml"> <!ENTITY sub-video SYSTEM "dvb/video.xml"> <!ENTITY sub-audio SYSTEM "dvb/audio.xml"> @@ -288,6 +302,7 @@ <!ENTITY sub-net SYSTEM "dvb/net.xml"> <!ENTITY sub-kdapi SYSTEM "dvb/kdapi.xml"> <!ENTITY sub-examples SYSTEM "dvb/examples.xml"> +<!ENTITY sub-frontend-h SYSTEM "dvb/frontend.h.xml"> <!ENTITY sub-dvbapi SYSTEM "dvb/dvbapi.xml"> <!ENTITY sub-media SYSTEM "media.xml"> <!ENTITY sub-media-entities SYSTEM "media-entities.tmpl"> @@ -332,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/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index df0d089d0fb..f508a8a27fe 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl @@ -362,7 +362,7 @@ module_exit(board_cleanup); <sect1 id="Multiple_chip_control"> <title>Multiple chip control</title> <para> - The nand driver can control chip arrays. Therefor the + The nand driver can control chip arrays. Therefore the board driver must provide an own select_chip function. This function must (de)select the requested chip. The function pointer in the nand_chip structure must diff --git a/Documentation/DocBook/procfs-guide.tmpl b/Documentation/DocBook/procfs-guide.tmpl deleted file mode 100644 index 9eba4b7af73..00000000000 --- a/Documentation/DocBook/procfs-guide.tmpl +++ /dev/null @@ -1,626 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ -<!ENTITY procfsexample SYSTEM "procfs_example.xml"> -]> - -<book id="LKProcfsGuide"> - <bookinfo> - <title>Linux Kernel Procfs Guide</title> - - <authorgroup> - <author> - <firstname>Erik</firstname> - <othername>(J.A.K.)</othername> - <surname>Mouw</surname> - <affiliation> - <address> - <email>mouw@nl.linux.org</email> - </address> - </affiliation> - </author> - <othercredit> - <contrib> - This software and documentation were written while working on the - LART computing board - (<ulink url="http://www.lartmaker.nl/">http://www.lartmaker.nl/</ulink>), - which was sponsored by the Delt University of Technology projects - Mobile Multi-media Communications and Ubiquitous Communications. - </contrib> - </othercredit> - </authorgroup> - - <revhistory> - <revision> - <revnumber>1.0</revnumber> - <date>May 30, 2001</date> - <revremark>Initial revision posted to linux-kernel</revremark> - </revision> - <revision> - <revnumber>1.1</revnumber> - <date>June 3, 2001</date> - <revremark>Revised after comments from linux-kernel</revremark> - </revision> - </revhistory> - - <copyright> - <year>2001</year> - <holder>Erik Mouw</holder> - </copyright> - - - <legalnotice> - <para> - This documentation is free software; you can redistribute it - and/or modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later - version. - </para> - - <para> - This documentation is distributed in the hope that it will be - useful, but WITHOUT ANY WARRANTY; without even the implied - warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the GNU General Public License for more details. - </para> - - <para> - You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, - MA 02111-1307 USA - </para> - - <para> - For more details see the file COPYING in the source - distribution of Linux. - </para> - </legalnotice> - </bookinfo> - - - - - <toc> - </toc> - - - - - <preface id="Preface"> - <title>Preface</title> - - <para> - This guide describes the use of the procfs file system from - within the Linux kernel. The idea to write this guide came up on - the #kernelnewbies IRC channel (see <ulink - url="http://www.kernelnewbies.org/">http://www.kernelnewbies.org/</ulink>), - when Jeff Garzik explained the use of procfs and forwarded me a - message Alexander Viro wrote to the linux-kernel mailing list. I - agreed to write it up nicely, so here it is. - </para> - - <para> - I'd like to thank Jeff Garzik - <email>jgarzik@pobox.com</email> and Alexander Viro - <email>viro@parcelfarce.linux.theplanet.co.uk</email> for their input, - Tim Waugh <email>twaugh@redhat.com</email> for his <ulink - url="http://people.redhat.com/twaugh/docbook/selfdocbook/">Selfdocbook</ulink>, - and Marc Joosen <email>marcj@historia.et.tudelft.nl</email> for - proofreading. - </para> - - <para> - Erik - </para> - </preface> - - - - - <chapter id="intro"> - <title>Introduction</title> - - <para> - The <filename class="directory">/proc</filename> file system - (procfs) is a special file system in the linux kernel. It's a - virtual file system: it is not associated with a block device - but exists only in memory. The files in the procfs are there to - allow userland programs access to certain information from the - kernel (like process information in <filename - class="directory">/proc/[0-9]+/</filename>), but also for debug - purposes (like <filename>/proc/ksyms</filename>). - </para> - - <para> - This guide describes the use of the procfs file system from - within the Linux kernel. It starts by introducing all relevant - functions to manage the files within the file system. After that - it shows how to communicate with userland, and some tips and - tricks will be pointed out. Finally a complete example will be - shown. - </para> - - <para> - Note that the files in <filename - class="directory">/proc/sys</filename> are sysctl files: they - don't belong to procfs and are governed by a completely - different API described in the Kernel API book. - </para> - </chapter> - - - - - <chapter id="managing"> - <title>Managing procfs entries</title> - - <para> - This chapter describes the functions that various kernel - components use to populate the procfs with files, symlinks, - device nodes, and directories. - </para> - - <para> - A minor note before we start: if you want to use any of the - procfs functions, be sure to include the correct header file! - This should be one of the first lines in your code: - </para> - - <programlisting> -#include <linux/proc_fs.h> - </programlisting> - - - - - <sect1 id="regularfile"> - <title>Creating a regular file</title> - - <funcsynopsis> - <funcprototype> - <funcdef>struct proc_dir_entry* <function>create_proc_entry</function></funcdef> - <paramdef>const char* <parameter>name</parameter></paramdef> - <paramdef>mode_t <parameter>mode</parameter></paramdef> - <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <para> - This function creates a regular file with the name - <parameter>name</parameter>, file mode - <parameter>mode</parameter> in the directory - <parameter>parent</parameter>. To create a file in the root of - the procfs, use <constant>NULL</constant> as - <parameter>parent</parameter> parameter. When successful, the - function will return a pointer to the freshly created - <structname>struct proc_dir_entry</structname>; otherwise it - will return <constant>NULL</constant>. <xref - linkend="userland"/> describes how to do something useful with - regular files. - </para> - - <para> - Note that it is specifically supported that you can pass a - path that spans multiple directories. For example - <function>create_proc_entry</function>(<parameter>"drivers/via0/info"</parameter>) - will create the <filename class="directory">via0</filename> - directory if necessary, with standard - <constant>0755</constant> permissions. - </para> - - <para> - If you only want to be able to read the file, the function - <function>create_proc_read_entry</function> described in <xref - linkend="convenience"/> may be used to create and initialise - the procfs entry in one single call. - </para> - </sect1> - - - - - <sect1 id="Creating_a_symlink"> - <title>Creating a symlink</title> - - <funcsynopsis> - <funcprototype> - <funcdef>struct proc_dir_entry* - <function>proc_symlink</function></funcdef> <paramdef>const - char* <parameter>name</parameter></paramdef> - <paramdef>struct proc_dir_entry* - <parameter>parent</parameter></paramdef> <paramdef>const - char* <parameter>dest</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <para> - This creates a symlink in the procfs directory - <parameter>parent</parameter> that points from - <parameter>name</parameter> to - <parameter>dest</parameter>. This translates in userland to - <literal>ln -s</literal> <parameter>dest</parameter> - <parameter>name</parameter>. - </para> - </sect1> - - <sect1 id="Creating_a_directory"> - <title>Creating a directory</title> - - <funcsynopsis> - <funcprototype> - <funcdef>struct proc_dir_entry* <function>proc_mkdir</function></funcdef> - <paramdef>const char* <parameter>name</parameter></paramdef> - <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <para> - Create a directory <parameter>name</parameter> in the procfs - directory <parameter>parent</parameter>. - </para> - </sect1> - - - - - <sect1 id="Removing_an_entry"> - <title>Removing an entry</title> - - <funcsynopsis> - <funcprototype> - <funcdef>void <function>remove_proc_entry</function></funcdef> - <paramdef>const char* <parameter>name</parameter></paramdef> - <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <para> - Removes the entry <parameter>name</parameter> in the directory - <parameter>parent</parameter> from the procfs. Entries are - removed by their <emphasis>name</emphasis>, not by the - <structname>struct proc_dir_entry</structname> returned by the - various create functions. Note that this function doesn't - recursively remove entries. - </para> - - <para> - Be sure to free the <structfield>data</structfield> entry from - the <structname>struct proc_dir_entry</structname> before - <function>remove_proc_entry</function> is called (that is: if - there was some <structfield>data</structfield> allocated, of - course). See <xref linkend="usingdata"/> for more information - on using the <structfield>data</structfield> entry. - </para> - </sect1> - </chapter> - - - - - <chapter id="userland"> - <title>Communicating with userland</title> - - <para> - Instead of reading (or writing) information directly from - kernel memory, procfs works with <emphasis>call back - functions</emphasis> for files: functions that are called when - a specific file is being read or written. Such functions have - to be initialised after the procfs file is created by setting - the <structfield>read_proc</structfield> and/or - <structfield>write_proc</structfield> fields in the - <structname>struct proc_dir_entry*</structname> that the - function <function>create_proc_entry</function> returned: - </para> - - <programlisting> -struct proc_dir_entry* entry; - -entry->read_proc = read_proc_foo; -entry->write_proc = write_proc_foo; - </programlisting> - - <para> - If you only want to use a the - <structfield>read_proc</structfield>, the function - <function>create_proc_read_entry</function> described in <xref - linkend="convenience"/> may be used to create and initialise the - procfs entry in one single call. - </para> - - - - <sect1 id="Reading_data"> - <title>Reading data</title> - - <para> - The read function is a call back function that allows userland - processes to read data from the kernel. The read function - should have the following format: - </para> - - <funcsynopsis> - <funcprototype> - <funcdef>int <function>read_func</function></funcdef> - <paramdef>char* <parameter>buffer</parameter></paramdef> - <paramdef>char** <parameter>start</parameter></paramdef> - <paramdef>off_t <parameter>off</parameter></paramdef> - <paramdef>int <parameter>count</parameter></paramdef> - <paramdef>int* <parameter>peof</parameter></paramdef> - <paramdef>void* <parameter>data</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <para> - The read function should write its information into the - <parameter>buffer</parameter>, which will be exactly - <literal>PAGE_SIZE</literal> bytes long. - </para> - - <para> - The parameter - <parameter>peof</parameter> should be used to signal that the - end of the file has been reached by writing - <literal>1</literal> to the memory location - <parameter>peof</parameter> points to. - </para> - - <para> - The <parameter>data</parameter> - parameter can be used to create a single call back function for - several files, see <xref linkend="usingdata"/>. - </para> - - <para> - The rest of the parameters and the return value are described - by a comment in <filename>fs/proc/generic.c</filename> as follows: - </para> - - <blockquote> - <para> - You have three ways to return data: - </para> - <orderedlist> - <listitem> - <para> - Leave <literal>*start = NULL</literal>. (This is the default.) - Put the data of the requested offset at that - offset within the buffer. Return the number (<literal>n</literal>) - of bytes there are from the beginning of the - buffer up to the last byte of data. If the - number of supplied bytes (<literal>= n - offset</literal>) is - greater than zero and you didn't signal eof - and the reader is prepared to take more data - you will be called again with the requested - offset advanced by the number of bytes - absorbed. This interface is useful for files - no larger than the buffer. - </para> - </listitem> - <listitem> - <para> - Set <literal>*start</literal> to an unsigned long value less than - the buffer address but greater than zero. - Put the data of the requested offset at the - beginning of the buffer. Return the number of - bytes of data placed there. If this number is - greater than zero and you didn't signal eof - and the reader is prepared to take more data - you will be called again with the requested - offset advanced by <literal>*start</literal>. This interface is - useful when you have a large file consisting - of a series of blocks which you want to count - and return as wholes. - (Hack by Paul.Russell@rustcorp.com.au) - </para> - </listitem> - <listitem> - <para> - Set <literal>*start</literal> to an address within the buffer. - Put the data of the requested offset at <literal>*start</literal>. - Return the number of bytes of data placed there. - If this number is greater than zero and you - didn't signal eof and the reader is prepared to - take more data you will be called again with the - requested offset advanced by the number of bytes - absorbed. - </para> - </listitem> - </orderedlist> - </blockquote> - - <para> - <xref linkend="example"/> shows how to use a read call back - function. - </para> - </sect1> - - - - - <sect1 id="Writing_data"> - <title>Writing data</title> - - <para> - The write call back function allows a userland process to write - data to the kernel, so it has some kind of control over the - kernel. The write function should have the following format: - </para> - - <funcsynopsis> - <funcprototype> - <funcdef>int <function>write_func</function></funcdef> - <paramdef>struct file* <parameter>file</parameter></paramdef> - <paramdef>const char* <parameter>buffer</parameter></paramdef> - <paramdef>unsigned long <parameter>count</parameter></paramdef> - <paramdef>void* <parameter>data</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <para> - The write function should read <parameter>count</parameter> - bytes at maximum from the <parameter>buffer</parameter>. Note - that the <parameter>buffer</parameter> doesn't live in the - kernel's memory space, so it should first be copied to kernel - space with <function>copy_from_user</function>. The - <parameter>file</parameter> parameter is usually - ignored. <xref linkend="usingdata"/> shows how to use the - <parameter>data</parameter> parameter. - </para> - - <para> - Again, <xref linkend="example"/> shows how to use this call back - function. - </para> - </sect1> - - - - - <sect1 id="usingdata"> - <title>A single call back for many files</title> - - <para> - When a large number of almost identical files is used, it's - quite inconvenient to use a separate call back function for - each file. A better approach is to have a single call back - function that distinguishes between the files by using the - <structfield>data</structfield> field in <structname>struct - proc_dir_entry</structname>. First of all, the - <structfield>data</structfield> field has to be initialised: - </para> - - <programlisting> -struct proc_dir_entry* entry; -struct my_file_data *file_data; - -file_data = kmalloc(sizeof(struct my_file_data), GFP_KERNEL); -entry->data = file_data; - </programlisting> - - <para> - The <structfield>data</structfield> field is a <type>void - *</type>, so it can be initialised with anything. - </para> - - <para> - Now that the <structfield>data</structfield> field is set, the - <function>read_proc</function> and - <function>write_proc</function> can use it to distinguish - between files because they get it passed into their - <parameter>data</parameter> parameter: - </para> - - <programlisting> -int foo_read_func(char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - int len; - - if(data == file_data) { - /* special case for this file */ - } else { - /* normal processing */ - } - - return len; -} - </programlisting> - - <para> - Be sure to free the <structfield>data</structfield> data field - when removing the procfs entry. - </para> - </sect1> - </chapter> - - - - - <chapter id="tips"> - <title>Tips and tricks</title> - - - - - <sect1 id="convenience"> - <title>Convenience functions</title> - - <funcsynopsis> - <funcprototype> - <funcdef>struct proc_dir_entry* <function>create_proc_read_entry</function></funcdef> - <paramdef>const char* <parameter>name</parameter></paramdef> - <paramdef>mode_t <parameter>mode</parameter></paramdef> - <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> - <paramdef>read_proc_t* <parameter>read_proc</parameter></paramdef> - <paramdef>void* <parameter>data</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <para> - This function creates a regular file in exactly the same way - as <function>create_proc_entry</function> from <xref - linkend="regularfile"/> does, but also allows to set the read - function <parameter>read_proc</parameter> in one call. This - function can set the <parameter>data</parameter> as well, like - explained in <xref linkend="usingdata"/>. - </para> - </sect1> - - - - <sect1 id="Modules"> - <title>Modules</title> - - <para> - If procfs is being used from within a module, be sure to set - the <structfield>owner</structfield> field in the - <structname>struct proc_dir_entry</structname> to - <constant>THIS_MODULE</constant>. - </para> - - <programlisting> -struct proc_dir_entry* entry; - -entry->owner = THIS_MODULE; - </programlisting> - </sect1> - - - - - <sect1 id="Mode_and_ownership"> - <title>Mode and ownership</title> - - <para> - Sometimes it is useful to change the mode and/or ownership of - a procfs entry. Here is an example that shows how to achieve - that: - </para> - - <programlisting> -struct proc_dir_entry* entry; - -entry->mode = S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH; -entry->uid = 0; -entry->gid = 100; - </programlisting> - - </sect1> - </chapter> - - - - - <chapter id="example"> - <title>Example</title> - - <!-- be careful with the example code: it shouldn't be wider than - approx. 60 columns, or otherwise it won't fit properly on a page - --> - -&procfsexample; - - </chapter> -</book> diff --git a/Documentation/DocBook/procfs_example.c b/Documentation/DocBook/procfs_example.c deleted file mode 100644 index a5b11793b1e..00000000000 --- a/Documentation/DocBook/procfs_example.c +++ /dev/null @@ -1,201 +0,0 @@ -/* - * procfs_example.c: an example proc interface - * - * Copyright (C) 2001, Erik Mouw (mouw@nl.linux.org) - * - * This file accompanies the procfs-guide in the Linux kernel - * source. Its main use is to demonstrate the concepts and - * functions described in the guide. - * - * This software has been developed while working on the LART - * computing board (http://www.lartmaker.nl), which was sponsored - * by the Delt University of Technology projects Mobile Multi-media - * Communications and Ubiquitous Communications. - * - * This program is free software; you can redistribute - * it and/or modify it under the terms of the GNU General - * Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, - * Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/proc_fs.h> -#include <linux/jiffies.h> -#include <asm/uaccess.h> - - -#define MODULE_VERS "1.0" -#define MODULE_NAME "procfs_example" - -#define FOOBAR_LEN 8 - -struct fb_data_t { - char name[FOOBAR_LEN + 1]; - char value[FOOBAR_LEN + 1]; -}; - - -static struct proc_dir_entry *example_dir, *foo_file, - *bar_file, *jiffies_file, *symlink; - - -struct fb_data_t foo_data, bar_data; - - -static int proc_read_jiffies(char *page, char **start, - off_t off, int count, - int *eof, void *data) -{ - int len; - - len = sprintf(page, "jiffies = %ld\n", - jiffies); - - return len; -} - - -static int proc_read_foobar(char *page, char **start, - off_t off, int count, - int *eof, void *data) -{ - int len; - struct fb_data_t *fb_data = (struct fb_data_t *)data; - - /* DON'T DO THAT - buffer overruns are bad */ - len = sprintf(page, "%s = '%s'\n", - fb_data->name, fb_data->value); - - return len; -} - - -static int proc_write_foobar(struct file *file, - const char *buffer, - unsigned long count, - void *data) -{ - int len; - struct fb_data_t *fb_data = (struct fb_data_t *)data; - - if(count > FOOBAR_LEN) - len = FOOBAR_LEN; - else - len = count; - - if(copy_from_user(fb_data->value, buffer, len)) - return -EFAULT; - - fb_data->value[len] = '\0'; - - return len; -} - - -static int __init init_procfs_example(void) -{ - int rv = 0; - - /* create directory */ - example_dir = proc_mkdir(MODULE_NAME, NULL); - if(example_dir == NULL) { - rv = -ENOMEM; - goto out; - } - /* create jiffies using convenience function */ - jiffies_file = create_proc_read_entry("jiffies", - 0444, example_dir, - proc_read_jiffies, - NULL); - if(jiffies_file == NULL) { - rv = -ENOMEM; - goto no_jiffies; - } - - /* create foo and bar files using same callback - * functions - */ - foo_file = create_proc_entry("foo", 0644, example_dir); - if(foo_file == NULL) { - rv = -ENOMEM; - goto no_foo; - } - - strcpy(foo_data.name, "foo"); - strcpy(foo_data.value, "foo"); - foo_file->data = &foo_data; - foo_file->read_proc = proc_read_foobar; - foo_file->write_proc = proc_write_foobar; - - bar_file = create_proc_entry("bar", 0644, example_dir); - if(bar_file == NULL) { - rv = -ENOMEM; - goto no_bar; - } - - strcpy(bar_data.name, "bar"); - strcpy(bar_data.value, "bar"); - bar_file->data = &bar_data; - bar_file->read_proc = proc_read_foobar; - bar_file->write_proc = proc_write_foobar; - - /* create symlink */ - symlink = proc_symlink("jiffies_too", example_dir, - "jiffies"); - if(symlink == NULL) { - rv = -ENOMEM; - goto no_symlink; - } - - /* everything OK */ - printk(KERN_INFO "%s %s initialised\n", - MODULE_NAME, MODULE_VERS); - return 0; - -no_symlink: - remove_proc_entry("bar", example_dir); -no_bar: - remove_proc_entry("foo", example_dir); -no_foo: - remove_proc_entry("jiffies", example_dir); -no_jiffies: - remove_proc_entry(MODULE_NAME, NULL); -out: - return rv; -} - - -static void __exit cleanup_procfs_example(void) -{ - remove_proc_entry("jiffies_too", example_dir); - remove_proc_entry("bar", example_dir); - remove_proc_entry("foo", example_dir); - remove_proc_entry("jiffies", example_dir); - remove_proc_entry(MODULE_NAME, NULL); - - printk(KERN_INFO "%s %s removed\n", - MODULE_NAME, MODULE_VERS); -} - - -module_init(init_procfs_example); -module_exit(cleanup_procfs_example); - -MODULE_AUTHOR("Erik Mouw"); -MODULE_DESCRIPTION("procfs examples"); -MODULE_LICENSE("GPL"); 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/controls.xml b/Documentation/DocBook/v4l/controls.xml index f492accb691..f4645061041 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml @@ -281,10 +281,28 @@ minimum value disables backlight compensation.</entry> <constant>V4L2_COLORFX_SEPIA</constant> (2).</entry> </row> <row> + <entry><constant>V4L2_CID_ROTATE</constant></entry> + <entry>integer</entry> + <entry>Rotates the image by specified angle. Common angles are 90, + 270 and 180. Rotating the image to 90 and 270 will reverse the height + and width of the display window. It is necessary to set the new height and + width of the picture using the &VIDIOC-S-FMT; ioctl according to + the rotation angle selected.</entry> + </row> + <row> + <entry><constant>V4L2_CID_BG_COLOR</constant></entry> + <entry>integer</entry> + <entry>Sets the background color on the current output device. + Background color needs to be specified in the RGB24 format. The + supplied 32 bit value is interpreted as bits 0-7 Red color information, + bits 8-15 Green color information, bits 16-23 Blue color + information and bits 24-31 must be zero.</entry> + </row> + <row> <entry><constant>V4L2_CID_LASTP1</constant></entry> <entry></entry> <entry>End of the predefined control IDs (currently -<constant>V4L2_CID_COLORFX</constant> + 1).</entry> +<constant>V4L2_CID_BG_COLOR</constant> + 1).</entry> </row> <row> <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index 7d396a3785f..885968d6a2f 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml @@ -770,6 +770,11 @@ kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.hm <entry>'S920'</entry> <entry>YUV 4:2:0 format of the gspca sn9c20x driver.</entry> </row> + <row id="V4L2-PIX-FMT-STV0680"> + <entry><constant>V4L2_PIX_FMT_STV0680</constant></entry> + <entry>'S680'</entry> + <entry>Bayer format of the gspca stv0680 driver.</entry> + </row> <row id="V4L2-PIX-FMT-WNVA"> <entry><constant>V4L2_PIX_FMT_WNVA</constant></entry> <entry>'WNVA'</entry> 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 97002060ac4..06832594065 100644 --- a/Documentation/DocBook/v4l/videodev2.h.xml +++ b/Documentation/DocBook/v4l/videodev2.h.xml @@ -363,6 +363,7 @@ struct <link linkend="v4l2-pix-format">v4l2_pix_format</link> { #define <link linkend="V4L2-PIX-FMT-OV511">V4L2_PIX_FMT_OV511</link> v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ #define <link linkend="V4L2-PIX-FMT-OV518">V4L2_PIX_FMT_OV518</link> v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ #define <link linkend="V4L2-PIX-FMT-TM6000">V4L2_PIX_FMT_TM6000</link> v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ +#define <link linkend="V4L2-PIX-FMT-STV0680">V4L2_PIX_FMT_STV0680</link> v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ /* * F O R M A T E N U M E R A T I O N @@ -492,7 +493,7 @@ struct <link linkend="v4l2-jpegcompression">v4l2_jpegcompression</link> { * you do, leave them untouched. * Inluding less markers will make the * resulting code smaller, but there will - * be fewer aplications which can read it. + * be fewer applications which can read it. * The presence of the APP and COM marker * is influenced by APP_len and COM_len * ONLY, not by this property! */ @@ -565,6 +566,7 @@ struct <link linkend="v4l2-framebuffer">v4l2_framebuffer</link> { #define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 #define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 #define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 +#define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080 /* Flags for the 'flags' field. */ #define V4L2_FBUF_FLAG_PRIMARY 0x0001 #define V4L2_FBUF_FLAG_OVERLAY 0x0002 @@ -572,6 +574,7 @@ struct <link linkend="v4l2-framebuffer">v4l2_framebuffer</link> { #define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 +#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040 struct <link linkend="v4l2-clip">v4l2_clip</link> { struct <link linkend="v4l2-rect">v4l2_rect</link> c; @@ -731,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> { @@ -741,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 */ @@ -772,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 */ @@ -782,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 */ @@ -914,8 +1022,10 @@ enum <link linkend="v4l2-colorfx">v4l2_colorfx</link> { #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) #define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) +#define V4L2_CID_ROTATE (V4L2_CID_BASE+34) +#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) /* last CID + 1 */ -#define V4L2_CID_LASTP1 (V4L2_CID_BASE+34) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) /* MPEG-class control IDs defined by V4L2 */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) @@ -1621,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> + <row> + <entry>V4L2_DV_1080P30</entry> + <entry>16</entry> + <entry>1920x1080 progressive video at 30 fps as per SMPTE 296M.</entry> + </row> + <row> + <entry>V4L2_DV_1080P50</entry> + <entry>17</entry> + <entry>1920x1080 progressive video at 50 fps as per BT.1120.</entry> + </row> + <row> + <entry>V4L2_DV_1080P60</entry> + <entry>18</entry> + <entry>1920x1080 progressive video at 60 fps as per BT.1120.</entry> + </row> + </tbody> + </tgroup> + </table> + </refsect1> + + <refsect1> + &return-value; + + <variablelist> + <varlistentry> + <term><errorcode>EINVAL</errorcode></term> + <listitem> + <para>The &v4l2-dv-enum-preset; <structfield>index</structfield> +is out of bounds.</para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> +</refentry> + +<!-- +Local Variables: +mode: sgml +sgml-parent-document: "v4l2.sgml" +indent-tabs-mode: nil +End: +--> diff --git a/Documentation/DocBook/v4l/vidioc-enuminput.xml b/Documentation/DocBook/v4l/vidioc-enuminput.xml index 414856b8247..71b868e2fb8 100644 --- a/Documentation/DocBook/v4l/vidioc-enuminput.xml +++ b/Documentation/DocBook/v4l/vidioc-enuminput.xml @@ -124,7 +124,13 @@ current input.</entry> </row> <row> <entry>__u32</entry> - <entry><structfield>reserved</structfield>[4]</entry> + <entry><structfield>capabilities</structfield></entry> + <entry>This field provides capabilities for the +input. See <xref linkend="input-capabilities" /> for flags.</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>reserved</structfield>[3]</entry> <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> </row> @@ -261,6 +267,34 @@ flag is set Macrovision has been detected.</entry> </tbody> </tgroup> </table> + + <!-- Capability flags based on video timings RFC by Muralidharan +Karicheri, titled RFC (v1.2): V4L - Support for video timings at the +input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. + --> + <table frame="none" pgwide="1" id="input-capabilities"> + <title>Input capabilities</title> + <tgroup cols="3"> + &cs-def; + <tbody valign="top"> + <row> + <entry><constant>V4L2_IN_CAP_PRESETS</constant></entry> + <entry>0x00000001</entry> + <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> + </row> + <row> + <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry> + <entry>0x00000002</entry> + <entry>This input supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry> + </row> + <row> + <entry><constant>V4L2_IN_CAP_STD</constant></entry> + <entry>0x00000004</entry> + <entry>This input supports setting the TV standard by using VIDIOC_S_STD.</entry> + </row> + </tbody> + </tgroup> + </table> </refsect1> <refsect1> diff --git a/Documentation/DocBook/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/v4l/vidioc-enumoutput.xml index e8d16dcd50c..a281d26a195 100644 --- a/Documentation/DocBook/v4l/vidioc-enumoutput.xml +++ b/Documentation/DocBook/v4l/vidioc-enumoutput.xml @@ -114,7 +114,13 @@ details on video standards and how to switch see <xref </row> <row> <entry>__u32</entry> - <entry><structfield>reserved</structfield>[4]</entry> + <entry><structfield>capabilities</structfield></entry> + <entry>This field provides capabilities for the +output. See <xref linkend="output-capabilities" /> for flags.</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>reserved</structfield>[3]</entry> <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> </row> @@ -147,6 +153,34 @@ CVBS, S-Video, RGB.</entry> </tgroup> </table> + <!-- Capabilities flags based on video timings RFC by Muralidharan +Karicheri, titled RFC (v1.2): V4L - Support for video timings at the +input/output interface to linux-media@vger.kernel.org on 19 Oct 2009. + --> + <table frame="none" pgwide="1" id="output-capabilities"> + <title>Output capabilities</title> + <tgroup cols="3"> + &cs-def; + <tbody valign="top"> + <row> + <entry><constant>V4L2_OUT_CAP_PRESETS</constant></entry> + <entry>0x00000001</entry> + <entry>This output supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry> + </row> + <row> + <entry><constant>V4L2_OUT_CAP_CUSTOM_TIMINGS</constant></entry> + <entry>0x00000002</entry> + <entry>This output supports setting custom video timings by using VIDIOC_S_DV_TIMINGS.</entry> + </row> + <row> + <entry><constant>V4L2_OUT_CAP_STD</constant></entry> + <entry>0x00000004</entry> + <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry> + </row> + </tbody> + </tgroup> + </table> + </refsect1> <refsect1> &return-value; diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml new file mode 100644 index 00000000000..3c6784e132f --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-g-dv-preset.xml @@ -0,0 +1,111 @@ +<refentry id="vidioc-g-dv-preset"> + <refmeta> + <refentrytitle>ioctl VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</refentrytitle> + &manvol; + </refmeta> + + <refnamediv> + <refname>VIDIOC_G_DV_PRESET</refname> + <refname>VIDIOC_S_DV_PRESET</refname> + <refpurpose>Query or select the DV preset of the current input or output</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ioctl</function></funcdef> + <paramdef>int <parameter>fd</parameter></paramdef> + <paramdef>int <parameter>request</parameter></paramdef> + <paramdef>&v4l2-dv-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_G_DV_PRESET, VIDIOC_S_DV_PRESET</para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>argp</parameter></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1> + <title>Description</title> + <para>To query and select the current DV preset, applications +use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant> +ioctls which take a pointer to a &v4l2-dv-preset; type as argument. +Applications must zero the reserved array in &v4l2-dv-preset;. +<constant>VIDIOC_G_DV_PRESET</constant> returns a dv preset in the field +<structfield>preset</structfield> of &v4l2-dv-preset;.</para> + + <para><constant>VIDIOC_S_DV_PRESET</constant> accepts a pointer to a &v4l2-dv-preset; +that has the preset value to be set. Applications must zero the reserved array in &v4l2-dv-preset;. +If the preset is not supported, it returns an &EINVAL; </para> + </refsect1> + + <refsect1> + &return-value; + + <variablelist> + <varlistentry> + <term><errorcode>EINVAL</errorcode></term> + <listitem> + <para>This ioctl is not supported, or the +<constant>VIDIOC_S_DV_PRESET</constant>,<constant>VIDIOC_S_DV_PRESET</constant> parameter was unsuitable.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><errorcode>EBUSY</errorcode></term> + <listitem> + <para>The device is busy and therefore can not change the preset.</para> + </listitem> + </varlistentry> + </variablelist> + + <table pgwide="1" frame="none" id="v4l2-dv-preset"> + <title>struct <structname>v4l2_dv_preset</structname></title> + <tgroup cols="3"> + &cs-str; + <tbody valign="top"> + <row> + <entry>__u32</entry> + <entry><structfield>preset</structfield></entry> + <entry>Preset value to represent the digital video timings</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>reserved[4]</structfield></entry> + <entry>Reserved fields for future use</entry> + </row> + </tbody> + </tgroup> + </table> + + </refsect1> +</refentry> + +<!-- +Local Variables: +mode: sgml +sgml-parent-document: "v4l2.sgml" +indent-tabs-mode: nil +End: +--> diff --git a/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml new file mode 100644 index 00000000000..ecc19576bb8 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-g-dv-timings.xml @@ -0,0 +1,224 @@ +<refentry id="vidioc-g-dv-timings"> + <refmeta> + <refentrytitle>ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</refentrytitle> + &manvol; + </refmeta> + + <refnamediv> + <refname>VIDIOC_G_DV_TIMINGS</refname> + <refname>VIDIOC_S_DV_TIMINGS</refname> + <refpurpose>Get or set custom DV timings for input or output</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ioctl</function></funcdef> + <paramdef>int <parameter>fd</parameter></paramdef> + <paramdef>int <parameter>request</parameter></paramdef> + <paramdef>&v4l2-dv-timings; +*<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_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>argp</parameter></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1> + <title>Description</title> + <para>To set custom DV timings for the input or output, applications use the +<constant>VIDIOC_S_DV_TIMINGS</constant> ioctl and to get the current custom timings, +applications use the <constant>VIDIOC_G_DV_TIMINGS</constant> ioctl. The detailed timing +information is filled in using the structure &v4l2-dv-timings;. These ioctls take +a pointer to the &v4l2-dv-timings; structure as argument. If the ioctl is not supported +or the timing values are not correct, the driver returns &EINVAL;.</para> + </refsect1> + + <refsect1> + &return-value; + + <variablelist> + <varlistentry> + <term><errorcode>EINVAL</errorcode></term> + <listitem> + <para>This ioctl is not supported, or the +<constant>VIDIOC_S_DV_TIMINGS</constant> parameter was unsuitable.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><errorcode>EBUSY</errorcode></term> + <listitem> + <para>The device is busy and therefore can not change the timings.</para> + </listitem> + </varlistentry> + </variablelist> + + <table pgwide="1" frame="none" id="v4l2-bt-timings"> + <title>struct <structname>v4l2_bt_timings</structname></title> + <tgroup cols="3"> + &cs-str; + <tbody valign="top"> + <row> + <entry>__u32</entry> + <entry><structfield>width</structfield></entry> + <entry>Width of the active video in pixels</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>height</structfield></entry> + <entry>Height of the active video in lines</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>interlaced</structfield></entry> + <entry>Progressive (0) or interlaced (1)</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>polarities</structfield></entry> + <entry>This is a bit mask that defines polarities of sync signals. +bit 0 (V4L2_DV_VSYNC_POS_POL) is for vertical sync polarity and bit 1 (V4L2_DV_HSYNC_POS_POL) is for horizontal sync polarity. If the bit is set +(1) it is positive polarity and if is cleared (0), it is negative polarity.</entry> + </row> + <row> + <entry>__u64</entry> + <entry><structfield>pixelclock</structfield></entry> + <entry>Pixel clock in Hz. Ex. 74.25MHz->74250000</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>hfrontporch</structfield></entry> + <entry>Horizontal front porch in pixels</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>hsync</structfield></entry> + <entry>Horizontal sync length in pixels</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>hbackporch</structfield></entry> + <entry>Horizontal back porch in pixels</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>vfrontporch</structfield></entry> + <entry>Vertical front porch in lines</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>vsync</structfield></entry> + <entry>Vertical sync length in lines</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>vbackporch</structfield></entry> + <entry>Vertical back porch in lines</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>il_vfrontporch</structfield></entry> + <entry>Vertical front porch in lines for bottom field of interlaced field formats</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>il_vsync</structfield></entry> + <entry>Vertical sync length in lines for bottom field of interlaced field formats</entry> + </row> + <row> + <entry>__u32</entry> + <entry><structfield>il_vbackporch</structfield></entry> + <entry>Vertical back porch in lines for bottom field of interlaced field formats</entry> + </row> + </tbody> + </tgroup> + </table> + + <table pgwide="1" frame="none" id="v4l2-dv-timings"> + <title>struct <structname>v4l2_dv_timings</structname></title> + <tgroup cols="4"> + &cs-str; + <tbody valign="top"> + <row> + <entry>__u32</entry> + <entry><structfield>type</structfield></entry> + <entry></entry> + <entry>Type of DV timings as listed in <xref linkend="dv-timing-types"/>.</entry> + </row> + <row> + <entry>union</entry> + <entry><structfield></structfield></entry> + <entry></entry> + </row> + <row> + <entry></entry> + <entry>&v4l2-bt-timings;</entry> + <entry><structfield>bt</structfield></entry> + <entry>Timings defined by BT.656/1120 specifications</entry> + </row> + <row> + <entry></entry> + <entry>__u32</entry> + <entry><structfield>reserved</structfield>[32]</entry> + <entry></entry> + </row> + </tbody> + </tgroup> + </table> + + <table pgwide="1" frame="none" id="dv-timing-types"> + <title>DV Timing types</title> + <tgroup cols="3"> + &cs-str; + <tbody valign="top"> + <row> + <entry>Timing type</entry> + <entry>value</entry> + <entry>Description</entry> + </row> + <row> + <entry></entry> + <entry></entry> + <entry></entry> + </row> + <row> + <entry>V4L2_DV_BT_656_1120</entry> + <entry>0</entry> + <entry>BT.656/1120 timings</entry> + </row> + </tbody> + </tgroup> + </table> + </refsect1> +</refentry> + +<!-- +Local Variables: +mode: sgml +sgml-parent-document: "v4l2.sgml" +indent-tabs-mode: nil +End: +--> diff --git a/Documentation/DocBook/v4l/vidioc-g-fbuf.xml b/Documentation/DocBook/v4l/vidioc-g-fbuf.xml index f7017062656..e7dda4822f0 100644 --- a/Documentation/DocBook/v4l/vidioc-g-fbuf.xml +++ b/Documentation/DocBook/v4l/vidioc-g-fbuf.xml @@ -336,6 +336,13 @@ alpha value. Alpha blending makes no sense for destructive overlays.</entry> inverted alpha channel of the framebuffer or VGA signal. Alpha blending makes no sense for destructive overlays.</entry> </row> + <row> + <entry><constant>V4L2_FBUF_CAP_SRC_CHROMAKEY</constant></entry> + <entry>0x0080</entry> + <entry>The device supports Source Chroma-keying. Framebuffer pixels +with the chroma-key colors are replaced by video pixels, which is exactly opposite of +<constant>V4L2_FBUF_CAP_CHROMAKEY</constant></entry> + </row> </tbody> </tgroup> </table> @@ -411,6 +418,16 @@ images, but with an inverted alpha value. The blend function is: output = framebuffer pixel * (1 - alpha) + video pixel * alpha. The actual alpha depth depends on the framebuffer pixel format.</entry> </row> + <row> + <entry><constant>V4L2_FBUF_FLAG_SRC_CHROMAKEY</constant></entry> + <entry>0x0040</entry> + <entry>Use source chroma-keying. The source chroma-key color is +determined by the <structfield>chromakey</structfield> field of +&v4l2-window; and negotiated with the &VIDIOC-S-FMT; ioctl, see <xref +linkend="overlay" /> and <xref linkend="osd" />. +Both chroma-keying are mutual exclusive to each other, so same +<structfield>chromakey</structfield> field of &v4l2-window; is being used.</entry> + </row> </tbody> </tgroup> </table> diff --git a/Documentation/DocBook/v4l/vidioc-g-std.xml b/Documentation/DocBook/v4l/vidioc-g-std.xml index b6f5d267e85..912f8513e5d 100644 --- a/Documentation/DocBook/v4l/vidioc-g-std.xml +++ b/Documentation/DocBook/v4l/vidioc-g-std.xml @@ -86,6 +86,12 @@ standards.</para> <constant>VIDIOC_S_STD</constant> parameter was unsuitable.</para> </listitem> </varlistentry> + <varlistentry> + <term><errorcode>EBUSY</errorcode></term> + <listitem> + <para>The device is busy and therefore can not change the standard</para> + </listitem> + </varlistentry> </variablelist> </refsect1> </refentry> diff --git a/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml new file mode 100644 index 00000000000..87e4f0f6151 --- /dev/null +++ b/Documentation/DocBook/v4l/vidioc-query-dv-preset.xml @@ -0,0 +1,85 @@ +<refentry id="vidioc-query-dv-preset"> + <refmeta> + <refentrytitle>ioctl VIDIOC_QUERY_DV_PRESET</refentrytitle> + &manvol; + </refmeta> + + <refnamediv> + <refname>VIDIOC_QUERY_DV_PRESET</refname> + <refpurpose>Sense the DV preset received by the current +input</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ioctl</function></funcdef> + <paramdef>int <parameter>fd</parameter></paramdef> + <paramdef>int <parameter>request</parameter></paramdef> + <paramdef>&v4l2-dv-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_QUERY_DV_PRESET</para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>argp</parameter></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + + <refsect1> + <title>Description</title> + + <para>The hardware may be able to detect the current DV preset +automatically, similar to sensing the video standard. To do so, applications +call <constant> VIDIOC_QUERY_DV_PRESET</constant> with a pointer to a +&v4l2-dv-preset; type. Once the hardware detects a preset, that preset is +returned in the preset field of &v4l2-dv-preset;. When detection is not +possible or fails, the value V4L2_DV_INVALID is returned.</para> + </refsect1> + + <refsect1> + &return-value; + <variablelist> + <varlistentry> + <term><errorcode>EINVAL</errorcode></term> + <listitem> + <para>This ioctl is not supported.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><errorcode>EBUSY</errorcode></term> + <listitem> + <para>The device is busy and therefore can not sense the preset</para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> +</refentry> + +<!-- +Local Variables: +mode: sgml +sgml-parent-document: "v4l2.sgml" +indent-tabs-mode: nil +End: +--> diff --git a/Documentation/DocBook/v4l/vidioc-querystd.xml b/Documentation/DocBook/v4l/vidioc-querystd.xml index b5a7ff93448..1a9e6039309 100644 --- a/Documentation/DocBook/v4l/vidioc-querystd.xml +++ b/Documentation/DocBook/v4l/vidioc-querystd.xml @@ -70,6 +70,12 @@ current video input or output.</para> <para>This ioctl is not supported.</para> </listitem> </varlistentry> + <varlistentry> + <term><errorcode>EBUSY</errorcode></term> + <listitem> + <para>The device is busy and therefore can not detect the standard</para> + </listitem> + </varlistentry> </variablelist> </refsect1> </refentry> diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl index 7a2e0e98986..0d0f7b4d4b1 100644 --- a/Documentation/DocBook/writing-an-alsa-driver.tmpl +++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl @@ -5318,7 +5318,7 @@ struct _snd_pcm_runtime { pages of the given size and map them onto the virtually contiguous memory. The virtual pointer is addressed in runtime->dma_area. The physical address (runtime->dma_addr) is set to zero, - because the buffer is physically non-contigous. + because the buffer is physically non-contiguous. The physical address table is set up in sgbuf->table. You can get the physical address at a certain offset via <function>snd_pcm_sgbuf_get_addr()</function>. |