From patchwork Tue Jan 22 11:27:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10775409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12678746 for ; Tue, 22 Jan 2019 11:27:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01F902A0C4 for ; Tue, 22 Jan 2019 11:27:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8DBF2A116; Tue, 22 Jan 2019 11:27:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8ECE02A0C4 for ; Tue, 22 Jan 2019 11:27:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727925AbfAVL1e (ORCPT ); Tue, 22 Jan 2019 06:27:34 -0500 Received: from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:35442 "EHLO lb3-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727825AbfAVL1e (ORCPT ); Tue, 22 Jan 2019 06:27:34 -0500 Received: from cobaltpc1.rd.cisco.com ([IPv6:2001:420:44c1:2579:b98b:fd77:97a1:d7fe]) by smtp-cloud8.xs4all.net with ESMTPA id luDHgEkLRNR5yluDMggn5J; Tue, 22 Jan 2019 12:27:32 +0100 From: hverkuil-cisco@xs4all.nl To: linux-media@vger.kernel.org Cc: Tomasz Figa , Alexandre Courbot , Hans Verkuil Subject: [PATCH 1/3] dev-effect.rst: remove unused Effect Interface chapter Date: Tue, 22 Jan 2019 12:27:25 +0100 Message-Id: <20190122112727.12662-2-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122112727.12662-1-hverkuil-cisco@xs4all.nl> References: <20190122112727.12662-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfK+BLhzTay+qM/EJVDBLM9OIozE9QYHLnYKt4RUAive1o3HB8/djI/0OwUVj/rRUwjzZMfWT5+N5HtODFONPSOW1qSrcw5fIc/iz7I/gtVz8LCpOwtlx IHIgOFWqmL7Jkt1Wy1qOJTob5MFRuZN2JNf2PgmKvQa3Adc5RVSTki4CLT16qZUDmh6/NOHtQdJyoqw47JXC7Mi5XeBG6kSIKHZAxt4xA4mWXJWyS1xJgLK9 Ozkethwcd0FypCOOIq3BDq8yl6SmZJwggrXvt3W9c4CeMbtX76JxwUXTX7qopIFuElynXBy1KaQwRkernaS/jb1p0DEUgpmJ0MNS8FaHiSshPOh5MFeu2SCU iGs/DMHYj1t2Jk3zg94sk5tSu9V8cQ== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil We never had an effect interface, and if you want to do such things you use the mem2mem interface instead. Just drop this from the spec. Signed-off-by: Hans Verkuil --- Documentation/media/uapi/v4l/dev-effect.rst | 28 --------------------- Documentation/media/uapi/v4l/devices.rst | 1 - 2 files changed, 29 deletions(-) delete mode 100644 Documentation/media/uapi/v4l/dev-effect.rst diff --git a/Documentation/media/uapi/v4l/dev-effect.rst b/Documentation/media/uapi/v4l/dev-effect.rst deleted file mode 100644 index b165e2c20910..000000000000 --- a/Documentation/media/uapi/v4l/dev-effect.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. Permission is granted to copy, distribute and/or modify this -.. document under the terms of the GNU Free Documentation License, -.. Version 1.1 or any later version published by the Free Software -.. Foundation, with no Invariant Sections, no Front-Cover Texts -.. and no Back-Cover Texts. A copy of the license is included at -.. Documentation/media/uapi/fdl-appendix.rst. -.. -.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections - -.. _effect: - -************************ -Effect Devices Interface -************************ - -.. note:: - This interface has been be suspended from the V4L2 API. - The implementation for such effects should be done - via mem2mem devices. - -A V4L2 video effect device can do image effects, filtering, or combine -two or more images or image streams. For example video transitions or -wipes. Applications send data to be processed and receive the result -data either with :ref:`read() ` and -:ref:`write() ` functions, or through the streaming I/O -mechanism. - -[to do] diff --git a/Documentation/media/uapi/v4l/devices.rst b/Documentation/media/uapi/v4l/devices.rst index 5dbe9d13b6e6..c959c0443c2f 100644 --- a/Documentation/media/uapi/v4l/devices.rst +++ b/Documentation/media/uapi/v4l/devices.rst @@ -22,7 +22,6 @@ Interfaces dev-output dev-osd dev-codec - dev-effect dev-raw-vbi dev-sliced-vbi dev-teletext From patchwork Tue Jan 22 11:27:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10775411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0045746 for ; Tue, 22 Jan 2019 11:27:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF4712A0C4 for ; Tue, 22 Jan 2019 11:27:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C39D32A116; Tue, 22 Jan 2019 11:27:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 360552A0C4 for ; Tue, 22 Jan 2019 11:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727983AbfAVL1g (ORCPT ); Tue, 22 Jan 2019 06:27:36 -0500 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:53268 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727883AbfAVL1f (ORCPT ); Tue, 22 Jan 2019 06:27:35 -0500 Received: from cobaltpc1.rd.cisco.com ([IPv6:2001:420:44c1:2579:b98b:fd77:97a1:d7fe]) by smtp-cloud8.xs4all.net with ESMTPA id luDHgEkLRNR5yluDMggn5Q; Tue, 22 Jan 2019 12:27:33 +0100 From: hverkuil-cisco@xs4all.nl To: linux-media@vger.kernel.org Cc: Tomasz Figa , Alexandre Courbot , Hans Verkuil Subject: [PATCH 2/3] dev-teletext.rst: remove obsolete teletext interface Date: Tue, 22 Jan 2019 12:27:26 +0100 Message-Id: <20190122112727.12662-3-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122112727.12662-1-hverkuil-cisco@xs4all.nl> References: <20190122112727.12662-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfG5q6KP95KxXngEDXX5VMAl59mpvVfTx5XWQPoXPmeCM9sdfED7+4qWRlqMyaXdzK9RK6144e6ZolMGDNrX3Y+HpgSsk5asQF3unHrzFLlVqbculImga 3SpYzyQe1FEMScdz7cZl6wBGxd7WKD0HLnPasXwOOhZGVo7DmTBeXkU5QCSUi5s5a18xALT2jTqUSPb1ANfAvnh7uEpDndUFEmROP/GHs07zPKpSfg0ROyne gJU3gwdlUxNQgfTpOSfbROiYsH3eNi0CGHapViCFaQYksClsi6KryvAoHViyUoEPAPW8re9RwlVK7OIZre+wN55YNQMRJiAXKGbOevD5FTbDvzVz5t8AkOGO 8qmejmQ6DLvT9bm277gASxD+ERgVfg== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil The teletext interface has been dead for years now, just remove it. Signed-off-by: Hans Verkuil --- Documentation/media/uapi/v4l/dev-teletext.rst | 41 ------------------- Documentation/media/uapi/v4l/devices.rst | 1 - 2 files changed, 42 deletions(-) delete mode 100644 Documentation/media/uapi/v4l/dev-teletext.rst diff --git a/Documentation/media/uapi/v4l/dev-teletext.rst b/Documentation/media/uapi/v4l/dev-teletext.rst deleted file mode 100644 index 35e8c4b35458..000000000000 --- a/Documentation/media/uapi/v4l/dev-teletext.rst +++ /dev/null @@ -1,41 +0,0 @@ -.. Permission is granted to copy, distribute and/or modify this -.. document under the terms of the GNU Free Documentation License, -.. Version 1.1 or any later version published by the Free Software -.. Foundation, with no Invariant Sections, no Front-Cover Texts -.. and no Back-Cover Texts. A copy of the license is included at -.. Documentation/media/uapi/fdl-appendix.rst. -.. -.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections - -.. _ttx: - -****************** -Teletext Interface -****************** - -This interface was aimed at devices receiving and demodulating Teletext -data [:ref:`ets300706`, :ref:`itu653`], evaluating the Teletext -packages and storing formatted pages in cache memory. Such devices are -usually implemented as microcontrollers with serial interface -(I\ :sup:`2`\ C) and could be found on old TV cards, dedicated Teletext -decoding cards and home-brew devices connected to the PC parallel port. - -The Teletext API was designed by Martin Buck. It was defined in the -kernel header file ``linux/videotext.h``, the specification is available -from -`ftp://ftp.gwdg.de/pub/linux/misc/videotext/ `__. -(Videotext is the name of the German public television Teletext -service.) - -Eventually the Teletext API was integrated into the V4L API with -character device file names ``/dev/vtx0`` to ``/dev/vtx31``, device -major number 81, minor numbers 192 to 223. - -However, teletext decoders were quickly replaced by more generic VBI -demodulators and those dedicated teletext decoders no longer exist. For -many years the vtx devices were still around, even though nobody used -them. So the decision was made to finally remove support for the -Teletext API in kernel 2.6.37. - -Modern devices all use the :ref:`raw ` or -:ref:`sliced` VBI API. diff --git a/Documentation/media/uapi/v4l/devices.rst b/Documentation/media/uapi/v4l/devices.rst index c959c0443c2f..d6fcf3db5909 100644 --- a/Documentation/media/uapi/v4l/devices.rst +++ b/Documentation/media/uapi/v4l/devices.rst @@ -24,7 +24,6 @@ Interfaces dev-codec dev-raw-vbi dev-sliced-vbi - dev-teletext dev-radio dev-rds dev-sdr From patchwork Tue Jan 22 11:27:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10775413 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83FE213B5 for ; Tue, 22 Jan 2019 11:27:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7416A2A0C4 for ; Tue, 22 Jan 2019 11:27:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 682F22A114; Tue, 22 Jan 2019 11:27:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D61E42A1E2 for ; Tue, 22 Jan 2019 11:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727946AbfAVL1g (ORCPT ); Tue, 22 Jan 2019 06:27:36 -0500 Received: from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:45740 "EHLO lb2-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727919AbfAVL1f (ORCPT ); Tue, 22 Jan 2019 06:27:35 -0500 Received: from cobaltpc1.rd.cisco.com ([IPv6:2001:420:44c1:2579:b98b:fd77:97a1:d7fe]) by smtp-cloud8.xs4all.net with ESMTPA id luDHgEkLRNR5yluDNggn5W; Tue, 22 Jan 2019 12:27:33 +0100 From: hverkuil-cisco@xs4all.nl To: linux-media@vger.kernel.org Cc: Tomasz Figa , Alexandre Courbot , Hans Verkuil Subject: [PATCH 3/3] Documentation/media: rename "Codec Interface" Date: Tue, 22 Jan 2019 12:27:27 +0100 Message-Id: <20190122112727.12662-4-hverkuil-cisco@xs4all.nl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122112727.12662-1-hverkuil-cisco@xs4all.nl> References: <20190122112727.12662-1-hverkuil-cisco@xs4all.nl> MIME-Version: 1.0 X-CMAE-Envelope: MS4wfG5q6KP95KxXngEDXX5VMAl59mpvVfTx5XWQPoXPmeCM9sdfED7+4qWRlqMyaXdzK9RK6144e6ZolMGDNrX3Y+HpgSsk5asQF3unHrzFLlVqbculImga 3SpYzyQe1FEMScdz7cZl6wBGxd7WKD0HLnPasXwOOhZGVo7DmTBeXkU5QCSUi5s5a18xALT2jTqUSPb1ANfAvnh7uEpDndUFEmROP/GHs07zPKpSfg0ROyne gJU3gwdlUxNQgfTpOSfbROiYsH3eNi0CGHapViCFaQYksClsi6KryvAoHViyUoEPAPW8re9RwlVK7OIZre+wN55YNQMRJiAXKGbOevD5FTbDvzVz5t8AkOGO 8qmejmQ6DLvT9bm277gASxD+ERgVfg== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: 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 --- .../media/uapi/mediactl/request-api.rst | 4 ++-- .../v4l/{dev-codec.rst => dev-mem2mem.rst} | 21 +++++++------------ Documentation/media/uapi/v4l/devices.rst | 2 +- .../media/uapi/v4l/pixfmt-compressed.rst | 2 +- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 2 +- 5 files changed, 13 insertions(+), 18 deletions(-) rename Documentation/media/uapi/v4l/{dev-codec.rst => dev-mem2mem.rst} (79%) diff --git a/Documentation/media/uapi/mediactl/request-api.rst b/Documentation/media/uapi/mediactl/request-api.rst index 4b25ad03f45a..1ad631e549fe 100644 --- a/Documentation/media/uapi/mediactl/request-api.rst +++ b/Documentation/media/uapi/mediactl/request-api.rst @@ -91,7 +91,7 @@ A request must contain at least one buffer, otherwise ``ENOENT`` is returned. A queued request cannot be modified anymore. .. caution:: - For :ref:`memory-to-memory devices ` you can use requests only for + For :ref:`memory-to-memory devices ` you can use requests only for output buffers, not for capture buffers. Attempting to add a capture buffer to a request will result in an ``EACCES`` error. @@ -152,7 +152,7 @@ if it had just been allocated. Example for a Codec Device -------------------------- -For use-cases such as :ref:`codecs `, the request API can be used +For use-cases such as :ref:`codecs `, the request API can be used to associate specific controls to be applied by the driver for the OUTPUT buffer, allowing user-space to queue many such buffers in advance. It can also take advantage of requests' diff --git a/Documentation/media/uapi/v4l/dev-codec.rst b/Documentation/media/uapi/v4l/dev-mem2mem.rst similarity index 79% rename from Documentation/media/uapi/v4l/dev-codec.rst rename to Documentation/media/uapi/v4l/dev-mem2mem.rst index b5e017c17834..69efcc747588 100644 --- a/Documentation/media/uapi/v4l/dev-codec.rst +++ b/Documentation/media/uapi/v4l/dev-mem2mem.rst @@ -7,11 +7,11 @@ .. .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections -.. _codec: +.. _mem2mem: -*************** -Codec Interface -*************** +******************************** +Video Memory To Memory Interface +******************************** A V4L2 codec can compress, decompress, transform, or otherwise convert video data from one format into another format, in memory. Typically @@ -25,19 +25,14 @@ memory) stream I/O. An application will have to setup the stream I/O for both sides and finally call :ref:`VIDIOC_STREAMON ` for both capture and output to start the codec. -Video compression codecs use the MPEG controls to setup their codec -parameters - -.. note:: - - The MPEG controls actually support many more codecs than - just MPEG. See :ref:`mpeg-controls`. +Video compression codecs use codec controls to setup their codec parameters. +See :ref:`mpeg-controls`. Memory-to-memory devices function as a shared resource: you can open the video node multiple times, each application setting up their -own codec properties that are local to the file handle, and each can use +own properties that are local to the file handle, and each can use it independently from the others. The driver will arbitrate access to -the codec and reprogram it whenever another file handler gets access. +the hardware and reprogram it whenever another file handler gets access. This is different from the usual video node behavior where the video properties are global to the device (i.e. changing something through one file handle is visible through another file handle). diff --git a/Documentation/media/uapi/v4l/devices.rst b/Documentation/media/uapi/v4l/devices.rst index d6fcf3db5909..07f8d047662b 100644 --- a/Documentation/media/uapi/v4l/devices.rst +++ b/Documentation/media/uapi/v4l/devices.rst @@ -21,7 +21,7 @@ Interfaces dev-overlay dev-output dev-osd - dev-codec + dev-mem2mem dev-raw-vbi dev-sliced-vbi dev-radio diff --git a/Documentation/media/uapi/v4l/pixfmt-compressed.rst b/Documentation/media/uapi/v4l/pixfmt-compressed.rst index e4c5e456df59..2675bef3eefe 100644 --- a/Documentation/media/uapi/v4l/pixfmt-compressed.rst +++ b/Documentation/media/uapi/v4l/pixfmt-compressed.rst @@ -73,7 +73,7 @@ Compressed Formats - 'MG2S' - MPEG-2 parsed slice data, as extracted from the MPEG-2 bitstream. This format is adapted for stateless video decoders that implement a - MPEG-2 pipeline (using the :ref:`codec` and :ref:`media-request-api`). + MPEG-2 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`). Metadata associated with the frame to decode is required to be passed through the ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS`` control and quantization matrices can optionally be specified through the diff --git a/Documentation/media/uapi/v4l/vidioc-qbuf.rst b/Documentation/media/uapi/v4l/vidioc-qbuf.rst index 3259168a7358..c138d149faea 100644 --- a/Documentation/media/uapi/v4l/vidioc-qbuf.rst +++ b/Documentation/media/uapi/v4l/vidioc-qbuf.rst @@ -123,7 +123,7 @@ then ``EINVAL`` will be returned. :ref:`VIDIOC_STREAMOFF ` or calling :ref:`VIDIOC_REQBUFS` the check for this will be reset. - For :ref:`memory-to-memory devices ` you can specify the + For :ref:`memory-to-memory devices ` you can specify the ``request_fd`` only for output buffers, not for capture buffers. Attempting to specify this for a capture buffer will result in an ``EACCES`` error.