vuplus: dvb wait delay for ci response

Conflicts:
	src/gui/cam_menu.cpp
	src/neutrino.cpp


Origin commit data
------------------
Commit: 10d1aaf526
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2020-01-18 (Sat, 18 Jan 2020)
This commit is contained in:
BPanther
2020-01-18 00:07:39 +01:00
committed by vanhofen
parent 7796c81fd5
commit c7a2db8b1c
9 changed files with 78 additions and 35 deletions

View File

@@ -329,6 +329,7 @@ ci.clock CI Takt (Mhz)
ci.clock_extra_high extra hoch ci.clock_extra_high extra hoch
ci.clock_high hoch ci.clock_high hoch
ci.clock_normal normal ci.clock_normal normal
ci.delay DVB-CI-Verzögerung
ci.empty Kein CAM im Slot ci.empty Kein CAM im Slot
ci.ignore_msg CA Meldungen ignorieren ci.ignore_msg CA Meldungen ignorieren
ci.init_failed CAM-Init fehlgeschlagen ci.init_failed CAM-Init fehlgeschlagen

View File

@@ -329,6 +329,7 @@ ci.clock CI clock (Mhz)
ci.clock_extra_high extra high ci.clock_extra_high extra high
ci.clock_high high ci.clock_high high
ci.clock_normal normal ci.clock_normal normal
ci.delay DVB-CI delay
ci.empty No CAM in slot ci.empty No CAM in slot
ci.ignore_msg Ignore CA messages ci.ignore_msg Ignore CA messages
ci.init_failed CAM init failed ci.init_failed CAM init failed

View File

