Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5377d91f authored by Markus Heiser's avatar Markus Heiser Committed by Mauro Carvalho Chehab
Browse files

doc-rst: linux_tv DocBook to reST migration (docs-next)



This is the restructuredText (reST) migration of the ``media``
DocBook-XML set from the linux_tv project.

Signed-off-by: default avatarMarkus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 6ab99fa6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ Contents:
   :maxdepth: 2

   kernel-documentation
   linux_tv/index

Indices and tables
==================
+153 −0
Original line number Diff line number Diff line
.. -*- coding: utf-8; mode: rst -*-

file: audio.h
=============

.. code-block:: c

    /*
     * audio.h
     *
     * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
     *                  & Marcus Metzler <marcus@convergence.de>
     *                    for convergence integrated media GmbH
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Lesser Public License
     * as published by the Free Software Foundation; either version 2.1
     * of the License, or (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU Lesser General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
     *
     */

    #ifndef _DVBAUDIO_H_
    #define _DVBAUDIO_H_

    #include <linux/types.h>

    typedef enum {
            AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */
            AUDIO_SOURCE_MEMORY /* Select internal memory as the main source */
    } audio_stream_source_t;


    typedef enum {
            AUDIO_STOPPED,      /* Device is stopped */
            AUDIO_PLAYING,      /* Device is currently playing */
            AUDIO_PAUSED        /* Device is paused */
    } audio_play_state_t;


    typedef enum {
            AUDIO_STEREO,
            AUDIO_MONO_LEFT,
            AUDIO_MONO_RIGHT,
            AUDIO_MONO,
            AUDIO_STEREO_SWAPPED
    } audio_channel_select_t;


    typedef struct audio_mixer {
            unsigned int volume_left;
            unsigned int volume_right;
      // what else do we need? bass, pass-through, ...
    } audio_mixer_t;


    typedef struct audio_status {
            int                    AV_sync_state;  /* sync audio and video? */
            int                    mute_state;     /* audio is muted */
            audio_play_state_t     play_state;     /* current playback state */
            audio_stream_source_t  stream_source;  /* current stream source */
            audio_channel_select_t channel_select; /* currently selected channel */
            int                    bypass_mode;    /* pass on audio data to */
            audio_mixer_t          mixer_state;    /* current mixer state */
    } audio_status_t;                              /* separate decoder hardware */


    typedef
    struct audio_karaoke {  /* if Vocal1 or Vocal2 are non-zero, they get mixed  */
            int vocal1;    /* into left and right t at 70% each */
            int vocal2;    /* if both, Vocal1 and Vocal2 are non-zero, Vocal1 gets*/
            int melody;    /* mixed into the left channel and */
                           /* Vocal2 into the right channel at 100% each. */
                           /* if Melody is non-zero, the melody channel gets mixed*/
    } audio_karaoke_t;     /* into left and right  */


    typedef __u16 audio_attributes_t;
    /*   bits: descr. */
    /*   15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */
    /*   12    multichannel extension */
    /*   11-10 audio type (0=not spec, 1=language included) */
    /*    9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) */
    /*    7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit,  */
    /*    5- 4 Sample frequency fs (0=48kHz, 1=96kHz) */
    /*    2- 0 number of audio channels (n+1 channels) */


    /* for GET_CAPABILITIES and SET_FORMAT, the latter should only set one bit */
    #define AUDIO_CAP_DTS    1
    #define AUDIO_CAP_LPCM   2
    #define AUDIO_CAP_MP1    4
    #define AUDIO_CAP_MP2    8
    #define AUDIO_CAP_MP3   16
    #define AUDIO_CAP_AAC   32
    #define AUDIO_CAP_OGG   64
    #define AUDIO_CAP_SDDS 128
    #define AUDIO_CAP_AC3  256

    #define AUDIO_STOP                 _IO('o', 1)
    #define AUDIO_PLAY                 _IO('o', 2)
    #define AUDIO_PAUSE                _IO('o', 3)
    #define AUDIO_CONTINUE             _IO('o', 4)
    #define AUDIO_SELECT_SOURCE        _IO('o', 5)
    #define AUDIO_SET_MUTE             _IO('o', 6)
    #define AUDIO_SET_AV_SYNC          _IO('o', 7)
    #define AUDIO_SET_BYPASS_MODE      _IO('o', 8)
    #define AUDIO_CHANNEL_SELECT       _IO('o', 9)
    #define AUDIO_GET_STATUS           _IOR('o', 10, audio_status_t)

    #define AUDIO_GET_CAPABILITIES     _IOR('o', 11, unsigned int)
    #define AUDIO_CLEAR_BUFFER         _IO('o',  12)
    #define AUDIO_SET_ID               _IO('o', 13)
    #define AUDIO_SET_MIXER            _IOW('o', 14, audio_mixer_t)
    #define AUDIO_SET_STREAMTYPE       _IO('o', 15)
    #define AUDIO_SET_EXT_ID           _IO('o', 16)
    #define AUDIO_SET_ATTRIBUTES       _IOW('o', 17, audio_attributes_t)
    #define AUDIO_SET_KARAOKE          _IOW('o', 18, audio_karaoke_t)

    /**
     * AUDIO_GET_PTS
     *
     * Read the 33 bit presentation time stamp as defined
     * in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
     *
     * The PTS should belong to the currently played
     * frame if possible, but may also be a value close to it
     * like the PTS of the last decoded frame or the last PTS
     * extracted by the PES parser.
     */
    #define AUDIO_GET_PTS              _IOR('o', 19, __u64)
    #define AUDIO_BILINGUAL_CHANNEL_SELECT _IO('o', 20)

    #endif /* _DVBAUDIO_H_ */




