Instead of using c:type:`struct foo <foo>`, use:
struct c:type:`foo`
This patch was generated via this shell script:
for i in `find Documentation/media -type f`; do perl -ne 'if (m/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/) { $s=$1; $r=$2; if ($s eq $r) { s/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/struct :c:type:`$2`/; s/struct\s+struct/struct/; s/(struct\s+\:c\:type\:\`\S+\`)\s+structure/$1/; }} print $_' <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Trivially fix those broken references, by copying the structs
fron the header, just like other API documentation at the
DVB side.
This doesn't have the level of quality used at the V4L2 side
of the API, but, as this documents a deprecated API, used
only by av7110 driver, it doesn't make much sense to invest
time making it better.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Several links are broken, as they were using the typedef
name, instead of using the corresponding structs. Fix them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Add documentation for struct ca_slot_info and for the two
sets of define used by it, according with what's there at the
ca.h header.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are no descriptions at ca.h header for this struct.
Yet, as we want to get rid of the warnings, let's add a
boilerplate, with just the struct types and fields.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Now that we moved away from the :ref: type of references,
we need to update the exceptions lists.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are two warnings that are due to functions that has long
gone:
Documentation/media/kapi/v4l2-subdev.rst:417: WARNING: c:func reference target not found: v4l2_i2c_new_subdev_cfg
Documentation/media/kapi/v4l2-subdev.rst:436: WARNING: c:func reference target not found: v4l2_i2c_new_probed_subdev
Update the documentation to remove those.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The "struct" were inside the reference, causing it to break.
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are several undocumented functions here; document them.
While here, make checkpatch.pl happy.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Change the parse-headers.pl and the corresponding files to use
the C domain for enum references.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The V4L version 1 structures had long gone from the Linux Kernel.
It doesn't make sense to use cross-references for them, as they
won't be found.
So, get rid of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
instead of declaring the uAPI structs using usual refs, e. g.:
.. _foo-struct:
Use the C domain way:
.. c:type:: foo_struct
This way, the kAPI documentation can use cross-references to
point to the uAPI symbols.
That solves about ~100 undefined warnings like:
WARNING: c:type reference target not found: foo_struct
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are some functions/macros used by the mediactl documentation
that are alien to the media subsystem. Ignore them.
After this patch, the media core will only complain about this
static function:
Documentation/media/kapi/mc-core.rst:97: WARNING: c:func reference target not found: media_devnode_release
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The cross-reference to "struct media_pad" was pointing to
a place that doesn't exist. Fix it, and adjust the second
reference on the same paragraph to use the same text.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Instead of keeping those notes at the file on a non-structured
way, move them to dtv-core.rst, using the proper ReST tags.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There a some other types and functions that aren't declared
inside the media document but are elsewhere. Add them to the
ignore list.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* 'docs-next' of git://git.lwn.net/linux:
doc-rst: define PDF's of the media folder
doc-rst: generic way to build PDF of sub-folders
docs: sphinx-extensions: add metadata parallel-safe
docs-rst: kernel-doc: fix typedef output in RST format
docs-rst: improve typedef parser
docs: kernel-parameter: Improve the description of nr_cpus and maxcpus
docs-rst: kernel-doc: better output struct members
To build only the PDF of the media folder run::
make SPHINXDIRS=media pdfdocs
Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Fix copy-and-paste error: the radio devices are /dev/radio, not /dev/vbi.
Signed-off-by: Hans Verkuil <<hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Add support for the Hauppauge WinTV quadHD ATSC version.
IR support has not been provided, all 4 tuners, demodulators etc are working.
Further documentation can be found on Linux TV wiki.
Signed-off-by: Stephen Backway <stev391@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This field was never documented, and neither was it mentioned that
it should be zeroed by the application.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
V4L2_CTRL_FLAG_VOLATILE behaviour when V4L2_CTRL_FLAG_EXECUTE_ON_WRITE
is set was not properly explained.
Also set some hyperlink to ease the Documentation browsing.
Credit-to: Hans Verkuil <hansverk@cisco.com>
[mchehab@s-opensource.com: fix a trivial merge conflict]
Reported-by: Dimitrios Katsaros <patcherwork@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Document that the cropping ioctls can return ENODATA if the operation
isn't supported for the current input or output.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Instead of referring to Y', Cb and Cr, it referred to Yc', Cbc and
Crc, which were accidentally copied from the BT.2020 constant luminance
text.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The text of the note included text that shouldn't have been part
of the note. Move that out of the note into the proper place.
[mchehab@s-opensource.com: fix a trivial merge conflict]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The V4L2_YCBCR_ENC_SYCC encoding is identical to V4L2_YCBCR_ENC_601.
Remove V4L2_YCBCR_ENC_SYCC from the documentation since it should not
be used.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The SYCC Y'CbCr encoding is identical to the 601 encoding. Since the
SYCC define is about to be removed for use in the kernel we need to
drop it in the TPG code as well.
This patch also adds a 4th decimal to the 601 conversion matrix.
That was specified by the sYCC spec and it makes sense to use this
across the board.
[mchehab@s-opensource.com: fix conflicts with LaTeX math expression patch]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The default quantization range of the Y'CbCr encodings of sRGB
and AdobeRGB are full range instead of limited range according to
the corresponding standards.
Fix this in the V4L2_MAP_QUANTIZATION_DEFAULT macro.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Some touch controllers send out touch data in a similar way to a
greyscale frame grabber.
Add new device type VFL_TYPE_TOUCH:
- This uses a new device prefix v4l-touch for these devices, to stop
generic capture software from treating them as webcams. Otherwise,
touch is treated similarly to video capture.
- Add V4L2_INPUT_TYPE_TOUCH
- Add MEDIA_INTF_T_V4L_TOUCH
- Add V4L2_CAP_TOUCH to indicate device is a touch device
Add formats:
- V4L2_TCH_FMT_DELTA_TD16 for signed 16-bit touch deltas
- V4L2_TCH_FMT_DELTA_TD08 for signed 16-bit touch deltas
- V4L2_TCH_FMT_TU16 for unsigned 16-bit touch data
- V4L2_TCH_FMT_TU08 for unsigned 8-bit touch data
This support will be used by:
- Atmel maXTouch (atmel_mxt_ts)
- Synaptics RMI4.
- sur40
Signed-off-by: Nick Dyer <nick@shmanahar.org>
Tested-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
The Sphinx 1.4.x definition for \DUrole is:
\providecommand*{\DUrole}[2]{%
\ifcsname DUrole#1\endcsname%
\csname DUrole#1\endcsname{#2}%
\else% backwards compatibility: try \docutilsrole#1{#2}
\ifcsname docutilsrole#1\endcsname%
\csname docutilsrole#1\endcsname{#2}%
\else%
#2%
\fi%
\fi%
}
This is broken when it is used inside a \begin{alltt} block.
So, replace it by just "#2", as this won't cause troubles, and
it is one of the fallback methods for it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
While here, improve the documentation to make them to look more
like the rest of the document.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
While here, improve the documentation to make them to look more
like the rest of the document.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
While here, improve the documentation to make them to look more
like the rest of the document.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
While here, improve the documentation, marking the deprecated
ioctls, and making the non-deprecated ones more like the rest
of the media book.
Also, add a notice for ioctls that still require documentation.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Now that we have an override for the c domain that will do
the right thing for the Kernel, stop abusing on the cpp
domain.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Enrich math formulas by using the Sphinx math. That will allow
using those formulas on pdf documents as well.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* docs-next/docs-next: (51 commits)
docs-rst: add package adjustbox
docs-rst: Fix an warning when in interactive mode
docs-rst: Use better colors for note/warning/attention boxes
docs-rst: conf.py: adjust the size of .. note:: tag
docs-rst: add support for LaTeX output
doc-rst: migrate ioctl CEC_DQEVENT to c-domain
doc-rst: Revert "kernel-doc: fix handling of address_space tags"
doc-rst: moved *duplicate* warnings to nitpicky mode
doc-rst:c-domain: ref-name of a function declaration
doc-rst: add boilerplate to customize c-domain
docs: Sphinxify gdb-kernel-debugging.txt and move to dev-tools
docs: sphinxify kmemcheck.txt and move to dev-tools
docs: sphinxify kmemleak.txt and move it to dev-tools
docs: sphinxify ubsan.txt and move it to dev-tools
docs: sphinxify kasan.txt and move to dev-tools
docs: sphinixfy gcov.txt and move to dev-tools
docs: sphinxify kcov.txt and move to dev-tools
docs: sphinxify sparse.txt and move to dev-tools
docs: sphinxify coccinelle.txt and add it to dev-tools
docs: create a new dev-tools directory
...
This is only one example, demonstrating the benefits of the patch
series. The CEC_DQEVENT ioctl is migrated to the sphinx c-domain and
referred by ":name: CEC_DQEVENT".
With this change the indirection using ":ref:`CEC_DQEVENT` is no longer
needed, we can refer the ioctl directly with ":c:func:`CEC_DQEVENT`". As
addition in the index, there is a entry "CEC_DQEVENT (C function)".
Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Currently if none of the requested logical addresses can be claimed, the
framework will fall back to the Unregistered logical address.
Add a flag to enable this explicitly. By default it will just go back to
the unconfigured state.
Usually Unregistered is not something you want since the functionality is
very limited. Unless the application has support for this, it will fail
to work correctly. So require that the application explicitly requests
this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The documentation for the cec_event_state_change struct was incomplete.
This patch documents what happens in the corner cases.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are several minor issues that are seen when building
PDF on interactive mode.
Fix them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are two big tables here that are very hard to adjust its
size.
The first one would fit into one page, but the latex.py logic
at Sphinx auto-switches to longtable when there are more than 30
rows. There's no way to override without coding.
The second one is really big, and won't fit on a single page.
So, it has to use tiny font to fit.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
It is painful to put code/verbatim code in bold. It seems that
the only way is to arrange it like:
``foo``
bar
At least on LaTeX output, when this happens, the "foo" string
is not hidentable/breakable. The entire string should fit into
a single line.
Add a workaround for this ReST limitation by splitting the
foo string into two strings, on separate lines. The output
is not the best, but it works.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Sphinx is really pedantic with respect to the order where
table tags and references are created. Putting things at
the wrong order causes troubles.
The order that seems to work is:
.. raw:: latex
.. tabularcolumns::
.. _foo_name:
.. cssclass: longtable
.. flat-table::
Reorder the tags to the above order, to avoid troubles, and
fix remaining warnings introduced by media recent patches.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
A few tables at the media uAPI documentation have columns
not well dimentioned. Adjust them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Add position hints for some tables, in order for them to be
shown properly on LaTeX output.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Several tables are missing column definitions and/or are too big
to fit into the page. Adjust them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The tuner type table misses descriptions for each type. While
most of stuff are obvious, the two SDR definitions aren't.
So, add descriptions to all of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Adjust simple cases where the columns on some vidioc files
are overriding their neighbours.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The tables don't fit at the page on this file. As noticed
before, Sphinx (or LaTeX?) does a crap job on tables with
cell span, and some work has to be done to make it fit.
Move the see also reference to a footnote, break one paragraph
into two and adjust the table columns to make it visible.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This table is too big for LaTeX output, and lacks columns
specs for LaTeX format.
Also, it has a hidden column, as there are some cell spans
with the wrong values.
Fix it, so it can be displayed properly on LaTeX/PDF.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This table has several troubles:
- a duplicated "struct" on its name;
- a reference to a V4L version 1 struct that will never
point to something (as we got rid of V4L1 API a long
time ago);
- misses hints for LaTeX output (column size and longtable
style).
Fix them.
It should be noticed that the first column of this table is
not aligned with the rest. I suspect that this is a bug at
the flat-table extension.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Fix mosto fo the tables there in order to make them fit at the
page size.
There are, however, two exceptions: RGB and YUV big tables,
where adding the raw latex adjustbox caused the tables to not
be properly formatted. I suspect that the problem is because
those are long tables, but not really sure.
The thing is that Sphinx lacks an "adjustbox" tag that would
avoid the raw latex hacks.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Just like on dvb-raw-vbi.rst, the LaTeX output doesn't work
well with cell spans. Also, this is actually a note, so, move
it to a footnote.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Originally, each image were one page big, causing them to be
displayed on separate pages at the PDF output. Re-generate
them from the gif files.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There's a bug with LaTeX output on flat-tables with Sphinx 1.4.5
that prevents references at a cell span to be broken. As the
text is indeed too long, it makes sense to place the reference
to the pictures showing the VBI limits as a footnote.
That makes the text easier to read and also solves the issue
with LaTeX output.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The table columns are not properly displayed. Also, some
tables are too big to fit into just one page. So, fix them,
in order to better display the tables.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Those hints are wrong, and doesn't really improve the look
of those tables. So, keep them only when they're useful.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Adjust the table to fit at the LaTeX and PDF outputs, just like
what was done with pixfmt-packed-rgb.rst.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Adjust the tables to fit at the LaTeX and PDF outputs.
I wrote a previous patch RFC to show the big table in landscape,
but it makes harder to read on displays.
So, instead, let's use the adjustbox to shrink the size of those
long tables, as the table size can still be visible on screen,
and it is a way better to read in horizontal position and
visible if printed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There is an extra column just before eack pack of bits, to
improve table reading, but the header file didn't take this
into account.
Fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Add column hints for LaTeX to format columns on the tables inside
pixfmt-002.rst and pixfmt-006.rst.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Lots of tables at extended-controls.rst need explicit hints for
LaTeX to adjust their widths. Provide that.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
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>
Both tables on this rst file were not shown right, as they miss
the proper tag (tabularcolumns) to specify the column widths
required for PDF and LaTeX output.
Also, the second table is too big to fit into one page. So,
it should use the longtable class to allow it to be split into
two pages.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are two tables with a C code-block inside it. Unfortunately,
that causes LaTeX output to break. Yet, there's nothing special
there, so let's remove the code-block from them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Change multi-line note tags to be more symetric, e. g. not starting
the text together witht the tag.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The items at the sound carrier had a bullet. Those are not needed.
So, get rid of them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>