Skip to content

Commit 7e6854a

Browse files
committed
media: ca.h: document ca_msg and the corresponding ioctls
Usually, CA messages are sent/received via reading/writing at the CA device node. However, two drivers (dst_ca and firedtv-ci) also implement it via ioctls. Apparently, on both cases, the net result is the same. Anyway, let's document it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
1 parent bd9049e commit 7e6854a

3 files changed

Lines changed: 21 additions & 15 deletions

File tree

Documentation/media/uapi/dvb/ca-get-msg.rst

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,15 @@ Arguments
2828
``msg``
2929
Pointer to struct :c:type:`ca_msg`.
3030
31-
.. c:type:: ca_msg
32-
33-
.. code-block:: c
34-
35-
/* a message to/from a CI-CAM */
36-
struct ca_msg {
37-
unsigned int index;
38-
unsigned int type;
39-
unsigned int length;
40-
unsigned char msg[256];
41-
};
42-
4331
Description
4432
-----------
4533
46-
.. note:: This ioctl is undocumented. Documentation is welcome.
34+
Receives a message via a CI CA module.
35+
36+
.. note::
37+
38+
Please notice that, on most drivers, this is done by reading from
39+
the /dev/adapter?/ca? device node.
4740
4841
4942
Return Value

Documentation/media/uapi/dvb/ca-send-msg.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ Arguments
3232
Description
3333
-----------
3434
35-
.. note:: This ioctl is undocumented. Documentation is welcome.
35+
Sends a message via a CI CA module.
3636
37+
.. note::
38+
39+
Please notice that, on most drivers, this is done by writing
40+
to the /dev/adapter?/ca? device node.
3741
3842
Return Value
3943
------------

include/uapi/linux/dvb/ca.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,16 @@ struct ca_caps {
101101
unsigned int descr_type;
102102
};
103103

104-
/* a message to/from a CI-CAM */
104+
/**
105+
* struct ca_msg - a message to/from a CI-CAM
106+
*
107+
* @index: unused
108+
* @type: unused
109+
* @length: length of the message
110+
* @msg: message
111+
*
112+
* This struct carries a message to be send/received from a CI CA module.
113+
*/
105114
struct ca_msg {
106115
unsigned int index;
107116
unsigned int type;

0 commit comments

Comments
 (0)