.. ------------------------------------------------------------------------------
.. This file was automatically converted from DocBook-XML with the dbxml
.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
.. from the linux kernel, refer to:
..
.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
.. ------------------------------------------------------------------------------
+108 −0
Original line number Diff line number Diff line
.. -*- coding: utf-8; mode: rst -*-

file: ca.h
==========

.. code-block:: c

    /*
     * ca.h
     *
     * Copyright (C) 2000 Ralph  Metzler <ralph@convergence.de>
     *                  & Marcus Metzler <marcus@convergence.de>
     *                    for convergence integrated media GmbH
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Lesser Public License
     * as published by the Free Software Foundation; either version 2.1
     * of the License, or (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU Lesser General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
     *
     */

    #ifndef _DVBCA_H_
    #define _DVBCA_H_

    /* slot interface types and info */

    typedef struct ca_slot_info {
            int num;               /* slot number */

            int type;              /* CA interface this slot supports */
    #define CA_CI            1     /* CI high level interface */
    #define CA_CI_LINK       2     /* CI link layer level interface */
    #define CA_CI_PHYS       4     /* CI physical layer level interface */
    #define CA_DESCR         8     /* built-in descrambler */
    #define CA_SC          128     /* simple smart card interface */

            unsigned int flags;
    #define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
    #define CA_CI_MODULE_READY   2
    } ca_slot_info_t;


    /* descrambler types and info */

    typedef struct ca_descr_info {
            unsigned int num;          /* number of available descramblers (keys) */
            unsigned int type;         /* type of supported scrambling system */
    #define CA_ECD           1
    #define CA_NDS           2
    #define CA_DSS           4
    } ca_descr_info_t;

    typedef struct ca_caps {
            unsigned int slot_num;     /* total number of CA card and module slots */
            unsigned int slot_type;    /* OR of all supported types */
            unsigned int descr_num;    /* total number of descrambler slots (keys) */
            unsigned int descr_type;   /* OR of all supported types */
    } ca_caps_t;

    /* a message to/from a CI-CAM */
    typedef struct ca_msg {
            unsigned int index;
            unsigned int type;
            unsigned int length;
            unsigned char msg[256];
    } ca_msg_t;

    typedef struct ca_descr {
            unsigned int index;
            unsigned int parity;    /* 0 == even, 1 == odd */
            unsigned char cw[8];
    } ca_descr_t;

    typedef struct ca_pid {
            unsigned int pid;
            int index;              /* -1 == disable*/
    } ca_pid_t;

    #define CA_RESET          _IO('o', 128)
    #define CA_GET_CAP        _IOR('o', 129, ca_caps_t)
    #define CA_GET_SLOT_INFO  _IOR('o', 130, ca_slot_info_t)
    #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t)
    #define CA_GET_MSG        _IOR('o', 132, ca_msg_t)
    #define CA_SEND_MSG       _IOW('o', 133, ca_msg_t)
    #define CA_SET_DESCR      _IOW('o', 134, ca_descr_t)
    #define CA_SET_PID        _IOW('o', 135, ca_pid_t)

    #endif




