drm/nouveau: consume the return of large GSP message
[drm/drm-misc.git] / include / uapi / linux / dvb / ca.h
blob4244b187cc4d00986703ca0cef5241b022a38ea3
1 /* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
2 /*
3 * ca.h
5 * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de>
6 * & Marcus Metzler <marcus@convergence.de>
7 * for convergence integrated media GmbH
8 */
10 #ifndef _DVBCA_H_
11 #define _DVBCA_H_
13 /**
14 * struct ca_slot_info - CA slot interface types and info.
16 * @num: slot number.
17 * @type: slot type.
18 * @flags: flags applicable to the slot.
20 * This struct stores the CA slot information.
22 * @type can be:
24 * - %CA_CI - CI high level interface;
25 * - %CA_CI_LINK - CI link layer level interface;
26 * - %CA_CI_PHYS - CI physical layer level interface;
27 * - %CA_DESCR - built-in descrambler;
28 * - %CA_SC -simple smart card interface.
30 * @flags can be:
32 * - %CA_CI_MODULE_PRESENT - module (or card) inserted;
33 * - %CA_CI_MODULE_READY - module is ready for usage.
36 struct ca_slot_info {
37 int num;
38 int type;
39 #define CA_CI 1
40 #define CA_CI_LINK 2
41 #define CA_CI_PHYS 4
42 #define CA_DESCR 8
43 #define CA_SC 128
45 unsigned int flags;
46 #define CA_CI_MODULE_PRESENT 1
47 #define CA_CI_MODULE_READY 2
51 /**
52 * struct ca_descr_info - descrambler types and info.
54 * @num: number of available descramblers (keys).
55 * @type: type of supported scrambling system.
57 * Identifies the number of descramblers and their type.
59 * @type can be:
61 * - %CA_ECD - European Common Descrambler (ECD) hardware;
62 * - %CA_NDS - Videoguard (NDS) hardware;
63 * - %CA_DSS - Distributed Sample Scrambling (DSS) hardware.
65 struct ca_descr_info {
66 unsigned int num;
67 unsigned int type;
68 #define CA_ECD 1
69 #define CA_NDS 2
70 #define CA_DSS 4
73 /**
74 * struct ca_caps - CA slot interface capabilities.
76 * @slot_num: total number of CA card and module slots.
77 * @slot_type: bitmap with all supported types as defined at
78 * &struct ca_slot_info (e. g. %CA_CI, %CA_CI_LINK, etc).
79 * @descr_num: total number of descrambler slots (keys)
80 * @descr_type: bitmap with all supported types as defined at
81 * &struct ca_descr_info (e. g. %CA_ECD, %CA_NDS, etc).
83 struct ca_caps {
84 unsigned int slot_num;
85 unsigned int slot_type;
86 unsigned int descr_num;
87 unsigned int descr_type;
90 /**
91 * struct ca_msg - a message to/from a CI-CAM
93 * @index: unused
94 * @type: unused
95 * @length: length of the message
96 * @msg: message
98 * This struct carries a message to be send/received from a CI CA module.
100 struct ca_msg {
101 unsigned int index;
102 unsigned int type;
103 unsigned int length;
104 unsigned char msg[256];
108 * struct ca_descr - CA descrambler control words info
110 * @index: CA Descrambler slot
111 * @parity: control words parity, where 0 means even and 1 means odd
112 * @cw: CA Descrambler control words
114 struct ca_descr {
115 unsigned int index;
116 unsigned int parity;
117 unsigned char cw[8];
120 #define CA_RESET _IO('o', 128)
121 #define CA_GET_CAP _IOR('o', 129, struct ca_caps)
122 #define CA_GET_SLOT_INFO _IOR('o', 130, struct ca_slot_info)
123 #define CA_GET_DESCR_INFO _IOR('o', 131, struct ca_descr_info)
124 #define CA_GET_MSG _IOR('o', 132, struct ca_msg)
125 #define CA_SEND_MSG _IOW('o', 133, struct ca_msg)
126 #define CA_SET_DESCR _IOW('o', 134, struct ca_descr)
128 #if !defined(__KERNEL__)
130 /* This is needed for legacy userspace support */
131 typedef struct ca_slot_info ca_slot_info_t;
132 typedef struct ca_descr_info ca_descr_info_t;
133 typedef struct ca_caps ca_caps_t;
134 typedef struct ca_msg ca_msg_t;
135 typedef struct ca_descr ca_descr_t;
137 #endif
140 #endif