Commit Graph

601992 Commits

Author SHA1 Message Date
Mauro Carvalho Chehab
4ff916a0c9 doc-rst: parse-headers: fix multiline typedef handler
The typedef handler should do two things to be generic:
  1) parse typedef enums;
  2) accept both possible syntaxes:
	 typedef struct foo { .. } foo_t;
	 typedef struct { .. } foo_t;

Unfortunately, this is needed to parse some legacy DVB
files, like dvb/audio.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-07 08:12:57 -03:00
Mauro Carvalho Chehab
6c4c7dadb4 doc-rst: parse-headers: better handle typedefs
When typedef is used on its multiline format, we need to
also parse enum and struct in the same line.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-07 07:22:20 -03:00
Mauro Carvalho Chehab
9c80c74563 doc-rst: parse-headers: be more formal about the valid symbols
Be more formal about the valid symbols that are expected by
the parser, to match what c language expects.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-07 07:08:32 -03:00
Mauro Carvalho Chehab
9afe51129b doc-rst: fix parsing comments and '{' on a separate line
The dmx.h header has two things that causes the parser to
break while handling enums:
 per-header enums and the '{' starts on a new line

Both makes the parser to get lexical marks to be detected
as if they were symbols.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-07 06:54:00 -03:00
Mauro Carvalho Chehab
7d95fa8d66 doc-dst: parse-headers: highlight deprecated comments
When something is deprecated, highlight it, as we want it
to be clearer to the reader.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-07 06:36:46 -03:00
Mauro Carvalho Chehab
6fe79d1ede doc-rst: parse-headers: improve delimiters to detect symbols
As we had to escape the symbols for the ReST markup to not do
the wrong thing, the logic to discover start/end of strings
are not trivial. Improve the end delimiter detection, in order
to highlight more occurrences of the strings.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-07 06:36:46 -03:00
Mauro Carvalho Chehab
1ae6439538 doc-rst: auto-build the frontend.h.rst
This file is auto-generated with DocBook, from the uapi header.

Do the same with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-07 06:36:45 -03:00
Mauro Carvalho Chehab
dabf8be33b doc-rst: add parse-headers.pl script
This script parses a header file and converts it into a
parsed-literal block, creating references for ioctls,
defines, typedefs, enums and structs.

It also allow an external file to modify the rules, in
order to fix the expressions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-07 05:53:06 -03:00
Mauro Carvalho Chehab
39ab63237f doc-rst: linux_tv/index: Rename the book name
There's no need for all caps at its name. As the book title is
now showing at the top of each page, let's use Camel Case, to
make it less bold.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-06 08:31:53 -03:00
Mauro Carvalho Chehab
62acdf3554 doc-rst: v4l2: Rename the V4L2 API title
The V4L2 is the only part of the doc that has the word "Specification"
and mentions its version on the title.

Having the version there was important in the past, while we were
getting rid of V4L version 1. But, as v1 is long gone, all it lasts
is history (with is, btw, covered on the spec). So, no need to keep
the version on its title.

So, rename it, to be more generic and look like the remaining
of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-06 08:31:53 -03:00
Mauro Carvalho Chehab
86191cd762 doc-rst: Rename the title of the Digital TV section
The Digital TV section is ackward for two reasons:

  1) it is the only one with everything in upper case;
  2) its name is associated with the European digital TV standard.