.. ------------------------------------------------------------------------------
.. This file was automatically converted from DocBook-XML with the dbxml
.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
.. from the linux kernel, refer to:
..
.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
.. ------------------------------------------------------------------------------
+221 −0
Original line number Diff line number Diff line
# -*- coding: utf-8; mode: python -*-
#
# This is the project specific sphinx-build configuration, which is loaded from
# the base configuration file (``../conf.py``). About config values consult:
#
# * http://www.sphinx-doc.org/en/stable/config.html
#
# While setting values here, please take care to not overwrite common needed
# configurations. This means, do not *overwrite* composite values (e.g. the
# list- or dictionary-value of "latex_elements" resp. "extensions") by
# thoughtless assignments. Manipulate composite values always by *update*
# (dict-values) or extend (list-values). Nevertheless, if you know what you are
# doing, you are free to *overwrite* values to your needs.
#
# useful preset names:
#
# * BASE_FOLDER: the folder where the top conf.py is located
# * main_name:   the basename of this project-folder

# Set parser's default kernel-doc mode ``reST|kernel-doc``.
kernel_doc_mode = "kernel-doc"

# ------------------------------------------------------------------------------
# General configuration
# ------------------------------------------------------------------------------

project   = u'LINUX MEDIA INFRASTRUCTURE API'
copyright = u'2009-2015 : LinuxTV Developers'
author    = u'The LinuxTV Developers'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
#version   = 'v4.7'
# The full version, including alpha/beta/rc tags.
#release   = 'v4.7-rc2'

# extlinks["man"] = ('http://manpages.ubuntu.com/cgi-bin/search.py?q=%s', ' ')

# intersphinx_mapping['kernel-doc'] = ('http://return42.github.io/sphkerneldoc/books/kernel-doc-HOWTO/', None)

extensions.extend([
    # 'sphinx.ext.pngmath'
    #, 'sphinx.ext.mathjax'
])

# ------------------------------------------------------------------------------
# Options for HTML output
# ------------------------------------------------------------------------------

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
#html_title = None

# A shorter title for the navigation bar.  Default is the same as html_title.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = pathjoin(BASE_FOLDER, "_tex", "logo.png")

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path.extend([])

# Output file base name for HTML help builder.
htmlhelp_basename = main_name

# ------------------------------------------------------------------------------
# Options for rst2pdf output
# ------------------------------------------------------------------------------

# Grouping the document tree into PDF files. List of tuples
# (source start file, target name, title, author, options).
#
# The options element is a dictionary that lets you override
# this config per-document.
# For example,
# ('index', u'MyProject', u'My Project', u'Author Name',
#  dict(pdf_compressed = True))
# would mean that specific document would be compressed
# regardless of the global pdf_compressed setting.
#
# further:  http://rst2pdf.ralsina.me/handbook.html#sphinx

# FIXME: at this time, the rst2pdf fails with a bug
#pdf_documents = [
#    (master_doc, main_name, project, author)
#    , ]

# If false, no index is generated.
pdf_use_index = False

