77 #define AP_CI_PRINT(x) STB_SPDebugWrite x 79 #define AP_CI_PRINT(x) 82 #define MAX_EVENTS 100 84 #define TASK_STACK_SIZE 4096 85 #define TASK_PRIORITY 11 91 CIPLUS_TUNE_TYPE_SERVICE,
92 CIPLUS_TUNE_TYPE_TRANSPORT,
93 CIPLUS_TUNE_TYPE_CI_SERVICE
99 E_ACTL_SI_SRCH_REQD reqd_si;
105 E_ACTL_SI_SRCH_REQD reqd_si;
112 E_CIPLUS_TUNE_TYPE type;
113 E_CIP_TUNE_FLAGS flags;
124 static U8BIT cam_upgrade_mode = STB_CI_UPGRADE_REPLY_ASK;
125 static E_CIP_START_OPERATOR_SEARCH operator_search_mode = CIP_START_OPERATOR_SEARCH_ASK;
126 static BOOLEAN operator_search_required = FALSE;
127 static U32BIT operator_search_module;
128 static void *operator_search_service = NULL;
129 static void *ciplus_event_queue = NULL;
141 static void ApplyUsageRules(U8BIT path,
void *s_ptr)
147 U8BIT uri[CIP_URI_LEN] = { 0 };
149 FUNCTION_START(ApplyUsageRules);
151 AP_CI_PRINT((
"[ACI] ApplyUsageRules: path=%d, service_id=0x%x", path,
ADB_GetServiceId(s_ptr)));
158 AP_CI_PRINT((
"[ACI] Slot %u is used on path", slot_id));
164 AP_CI_PRINT((
"[ACI] Service scrambled, CAS supported, CI+ CAM"));
174 FUNCTION_FINISH(ApplyUsageRules);
182 static void UpdateRecordingURI(U8BIT path,
void *s_ptr)
189 U8BIT uri[CIP_URI_LEN] = { 0 };
191 FUNCTION_START(UpdateRecordingURI);
193 AP_CI_PRINT((
"[ACI] UpdateRecordingURI: path = %d", path));
198 AP_CI_PRINT((
"[ACI] Recording on the path"));
202 AP_CI_PRINT((
"[ACI] Slot %u used for recording", slot_id));
208 AP_CI_PRINT((
"[ACI] URI stored with recording"));
211 STB_PVRRecordingAddURI(rec_handle, uri);
216 FUNCTION_FINISH(UpdateRecordingURI);
223 static void OperatorSearchFinished(
void)
227 FUNCTION_START(OperatorSearchFinished);
239 if (operator_search_service != NULL)
242 operator_search_service = NULL;
245 FUNCTION_FINISH(OperatorSearchFinished);
252 static void ApplyCCKeys(U8BIT slot_id)
259 FUNCTION_START(ApplyCCKeys);
260 AP_CI_PRINT((
"[ACI] ApplyCCKeys(%u)", slot_id));
265 path = INVALID_RES_ID;
280 FUNCTION_FINISH(ApplyCCKeys);
283 static void ReleaseCISlotFromPath(U8BIT path)
287 U8BIT other, slot_id;
289 FUNCTION_START(ReleaseCISlotFromPath);
299 if (other != INVALID_RES_ID)
311 STB_CI_MODE_WATCH_AND_BUFFER : STB_CI_MODE_UNATTENDED_RECORDING, service_id);
317 FUNCTION_FINISH(ReleaseCISlotFromPath);
324 static void CISlotRemoved(U8BIT slot_id)
327 FUNCTION_START(CISlotRemoved);
328 if (slot_id != INVALID_RES_ID)
331 path = INVALID_RES_ID;
341 FUNCTION_FINISH(CISlotRemoved);
348 static void CISlotStatusChanged(U8BIT slot_id)
352 U8BIT *pmt_data, *ci_prot;
355 FUNCTION_START(CISlotStatusChanged);
357 if (slot_id != INVALID_RES_ID)
359 AP_CI_PRINT((
"CISlotStatusChanged(%u)", slot_id));
365 if (path != INVALID_RES_ID)
369 path = INVALID_RES_ID;
375 ci_prot = ADB_GetServiceCIProtectionDesc(s_ptr);
379 ReleaseCISlotFromPath(path);
420 path = INVALID_RES_ID;
424 ReleaseCISlotFromPath(path);
429 FUNCTION_FINISH(CISlotStatusChanged);
438 static void RecordLicenceChanged(U8BIT path, U8BIT slot_id)
441 U8BIT cicam_id[CIP_CICAM_ID_LEN];
442 E_STB_CI_LICENSE_RCVD_STATUS status;
445 U8BIT licence_status;
449 U8BIT uri[CIP_URI_LEN];
451 FUNCTION_START(RecordLicenceChanged);
455 AP_CI_PRINT((
"%s(path=%u, slot=%u): Updating recording 0x%08lx", __FUNCTION__, path,
458 status = STB_CI_LICENSE_RCVD_OK;
460 if (STB_CIGetCicamId(slot_id, cicam_id))
463 if (!STB_PVRRecordingSetCicamId(handle, cicam_id,
sizeof(cicam_id)))
465 status = STB_CI_LICENSE_RCVD_HOST_ERROR;
469 if (status == STB_CI_LICENSE_RCVD_OK)
480 if (licence_status == STB_CI_LICENSE_OK)
504 AP_CI_PRINT((
"%s(%u, %u): Adding URI to recording 0x%08lx", __FUNCTION__, path,
507 if (!STB_PVRRecordingAddURI(handle, uri))
509 status = STB_CI_LICENSE_RCVD_HOST_ERROR;
510 AP_CI_PRINT((
"%s(%u, %u): Failed to save URI with recording 0x%08lx",
511 __FUNCTION__, path, slot_id, handle));
518 AP_CI_PRINT((
"%s(%u, %u): Adding licence, len %u, to recording 0x%08lx", __FUNCTION__,
519 path, slot_id, licence_len, handle));
521 if ((status == STB_CI_LICENSE_RCVD_OK) &&
522 !STB_PVRRecordingAddLicence(handle, licence, licence_len))
524 status = STB_CI_LICENSE_RCVD_HOST_ERROR;
525 AP_CI_PRINT((
"%s(%u, %u): Failed to save licence with recording 0x%08lx",
526 __FUNCTION__, path, slot_id, handle));
531 status = STB_CI_LICENSE_RCVD_HOST_ERROR;
532 AP_CI_PRINT((
"%s(%u, %u): Failed to get licence data from slot", __FUNCTION__, path, slot_id));
537 STB_CISendLicenseReceivedStatus(slot_id, status);
540 FUNCTION_FINISH(RecordLicenceChanged);
548 static void PlaybackLicenceChanged(U8BIT slot_id)
552 U8BIT cicam_id[CIP_CICAM_ID_LEN];
553 E_STB_CI_LICENSE_RCVD_STATUS status;
556 U8BIT licence_status;
557 U8BIT uri[CIP_URI_LEN];
559 FUNCTION_START(PlaybackLicenceChanged);
567 if (STB_PVRRecordingGetCicamId(handle, cicam_id,
sizeof(cicam_id)))
571 AP_CI_PRINT((
"%s(slot=%u): Playback path %u, recording 0x%08lx", __FUNCTION__, slot_id, path, handle));
576 if (!STB_PVRRecordingUpdateURI(handle, uri) ||
577 !STB_PVRRecordingUpdateLicence(handle, licence, licence_len))
579 status = STB_CI_LICENSE_RCVD_HOST_ERROR;
583 if (licence_status != STB_CI_LICENSE_OK)
588 AP_CI_PRINT((
"%s(%u): Licence status %u", __FUNCTION__, path, licence_status));
589 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_CI, EV_TYPE_CI_PLAYBACK_LICENCE_STATUS,
590 &licence_status,
sizeof(licence_status));
598 status = STB_CI_LICENSE_RCVD_OK;
603 status = STB_CI_LICENSE_RCVD_HOST_ERROR;
608 status = STB_CI_LICENSE_RCVD_INVALID_DATA;
613 status = STB_CI_LICENSE_RCVD_HOST_ERROR;
614 AP_CI_PRINT((
"%s(%u): Failed to read CICAM id from recording 0x%08lx", __FUNCTION__,
619 STB_CISendLicenseReceivedStatus(slot_id, status);
622 FUNCTION_FINISH(PlaybackLicenceChanged);
631 static void RecordPin(U8BIT path, U8BIT slot_id)
634 U8BIT cicam_id[CIP_CICAM_ID_LEN];
637 U8BIT *pin_private_data;
639 U8BIT hour, min, secs;
641 FUNCTION_START(RecordPin);
645 AP_CI_PRINT((
"%s(%u): Updating recording 0x%08lx", __FUNCTION__, path, handle));
647 if (STB_CIGetCicamId(slot_id, cicam_id))
650 STB_PVRRecordingSetCicamId(handle, cicam_id,
sizeof(cicam_id));
654 &date_code, &hour, &min, &secs))
658 if (status != STB_CI_PIN_CONTENT_SCRAMBLED)
660 STB_PVRRecordingAddPin(handle, age_rating, pin_private_data,
661 date_code, hour, min, secs);
666 FUNCTION_FINISH(RecordPin);
675 static void CIPlusEventHandler(U32BIT event_code,
void *event_data, U32BIT event_size)
680 FUNCTION_START(CIPlusEventHandler);
684 if ((event_data != NULL) && (event_size > 0))
689 memcpy(event_info.data, event_data, event_size);
690 event_info.data_size = event_size;
699 event_info.data = NULL;
700 event_info.data_size = 0;
705 event_info.event_code = event_code;
711 FUNCTION_FINISH(CIPlusEventHandler);
714 static void CIPlusEventTask(
void *param)
723 U8BIT *ciplus_pmt = NULL;
725 U16BIT onet_id, trans_id, serv_id;
727 FUNCTION_START(CIPlusEventTask);
728 USE_UNWANTED_PARAM(param);
734 switch (event_info.event_code)
736 case STB_EVENT_CI_SLOT_STATUS_CHANGED:
738 CISlotStatusChanged(*(U8BIT *)event_info.data);
742 case STB_EVENT_CI_REMOVE:
744 CISlotRemoved(*(U8BIT *)event_info.data);
748 case STB_EVENT_CI_URI_CHANGED:
750 slot_id = *(U8BIT *)event_info.data;
754 path = INVALID_RES_ID;
762 case STB_EVENT_CI_KEYS_CHANGED:
764 slot_id = *(U8BIT *)event_info.data;
766 ApplyCCKeys(slot_id);
770 case STB_EVENT_CI_RECORD_LICENCE_CHANGED:
772 slot_id = *(U8BIT *)event_info.data;
776 path = INVALID_RES_ID;
779 RecordLicenceChanged(path, slot_id);
784 case STB_EVENT_CI_RECORD_PIN:
786 slot_id = *(U8BIT *)event_info.data;
790 path = INVALID_RES_ID;
793 RecordPin(path, slot_id);
798 case STB_EVENT_CI_PLAYBACK_LICENCE_CHANGED:
800 PlaybackLicenceChanged(*(U8BIT *)event_info.data);
804 case STB_EVENT_CI_PLAYBACK_BLANK_VIDEO:
811 case STB_EVENT_CI_PLAYBACK_PIN_STATUS:
813 switch (*(E_STB_CI_PIN_STATUS *)event_info.data)
815 case STB_CI_PIN_CODE_CORRECT:
816 case STB_CI_PIN_BLANK_NOT_REQUIRED:
832 case STB_EVENT_CI_TUNE_REQUEST:
835 if (tune_data != NULL)
837 owner_info.owner = RES_OWNER_CIPLUS;
838 owner_info.data = &tune_data->module;
839 owner_info.data_size =
sizeof(tune_data->module);
841 switch (tune_data->type)
843 case CIPLUS_TUNE_TYPE_TRANSPORT:
847 if (NotifyStartTuning != NULL)
849 NotifyStartTuning(tune_data->module, onet_id, trans_id, 0, tune_data->flags);
852 AP_CI_PRINT((
"%s: CIPLUS_TUNE_TYPE_TRANSPORT", __FUNCTION__));
855 APP_SI_MODE_NO_SI, TRUE);
859 case CIPLUS_TUNE_TYPE_SERVICE:
862 if (NotifyStartTuning != NULL)
864 NotifyStartTuning(tune_data->module, onet_id, trans_id, serv_id, tune_data->flags);
867 AP_CI_PRINT((
"%s: CIPLUS_TUNE_TYPE_SERVICE", __FUNCTION__));
869 ACTL_TuneToService(INVALID_RES_ID, &owner_info, tune_data->u.service.s_ptr, FALSE, TRUE);
873 case CIPLUS_TUNE_TYPE_CI_SERVICE:
876 if (NotifyStartTuning != NULL)
878 NotifyStartTuning(tune_data->module, onet_id, trans_id, serv_id, tune_data->flags);
881 AP_CI_PRINT((
"%s: CIPLUS_TUNE_TYPE_CI_SERVICE", __FUNCTION__));
882 if (ciplus_pmt != NULL)
888 if (tune_data->u.service.pmt != NULL)
895 ciplus_pmt = tune_data->u.service.pmt;
898 ACTL_TuneToCIService(INVALID_RES_ID, &owner_info, tune_data->u.service.s_ptr,
899 tune_data->u.service.reqd_si);
907 case APP_EVENT_CIPLUS_TUNE_COMPLETED:
909 path = *(U8BIT *)event_info.data;
912 ACI_TuneReply(path, *(U32BIT *)owner_data, CIP_TUNER_LOCKED);
915 if (ciplus_pmt != NULL)
931 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_APPLICATION, EV_SERVICE_CHANGED,
932 &serv_ptr,
sizeof(
void *));
938 case STB_EVENT_CI_RELEASE_REPLY:
941 if (reply_data != NULL)
943 AP_CI_PRINT((
"%s: STB_EVENT_CI_RELEASE_REPLY %u", __FUNCTION__, reply_data->reply));
944 if (reply_data->reply == 0)
946 ACTL_ContinueCIPLUSTune(reply_data->path, TRUE);
950 ACTL_ContinueCIPLUSTune(reply_data->path, FALSE);
956 case STB_EVENT_CI_OPERATOR_SEARCH_FINISHED:
958 OperatorSearchFinished();
962 case STB_EVENT_CI_RECORD_START:
964 APVR_CIRecordReplyReceived(TRUE, *(U8BIT *)event_info.data);
968 case STB_EVENT_CI_RECORD_START_FAILED:
970 APVR_CIRecordReplyReceived(FALSE, *(U8BIT *)event_info.data);
980 if (event_info.data != NULL)
987 FUNCTION_FINISH(CIPlusEventTask);
997 STB_OSCreateTask(CIPlusEventTask, NULL, TASK_STACK_SIZE, TASK_PRIORITY, (U8BIT *)
"CI+EventTask");
1013 return(cam_upgrade_mode);
1023 cam_upgrade_mode = upgrade_mode;
1035 return(operator_search_mode);
1047 operator_search_mode = search_mode;
1062 if ((profile = ADB_FindProfileForModule(module)) != NULL)
1064 ADB_SetProfileSearchRequired(profile, TRUE, 0, 0, 0);
1070 operator_search_required = required;
1074 operator_search_module = module;
1090 U32BIT timer_handle;
1096 info.start_time = DHMS_CREATE(date, hour, min, 0);
1097 info.type = TIMER_TYPE_PRIVATE;
1098 info.frequency = TIMER_FREQ_ONCE;
1100 if (timer_handle != INVALID_TIMER_HANDLE)
1103 ADB_SetProfileSearchTimer(cicam_id, timer_handle);
1118 return(operator_search_required);
1129 return(operator_search_module);
1141 void **profile_list;
1142 U16BIT num_profiles;
1143 U16BIT active_profile;
1152 for (i = 0; (i < num_profiles) && !retval; i++)
1155 ADB_GetProfileModulePresent(profile_list[i]) &&
1156 ADB_GetProfileSearchRequired(profile_list[i]))
1159 *module = ADB_GetProfileModule(profile_list[i]);
1184 void **profile_list;
1185 U16BIT num_profiles;
1186 U16BIT active_profile;
1187 U16BIT i, profile_index;
1188 U16BIT min_date, profile_date;
1189 U8BIT min_hours, profile_hours;
1190 U8BIT min_mins, profile_mins;
1201 profile_index = num_profiles + 1;
1203 for (i = 0; i < num_profiles; i++)
1206 ADB_GetProfileModulePresent(profile_list[i]) &&
1207 ADB_GetProfileSearchDateTime(profile_list[i], &profile_date, &profile_hours, &profile_mins))
1211 if ((profile_date <= min_date) && (profile_hours <= min_hours) &&
1212 (profile_mins < min_mins))
1214 min_date = profile_date;
1215 min_hours = profile_hours;
1216 min_mins = profile_mins;
1222 if (profile_index < num_profiles)
1224 *module = ADB_GetProfileModule(profile_list[profile_index]);
1254 if ((profile = ADB_FindProfileForModule(module)) != NULL)
1256 if (ADB_GetProfileSearchRequired(profile))
1259 ADB_SetProfileSearchRequired(profile, FALSE, 0, 0, 0);
1264 else if (operator_search_required)
1294 BOOLEAN valid, retval;
1296 ADB_CICAM_TIMER_REC *t;
1300 AP_CI_PRINT((
"ACI_HandlePrivateTimer(0x%x)", timer_handle));
1306 t = DBDEF_FindCicamTimerByHandle(timer_handle);
1321 AP_CI_PRINT((
"Timer is associated with CICAM 0x%x", t->cicam_identifier));
1324 ADB_DeleteCicamTimerbyHandle(timer_handle);
1329 AP_CI_PRINT((
"CI+ Operator profile module is 0x%x, search mode is %s", module,
1330 (operator_search_mode == CIP_START_OPERATOR_SEARCH_NO) ?
"NO" :
1331 (operator_search_mode == CIP_START_OPERATOR_SEARCH_YES) ?
"YES" :
1332 (operator_search_mode == CIP_START_OPERATOR_SEARCH_ASK) ?
"ASK" :
"Unexpected"));
1333 switch (operator_search_mode)
1335 case CIP_START_OPERATOR_SEARCH_NO:
1341 case CIP_START_OPERATOR_SEARCH_YES:
1349 case CIP_START_OPERATOR_SEARCH_ASK:
1356 AP_CI_PRINT((
"ACI_HandlePrivateTimer: in stand-by"));
1362 AP_CI_PRINT((
"ACI_HandlePrivateTimer: ask the user"));
1364 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_CI, EV_TYPE_CI_REQUEST_OPERATOR_SEARCH,
1365 &module,
sizeof(module));
1383 U8BIT slot_id, num_slots;
1384 BOOLEAN pass_through;
1391 if ((num_slots = STB_CIGetSlotCount()) > 0)
1393 for (slot_id = 0; (slot_id < num_slots) && retval; slot_id++)
1395 pass_through = TRUE;
1403 pass_through = FALSE;
1409 pass_through = FALSE;
1415 AP_CI_PRINT((
"ACI_SetSecureRouting(%u): releasing slot %u from path", path, slot_id));
1416 ReleaseCISlotFromPath(path);
1448 AP_CI_PRINT((
"ACI_AcquireCISlot(%u, %p): Releasing CAM %u", path, s_ptr,
1453 ReleaseCISlotFromPath(path);
1459 ci_prot = ADB_GetServiceCIProtectionDesc(s_ptr);
1466 service_id = 0xffff;
1470 if (slot_id != INVALID_RES_ID)
1475 AP_CI_PRINT((
"%s(%u): slot %u, record mode is WATCH for service %u",
1476 __FUNCTION__, path, slot_id, service_id));
1481 AP_CI_PRINT((
"%s(%u): slot %u, record mode UNATTENDED for service %u",
1482 __FUNCTION__, path, slot_id, service_id));
1489 AP_CI_PRINT((
"ACI_AcquireCISlot(%u, %p): Acquired slot %u, pmt=%p, ci_prot=%p",
1490 path, s_ptr, slot_id, pmt_data, ci_prot));
1492 if (slot_id != INVALID_RES_ID)
1499 ApplyUsageRules(path, s_ptr);
1521 BOOLEAN slot_acquired;
1535 if (slot_id != INVALID_RES_ID)
1537 AP_CI_PRINT((
"[ACI] Slot is used by live path"));
1543 AP_CI_PRINT((
"[ACI] slot is needed for recording, so take away from live path"));
1549 ReleaseCISlotFromPath(live_path);
1570 return(slot_acquired);
1581 U8BIT id, num_slots;
1586 slot_id = INVALID_RES_ID;
1587 if ((num_slots = STB_CIGetSlotCount()) > 0)
1589 if (serv_ptr != NULL)
1592 for (
id = 0;
id != num_slots;
id++)
1617 if (STB_CIGetSlotCount() > 0)
1625 ApplyUsageRules(path, s_ptr);
1628 UpdateRecordingURI(path, s_ptr);
1650 if (STB_CIGetSlotCount() > 0)
1653 for (path = 0; path < num_paths; path++)
1669 service_id = pmt[3] << 8 | pmt[4];
1717 U8BIT cicam_id[CIP_CICAM_ID_LEN];
1718 U8BIT id_nvm[CIP_CICAM_ID_LEN];
1727 if (STB_CIGetCicamId(slot_id, cicam_id))
1731 memcpy(&id_nvm[0], &nvm_value, 4);
1733 memcpy(&id_nvm[4], &nvm_value, 4);
1735 if (memcmp(cicam_id, id_nvm,
sizeof(cicam_id)) == 0)
1742 APP_NvmSave(CICAM_PIN0_USED_TIME_NVM, used_time, TRUE);
1747 memcpy(&id_nvm[0], &nvm_value, 4);
1749 memcpy(&id_nvm[4], &nvm_value, 4);
1751 if (memcmp(cicam_id, id_nvm,
sizeof(cicam_id)) == 0)
1758 APP_NvmSave(CICAM_PIN1_USED_TIME_NVM, used_time, TRUE);
1763 memcpy(&id_nvm[0], &nvm_value, 4);
1765 memcpy(&id_nvm[4], &nvm_value, 4);
1767 if (memcmp(cicam_id, id_nvm,
sizeof(cicam_id)) == 0)
1774 APP_NvmSave(CICAM_PIN2_USED_TIME_NVM, used_time, TRUE);
1779 memcpy(&id_nvm[0], &nvm_value, 4);
1781 memcpy(&id_nvm[4], &nvm_value, 4);
1783 if (memcmp(cicam_id, id_nvm,
sizeof(cicam_id)) == 0)
1790 APP_NvmSave(CICAM_PIN3_USED_TIME_NVM, used_time, TRUE);
1813 U8BIT cicam_id[CIP_CICAM_ID_LEN];
1814 U8BIT id_nvm[CIP_CICAM_ID_LEN];
1817 U32DHMS used0, used1, used2, used3;
1824 if (STB_CIGetCicamId(slot_id, cicam_id))
1833 memcpy(&id_nvm[0], &nvm_value, 4);
1835 memcpy(&id_nvm[4], &nvm_value, 4);
1837 if ((memcmp(cicam_id, id_nvm,
sizeof(cicam_id)) == 0) ||
1841 nvm_value = *(U32BIT *)&cicam_id[0];
1843 nvm_value = *(U32BIT *)&cicam_id[4];
1850 APP_NvmSave(CICAM_PIN0_USED_TIME_NVM, used_time, TRUE);
1855 memcpy(&id_nvm[0], &nvm_value, 4);
1857 memcpy(&id_nvm[4], &nvm_value, 4);
1859 if ((memcmp(cicam_id, id_nvm,
sizeof(cicam_id)) == 0) ||
1863 nvm_value = *(U32BIT *)&cicam_id[0];
1865 nvm_value = *(U32BIT *)&cicam_id[4];
1872 APP_NvmSave(CICAM_PIN1_USED_TIME_NVM, used_time, TRUE);
1877 memcpy(&id_nvm[0], &nvm_value, 4);
1879 memcpy(&id_nvm[4], &nvm_value, 4);
1881 if ((memcmp(cicam_id, id_nvm,
sizeof(cicam_id)) == 0) ||
1885 nvm_value = *(U32BIT *)&cicam_id[0];
1887 nvm_value = *(U32BIT *)&cicam_id[4];
1894 APP_NvmSave(CICAM_PIN2_USED_TIME_NVM, used_time, TRUE);
1899 memcpy(&id_nvm[0], &nvm_value, 4);
1901 memcpy(&id_nvm[4], &nvm_value, 4);
1903 if ((memcmp(cicam_id, id_nvm,
sizeof(cicam_id)) == 0) ||
1907 nvm_value = *(U32BIT *)&cicam_id[0];
1909 nvm_value = *(U32BIT *)&cicam_id[4];
1916 APP_NvmSave(CICAM_PIN3_USED_TIME_NVM, used_time, TRUE);
1922 used0 = (U32DHMS)
APP_NvmRead(CICAM_PIN0_USED_TIME_NVM);
1923 used1 = (U32DHMS)
APP_NvmRead(CICAM_PIN1_USED_TIME_NVM);
1924 used2 = (U32DHMS)
APP_NvmRead(CICAM_PIN2_USED_TIME_NVM);
1925 used3 = (U32DHMS)
APP_NvmRead(CICAM_PIN3_USED_TIME_NVM);
1927 if ((used0 < used1) && (used0 < used2) && (used0 < used3))
1930 nvm_value = *(U32BIT *)&cicam_id[0];
1932 nvm_value = *(U32BIT *)&cicam_id[4];
1939 APP_NvmSave(CICAM_PIN0_USED_TIME_NVM, used_time, TRUE);
1941 else if ((used1 < used0) && (used1 < used2) && (used1 < used3))
1944 nvm_value = *(U32BIT *)&cicam_id[0];
1946 nvm_value = *(U32BIT *)&cicam_id[4];
1953 APP_NvmSave(CICAM_PIN1_USED_TIME_NVM, used_time, TRUE);
1955 else if ((used2 < used0) && (used2 < used1) && (used2 < used3))
1958 nvm_value = *(U32BIT *)&cicam_id[0];
1960 nvm_value = *(U32BIT *)&cicam_id[4];
1967 APP_NvmSave(CICAM_PIN2_USED_TIME_NVM, used_time, TRUE);
1972 nvm_value = *(U32BIT *)&cicam_id[0];
1974 nvm_value = *(U32BIT *)&cicam_id[4];
1981 APP_NvmSave(CICAM_PIN3_USED_TIME_NVM, used_time, TRUE);
2006 tune_data.module = module;
2007 tune_data.type = CIPLUS_TUNE_TYPE_TRANSPORT;
2008 tune_data.u.transport.t_ptr = t_ptr;
2009 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_CI, EV_TYPE_CI_TUNE, &tune_data,
sizeof(tune_data));
2026 tune_data.module = module;
2027 tune_data.type = CIPLUS_TUNE_TYPE_SERVICE;
2028 tune_data.flags = flags;
2029 tune_data.u.service.s_ptr = s_ptr;
2030 tune_data.u.service.reqd_si = APP_SI_MODE_UPDATE;
2031 tune_data.u.service.pmt = NULL;
2032 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_CI, EV_TYPE_CI_TUNE, &tune_data,
sizeof(tune_data));
2056 case SI_DEL_SYS_DESC_TYPE_TERR:
2058 if (tune->desc->terr.is_t2)
2066 AP_CI_PRINT((
"%s: new frequency", __FUNCTION__));
2069 AP_CI_PRINT((
"%s: Terr freq=%d t_ptr=%p", __FUNCTION__, tune->desc->terr.u.t1.freq_hz, t_ptr));
2073 case SI_DEL_SYS_DESC_TYPE_SAT:
2076 tune->desc->sat.polarity, tune->desc->sat.dvb_s2, tune->desc->sat.modulation, NULL)) == NULL)
2078 AP_CI_PRINT((
"%s: new frequency", __FUNCTION__));
2080 tune->desc->sat.polarity, tune->desc->sat.dvb_s2, tune->desc->sat.modulation, NULL);
2082 AP_CI_PRINT((
"%s: Sat freq=%d t_ptr=%p", __FUNCTION__, tune->desc->sat.freq_hz, t_ptr));
2085 case SI_DEL_SYS_DESC_TYPE_CABLE:
2089 AP_CI_PRINT((
"%s: new frequency", __FUNCTION__));
2092 AP_CI_PRINT((
"%s: Cab freq=%d t_ptr=%p", __FUNCTION__, tune->desc->cable.freq_hz, t_ptr));
2098 AP_CI_PRINT((
"%s: Unrecognised tuner type 0x%x", __FUNCTION__, tune->type));
2099 ACI_TuneReply(INVALID_RES_ID, module, CIP_TUNER_UNSUPPORTED_SYSTEM);
2112 tune_data.module = module;
2113 tune_data.u.transport.t_ptr = t_ptr;
2115 if (tune->service_id != 0)
2120 t_ptr->orig_net_id, t_ptr->tran_id, tune->service_id);
2126 AP_CI_PRINT((
"%s: new service with ID 0x%x", __FUNCTION__, tune->service_id));
2129 s_ptr->hidden = TRUE;
2131 s_ptr->selectable = FALSE;
2132 DBA_SetFieldValue(s_ptr->dba_rec, DBA_FIELD_SERV_SELECTABLE, s_ptr->selectable);
2136 if (tune->service_name != NULL)
2143 AP_CI_PRINT((
"%s: SID 0x%x s_ptr=%p", __FUNCTION__, tune->service_id, s_ptr));
2147 if ((s_ptr != NULL) && (tune->event_desc != NULL))
2149 if (s_ptr->now_event != NULL)
2158 s_ptr->now_event->desc_list_head = tune->event_desc;
2159 s_ptr->now_event->desc_list_tail = tune->event_desc;
2167 tune_data.type = CIPLUS_TUNE_TYPE_CI_SERVICE;
2168 tune_data.flags = flags;
2169 tune_data.u.service.s_ptr = s_ptr;
2171 if (tune->pmt == NULL)
2174 tune_data.u.service.reqd_si = APP_SI_MODE_CIPLUS_UPDATE;
2175 tune_data.u.service.pmt = NULL;
2180 tune_data.u.service.reqd_si = APP_SI_MODE_CIPLUS_NO_PAT_PMT;
2185 pmt_size = ((tune->pmt[1] & 0x0f) << 8) + tune->pmt[2];
2190 memcpy(tune_data.u.service.pmt, tune->pmt, pmt_size);
2195 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_CI, EV_TYPE_CI_TUNE, &tune_data,
sizeof(tune_data));
2199 ACI_TuneReply(INVALID_RES_ID, module, CIP_TUNER_SERVICE_NOT_FOUND);
2205 tune_data.type = CIPLUS_TUNE_TYPE_TRANSPORT;
2206 STB_ERSendEvent(FALSE, FALSE, EV_CLASS_CI, EV_TYPE_CI_TUNE, &tune_data,
sizeof(tune_data));
2262 slot_id = STB_GetCIHostControlSlotId(module);
2263 if (slot_id != INVALID_RES_ID &&
2267 if (service != NULL)
2273 service_id = 0xffff;
2278 AP_CI_PRINT((
"%s(%u): slot %u, record mode is WATCH for service %u",
2279 __FUNCTION__, path, slot_id, service_id));
2284 AP_CI_PRINT((
"%s(%u): slot %u, record mode UNATTENDED for service %u",
2285 __FUNCTION__, path, slot_id, service_id));
2309 sprintf((
char *)pin_str,
"%lu", (
unsigned long)pin);
2332 if (owner_data != NULL && module == *(U32BIT *)owner_data)
2355 NotifyStartTuning = cb_func;
BOOLEAN STB_CiCcGetRecordingPinInfo(U8BIT slot_id, U8BIT *status, U8BIT *age_rating, U8BIT **private_data, U16BIT *date_code, U8BIT *hour, U8BIT *min, U8BIT *sec)
Returns the information to be stored with a pin event when recording.
Application level CI control functions.
BOOLEAN STB_DPIsRecording(U8BIT path, U32BIT *handle)
Returns status of recording on specified path.
void ADB_SaveDatabase(void)
Saves the database to non-volatile memory.
void DBDEF_DeleteEventList(ADB_EVENT_REC *elist)
Deletes all events in the given list.
void ACI_SetCamUpgradeMode(U8BIT upgrade_mode)
Sets the CAM upgrade option (Yes/No/Ask)
macros and function prototypes for public use
U8BIT * STB_CiCcGetPlaybackLicence(U8BIT slot_id, U8BIT *licence_status, U16BIT *licence_len, U8BIT raw_uri[CIP_URI_LEN])
Returns the last licence received from the CAM during playback.
U8BIT STB_DPGetPathCISlot(U8BIT path)
Returns the CI slot id associated with the given path.
void * STB_DPGetTunedService(U8BIT path)
Returns the service saved with the given decode path.
U8BIT * STB_CiCcGetRecordingLicence(U8BIT slot_id, U8BIT *licence_status, U16BIT *licence_len, U8BIT raw_uri[CIP_URI_LEN])
Returns the last licence received from the CAM when recording.
BOOLEAN STB_CiCcAuthenticated(U8BIT slot_id)
Tell whether authenticated CI+ module is in the slot.
BOOLEAN ACI_IsTrustedPath(U8BIT path)
The given decode path is only trusted if it doesn't include a CI slot or the CI slot contains a CI+ C...
U8BIT STB_DPAcquireCISlotForPath(U8BIT path, U8BIT *pmt_data, U8BIT *ci_protection_desc)
Acquire a CI slot and assign it to the given path.
BOOLEAN STB_DPIsLivePath(U8BIT path)
Is the given decode path being used for live viewing.
void ADB_ReleaseProfileList(void **profile_list, U16BIT num_profiles)
Frees a profile list acquired using ADB_GetProfileList.
ADB_TRANSPORT_REC * DBDEF_FindSatTransportRec(U32BIT freq_hz, U16BIT symbol_rate, E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation, void *satellite)
Find the satellite transport record in the database matching the given params.
BOOLEAN ACI_AskRelease(U32BIT module)
Ask the host control module to restore replaced PIDs and to close the session with the host control r...
Application configuration.
Application database control.
U32DHMS STB_GCNowDHMSGmt(void)
Reads the current GMT date code and time.
Header file - macros and function prototypes for public use.
BOOLEAN ACI_PathOwnedByModule(U8BIT path, U32BIT module)
Checks whether path is owned by CI module.
Header file for NVM data handling functions.
BOOLEAN DBDEF_SetServiceType(ADB_SERVICE_REC *s_ptr, ADB_SERVICE_TYPE serv_type)
Sets the service type for the given service record.
ADB_TRANSPORT_REC * DBDEF_FindTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id)
Find the terrestrial transport record in the database matching the given params.
U8BIT STB_DPIsCISlotInUse(U8BIT start_path, U8BIT slot_id, U8BIT ignore_path)
Checks whether a given CI slot is in use.
void STB_CiCaReportPmt(U8BIT slot_id, U8BIT *pmt)
Report PMT to CI stack.
void * STB_AppGetMemory(U32BIT bytes)
Attempts to allocate memory from the application heap.
void STB_CiCcGetUsageRulesInfo(U8BIT slot_id, U16BIT service_id, U8BIT uri[CIP_URI_LEN])
Return the current URI for the given service.
BOOLEAN ACI_IsOperatorSearchRequired(void)
Returns whether an operator profile search has been requested.
ADB_SERVICE_REC * DBDEF_FindServiceRecByIds(ADB_SERVICE_REC *servp, U32BIT net_id, U32BIT onet_id, U32BIT tran_id, U32BIT serv_id)
Search for a service with the given IDs.
BOOLEAN ACI_StartOperatorSearchForModule(U32BIT module)
Called by the app to start an operator profile search for the given module.
void DBA_SaveRecord(void *record)
Forces a record to be saved to non-volatile storage. Depending on the implementation, this function may not do anything if the data is updated to non-volatile storage as any records and/or fields are created or updated.
BOOLEAN ACI_HandlePrivateTimer(U32BIT timer_handle)
Checks whether the given timer is associated with any of the CI+ profiles and starts the operator sea...
void ASI_ProcessPmt(U8BIT path, void *s_ptr, U8BIT *pmt_data)
Takes data for a raw PMT for the given service and processes it as if it had been received from the d...
BOOLEAN DBDEF_SetServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *name)
Set or change the name of a service.
ADB_TRANSPORT_REC * DBDEF_AddSatTransportRec(U32BIT freq_hz, U16BIT symbol_rate, E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation, ADB_NETWORK_REC *network)
Adds a satellite transport record with the given frequency, symbol rate and polarity.
void STB_CiCcApplyUsageRulesInfoForPlayback(U8BIT *uri)
Apply the given Usage Rules Information for playback.
BOOLEAN ACI_HcAskRelease(U32BIT module)
Ask the module to restore replaced PIDs and to close the session with the host control resource...
ADB_TRANSPORT_REC * DBDEF_AddTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id, ADB_NETWORK_REC *network)
Adds a terrestrial transport record with the given frequency and PLP id.
U32BIT APP_NvmRead(E_NVM_ITEMS nvm_item)
Returns the current value for the given DVB setting.
BOOLEAN STB_CiCaSystemSupported(U8BIT slot_id, U8BIT *pmt_data)
Tell whether CA descriptors were found in PMT and that CA system is supported.
ADB_PROFILE_TYPE ADB_GetProfileType(void *profile)
Returns the type of the given profile.
void STB_SIReleaseStringDesc(SI_STRING_DESC *desc)
Frees the memory used by the descriptor specified.
void ACI_ProgramMapTableChanged(U8BIT *pmt)
Handle PMT change.
U8BIT * ADB_GetServicePMTData(void *s_ptr, U16BIT *data_len)
Returns the current PMT data for the given service.
BOOLEAN ACI_HcTuneReply(U32BIT module, E_STB_CI_TUNE_STATUS status)
Send status of tune operation to the CAM host control module.
void STB_SIReleaseDelSysDesc(SI_DELIVERY_SYS_DESC *desc, SI_DELIVERY_SYS_DESC_TYPE type)
Frees the memory used by the descriptor specified.
Application timer functions and defines.
void APP_NvmSave(E_NVM_ITEMS nvm_item, U32BIT new_value, BOOLEAN write_to_flash_now)
Sets the current value for the given DVB setting.
void ACI_HcInitialise(void)
Initialise CI Host Control support.
void ACI_TuneToService(U32BIT module, void *s_ptr, E_CIP_TUNE_FLAGS flags)
Schedule a tune to a service.
void ACI_TuneToDelSysDesc(U32BIT module, S_CIP_TUNE_DEL_SYS_DESC *tune, E_CIP_TUNE_FLAGS flags)
Tune to a service/transport defined by a delivery system descriptor, possibly with PMT data...
BOOLEAN STB_DPReleasePath(U8BIT path, E_STB_DP_RES_OWNER owner)
Releases the decode path and all resources no longer needed. The path won't be released if the path i...
Header file - macros and function prototypes for public use.
void STB_ERSendEvent(BOOLEAN latched, BOOLEAN repeat, U16BIT path_class, U16BIT type, void *data, U32BIT data_size)
Sends an event to event reporting control module.
Application level CI Host Control functions.
BOOLEAN STB_DPUseCISlotWithPath(U8BIT path, U8BIT slot_id)
Use the given CI slot with the given path.
BOOLEAN ACI_AcquireCISlotForRecording(U8BIT path, void *s_ptr)
Acquires a CI slot for the recording path. This function may need to "steal" the CI slot from the liv...
BOOLEAN ACI_FindOperatorProfileModule(U32BIT cicam_id, U32BIT *module)
Returns the Operator Profile module associated with a CICAM ID.
U8BIT STB_DPGetNumPaths(void)
Returns the maximum number of decode paths.
void ACI_UseCiModuleOnPath(U8BIT path, U32BIT module)
Use the CI module with the given path.
U8BIT STB_DPGetPlaybackPath(void)
Returns the ID of the decode path being used for playback.
U8BIT ACI_FindCISlotForService(void *serv_ptr)
Looks for a CAM that's able to descramble the given service and returns its slot id.
U8BIT STB_DPGetLivePath(void)
Returns the ID of the decode path being used for live viewing.
U32BIT APVR_GetPlaybackHandle(void)
Returns the handle of the recording currently being played back.
BOOLEAN STB_DPIsDecodingPath(U8BIT path)
Is the given decode path being used for decoding.
BOOLEAN STB_CiCcIsSlotReady(U8BIT slot_id)
Return whether CI slot is ready.
void STB_CiKeysClear(U8BIT path, U8BIT slot_id)
Clear CC keys (if any) from given path.
U16BIT ADB_GetTransportTid(void *t_ptr)
Returns the transport id of the given transport.
void(* F_NotifyStartTuning)(U32BIT module, U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, E_CIP_TUNE_FLAGS flags)
Notify that DVB is about to tune to service or transport stream. This function would be called as a r...
void DBDEF_ReleaseAccess(void)
Releases access to the app's database.
BOOLEAN STB_CiCcSendPin(U8BIT slot_id, U8BIT *pin_data)
Called by the host to check whether a CAM pin is valid. An STB_EVENT_CI_PIN_STATUS event will be sent...
BOOLEAN STB_DPIsOwnedBy(U8BIT path, E_STB_DP_RES_OWNER owner)
Checks whether the path is owned by the given owner.
Debug functions header file.
Header file - macros and function prototypes for public use.
void STB_CiCcRemove(U8BIT slot_id)
Handle CAM removal from slot.
Header file - macros and function prototypes for public use.
ADB_TRANSPORT_REC * DBDEF_AddCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate, ADB_NETWORK_REC *network)
Adds a cable transport record with the given frequency and symbol rate.
void * ADB_GetTunedService(U8BIT path)
Returns the tuned service for the given decode path.
BOOLEAN ACI_SetSecureRouting(U8BIT path)
Ensures the TS is routed securely for CI+, either by setting the TS to pass through if a CI slot cont...
Database access defines, structures and public functions.
BOOLEAN ACI_GetFirstOperatorSearchModule(U32BIT *module)
Checks all the CI+ profiles to see if any have requested an update search.
void ACI_UsageRulesStatusChanged(U8BIT path)
Re-evaluate current state follwing a change related to usage rules.
CI Content Control - descrambler keys.
ADB_TRANSPORT_REC * DBDEF_FindCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate)
Find the cable transport record in the database matching the given params.
Application level CI - internal functions.
void ACI_TuneReply(U8BIT path, U32BIT module, E_CIP_TUNER_STATUS status)
This function is called by the host to send the status of the tune operation to the module...
U16BIT ADB_GetTransportOriginalNetworkId(void *t_ptr)
Returns the original network id of the given transport.
BOOLEAN ACI_AcquireCISlot(U8BIT path, void *s_ptr)
Acquires a CI slot for the given path on the given service after releasing any slot already being use...
Header file - Function prototypes for Event Reporting.
void ACI_SetOperatorSearchMode(E_CIP_START_OPERATOR_SEARCH search_mode)
Sets the operator profile search mode (Yes/No/Ask). This should be used by the app to control whether...
ADB_SERVICE_REC * DBDEF_AddServiceRec(U16BIT serv_id, ADB_TRANSPORT_REC *t_ptr)
Adds a new service record to the service database with the given service ID and parent transport...
void DBDEF_RequestAccess(void)
Requests access to the app's database.
U8BIT ACTL_TuneToService(U8BIT path, S_ACTL_OWNER_INFO *owner_info, void *s_ptr, BOOLEAN override_lock, BOOLEAN for_live)
Starts the process of tuning to the specified service. If the service is to be tuned on the live path...
void STB_SISetCiplusPrivateDataSpecifierMode(BOOLEAN mode)
Enables or disables use of the CI+ private data specifier when parsing SI tables. ...
U16BIT ADB_GetServiceId(void *s_ptr)
Returns the signalled service id of the given service.
void ACI_OpSlotRemove(U8BIT slot_id)
Process CAM removal from slot for CA support.
void ACI_OpInitialise(void)
Initialise CI Operator Profile support.
Application stb layer control.
U8BIT ACTL_TuneToTransport(U8BIT path, S_ACTL_OWNER_INFO *owner_info, void *t_ptr, E_ACTL_SI_SRCH_REQD reqd_si, BOOLEAN relock_on)
Tunes to the given transport and sets the type of SI monitoring that will be started when the tuning ...
BOOLEAN STB_OSWriteQueue(void *queue, void *msg, U16BIT msg_size, U16BIT timeout)
Write a message to the queue.
Header file - Function prototypes for operating system.
System Wide Global Technical Data Type Definitions.
BOOLEAN DBA_SetFieldValue(void *record, U32BIT field_id, U32BIT value)
Set the value of a record's field. The function will fail if the record doesn't exist, the record doesn't include the given field, or the field is a string value.
U16BIT ADB_GetProfileList(void ***profile_list, U16BIT *active_profile)
Returns an array of available profiles. The array will be allocated within the function and should be...
void STB_AppFreeMemory(void *addr)
Releases previously allocated application heap memory.
BOOLEAN ACI_StartOperatorSearch(U32BIT module)
Called by the app to start an operator profile search that has been requested.
BOOLEAN ACI_WritePinForSlot(U8BIT slot_id, S32BIT pin)
Saves the given pin associated with the CAM in the given slot. If the pin for this CAM has previously...
BOOLEAN ACTL_ReleasePathOwnership(U8BIT path, E_STB_DP_RES_OWNER owner)
Releases ownership of the path, and frees any associated data, if the given owner is the path's owner...
BOOLEAN ACI_OpAskRelease(U32BIT module)
Ask the opertaor module to restore replaced PIDs.
void STB_CiKeysApply(U8BIT path, U8BIT slot_id)
Apply stored CC keys (if any) on given path.
U32BIT ACI_GetOperatorSearchModule(void)
Returns the module performing or requiring and operator search.
U32BIT ATMR_AddTimer(S_TIMER_INFO *info)
Creates a new timer based on the information supplied.
BOOLEAN ACI_GetFirstScheduledOperatorSearch(U32BIT *module, U16BIT *date, U8BIT *hours, U8BIT *mins)
Checks all the CI+ profiles to find the one with the earliest scheduled search. All returned values a...
void ACI_TuneToTransport(U32BIT module, void *t_ptr)
Schedule a tune to a transport.
BOOLEAN ACI_OpTuneReply(U8BIT path, U32BIT module, E_STB_CI_TUNE_STATUS status)
This function is called by the host to send the status of the tune operation to the module...
void * STB_OSCreateTask(void(*function)(void *), void *param, U32BIT stack, U8BIT priority, U8BIT *name)
Create a New Task to the calling process. Upon success, the created task runs on its own stack...
void * STB_OSCreateQueue(U16BIT msg_size, U16BIT msg_max)
Create Queue of given number of messages and size of message.
void ACI_RegisterStartTuneNotifyCallback(F_NotifyStartTuning cb_func)
Register callback function to notify start of tuning process due to CI tune request.
void ACI_Initialise(void)
Initialise CI Host Control support.
void * STB_DPGetOwnerData(U8BIT path, U32BIT *data_size)
Returns the owner data saved with the path. This data should not be freed.
BOOLEAN ASTE_InStandby(void)
Header file - Function prototypes for heap memory.
void ADB_GetServiceIds(void *s_ptr, U16BIT *onet_id, U16BIT *trans_id, U16BIT *serv_id)
Returns the original network id, transport id and service id for the given service.
U8BIT STB_CiCcFindSlotForCicamId(U8BIT cicam_id[CIP_CICAM_ID_LEN])
Checks CAMs in all slots to find the one with the given CAM id.
BOOLEAN ATMR_DeleteTimer(U32BIT handle)
Deletes the timer with the given handle.
U8BIT ACI_GetCamUpgradeMode(void)
Return CAM upgrade option (Yes/No/Ask)
BOOLEAN STB_OSReadQueue(void *queue, void *msg, U16BIT msg_size, U16BIT timeout)
Read a message from a queue.
void STB_CiCcInitialise(void)
CI content control support initialise.
void STB_CiCcSetRecordOperatingMode(U8BIT slot_id, U32BIT mode, U16BIT service_id)
Sets the record operating mode for the given slot id.
BOOLEAN ACI_SendPinToCam(U8BIT slot_id, U32BIT pin)
Converts the pin value to ASCII and sends it to the CAM An STB_EVENT_CI_PIN_STATUS event will be sent...
void STB_AVBlankVideo(U8BIT path, BOOLEAN blank)
Blanks or unblanks the video display.
E_CIP_START_OPERATOR_SEARCH ACI_GetOperatorSearchMode(void)
Return the option for starting an operator profile search (yes/no/ask)
S32BIT ACI_ReadPinForSlot(U8BIT slot_id)
Checks if a pin has been saved for the CAM in the given slot and returns it.
void STB_DPReleaseCISlotFromPath(U8BIT path)
Release the CI slot associated with the given path.
BOOLEAN STB_CiCcIsServiceAllowed(U8BIT slot_id, U8BIT *ci_prot_desc)
Tell whether the service is allowed. This function checks whether the CI Protection Descriptor allows...
void STB_CiCcApplyUsageRulesInfo(U8BIT *uri)
Apply the given Usage Rules Information.
Application database access functions.
void ACI_ScheduleOperatorSearch(U32BIT cicam_id, U16BIT date, U8BIT hour, U8BIT min)
Sets the date/time that an operator search should be started for the given module.
void ACI_OperatorSearchRequired(U32BIT module, BOOLEAN required)
Sets whether an operator profile search needs to be run.
Header file - macros and function prototypes for public use.
Application level CI Operator Profile functions.
BOOLEAN APP_RegisterDVBEventHandler(DVB_EVENT_HANDLER event_handler)
Register for DVB event notifications.
Header file - Function prototypes for tuner control.