From patchwork Mon Jul 17 02:04:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 93215 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qLDcF-00HRbP-Km; Mon, 17 Jul 2023 02:05:35 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230350AbjGQCFd (ORCPT + 1 other); Sun, 16 Jul 2023 22:05:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbjGQCFd (ORCPT ); Sun, 16 Jul 2023 22:05:33 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A7C1E58 for ; Sun, 16 Jul 2023 19:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nurfuerspam.de; s=s31663417; t=1689559511; x=1690164311; i=herdler@nurfuerspam.de; bh=csbjK34gRmbdR6Yt6EuftDpK7+w/STqOTQT/+l4j/Ms=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=gGO44juom2xKH8fKtp0fP6dVaSCozDM/OKeltH2gSkquou8BXjVNq0bfCyeoBPeOwI4J5/L 5EwreBCNyT++DEv3Qyd6DKVH7O/9vM3XA4TOLgidn+v+w7vykuuHOfOG1iVFz7b9tuXsjRbd+ AV2uNJinibTHFTAYRzwEV/UAGrpmz7q2fZN1jUdZlsBuaFgOklkBjWyjDyB/lKDIdXzEGxfYu Z0qajix8ePG1c422fFLtuK/6SBWITpVOJMZOlsRTJgSrPlUjJJBNQHxlhzlhjHwHB1Bpl71Yo f4aJAc3mhhWf5bGfBMlovzygCUmrpSPGr+0rG673ejSw5zl0q8XQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([217.113.179.15]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M72oB-1qIm642sxD-008Zs8; Mon, 17 Jul 2023 04:05:11 +0200 From: Stefan Herdler To: Mauro Carvalho Chehab Cc: Hans Verkuil , linux-media@vger.kernel.org, Tomasz Maciej Nowak , Corinna Vinschen , Soeren Moch Subject: [PATCH v3 1/6] Add documentation for legacy DVB decoder API Date: Mon, 17 Jul 2023 04:04:41 +0200 Message-Id: <20230717020446.28877-2-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20230717020446.28877-1-herdler@nurfuerspam.de> References: <20230717020446.28877-1-herdler@nurfuerspam.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:c/ZK7yJ5fXttFEUwq2gib9MSyLM4XdP7U6MYpRu+D3uo/ctcnmQ RoL6JLB9aNUAxD2/+jpAjE0wwBWAsZyljlSQNUdocJ5DxcTiowaHMBFHVJ37YXdieoXQ5/p qyimm0CPjONlj/lxf+iWTlZuSTv/iHc7MGC0xwKfFOF4i3qdpwrn5Rq3bMBllUppKQIE/nI PZWs9XWG6QorVAB7AZmRg== UI-OutboundReport: notjunk:1;M01:P0:/J+3w/1GjW8=;72GsUZVSOTEKi3XHgUIozaKHvpC 5iFKxNFnGulNDEp6AODpF99ZYrrLjL2kgVrDmbh6C88d/6Pg/zibiz+FVowQ9v59LMgddNmTP ptiePfn3CsMFbxVLcn+BsjNacvN2WApKv2K8t+hqN5rdZ8x2JOSfLaGYBeF7MKc9iyLyQb/yO 3WmsXara3RxaFC2C9Kkg7sUtCXl7EtTQWHYvuFMvlRvpd9Cak6QAtVKyKwULcX0vH38ACx5CN lNu7mm/YsilURMz2fNpdMlxn4UoN1v5Z7J5iei5wAJBR6pSoib2smCzL+so+QVZZP4yvTJWJB OYhHEoymnFru2VfRdFsUl/nu3tm034xkwWDPvEgGf6O5RJ8CdPnEg3IYZYZ6CR+H8AL6sXplQ F3KP4C0wybQeyRSoS84fvDinIBwIDGDjE6qy7EynjZF6LpBL54KjSHNtXWAAS2iXQU7PnPLka vvau9y8SpD03ZwIGsyNWkJpK9prOmrN8buCmuzV4r+CkNrKy8DhgMd0EokoiKeJiEmJsXlfxl jHV1Z+mHPLH1VdgZmxB5cByo6cpCOICcOzhlYq+ZJK55aHzlMS0TLWu0+hRDexm6C+dtiwKAz rDzoqXC7AnMUd49GvaLgV6dyj1nP1fJXgAEZmEQlDH+HVTHdk5GG6uwRX8SmmaARPl5TybZzf 6ZGzdU2h+DZN8NzzkV5/xASbPeuxAGC4tKbjzE4gshsGCO18w5ImYgeGZRzunuwPo+r4DBNMd 6Et1qmNewgf+iZvERHbyC3ikPrIgUD4m84lgqJlozaY24sLavkiCjDwHJnbxjss9fcr1bzDkf 82s+PlZTEmsC1+puM6PHnG32xB1N+CoCNAzHXaEkjvlS3W/EUterPv98Qy1a7EJC5xlYOPbS/ eCyHZawQks9SZZrQo7/zRVr9ebyDc1SgvVfHBcukuirdc1KuL9oVuSV+SZMz2zKhDn8XlEe9D KjiA2Ok2+De1ffn3p7lNymEb3lI= X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,NO_DNS_FOR_FROM,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_ABUSE_SURBL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -1.9 (-) X-LSpam-Report: No, score=-1.9 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,URIBL_ABUSE_SURBL=1.25,URIBL_WS_SURBL=1.608 autolearn=no autolearn_force=no Add new indexfile and link to it. Signed-off-by: Stefan Herdler --- >> +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later > > Please place it dual licensed with GFDL and GPL 2.0. Changed to GFDL OR GPL-2.0 like in "media/glossary.rst". GPL 2.0 is fine for me too, but the old documentation, my work is based on, was GFDL. Can we just change the license? That's not mine to judge. .../media/dvb/legacy_dvb_apis.rst | 1 + .../media/dvb/legacy_dvb_decoder_api.rst | 61 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 Documentation/userspace-api/media/dvb/legacy_dvb_decoder_api.rst -- 2.34.0 diff --git a/Documentation/userspace-api/media/dvb/legacy_dvb_apis.rst b/Documentation/userspace-api/media/dvb/legacy_dvb_apis.rst index b97d56ee543c..ffe8325749e5 100644 --- a/Documentation/userspace-api/media/dvb/legacy_dvb_apis.rst +++ b/Documentation/userspace-api/media/dvb/legacy_dvb_apis.rst @@ -23,3 +23,4 @@ DVB-S2, DVB-T2, ISDB, etc. :maxdepth: 1 frontend_legacy_dvbv3_api + legacy_dvb_decoder_api diff --git a/Documentation/userspace-api/media/dvb/legacy_dvb_decoder_api.rst b/Documentation/userspace-api/media/dvb/legacy_dvb_decoder_api.rst new file mode 100644 index 000000000000..f6e2f28b1fcb --- /dev/null +++ b/Documentation/userspace-api/media/dvb/legacy_dvb_decoder_api.rst @@ -0,0 +1,61 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later OR GPL-2.0 + +.. _legacy_dvb_decoder_api: + +============================ +Legacy DVB MPEG Decoder APIs +============================ + +.. _legacy_dvb_decoder_notes: + +General Notes +============= + +This API has originally been designed for DVB only and is therefore limited to +the :ref:`legacy_dvb_decoder_formats` used in such digital TV-broadcastsystems. + +To circumvent this limitations the more versatile :ref:`V4L2 ` API has +been designed. Which replaces this part of the DVB API. + +Nevertheless there have been projects build around this API. +To ensure compatibility this API is kept as it is. + +.. attention:: Do **not** use this API in new drivers! + + For audio and video use the :ref:`V4L2 ` and ALSA APIs. + + Pipelines should be set up using the :ref:`Media Controller API`. + +Practically the decoders seem to be treated differently. The application typically +knows which decoder is in use or it is specially written for one decoder type. +Querying capabilities are rarely used because they are already known. + + +.. _legacy_dvb_decoder_formats: + +Data Formats +============ + +The API has been designed for DVB and compatible broadcastsystems. +Because of that fact the only supported data formats are ISO/IEC 13818-1 +compatible MPEG streams. The supported payloads may vary depending on the +used decoder. + +Timestamps are always MPEG PTS as defined in ITU T-REC-H.222.0 / +ISO/IEC 13818-1, if not otherwise noted. + +For storing recordings typically TS streams are used, in lesser extent PES. +Both variants are commonly accepted for playback, but it may be driver dependent. + + + + +Table of Contents +================= + +.. toctree:: + :maxdepth: 2 + + legacy_dvb_video + legacy_dvb_audio + legacy_dvb_osd From patchwork Mon Jul 17 02:04:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 93216 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qLDcH-00HRbP-5h; Mon, 17 Jul 2023 02:05:38 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230354AbjGQCFf (ORCPT + 1 other); Sun, 16 Jul 2023 22:05:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230348AbjGQCFd (ORCPT ); Sun, 16 Jul 2023 22:05:33 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B1BF1 for ; Sun, 16 Jul 2023 19:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nurfuerspam.de; s=s31663417; t=1689559512; x=1690164312; i=herdler@nurfuerspam.de; bh=Ttj6vK0l2iFGMGEMKbeOwDXjBJWRYblOs9I8fDNjoyQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=oD7I/59+tYKZ8D0sfkQ9ZDxAlqTxjWnDzyKtNfX+4aFPM0hQ2QGmNJEVoZ+9U+MkqjVeshp 1ykpA1/JRRSV144g0wNMWl91fN1ZCYBTpW3fInXoZZVjl1XcKHdz4Z5yAO1bWVlmzAQaAXaRE B5f5U4TOs/9Lk5MR5PSdlPRAHIoRplzE/5GFSkiAIWw1nBES5K6jQ5EglIq8S/xhEUPhIH835 3cAbsugV07TLkudex9zcbDpyrgYDx4/x1xioNhxVufLCrvftF0NU0Z2+/MS7uM0Zff5E+QwRI oBRxVWZeofbJxlro0NuFqIYKAi4799Z6bddtytFrwwuOGtvuPV1Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([217.113.179.15]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MwwZX-1q2CaK40GR-00yU8a; Mon, 17 Jul 2023 04:05:12 +0200 From: Stefan Herdler To: Mauro Carvalho Chehab Cc: Hans Verkuil , linux-media@vger.kernel.org, Tomasz Maciej Nowak , Corinna Vinschen , Soeren Moch Subject: [PATCH v3 2/6] Add documentation for osd.h Date: Mon, 17 Jul 2023 04:04:42 +0200 Message-Id: <20230717020446.28877-3-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20230717020446.28877-1-herdler@nurfuerspam.de> References: <20230717020446.28877-1-herdler@nurfuerspam.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:3F01pS3IrE1s8X5obXmQ8aTjWjyYUMskEv8qmrFph/Yv6TeCP2b ayZROXMksXZxo1zIPsOKxvQAsTfKpQMKrXSxDnw5oFiNlR7YRGKL1fv1brCOWfVOj6k4kjI pCRqfio/64QiCP33wB/WN8zSKWfmNdope9m7rA471egsGYkZYGcc3qbQ9m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WGcB6K0bwkg2oGQTTQJo= X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,NO_DNS_FOR_FROM,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_ABUSE_SURBL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -1.9 (-) X-LSpam-Report: No, score=-1.9 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,URIBL_ABUSE_SURBL=1.25,URIBL_WS_SURBL=1.608 autolearn=no autolearn_force=no Add new documentation file for osd.h Signed-off-by: Stefan Herdler --- Everything is used by the AV7110 driver, except 3 OSD_Commands. Remarks has been placed there. That's probably the best solution. Removing would create a gap in the enumeration. Omitting in the documentation would make header and documentation inconsistent again. .../media/dvb/legacy_dvb_osd.rst | 883 ++++++++++++++++++ 1 file changed, 883 insertions(+) create mode 100644 Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst -- 2.34.0 diff --git a/Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst b/Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst new file mode 100644 index 000000000000..eb4754bb00d0 --- /dev/null +++ b/Documentation/userspace-api/media/dvb/legacy_dvb_osd.rst @@ -0,0 +1,883 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later OR GPL-2.0 + +.. c:namespace:: dtv.legacy.osd + +.. _dvb_osd: + +============== +DVB OSD Device +============== + +.. attention:: Do **not** use in new drivers! + See: :ref:`legacy_dvb_decoder_notes` + +The DVB OSD device controls the OnScreen-Display of the AV7110 based +DVB-cards with hardware MPEG2 decoder. It can be accessed through +``/dev/dvb/adapter?/osd0``. +Data types and ioctl definitions can be accessed by including +``linux/dvb/osd.h`` in your application. + +The OSD is not a frame-buffer like on many other cards. +It is a kind of canvas one can draw on. +The color-depth is limited depending on the memory size installed. +An appropriate palette of colors has to be set up. +The installed memory size can be identified with the `OSD_GET_CAPABILITY`_ +ioctl. + +OSD Data Types +============== + +OSD_Command +----------- + +Synopsis +~~~~~~~~ + +.. code-block:: c + + typedef enum { + /* All functions return -2 on "not open" */ + OSD_Close = 1, + OSD_Open, + OSD_Show, + OSD_Hide, + OSD_Clear, + OSD_Fill, + OSD_SetColor, + OSD_SetPalette, + OSD_SetTrans, + OSD_SetPixel, + OSD_GetPixel, + OSD_SetRow, + OSD_SetBlock, + OSD_FillRow, + OSD_FillBlock, + OSD_Line, + OSD_Query, + OSD_Test, + OSD_Text, + OSD_SetWindow, + OSD_MoveWindow, + OSD_OpenRaw, + } OSD_Command; + +Commands +~~~~~~~~ + +.. note:: All functions return -2 on "not open" + +.. flat-table:: + :header-rows: 1 + :stub-columns: 0 + + - .. + + - Command + + - | Used variables of ``struct`` `osd_cmd_t`_. + | Usage{variable} if alternative use. + + - :cspan:`2` Description + + + + - .. + + - ``OSD_Close`` + + - - + + - | Disables OSD and releases the buffers. + | Returns 0 on success. + + - .. + + - ``OSD_Open`` + + - | x0,y0,x1,y1, + | BitPerPixel[2/4/8]{color&0x0F}, + | mix[0..15]{color&0xF0} + + - | Opens OSD with this size and bit depth + | Returns 0 on success, + | -1 on DRAM allocation error, + | -2 on "already open". + + - .. + + - ``OSD_Show`` + + - - + + - | Enables OSD mode. + | Returns 0 on success. + + - .. + + - ``OSD_Hide`` + + - - + + - | Disables OSD mode. + | Returns 0 on success. + + - .. + + - ``OSD_Clear`` + + - - + + - | Sets all pixel to color 0. + | Returns 0 on success. + + - .. + + - ``OSD_Fill`` + + - color + + - | Sets all pixel to color . + | Returns 0 on success. + + - .. + + - ``OSD_SetColor`` + + - | color, + | R{x0},G{y0},B{x1}, + | opacity{y1} + + - | Set palette entry to , and apply + | R,G,B: 0..255 + | R=Red, G=Green, B=Blue + | opacity=0: pixel opacity 0% (only video pixel shows) + | opacity=1..254: pixel opacity as specified in header + | opacity=255: pixel opacity 100% (only OSD pixel shows) + | Returns 0 on success, -1 on error. + + - .. + + - ``OSD_SetPalette`` + + - | firstcolor{color}, + | lastcolor{x0},data + + - | Set a number of entries in the palette. + | Sets the entries "firstcolor" through "lastcolor" from the + array "data". + | Data has 4 byte for each color: + | R,G,B, and a opacity value: 0->transparent, 1..254->mix, + 255->pixel + + - .. + + - ``OSD_SetTrans`` + + - transparency{color} + + - | Sets transparency of mixed pixel (0..15). + | Returns 0 on success. + + - .. + + - ``OSD_SetPixel`` + + - x0,y0,color + + - | Sets pixel , to color number . + | Returns 0 on success, -1 on error. + + - .. + + - ``OSD_GetPixel`` + + - x0,y0 + + - | Returns color number of pixel ,, or -1. + | Command currently not supported by the AV7110! + + - .. + + - ``OSD_SetRow`` + + - x0,y0,x1,data + + - | Fills pixels x0,y through x1,y with the content of data[]. + | Returns 0 on success, -1 on clipping all pixel (no pixel + drawn). + + - .. + + - ``OSD_SetBlock`` + + - | x0,y0,x1,y1, + | increment{color}, + | data + + - | Fills pixels x0,y0 through x1,y1 with the content of data[]. + | Inc contains the width of one line in the data block, + | inc<=0 uses block width as line width. + | Returns 0 on success, -1 on clipping all pixel. + + - .. + + - ``OSD_FillRow`` + + - x0,y0,x1,color + + - | Fills pixels x0,y through x1,y with the color . + | Returns 0 on success, -1 on clipping all pixel. + + - .. + + - ``OSD_FillBlock`` + + - x0,y0,x1,y1,color + + - | Fills pixels x0,y0 through x1,y1 with the color . + | Returns 0 on success, -1 on clipping all pixel. + + - .. + + - ``OSD_Line`` + + - x0,y0,x1,y1,color + + - | Draw a line from x0,y0 to x1,y1 with the color . + | Returns 0 on success. + + - .. + + - ``OSD_Query`` + + - | x0,y0,x1,y1, + | xasp{color}; yasp=11 + + - | Fills parameters with the picture dimensions and the pixel + aspect ratio. + | Returns 0 on success. + | Command currently not supported by the AV7110! + + - .. + + - ``OSD_Test`` + + - - + + - | Draws a test picture. + | For debugging purposes only. + | Returns 0 on success. + - .. + + - ``OSD_Text`` + + - x0,y0,size,color,text + + - Draws a text at position x0,y0 with the color . + + - .. + + - ``OSD_SetWindow`` + + - x0 + + - Set window with number 0` chapter. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + - .. + + - ``EINVAL`` + + - Command is out of range. + + +----- + + +OSD_GET_CAPABILITY +------------------ + +Synopsis +~~~~~~~~ + +.. c:macro:: OSD_GET_CAPABILITY + +.. code-block:: c + + int ioctl(int fd, int request = OSD_GET_CAPABILITY, + struct osd_cap_t *cap) + +Arguments +~~~~~~~~~ + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + - .. + + - ``int fd`` + + - :cspan:`1` File descriptor returned by a previous call + to `open()`_. + + - .. + + - ``int request`` + + - Equals ``OSD_GET_CAPABILITY`` for this command. + + - .. + + - ``unsigned int *cap`` + + - Pointer to the location of the structure `osd_cap_t`_ for this + command. + +Description +~~~~~~~~~~~ + +.. attention:: Do **not** use in new drivers! + See: :ref:`legacy_dvb_decoder_notes` + +This ioctl is used to get the capabilities of the OSD of the AV7110 based +DVB-decoder-card in use. + +.. note:: + The structure osd_cap_t has to be setup by the user and passed to the + driver. + +Return Value +~~~~~~~~~~~~ + +On success 0 is returned, on error -1 and the ``errno`` variable is set +appropriately. The generic error codes are described at the +:ref:`Generic Error Codes ` chapter. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + + - .. + + - ``EINVAL`` + + - Unsupported capability. + + +----- + + +open() +------ + +Synopsis +~~~~~~~~ + +.. code-block:: c + + #include + +.. c:function:: int open(const char *deviceName, int flags) + +Arguments +~~~~~~~~~ + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + - .. + + - ``const char *deviceName`` + + - Name of specific OSD device. + + - .. + + - :rspan:`3` ``int flags`` + + - :cspan:`1` A bit-wise OR of the following flags: + + - .. + + - ``O_RDONLY`` + + - read-only access + + - .. + + - ``O_RDWR`` + + - read/write access + + - .. + + - ``O_NONBLOCK`` + - | Open in non-blocking mode + | (blocking mode is the default) + +Description +~~~~~~~~~~~ + +This system call opens a named OSD device (e.g. +``/dev/dvb/adapter?/osd0``) for subsequent use. + +Return Value +~~~~~~~~~~~~ + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + - .. + + - ``ENODEV`` + + - Device driver not loaded/available. + + - .. + + - ``EINTERNAL`` + + - Internal error. + + - .. + + - ``EBUSY`` + + - Device or resource busy. + + - .. + + - ``EINVAL`` + + - Invalid argument. + + +----- + + +close() +------- + +Synopsis +~~~~~~~~ + +.. c:function:: int close(int fd) + +Arguments +~~~~~~~~~ + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + - .. + + - ``int fd`` + + - :cspan:`1` File descriptor returned by a previous call + to `open()`_ . + +Description +~~~~~~~~~~~ + +This system call closes a previously opened OSD device. + +Return Value +~~~~~~~~~~~~ + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + - .. + + - ``EBADF`` + + - fd is not a valid open file descriptor. From patchwork Mon Jul 17 02:04:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Herdler X-Patchwork-Id: 93213 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qLDcD-00HRbP-1Y; Mon, 17 Jul 2023 02:05:33 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230340AbjGQCFa (ORCPT + 1 other); Sun, 16 Jul 2023 22:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbjGQCF3 (ORCPT ); Sun, 16 Jul 2023 22:05:29 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 245DC9D for ; Sun, 16 Jul 2023 19:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nurfuerspam.de; s=s31663417; t=1689559512; x=1690164312; i=herdler@nurfuerspam.de; bh=Kss5ubkzTmur5RmuyIrKijs5qjP5XaPUNd6sW7J8Q7M=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=TNU4q0t2LHYs4EfLv7+RxtwL33YAzF06fc75YlkUZVxSI0akTI7k1PTGG2VDQIFEE2IwdJU ls4Xz5aRF3lGDd5BV4poA21+qcFvwlqIC3CxwUG9NByusGgPQoxGOfgnkDY921gxRO+HmT1s7 V6kHQO00YpBz7J/EjtYWjsQPg8s5M0BSSpYlJmb4X/HSOD+S80btUYHNJsrz7UeQOrmeBxcjn 2P6Lfbcru7OEooEWI1Odx8Yh1iy7O0zZTM720I+SAWbYJu8jRJiEcuhtxH1aOOr3yhSt1MaKU Jtz7QRVUwt6uTQyW5RyjHaZUe2lxF0JcnSupb5GHmcESHZnGWvng== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from astro.haus ([217.113.179.15]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N7zBb-1pr9yN11b1-0153hc; Mon, 17 Jul 2023 04:05:12 +0200 From: Stefan Herdler To: Mauro Carvalho Chehab Cc: Hans Verkuil , linux-media@vger.kernel.org, Tomasz Maciej Nowak , Corinna Vinschen , Soeren Moch Subject: [PATCH v3 3/6] Add documentation for audio.h (data types) Date: Mon, 17 Jul 2023 04:04:43 +0200 Message-Id: <20230717020446.28877-4-herdler@nurfuerspam.de> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20230717020446.28877-1-herdler@nurfuerspam.de> References: <20230717020446.28877-1-herdler@nurfuerspam.de> MIME-Version: 1.0 X-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wmocVBWgJ2Kl1NPlEXF3 hk/oJMjm2uCW1jpES2slq+SqgzzdTjVwwXHke8yk1COyStfgG3R7GTwLakFPpbCTLnj014KpI dzGFEJlqSSpRS6set8ZqLGFe6RMpFbsZPNPKBZx2wcOSXRaXXkgoQ4xAbXB3/4+sofCo9csQ7 BqmVI/BZzdFimF55TKHT2kwOr4k= X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR,URIBL_ABUSE_SURBL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -1.9 (-) X-LSpam-Report: No, score=-1.9 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3,URIBL_ABUSE_SURBL=1.25,URIBL_WS_SURBL=1.608 autolearn=no autolearn_force=no Add new documentation file for audio.h Step 1: data types only Signed-off-by: Stefan Herdler --- .../media/dvb/legacy_dvb_audio.rst | 447 ++++++++++++++++++ 1 file changed, 447 insertions(+) create mode 100644 Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst -- 2.34.0 diff --git a/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst b/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst new file mode 100644 index 000000000000..4c994f8c97e5 --- /dev/null +++ b/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst @@ -0,0 +1,447 @@ +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later OR GPL-2.0 + +.. c:namespace:: dtv.legacy.audio + +.. _dvb_audio: + +================ +DVB Audio Device +================ + +.. attention:: Do **not** use in new drivers! + See: :ref:`legacy_dvb_decoder_notes` + +The DVB audio device controls the MPEG2 audio decoder of the DVB +hardware. It can be accessed through ``/dev/dvb/adapter?/audio?``. Data +types and ioctl definitions can be accessed by including +``linux/dvb/audio.h`` in your application. + +Please note that most DVB cards don’t have their own MPEG decoder, which +results in the omission of the audio and video device. + +These ioctls were also used by V4L2 to control MPEG decoders implemented +in V4L2. The use of these ioctls for that purpose has been made obsolete +and proper V4L2 ioctls or controls have been created to replace that +functionality. Use :ref:`V4L2 ioctls