# How many levels deep should the table of contents be?
pdf_toc_depth = 3

# Add section number to section references
pdf_use_numbered_links = False

# Background images fitting mode
pdf_fit_background_mode = 'scale'


# ------------------------------------------------------------------------------
# Options for manual page output
# ------------------------------------------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
# man_pages = [
#     (master_doc, 'kernel-doc', u'Kernel-Doc',
#      [author], 1)
# ]

# If true, show URL addresses after external links.
#man_show_urls = False

# ------------------------------------------------------------------------------
# Options for Texinfo output
# ------------------------------------------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
# texinfo_documents = [
#     (master_doc, 'Kernel-Doc', u'Kernel-Doc Documentation',
#      author, 'Kernel-Doc', 'One line description of project.',
#      'Miscellaneous'),
# ]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

# ------------------------------------------------------------------------------
# Options for Epub output
# ------------------------------------------------------------------------------

# Bibliographic Dublin Core info.
# epub_title = project
# epub_author = author
# epub_publisher = author
# epub_copyright = copyright

# The basename for the epub file. It defaults to the project name.
#epub_basename = project

# The HTML theme for the epub output. Since the default themes are not
# optimized for small screen space, using the same theme for HTML and epub
# output is usually not wise. This defaults to 'epub', a theme designed to save
# visual space.
#epub_theme = 'epub'

# The language of the text. It defaults to the language option
# or 'en' if the language is not set.
#epub_language = ''

# The scheme of the identifier. Typical schemes are ISBN or URL.
#epub_scheme = ''

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#epub_identifier = ''

# A unique identification for the text.
#epub_uid = ''

# A tuple containing the cover image and cover page html template filenames.
#epub_cover = ()

# A sequence of (type, uri, title) tuples for the guide element of content.opf.
#epub_guide = ()

# HTML files that should be inserted before the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_pre_files.extend([])

# HTML files that should be inserted after the pages created by sphinx.
# The format is a list of tuples containing the path and title.
#epub_post_files.extend([])

# A list of files that should not be packed into the epub file.
epub_exclude_files.extend([])

# The depth of the table of contents in toc.ncx.
#epub_tocdepth = 3

# Allow duplicate toc entries.
#epub_tocdup = True

# Choose between 'default' and 'includehidden'.
#epub_tocscope = 'default'

# Fix unsupported image types using the Pillow.
#epub_fix_images = False

# Scale large images.
#epub_max_image_width = 0

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#epub_show_urls = 'inline'

# If false, no index is generated.
#epub_use_index = True
+173 −0
Original line number Diff line number Diff line
.. -*- coding: utf-8; mode: rst -*-

file: dmx.h
===========

