diff --git a/alarm/xbmc-cubox-git/PKGBUILD b/alarm/xbmc-cubox-git/PKGBUILD deleted file mode 100644 index ed807eff8..000000000 --- a/alarm/xbmc-cubox-git/PKGBUILD +++ /dev/null @@ -1,205 +0,0 @@ - -buildarch=4 - -pkgname="xbmc-cubox-git" -pkgver=20130315 -pkgrel=1 -pkgdesc="A software media player and entertainment hub for digital media for the Cubox" -arch=("armv7h") -url="http://xbmc.org" -license=("GPL" "LGPL") -depends=("faac" "faad2" "jasper" "hicolor-icon-theme" "libass" "libcdio" \ - "libgl" "libmad" "libmicrohttpd" "libplist" "libmodplug" "libmpeg2" \ - "libmysqlclient" "libsamplerate" "libxtst" "lzo2" "python2" \ - "sdl_image>=1.2.10" "sdl_mixer" "smbclient" "unzip" "wavpack" "mesa-demos" \ - "xorg-xdpyinfo" "yajl" "glew" "tinyxml" "xf86-video-dove" "marvell-ipp" \ - "avahi" "bluez" "libssh" "ffmpeg" "taglib>=1.8" "libnfs" "libdvdcss" \ - "libbluray" "libdvdread" "libcec-cubox") -makedepends=("boost" "cmake" "git" "gperf" "nasm" "zip" "swig" "java-runtime") -optdepends=("lirc: remote controller support" \ - "udisks: automount external drives" \ - "upower: used to trigger suspend functionality" \ - "unrar: access compressed files without unpacking them" \ - "xorg-xinit: autostart xbmc") -conflict=("xbmc" "xbmc-git") -provides=("xbmc" "xbmc-git") -replaces=("marvell-xbmc-git") -source=("https://dl.dropbox.com/u/38673799/XbmcCuBoxPatches-Rev10.tar.xz" \ - "http://alunamation.com/archlinux/arm/AdditionalXbmcCuBoxPatches-Rev10.2.tar.xz" \ - "xbmc.service" \ - "xbmc.install") -md5sums=("55813f68e1ab05405451f9791e59e68b" \ - "8d3020d871850176bb8758a914562de2" \ - "f409bc2f0c817f5ecf7ecceafcd838fb" \ - "ef0236567e95b462010a5607f76d2b45") -install="xbmc.install" - -_gitroot="git://github.com/xbmc/xbmc.git" -_gitname="xbmc" - -_prefix=/usr -_patches=( -# "Xbmc-git-Python-2.7-2.patch" \ - "Lircmap_xml.patch" \ - "Xbmc-git-force-vdpau.patch" \ - "Xbmc-git-force-vdpau-2.patch" \ - "Xbmc-git-UDisksProvider-iso9660.patch" \ - "Xbmc-git-libmpeg2-vdpau-vertical-green-bars-fix.patch" \ - "01-Xbmc-Add-Marvell-Dove.patch" \ - "02.1-Xbmc-MathUtils_h-TARGET_MARVELL_DOVE-20120809.patch" \ - "03-Xbmc-Add-VMETA-Codec-20120927.patch" \ - "04-Xbmc-Add-Dove-Overlay-20120912.patch" \ - "05-Xbmc-VMeta-Fixups.patch" \ - "06-Xbmc-Configure-platform-Marvell-Dove-20120925.patch" \ - "07-Xbmc-libsquish-arm-20120925.patch" \ -# "09-Xbmc-WinSystemGLES_cpp.patch" \ - "10-Xbmc-ManageDisplayDove.patch" \ - "11-Xbmc-Marvell-use-Pulse.patch" \ - "12-Xbmc-Marvell-Dove-cortex-a9.patch" \ - "13-Xbmc-Marvell-Dove-force-iwmmxt.patch" \ - "14-Xbmc-Marvell-Dove-force-iwmmxt-2.patch" \ - "15-Xbmc-Marvell-Dove-enable-armv5te.patch" \ -# "Xbmc-git-PulseAudio-Updates-20120926.patch" \ - "41-Xbmc-VMETA-Updates-2.patch" \ - "36-Xbmc-VMETA-use-ffmpeg-for-thumbs.patch" \ - "Xbmc-git-CJobWorker-THREAD_PRIORITY_LOWEST.patch" \ - "Xbmc-git-pthread-SetThreadInfo-20120806.patch" \ -# "Xbmc-git-linux-Thread-Name-20120806.patch" \ - "xbmc-frodo-433f681-811.12-smoother-page-flip.patch" \ - "xbmc-frodo-433f681-811.13-change-email-address.patch" \ - "Xbmc-git-JobManager-Force-exit-after-2.patch" \ - "Xbmc-git-AnnouncementManager-Locks.patch" \ - "34-Xbmc-Dove-Gpu-Backoff-20120818.patch" \ - "38-Xbmc-RenderManager.patch" \ - "Xbmc-projectM-selectPreset-avoid-abort.patch" \ - "Xbmc-git-Thread-StopThread-20120809.patch" \ - "Xbmc-git-DVDPlayer-StopThread.patch" \ - "Xbmc-git-CDVDAudio-Drain.patch" \ - "Xbmc-git-VideoReferenceClock-NvidiaWrapper.patch" \ - "Xbmc-git-WinSystemX11-SDL_CreateRGBSurfaceFrom-20120817.patch" \ - "Xbmc-git-WinSystemX11-SDL_CreateRGBSurfaceFrom-no-Dove.patch" \ - "XbmcPvr-PvrManager-StopUpdateThread.patch" \ - "Xbmc-git-BandwidthRequester-20120723.patch" \ -# "Xbmc-git-enable-systemd-power-management.patch" \ -# "Xbmc-git-enable-systemd-power-management-2.patch" \ - # "Xbmc-git-arm-linux.patch" \ - # "Xbmc-git-VMETA-TimeStamp.patch" \ -# "Xbmc-git-VMETA-No-Prebuf.patch" \ - "Xbmc-git-LinuxTimezone-systemd.patch" \ - "Xbmc-git-DoveOverlay-20120806.patch" \ - "Xbmc-git-Event-Constructor.patch" \ - "Xbmc-git-EventGroup-Constructor.patch" \ - "Xbmc-git-Thread-Constructor.patch" \ - "Xbmc-git-FileCache-Constructor.patch" \ - "Xbmc-git-FileCache-Constructor-2.patch" \ - "Xbmc-git-Database-Constructor.patch" \ - "Xbmc-git-Event-groupListMutex-SharedSection.patch" \ - "Xbmc-git-RecursiveMutex.patch" \ - "Xbmc-git-PrintStackSize.patch" \ -# "Xbmc-git-no-WinEGLPlatformAndroid-20120926.patch" \ - "Xbmc-git-TexturePacker-Makefile.patch" \ - "Xbmc-git-dove-dont-specify-audio.patch" \ - "Xbmc-git-Repository-checksum-segfault-20120927.patch" \ - "Xbmc-git-DVDStreamInfo-cap-channels-at-8.patch" \ - "Xbmc-git-DVDAudioCodecFFmpeg-Constructor-20120906.patch" \ - "Xbmc-git-SDL_PollEvent.patch" \ - # "Xbmc-git-no-error-without-java.patch" \ - # "08-Xbmc-WinbindingEGL_cpp.patch" \ - # "XbmcPvr-git-debug-tvheadend.patch" \ - # "XbmcPvr-git-HTSPDemux-GetSignalStatus-20120906.patch" \ - # "XbmcPvr-git-pvr-addons-DESTDIR.patch" \ - # "37-Xbmc-debug-BitstreamConverter.patch" \ -) - -build() { - - msg "Connecting to GIT server..." - if [ -d $_gitname ]; then - cd "${_gitname}" - git clean -dxf - git reset --hard - git pull origin master - else - git clone "${_gitroot}" "${_gitname}" - cd "${_gitname}" - fi - msg2 "checkout done or server timeout" - - git checkout 7e6433169c93abd22e28a828fa024cf744fe5e86 - - export LDFLAGS="$LDFLAGS -L/opt/marvell-libgfx/lib" - export CFLAGS="$CFLAGS -I/opt/marvell-libgfx/include" - export CXXFLAGS="$CXXFLAGS -I/opt/marvell-libgfx/include" - - # fix configure: error: Submodule lib/libdvd/libdvdcss failed to configure - sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g" \ - -i lib/libdvd/libdvdcss/configure.ac - - # Java workaround (issue #360). - mkdir tmp_lib - ln -s /usr/lib/libffi.so.6 tmp_lib/libffi.so.5 - export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${PWD}/tmp_lib" - - # fix lsb_release dependency - sed -i -e "s:/usr/bin/lsb_release -d:cat /etc/arch-release:" xbmc/utils/SystemInfo.cpp - - msg "Applying patchs" - for _patch in ${_patches[@]}; do - patch -p1 -i "${srcdir}/XbmcCuBoxPatches-Rev10/${_patch}" - done - - rm "${srcdir}/AdditionalXbmcCuBoxPatches-Rev10.2/Use-Dove-hardware-graphics-scaler.patch" - for _patch in "${srcdir}"/AdditionalXbmcCuBoxPatches-Rev10.2/*; do - patch -p1 -i "${_patch}" - done - - sed -i -e "s/softfp/hard/g" configure.in - - msg "Bootstrapping" - ./bootstrap - - msg "Configuring" - export PYTHON_VERSION=2 - - ./configure --prefix="${_prefix}" \ - --with-platform=marvell-dove \ - --enable-external-libraries \ - --enable-gles \ - --disable-debug \ - --disable-vaapi \ - --disable-vdpau \ - --disable-hal - - msg "make" - make -} - -package() { - cd "${srcdir}/${_gitname}" - # Running make install - make DESTDIR="${pkgdir}" install - - # run feh with python2 - sed -i -e "s/python/python2/g" ${pkgdir}/${_prefix}/bin/xbmc - - # lsb_release fix - sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}/${_prefix}/bin/xbmc" - sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}/${_prefix}/bin/xbmc" - - # Tools - install -D -m 0755 "${srcdir}/${_gitname}/xbmc-xrandr" "${pkgdir}/${_prefix}/share/xbmc/xbmc-xrandr" - install -D -m 0755 "${srcdir}/${_gitname}/tools/TexturePacker/TexturePacker" "${pkgdir}/${_prefix}/share/xbmc/" - - # Licenses - install -d -m 0755 "${pkgdir}/${_prefix}/share/licenses/${pkgname}" - for licensef in LICENSE.GPL copying.txt; do - mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" \ - "${pkgdir}/${_prefix}/share/licenses/${pkgname}" - done - - # systemd stuff - install -Dm0644 "${srcdir}/xbmc.service" \ - "${pkgdir}/usr/lib/systemd/system/xbmc.service" -} - -# vim:set noet: diff --git a/alarm/xbmc-cubox-git/Xbmc-git-Python-2.7-2.patch b/alarm/xbmc-cubox-git/Xbmc-git-Python-2.7-2.patch deleted file mode 100644 index 8ca123308..000000000 --- a/alarm/xbmc-cubox-git/Xbmc-git-Python-2.7-2.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- ./Makefile.include.in.orig 2012-11-21 17:42:18.390305179 +0100 -+++ ./Makefile.include.in 2012-11-21 19:30:49.987504858 +0100 -@@ -32,6 +32,7 @@ - CXXFLAGS+=@CXXFLAGS@ - CFLAGS+=@CFLAGS@ - LDFLAGS+=@LDFLAGS@ -+INCLUDES+=-I/opt/python2.7/include - INCLUDES+=-I@abs_top_srcdir@/lib - INCLUDES+=-I@abs_top_srcdir@/xbmc - INCLUDES+=$(sort @INCLUDES@) diff --git a/alarm/xbmc-cubox/0050+0051+0057-Use-Dove-hardware-graphics-scaler.patch b/alarm/xbmc-cubox/0050+0051+0057-Use-Dove-hardware-graphics-scaler.patch new file mode 100644 index 000000000..2241be6c6 --- /dev/null +++ b/alarm/xbmc-cubox/0050+0051+0057-Use-Dove-hardware-graphics-scaler.patch @@ -0,0 +1,301 @@ +From 9c17370c706e91c22b63e9c0a917c2463c23a091 Mon Sep 17 00:00:00 2001 +From: Rabeeh Khoury +Date: Tue, 15 Jan 2013 16:27:29 +0200 +Subject: [PATCH] Use Dove hardware graphics scaler + +The theory behind this patch is to render to a smaller area and then use the hardware upscaler to upscale the graphics plane to the destination resolution. +For instance, going into system setting->system->Video output and choosing Graphics scaling to 1.5, will make 1080p resolution to rendering 1/1.5 of it's size (720p). +Rendering becomes much more faster, memory bandwidth on the LCD controller becomes half too. + +Using this patch it's now possible to get higher fps on XBMC GUI + +Signed-off-by: Rabeeh Khoury +--- + xbmc/cores/VideoRenderers/DoveOverlayRenderer.cpp | 13 ++++-- + xbmc/guilib/GraphicContext.cpp | 14 +++++++ + xbmc/guilib/Resolution.h | 7 ++++ + xbmc/settings/GUISettings.cpp | 7 ++++ + xbmc/settings/GUIWindowSettingsCategory.cpp | 5 +++ + xbmc/video/windows/GUIWindowFullScreen.cpp | 17 ++++++++ + xbmc/windowing/X11/XRandR.cpp | 45 +++++++++++++++++++++ + xbmc/windowing/X11/XRandR.h | 3 ++ + 8 files changed, 107 insertions(+), 4 deletions(-) + +diff --git a/xbmc/cores/VideoRenderers/DoveOverlayRenderer.cpp b/xbmc/cores/VideoRenderers/DoveOverlayRenderer.cpp +index be37ab5..72343ca 100644 +--- a/xbmc/cores/VideoRenderers/DoveOverlayRenderer.cpp ++++ b/xbmc/cores/VideoRenderers/DoveOverlayRenderer.cpp +@@ -205,11 +205,16 @@ bool CDoveOverlayRenderer::Configure( + return false; + } + +- int interpolation = 3; // bi-linear interpolation +- if (ioctl(m_overlayfd, DOVEFB_IOCTL_SET_INTERPOLATION_MODE, &interpolation) != 0) ++ GRAPHICS_SCALING scale = (GRAPHICS_SCALING) g_guiSettings.GetInt("videoscreen.graphics_scaling"); ++ if (scale == -1) scale=GR_SCALE_100; ++ if (scale == GR_SCALE_100) /* Scaler is set differently when using graphics scaler */ + { +- CLog::Log(LOGERROR, "%s::%s - Failed to setup video interpolation mode", CLASSNAME, __func__); +- return false; ++ int interpolation = 3; // bi-linear interpolation ++ if (ioctl(m_overlayfd, DOVEFB_IOCTL_SET_INTERPOLATION_MODE, &interpolation) != 0) ++ { ++ CLog::Log(LOGERROR, "%s::%s - Failed to setup video interpolation mode", CLASSNAME, __func__); ++ return false; ++ } + } + + struct _sColorKeyNAlpha alpha; +diff --git a/xbmc/guilib/GraphicContext.cpp b/xbmc/guilib/GraphicContext.cpp +index 94f248b..e5edfcd 100644 +--- a/xbmc/guilib/GraphicContext.cpp ++++ b/xbmc/guilib/GraphicContext.cpp +@@ -626,6 +626,19 @@ void CGraphicContext::SetScalingResolution(const RESOLUTION_INFO &res, bool need + float fToWidth; + float fToHeight; + ++#ifdef HAS_MARVELL_DOVE ++ GRAPHICS_SCALING scale = (GRAPHICS_SCALING) g_guiSettings.GetInt("videoscreen.graphics_scaling"); ++ if (scale == -1) /* not configured */ ++ scale = GR_SCALE_100; ++ { ++ fFromWidth = (float)res.iWidth; ++ fFromHeight = (float)res.iHeight; ++ fToPosX = (float)g_settings.m_ResInfo[m_Resolution].Overscan.left*100/scale; ++ fToPosY = (float)g_settings.m_ResInfo[m_Resolution].Overscan.top*100/scale; ++ fToWidth = (float)g_settings.m_ResInfo[m_Resolution].Overscan.right*100/scale - fToPosX; ++ fToHeight = (float)g_settings.m_ResInfo[m_Resolution].Overscan.bottom*100/scale - fToPosY; ++ } ++#else + { + fFromWidth = (float)res.iWidth; + fFromHeight = (float)res.iHeight; +@@ -634,6 +647,7 @@ void CGraphicContext::SetScalingResolution(const RESOLUTION_INFO &res, bool need + fToWidth = (float)g_settings.m_ResInfo[m_Resolution].Overscan.right - fToPosX; + fToHeight = (float)g_settings.m_ResInfo[m_Resolution].Overscan.bottom - fToPosY; + } ++#endif + + if(!g_guiSkinzoom) // lookup gui setting if we didn't have it already + g_guiSkinzoom = (CSettingInt*)g_guiSettings.GetSetting("lookandfeel.skinzoom"); +diff --git a/xbmc/guilib/Resolution.h b/xbmc/guilib/Resolution.h +index 66c4e85..a9b7d6c 100644 +--- a/xbmc/guilib/Resolution.h ++++ b/xbmc/guilib/Resolution.h +@@ -63,6 +63,15 @@ + VSYNC_DRIVER = 3 + }; + ++#ifdef TARGET_MARVELL_DOVE ++enum GRAPHICS_SCALING { ++ GR_SCALE_100 = 100, ++ GR_SCALE_150 = 150, ++ GR_SCALE_200 = 200, ++ GR_SCALE_250 = 250 ++}; ++#endif ++ + struct OVERSCAN + { + int left; +diff --git a/xbmc/settings/GUISettings.cpp b/xbmc/settings/GUISettings.cpp +index bb39c86..6f0ba5e 100644 +--- a/xbmc/settings/GUISettings.cpp ++++ b/xbmc/settings/GUISettings.cpp +@@ -435,6 +435,15 @@ + AddSeparator(vs, "videoscreen.sep1"); + #endif + ++#ifdef TARGET_MARVELL_DOVE ++ map graphics_scaling; ++ graphics_scaling.insert(make_pair(37011,GR_SCALE_100)); ++ graphics_scaling.insert(make_pair(37012,GR_SCALE_150)); ++ graphics_scaling.insert(make_pair(37013,GR_SCALE_200)); ++ graphics_scaling.insert(make_pair(37014,GR_SCALE_250)); ++ AddInt(vs, "videoscreen.graphics_scaling", 37010, GR_SCALE_100, graphics_scaling, SPIN_CONTROL_TEXT); ++#endif ++ + map vsync; + #if defined(_LINUX) && !defined(TARGET_DARWIN) + vsync.insert(make_pair(13101,VSYNC_DRIVER)); +diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp +index d98107f..0ae1822 100644 +--- a/xbmc/settings/GUIWindowSettingsCategory.cpp ++++ b/xbmc/settings/GUIWindowSettingsCategory.cpp +@@ -1490,6 +1490,11 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting + CLog::Log(LOGERROR, "Unable to open vmeta clock settings file on sysfs"); + fclose(Fh); + } ++ else if (strSetting.Equals("videoscreen.graphics_scaling")) ++ { ++ /* Fake as resolution changed - this to refresh aspect ratios of fonts vs. graphics */ ++ g_graphicsContext.SetVideoResolution(g_graphicsContext.GetVideoResolution(), true); ++ } + #endif + else if (strSetting.Equals("videoscreen.vsync")) + { +diff --git a/xbmc/video/windows/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp +index 7b80926..24e2d98 100644 +--- a/xbmc/video/windows/GUIWindowFullScreen.cpp ++++ b/xbmc/video/windows/GUIWindowFullScreen.cpp +@@ -1082,6 +1082,11 @@ void CGUIWindowFullScreen::RenderTTFSubtitles() + CStdString subtitleText = "How now brown cow"; + if (g_application.m_pPlayer->GetCurrentSubtitle(subtitleText)) + { ++#ifdef HAS_MARVELL_DOVE ++ GRAPHICS_SCALING scale = (GRAPHICS_SCALING) g_guiSettings.GetInt("videoscreen.graphics_scaling"); ++ if (scale == -1) /* not configured */ ++ scale = GR_SCALE_100; ++#endif + // Remove HTML-like tags from the subtitles until + subtitleText.Replace("\\r", ""); + subtitleText.Replace("\r", ""); +@@ -1105,7 +1110,11 @@ void CGUIWindowFullScreen::RenderTTFSubtitles() + RESOLUTION res = g_graphicsContext.GetVideoResolution(); + g_graphicsContext.SetRenderingResolution(g_graphicsContext.GetResInfo(), false); + ++#ifdef HAS_MARVELL_DOVE ++ float maxWidth = (float) g_settings.m_ResInfo[res].Overscan.right*100/scale - g_settings.m_ResInfo[res].Overscan.left; ++#else + float maxWidth = (float) g_settings.m_ResInfo[res].Overscan.right - g_settings.m_ResInfo[res].Overscan.left; ++#endif + m_subsLayout->Update(subtitleText, maxWidth * 0.9f, false, true); // true to force LTR reading order (most Hebrew subs are this format) + + int subalign = g_guiSettings.GetInt("subtitles.align"); +@@ -1115,7 +1124,11 @@ void CGUIWindowFullScreen::RenderTTFSubtitles() + float y = (float) g_settings.m_ResInfo[res].iSubtitles; + + if (subalign == SUBTITLE_ALIGN_MANUAL) ++#ifdef HAS_MARVELL_DOVE ++ y = (float) g_settings.m_ResInfo[res].iSubtitles*100/scale - textHeight; ++#else + y = (float) g_settings.m_ResInfo[res].iSubtitles - textHeight; ++#endif + else + { + CRect SrcRect, DestRect; +@@ -1133,7 +1146,11 @@ void CGUIWindowFullScreen::RenderTTFSubtitles() + y += g_graphicsContext.GetHeight() - g_settings.m_ResInfo[res].iSubtitles; + + y = std::max(y, (float) g_settings.m_ResInfo[res].Overscan.top); ++#ifdef HAS_MARVELL_DOVE ++ y = std::min(y, g_settings.m_ResInfo[res].Overscan.bottom*100/scale - textHeight); ++#else + y = std::min(y, g_settings.m_ResInfo[res].Overscan.bottom - textHeight); ++#endif + } + + m_subsLayout->RenderOutline(x, y, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth); +diff --git a/xbmc/windowing/X11/XRandR.cpp b/xbmc/windowing/X11/XRandR.cpp +index d8e9161..d23b76e 100644 +--- a/xbmc/windowing/X11/XRandR.cpp ++++ b/xbmc/windowing/X11/XRandR.cpp +@@ -26,6 +26,11 @@ + #include + #include "system.h" + #include "PlatformInclude.h" ++#ifdef TARGET_MARVELL_DOVE ++#include ++#include "guilib/Resolution.h" ++#include "settings/GUISettings.h" ++#endif + #include "utils/XBMCTinyXML.h" + #include "../xbmc/utils/log.h" + +@@ -158,8 +163,44 @@ void CXRandR::RestoreState() + } + } + ++#ifdef TARGET_MARVELL_DOVE ++#define MAP_SIZE 4096UL ++#define MAP_MASK (MAP_SIZE - 1) ++void CXRandR::ChangeGraphicsScaler(void) ++{ ++ /* OK. Now this is a seriously ugly hack. Code needs to be re-written to support ioctl to driver !!! */ ++ /* Code below originally from devmem2.c */ ++ int fd; ++ off_t target_page = 0xf1820000; /* LCD Controller base address */ ++ void *map_base; ++ unsigned int zoomed; ++ unsigned int gr_size; ++ int zx,zy; ++ GRAPHICS_SCALING scale = (GRAPHICS_SCALING) g_guiSettings.GetInt("videoscreen.graphics_scaling"); ++ if (scale == -1) scale=GR_SCALE_100; ++ if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) { ++ CLog::Log(LOGERROR, "XRANDR: Unable to open /dev/mem"); ++ return; ++ } ++ fflush(stdout); ++ map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, target_page); ++ zoomed = * (unsigned int *) (map_base + 0x108); ++ zx = zoomed & 0xffff; ++ zy = (zoomed & 0xffff0000) >> 16; ++ CLog::Log(LOGINFO, "XRANDR: Zoomed area is %dx%d, new area should be %dx%d\n",zx,zy,zx*100/scale,zy*100/scale); ++ gr_size = (zy*100/scale) & 0xffff; ++ gr_size = (gr_size << 16) | ((zx*100/scale) & 0xffff); ++ * (unsigned int *) (map_base + 0x104) = gr_size; ++ close(fd); ++} ++#endif ++ + bool CXRandR::SetMode(XOutput output, XMode mode) + { ++#ifdef TARGET_MARVELL_DOVE ++ /* Required both on entrance and exit from SetMode. First entrance is required to get the scaler modified */ ++ ChangeGraphicsScaler (); ++#endif + if ((output.name == m_currentOutput && mode.id == m_currentMode) || (output.name == "" && mode.id == "")) + return true; + +@@ -256,6 +298,9 @@ bool CXRandR::SetMode(XOutput output, XMode mode) + if (WEXITSTATUS(status) != 0) + return false; + ++#ifdef TARGET_MARVELL_DOVE ++ ChangeGraphicsScaler (); ++#endif + return true; + } + +diff --git a/xbmc/windowing/X11/XRandR.h b/xbmc/windowing/X11/XRandR.h +index 2a269d0..95e4a1f 100644 +--- a/xbmc/windowing/X11/XRandR.h ++++ b/xbmc/windowing/X11/XRandR.h +@@ -100,6 +100,9 @@ public: + void LoadCustomModeLinesToAllOutputs(void); + void SaveState(); + void RestoreState(); ++#ifdef TARGET_MARVELL_DOVE ++ void ChangeGraphicsScaler(void); ++#endif + //bool Has1080i(); + //bool Has1080p(); + //bool Has720p(); +diff --git a/language/English/strings.po b/language/English/strings.po +index fcb9255..8f36605 100644 +--- a/language/English/strings.po ++++ b/language/English/strings.po +@@ -11420,3 +11420,23 @@ + msgctxt "#36041" + msgid "* Item folder" + msgstr "" ++ ++msgctxt "#37010" ++msgid "Graphics Scaling" ++msgstr "" ++ ++msgctxt "#37011" ++msgid "x1" ++msgstr "" ++ ++msgctxt "#37012" ++msgid "x1.5" ++msgstr "" ++ ++msgctxt "#37013" ++msgid "x2" ++msgstr "" ++ ++msgctxt "#37014" ++msgid "x2.5" ++msgstr "" diff --git a/alarm/xbmc-cubox/505_report-cpu-type-and-temp.patch b/alarm/xbmc-cubox/505_report-cpu-type-and-temp.patch new file mode 100644 index 000000000..7bd3eaada --- /dev/null +++ b/alarm/xbmc-cubox/505_report-cpu-type-and-temp.patch @@ -0,0 +1,66 @@ +diff -Naur c/xbmc/utils/CPUInfo.cpp d/xbmc/utils/CPUInfo.cpp +--- c/xbmc/utils/CPUInfo.cpp 2012-10-24 20:28:26.274392014 +0200 ++++ d/xbmc/utils/CPUInfo.cpp 2012-10-24 20:08:08.000000000 +0200 +@@ -154,7 +154,10 @@ + // read from the new location of the temperature data on new kernels, 2.6.39, 3.0 etc + if (m_fProcTemperature == NULL) + m_fProcTemperature = fopen("/sys/class/hwmon/hwmon0/temp1_input", "r"); +- ++ // some systems put this information here ... ++ if (m_fProcTemperature == NULL) ++ m_fProcTemperature = fopen("/sys/class/hwmon/hwmon0/device/temp1_input", "r"); ++ + m_fCPUInfo = fopen("/proc/cpuinfo", "r"); + m_cpuCount = 0; + if (m_fCPUInfo) +@@ -164,7 +167,17 @@ + int nCurrId = 0; + while (fgets(buffer, sizeof(buffer), m_fCPUInfo)) + { +- if (strncmp(buffer, "processor", strlen("processor"))==0) ++ if (strncmp(buffer, "Processor", strlen("Processor"))==0) ++ { ++ char *needle = strstr(buffer, ":"); ++ if (needle) ++ { ++ CStdString s(needle+2); ++ s.Trim(); ++ m_cpuModel = s; ++ } ++ } ++ else if (strncmp(buffer, "processor", strlen("processor"))==0) + { + char *needle = strstr(buffer, ":"); + if (needle) +@@ -383,10 +370,16 @@ + } + } + } +- else ++ ++ if (m_cpuModel.empty()) ++ m_cpuModel = "Unknown"; ++ ++ if (m_cpuCount == 0) + { ++ CoreInfo core; ++ core.m_strModel = m_cpuModel; ++ m_cores[0] = core; + m_cpuCount = 1; +- m_cpuModel = "Unknown"; + } + + #endif +diff -Naur c/xbmc/utils/SystemInfo.cpp d/xbmc/utils/SystemInfo.cpp +--- c/xbmc/utils/SystemInfo.cpp 2012-07-11 21:58:22.000000000 +0200 ++++ d/xbmc/utils/SystemInfo.cpp 2012-10-25 20:48:37.000000000 +0200 +@@ -74,7 +74,8 @@ + { + CStdString strCPUFreq; + double CPUFreq = GetCPUFrequency(); +- strCPUFreq.Format("%4.2fMHz", CPUFreq); ++ if (CPUFreq > 0) ++ strCPUFreq.Format("%4.2fMHz", CPUFreq); + return strCPUFreq; + } + diff --git a/alarm/xbmc-cubox/PKGBUILD b/alarm/xbmc-cubox/PKGBUILD new file mode 100644 index 000000000..688076305 --- /dev/null +++ b/alarm/xbmc-cubox/PKGBUILD @@ -0,0 +1,240 @@ +# $Id: PKGBUILD 71695 2012-06-01 13:05:36Z dreisner $ +# Maintainer: Sergej Pupykin +# Contributor: Brad Fanella +# Contributor: [vEX] +# Contributor: Zeqadious +# Contributor: BlackIkeEagle < ike DOT devolder AT gmail DOT com > + +# ALARM: +# - --disable-vdpau/xvda, remove from makedepends +# - specify our C/CXXFLAGS in configure +# - removed --disable-external-ffmpeg +# - disable gl and vaapi. enabled gles and with-platform=marvell-dove +# - replace libcec with libcec-cubox +# - additional depends xf86-video-dove, marvell-ipp, ffmpeg +# - added vmeta-clk@667.service requires to systemd sevice +# - Use GeeXboX/SolidRun patcheset + +buildarch=4 + +pkgname=("xbmc-cubox") +provides=("xbmc") +conflicts=("xbmc" "xbmc-cubox-git") +replaces=("xbmc-cubox-git") + +_patches=( + "0001-dove-added-vmeta-library-loader.patch" + "0002-dove-added-vmeta-video-decoder.patch" + "0003-dove-added-dove-overlay-render.patch" + "0004-dove-hook-up-vmeta-video-decoder.patch" + "0005-dove-hook-up-dove-overlay-renderer.patch" + "0006-dove-workaround-for-eglCreateContext.patch" + "0007-dove-workaround-for-our-cpu-fpu-combination.patch" + "0008-dove-missing-typdef-leads-in-XKBlib.h-include-errors.patch" + "0009-dove-hook-up-dove-support-in-the-xbmc-build-system.patch" + "0011-dove-changed-vblank-waiting-is-only-needed-for-DOVEF.patch" + "0014-dove-workaround-for-marvell-dove.-EGL_NO_CONTEXT-cau.patch" + "0015-dove-fixed-typos.patch" + "0017-dove-fixed-exit-hang.-this-is-a-workaround-for-a-bug.patch" + "0018_add-codecs.patch" + "0018_fix-lib-vivante.patch" + "0019_gpu-backoff.patch" + "0020_use-ffmpeg-for-thumbnails.patch" + "0021_big-buck-bunny-480p-fix.patch" + "0032-Sync-frame-directly-on-next-vsync.patch" + "0033-Cached-buffer-allocation.patch" + "0034-Vmeta-queuing-support.patch" + "0035-Add-the-_cached-and-_writecombine-function-APIs.patch" + "0036-vsync-always-enabled.patch" + # "0037-Select-vmeta-speed.patch" + # "0038-Make-vmeta-clock-settings-correct-when-loading-xml.patch" + "0039_WinSystemX11-SDL_CreateRGBSurfaceFrom.patch" + "0040-Reworked-iLineSize-detection.patch" + "0040-hack.patch" + # "0041-Make-vmeta-clock-default-to-667MHz.patch" + "0042-mpeg4-packed-bitstream-unpacking.patch" + "0043-mpeg2-aspect-ratio-detection.patch" + "0045-performance-bitstream-converter.patch" + "0046-performance-vmeta-decoder.patch" + "0047-performance-overlay-renderer.patch" + "0048-drop-first-two-frames-from-vmeta.patch" + "0049-overlay-renderer-streamlined.patch" + # "0050-Use-Dove-hardware-graphics-scaler.patch" + # "0051-Graphics-scaling-text-English.patch" + "0052-Fixed-vmeta-cache-coherency-problem.patch" + "0052-Remove-enabling-vertical-interpolation-smoothing-in-.patch" + "0053-Configure-upscaling-also-on-refresh-adjustment.patch" + "0054-Remove-unsupported-audio-settings.patch" + "0055-vmeta-used-for-mpeg1.patch" + "0056-dove-overlay-setup-fix.patch" + # "0057-graphics-scaling-set-default-to-x1.patch" + # "0058-vmeta-set-clock-only-when-inuse.patch" + "0059-graphics-scaling-cleanup-and-subtitle-pos-fix.patch" + "0060-audioengine-fix-24bit-pcm-output.patch" + "0061-audioengine-improve-saferound.patch" + # "500_add_home_key.diff" + # "505_report-cpu-type.diff" +) + +_prefix=/usr + +pkgver=12.1 +pkgrel=4 +pkgdesc="A software media player and entertainment hub for digital media" +arch=('i686' 'x86_64') +url="http://xbmc.org" +license=('GPL' 'custom') +depends=('libpulse' 'hicolor-icon-theme' 'fribidi' 'lzo2' 'smbclient' 'libtiff' 'libva' + 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' + 'glew' 'libssh' 'libmicrohttpd' 'libxrandr' 'sdl_mixer' 'sdl_image' 'python2' + 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'mesa-demos' + 'xorg-xdpyinfo' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez' 'glu' + 'tinyxml' 'taglib' 'xf86-video-dove' 'marvell-ipp' 'ffmpeg') +makedepends=('boost' 'cmake' 'gperf' 'nasm' 'libxinerama' 'zip' 'libcec-cubox' + 'udisks' 'upower' 'bluez' 'mesa' 'doxygen' 'swig' 'java-environment') +optdepends=('libcec-cubox: support for Pulse-Eight CEC adapter' + 'pulseaudio: pulseaudio support' + 'lirc: remote controller support' + 'udisks: automount external drives' + 'upower: used to trigger suspend functionality' + 'unrar: access compressed files without unpacking them' + 'xorg-xinit: autostart xbmc') +install="xbmc.install" +source=("http://mirrors.xbmc.org/releases/source/xbmc-$pkgver.tar.gz" + "xbmc.service" \ + "0050+0051+0057-Use-Dove-hardware-graphics-scaler.patch" + "505_report-cpu-type-and-temp.patch" + "${_patches[@]/#/http://hg.openbricks.org/openbricks/raw-file/default/config/platforms/arm/armada5xx/packages/xbmc/patches/}") +md5sums=('8955473f84cb2a0513c0f3efd7e68843' + '1b5d4a888a375df9949e4eed1e060ce5' + '2952a468078b88bab836e117bb611801' + 'a03cc7f313791631543c8fbcbf868fc2' + '8eacd6886116cb8c8a3130150b174988' + '543f3482a4dfa622245e78b44e62d5d2' + '5a7c4303fc4ffd92f0f8e880ccf0076d' + '12bfdd9088ff5d55ddb2ab281881d0e7' + '4dda79437b0295b90ea97693b70291e1' + 'd825bbbad9cdcc74f5bb53d51c9009cc' + '4bb23235465d9f407f8bf0e15fff572d' + 'b82517d1534042cfcbfb8eead00da0a5' + 'a3272912e3785ccf0388762a300ad4f6' + '39fa2198f93f9529c20d28fbdf8e6cc1' + '5c0dd38851694d15927dad21d2b6410c' + '2d0a1b3859408c67efdf7816fc02ad4a' + '9926708a14035d24b023b13eb52fa0ea' + 'd234509aa2de06a7f086dee7585d0e8b' + '2b69b0db80701aaf5276f1e5d53073e6' + 'd7b97ba8e4b033a0f8ae82d9069ddd0c' + 'b7a6ec0ba0b1cf586a8148835ee433ed' + '7c7dfa0ad66e40d21c9d3cf34cee6d74' + '1b6462b42b35f21aee9a6bbf15ba5c64' + '5ad567e5c70506d4fc5c930768bd1d5c' + '378205587868e0e974dc50865c3c400f' + 'acb85b649ac0a7f0b35dacb99501e4ad' + 'c53ee283801c004fbc1a960921fb4521' + '319dd19f31459d0342d5d6387831943f' + 'c748c43f11e7024b0ef527ad53e52fce' + '0af00d3d3f726481c209d1287b3f6aab' + '7be7215e47f916f00ce9e03aa0daf1cd' + '5fd9f0f24741172029d9e51c97983fde' + '04c8a05a10a9cc492abdead9ea05cb11' + '6a2d9a3eb6472df43d8463cd75f5051d' + '4e967b7d936d770bd153d02051960ba1' + '9898521e8a2b4c04260a84f7a8864864' + '09a927d16687fdd7a907ab7a2529fb1f' + '383fdf68505b645e755cf9774f72800d' + '7b3ce4ef4f297c25a9ca926816f544ec' + 'f3d3677267074a0e1450af3a17aa0be9' + '702c454aabbf780bffc9f0d2ec39e189' + '3c4cd7316c48776f694b411caf87453d' + '3ca61d4f8a0a36f0d64597f76a2b4fed' + 'fc442d1f155cbdce2bcb1ad722670579' + 'de5a153e75280b207170b699194536b3' + 'abca11301f1d4482f89747a56fb3fd3c') + + +build() { + cd "${srcdir}/xbmc-$pkgver" + + export LDFLAGS="$LDFLAGS -L/opt/marvell-libgfx/lib" + export CFLAGS="$CFLAGS -I/opt/marvell-libgfx/include" + export CXXFLAGS="$CXXFLAGS -I/opt/marvell-libgfx/include" + + export TEXTUREPACKER_NATIVE_ROOT="/usr" + + for _patch in "${srcdir}/"*.{patch,diff}; do + patch -p1 -i "${_patch}" + done + + # fix lsb_release dependency + sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp + + # Bootstrapping XBMC + ./bootstrap + + # Configuring XBMC + export PYTHON_VERSION=2 # external python v2 + ./configure --prefix=$_prefix --exec-prefix=$_prefix \ + --with-platform="marvell-dove" \ + --disable-debug \ + --enable-optimizations \ + --disable-gl \ + --enable-gles \ + --enable-sdl \ + --disable-vaapi \ + --disable-vdpau \ + --disable-xvba \ + --enable-joystick \ + --enable-xrandr \ + --enable-rsxs \ + --enable-projectm \ + --enable-x11 \ + --enable-pulse \ + --enable-rtmp \ + --enable-samba \ + --enable-nfs \ + --enable-afpclient \ + --enable-airplay \ + --enable-airtunes \ + --enable-ffmpeg-libvorbis \ + --enable-dvdcss \ + --disable-hal \ + --enable-avahi \ + --enable-webserver \ + --enable-optical-drive \ + --enable-libbluray \ + --enable-texturepacker \ + --enable-udev \ + --enable-libusb \ + --enable-libcec \ + --enable-external-libraries \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" + # Now (finally) build + make +} + +package() { + cd "${srcdir}/xbmc-$pkgver" + # Running make install + make DESTDIR="${pkgdir}" install + + # run feh with python2 + sed -i -e 's/python/python2/g' ${pkgdir}${_prefix}/bin/xbmc + + # lsb_release fix + sed -i -e 's/which lsb_release &> \/dev\/null/\[ -f \/etc\/arch-release ]/g' "${pkgdir}${_prefix}/bin/xbmc" + sed -i -e "s/lsb_release -a 2> \/dev\/null | sed -e 's\/\^\/ \/'/cat \/etc\/arch-release/g" "${pkgdir}${_prefix}/bin/xbmc" + + # Tools + install -D -m 0755 "${srcdir}/xbmc-$pkgver/xbmc-xrandr" "${pkgdir}${_prefix}/share/xbmc/xbmc-xrandr" + install -D -m 0755 "${srcdir}/xbmc-$pkgver/tools/TexturePacker/TexturePacker" "${pkgdir}${_prefix}/share/xbmc/" + + # Licenses + install -d -m 0755 "${pkgdir}${_prefix}/share/licenses/${pkgname}" + for licensef in LICENSE.GPL copying.txt; do + mv "${pkgdir}${_prefix}/share/doc/xbmc/${licensef}" "${pkgdir}${_prefix}/share/licenses/${pkgname}" + done + + # systemd stuff + install -Dm0644 $srcdir/xbmc.service $pkgdir/usr/lib/systemd/system/xbmc.service +} diff --git a/alarm/xbmc-cubox-git/xbmc.install b/alarm/xbmc-cubox/xbmc.install similarity index 100% rename from alarm/xbmc-cubox-git/xbmc.install rename to alarm/xbmc-cubox/xbmc.install diff --git a/alarm/xbmc-cubox-git/xbmc.service b/alarm/xbmc-cubox/xbmc.service similarity index 75% rename from alarm/xbmc-cubox-git/xbmc.service rename to alarm/xbmc-cubox/xbmc.service index 8da83a4d9..60a2a4b96 100644 --- a/alarm/xbmc-cubox-git/xbmc.service +++ b/alarm/xbmc-cubox/xbmc.service @@ -7,7 +7,7 @@ After = remote-fs.target User = xbmc Group = xbmc Type = simple -ExecStart = /usr/bin/xinit /usr/bin/xbmc-standalone -- :0 +ExecStart = /usr/bin/xinit /usr/bin/xbmc-standalone -- :0 -nolisten tcp Restart = always [Install]