2018-08-30 22:15:26 +08:00
|
|
|
.. Permission is granted to copy, distribute and/or modify this
|
|
|
|
.. document under the terms of the GNU Free Documentation License,
|
|
|
|
.. Version 1.1 or any later version published by the Free Software
|
|
|
|
.. Foundation, with no Invariant Sections, no Front-Cover Texts
|
|
|
|
.. and no Back-Cover Texts. A copy of the license is included at
|
|
|
|
.. Documentation/media/uapi/fdl-appendix.rst.
|
|
|
|
..
|
|
|
|
.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
|
|
|
|
|
2016-07-02 00:42:29 +08:00
|
|
|
.. _VIDIOC_G_TUNER:
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
************************************
|
|
|
|
ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER
|
|
|
|
************************************
|
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Name
|
2016-07-05 18:58:48 +08:00
|
|
|
====
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-05 18:58:48 +08:00
|
|
|
VIDIOC_G_TUNER - VIDIOC_S_TUNER - Get or set tuner attributes
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
|
|
|
|
Synopsis
|
2016-06-30 21:18:56 +08:00
|
|
|
========
|
|
|
|
|
2016-08-20 03:53:38 +08:00
|
|
|
.. c:function:: int ioctl( int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp )
|
|
|
|
:name: VIDIOC_G_TUNER
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-08-20 03:53:38 +08:00
|
|
|
.. c:function:: int ioctl( int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp )
|
|
|
|
:name: VIDIOC_S_TUNER
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-05 18:58:48 +08:00
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Arguments
|
2016-06-30 21:18:56 +08:00
|
|
|
=========
|
|
|
|
|
|
|
|
``fd``
|
|
|
|
File descriptor returned by :ref:`open() <func-open>`.
|
|
|
|
|
|
|
|
``argp``
|
2017-09-02 21:54:48 +08:00
|
|
|
Pointer to struct :c:type:`v4l2_tuner`.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Description
|
2016-06-30 21:18:56 +08:00
|
|
|
===========
|
|
|
|
|
|
|
|
To query the attributes of a tuner applications initialize the ``index``
|
|
|
|
field and zero out the ``reserved`` array of a struct
|
2016-08-30 04:37:59 +08:00
|
|
|
:c:type:`v4l2_tuner` and call the ``VIDIOC_G_TUNER`` ioctl
|
2016-06-30 21:18:56 +08:00
|
|
|
with a pointer to this structure. Drivers fill the rest of the structure
|
2016-07-03 22:53:09 +08:00
|
|
|
or return an ``EINVAL`` error code when the index is out of bounds. To
|
2016-06-30 21:18:56 +08:00
|
|
|
enumerate all tuners applications shall begin at index zero,
|
2016-07-03 22:53:09 +08:00
|
|
|
incrementing by one until the driver returns ``EINVAL``.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
Tuners have two writable properties, the audio mode and the radio
|
|
|
|
frequency. To change the audio mode, applications initialize the
|
|
|
|
``index``, ``audmode`` and ``reserved`` fields and call the
|
|
|
|
``VIDIOC_S_TUNER`` ioctl. This will *not* change the current tuner,
|
|
|
|
which is determined by the current video input. Drivers may choose a
|
|
|
|
different audio mode if the requested mode is invalid or unsupported.
|
|
|
|
Since this is a write-only ioctl, it does not return the actually
|
|
|
|
selected audio mode.
|
|
|
|
|
|
|
|
:ref:`SDR <sdr>` specific tuner types are ``V4L2_TUNER_SDR`` and
|
|
|
|
``V4L2_TUNER_RF``. For SDR devices ``audmode`` field must be initialized
|
|
|
|
to zero. The term 'tuner' means SDR receiver in this context.
|
|
|
|
|
|
|
|
To change the radio frequency the
|
2016-07-02 00:42:29 +08:00
|
|
|
:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
2016-08-19 17:56:43 +08:00
|
|
|
.. tabularcolumns:: |p{1.3cm}|p{3.0cm}|p{6.6cm}|p{6.6cm}|
|
|
|
|
|
2016-08-30 04:37:59 +08:00
|
|
|
.. c:type:: v4l2_tuner
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-08-19 17:56:43 +08:00
|
|
|
.. cssclass:: longtable
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. flat-table:: struct v4l2_tuner
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* - __u32
|
|
|
|
- ``index``
|
|
|
|
- :cspan:`1` Identifies the tuner, set by the application.
|
|
|
|
* - __u8
|
|
|
|
- ``name``\ [32]
|
|
|
|
- :cspan:`1`
|
|
|
|
|
|
|
|
Name of the tuner, a NUL-terminated ASCII string.
|
|
|
|
|
|
|
|
This information is intended for the user.
|
|
|
|
* - __u32
|
|
|
|
- ``type``
|
|
|
|
- :cspan:`1` Type of the tuner, see :c:type:`v4l2_tuner_type`.
|
|
|
|
* - __u32
|
|
|
|
- ``capability``
|
|
|
|
- :cspan:`1`
|
|
|
|
|
|
|
|
Tuner capability flags, see :ref:`tuner-capability`. Audio flags
|
|
|
|
indicate the ability to decode audio subprograms. They will *not*
|
|
|
|
change, for example with the current video standard.
|
|
|
|
|
|
|
|
When the structure refers to a radio tuner the
|
|
|
|
``V4L2_TUNER_CAP_LANG1``, ``V4L2_TUNER_CAP_LANG2`` and
|
|
|
|
``V4L2_TUNER_CAP_NORM`` flags can't be used.
|
|
|
|
|
|
|
|
If multiple frequency bands are supported, then ``capability`` is
|
|
|
|
the union of all ``capability`` fields of each struct
|
|
|
|
:c:type:`v4l2_frequency_band`.
|
|
|
|
* - __u32
|
|
|
|
- ``rangelow``
|
|
|
|
- :cspan:`1` 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. If multiple frequency bands are
|
|
|
|
supported, then ``rangelow`` is the lowest frequency of all the
|
|
|
|
frequency bands.
|
|
|
|
* - __u32
|
|
|
|
- ``rangehigh``
|
|
|
|
- :cspan:`1` 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. If multiple
|
|
|
|
frequency bands are supported, then ``rangehigh`` is the highest
|
|
|
|
frequency of all the frequency bands.
|
|
|
|
* - __u32
|
|
|
|
- ``rxsubchans``
|
|
|
|
- :cspan:`1`
|
|
|
|
|
|
|
|
Some tuners or audio decoders can determine the received audio
|
|
|
|
subprograms by analyzing audio carriers, pilot tones or other
|
|
|
|
indicators. To pass this information drivers set flags defined in
|
|
|
|
:ref:`tuner-rxsubchans` in this field. For example:
|
|
|
|
* -
|
|
|
|
-
|
|
|
|
- ``V4L2_TUNER_SUB_MONO``
|
|
|
|
- receiving mono audio
|
|
|
|
* -
|
|
|
|
-
|
|
|
|
- ``STEREO | SAP``
|
|
|
|
- receiving stereo audio and a secondary audio program
|
|
|
|
* -
|
|
|
|
-
|
|
|
|
- ``MONO | STEREO``
|
|
|
|
- receiving mono or stereo audio, the hardware cannot distinguish
|
|
|
|
* -
|
|
|
|
-
|
|
|
|
- ``LANG1 | LANG2``
|
|
|
|
- receiving bilingual audio
|
|
|
|
* -
|
|
|
|
-
|
|
|
|
- ``MONO | STEREO | LANG1 | LANG2``
|
|
|
|
- receiving mono, stereo or bilingual audio
|
|
|
|
* -
|
|
|
|
-
|
|
|
|
- :cspan:`1`
|
|
|
|
|
|
|
|
When the ``V4L2_TUNER_CAP_STEREO``, ``_LANG1``, ``_LANG2`` or
|
|
|
|
``_SAP`` flag is cleared in the ``capability`` field, the
|
|
|
|
corresponding ``V4L2_TUNER_SUB_`` flag must not be set here.
|
|
|
|
|
|
|
|
This field is valid only if this is the tuner of the current video
|
|
|
|
input, or when the structure refers to a radio tuner.
|
|
|
|
* - __u32
|
|
|
|
- ``audmode``
|
|
|
|
- :cspan:`1`
|
|
|
|
|
|
|
|
The selected audio mode, see :ref:`tuner-audmode` for valid
|
|
|
|
values. The audio mode does not affect audio subprogram detection,
|
|
|
|
and like a :ref:`control` it does not automatically
|
|
|
|
change unless the requested mode is invalid or unsupported. See
|
|
|
|
:ref:`tuner-matrix` for possible results when the selected and
|
|
|
|
received audio programs do not match.
|
|
|
|
|
|
|
|
Currently this is the only field of struct
|
|
|
|
struct :c:type:`v4l2_tuner` applications can change.
|
|
|
|
* - __u32
|
|
|
|
- ``signal``
|
|
|
|
- :cspan:`1` The signal strength if known.
|
|
|
|
|
|
|
|
Ranging from 0 to 65535. Higher values indicate a better signal.
|
|
|
|
* - __s32
|
|
|
|
- ``afc``
|
|
|
|
- :cspan:`1` Automatic frequency control.
|
|
|
|
|
|
|
|
When the ``afc`` value is negative, the frequency is too
|
|
|
|
low, when positive too high.
|
|
|
|
* - __u32
|
|
|
|
- ``reserved``\ [4]
|
|
|
|
- :cspan:`1` Reserved for future extensions.
|
|
|
|
|
|
|
|
Drivers and applications must set the array to zero.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 19:14:19 +08:00
|
|
|
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
|
|
|
|
|
[media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:
# funcs is a file with the broken functions/references
for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
i=${i//-/_}
echo $i
j=${i//_/-}
for k in $(git grep -l "_$j:" Documentation/); do
sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
done
for k in $(git grep -l "$j" Documentation/); do
sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
done
for k in $(git grep -l "<$j>" include/media); do
sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
done
done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-08 17:41:26 +08:00
|
|
|
.. c:type:: v4l2_tuner_type
|
2016-08-19 22:14:23 +08:00
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. flat-table:: enum v4l2_tuner_type
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
2016-08-19 17:56:36 +08:00
|
|
|
:widths: 3 1 6
|
2016-06-30 21:18:56 +08:00
|
|
|
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* - ``V4L2_TUNER_RADIO``
|
|
|
|
- 1
|
|
|
|
- Tuner supports radio
|
|
|
|
* - ``V4L2_TUNER_ANALOG_TV``
|
|
|
|
- 2
|
|
|
|
- Tuner supports analog TV
|
|
|
|
* - ``V4L2_TUNER_SDR``
|
|
|
|
- 4
|
|
|
|
- Tuner controls the A/D and/or D/A block of a
|
2016-10-22 15:26:37 +08:00
|
|
|
Software Digital Radio (SDR)
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* - ``V4L2_TUNER_RF``
|
|
|
|
- 5
|
2016-10-22 15:26:37 +08:00
|
|
|
- Tuner controls the RF part of a Software Digital Radio (SDR)
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 19:14:19 +08:00
|
|
|
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 22:14:23 +08:00
|
|
|
.. _tuner-capability:
|
|
|
|
|
2016-08-19 17:56:43 +08:00
|
|
|
.. cssclass:: longtable
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. flat-table:: Tuner and Modulator Capability Flags
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 3 1 4
|
|
|
|
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* - ``V4L2_TUNER_CAP_LOW``
|
|
|
|
- 0x0001
|
|
|
|
- When set, tuning frequencies are expressed in units of 62.5 Hz
|
|
|
|
instead of 62.5 kHz.
|
|
|
|
* - ``V4L2_TUNER_CAP_NORM``
|
|
|
|
- 0x0002
|
|
|
|
- This is a multi-standard tuner; the video standard can or must be
|
|
|
|
switched. (B/G PAL tuners for example are typically not considered
|
|
|
|
multi-standard because the video standard is automatically
|
|
|
|
determined from the frequency band.) The set of supported video
|
|
|
|
standards is available from the struct
|
|
|
|
:c:type:`v4l2_input` pointing to this tuner, see the
|
|
|
|
description of ioctl :ref:`VIDIOC_ENUMINPUT`
|
|
|
|
for details. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
|
|
|
|
capability.
|
|
|
|
* - ``V4L2_TUNER_CAP_HWSEEK_BOUNDED``
|
|
|
|
- 0x0004
|
|
|
|
- If set, then this tuner supports the hardware seek functionality
|
|
|
|
where the seek stops when it reaches the end of the frequency
|
|
|
|
range.
|
|
|
|
* - ``V4L2_TUNER_CAP_HWSEEK_WRAP``
|
|
|
|
- 0x0008
|
|
|
|
- If set, then this tuner supports the hardware seek functionality
|
|
|
|
where the seek wraps around when it reaches the end of the
|
|
|
|
frequency range.
|
|
|
|
* - ``V4L2_TUNER_CAP_STEREO``
|
|
|
|
- 0x0010
|
|
|
|
- Stereo audio reception is supported.
|
|
|
|
* - ``V4L2_TUNER_CAP_LANG1``
|
|
|
|
- 0x0040
|
|
|
|
- Reception of the primary language of a bilingual audio program is
|
|
|
|
supported. Bilingual audio is a feature of two-channel systems,
|
|
|
|
transmitting the primary language monaural on the main audio
|
|
|
|
carrier and a secondary language monaural on a second carrier.
|
|
|
|
Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability.
|
|
|
|
* - ``V4L2_TUNER_CAP_LANG2``
|
|
|
|
- 0x0020
|
|
|
|
- Reception of the secondary language of a bilingual audio program
|
|
|
|
is supported. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this
|
|
|
|
capability.
|
|
|
|
* - ``V4L2_TUNER_CAP_SAP``
|
|
|
|
- 0x0020
|
|
|
|
- Reception of a secondary audio program is supported. This is a
|
|
|
|
feature of the BTSC system which accompanies the NTSC video
|
|
|
|
standard. Two audio carriers are available for mono or stereo
|
|
|
|
transmissions of a primary language, and an independent third
|
|
|
|
carrier for a monaural secondary language. Only
|
|
|
|
``V4L2_TUNER_ANALOG_TV`` tuners can have this capability.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
The ``V4L2_TUNER_CAP_LANG2`` and ``V4L2_TUNER_CAP_SAP``
|
|
|
|
flags are synonyms. ``V4L2_TUNER_CAP_SAP`` applies when the tuner
|
|
|
|
supports the ``V4L2_STD_NTSC_M`` video standard.
|
|
|
|
* - ``V4L2_TUNER_CAP_RDS``
|
|
|
|
- 0x0080
|
|
|
|
- RDS capture is supported. This capability is only valid for radio
|
|
|
|
tuners.
|
|
|
|
* - ``V4L2_TUNER_CAP_RDS_BLOCK_IO``
|
|
|
|
- 0x0100
|
|
|
|
- The RDS data is passed as unparsed RDS blocks.
|
|
|
|
* - ``V4L2_TUNER_CAP_RDS_CONTROLS``
|
|
|
|
- 0x0200
|
|
|
|
- The RDS data is parsed by the hardware and set via controls.
|
|
|
|
* - ``V4L2_TUNER_CAP_FREQ_BANDS``
|
|
|
|
- 0x0400
|
|
|
|
- The :ref:`VIDIOC_ENUM_FREQ_BANDS`
|
|
|
|
ioctl can be used to enumerate the available frequency bands.
|
|
|
|
* - ``V4L2_TUNER_CAP_HWSEEK_PROG_LIM``
|
|
|
|
- 0x0800
|
|
|
|
- The range to search when using the hardware seek functionality is
|
|
|
|
programmable, see
|
|
|
|
:ref:`VIDIOC_S_HW_FREQ_SEEK` for
|
|
|
|
details.
|
|
|
|
* - ``V4L2_TUNER_CAP_1HZ``
|
|
|
|
- 0x1000
|
|
|
|
- When set, tuning frequencies are expressed in units of 1 Hz
|
|
|
|
instead of 62.5 kHz.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 19:14:19 +08:00
|
|
|
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 22:14:23 +08:00
|
|
|
.. _tuner-rxsubchans:
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. flat-table:: Tuner Audio Reception Flags
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 3 1 4
|
|
|
|
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* - ``V4L2_TUNER_SUB_MONO``
|
|
|
|
- 0x0001
|
|
|
|
- The tuner receives a mono audio signal.
|
|
|
|
* - ``V4L2_TUNER_SUB_STEREO``
|
|
|
|
- 0x0002
|
|
|
|
- The tuner receives a stereo audio signal.
|
|
|
|
* - ``V4L2_TUNER_SUB_LANG1``
|
|
|
|
- 0x0008
|
|
|
|
- The tuner receives the primary language of a bilingual audio
|
|
|
|
signal. Drivers must clear this flag when the current video
|
|
|
|
standard is ``V4L2_STD_NTSC_M``.
|
|
|
|
* - ``V4L2_TUNER_SUB_LANG2``
|
|
|
|
- 0x0004
|
|
|
|
- The tuner receives the secondary language of a bilingual audio
|
|
|
|
signal (or a second audio program).
|
|
|
|
* - ``V4L2_TUNER_SUB_SAP``
|
|
|
|
- 0x0004
|
|
|
|
- The tuner receives a Second Audio Program.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
The ``V4L2_TUNER_SUB_LANG2`` and ``V4L2_TUNER_SUB_SAP``
|
|
|
|
flags are synonyms. The ``V4L2_TUNER_SUB_SAP`` flag applies
|
|
|
|
when the current video standard is ``V4L2_STD_NTSC_M``.
|
|
|
|
* - ``V4L2_TUNER_SUB_RDS``
|
|
|
|
- 0x0010
|
|
|
|
- The tuner receives an RDS channel.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 19:14:19 +08:00
|
|
|
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 22:14:23 +08:00
|
|
|
.. _tuner-audmode:
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. flat-table:: Tuner Audio Modes
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 3 1 4
|
|
|
|
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* - ``V4L2_TUNER_MODE_MONO``
|
|
|
|
- 0
|
|
|
|
- Play mono audio. When the tuner receives a stereo signal this a
|
|
|
|
down-mix of the left and right channel. When the tuner receives a
|
|
|
|
bilingual or SAP signal this mode selects the primary language.
|
|
|
|
* - ``V4L2_TUNER_MODE_STEREO``
|
|
|
|
- 1
|
|
|
|
- Play stereo audio. When the tuner receives bilingual audio it may
|
|
|
|
play different languages on the left and right channel or the
|
|
|
|
primary language is played on both channels.
|
|
|
|
|
|
|
|
Playing different languages in this mode is deprecated. New
|
|
|
|
drivers should do this only in ``MODE_LANG1_LANG2``.
|
|
|
|
|
|
|
|
When the tuner receives no stereo signal or does not support
|
|
|
|
stereo reception the driver shall fall back to ``MODE_MONO``.
|
|
|
|
* - ``V4L2_TUNER_MODE_LANG1``
|
|
|
|
- 3
|
|
|
|
- Play the primary language, mono or stereo. Only
|
|
|
|
``V4L2_TUNER_ANALOG_TV`` tuners support this mode.
|
|
|
|
* - ``V4L2_TUNER_MODE_LANG2``
|
|
|
|
- 2
|
|
|
|
- Play the secondary language, mono. When the tuner receives no
|
|
|
|
bilingual audio or SAP, or their reception is not supported the
|
|
|
|
driver shall fall back to mono or stereo mode. Only
|
|
|
|
``V4L2_TUNER_ANALOG_TV`` tuners support this mode.
|
|
|
|
* - ``V4L2_TUNER_MODE_SAP``
|
|
|
|
- 2
|
|
|
|
- Play the Second Audio Program. When the tuner receives no
|
|
|
|
bilingual audio or SAP, or their reception is not supported the
|
|
|
|
driver shall fall back to mono or stereo mode. Only
|
|
|
|
``V4L2_TUNER_ANALOG_TV`` tuners support this mode.
|
|
|
|
|
|
|
|
.. note:: The ``V4L2_TUNER_MODE_LANG2`` and ``V4L2_TUNER_MODE_SAP``
|
|
|
|
are synonyms.
|
|
|
|
* - ``V4L2_TUNER_MODE_LANG1_LANG2``
|
|
|
|
- 4
|
|
|
|
- Play the primary language on the left channel, the secondary
|
|
|
|
language on the right channel. When the tuner receives no
|
|
|
|
bilingual audio or SAP, it shall fall back to ``MODE_LANG1`` or
|
|
|
|
``MODE_MONO``. Only ``V4L2_TUNER_ANALOG_TV`` tuners support this
|
|
|
|
mode.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-08-19 17:56:43 +08:00
|
|
|
.. raw:: latex
|
2016-06-30 21:18:56 +08:00
|
|
|
|
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 17:28:26 +08:00
|
|
|
\scriptsize
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2017-09-03 04:48:28 +08:00
|
|
|
.. tabularcolumns:: |p{1.5cm}|p{1.5cm}|p{2.9cm}|p{2.9cm}|p{2.9cm}|p{2.9cm}|
|
|
|
|
|
2016-06-30 21:18:56 +08:00
|
|
|
.. _tuner-matrix:
|
|
|
|
|
|
|
|
.. flat-table:: Tuner Audio Matrix
|
|
|
|
:header-rows: 2
|
|
|
|
:stub-columns: 0
|
2017-09-03 04:48:28 +08:00
|
|
|
:widths: 7 7 14 14 14 14
|
2016-06-30 21:18:56 +08:00
|
|
|
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* -
|
2017-09-03 04:48:28 +08:00
|
|
|
- :cspan:`4` Selected ``V4L2_TUNER_MODE_``
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* - Received ``V4L2_TUNER_SUB_``
|
|
|
|
- ``MONO``
|
|
|
|
- ``STEREO``
|
|
|
|
- ``LANG1``
|
|
|
|
- ``LANG2 = SAP``
|
2017-09-03 04:48:28 +08:00
|
|
|
- ``LANG1_LANG2``\ [#f1]_
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
* - ``MONO``
|
|
|
|
- Mono
|
|
|
|
- Mono/Mono
|
|
|
|
- Mono
|
|
|
|
- Mono
|
|
|
|
- Mono/Mono
|
|
|
|
* - ``MONO | SAP``
|
|
|
|
- Mono
|
|
|
|
- Mono/Mono
|
|
|
|
- Mono
|
|
|
|
- SAP
|
|
|
|
- Mono/SAP (preferred) or Mono/Mono
|
|
|
|
* - ``STEREO``
|
|
|
|
- L+R
|
|
|
|
- L/R
|
|
|
|
- Stereo L/R (preferred) or Mono L+R
|
|
|
|
- Stereo L/R (preferred) or Mono L+R
|
|
|
|
- L/R (preferred) or L+R/L+R
|
|
|
|
* - ``STEREO | SAP``
|
|
|
|
- L+R
|
|
|
|
- L/R
|
|
|
|
- Stereo L/R (preferred) or Mono L+R
|
|
|
|
- SAP
|
|
|
|
- L+R/SAP (preferred) or L/R or L+R/L+R
|
|
|
|
* - ``LANG1 | LANG2``
|
|
|
|
- Language 1
|
2017-09-03 04:48:28 +08:00
|
|
|
- Lang1/Lang2 (deprecated\ [#f2]_) or Lang1/Lang1
|
[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>
2016-09-05 19:44:34 +08:00
|
|
|
- Language 1
|
|
|
|
- Language 2
|
|
|
|
- Lang1/Lang2 (preferred) or Lang1/Lang1
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-08-19 17:56:43 +08:00
|
|
|
.. raw:: latex
|
|
|
|
|
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 17:28:26 +08:00
|
|
|
\normalsize
|
2016-06-30 21:18:56 +08:00
|
|
|
|
2016-07-06 02:14:35 +08:00
|
|
|
Return Value
|
2016-06-30 21:18:56 +08:00
|
|
|
============
|
|
|
|
|
|
|
|
On success 0 is returned, on error -1 and the ``errno`` variable is set
|
|
|
|
appropriately. The generic error codes are described at the
|
|
|
|
:ref:`Generic Error Codes <gen-errors>` chapter.
|
|
|
|
|
|
|
|
EINVAL
|
2016-08-30 04:37:59 +08:00
|
|
|
The struct :c:type:`v4l2_tuner` ``index`` is out of
|
2016-06-30 21:18:56 +08:00
|
|
|
bounds.
|
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f1]
|
2016-06-30 21:18:56 +08:00
|
|
|
This mode has been added in Linux 2.6.17 and may not be supported by
|
|
|
|
older drivers.
|
|
|
|
|
2016-07-13 02:15:23 +08:00
|
|
|
.. [#f2]
|
2016-06-30 21:18:56 +08:00
|
|
|
Playback of both languages in ``MODE_STEREO`` is deprecated. In the
|
|
|
|
future drivers should produce only the primary language in this mode.
|
|
|
|
Applications should request ``MODE_LANG1_LANG2`` to record both
|
|
|
|
languages or a stereo signal.
|