Rename the part name, and add a notice that it refers to what's
known as "DVB API".

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-06 08:20:52 -03:00
Mauro Carvalho Chehab
1c719e648d doc-rst: remote_controllers: fix conversion issues
Make it look like V4L, DVB and MC docbooks initial page.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-06 08:09:58 -03:00
Mauro Carvalho Chehab
df94711d32 doc-rst: gen-errors: Improve table layout
Add a :widths: at the flat-table, to make it to look nicer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-06 07:58:20 -03:00
Mauro Carvalho Chehab
2ceb5d7bc9 doc-rst: media-ioc-enum-entities: better format the table
Add a :widths: at the flat-table, to improve the visual.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-06 07:55:55 -03:00
Mauro Carvalho Chehab
8926814ec7 doc-rst: media-ioc-g-topology: Fix tables
The tables were not properly converted. It looked a little
ackward already at DocBook, but the conversion made it worse.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-06 07:40:01 -03:00
Mauro Carvalho Chehab
8c1cc62a52 doc-rst: mediactl: fix some wrong cross references
Those cross references should point to media control syscalls,
and not to V4L ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 17:12:37 -03:00
Mauro Carvalho Chehab
32ad2075a4 doc-rst: media-controller-model: fix a typo
Remove a 'm' at the end of the last phrase.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 17:05:03 -03:00
Mauro Carvalho Chehab
9336831ec4 doc-rst: media-controller.rst: add missing copy symbol
Just like V4L and DVB parts, add the copyright symbol.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 17:02:45 -03:00
Mauro Carvalho Chehab
965a718a8b doc-rst: media-controller: missing credits
When I wrote the MC next gen patches, I also improved the media
controller documentation and added documentation for
MEDIA_IOC_G_TOPOLOGY, but I forgot to add the credits on that
time.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:58:53 -03:00
Mauro Carvalho Chehab
83f9a55a22 doc-rst: media-controller: fix conversion issues
Make it look just like v4l and DVB parts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:55:06 -03:00
Mauro Carvalho Chehab
ea02106611 doc-rst: intro: remove obsolete headers
The video, audio and OSD APIs are obsolete. V4L2 should be
used instead. So, remove them from this intro item.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:36:22 -03:00
Mauro Carvalho Chehab
534f3d0e86 doc-rst: dvb/intro: Better show the needed include blocks
The include blocks were not properly displayed. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:36:21 -03:00
Mauro Carvalho Chehab
e9b72b2744 doc-rst: fix intro_files/dvbstb.png image
The png image was not base64 decoded correctly.
Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:36:21 -03:00
Mauro Carvalho Chehab
32b37440dd doc-rst: dvbapi: Fix conversion issues
The conversion of this file didn't happen too well. We want
the items numbered, and format it just like what we did with
part 1 of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:36:20 -03:00
Mauro Carvalho Chehab
b97cd1496d doc-rst: dev-overlay: fix the last warning
Fixes this warning:

Documentation/linux_tv/media/v4l/dev-overlay.rst:247: WARNING: Title underline too short.

struct v4l2_clip [4]_
----------------

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:27:26 -03:00
Mauro Carvalho Chehab
c104290b95 doc-rst: dmabuf: Fix the cross-reference
Fixes this warning:
    Documentation/linux_tv/media/v4l/dmabuf.rst:150: WARNING: undefined label: vidioc_dqbuf (if the link has no caption the label must precede a section header)

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:27:26 -03:00
Mauro Carvalho Chehab
5929cb1769 doc-rst: linux_tv: use :cpp:function:: on all syscalls
Now that we have one syscall per page, using :cpp:function::
cleans up almost all warnings, with is a great thing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 16:27:25 -03:00
Mauro Carvalho Chehab
15e7d6158e doc-rst: linux_tv: don't use uppercases for syscall sections
On the syscall conversions, we used uppercase for the sections,
but this is too bold. So, convert them to Camel Case, as it
looks visually better.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 15:15:57 -03:00
Markus Heiser
4eb40f14dc doc-rst: customize RTD theme, captions & inline literal
The layout of (table) captions in the RTD theme is a bit ugly and the
bordered, red colored of inline literals is a bit to gaudy. The
requirements has been discussed in the ML [1].

captions:

  - captions should have 100% (not 85%) font size
  - hide the permalink symbol as long as link is not hovered

inline literal:

  - drop the borderbox and red color

[1] http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/101099

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
2016-07-05 14:39:51 -03:00
Markus Heiser
9abaf979ab doc-rst: customize RTD theme, table & full width
The default table layout of the RTD theme does not fit for vast tables,
like the ones we have in the linux_tv project. This has been discussed
on the ML [1].

The RTD theme is a two column layout, with a navigation column on the
left and a content column on the right:

content column

 RTD theme's default is 800px as max width for the content, but we have
 tables with tons of columns, which need the full width of the
 view-port (BTW: *full width* is what DocBook's HTML is).

table

   - sequences of whitespace should collapse into a single whitespace.
   - make the overflow auto (scrollbar if needed)
   - align caption "left" ("center" is unsuitable on vast tables)

[1] http://article.gmane.org/gmane.linux.kernel/2216509

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
2016-07-05 14:39:51 -03:00
Mauro Carvalho Chehab
5d55cd2ee7 doc-rst: remove Documentation/linux_tv/conf.py file
This file is actually not used to build the media uAPI docbook.
So, remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 14:39:36 -03:00
Markus Heiser
bc21467114 doc-rst: boilerplate HTML theme customization
Implements the minimal boilerplate for Sphinx HTML theme customization.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 14:38:49 -03:00
Mauro Carvalho Chehab
fc833980e3 doc-rst: linux_tv: dvb: put return value at the end
On some syscall descriptions, the tables are described after
the return value. Do that inside descriptions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 11:36:55 -03:00
Mauro Carvalho Chehab
0060665c45 doc-rst: linux_tv: dvb: use lowercase for filenames
There are some ioctls in upper case. This is not the standard.
Put them on lowercase, to match what's done with other ioctls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 11:24:08 -03:00
Mauro Carvalho Chehab
586027cefa doc-rst: linux_tv: reformat all syscall pages
The syscall pages are written to be used also as man-pages.

However, they don't match the format used by kernel-doc
generated pages from DocBook. Rewrite them to match it.

One side effect is that now all such pages at the book
will have the same format, reducing the format differences
between DVB and the other parts of the book.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 10:53:13 -03:00
Mauro Carvalho Chehab
47d23e363f doc-rst: linux_tv: split DVB function call documentation
Just like V4L, split the DVB function calls into one file per
system call. This is a requirement for the man pages creator
on Sphinx to work, and makes the document easier to maintain.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-05 10:44:33 -03:00
Mauro Carvalho Chehab
bb2ade02e8 doc-rst: libv4l-introduction: improve format
Fix some cross-references and improve the layout of this
page.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 19:03:49 -03:00
Mauro Carvalho Chehab
0c15aefd9e doc-rst: subdev-formats: Improve figure caption
Add a numbering for the figure.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 18:53:54 -03:00
Mauro Carvalho Chehab
c6f7b0f213 doc-rst: dev-subdev: fix some format issues
The conversion from DocBook made somethings look ugly.
Improve them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 18:47:13 -03:00
Mauro Carvalho Chehab
41dbe0c189 doc-rst: dev-sliced-vbi: convert table captions into headers
Sphinx doesn't format nice table captions, nor auto-numberate
them. So, convert tables into chapters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 18:37:48 -03:00
Mauro Carvalho Chehab
ca023c3d67 doc-rst: dev-raw-vbi fix conversion issues
There are several things that didn't convert well. Fix them,
in order to improve the layout of the formatted document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 18:32:02 -03:00
Mauro Carvalho Chehab
f84dd9007f doc-rst: linux_tv: Use references for read()/write()
Use cross-references for read()/write() on a few places
where they weren't used.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 18:16:57 -03:00
Mauro Carvalho Chehab
863bd721a9 doc-rst: dev-codec: Fix a reference for _STREAMON
The referenced ioctl there is only VIDIOC_STREAMON, so we
should override the name, to avoid it to also show _STREAMOFF.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 18:05:55 -03:00
Mauro Carvalho Chehab
498e9f3bd1 doc-rst: dev-osd: Fix some issues due to conversion
The conversion to ReST broke a minor things. Fix them.

While here, also make EBUSY constant, just like on other places.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 18:01:04 -03:00
Mauro Carvalho Chehab
471e5602cf doc-rst: dev-overlay: Fix conversion issues
There were several conversion issues on this file, causing it
to be badly formatted. Fix them, in order to match the
design used on DocBook.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 17:51:48 -03:00
Mauro Carvalho Chehab
6fa26355fd doc-rst: buffer: numerate tables and figures
Sphinx actually doesn't numerate tables nor figures. So,
let's add a subtitle before each table. That makes them
"numerated".

While here, fix the git binary that got corrupted.
Let's hope this will work, as the reason why we had
to encode them were to prevent some issues on commiting
those gif files on git.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 17:15:55 -03:00
Mauro Carvalho Chehab
90865d29db doc-rst: buffer: numerate tables
Sphinx actually  doesn't numerate tables. So, let's add a
subtitle before each table. That makes them numerated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 16:50:00 -03:00
Mauro Carvalho Chehab
69eee8a512 doc-rst: dmabuf: Add ioctl cross references
There are lots of ioctls mentioned there that aren't cross-referenced.

Convert the const to cross references. That makes it visually
better, and improves navigation along the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 16:43:03 -03:00
Mauro Carvalho Chehab
8f764eb97c doc-rst: dmabuf: re-add the missing captions
The conversion from DocBook removed them. Re-add.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 16:31:20 -03:00
Mauro Carvalho Chehab
0579e6e3a3 doc-rst: linux_tv: remove whitespaces
Let's remove bad whitespaces on the entire book.

That helps to avoid mixing whitespace removal with other
patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-04 16:25:48 -03:00