.. code-block:: c

    /*
     * dmx.h
     *
     * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
     *                  & Ralph  Metzler <ralph@convergence.de>
     *                    for convergence integrated media GmbH
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU Lesser General Public License
     * as published by the Free Software Foundation; either version 2.1
     * of the License, or (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU Lesser General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
     *
     */

    #ifndef _UAPI_DVBDMX_H_
    #define _UAPI_DVBDMX_H_

    #include <linux/types.h>
    #ifndef __KERNEL__
    #include <time.h>
    #endif


    #define DMX_FILTER_SIZE 16

    enum dmx_output
    {
            DMX_OUT_DECODER, /* Streaming directly to decoder. */
            DMX_OUT_TAP,     /* Output going to a memory buffer */
                             /* (to be retrieved via the read command).*/
            DMX_OUT_TS_TAP,  /* Output multiplexed into a new TS  */
                             /* (to be retrieved by reading from the */
                             /* logical DVR device).                 */
            DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
    };

    typedef enum dmx_output dmx_output_t;

    typedef enum dmx_input
    {
            DMX_IN_FRONTEND, /* Input from a front-end device.  */
            DMX_IN_DVR       /* Input from the logical DVR device.  */
    } dmx_input_t;


    typedef enum dmx_ts_pes
    {
            DMX_PES_AUDIO0,
            DMX_PES_VIDEO0,
            DMX_PES_TELETEXT0,
            DMX_PES_SUBTITLE0,
            DMX_PES_PCR0,

            DMX_PES_AUDIO1,
            DMX_PES_VIDEO1,
            DMX_PES_TELETEXT1,
            DMX_PES_SUBTITLE1,
            DMX_PES_PCR1,

            DMX_PES_AUDIO2,
            DMX_PES_VIDEO2,
            DMX_PES_TELETEXT2,
            DMX_PES_SUBTITLE2,
            DMX_PES_PCR2,

            DMX_PES_AUDIO3,
            DMX_PES_VIDEO3,
            DMX_PES_TELETEXT3,
            DMX_PES_SUBTITLE3,
            DMX_PES_PCR3,

            DMX_PES_OTHER
    } dmx_pes_type_t;

    #define DMX_PES_AUDIO    DMX_PES_AUDIO0
    #define DMX_PES_VIDEO    DMX_PES_VIDEO0
    #define DMX_PES_TELETEXT DMX_PES_TELETEXT0
    #define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
    #define DMX_PES_PCR      DMX_PES_PCR0


    typedef struct dmx_filter
    {
            __u8  filter[DMX_FILTER_SIZE];
            __u8  mask[DMX_FILTER_SIZE];
            __u8  mode[DMX_FILTER_SIZE];
    } dmx_filter_t;


    struct dmx_sct_filter_params
    {
            __u16          pid;
            dmx_filter_t   filter;
            __u32          timeout;
            __u32          flags;
    #define DMX_CHECK_CRC       1
    #define DMX_ONESHOT         2
    #define DMX_IMMEDIATE_START 4
    #define DMX_KERNEL_CLIENT   0x8000
    };


    struct dmx_pes_filter_params
    {
            __u16          pid;
            dmx_input_t    input;
            dmx_output_t   output;
            dmx_pes_type_t pes_type;
            __u32          flags;
    };

    typedef struct dmx_caps {
            __u32 caps;
            int num_decoders;
    } dmx_caps_t;

    typedef enum dmx_source {
            DMX_SOURCE_FRONT0 = 0,
            DMX_SOURCE_FRONT1,
            DMX_SOURCE_FRONT2,
            DMX_SOURCE_FRONT3,
            DMX_SOURCE_DVR0   = 16,
            DMX_SOURCE_DVR1,
            DMX_SOURCE_DVR2,
            DMX_SOURCE_DVR3
    } dmx_source_t;

    struct dmx_stc {
            unsigned int num;       /* input : which STC? 0..N */
            unsigned int base;      /* output: divisor for stc to get 90 kHz clock */
            __u64 stc;              /* output: stc in 'base'*90 kHz units */
    };

    #define DMX_START                _IO('o', 41)
    #define DMX_STOP                 _IO('o', 42)
    #define DMX_SET_FILTER           _IOW('o', 43, struct dmx_sct_filter_params)
    #define DMX_SET_PES_FILTER       _IOW('o', 44, struct dmx_pes_filter_params)
    #define DMX_SET_BUFFER_SIZE      _IO('o', 45)
    #define DMX_GET_PES_PIDS         _IOR('o', 47, __u16[5])
    #define DMX_GET_CAPS             _IOR('o', 48, dmx_caps_t)
    #define DMX_SET_SOURCE           _IOW('o', 49, dmx_source_t)
    #define DMX_GET_STC              _IOWR('o', 50, struct dmx_stc)
    #define DMX_ADD_PID              _IOW('o', 51, __u16)
    #define DMX_REMOVE_PID           _IOW('o', 52, __u16)

    #endif /* _UAPI_DVBDMX_H_ */




.. ------------------------------------------------------------------------------
.. This file was automatically converted from DocBook-XML with the dbxml
.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
.. from the linux kernel, refer to:
..
.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
.. ------------------------------------------------------------------------------
Loading