From patchwork Mon Sep 4 12:15:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9937055 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D288F601EB for ; Mon, 4 Sep 2017 12:17:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C512B28796 for ; Mon, 4 Sep 2017 12:17:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5BA7287E8; Mon, 4 Sep 2017 12:17:08 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 7841328796 for ; Mon, 4 Sep 2017 12:17:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753554AbdIDMPl (ORCPT ); Mon, 4 Sep 2017 08:15:41 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:54628 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753493AbdIDMPi (ORCPT ); Mon, 4 Sep 2017 08:15:38 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 1BCDEA05EE; Mon, 4 Sep 2017 12:16:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 82B_Y49yt8Xb; Mon, 4 Sep 2017 12:16:05 +0000 (UTC) Received: from smtp.s-opensource.com (unknown [177.203.36.4]) by osg.samsung.com (Postfix) with ESMTPSA id 2314DA0C16; Mon, 4 Sep 2017 12:16:05 +0000 (UTC) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.89) (envelope-from ) id 1doqHt-0002At-PE; Mon, 04 Sep 2017 09:15:33 -0300 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Jonathan Corbet Subject: [PATCH 1/2] media: ca docs: document CA_SET_DESCR ioctl and structs Date: Mon, 4 Sep 2017 09:15:31 -0300 Message-Id: <25b64639e9b3c7880a64b20955174196c877fdb8.1504526763.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 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 The av7110 driver uses CA_SET_DESCR to store the descrambler control words at the CA descrambler slots. Document it. Thanks-to: Honza Petrouš Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/dvb/ca-set-descr.rst | 15 ++------------- include/uapi/linux/dvb/ca.h | 9 ++++++++- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Documentation/media/uapi/dvb/ca-set-descr.rst b/Documentation/media/uapi/dvb/ca-set-descr.rst index 9c484317d55c..a6c47205ffd8 100644 --- a/Documentation/media/uapi/dvb/ca-set-descr.rst +++ b/Documentation/media/uapi/dvb/ca-set-descr.rst @@ -28,22 +28,11 @@ Arguments ``msg`` Pointer to struct :c:type:`ca_descr`. -.. c:type:: ca_descr - -.. code-block:: c - - struct ca_descr { - unsigned int index; - unsigned int parity; - unsigned char cw[8]; - }; - - Description ----------- -.. note:: This ioctl is undocumented. Documentation is welcome. - +CA_SET_DESCR is used for feeding descrambler CA slots with descrambling +keys (refered as control words). Return Value ------------ diff --git a/include/uapi/linux/dvb/ca.h b/include/uapi/linux/dvb/ca.h index f66ed53f4dc7..a62ddf0cebcd 100644 --- a/include/uapi/linux/dvb/ca.h +++ b/include/uapi/linux/dvb/ca.h @@ -109,9 +109,16 @@ struct ca_msg { unsigned char msg[256]; }; +/** + * struct ca_descr - CA descrambler control words info + * + * @index: CA Descrambler slot + * @parity: control words parity, where 0 means even and 1 means odd + * @cw: CA Descrambler control words + */ struct ca_descr { unsigned int index; - unsigned int parity; /* 0 == even, 1 == odd */ + unsigned int parity; unsigned char cw[8]; };