diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-09-05 14:44:34 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-22 13:03:14 +0300 |
commit | c2b66cafdf020856f6981d03efd9f2706d5f0156 (patch) | |
tree | 53fc68378fd5a4205b0872ca16e4f3160da1fe45 /Documentation/media/uapi/v4l/vidioc-g-modulator.rst | |
parent | c19584882a435bbe41fa555620c7261ba9155ae2 (diff) | |
download | linux-c2b66cafdf020856f6981d03efd9f2706d5f0156.tar.xz |
[media] v4l: doc: Remove row numbers from tables
Shorten the tables by removing row numbers in comments, allowing for
later insertion of rows with minimal diffs.
All changes have been generated by the following script.
import io
import re
import sys
def process_table(fname, data):
if fname.endswith('hist-v4l2.rst'):
data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
else:
data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)
return data
def process_file(fname, data):
buf = io.StringIO(data)
output = ''
in_table = False
table_separator = 0
for line in buf.readlines():
if line.find('.. flat-table::') != -1:
in_table = True
table = ''
elif in_table and not re.match('^[\t\n]|( )', line):
in_table = False
output += process_table(fname, table)
if in_table:
table += line
else:
output += line
if in_table:
in_table = False
output += process_table(fname, table)
return output
fname = sys.argv[1]
data = file(fname, 'rb').read().decode('utf-8')
data = process_file(fname, data)
file(fname, 'wb').write(data.encode('utf-8'))
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'Documentation/media/uapi/v4l/vidioc-g-modulator.rst')
-rw-r--r-- | Documentation/media/uapi/v4l/vidioc-g-modulator.rst | 268 |
1 files changed, 99 insertions, 169 deletions
diff --git a/Documentation/media/uapi/v4l/vidioc-g-modulator.rst b/Documentation/media/uapi/v4l/vidioc-g-modulator.rst index a8a542dc8a40..77d017eb3fcc 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-modulator.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-modulator.rst @@ -69,95 +69,55 @@ To change the radio frequency the :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 :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. - - - .. 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 :c:type:`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. @@ -170,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 |