diff --git a/acinclude.m4 b/acinclude.m4 index 76545ce1f..5532dd03b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -429,9 +429,9 @@ _TUXBOX_APPS_LIB_PKGCONFIG($1,$2) AC_DEFUN([TUXBOX_BOXTYPE], [ AC_ARG_WITH(boxtype, - AS_HELP_STRING([--with-boxtype], [valid values: tripledragon, coolstream, spark, azbox, generic, armbox]), + AS_HELP_STRING([--with-boxtype], [valid values: tripledragon, coolstream, spark, azbox, generic, armbox, mipsbox]), [case "${withval}" in - tripledragon|coolstream|spark|azbox|generic|armbox) + tripledragon|coolstream|spark|azbox|generic|armbox|mipsbox) BOXTYPE="$withval" ;; *) @@ -443,6 +443,7 @@ AC_ARG_WITH(boxtype, AC_ARG_WITH(boxmodel, AS_HELP_STRING([--with-boxmodel], [valid for coolstream: hd1, hd2]) AS_HELP_STRING([], [valid for armbox: hd51, hd60, vusolo4k, bre2ze4k]) +AS_HELP_STRING([], [valid for mipsbox: vuduo]) AS_HELP_STRING([], [valid for generic: raspi]), [case "${withval}" in hd1|hd2) @@ -471,6 +472,13 @@ AS_HELP_STRING([], [valid for generic: raspi]), AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) fi ;; + vuduo) + if test "$BOXTYPE" = "mipsbox"; then + BOXMODEL="$withval" + else + AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) + fi + ;; raspi) if test "$BOXTYPE" = "generic"; then BOXMODEL="$withval" @@ -492,6 +500,7 @@ AM_CONDITIONAL(BOXTYPE_COOL, test "$BOXTYPE" = "coolstream") AM_CONDITIONAL(BOXTYPE_SPARK, test "$BOXTYPE" = "spark") AM_CONDITIONAL(BOXTYPE_GENERIC, test "$BOXTYPE" = "generic") AM_CONDITIONAL(BOXTYPE_ARMBOX, test "$BOXTYPE" = "armbox") +AM_CONDITIONAL(BOXTYPE_MIPSBOX, test "$BOXTYPE" = "mipsbox") AM_CONDITIONAL(BOXMODEL_CS_HD1, test "$BOXMODEL" = "hd1") AM_CONDITIONAL(BOXMODEL_CS_HD2, test "$BOXMODEL" = "hd2") @@ -500,6 +509,7 @@ AM_CONDITIONAL(BOXMODEL_HD51, test "$BOXMODEL" = "hd51") AM_CONDITIONAL(BOXMODEL_HD60, test "$BOXMODEL" = "hd60") AM_CONDITIONAL(BOXMODEL_VUSOLO4K, test "$BOXMODEL" = "vusolo4k") AM_CONDITIONAL(BOXMODEL_BRE2ZE4K, test "$BOXMODEL" = "bre2ze4k") +AM_CONDITIONAL(BOXMODEL_VUDUO, test "$BOXMODEL" = "vuduo") AM_CONDITIONAL(BOXMODEL_RASPI, test "$BOXMODEL" = "raspi") @@ -515,6 +525,8 @@ elif test "$BOXTYPE" = "generic"; then AC_DEFINE(HAVE_GENERIC_HARDWARE, 1, [building for a generic device like a standard PC]) elif test "$BOXTYPE" = "armbox"; then AC_DEFINE(HAVE_ARM_HARDWARE, 1, [building for an armbox]) +elif test "$BOXTYPE" = "mipsbox"; then + AC_DEFINE(HAVE_MIPS_HARDWARE, 1, [building for an mipsbox]) fi # TODO: do we need more defines? @@ -535,6 +547,9 @@ elif test "$BOXMODEL" = "vusolo4k"; then elif test "$BOXMODEL" = "bre2ze4k"; then AC_DEFINE(BOXMODEL_BRE2ZE4K, 1, [bre2ze4k]) AC_DEFINE(ENABLE_CHANGE_OSD_RESOLUTION, 1, [enable change the osd resolution]) +elif test "$BOXMODEL" = "vuduo"; then + AC_DEFINE(BOXMODEL_VUDUO, 1, [vuduo]) + AC_DEFINE(ENABLE_CHANGE_OSD_RESOLUTION, 1, [enable change the osd resolution]) elif test "$BOXMODEL" = "raspi"; then AC_DEFINE(BOXMODEL_RASPI, 1, [raspberry pi]) fi diff --git a/configure.ac b/configure.ac index 2b943da37..ec09f8b3b 100644 --- a/configure.ac +++ b/configure.ac @@ -159,6 +159,7 @@ fi if test "$BOXTYPE" = "coolstream" || test "$BOXTYPE" = "armbox" || + test "$BOXTYPE" = "mipsbox" || test "$BOXTYPE" = "generic" || test "$BOXTYPE" = "tripledragon" || test "$BOXTYPE" = "spark"; then diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index c3def6dcc..bcfbad15a 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -89,6 +89,11 @@ libneutrino_driver_a_SOURCES += \ fb_accel_arm.cpp \ simple_display.cpp endif +if BOXTYPE_MIPSBOX +libneutrino_driver_a_SOURCES += \ + fb_accel_mips.cpp \ + simple_display.cpp +endif if USE_STB_HAL AM_CPPFLAGS += \ @DIRECTFB_CFLAGS@ diff --git a/src/driver/display.h b/src/driver/display.h index 3655cb479..850926432 100644 --- a/src/driver/display.h +++ b/src/driver/display.h @@ -5,6 +5,6 @@ #if HAVE_TRIPLEDRAGON #include #endif -#if HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_AZBOX_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE #include #endif diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index 71f5f1538..308ae1f7a 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -227,4 +227,19 @@ class CFbAccelARM void setOsdResolutions(); }; +class CFbAccelMIPS + : public CFbAccel +{ + private: + fb_pixel_t *backbuffer; + public: + CFbAccelMIPS(); + ~CFbAccelMIPS(); + fb_pixel_t * getBackBufferPointer() const; + int setMode(unsigned int xRes, unsigned int yRes, unsigned int bpp); + int scale2Res(int size); + bool fullHdAvailable(); + void setOsdResolutions(); +}; + #endif diff --git a/src/driver/fb_generic.cpp b/src/driver/fb_generic.cpp index 3d0ffba3e..4940fafcd 100644 --- a/src/driver/fb_generic.cpp +++ b/src/driver/fb_generic.cpp @@ -142,6 +142,9 @@ CFrameBuffer* CFrameBuffer::getInstance() #endif #if HAVE_ARM_HARDWARE frameBuffer = new CFbAccelARM(); +#endif +#if HAVE_MIPS_HARDWARE + frameBuffer = new CFbAccelMIPS(); #endif if (!frameBuffer) frameBuffer = new CFrameBuffer(); diff --git a/src/driver/radiotext.cpp b/src/driver/radiotext.cpp index db94b1bdb..a771f1adb 100644 --- a/src/driver/radiotext.cpp +++ b/src/driver/radiotext.cpp @@ -737,7 +737,7 @@ void CRadioText::run() uint current_pid = 0; printf("CRadioText::run: ###################### Starting thread ######################\n"); -#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE int buflen = 0; unsigned char *buf = NULL; audioDemux = new cDemux(0); // live demux @@ -768,7 +768,7 @@ void CRadioText::run() } mutex.unlock(); if (pid) { -#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE int n; unsigned char tmp[6]; @@ -811,7 +811,7 @@ void CRadioText::run() } } } -#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_GENERIC_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if (buf) free(buf); #endif diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 5942b7423..b7729a2f9 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1345,7 +1345,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 now_pressed -= (t2.tv_usec + t2.tv_sec * 1000000ULL); } SHTDCNT::getInstance()->resetSleepTimer(); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if ((ev.code == 0 || ev.code == 1) && ev.value && firstKey) continue; #endif @@ -1743,7 +1743,7 @@ int CRCInput::translate(int code) return RC_page_up; case KEY_CHANNELDOWN: return RC_page_down; -#ifdef HAVE_ARM_HARDWARE +#ifdef HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE case KEY_SWITCHVIDEOMODE: return RC_mode; case KEY_VIDEO: diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index 42309d8ee..b5010bcb5 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -223,7 +223,7 @@ class CRCInput RC_tv = KEY_TV, RC_radio = KEY_RADIO, RC_text = KEY_TEXT, -#if BOXMODEL_VUSOLO4K +#if BOXMODEL_VUSOLO4K || BOXMODEL_VUDUO RC_info = 0xFFFE, RC_epg = KEY_INFO, #else diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 3c64fb264..b59801709 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -178,7 +178,7 @@ void CRecordInstance::WaitRecMsg(time_t StartTime, time_t WaitTime) usleep(100000); } -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE void recordingFailureHelper(void *data) { CRecordInstance *inst = (CRecordInstance *) data; @@ -279,7 +279,7 @@ record_error_msg_t CRecordInstance::Start(CZapitChannel * channel) if (record == NULL) { -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE record = new cRecord(channel->getRecordDemux(), g_settings.recording_bufsize_dmx * 1024 * 1024, g_settings.recording_bufsize * 1024 * 1024); record->setFailureCallback(&recordingFailureHelper, this); #else diff --git a/src/driver/simple_display.cpp b/src/driver/simple_display.cpp index 13f3468b6..d7d48a350 100644 --- a/src/driver/simple_display.cpp +++ b/src/driver/simple_display.cpp @@ -64,6 +64,13 @@ static bool usb_icon = false; static bool timer_icon = false; #endif +#if HAVE_MIPS_HARDWARE +#define DISPLAY_DEV "/dev/dbox/oled0" +#include +static bool usb_icon = false; +static bool timer_icon = false; +#endif + static char volume = 0; //static char percent = 0; static bool power = true; @@ -239,7 +246,7 @@ void CLCD::showServicename(std::string name, bool) strncpy(display_text, servicename.c_str(), sizeof(display_text) - 1); display_text[sizeof(display_text) - 1] = '\0'; upd_display = true; -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE wake_up(); #endif } @@ -323,7 +330,7 @@ void CLCD::showTime(bool force) if (force || last_display || (switch_name_time_cnt == 0 && ((hour != t->tm_hour) || (minute != t->tm_min)))) { hour = t->tm_hour; minute = t->tm_min; -#if !HAVE_SPARK_HARDWARE && !HAVE_ARM_HARDWARE +#if !HAVE_SPARK_HARDWARE && !HAVE_ARM_HARDWARE && !HAVE_MIPS_HARDWARE int ret = -1; #endif #if HAVE_SPARK_HARDWARE @@ -334,7 +341,7 @@ void CLCD::showTime(bool force) #endif if ((g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT) || (g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM)) { -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if (mode == MODE_STANDBY || (g_settings.lcd_info_line && mode == MODE_TVRADIO)) #else if (ret < 0 && servicename.empty()) @@ -414,12 +421,12 @@ void CLCD::showVolume(const char vol, const bool update) SetIcons(SPARK_MUTE, 0); sprintf(s, vol_fmt[type], volume); } -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if (g_info.hw_caps->display_type == HW_DISPLAY_LINE_TEXT) sprintf(s,"%.*s", volume*g_info.hw_caps->display_xres/100, "================"); #endif ShowText(s); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE wake_up(); #endif vol_active = true; @@ -436,7 +443,7 @@ void CLCD::showMenuText(const int, const char *text, const int, const bool) std::string tmp = text; replace_umlauts(tmp); ShowText(tmp.c_str()); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE wake_up(); #endif } @@ -448,7 +455,7 @@ void CLCD::showAudioTrack(const std::string &, const std::string & title, const std::string tmp = title; replace_umlauts(tmp); ShowText(tmp.c_str()); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE wake_up(); #endif } @@ -506,7 +513,7 @@ void CLCD::setMode(const MODES m, const char * const title) showclock = true; showTime(); } -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE wake_up(); #endif } @@ -553,6 +560,9 @@ void CLCD::setBrightness(int dimm) #elif HAVE_ARM_HARDWARE std::string value = to_string(255/15*dimm); proc_put("/proc/stb/lcd/oled_brightness", value.c_str(), value.length()); +#elif HAVE_MIPS_HARDWARE + std::string value = to_string(255/15*dimm); + proc_put("/proc/stb/fp/oled_brightness", value.c_str(), value.length()); #else (void)dimm; // avoid compiler warning #endif @@ -755,7 +765,7 @@ void CLCD::SetIcons(int, bool) void CLCD::ShowDiskLevel() { -#if !HAVE_GENERIC_HARDWARE && !HAVE_ARM_HARDWARE +#if !HAVE_GENERIC_HARDWARE && !HAVE_ARM_HARDWARE && !HAVE_MIPS_HARDWARE int hdd_icons[9] ={24, 23, 21, 20, 19, 18, 17, 16, 22}; int percent, digits, i, j; uint64_t t, u; @@ -794,7 +804,7 @@ void CLCD::UpdateIcons() ShowDiskLevel(); SetIcons(SPARK_USB, usb_icon); #endif -#if HAVE_SPARK_HARDWARE || HAVE_ARM_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE CZapitChannel * chan = CZapit::getInstance()->GetCurrentChannel(); if (chan) { diff --git a/src/driver/volume.cpp b/src/driver/volume.cpp index 891aa7d02..f78003f57 100644 --- a/src/driver/volume.cpp +++ b/src/driver/volume.cpp @@ -113,7 +113,7 @@ void CVolume::setVolume(const neutrino_msg_t key) neutrino_msg_data_t data = 0; uint64_t timeoutEnd = 0; -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if (g_settings.hdmi_cec_volume) g_settings.current_volume = hdmi_cec::getInstance()->GetVolume(); #endif @@ -136,7 +136,7 @@ void CVolume::setVolume(const neutrino_msg_t key) g_RCInput->getMsg(&tmp, &data, 0); if (tmp != CRCInput::RC_timeout) g_RCInput->postMsg(tmp, data); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE } else if (g_settings.hdmi_cec_volume) { diff --git a/src/gui/audio_setup.cpp b/src/gui/audio_setup.cpp index 8eda746a1..983c1e7b5 100644 --- a/src/gui/audio_setup.cpp +++ b/src/gui/audio_setup.cpp @@ -154,7 +154,7 @@ int CAudioSetup::showAudioSetup() CMenuOptionChooser * as_oj_ddsubchn = new CMenuOptionChooser(LOCALE_AUDIOMENU_DOLBYDIGITAL, &g_settings.audio_DolbyDigital, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); as_oj_ddsubchn->setHint("", LOCALE_MENU_HINT_AUDIO_DD); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE CMenuOptionChooser * as_oj_ac3 = new CMenuOptionChooser(LOCALE_AUDIOMENU_AC3, &g_settings.ac3_pass, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); as_oj_ac3->setHint("", LOCALE_MENU_HINT_AUDIO_AC3); @@ -171,7 +171,7 @@ int CAudioSetup::showAudioSetup() //dd via spdif CMenuOptionChooser * as_oj_dd_spdif = new CMenuOptionChooser(LOCALE_AUDIOMENU_SPDIF_DD, &g_settings.spdif_dd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, audioSetupNotifier); as_oj_dd_spdif->setHint("", LOCALE_MENU_HINT_AUDIO_SPDIF_DD); -#endif // HAVE_ARM_HARDWARE +#endif // HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE CMenuOptionChooser * as_oj_avsync = NULL; CMenuOptionNumberChooser * as_oj_vsteps = NULL; @@ -235,14 +235,14 @@ int CAudioSetup::showAudioSetup() audioSettings->addItem(as_oj_analogmode); audioSettings->addItem(GenericMenuSeparatorLine); //--------------------------------------------------------- -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE audioSettings->addItem(as_oj_ac3); audioSettings->addItem(as_oj_dts); #else if (g_info.hw_caps->has_HDMI) audioSettings->addItem(as_oj_dd_hdmi); audioSettings->addItem(as_oj_dd_spdif); -#endif // HAVE_ARM_HARDWARE +#endif // HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE audioSettings->addItem(as_oj_ddsubchn); //--------------------------------------------------------- audioSettings->addItem(GenericMenuSeparatorLine); diff --git a/src/gui/audiomute.cpp b/src/gui/audiomute.cpp index da408782c..928410450 100644 --- a/src/gui/audiomute.cpp +++ b/src/gui/audiomute.cpp @@ -64,7 +64,7 @@ void CAudioMute::AudioMute(int newValue, bool isEvent) CVFD::getInstance()->setMuted(newValue); neutrino->setCurrentMuted(newValue); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if (g_settings.hdmi_cec_volume) hdmi_cec::getInstance()->toggle_mute(); else diff --git a/src/gui/cam_menu.cpp b/src/gui/cam_menu.cpp index 56138932f..5d963f1f5 100644 --- a/src/gui/cam_menu.cpp +++ b/src/gui/cam_menu.cpp @@ -142,7 +142,7 @@ 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 HAVE_ARM_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)); #else cammenu->addItem( new CMenuOptionNumberChooser(LOCALE_CI_CLOCK, &g_settings.ci_clock, true, 6, 12, this)); diff --git a/src/gui/cec_setup.cpp b/src/gui/cec_setup.cpp index 6034a74fc..3a154ad88 100644 --- a/src/gui/cec_setup.cpp +++ b/src/gui/cec_setup.cpp @@ -97,7 +97,7 @@ int CCECSetup::showMenu() cec1->setHint("", LOCALE_MENU_HINT_CEC_VIEW_ON); cec2 = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_STANDBY, &g_settings.hdmi_cec_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF, this); cec2->setHint("", LOCALE_MENU_HINT_CEC_STANDBY); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE cec3 = new CMenuOptionChooser(LOCALE_VIDEOMENU_HDMI_CEC_VOLUME, &g_settings.hdmi_cec_volume, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF, this); cec3->setHint("", LOCALE_MENU_HINT_CEC_VOLUME); #endif @@ -107,7 +107,7 @@ int CCECSetup::showMenu() //------------------------------------------------------- cec->addItem(cec1); cec->addItem(cec2); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE cec->addItem(cec3); #endif @@ -133,7 +133,7 @@ bool CCECSetup::changeNotify(const neutrino_locale_t OptionName, void * /*data*/ printf("[neutrino CEC Settings] %s set CEC settings...\n", __FUNCTION__); cec1->setActive(g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF); cec2->setActive(g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE cec3->setActive(g_settings.hdmi_cec_mode != VIDEO_HDMI_CEC_MODE_OFF); #endif videoDecoder->SetCECMode((VIDEO_HDMI_CEC_MODE)g_settings.hdmi_cec_mode); diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 4b2587dda..60201ddaf 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -214,7 +214,7 @@ void CHDDMenuHandler::getBlkIds() hdd_s hdd; hdd.devname = std::string(buff + 5); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if (strncmp(hdd.devname.c_str(), "mmcblk", 6) == 0) continue; #endif diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 89e6df7a3..2b9bb2359 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -84,7 +84,7 @@ //NI InfoIcons #include -#if HAVE_COOL_HARDWARE || HAVE_ARM_HARDWARE +#if HAVE_COOL_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE #define LCD_MODE CVFD::MODE_MENU_UTF8 #else #define LCD_MODE CVFD::MODE_MOVIE diff --git a/src/gui/record_setup.cpp b/src/gui/record_setup.cpp index 7460d173b..aedd52a8c 100644 --- a/src/gui/record_setup.cpp +++ b/src/gui/record_setup.cpp @@ -255,7 +255,7 @@ int CRecordSetup::showRecordSetup() cover->setHint("", LOCALE_MENU_HINT_RECORD_AUTO_COVER); recordingSettings->addItem(cover); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE CMenuOptionNumberChooser *ch; ch = new CMenuOptionNumberChooser(LOCALE_EXTRA_RECORD_BUFSIZE, &g_settings.recording_bufsize, true, 1, 25, NULL); diff --git a/src/gui/update.cpp b/src/gui/update.cpp index ca176cb67..234885ba3 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -78,7 +78,7 @@ #include -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE #include extern cVideo * videoDecoder; #endif @@ -97,7 +97,7 @@ extern int allow_flash; #define LIST_OF_UPDATES_LOCAL_FILENAME "update.list" // TODO: move this mess below to libstb-hal -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE #define FILEBROWSER_UPDATE_FILTER "tgz" #define MTD_OF_WHOLE_IMAGE 999 #define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd999" @@ -362,7 +362,7 @@ bool CFlashUpdate::selectHttpImage(void) } } #endif -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if (gotImage && (filename.substr(filename.find_last_of(".") + 1) == "tgz")) { // manipulate fileType for tgz-packages @@ -616,7 +616,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey) sleep(2); ft.reboot(); } -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE else if (fileType == 'Z') // flashing image with ofgwrite { showGlobalStatus(100); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 841b7a3b4..bcfe0e2a3 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -446,13 +446,13 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.srs_algo = configfile.getInt32( "srs_algo", 1); g_settings.srs_ref_volume = configfile.getInt32( "srs_ref_volume", 75); //NI g_settings.srs_nmgr_enable = configfile.getInt32( "srs_nmgr_enable", 0); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE g_settings.ac3_pass = configfile.getInt32( "ac3_pass", 0); g_settings.dts_pass = configfile.getInt32( "dts_pass", 0); #else g_settings.hdmi_dd = configfile.getInt32( "hdmi_dd", 0); g_settings.spdif_dd = configfile.getInt32( "spdif_dd", 1); -#endif // HAVE_ARM_HARDWARE +#endif // HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE g_settings.analog_out = configfile.getInt32( "analog_out", 1); g_settings.avsync = configfile.getInt32( "avsync", 1); g_settings.clockrec = configfile.getInt32( "clockrec", 1); @@ -482,7 +482,7 @@ int CNeutrinoApp::loadSetup(const char * fname) #endif g_settings.ci_standby_reset = configfile.getInt32("ci_standby_reset", 0); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE g_settings.ci_clock = configfile.getInt32("ci_clock", 6); #else g_settings.ci_clock = configfile.getInt32("ci_clock", 9); @@ -755,7 +755,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.recording_stream_subtitle_pids = configfile.getBool("recordingmenu.stream_subtitle_pids", true); g_settings.recording_stream_pmt_pid = configfile.getBool("recordingmenu.stream_pmt_pid" , false); g_settings.recording_filename_template = configfile.getString("recordingmenu.filename_template" , "%C_%T_%d_%t"); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE g_settings.recording_bufsize = configfile.getInt32("recording_bufsize", 4); g_settings.recording_bufsize_dmx = configfile.getInt32("recording_bufsize_dmx", 2); #endif @@ -1416,7 +1416,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setInt32( "srs_algo", g_settings.srs_algo); configfile.setInt32( "srs_ref_volume", g_settings.srs_ref_volume); configfile.setInt32( "srs_nmgr_enable", g_settings.srs_nmgr_enable); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE configfile.setInt32( "ac3_pass", g_settings.ac3_pass); configfile.setInt32( "dts_pass", g_settings.dts_pass); #else @@ -1633,7 +1633,7 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setBool ("recordingmenu.stream_subtitle_pids" , g_settings.recording_stream_subtitle_pids ); configfile.setBool ("recordingmenu.stream_pmt_pid" , g_settings.recording_stream_pmt_pid ); configfile.setString("recordingmenu.filename_template" , g_settings.recording_filename_template ); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE configfile.setInt32 ("recording_bufsize" , g_settings.recording_bufsize); configfile.setInt32 ("recording_bufsize_dmx" , g_settings.recording_bufsize_dmx); #endif @@ -2690,7 +2690,7 @@ TIMER_START(); // init audio settings audioDecoder->SetSRS(g_settings.srs_enable, g_settings.srs_nmgr_enable, g_settings.srs_algo, g_settings.srs_ref_volume); //audioDecoder->setVolume(g_settings.current_volume, g_settings.current_volume); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE audioDecoder->SetHdmiDD(g_settings.ac3_pass ? true : false); audioDecoder->SetSpdifDD(g_settings.dts_pass ? true : false); #else @@ -3028,7 +3028,7 @@ void CNeutrinoApp::RealRun() if (msg <= CRCInput::RC_MaxRC) CScreenSaver::getInstance()->resetIdleTime(); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE if (mode == NeutrinoModes::mode_radio) #else if (mode == NeutrinoModes::mode_radio || mode == NeutrinoModes::mode_webradio) diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 559f2f2ba..028a7ce75 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -426,7 +426,7 @@ bool CAudioSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void g_Zapit->setAudioMode(g_settings.audio_AnalogMode); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_ANALOG_OUT)) { audioDecoder->EnableAnalogOut(g_settings.analog_out ? true : false); -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_AC3)) { audioDecoder->SetHdmiDD(g_settings.ac3_pass ? true : false); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_DTS)) { diff --git a/src/system/settings.h b/src/system/settings.h index acd46f2e4..7b5e33397 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -253,13 +253,13 @@ struct SNeutrinoSettings int srs_algo; int srs_ref_volume; int srs_nmgr_enable; -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE int ac3_pass; int dts_pass; #else int hdmi_dd; int spdif_dd; -#endif // HAVE_ARM_HARDWARE +#endif // HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE int analog_out; int audio_volume_percent_ac3; int audio_volume_percent_pcm; @@ -513,7 +513,7 @@ struct SNeutrinoSettings int recording_stream_vtxt_pid; int recording_stream_subtitle_pids; int recording_stream_pmt_pid; -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE int recording_bufsize; int recording_bufsize_dmx; #endif diff --git a/src/zapit/src/capmt.cpp b/src/zapit/src/capmt.cpp index 7cf0402c3..9e81dbd2e 100644 --- a/src/zapit/src/capmt.cpp +++ b/src/zapit/src/capmt.cpp @@ -257,7 +257,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start break; case STREAM: case RECORD: -#if HAVE_SPARK_HARDWARE || HAVE_ARM_HARDWARE +#if HAVE_SPARK_HARDWARE || HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE // INFO("RECORD/STREAM(%d): fe_num %d rec_dmx %d", mode, frontend ? frontend->getNumber() : -1, channel->getRecordDemux()); if(frontend) source = frontend->getNumber(); diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 0a44d5272..2f02bea19 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -310,7 +310,7 @@ void CFrontend::getFEInfo(void) printf("[fe%d/%d] frontend fd %d type %d\n", adapter, fenumber, fd, info.type); bool legacy = true; -#if HAVE_ARM_HARDWARE +#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE std::ifstream in; if (adapter == 0) in.open("/proc/bus/nim_sockets"); @@ -333,7 +333,7 @@ void CFrontend::getFEInfo(void) } in.close(); } -#endif // HAVE_ARM_HARDWARE +#endif // HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE deliverySystemMask = UNKNOWN_DS; forcedSystemMask = UNKNOWN_DS;