Documentation/userspace-api/media/dvb/ca_high_level.rst

Source file repositories/reference/linux-study-clean/Documentation/userspace-api/media/dvb/ca_high_level.rst

File Facts

System
Linux kernel
Corpus path
Documentation/userspace-api/media/dvb/ca_high_level.rst
Extension
.rst
Size
4724 bytes
Lines
158
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. SPDX-License-Identifier: GPL-2.0

The High level CI API
=====================

.. note::

   This documentation is outdated.

This document describes the high level CI API as in accordance to the
Linux DVB API.


With the High Level CI approach any new card with almost any random
architecture can be implemented with this style, the definitions
inside the switch statement can be easily adapted for any card, thereby
eliminating the need for any additional ioctls.

The disadvantage is that the driver/hardware has to manage the rest. For
the application programmer it would be as simple as sending/receiving an
array to/from the CI ioctls as defined in the Linux DVB API. No changes
have been made in the API to accommodate this feature.


Why the need for another CI interface?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is one of the most commonly asked question. Well a nice question.
Strictly speaking this is not a new interface.

The CI interface is defined in the DVB API in ca.h as:

.. code-block:: c

	typedef struct ca_slot_info {
		int num;               /* slot number */

		int type;              /* CA interface this slot supports */
	#define CA_CI            1     /* CI high level interface */
	#define CA_CI_LINK       2     /* CI link layer level interface */
	#define CA_CI_PHYS       4     /* CI physical layer level interface */
	#define CA_DESCR         8     /* built-in descrambler */
	#define CA_SC          128     /* simple smart card interface */

		unsigned int flags;
	#define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */
	#define CA_CI_MODULE_READY   2
	} ca_slot_info_t;

This CI interface follows the CI high level interface, which is not
implemented by most applications. Hence this area is revisited.

This CI interface is quite different in the case that it tries to
accommodate all other CI based devices, that fall into the other categories.

This means that this CI interface handles the EN50221 style tags in the
Application layer only and no session management is taken care of by the
application. The driver/hardware will take care of all that.

This interface is purely an EN50221 interface exchanging APDU's. This
means that no session management, link layer or a transport layer do
exist in this case in the application to driver communication. It is
as simple as that. The driver/hardware has to take care of that.

With this High Level CI interface, the interface can be defined with the
regular ioctls.

All these ioctls are also valid for the High level CI interface

#define CA_RESET          _IO('o', 128)

Annotation

Implementation Notes