@@ -73,13 +73,21 @@ const CMenuOptionChooser::keyval OPTIONS_CI_MODE_OPTIONS[] =
}; };
#define OPTIONS_CI_MODE_OPTION_COUNT (sizeof(OPTIONS_CI_MODE_OPTIONS)/sizeof(CMenuOptionChooser::keyval)) #define OPTIONS_CI_MODE_OPTION_COUNT (sizeof(OPTIONS_CI_MODE_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
#if BOXMODEL_VUPLUS_ALL #if BOXMODEL_VUPLUS
#define CI_CLOCK_OPTION_COUNT 3 #define CI_CLOCK_OPTION_COUNT 3
static const CMenuOptionChooser::keyval CI_CLOCK_OPTIONS[CI_CLOCK_OPTION_COUNT] = { static const CMenuOptionChooser::keyval CI_CLOCK_OPTIONS[CI_CLOCK_OPTION_COUNT] = {
{ 6, LOCALE_CI_CLOCK_NORMAL }, { 6, LOCALE_CI_CLOCK_NORMAL },
{ 7, LOCALE_CI_CLOCK_HIGH }, { 7, LOCALE_CI_CLOCK_HIGH },
{ 12, LOCALE_CI_CLOCK_EXTRA_HIGH } { 12, LOCALE_CI_CLOCK_EXTRA_HIGH }
}; };
#define CI_DELAY_OPTION_COUNT 5
static const CMenuOptionChooser::keyval_ext CI_DELAY_OPTIONS[CI_DELAY_OPTION_COUNT] = {
{ 16, NONEXISTANT_LOCALE, "16" },
{ 32, NONEXISTANT_LOCALE, "32" },
{ 64, NONEXISTANT_LOCALE, "64" },
{ 128, NONEXISTANT_LOCALE, "128" },
{ 256, NONEXISTANT_LOCALE, "256" }
};
#else #else
#define CI_CLOCK_OPTION_COUNT 2 #define CI_CLOCK_OPTION_COUNT 2
static const CMenuOptionChooser::keyval CI_CLOCK_OPTIONS[CI_CLOCK_OPTION_COUNT] = { static const CMenuOptionChooser::keyval CI_CLOCK_OPTIONS[CI_CLOCK_OPTION_COUNT] = {
@@ -150,17 +158,20 @@ int CCAMMenuHandler::doMainMenu()
int CiSlots = ca ? ca->GetNumberCISlots() : 0; int CiSlots = ca ? ca->GetNumberCISlots() : 0;
if(CiSlots) { if(CiSlots) {
cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); #if BOXMODEL_VUPLUS
cammenu->addItem(new CMenuOptionChooser(LOCALE_CI_DELAY, &g_settings.ci_delay, CI_DELAY_OPTIONS, CI_DELAY_OPTION_COUNT, true, this));
#endif
cammenu->addItem(new CMenuOptionChooser(LOCALE_CI_RESET_STANDBY, &g_settings.ci_standby_reset, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE #if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_CLOCK, &g_settings.ci_clock, CI_CLOCK_OPTIONS, CI_CLOCK_OPTION_COUNT, true, this)); cammenu->addItem(new CMenuOptionChooser(LOCALE_CI_CLOCK, &g_settings.ci_clock, CI_CLOCK_OPTIONS, CI_CLOCK_OPTION_COUNT, true, this));
#else #else
cammenu->addItem( new CMenuOptionNumberChooser(LOCALE_CI_CLOCK, &g_settings.ci_clock, true, 6, 12, this)); cammenu->addItem(new CMenuOptionNumberChooser(LOCALE_CI_CLOCK, &g_settings.ci_clock, true, 6, 12, this));
#endif #endif
} }
cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_IGNORE_MSG, &g_settings.ci_ignore_messages, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); cammenu->addItem(new CMenuOptionChooser(LOCALE_CI_IGNORE_MSG, &g_settings.ci_ignore_messages, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_SAVE_PINCODE, &g_settings.ci_save_pincode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this)); cammenu->addItem(new CMenuOptionChooser(LOCALE_CI_SAVE_PINCODE, &g_settings.ci_save_pincode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this));
//NI //NI
cammenu->addItem( new CMenuOptionChooser(LOCALE_CI_REC_ZAPTO, &g_settings.ci_rec_zapto, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this)); cammenu->addItem(new CMenuOptionChooser(LOCALE_CI_REC_ZAPTO, &g_settings.ci_rec_zapto, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this));
CMenuOptionChooser *ci_mode = new CMenuOptionChooser(LOCALE_CI_MODE, &g_settings.ci_mode, OPTIONS_CI_MODE_OPTIONS, OPTIONS_CI_MODE_OPTION_COUNT, true, NULL); CMenuOptionChooser *ci_mode = new CMenuOptionChooser(LOCALE_CI_MODE, &g_settings.ci_mode, OPTIONS_CI_MODE_OPTIONS, OPTIONS_CI_MODE_OPTION_COUNT, true, NULL);
ci_mode->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_CI_MODE); ci_mode->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_CI_MODE);
cammenu->addItem(ci_mode); cammenu->addItem(ci_mode);
@@ -600,6 +611,14 @@ int CCAMMenuHandler::doMenu(int slot, CA_SLOT_TYPE slotType)
bool CCAMMenuHandler::changeNotify(const neutrino_locale_t OptionName, void * Data) bool CCAMMenuHandler::changeNotify(const neutrino_locale_t OptionName, void * Data)
{ {
#if BOXMODEL_VUPLUS
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_CI_DELAY)) {
printf("CCAMMenuHandler::changeNotify: ci_delay %d\n", g_settings.ci_delay);
ca->SetCIDelay(g_settings.ci_delay);
return true;
}
else
#endif
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_CI_CLOCK)) { if (ARE_LOCALES_EQUAL(OptionName, LOCALE_CI_CLOCK)) {
printf("CCAMMenuHandler::changeNotify: ci_clock %d\n", g_settings.ci_clock); printf("CCAMMenuHandler::changeNotify: ci_clock %d\n", g_settings.ci_clock);
ca->SetTSClock(g_settings.ci_clock * 1000000); ca->SetTSClock(g_settings.ci_clock * 1000000);

View File

@@ -486,6 +486,9 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.ci_clock = configfile.getInt32("ci_clock", 6); g_settings.ci_clock = configfile.getInt32("ci_clock", 6);
#else #else
g_settings.ci_clock = configfile.getInt32("ci_clock", 9); g_settings.ci_clock = configfile.getInt32("ci_clock", 9);
#endif
#if BOXMODEL_VUPLUS
g_settings.ci_delay = configfile.getInt32("ci_delay", 256);
#endif #endif
g_settings.ci_ignore_messages = configfile.getInt32("ci_ignore_messages", 0); g_settings.ci_ignore_messages = configfile.getInt32("ci_ignore_messages", 0);
g_settings.ci_save_pincode = configfile.getInt32("ci_save_pincode", 0); g_settings.ci_save_pincode = configfile.getInt32("ci_save_pincode", 0);
@@ -1475,6 +1478,9 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32("ci_standby_reset", g_settings.ci_standby_reset); configfile.setInt32("ci_standby_reset", g_settings.ci_standby_reset);
configfile.setInt32("ci_clock", g_settings.ci_clock); configfile.setInt32("ci_clock", g_settings.ci_clock);
#if BOXMODEL_VUPLUS
configfile.setInt32("ci_delay", g_settings.ci_delay);
#endif
configfile.setInt32("ci_ignore_messages", g_settings.ci_ignore_messages); configfile.setInt32("ci_ignore_messages", g_settings.ci_ignore_messages);
configfile.setInt32("ci_save_pincode", g_settings.ci_save_pincode); configfile.setInt32("ci_save_pincode", g_settings.ci_save_pincode);
configfile.setString("ci_pincode", g_settings.ci_pincode); configfile.setString("ci_pincode", g_settings.ci_pincode);
@@ -2737,6 +2743,9 @@ TIMER_START();
ZapStart_arg.uselastchannel = g_settings.uselastchannel; ZapStart_arg.uselastchannel = g_settings.uselastchannel;
ZapStart_arg.video_mode = g_settings.video_Mode; ZapStart_arg.video_mode = g_settings.video_Mode;
ZapStart_arg.ci_clock = g_settings.ci_clock; ZapStart_arg.ci_clock = g_settings.ci_clock;
#if BOXMODEL_VUPLUS
ZapStart_arg.ci_delay = g_settings.ci_delay;
#endif
ZapStart_arg.volume = g_settings.hdmi_cec_volume ? 85 : g_settings.current_volume; ZapStart_arg.volume = g_settings.hdmi_cec_volume ? 85 : g_settings.current_volume;
ZapStart_arg.webtv_xml = &g_settings.webtv_xml; ZapStart_arg.webtv_xml = &g_settings.webtv_xml;
ZapStart_arg.webradio_xml = &g_settings.webradio_xml; ZapStart_arg.webradio_xml = &g_settings.webradio_xml;

View File

@@ -356,6 +356,7 @@ typedef enum
LOCALE_CI_CLOCK_EXTRA_HIGH, LOCALE_CI_CLOCK_EXTRA_HIGH,
LOCALE_CI_CLOCK_HIGH, LOCALE_CI_CLOCK_HIGH,
LOCALE_CI_CLOCK_NORMAL, LOCALE_CI_CLOCK_NORMAL,
LOCALE_CI_DELAY,
LOCALE_CI_EMPTY, LOCALE_CI_EMPTY,
LOCALE_CI_IGNORE_MSG, LOCALE_CI_IGNORE_MSG,
LOCALE_CI_INIT_FAILED, LOCALE_CI_INIT_FAILED,

View File

@@ -356,6 +356,7 @@ const char * locale_real_names[] =
"ci.clock_extra_high", "ci.clock_extra_high",
"ci.clock_high", "ci.clock_high",
"ci.clock_normal", "ci.clock_normal",
"ci.delay",
"ci.empty", "ci.empty",
"ci.ignore_msg", "ci.ignore_msg",
"ci.init_failed", "ci.init_failed",

View File

@@ -286,6 +286,9 @@ struct SNeutrinoSettings
int clockrec; int clockrec;
int ci_standby_reset; int ci_standby_reset;
int ci_clock; int ci_clock;
#if BOXMODEL_VUPLUS_ALL
int ci_delay;
#endif
int ci_ignore_messages; int ci_ignore_messages;
int ci_save_pincode; int ci_save_pincode;
int ci_tuner; int ci_tuner;

View File

@@ -38,13 +38,16 @@ typedef std::pair<volume_map_iterator_t,volume_map_iterator_t> volume_map_range_
/* complete zapit start thread-parameters in a struct */ /* complete zapit start thread-parameters in a struct */
typedef struct ZAPIT_start_arg typedef struct ZAPIT_start_arg
{ {
t_channel_id startchanneltv_id; t_channel_id startchanneltv_id;
t_channel_id startchannelradio_id; t_channel_id startchannelradio_id;
int uselastchannel; int uselastchannel;
int video_mode; int video_mode;
uint32_t osd_resolution; uint32_t osd_resolution;
int volume; int volume;
int ci_clock; int ci_clock;
#if BOXMODEL_VUPLUS_ALL
int ci_delay;
#endif
std::list<std::string> *webtv_xml; std::list<std::string> *webtv_xml;
std::list<std::string> *webradio_xml; std::list<std::string> *webradio_xml;
} Z_start_arg; } Z_start_arg;
@@ -55,28 +58,28 @@ enum {
}; };
typedef struct Zapit_config { typedef struct Zapit_config {
int writeChannelsNames; int writeChannelsNames;
int makeRemainingChannelsBouquet; int makeRemainingChannelsBouquet;
int saveLastChannel; int saveLastChannel;
int rezapTimeout; int rezapTimeout;
int fastZap; int fastZap;
int sortNames; int sortNames;
int scanPids; int scanPids;
int scanSDT; int scanSDT;
int cam_ci; int cam_ci;
int useGotoXX; int useGotoXX;
/* FE common */ /* FE common */
int feTimeout; int feTimeout;
int feRetries; int feRetries;
int noSameFE; int noSameFE;
int gotoXXLaDirection; int gotoXXLaDirection;
int gotoXXLoDirection; int gotoXXLoDirection;
double gotoXXLatitude; double gotoXXLatitude;
double gotoXXLongitude; double gotoXXLongitude;
int repeatUsals; int repeatUsals;
/* FE specific */ /* FE specific */
int highVoltage; int highVoltage;
int motorRotationSpeed; int motorRotationSpeed;
} t_zapit_config; } t_zapit_config;

View File

@@ -2597,6 +2597,11 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
ca->SetTSClock(ZapStart_arg->ci_clock * 1000000); ca->SetTSClock(ZapStart_arg->ci_clock * 1000000);
ca->Start(); ca->Start();
#if BOXMODEL_VUPLUS_ALL
//dvb wait delay for ci response
ca->SetCIDelay(ZapStart_arg->ci_delay);
#endif
eventServer = new CEventServer; eventServer = new CEventServer;
if (!zapit_server.prepare(ZAPIT_UDS_NAME)) { if (!zapit_server.prepare(ZAPIT_UDS_NAME)) {
perror(ZAPIT_UDS_NAME); perror(ZAPIT_UDS_NAME);