From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AA04C76195 for ; Mon, 27 Mar 2023 18:28:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbjC0S2o (ORCPT ); Mon, 27 Mar 2023 14:28:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbjC0S2n (ORCPT ); Mon, 27 Mar 2023 14:28:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 196D64200 for ; Mon, 27 Mar 2023 11:28:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7D8D4B818BC for ; Mon, 27 Mar 2023 18:28:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEBAAC4339B; Mon, 27 Mar 2023 18:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679941715; bh=HpnRQKMV4N7xO+MCX4+Ry14MDDqkj8sStFclhUZ9b+U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JuhLu44V47oaiz8v6waJrw0DMP9pyOWH8rRyes7dvbsTJhEi26OsO9SGdHpd7QxQo JY4rYaWvyazPYuOdScH23VEhZ/iR+Ux5eGd+z1dW3XFpdP+jM8Zos3YuPMroPLcP3Y y4ISrJD1NO/H/NUcE+M/IK4zN98bBdqu8pFyMBD1ynd5GzB1/tYS6Bsik+W/uEQoek ubPcrSy0ikX2+aIWHw7cepwKuEe9HDobXEg/PATk2HTuHGOz8nV6mlZrX3bxu1s3we 8RRD0SgvYhZd+z5R8QiklABsSOmxp0wcQIyNT8JXuEVorGh9IEpwNeRQF1oWkznZk2 Kuq+SnVNu72bw== Date: Mon, 27 Mar 2023 19:28:26 +0100 From: Mauro Carvalho Chehab To: Stefan Herdler Cc: Hans Verkuil , linux-media@vger.kernel.org, Manu Abraham , Tomasz Maciej Nowak , Corinna Vinschen , Soeren Moch Subject: Re: [PATCH v2] Legacy DVB API: completion of documentation Message-ID: <20230327192826.65ae299d@sal.lan> In-Reply-To: References: <20ceeb7f-336a-b51c-8cc8-128cc9ebcd2e@xs4all.nl> <014db0ee-55fe-2966-a531-b8c23e97b402@web.de> <8fb1799b-5ed1-9d26-54fc-b47abe0c13cf@nurfuerspam.de> <014a6ade-dddb-6c0d-a59a-186e0b0aa3c2@nurfuerspam.de> <44cc2154-9224-510d-1f9c-34ae49f01c73@nurfuerspam.de> <026b1342-2b0f-f61d-ea33-63f3992d1473@nurfuerspam.de> <20230208100847.3ec87576@coco.lan> <99397771-409b-e487-e429-d5c9feb82209@nurfuerspam.de> <50f69514-abbb-2dfb-6060-889aa2c6e02c@nurfuerspam.de> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.36; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Em Sun, 26 Mar 2023 23:34:16 +0200 Stefan Herdler escreveu: > On 25/03/23 02:44, Stefan Herdler wrote: > > Hi Mauro and Hans, > > > > it took a little longer then anticipated, but I think I was able to fil= l the gaps in the documentation. Hmm.. your e-mailer seems to have mangled it: patch -p1 -i /tmp/dvb-doc.patch=20 patching file Documentation/userspace-api/media/dvb/legacy_dvb_apis.rst patching file '=3D' patch: **** malformed patch at line 198: , which Better to submit it via "git send-email". > > At least everything in the header-files is in the documentation now. I = hope, I have done it sufficiently. Good! It took me quite a while to read everything... At the end, as was a little tired, so I probably missed things. Next time, please split this on a patch series, in order to make easier for the poor reviewers to look into it ;-) > > > > Some remarks: > > > > I considered the existing documentation to be trustworthy. Please don't do that. The existing ones came from an old DVB API=20 documentation, plus some reverse engineering we did to try to understand missing bits. There are existing gaps there that we were not able to address (including some ioctls that has only a doc stub, if I'm not=20 mistaken - I guess we removed some of those, but maybe there are some stubs remaining somewhere). > > Existing things like returntypes, errnos, ... haven't been touched by m= e. Well, errnos are probably not too outdated. > > There are only a few minor modifications to reflect the data formats ac= tually used for playback. Ok. > > > > The documentation has been merged into one file per header-file. Entrie= s have been sorted equally. > > For me it is much better arranged this way, the mass of different files= where just to confusing and the > > original files have already been removed anyway. > > But I may revert that if necessary. No need to revert. > > > > Title and chapter-styles has been changed to the suggested ones in "/do= c-guide/sphinx.html#writing-documentation". > > > > There are still some "Duplicate C++ declaration, ..." warnings. Renamin= g doesn't work either: 'unknown option: "name"' Don't care about that. There's a known bug on Sphinx related to it since version 3.x (present at least until at least version 5). Basically, if a struct has the same name of a function, for instance, it will generate warnings. > > I haven't found any useful hint how to get rid of them. > > Should I switch to "code-block:: c" instead? > > But there are a lot of this warnings from other files too. It seems I'm= mot the only one with this problem. =20 > I switched to "code-block". > Now there are no warnings anymore. For things like ioctl, code-blocks are preferred. For other things, better to keep the warnings and not use code-block where not needed. The warnings are part of the Sphinx cross-reference system, which tries to create references to the C domain functions and data types. Unfortunately, Sphinx has a known bug that it is hit when the same symbol name is used with different meanings e.g., on C declarations like those: struct foo; enum foo; typedef foo; foo() {} Each one has a different type. So, `foo` cross-references depend on the context. Right now, Sphinx will just consider them to be attempts to re-define an existing name. There's already patches fixing it Sphinx upstream, but (last time I checked) not applied yet as those would cause regressions on intersphinx. > This functions shouldn't be referenced from outside this document anyway. No, we link the header files with the documentation, exactly to generate cross-references and detect gaps at the docs. > Lets hope, the robot likes it better this way :-). >=20 > Regards > Stefan >=20 > > > > > > Please point out, if something is missing, wrong or need to be improved= . I will try to fix it. > > > > Regards > > Stefan > > > > p.s. It is my first try to submit a patch this way. I hope my mail-clie= nt doesn't mess it up. > > =20 >=20 >=20 > This patch is largely based on the already existing documentation and the= header files >=20 >=20 > | Reported-by: kernel test robot > | Link: https://lore.kernel.org/oe-kbuild-all/202303251637.x35nzuXi-lkp@i= ntel.com/ >=20 >=20 > Signed-off-by: Stefan Herdler >=20 > 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 >=20 > frontend_legacy_dvbv3_api > + legacy_dvb_decoder_api > 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..b4f75643c21f > --- /dev/null > +++ b/Documentation/userspace-api/media/dvb/legacy_dvb_audio.rst > @@ -0,0 +1,1280 @@ > +.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later Please place it dual licensed with GFDL and GPL 2.0. > + > +.. _dvb_audio: > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +DVB Audio Device > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +.. 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=E2=80=99t have their own MPEG decode= r, 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