Commit 54f38fca authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: docs: move uAPI book to userspace-api/media



Since 2017, there is an space reserved for userspace API,
created by changeset 1d596dee ("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: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 5dfb8db5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,4 +37,4 @@ when changes are made.

The following CEC error injection implementations exist:

- Documentation/media/uapi/cec/cec-pin-error-inj.rst
- Documentation/userspace-api/media/cec/cec-pin-error-inj.rst
+5 −5
Original line number Diff line number Diff line
@@ -55,15 +55,15 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit;

# $2 sphinx builder e.g. "html"
# $3 name of the build subfolder / e.g. "media", used as:
# $3 name of the build subfolder / e.g. "userspace-api/media", used as:
#    * dest folder relative to $(BUILDDIR) and
#    * cache folder relative to $(BUILDDIR)/.doctrees
# $4 dest subfolder e.g. "man" for man pages at media/man
# $4 dest subfolder e.g. "man" for man pages at userspace-api/media/man
# $5 reST source folder relative to $(srctree)/$(src),
#    e.g. "media" for the linux-tv book-set at ./Documentation/media
#    e.g. "userspace-api/media" for the linux-tv book-set at ./Documentation/userspace-api/media

quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
      cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \
      cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media $2 && \
	PYTHONDONTWRITEBYTECODE=1 \
	BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \
	$(PYTHON) $(srctree)/scripts/jobserver-exec \
@@ -120,7 +120,7 @@ refcheckdocs:

cleandocs:
	$(Q)rm -rf $(BUILDDIR)
	$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media clean
	$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/userspace-api/media clean

dochelp:
	@echo  ' Linux kernel internal documentation in different formats from ReST:'
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ if a symbol is not found at the documentation. That helps to keep the
uAPI documentation in sync with the Kernel changes.
The :ref:`parse_headers.pl <parse_headers>` provide a way to generate such
cross-references. It has to be called via Makefile, while building the
documentation. Please see ``Documentation/media/Makefile`` for an example
documentation. Please see ``Documentation/userspace-api/media/Makefile`` for an example
about how to use it inside the Kernel tree.

.. _parse_headers:
+2 −2
Original line number Diff line number Diff line
@@ -290,12 +290,12 @@ the FB_CAP_FOURCC bit in the fb_fix_screeninfo capabilities field.
FOURCC definitions are located in the linux/videodev2.h header. However, and
despite starting with the V4L2_PIX_FMT_prefix, they are not restricted to V4L2
and don't require usage of the V4L2 subsystem. FOURCC documentation is
available in Documentation/media/uapi/v4l/pixfmt.rst.
available in Documentation/userspace-api/media/v4l/pixfmt.rst.

To select a format, applications set the grayscale field to the desired FOURCC.
For YUV formats, they should also select the appropriate colorspace by setting
the colorspace field to one of the colorspaces listed in linux/videodev2.h and
documented in Documentation/media/uapi/v4l/colorspaces.rst.
documented in Documentation/userspace-api/media/v4l/colorspaces.rst.

The red, green, blue and transp fields are not used with the FOURCC-based API.
For forward compatibility reasons applications must zero those fields, and
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ Linux Media Subsystem Documentation
.. toctree::
   :maxdepth: 2

   media_uapi
   ../userspace-api/media/index
   media_kapi
   dvb-drivers/index
   v4l-drivers/index
Loading