All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Honza Petrouš" <jpetrous@gmail.com>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v2 00/26] Improve DVB documentation and reduce its gap
Date: Sun, 3 Sep 2017 22:05:23 +0200	[thread overview]
Message-ID: <CAJbz7-29pV9u0UZUC+sUtncsCbqbjNToA-yANJ7hExLRFw_tiQ@mail.gmail.com> (raw)
In-Reply-To: <cover.1504272067.git.mchehab@s-opensource.com>

> There is still a gap at the CA API, as there are three ioctls that are used
> only by a few drivers and whose structs are not properly documented:
> CA_GET_MSG, CA_SEND_MSG and CA_SET_DESCR.
>
> The first two ones seem to be related to a way that a few drivers
> provide to send/receive messages.

I never seen usage of such R/W ioctls, all drivers I have access to
are using read()/write() variant of communication.

Yet, I was unable to get what
> "index" and "type" means on those ioctls. The CA_SET_DESCR is
> only supported by av7110 driver, and has an even weirder
> undocumented struct. I was unable to discover at the Kernel, VDR
> or Kaffeine how those structs are filled. I suspect that there's
> something wrong there, but I won't risk trying to fix without
> knowing more about them. So, let's just document that those
> are needing documentation :-)
>


1) #define CA_SET_DESCR      _IOW('o', 134, ca_descr_t)
============================================

CA_SET_DESCR is used for feeding descrambler device
with correct keys (called here "control words") what
allows to get services unscrambled.

The best docu is:

"Digital Video Broadcasting (DVB);
Support for use of the DVB Scrambling Algorithm version 3
within digital broadcasting systems"

Defined as DVB Document A125 and publicly
available here:

https://www.dvb.org/resources/public/standards/a125_dvb-csa3.pdf


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

The 'index' is adress of the descrambler instance, as there exist
limited number of them (retieved by CA_GET_DESCR_INFO).
See below:


2) #define CA_SET_PID        _IOW('o', 135, ca_pid_t)
=======================================

The second ioctl was used to link particular PID with particular
descrambler, what means that all such pids (you are allowed
to create n-to-1 link), can be descrambled by one descrambler.

This is needed in case of multiservice descrambling, when
usually exist one key (control word) per one service (so all PIDs
for one service have to be linked with one descrambler)

Without this ioctl there is no way to address particular
descrambler and so no way to use more then ONE descrambler
per demux

/Honza

  parent reply	other threads:[~2017-09-03 20:05 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 13:24 [PATCH v2 00/26] Improve DVB documentation and reduce its gap Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 01/27] media: ca.h: split typedefs from structs Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 02/27] media: dmx.h: " Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 03/27] media: dvb/intro: use the term Digital TV to refer to the system Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 04/27] media: dvb/intro: update references for TV standards Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 05/27] media: dvb/intro: update the history part of the document Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 06/27] media: dvb/intro: adjust the notices about optional hardware Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 07/27] media: dvb/frontend.h: move out a private internal structure Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 08/27] media: dvb/frontend.h: document the uAPI file Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 09/27] media: dvb frontend docs: use kernel-doc documentation Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 10/27] media: fe_property_parameters.rst: better define properties usage Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 11/27] media: fe_property_parameters.rst: better document bandwidth Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 12/27] media: dmx.h: get rid of unused DMX_KERNEL_CLIENT Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 13/27] media: dmx.h: get rid of DMX_GET_CAPS Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 14/27] media: dmx.h: get rid of DMX_SET_SOURCE Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 15/27] media: dmx.h: get rid of GET_DMX_EVENT Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 16/27] media: dmx.h: add kernel-doc markups and use it at Documentation/ Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 17/27] media: net.rst: Fix the level of a section of the net chapter Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 18/27] media: ca.h: get rid of CA_SET_PID Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 19/27] media: ca.h: document most CA data types Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 20/27] media: dst_ca: return a proper error code from CA errors Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 21/27] media: ca-reset.rst: add some description to this ioctl Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 22/27] media: ca-get-cap.rst: document " Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 23/27] media: ca-get-slot-info.rst: " Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 24/27] media: ca-get-descr-info.rst: " Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 25/27] media: dvb CA docs: place undocumented data together with ioctls Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 26/27] media: dvb rst: identify the documentation gap at the API Mauro Carvalho Chehab
2017-09-01 13:24 ` [PATCH v2 27/27] media: dst_ca: remove CA_SET_DESCR boilerplate Mauro Carvalho Chehab
2017-09-03 20:05 ` Honza Petrouš [this message]
2017-09-04  0:54   ` [PATCH v2 00/26] Improve DVB documentation and reduce its gap Mauro Carvalho Chehab
2017-09-04  7:12     ` Honza Petrouš
2017-09-04  9:06       ` Mauro Carvalho Chehab
2017-09-04  9:40         ` Honza Petrouš
2017-09-04 11:46           ` Mauro Carvalho Chehab
2017-09-04  1:17   ` Mauro Carvalho Chehab
2017-09-03 20:31 ` Honza Petrouš

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJbz7-29pV9u0UZUC+sUtncsCbqbjNToA-yANJ7hExLRFw_tiQ@mail.gmail.com \
    --to=jpetrous@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@s-opensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.