summaryrefslogtreecommitdiff
path: root/Documentation/media/uapi/mediactl
AgeCommit message (Collapse)Author
2020-04-14media: docs: move uAPI book to userspace-api/mediaMauro Carvalho Chehab
Since 2017, there is an space reserved for userspace API, created by changeset 1d596dee3862 ("docs: Create a user-space API guide"). As the media subsystem was one of the first subsystems to use Sphinx, until this patch, we were keeping things on a separate place. Let's just use the new location, as having all uAPI altogether will likely make things easier for developers. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-02-24media: Documentation/media/uapi: more readable unionsHans Verkuil
Avoid adding an extra columns when describing unions in the documentation. That makes it much harder to read. See e.g. VIDIOC_QUERY_EXT_CTRLS. Instead start off a union with 'union {' and end it with an extra row containing '}'. This leaves a lot more space for the description of the fields. This formatting technique was used in a few places already, but this patches fixes all remaining occurrences of 'union' in the media uAPI. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: Nicolas Dufresne <nicolas@ndufresne.ca> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-10-24media: Documentation: v4l: fix section depthAlexandre Courbot
The request API documentation introduced a new section which should have been a subsection. Fix this. Signed-off-by: Alexandre Courbot <acourbot@chromium.org> Signed-off-by: Alexandre Courbot <gnurou@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-29media: media-ioc-enum-links.rst: fix incorrect reserved field documentationHans Verkuil
The reserved field array for struct media_link_desc has length 2, not 4. And the reserved field array of struct media_links_enum was never documented at all. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-25media: media requests: return EBADR instead of EACCESHans Verkuil
If requests are used when they shouldn't, or not used when they should, then return EBADR (Invalid request descriptor) instead of EACCES. The reason for this change is that EACCES has more to do with permissions (not being the owner of the resource), but in this case the request file descriptor is just wrong for the current mode of the device. Update the documentation accordingly. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-01media: Documentation: fix several typosMauro Carvalho Chehab
Use codespell to fix lots of typos over frontends. Manually verified to avoid false-positives. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-01-25media: Documentation/media: rename "Codec Interface"Hans Verkuil
The "Codec Interface" chapter is poorly named since codecs are just one use-case of the Memory-to-Memory Interface. Rename it and clean up the text a bit. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-17media: docs: fix some GPL licensing ambiguity at the textMauro Carvalho Chehab
Those files are meant to be dual GPL 2.0 and GFDL without implicit sections. However, by a wrong cut-and-paste, I ended by applying a GPL 2+ license text to it, while still using the GPL 2.0 SPDX tag, with would cause an ambiguity about the licensing model. Solve this by explicitly mentioning that the dual licensing is between GPL 2.0 and GFDL and correcting the text. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-05Merge commit '0072a0c14d5b7cb72c611d396f143f5dcd73ebe2' into patchworkMauro Carvalho Chehab
Merge from Upstream after the latest media fixes branch, because we need one patch that it is there. * commit '0072a0c14d5b7cb72c611d396f143f5dcd73ebe2': (1108 commits) ide: Change to use DEFINE_SHOW_ATTRIBUTE macro ide: pmac: add of_node_put() drivers/tty: add missing of_node_put() drivers/sbus/char: add of_node_put() sbus: char: add of_node_put() Linux 4.20-rc5 PCI: Fix incorrect value returned from pcie_get_speed_cap() MAINTAINERS: Update linux-mips mailing list address ocfs2: fix potential use after free mm/khugepaged: fix the xas_create_range() error path mm/khugepaged: collapse_shmem() do not crash on Compound mm/khugepaged: collapse_shmem() without freezing new_page mm/khugepaged: minor reorderings in collapse_shmem() mm/khugepaged: collapse_shmem() remember to clear holes mm/khugepaged: fix crashes due to misaccounted holes mm/khugepaged: collapse_shmem() stop if punched or truncated mm/huge_memory: fix lockdep complaint on 32-bit i_size_read() mm/huge_memory: splitting set mapping+index before unfreeze mm/huge_memory: rename freeze_page() to unmap_page() initramfs: clean old path before creating a hardlink ...
2018-12-05media: add SPDX header to media uAPI filesMauro Carvalho Chehab
All those files are under GFDL 1.1 or later, with no invariant sections. Tag them as such. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-05media: remove text encoding from rst filesMauro Carvalho Chehab
This is not needed there. Also, the same UTF-8 encoding should be used on all documents. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-11-27media: mediactl docs: Fix licensing messageMauro Carvalho Chehab
Right now, it mentions two SPDX headers that don't exist inside the Kernel: GFDL-1.1-or-later And an exception: no-invariant-sections While it would be trivial to add the first one, there's no way, currently, to distinguish, with SPDX, between a free and a non-free document under GFDL. Free documents with GFDL should not have invariant sections. There's an open issue at SPDX tree waiting for it to be solved. While we don't have this issue closed, let's just replace by a free-text license, and add a TODO note to remind us to revisit it later. Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-10-31Merge tag 'media/v4.20-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull new experimental media request API from Mauro Carvalho Chehab: "A new media request API This API is needed to support device drivers that can dynamically change their parameters for each new frame. The latest versions of Google camera and codec HAL depends on such feature. At this stage, it supports only stateless codecs. It has been discussed for a long time (at least over the last 3-4 years), and we finally reached to something that seem to work. This series contain both the API and core changes required to support it and a new m2m decoder driver (cedrus). As the current API is still experimental, the only real driver using it (cedrus) was added at staging[1]. We intend to keep it there for a while, in order to test the API. Only when we're sure that this API works for other cases (like encoders), we'll move this driver out of staging and set the API into a stone. [1] We added support for the vivid virtual driver (used only for testing) to it too, as it makes easier to test the API for the ones that don't have the cedrus hardware" * tag 'media/v4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (53 commits) media: dt-bindings: Document the Rockchip VPU bindings media: platform: Add Cedrus VPU decoder driver media: dt-bindings: media: Document bindings for the Cedrus VPU driver media: v4l: Add definition for the Sunxi tiled NV12 format media: v4l: Add definitions for MPEG-2 slice format and metadata media: videobuf2-core: Rework and rename helper for request buffer count media: v4l2-ctrls.c: initialize an error return code with zero media: v4l2-compat-ioctl32.c: add missing documentation for a field media: media-request: update documentation media: media-request: EPERM -> EACCES/EBUSY media: v4l2-ctrls: improve media_request_(un)lock_for_update media: v4l2-ctrls: use media_request_(un)lock_for_access media: media-request: add media_request_(un)lock_for_access media: vb2: set reqbufs/create_bufs capabilities media: videodev2.h: add new capabilities for buffer types media: buffer.rst: only set V4L2_BUF_FLAG_REQUEST_FD for QBUF media: v4l2-ctrls: return -EACCES if request wasn't completed media: media-request: return -EINVAL for invalid request_fds media: vivid: add request support media: vivid: add mc ...
2018-09-11media: media-request: update documentationHans Verkuil
Various clarifications and readability improvements based on Laurent Pinchart's review of the documentation. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-09-11media: media-request: EPERM -> EACCES/EBUSYHans Verkuil
If requests are not supported by the driver, then return EACCES, not EPERM. If you attempt to mix queueing buffers directly and using requests, then EBUSY is returned instead of EPERM: once a specific queueing mode has been chosen the queue is 'busy' if you attempt the other mode (i.e. direct queueing vs via a request). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-09-11media: mediactl/*.rst: document argpHans Verkuil
The documentation of the Media Controller API ioctls is missing a description of the argp ioctl argument. Add this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-08-31media: Documentation: v4l: document request APIAlexandre Courbot
Document the request API for V4L2 devices, and amend the documentation of system calls influenced by it. Signed-off-by: Alexandre Courbot <acourbot@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-27media: media-types.rst: fix doc warningsHans Verkuil
Fix these warnings when building the documentation: media.h.rst:6: WARNING: undefined label: media-ent-f-dv-decoder (if the link has no caption the label must precede a section header) media.h.rst:6: WARNING: undefined label: media-ent-f-dv-encoder (if the link has no caption the label must precede a section header) media.h.rst:6: WARNING: undefined label: media-ent-f-dv-decoder (if the link has no caption the label must precede a section header) Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-27media: media-types.rst: codec entities can have more than one source padHans Verkuil
Some decoders and encoders can potentially have more than one source pad, so update the description to say 'at least one source pad'. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25media: media.h: add encoder/decoder functions for codecsHans Verkuil
Add MEDIA_ENT_F_PROC_VIDEO_EN/DECODER to be used for the encoder and decoder entities of codec hardware. [mchehab+samsung@kernel.org: split description on two senteces by adding dots] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25media: media-ioc-enum-entities.rst/-g-topology.rst: clarify ID/name usageHans Verkuil
Mention that IDs should not be hardcoded in applications and that the entity name must be unique within the media topology. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25media: media-ioc-enum-links.rst: improve pad index descriptionHans Verkuil
Make it clearer that the index starts at 0. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25media: media.h: add MEDIA_ENT_F_DV_ENCODERHans Verkuil
Add a new function for digital video encoders such as HDMI transmitters. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25media: rename MEDIA_ENT_F_DTV_DECODER to MEDIA_ENT_F_DV_DECODERHans Verkuil
The use of 'DTV' is very confusing since it normally refers to Digital TV e.g. DVB etc. Instead use 'DV' (Digital Video), which nicely corresponds to the DV Timings API used to configure such receivers and transmitters. We keep an alias to avoid breaking userspace applications. Since this alias is only available if __KERNEL__ is *not* defined (i.e. it is only available for userspace, not kernelspace), any drivers that use it also have to be converted to the new define. These drivers are adv7604, adv7842 and tda1997x. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25media: media-ioc-g-topology.rst: document new 'flags' fieldHans Verkuil
Document the new struct media_v2_entity 'flags' field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25media: media-ioc-g-topology.rst: document new 'index' fieldHans Verkuil
Document the new struct media_v2_pad 'index' field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-06-28media: Documentation/media/uapi/mediactl: redo tablesHans Verkuil
Drop the '- .. row 1' lines to make it easier to add new rows to the tables in the future without having to renumber these lines. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-04-04media: media-types.rst: rename media-entity-type to media-entity-functionsHans Verkuil
The MEDIA_ENT_F_* defines refer to functions, not types. Update the documentation accordingly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-04media: media-ioc-g-topology.rst: fix 'reserved' sizesHans Verkuil
The size of the reserved arrays in the documentation is wrong. Sync this with the actual header. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-26media: media-ioc-enum-entities/links.rst: document reserved fieldsHans Verkuil
These structures have reserved fields that were never documented. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-26media: document the reservedX fields in media_v2_topologyHans Verkuil
The MEDIA_IOC_G_TOPOLOGY documentation didn't document the reservedX fields. Related to that was that the documented type of the num_* fields was also wrong. Fix both. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-26media: media-types.rst: fix typoAlexandre Courbot
with -> which Signed-off-by: Alexandre Courbot <acourbot@chromium.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-26media: media-types.rst: fix type, small improvementsHans Verkuil
data conector -> connector ... -> etc. '...' looked odd when my browser put the ... by itself on the next line, 'etc.' is clearer IMHO. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-26media: media-ioc-g-topology.rst: fix interface-to-entity link descriptionHans Verkuil
The source_id and sink_id descriptions were the same for interface-to-entity links. The source_id is the interface ID, not the entity ID. Fix this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-02-22media: add digital video decoder entity functionsTim Harvey
Add a new media entity function definition for digital TV decoders: MEDIA_ENT_F_DTV_DECODER Signed-off-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-05media: docs: don't show ToC for each part on PDF outputMauro Carvalho Chehab
The "Table of Contents" of a PDF file is generated only once, at the beginning fo the output. It doesn't produce it on each part. So, don't output this text on each part of the document. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-05media: mc uapi: adjust some table sizes for PDF outputMauro Carvalho Chehab
Some cells are too small to fit the text written to it. Increase it. No text changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20[media] add mux and video interface bridge entity functionsPhilipp Zabel
Add two new media entity function definitions for video multiplexers and video interface bridges. - renamed MEDIA_ENT_F_MUX to MEDIA_ENT_F_VID_MUX Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08[media] media-ioc-g-topology.rst: fix typosAlexandre Courbot
Fix what seems to be a few typos induced by copy/paste. [mchehab@s-opensource.com: fix a typo] Signed-off-by: Alexandre Courbot <acourbot@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-22[media] docs-rst: media: Explicitly refer to sub-sampling in scaling ↵Sakari Ailus
documentation Skipping, which is sometimes used in terminology related to sensors when referring to sub-sampling is replaced by more suitable sub-sampling instead. Skipping is retained in a note in parentheses. Suggested-by: Russell King <rmk+kernel@armlinux.org.uk> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09[media] media-ioc-g-topology.rst: fix a c domain referenceMauro Carvalho Chehab
One reference there is still using :ref:. Fix it, to solve this warning: Documentation/media/uapi/mediactl/media-ioc-g-topology.rst:236: WARNING: undefined label: media-v2-intf-devnode (if the link has no caption the label must precede a section header) Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09[media] docs-rst: convert uAPI structs to C domainMauro Carvalho Chehab
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>
2016-08-24[media] media-types.rst: fix typoHans Verkuil
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>
2016-08-23[media] Documentation: add support for V4L touch devicesNick Dyer
Document the new touch API. Signed-off-by: Nick Dyer <nick@shmanahar.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fix up videodev2.h.rst.exceptions] Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-22[media] docs-rst: Convert MC uAPI to use C function referencesMauro Carvalho Chehab
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>
2016-08-22[media] docs-next: stop abusing on the cpp domainMauro Carvalho Chehab
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>
2016-08-22[media] docs-rst: fix warnings introduced by LaTeX patchsetMauro Carvalho Chehab
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>
2016-08-22[media] media-types.rst: adjust tables to fit on LaTeX outputMauro Carvalho Chehab
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>
2016-08-22[media] docs-rst: add tabularcolumns to all tablesMauro Carvalho Chehab
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-07-23[media] doc-rst: better organize the media booksMauro Carvalho Chehab
The uAPI book has 5 parts, but they lost numeration after conversion to rst. Manually number those parts, and make the main index with 1 depth, to only show the parts and the annexes. At each part, use :maxwidth: 5, in order to show a more complete index. While here, fix the cross-references between different books. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>