diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-11 13:22:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-11 13:22:22 -0700 |
commit | de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3 (patch) | |
tree | 88b5db2fc7fbbb0353edd8447a832a5225a49d01 /Documentation/media/uapi/v4l/vidioc-g-modulator.rst | |
parent | 56e520c7a0a490b63b042b047ec9659fc08762a4 (diff) | |
parent | 9fce0c226536fc36c7fb0a80000ca38a995be43e (diff) | |
download | blackbird-op-linux-de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3.tar.gz blackbird-op-linux-de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3.zip |
Merge tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- Documentation improvements: conversion of all non-DocBook documents
to Sphinx and lots of fixes to the uAPI media book
- New PCI driver for Techwell TW5864 media grabber boards
- New SoC driver for ATMEL Image Sensor Controller
- Removal of some obsolete SoC drivers (s5p-tv driver and soc_camera
drivers)
- Addition of ST CEC driver
- Lots of drivers fixes, improvements and additions
* tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (464 commits)
[media] ttusb_dec: avoid the risk of go past buffer
[media] cx23885: Fix some smatch warnings
[media] si2165: switch to regmap
[media] si2165: use i2c_client->dev instead of i2c_adapter->dev for logging
[media] si2165: Remove legacy attach
[media] cx231xx: attach si2165 driver via i2c_client
[media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers
[media] cx23885: attach si2165 driver via i2c_client
[media] si2165: support i2c_client attach
[media] si2165: avoid division by zero
[media] rcar-vin: add R-Car gen2 fallback compatibility string
[media] lgdt3306a: remove 20*50 msec unnecessary timeout
[media] cx25821: Remove deprecated create_singlethread_workqueue
[media] cx25821: Drop Freeing of Workqueue
[media] cxd2841er: force 8MHz bandwidth for DVB-C if specified bw not supported
[media] redrat3: hardware-specific parameters
[media] redrat3: remove hw_timeout member
[media] cxd2841er: BER and SNR reading for ISDB-T
[media] dvb-usb: avoid link error with dib3000m{b,c|
[media] dvb-usb: split out common parts of dibusb
...
Diffstat (limited to 'Documentation/media/uapi/v4l/vidioc-g-modulator.rst')
-rw-r--r-- | Documentation/media/uapi/v4l/vidioc-g-modulator.rst | 287 |
1 files changed, 112 insertions, 175 deletions
diff --git a/Documentation/media/uapi/v4l/vidioc-g-modulator.rst b/Documentation/media/uapi/v4l/vidioc-g-modulator.rst index a2e8c73f0678..77d017eb3fcc 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-modulator.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-modulator.rst @@ -15,9 +15,11 @@ VIDIOC_G_MODULATOR - VIDIOC_S_MODULATOR - Get or set modulator attributes Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_modulator *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_MODULATOR, struct v4l2_modulator *argp ) + :name: VIDIOC_G_MODULATOR -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_modulator *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_MODULATOR, const struct v4l2_modulator *argp ) + :name: VIDIOC_S_MODULATOR Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR - ``argp`` @@ -37,7 +36,7 @@ Description To query the attributes of a modulator applications initialize the ``index`` field and zero out the ``reserved`` array of a struct -:ref:`v4l2_modulator <v4l2-modulator>` and call the +:c:type:`v4l2_modulator` and call the :ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all modulators applications shall @@ -61,100 +60,68 @@ To change the radio frequency the :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. -.. _v4l2-modulator: +.. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| + +.. c:type:: v4l2_modulator .. flat-table:: struct v4l2_modulator :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 1 1 - - - .. row 1 - - - __u32 - - - ``index`` - - - Identifies the modulator, set by the application. - - - .. row 2 - - - __u8 - - - ``name``\ [32] - - - Name of the modulator, a NUL-terminated ASCII string. This - information is intended for the user. - - - .. row 3 - - - __u32 - - - ``capability`` - - - Modulator capability flags. No flags are defined for this field, - the tuner flags in struct :ref:`v4l2_tuner <v4l2-tuner>` are - used accordingly. The audio flags indicate the ability to encode - audio subprograms. They will *not* change for example with the - current video standard. - - - .. row 4 - - - __u32 - - - ``rangelow`` - - - The lowest tunable frequency in units of 62.5 KHz, or if the - ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of - 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is - set, in units of 1 Hz. - - - .. row 5 - - - __u32 - - - ``rangehigh`` - - - The highest tunable frequency in units of 62.5 KHz, or if the - ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of - 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is - set, in units of 1 Hz. - - - .. row 6 - - - __u32 - - - ``txsubchans`` - - - With this field applications can determine how audio sub-carriers - shall be modulated. It contains a set of flags as defined in - :ref:`modulator-txsubchans`. - - .. note:: The tuner ``rxsubchans`` flags are reused, but the - semantics are different. Video output devices - are assumed to have an analog or PCM audio input with 1-3 - channels. The ``txsubchans`` flags select one or more channels - for modulation, together with some audio subprogram indicator, - for example, a stereo pilot tone. - - - .. row 7 - - - __u32 - - - ``type`` - - - :cspan:`2` Type of the modulator, see :ref:`v4l2-tuner-type`. - - - .. row 8 - - - __u32 - - - ``reserved``\ [3] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - + * - __u32 + - ``index`` + - Identifies the modulator, set by the application. + * - __u8 + - ``name``\ [32] + - Name of the modulator, a NUL-terminated ASCII string. + + This information is intended for the user. + * - __u32 + - ``capability`` + - Modulator capability flags. No flags are defined for this field, + the tuner flags in struct :c:type:`v4l2_tuner` are + used accordingly. The audio flags indicate the ability to encode + audio subprograms. They will *not* change for example with the + current video standard. + * - __u32 + - ``rangelow`` + - The lowest tunable frequency in units of 62.5 KHz, or if the + ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of + 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is + set, in units of 1 Hz. + * - __u32 + - ``rangehigh`` + - The highest tunable frequency in units of 62.5 KHz, or if the + ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of + 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is + set, in units of 1 Hz. + * - __u32 + - ``txsubchans`` + - With this field applications can determine how audio sub-carriers + shall be modulated. It contains a set of flags as defined in + :ref:`modulator-txsubchans`. + + .. note:: + + The tuner ``rxsubchans`` flags are reused, but the + semantics are different. Video output devices + are assumed to have an analog or PCM audio input with 1-3 + channels. The ``txsubchans`` flags select one or more channels + for modulation, together with some audio subprogram indicator, + for example, a stereo pilot tone. + * - __u32 + - ``type`` + - :cspan:`2` Type of the modulator, see :c:type:`v4l2_tuner_type`. + * - __u32 + - ``reserved``\ [3] + - Reserved for future extensions. + + Drivers and applications must set the array to zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _modulator-txsubchans: @@ -163,86 +130,56 @@ To change the radio frequency the :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_TUNER_SUB_MONO`` - - - 0x0001 - - - Modulate channel 1 as mono audio, when the input has more - channels, a down-mix of channel 1 and 2. This flag does not - combine with ``V4L2_TUNER_SUB_STEREO`` or - ``V4L2_TUNER_SUB_LANG1``. - - - .. row 2 - - - ``V4L2_TUNER_SUB_STEREO`` - - - 0x0002 - - - Modulate channel 1 and 2 as left and right channel of a stereo - audio signal. When the input has only one channel or two channels - and ``V4L2_TUNER_SUB_SAP`` is also set, channel 1 is encoded as - left and right channel. This flag does not combine with - ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_LANG1``. When the - driver does not support stereo audio it shall fall back to mono. - - - .. row 3 - - - ``V4L2_TUNER_SUB_LANG1`` - - - 0x0008 - - - Modulate channel 1 and 2 as primary and secondary language of a - bilingual audio signal. When the input has only one channel it is - used for both languages. It is not possible to encode the primary - or secondary language only. This flag does not combine with - ``V4L2_TUNER_SUB_MONO``, ``V4L2_TUNER_SUB_STEREO`` or - ``V4L2_TUNER_SUB_SAP``. If the hardware does not support the - respective audio matrix, or the current video standard does not - permit bilingual audio the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall - return an ``EINVAL`` error code and the driver shall fall back to mono - or stereo mode. - - - .. row 4 - - - ``V4L2_TUNER_SUB_LANG2`` - - - 0x0004 - - - Same effect as ``V4L2_TUNER_SUB_SAP``. - - - .. row 5 - - - ``V4L2_TUNER_SUB_SAP`` - - - 0x0004 - - - When combined with ``V4L2_TUNER_SUB_MONO`` the first channel is - encoded as mono audio, the last channel as Second Audio Program. - When the input has only one channel it is used for both audio - tracks. When the input has three channels the mono track is a - down-mix of channel 1 and 2. When combined with - ``V4L2_TUNER_SUB_STEREO`` channel 1 and 2 are encoded as left and - right stereo audio, channel 3 as Second Audio Program. When the - input has only two channels, the first is encoded as left and - right channel and the second as SAP. When the input has only one - channel it is used for all audio tracks. It is not possible to - encode a Second Audio Program only. This flag must combine with - ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_STEREO``. If the - hardware does not support the respective audio matrix, or the - current video standard does not permit SAP the - :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an ``EINVAL`` error code and - driver shall fall back to mono or stereo mode. - - - .. row 6 - - - ``V4L2_TUNER_SUB_RDS`` - - - 0x0010 - - - Enable the RDS encoder for a radio FM transmitter. + * - ``V4L2_TUNER_SUB_MONO`` + - 0x0001 + - Modulate channel 1 as mono audio, when the input has more + channels, a down-mix of channel 1 and 2. This flag does not + combine with ``V4L2_TUNER_SUB_STEREO`` or + ``V4L2_TUNER_SUB_LANG1``. + * - ``V4L2_TUNER_SUB_STEREO`` + - 0x0002 + - Modulate channel 1 and 2 as left and right channel of a stereo + audio signal. When the input has only one channel or two channels + and ``V4L2_TUNER_SUB_SAP`` is also set, channel 1 is encoded as + left and right channel. This flag does not combine with + ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_LANG1``. When the + driver does not support stereo audio it shall fall back to mono. + * - ``V4L2_TUNER_SUB_LANG1`` + - 0x0008 + - Modulate channel 1 and 2 as primary and secondary language of a + bilingual audio signal. When the input has only one channel it is + used for both languages. It is not possible to encode the primary + or secondary language only. This flag does not combine with + ``V4L2_TUNER_SUB_MONO``, ``V4L2_TUNER_SUB_STEREO`` or + ``V4L2_TUNER_SUB_SAP``. If the hardware does not support the + respective audio matrix, or the current video standard does not + permit bilingual audio the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall + return an ``EINVAL`` error code and the driver shall fall back to mono + or stereo mode. + * - ``V4L2_TUNER_SUB_LANG2`` + - 0x0004 + - Same effect as ``V4L2_TUNER_SUB_SAP``. + * - ``V4L2_TUNER_SUB_SAP`` + - 0x0004 + - When combined with ``V4L2_TUNER_SUB_MONO`` the first channel is + encoded as mono audio, the last channel as Second Audio Program. + When the input has only one channel it is used for both audio + tracks. When the input has three channels the mono track is a + down-mix of channel 1 and 2. When combined with + ``V4L2_TUNER_SUB_STEREO`` channel 1 and 2 are encoded as left and + right stereo audio, channel 3 as Second Audio Program. When the + input has only two channels, the first is encoded as left and + right channel and the second as SAP. When the input has only one + channel it is used for all audio tracks. It is not possible to + encode a Second Audio Program only. This flag must combine with + ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_STEREO``. If the + hardware does not support the respective audio matrix, or the + current video standard does not permit SAP the + :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an ``EINVAL`` error code and + driver shall fall back to mono or stereo mode. + * - ``V4L2_TUNER_SUB_RDS`` + - 0x0010 + - Enable the RDS encoder for a radio FM transmitter. Return Value @@ -253,5 +190,5 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_modulator <v4l2-modulator>` ``index`` is + The struct :c:type:`v4l2_modulator` ``index`` is out of bounds. |