diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 9c26aa3a4..3c652fcf4 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -329,6 +329,7 @@ ci.clock CI Takt (Mhz) ci.clock_extra_high extra hoch ci.clock_high hoch ci.clock_normal normal +ci.delay DVB-CI-Verzögerung ci.empty Kein CAM im Slot ci.ignore_msg CA Meldungen ignorieren ci.init_failed CAM-Init fehlgeschlagen diff --git a/data/locale/english.locale b/data/locale/english.locale index 1bb4c8f2f..d73812e28 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -329,6 +329,7 @@ ci.clock CI clock (Mhz) ci.clock_extra_high extra high ci.clock_high high ci.clock_normal normal +ci.delay DVB-CI delay ci.empty No CAM in slot ci.ignore_msg Ignore CA messages ci.init_failed CAM init failed diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index c3e3a6358..6ec9bc25d 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -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)) -#if BOXMODEL_VUPLUS_ALL +#if BOXMODEL_VUPLUS #define CI_CLOCK_OPTION_COUNT 3 static const CMenuOptionChooser::keyval CI_CLOCK_OPTIONS[CI_CLOCK_OPTION_COUNT] = { { 6, LOCALE_CI_CLOCK_NORMAL }, { 7, LOCALE_CI_CLOCK_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 #define CI_CLOCK_OPTION_COUNT 2 static const CMenuOptionChooser::keyval CI_CLOCK_OPTIONS[CI_CLOCK_OPTION_COUNT] = { @@ -150,17 +158,20 @@ int CCAMMenuHandler::doMainMenu() int CiSlots = ca ? ca->GetNumberCISlots() : 0; 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 - 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 - 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 } - 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_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)); //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); ci_mode->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_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) { +#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)) { printf("CCAMMenuHandler::changeNotify: ci_clock %d\n", g_settings.ci_clock); ca->SetTSClock(g_settings.ci_clock * 1000000); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index aeaed2741..de6a4343f 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -486,6 +486,9 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.ci_clock = configfile.getInt32("ci_clock", 6); #else g_settings.ci_clock = configfile.getInt32("ci_clock", 9); +#endif +#if BOXMODEL_VUPLUS + g_settings.ci_delay = configfile.getInt32("ci_delay", 256); #endif g_settings.ci_ignore_messages = configfile.getInt32("ci_ignore_messages", 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_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_save_pincode", g_settings.ci_save_pincode); configfile.setString("ci_pincode", g_settings.ci_pincode); @@ -2737,6 +2743,9 @@ TIMER_START(); ZapStart_arg.uselastchannel = g_settings.uselastchannel; ZapStart_arg.video_mode = g_settings.video_Mode; 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.webtv_xml = &g_settings.webtv_xml; ZapStart_arg.webradio_xml = &g_settings.webradio_xml; diff --git a/src/system/locals.h b/src/system/locals.h index c74453a23..6ef9ca351 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -356,6 +356,7 @@ typedef enum LOCALE_CI_CLOCK_EXTRA_HIGH, LOCALE_CI_CLOCK_HIGH, LOCALE_CI_CLOCK_NORMAL, + LOCALE_CI_DELAY, LOCALE_CI_EMPTY, LOCALE_CI_IGNORE_MSG, LOCALE_CI_INIT_FAILED, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 3f58ed3c6..c6de995d0 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -356,6 +356,7 @@ const char * locale_real_names[] = "ci.clock_extra_high", "ci.clock_high", "ci.clock_normal", + "ci.delay", "ci.empty", "ci.ignore_msg", "ci.init_failed", diff --git a/src/system/settings.h b/src/system/settings.h index c81ecb4b9..fa100fe33 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -286,6 +286,9 @@ struct SNeutrinoSettings int clockrec; int ci_standby_reset; int ci_clock; +#if BOXMODEL_VUPLUS_ALL + int ci_delay; +#endif int ci_ignore_messages; int ci_save_pincode; int ci_tuner; diff --git a/src/zapit/include/zapit/zapit.h b/src/zapit/include/zapit/zapit.h index b36b9375e..46feb411a 100644 --- a/src/zapit/include/zapit/zapit.h +++ b/src/zapit/include/zapit/zapit.h @@ -38,13 +38,16 @@ typedef std::pair volume_map_range_ /* complete zapit start thread-parameters in a struct */ typedef struct ZAPIT_start_arg { - t_channel_id startchanneltv_id; - t_channel_id startchannelradio_id; - int uselastchannel; - int video_mode; - uint32_t osd_resolution; + t_channel_id startchanneltv_id; + t_channel_id startchannelradio_id; + int uselastchannel; + int video_mode; + uint32_t osd_resolution; int volume; - int ci_clock; + int ci_clock; +#if BOXMODEL_VUPLUS_ALL + int ci_delay; +#endif std::list *webtv_xml; std::list *webradio_xml; } Z_start_arg; @@ -55,28 +58,28 @@ enum { }; typedef struct Zapit_config { - int writeChannelsNames; - int makeRemainingChannelsBouquet; - int saveLastChannel; - int rezapTimeout; - int fastZap; - int sortNames; - int scanPids; - int scanSDT; - int cam_ci; - int useGotoXX; - /* FE common */ - int feTimeout; - int feRetries; - int noSameFE; - int gotoXXLaDirection; - int gotoXXLoDirection; - double gotoXXLatitude; - double gotoXXLongitude; - int repeatUsals; - /* FE specific */ - int highVoltage; - int motorRotationSpeed; + int writeChannelsNames; + int makeRemainingChannelsBouquet; + int saveLastChannel; + int rezapTimeout; + int fastZap; + int sortNames; + int scanPids; + int scanSDT; + int cam_ci; + int useGotoXX; + /* FE common */ + int feTimeout; + int feRetries; + int noSameFE; + int gotoXXLaDirection; + int gotoXXLoDirection; + double gotoXXLatitude; + double gotoXXLongitude; + int repeatUsals; + /* FE specific */ + int highVoltage; + int motorRotationSpeed; } t_zapit_config; diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 2a21f9c31..72de1371c 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -2597,6 +2597,11 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg) ca->SetTSClock(ZapStart_arg->ci_clock * 1000000); ca->Start(); +#if BOXMODEL_VUPLUS_ALL + //dvb wait delay for ci response + ca->SetCIDelay(ZapStart_arg->ci_delay); +#endif + eventServer = new CEventServer; if (!zapit_server.prepare(ZAPIT_UDS_NAME)) { perror(ZAPIT_UDS_NAME);