![]() |
DVBCore
22.11.0
Open Source DVB Engine
|
Application level CI Host Control functions. More...
#include <stdio.h>
#include <string.h>
#include "techtype.h"
#include "dbgfuncs.h"
#include "stbhwos.h"
#include "stberc.h"
#include "stbheap.h"
#include "ap_dbdef.h"
#include "ap_cntrl.h"
#include "stbci.h"
#include "stbcicc.h"
#include "ap_ci_int.h"
#include "ap_ci_support.h"
#include "ap_cihc.h"
Classes | |
struct | s_hc_status |
Macros | |
#define | DEBUG_HC |
#define | DBG_HC(x, ...) STB_SPDebugWrite( "%s:%d " x, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
#define | DBG_ERR(x, ...) STB_SPDebugWrite( "ERROR %s:%d" x, __FUNCTION__, __LINE__, ##__VA_ARGS__); |
#define | DTAG_DEL_SYS_DVBT 0x5a |
#define | DTAG_DEL_SYS_DVBT2 0x04 |
#define | DTAG_DEL_SYS_DVBC 0x44 |
#define | DTAG_DEL_SYS_DVBC2 0x0d |
#define | DTAG_DEL_SYS_DVBS 0x43 |
#define | DTAG_DEL_SYS_DVBS2 0x79 |
#define | DTAG_EXT_DESC 0x7f |
Typedefs | |
typedef struct s_hc_status | S_HC_STATUS |
Functions | |
void | ACI_HcInitialise (void) |
Initialise CI Host Control support. | |
void | ACI_HcNotifyHostControlSession (U32BIT module) |
This function is used by the CI stack to notify the host that a session with the host countrol resource has been opened by the module. This signals to the host that the module intends to request that the host tunes to other transport streams / services. Following this notification, the host must call the function STB_CIAskRelease to request that the module closes the session. The function STB_CIAskReleaseReply will be called to let the host know whether the control over the tuner has been released or not. More... | |
void | ACI_HcNotifyHostControlSessionClosed (U32BIT module) |
This function is used by the CI stack to notify the host that a session with the host control resource has been closed by the module. This signals to the host that it has controls over the tuner and it does not need to call STB_CIAskRelease before using it. Following this call, any PIDs that have been replaced by STB_CIReplace should be restored, if possible. More... | |
BOOLEAN | ACI_HcAskRelease (U32BIT module) |
Ask the module to restore replaced PIDs and to close the session with the host control resource. More... | |
void | ACI_HcAskReleaseReply (U32BIT module, U8BIT release_reply) |
This function is called by the CI+ stack to send the reply of a release request to the host. This function is called in response to a call to STB_CIAskRelease. The host must not assume that it has control over the tuner until this function is called. More... | |
void | ACI_HcTune (U32BIT module, U16BIT nid, U16BIT onid, U16BIT tsid, U16BIT sid) |
Handle Tune request from the CAM. More... | |
void | ACI_HcTuneBroadcastRequest (U32BIT module, U16BIT service_id, U16BIT desc_loop_len, U8BIT *desc_loop, U8BIT *pmt, E_CIP_TUNE_FLAGS flags) |
This function is used by the CI+ stack to request that the host tunes to a transport stream using the given parameters. If the service_id is zero, the host should not report a PMT using STB_CIUpdatePmt(). If the PMT is provided, it should be used when selecting elementary streams on the service. The PMT is not provided if service_id is zero. Following the tune operation (whether successful or not), the host must call the function STB_CITuneReply(). More... | |
void | ACI_HcTuneService (U32BIT module, void *s_ptr, E_CIP_TUNE_FLAGS flags) |
Handle tune to service request from the CAM. More... | |
BOOLEAN | ACI_HcTuneReply (U32BIT module, E_STB_CI_TUNE_STATUS status) |
Send status of tune operation to the CAM host control module. More... | |
Application level CI Host Control functions.
BOOLEAN ACI_HcAskRelease | ( | U32BIT | module | ) |
Ask the module to restore replaced PIDs and to close the session with the host control resource.
module | specifies module required |
void ACI_HcAskReleaseReply | ( | U32BIT | module, |
U8BIT | release_reply | ||
) |
This function is called by the CI+ stack to send the reply of a release request to the host. This function is called in response to a call to STB_CIAskRelease. The host must not assume that it has control over the tuner until this function is called.
module | specifies module required |
release_reply | the reply to the release request |
void ACI_HcNotifyHostControlSession | ( | U32BIT | module | ) |
This function is used by the CI stack to notify the host that a session with the host countrol resource has been opened by the module. This signals to the host that the module intends to request that the host tunes to other transport streams / services. Following this notification, the host must call the function STB_CIAskRelease to request that the module closes the session. The function STB_CIAskReleaseReply will be called to let the host know whether the control over the tuner has been released or not.
module | host control module |
void ACI_HcNotifyHostControlSessionClosed | ( | U32BIT | module | ) |
This function is used by the CI stack to notify the host that a session with the host control resource has been closed by the module. This signals to the host that it has controls over the tuner and it does not need to call STB_CIAskRelease before using it. Following this call, any PIDs that have been replaced by STB_CIReplace should be restored, if possible.
module | - host control module |
void ACI_HcTune | ( | U32BIT | module, |
U16BIT | nid, | ||
U16BIT | onid, | ||
U16BIT | tsid, | ||
U16BIT | sid | ||
) |
Handle Tune request from the CAM.
module | Host control module |
nid | network ID |
onid | original network ID |
tsid | transport stream ID |
sid | service ID |
void ACI_HcTuneBroadcastRequest | ( | U32BIT | module, |
U16BIT | service_id, | ||
U16BIT | desc_loop_len, | ||
U8BIT * | desc_loop, | ||
U8BIT * | pmt, | ||
E_CIP_TUNE_FLAGS | flags | ||
) |
This function is used by the CI+ stack to request that the host tunes to a transport stream using the given parameters. If the service_id is zero, the host should not report a PMT using STB_CIUpdatePmt(). If the PMT is provided, it should be used when selecting elementary streams on the service. The PMT is not provided if service_id is zero. Following the tune operation (whether successful or not), the host must call the function STB_CITuneReply().
module | host control module |
service_id | the service to tune to |
desc_loop_len | length of descriptor loop in bytes |
desc_loop | the descriptor loop |
pmt | the PMT to use (or NULL) |
flags | flags to pass to presentation engine |
BOOLEAN ACI_HcTuneReply | ( | U32BIT | module, |
E_STB_CI_TUNE_STATUS | status | ||
) |
Send status of tune operation to the CAM host control module.
module | host control module |
status | tune operation status |
void ACI_HcTuneService | ( | U32BIT | module, |
void * | s_ptr, | ||
E_CIP_TUNE_FLAGS | flags | ||
) |
Handle tune to service request from the CAM.
module | Host control module |
s_ptr | service |
flags | flags to pass to presentation engine |