Add a project for WeTek Play TV box

This commit is contained in:
Alex Deryskyba 2014-12-23 04:16:41 +01:00 committed by Stephan Raue
parent cfc879b94f
commit b49c8b7aff
36 changed files with 17804 additions and 0 deletions

View File

@ -0,0 +1,11 @@
pcm.!default {
type hw
card 0
device 0
format S16_LE
}
ctl.!default {
type hw
card 0
}

View File

@ -0,0 +1,11 @@
# Amlogic NEC remote
factory_code = 0xbc430001
work_mode = 1
repeat_enable = 1
release_delay = 150
debug_enable = 1
reg_control = 0xfbe40
key_begin
0xca 116 ;POWER
key_end

View File

@ -0,0 +1,57 @@
#AP6210_NVRAM_V1.2_03192013
manfid=0x2d0
prodid=0x492
vendid=0x14e4
devid=0x4343
boardtype=0x0598
# Board Revision is P307, same nvram file can be used for P304, P305, P306 and P307 as the tssi pa params used are same
#Please force the automatic RX PER data to the respective board directory if not using P307 board, for e.g. for P305 boards force the data into the following directory /projects/BCM43362/a1_labdata/boardtests/results/sdg_rev0305
boardrev=0x1307
boardnum=777
xtalfreq=26000
boardflags=0x80201
boardflags2=0x80
sromrev=3
wl0id=0x431b
macaddr=00:90:4c:07:71:12
aa2g=1
ag0=2
maxp2ga0=74
cck2gpo=0x2222
ofdm2gpo=0x44444444
mcs2gpo0=0x6666
mcs2gpo1=0x6666
pa0maxpwr=56
#P207 PA params
#pa0b0=5447
#pa0b1=-658
#pa0b2=-175<div></div>
#Same PA params for P304,P305, P306, P307
pa0b0=5447
pa0b1=-607
pa0b2=-160
pa0itssit=62
pa1itssit=62
cckPwrOffset=5
ccode=0
rssismf2g=0xa
rssismc2g=0x3
rssisav2g=0x7
triso2g=0
noise_cal_enable_2g=0
noise_cal_po_2g=0
swctrlmap_2g=0x04040404,0x02020202,0x02020202,0x010101,0x1ff
temp_add=29767
temp_mult=425
btc_flags=0x6
btc_params0=5000
btc_params1=1000
btc_params6=63

View File

@ -0,0 +1 @@
mali

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<keymap>
<global>
<keyboard>
<f7>ContextMenu</f7>
<f1>AspectRatio</f1>
<home>XBMC.ActivateWindow(Home)</home>
<f2>ActivateWindowAndFocus(MyPVR, 31,0, 10,0)</f2>
<f6>FullScreen</f6>
<key id="61952">Screenshot</key> <!-- KEY_RECORD -->
</keyboard>
</global>
</keymap>

View File

@ -0,0 +1,82 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2014 Alex Deryskyba (alex@codesnake.com)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
# Force 720p display mode at startup
echo 720p > /sys/class/display/mode
# Enable framebuffer device
echo 0 > /sys/class/graphics/fb0/blank
# Disable framebuffer scaling
echo 0 > /sys/class/graphics/fb0/free_scale
# Set framebuffer geometry
fbset -fb /dev/fb0 -g 1280 720 1280 1440 32
# Set framebuffer size in CVBS mode to match the resolution,
# for splash screen to be shown correctly
hpd_state=$(cat /sys/class/amhdmitx/amhdmitx0/hpd_state)
if [ "$hpd_state" != "1" ]; then # HDMI is not connected
display_height=480
display_mode=$(cat /sys/class/display/mode)
if [ "$display_mode" = "576cvbs" ]; then
display_height=576
fi
fbset -fb /dev/fb0 -g 720 "$display_height" 720 "$display_height" 32
fbset -fb /dev/fb1 -g 720 "$display_height" 720 "$display_height" 32
fi
# Include deinterlacer into default VFM map
echo rm default > /sys/class/vfm/map
echo add default decoder ppmgr deinterlace amvideo > /sys/class/vfm/map
# Parse command line arguments
for arg in $(cat /proc/cmdline); do
case $arg in
scaling_governor=*)
scaling_governor="${arg#*=}"
;;
scaling_min_freq=*)
scaling_min_freq="${arg#*=}"
;;
scaling_max_freq=*)
scaling_max_freq="${arg#*=}"
;;
esac
done
# Boot with performance governor, then switch to the governor specified in the kernel command line
cpu_idx=0
while [ $cpu_idx -lt 128 ]; do
cpufreq="/sys/devices/system/cpu/cpu$cpu_idx/cpufreq"
if [ ! -d "$cpufreq" ]; then
break
fi
if [ -n "$scaling_governor" ]; then
echo "$scaling_governor" > "$cpufreq/scaling_governor"
fi
if [ -n "$scaling_min_freq" ]; then
echo "$scaling_min_freq" > "$cpufreq/scaling_min_freq"
fi
if [ -n "$scaling_max_freq" ]; then
echo "$scaling_max_freq" > "$cpufreq/scaling_max_freq"
fi
cpu_idx=`expr $cpu_idx + 1`
done

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<showexitbutton>false</showexitbutton>
<network>
<cachemembuffersize>20971520</cachemembuffersize>
</network>
<samba>
<clienttimeout>30</clienttimeout>
</samba>
<network>
<readbufferfactor>4.0</readbufferfactor>
</network>
<pvr>
<minvideocachelevel>5</minvideocachelevel>
<minaudiocachelevel>20</minaudiocachelevel>
</pvr>
</advancedsettings>

File diff suppressed because it is too large Load Diff

158
projects/WeTek.Play/options Normal file
View File

@ -0,0 +1,158 @@
################################################################################
# setup system defaults
################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case $TARGET_ARCH in
arm)
# TARGET_CPU:
# arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d
# arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c
# arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t
# arm720t arm740t strongarm strongarm110 strongarm1100
# strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t
# arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi
# arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e
# arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s
# arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4
# cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.
#
TARGET_CPU="cortex-a9"
# TARGET_FLOAT:
# Specifies which floating-point ABI to use. Permissible values are:
# soft softfp hard
TARGET_FLOAT="hard"
# TARGET_FPU:
# This specifies what floating point hardware (or hardware emulation) is
# available on the target. Permissible names are:
# fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16
# vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16
# neon-vfpv4.
TARGET_FPU="neon"
;;
esac
# Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)
BOOTLOADER="u-boot"
# u-boot version to use (default)
UBOOT_VERSION=""
# Configuration for u-boot
UBOOT_CONFIG=""
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# Kernel target for u-boot (default 'uImage' if BOOTLOADER=u-boot) (uImage / zImage)
KERNEL_UBOOT_TARGET="uImage-dtb"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="meson6_g18.dtd"
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# Kernel to use. values can be:
# default: default mainline kernel
LINUX="amlogic"
################################################################################
# setup build defaults
################################################################################
# Build optimizations (size/normal)
OPTIMIZATIONS="size"
# Project CFLAGS
PROJECT_CFLAGS=""
# LTO (Link Time Optimization) support
LTO_SUPPORT="yes"
# GOLD (Google Linker) support
GOLD_SUPPORT="yes"
# SquashFS compression method (gzip / lzo / xz)
SQUASHFS_COMPRESSION="lzo"
################################################################################
# setup project defaults
################################################################################
# build and install ALSA Audio support (yes / no)
ALSA_SUPPORT="yes"
# OpenGL(X) implementation to use (no / Mesa)
OPENGL="no"
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson6)
OPENGLES="opengl-meson6"
# include uvesafb support (yes / no)
UVESAFB_SUPPORT="no"
# Displayserver to use (x11 / no)
DISPLAYSERVER="no"
# Windowmanager to use (ratpoison / fluxbox / none)
WINDOWMANAGER="none"
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)
# Space separated list is supported,
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia nouveau"
GRAPHIC_DRIVERS=""
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)
KODIPLAYER_DRIVER="libamcodec"
# Modules to install in initramfs for early boot
INITRAMFS_MODULES="softcursor bitblit font fbcon"
# additional drivers to install:
# for a list of additinoal drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS=""
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="misc-firmware wlan-firmware dvb-firmware"
# build and install ATV IR remote support (yes / no)
ATVCLIENT_SUPPORT="no"
# build and install IRServer IR/LCD support (yes / no)
IRSERVER_SUPPORT="no"
# Amlogic IR remote support (yes / no)
AMREMOTE_SUPPORT="yes"
# build with swap support (yes / no)
SWAP_SUPPORT="yes"
# swap support enabled per default (yes / no)
SWAP_ENABLED_DEFAULT="no"
# swapfile size if SWAP_SUPPORT=yes in MB
SWAPFILESIZE="128"
# build with installer (yes / no)
INSTALLER_SUPPORT="no"
# build and install 'RSXS' Screensaver (yes / no)
KODI_SCR_RSXS="no"
# build and install 'ProjectM' Visualization (yes / no)
KODI_VIS_PROJECTM="no"
# build and install 'GOOM' Visualization (yes / no)
KODI_VIS_GOOM="no"
# build and install 'FishBMC' Visualization (yes / no)
KODI_VIS_FISHBMC="no"

View File

@ -0,0 +1,55 @@
From 95ea0f29d385bdbd926c5ad13bb6b4f93bb1e3ea Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Wed, 16 Apr 2014 22:02:01 +0300
Subject: [PATCH 01/16] Fix ALSA sound output for Amlogic-based devices.
---
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index d30cbab..8679107 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -83,6 +83,17 @@ static unsigned int ALSASampleRateList[] =
0
};
+static int CheckNP2(unsigned x)
+{
+ --x;
+ x |= x >> 1;
+ x |= x >> 2;
+ x |= x >> 4;
+ x |= x >> 8;
+ x |= x >> 16;
+ return ++x;
+}
+
CAESinkALSA::CAESinkALSA() :
m_bufferSize(0),
m_formatSampleRateMul(0.0),
@@ -739,12 +750,20 @@ bool CAESinkALSA::InitializeHW(const ALSAConfig &inconfig, ALSAConfig &outconfig
*/
periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 20);
bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) sampleRate / 5);
+#if defined(HAS_LIBAMCODEC)
+ // must be pot for pivos.
+ bufferSize = CheckNP2(bufferSize);
+#endif
/*
According to upstream we should set buffer size first - so make sure it is always at least
4x period size to not get underruns (some systems seem to have issues with only 2 periods)
*/
periodSize = std::min(periodSize, bufferSize / 4);
+#if defined(HAS_LIBAMCODEC)
+ // must be pot for pivos.
+ periodSize = CheckNP2(periodSize);
+#endif
CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Request: periodSize %lu, bufferSize %lu", periodSize, bufferSize);
--
1.7.9.5

View File

@ -0,0 +1,49 @@
From 614bc1be8201949036c37b29fd124c0be0f866c6 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Wed, 16 Apr 2014 22:11:51 +0300
Subject: [PATCH 02/16] Allow audio passthrough for Amlogic-based devices.
---
.../AudioEngine/Engines/ActiveAE/ActiveAESink.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
index b391ff3..a7565f0 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
@@ -91,6 +91,7 @@ AEDeviceType CActiveAESink::GetDeviceType(const std::string &device)
bool CActiveAESink::HasPassthroughDevice()
{
+#ifndef HAS_LIBAMCODEC
for (AESinkInfoList::iterator itt = m_sinkInfoList.begin(); itt != m_sinkInfoList.end(); ++itt)
{
for (AEDeviceInfoList::iterator itt2 = itt->m_deviceInfoList.begin(); itt2 != itt->m_deviceInfoList.end(); ++itt2)
@@ -101,10 +102,14 @@ bool CActiveAESink::HasPassthroughDevice()
}
}
return false;
+#else
+ return true;
+#endif
}
bool CActiveAESink::SupportsFormat(const std::string &device, AEDataFormat format, int samplerate)
{
+#ifndef HAS_LIBAMCODEC
std::string dev = device;
std::string dri;
CAESinkFactory::ParseDevice(dev, dri);
@@ -135,6 +140,9 @@ bool CActiveAESink::SupportsFormat(const std::string &device, AEDataFormat forma
}
}
return false;
+#else
+ return true;
+#endif
}
enum SINK_STATES
--
1.7.9.5

View File

@ -0,0 +1,106 @@
From ee4bbfe929ce547310358c74c83468d514a7e288 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Wed, 16 Apr 2014 23:08:58 +0300
Subject: [PATCH 03/16] Enable true 1920x1080 output without upscaling on
Amlogic-based devices.
---
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 48 +++++++++++++++++++++++----
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 3 ++
2 files changed, 44 insertions(+), 7 deletions(-)
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index c19124c..ee17f73 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -87,9 +87,12 @@ bool CEGLNativeTypeAmlogic::CreateNativeWindow()
if (!nativeWindow)
return false;
- nativeWindow->width = 1280;
- nativeWindow->height = 720;
+ nativeWindow->width = 1920;
+ nativeWindow->height = 1080;
m_nativeWindow = nativeWindow;
+
+ SetFramebufferResolution(nativeWindow->width, nativeWindow->height);
+
return true;
#else
return false;
@@ -134,6 +137,12 @@ bool CEGLNativeTypeAmlogic::GetNativeResolution(RESOLUTION_INFO *res) const
bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
{
+ if (m_nativeWindow)
+ {
+ ((fbdev_window *)m_nativeWindow)->width = res.iScreenWidth;
+ ((fbdev_window *)m_nativeWindow)->height = res.iScreenHeight;
+ }
+
switch((int)(0.5 + res.fRefreshRate))
{
default:
@@ -220,12 +229,11 @@ bool CEGLNativeTypeAmlogic::SetDisplayResolution(const char *resolution)
// switch display resolution
aml_set_sysfs_str("/sys/class/display/mode", modestr.c_str());
- // setup gui freescale depending on display resolution
DisableFreeScale();
- if (StringUtils::StartsWith(modestr, "1080"))
- {
- EnableFreeScale();
- }
+
+ RESOLUTION_INFO res;
+ aml_mode_to_resolution(modestr, &res);
+ SetFramebufferResolution(res);
return true;
}
@@ -289,3 +297,29 @@ void CEGLNativeTypeAmlogic::DisableFreeScale()
close(fd0);
}
}
+
+void CEGLNativeTypeAmlogic::SetFramebufferResolution(const RESOLUTION_INFO &res) const
+{
+ SetFramebufferResolution(res.iScreenWidth, res.iScreenHeight);
+}
+
+void CEGLNativeTypeAmlogic::SetFramebufferResolution(int width, int height) const
+{
+ int fd0;
+ std::string framebuffer = "/dev/" + m_framebuffer_name;
+
+ if ((fd0 = open(framebuffer.c_str(), O_RDWR)) >= 0)
+ {
+ struct fb_var_screeninfo vinfo;
+ if (ioctl(fd0, FBIOGET_VSCREENINFO, &vinfo) == 0)
+ {
+ vinfo.xres = width;
+ vinfo.yres = height;
+ vinfo.xres_virtual = 1920;
+ vinfo.yres_virtual = 2160;
+ vinfo.bits_per_pixel = 32;
+ ioctl(fd0, FBIOPUT_VSCREENINFO, &vinfo);
+ }
+ close(fd0);
+ }
+}
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
index 87be029..69ca00a 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
@@ -53,5 +53,8 @@ protected:
void DisableFreeScale();
private:
+ void SetFramebufferResolution(const RESOLUTION_INFO &res) const;
+ void SetFramebufferResolution(int width, int height) const;
+
std::string m_framebuffer_name;
};
--
1.7.9.5

View File

@ -0,0 +1,59 @@
From c137ada0da2582c6438ddb2966cc582f8574773e Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 22 Jul 2014 12:18:29 +0300
Subject: [PATCH 04/16] Add support for retrieval of CPU temperature on
Amlogic
---
xbmc/utils/CPUInfo.cpp | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
index 71aa745..f80e7ba 100644
--- a/xbmc/utils/CPUInfo.cpp
+++ b/xbmc/utils/CPUInfo.cpp
@@ -18,6 +18,7 @@
*
*/
+#include "system.h"
#include "CPUInfo.h"
#include "Temperature.h"
#include <string>
@@ -95,6 +96,10 @@
#include "settings/AdvancedSettings.h"
#include "utils/StringUtils.h"
+#ifdef HAS_LIBAMCODEC
+#include "utils/AMLUtils.h"
+#endif
+
using namespace std;
// In milliseconds
@@ -265,6 +270,10 @@ CCPUInfo::CCPUInfo(void)
m_fProcTemperature = fopen("/sys/class/hwmon/hwmon0/temp1_input", "r");
if (m_fProcTemperature == NULL)
m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); // On Raspberry PIs
+#ifdef HAS_LIBAMCODEC
+ if (m_fProcTemperature == NULL)
+ m_fProcTemperature = fopen("/sys/class/saradc/temperature", "r");
+#endif
m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r");
if (!m_fCPUFreq)
@@ -607,7 +616,10 @@ bool CCPUInfo::getTemperature(CTemperature& temperature)
if (!ret)
{
ret = fscanf(m_fProcTemperature, "%d", &value);
- value = value / 1000;
+#ifndef HAS_LIBAMCODEC
+ if (!aml_present())
+ value = value / 1000;
+#endif
scale = 'c';
ret++;
}
--
1.7.9.5

View File

@ -0,0 +1,131 @@
From 436e67a7fa4969f41765990566f257ffafae9de6 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Wed, 23 Jul 2014 22:23:34 +0300
Subject: [PATCH 05/16] Add support for AV (CVBS) video output on Amlogic
Conflicts:
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
---
xbmc/utils/AMLUtils.cpp | 18 +++++++++++++
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 37 +++++++++++++++++++++++----
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 1 +
3 files changed, 51 insertions(+), 5 deletions(-)
diff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp
index 9553745..9d5b165 100644
--- a/xbmc/utils/AMLUtils.cpp
+++ b/xbmc/utils/AMLUtils.cpp
@@ -328,6 +328,24 @@ bool aml_mode_to_resolution(const char *mode, RESOLUTION_INFO *res)
res->fRefreshRate = 60;
res->dwFlags = D3DPRESENTFLAG_PROGRESSIVE;
}
+ else if (fromMode.Equals("480cvbs"))
+ {
+ res->iWidth = 720;
+ res->iHeight= 480;
+ res->iScreenWidth = 720;
+ res->iScreenHeight= 480;
+ res->fRefreshRate = 60;
+ res->dwFlags = D3DPRESENTFLAG_INTERLACED;
+ }
+ else if (fromMode.Equals("576cvbs"))
+ {
+ res->iWidth = 720;
+ res->iHeight= 576;
+ res->iScreenWidth = 720;
+ res->iScreenHeight= 576;
+ res->fRefreshRate = 50;
+ res->dwFlags = D3DPRESENTFLAG_INTERLACED;
+ }
else if (fromMode.Equals("720p"))
{
res->iWidth = 1280;
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index ee17f73..ab80343 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -159,6 +159,10 @@ bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
else
SetDisplayResolution("1080p");
break;
+ case 720:
+ if (!IsHdmiConnected())
+ SetDisplayResolution("480cvbs");
+ break;
}
break;
case 50:
@@ -174,6 +178,10 @@ bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
else
SetDisplayResolution("1080p50hz");
break;
+ case 720:
+ if (!IsHdmiConnected())
+ SetDisplayResolution("576cvbs");
+ break;
}
break;
case 30:
@@ -189,9 +197,18 @@ bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
bool CEGLNativeTypeAmlogic::ProbeResolutions(std::vector<RESOLUTION_INFO> &resolutions)
{
- char valstr[256] = {0};
- aml_get_sysfs_str("/sys/class/amhdmitx/amhdmitx0/disp_cap", valstr, 255);
- std::vector<std::string> probe_str = StringUtils::Split(valstr, "\n");
+ std::vector<std::string> probe_str;
+ if (IsHdmiConnected())
+ {
+ char valstr[256] = {0};
+ aml_get_sysfs_str("/sys/class/amhdmitx/amhdmitx0/disp_cap", valstr, 255);
+ probe_str = StringUtils::Split(valstr, "\n");
+ }
+ else
+ {
+ probe_str.push_back("480cvbs");
+ probe_str.push_back("576cvbs");
+ }
resolutions.clear();
RESOLUTION_INFO res;
@@ -209,8 +226,11 @@ bool CEGLNativeTypeAmlogic::GetPreferredResolution(RESOLUTION_INFO *res) const
// check display/mode, it gets defaulted at boot
if (!GetNativeResolution(res))
{
- // punt to 720p if we get nothing
- aml_mode_to_resolution("720p", res);
+ // punt to 720p or 576cvbs if we get nothing
+ if (IsHdmiConnected())
+ aml_mode_to_resolution("720p", res);
+ else
+ aml_mode_to_resolution("576cvbs", res);
}
return true;
@@ -323,3 +343,10 @@ void CEGLNativeTypeAmlogic::SetFramebufferResolution(int width, int height) cons
close(fd0);
}
}
+
+bool CEGLNativeTypeAmlogic::IsHdmiConnected() const
+{
+ char hpd_state[2] = {0};
+ aml_get_sysfs_str("/sys/class/amhdmitx/amhdmitx0/hpd_state", hpd_state, 2);
+ return hpd_state[0] == '1';
+}
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
index 69ca00a..adb4d51 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
@@ -55,6 +55,7 @@ protected:
private:
void SetFramebufferResolution(const RESOLUTION_INFO &res) const;
void SetFramebufferResolution(int width, int height) const;
+ bool IsHdmiConnected() const;
std::string m_framebuffer_name;
};
--
1.7.9.5

View File

@ -0,0 +1,113 @@
From 8e7abac4cd92434339268123257245086ba37c21 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 29 Jul 2014 10:31:07 +0300
Subject: [PATCH 06/16] Fix the issue when the video display is disabled after
a resolution change
---
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 57 +--------------------------
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 1 -
2 files changed, 1 insertion(+), 57 deletions(-)
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index ab80343..468a99e 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -65,7 +65,7 @@ void CEGLNativeTypeAmlogic::Initialize()
aml_permissions();
aml_cpufreq_min(true);
aml_cpufreq_max(true);
- return;
+ DisableFreeScale();
}
void CEGLNativeTypeAmlogic::Destroy()
{
@@ -249,8 +249,6 @@ bool CEGLNativeTypeAmlogic::SetDisplayResolution(const char *resolution)
// switch display resolution
aml_set_sysfs_str("/sys/class/display/mode", modestr.c_str());
- DisableFreeScale();
-
RESOLUTION_INFO res;
aml_mode_to_resolution(modestr, &res);
SetFramebufferResolution(res);
@@ -258,64 +256,11 @@ bool CEGLNativeTypeAmlogic::SetDisplayResolution(const char *resolution)
return true;
}
-void CEGLNativeTypeAmlogic::EnableFreeScale()
-{
- // enable OSD free scale using frame buffer size of 720p
- aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 0);
- aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 0);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_height", 720);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_height", 720);
-
- // enable video free scale (scaling to 1920x1080 with frame buffer size 1280x720)
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 0);
- aml_set_sysfs_int("/sys/class/video/disable_video", 1);
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 1);
- aml_set_sysfs_str("/sys/class/ppmgr/ppscaler_rect", "0 0 1919 1079 0");
- aml_set_sysfs_str("/sys/class/ppmgr/disp", "1280 720");
- //
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_height", 720);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_height", 720);
- //
- aml_set_sysfs_int("/sys/class/video/disable_video", 2);
- aml_set_sysfs_str("/sys/class/display/axis", "0 0 1279 719 0 0 0 0");
- aml_set_sysfs_str("/sys/class/ppmgr/ppscaler_rect", "0 0 1279 719 1");
- //
- aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 1);
- aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 1);
- aml_set_sysfs_str("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
-}
-
void CEGLNativeTypeAmlogic::DisableFreeScale()
{
// turn off frame buffer freescale
aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 0);
aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 0);
- aml_set_sysfs_str("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
-
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 0);
- aml_set_sysfs_int("/sys/class/video/disable_video", 0);
- // now default video display to off
- aml_set_sysfs_int("/sys/class/video/disable_video", 1);
-
- // revert display axis
- int fd0;
- std::string framebuffer = "/dev/" + m_framebuffer_name;
-
- if ((fd0 = open(framebuffer.c_str(), O_RDWR)) >= 0)
- {
- struct fb_var_screeninfo vinfo;
- if (ioctl(fd0, FBIOGET_VSCREENINFO, &vinfo) == 0)
- {
- char daxis_str[255] = {0};
- sprintf(daxis_str, "%d %d %d %d 0 0 0 0", 0, 0, vinfo.xres-1, vinfo.yres-1);
- aml_set_sysfs_str("/sys/class/display/axis", daxis_str);
- }
- close(fd0);
- }
}
void CEGLNativeTypeAmlogic::SetFramebufferResolution(const RESOLUTION_INFO &res) const
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
index adb4d51..79e5733 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.h
@@ -49,7 +49,6 @@ public:
protected:
bool SetDisplayResolution(const char *resolution);
- void EnableFreeScale();
void DisableFreeScale();
private:
--
1.7.9.5

View File

@ -0,0 +1,27 @@
From e6946cdeeb07c7aaabf0665d2ccba802b8dabafd Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Thu, 4 Sep 2014 00:28:23 +0300
Subject: [PATCH 07/16] [aml] Update all virtual consoles when changing
framebuffer geometry after a resolution change
That helps to resolve the issue when framebuffer size is not always correctly change according to the resolution set.
It seems that the issue appeared after updating to the U-Boot bootloader released 2014-08-24 by Amlogic.
---
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index 468a99e..f8ceb3d 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -283,6 +283,7 @@ void CEGLNativeTypeAmlogic::SetFramebufferResolution(int width, int height) cons
vinfo.xres_virtual = 1920;
vinfo.yres_virtual = 2160;
vinfo.bits_per_pixel = 32;
+ vinfo.activate = FB_ACTIVATE_ALL;
ioctl(fd0, FBIOPUT_VSCREENINFO, &vinfo);
}
close(fd0);
--
1.7.9.5

View File

@ -0,0 +1,30 @@
From 8a3d4276a0d42795bad6d46bc30c9490f97592a6 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Mon, 8 Sep 2014 23:29:40 +0300
Subject: [PATCH 08/16] Reorder libraries in configure script to prevent
linker errors when linking with libsmbclient
Place libsmbclient before all other libraries to prevent linker errors when linking
with libsmbclient if the libc that is currently used doesn't contain some functions
such as dn_expand (which are often included in libc), but are actually included in
libresolv.
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index d7c971d..83545d9 100644
--- a/configure.in
+++ b/configure.in
@@ -1468,7 +1468,7 @@ fi
# samba
if test "x$use_samba" != "xno"; then
PKG_CHECK_MODULES([SAMBA], [smbclient],
- [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$LIBS $SAMBA_LIBS"],
+ [INCLUDES="$INCLUDES $SAMBA_CFLAGS"; LIBS="$SAMBA_LIBS $LIBS"],
[AC_CHECK_LIB([smbclient], [main],,
use_samba=no;AC_MSG_ERROR($missing_library))
USE_LIBSMBCLIENT=0
--
1.7.9.5

View File

@ -0,0 +1,48 @@
From 5f06d8bb7e427e43b8a2ed1d3399439f3ad156d1 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Fri, 19 Sep 2014 01:55:12 +0300
Subject: [PATCH 09/16] [aml] Change the sample rates that are supported by
ALSA but unsupported by HDMI to the closest supported
value
Conflicts:
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
---
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index 8679107..f2b29d4 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -664,6 +664,26 @@ bool CAESinkALSA::InitializeHW(const ALSAConfig &inconfig, ALSAConfig &outconfig
snd_pcm_hw_params_set_access(m_pcm, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
unsigned int sampleRate = inconfig.sampleRate;
+#ifdef HAS_LIBAMCODEC
+ // Change the sample rates that are supported by ALSA but unsupported by HDMI to the closest supported value
+ switch (sampleRate)
+ {
+ case 5512:
+ case 8000:
+ case 11025:
+ case 16000:
+ case 22050:
+ sampleRate = 44100;
+ break;
+ case 64000:
+ sampleRate = 88200;
+ break;
+ case 384000:
+ sampleRate = 192000;
+ break;
+ }
+#endif
+
snd_pcm_hw_params_set_rate_near (m_pcm, hw_params, &sampleRate, NULL);
unsigned int channelCount = inconfig.channels;
--
1.7.9.5

View File

@ -0,0 +1,29 @@
From 23501841efd32b519de4e8924f760354fb703572 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Sat, 20 Sep 2014 04:43:52 +0300
Subject: [PATCH 10/16] [aml] Fill audio packets completely when resampling to
prevent 'audio data unaligned' kernel warnings
---
.../Engines/ActiveAE/ActiveAEBuffer.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
index 3b0a015..ef431a4 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
@@ -143,7 +143,11 @@ CActiveAEBufferPoolResample::CActiveAEBufferPoolResample(AEAudioFormat inputForm
if (AE_IS_RAW(m_inputFormat.m_dataFormat))
m_inputFormat.m_dataFormat = AE_FMT_S16NE;
m_resampler = NULL;
+#ifdef HAS_LIBAMCODEC
+ m_fillPackets = true;
+#else
m_fillPackets = false;
+#endif
m_drain = false;
m_empty = true;
m_procSample = NULL;
--
1.7.9.5

View File

@ -0,0 +1,120 @@
From 5091ef4fb995c399087435a0d7efc96318099c70 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Sun, 21 Sep 2014 17:17:14 +0300
Subject: [PATCH 11/16] [aml] Use fpsrate and fpsscale instead of rfpsrate and
rfpsscale to detect framerate
---
xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 12 ++-----
.../DVDCodecs/Video/DVDVideoCodecAmlogic.cpp | 38 +++++++++-----------
2 files changed, 20 insertions(+), 30 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
index 47f6594..e859eaa 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
@@ -1465,14 +1465,8 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)
am_private->video_ratio64 = ((int64_t)video_ratio.num << 32) | video_ratio.den;
// handle video rate
- if (hints.rfpsrate > 0 && hints.rfpsscale != 0)
+ if (hints.fpsrate > 0 && hints.fpsscale != 0)
{
- // check ffmpeg r_frame_rate 1st
- am_private->video_rate = 0.5 + (float)UNIT_FREQ * hints.rfpsscale / hints.rfpsrate;
- }
- else if (hints.fpsrate > 0 && hints.fpsscale != 0)
- {
- // then ffmpeg avg_frame_rate next
am_private->video_rate = 0.5 + (float)UNIT_FREQ * hints.fpsscale / hints.fpsrate;
}
@@ -1545,8 +1539,8 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)
CLog::Log(LOGDEBUG, "CAMLCodec::OpenDecoder "
"hints.width(%d), hints.height(%d), hints.codec(%d), hints.codec_tag(%d), hints.pid(%d)",
hints.width, hints.height, hints.codec, hints.codec_tag, hints.pid);
- CLog::Log(LOGDEBUG, "CAMLCodec::OpenDecoder hints.fpsrate(%d), hints.fpsscale(%d), hints.rfpsrate(%d), hints.rfpsscale(%d), video_rate(%d)",
- hints.fpsrate, hints.fpsscale, hints.rfpsrate, hints.rfpsscale, am_private->video_rate);
+ CLog::Log(LOGDEBUG, "CAMLCodec::OpenDecoder hints.fpsrate(%d), hints.fpsscale(%d), video_rate(%d)",
+ hints.fpsrate, hints.fpsscale, am_private->video_rate);
CLog::Log(LOGDEBUG, "CAMLCodec::OpenDecoder hints.aspect(%f), video_ratio.num(%d), video_ratio.den(%d)",
hints.aspect, video_ratio.num, video_ratio.den);
CLog::Log(LOGDEBUG, "CAMLCodec::OpenDecoder hints.orientation(%d), hints.forced_aspect(%d), hints.extrasize(%d)",
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp
index 24c1ab9..960aae1 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp
@@ -74,9 +74,7 @@ bool CDVDVideoCodecAmlogic::Open(CDVDStreamInfo &hints, CDVDCodecOptions &option
m_mpeg2_sequence->width = m_hints.width;
m_mpeg2_sequence->height = m_hints.height;
m_mpeg2_sequence->ratio = m_hints.aspect;
- if (m_hints.rfpsrate > 0 && m_hints.rfpsscale != 0)
- m_mpeg2_sequence->rate = (float)m_hints.rfpsrate / m_hints.rfpsscale;
- else if (m_hints.fpsrate > 0 && m_hints.fpsscale != 0)
+ if (m_hints.fpsrate > 0 && m_hints.fpsscale != 0)
m_mpeg2_sequence->rate = (float)m_hints.fpsrate / m_hints.fpsscale;
else
m_mpeg2_sequence->rate = 1.0;
@@ -374,43 +372,41 @@ void CDVDVideoCodecAmlogic::FrameRateTracking(uint8_t *pData, int iSize, double
{
default:
case 0x01:
- m_hints.rfpsrate = 24000.0;
- m_hints.rfpsscale = 1001.0;
+ m_hints.fpsrate = 24000.0;
+ m_hints.fpsscale = 1001.0;
break;
case 0x02:
- m_hints.rfpsrate = 24000.0;
- m_hints.rfpsscale = 1000.0;
+ m_hints.fpsrate = 24000.0;
+ m_hints.fpsscale = 1000.0;
break;
case 0x03:
- m_hints.rfpsrate = 25000.0;
- m_hints.rfpsscale = 1000.0;
+ m_hints.fpsrate = 25000.0;
+ m_hints.fpsscale = 1000.0;
break;
case 0x04:
- m_hints.rfpsrate = 30000.0;
- m_hints.rfpsscale = 1001.0;
+ m_hints.fpsrate = 30000.0;
+ m_hints.fpsscale = 1001.0;
break;
case 0x05:
- m_hints.rfpsrate = 30000.0;
- m_hints.rfpsscale = 1000.0;
+ m_hints.fpsrate = 30000.0;
+ m_hints.fpsscale = 1000.0;
break;
case 0x06:
- m_hints.rfpsrate = 50000.0;
- m_hints.rfpsscale = 1000.0;
+ m_hints.fpsrate = 50000.0;
+ m_hints.fpsscale = 1000.0;
break;
case 0x07:
- m_hints.rfpsrate = 60000.0;
- m_hints.rfpsscale = 1001.0;
+ m_hints.fpsrate = 60000.0;
+ m_hints.fpsscale = 1001.0;
break;
case 0x08:
- m_hints.rfpsrate = 60000.0;
- m_hints.rfpsscale = 1000.0;
+ m_hints.fpsrate = 60000.0;
+ m_hints.fpsscale = 1000.0;
break;
}
m_hints.width = m_mpeg2_sequence->width;
m_hints.height = m_mpeg2_sequence->height;
m_hints.aspect = m_mpeg2_sequence->ratio;
- m_hints.fpsrate = m_hints.rfpsrate;
- m_hints.fpsscale = m_hints.rfpsscale;
}
return;
}
--
1.7.9.5

View File

@ -0,0 +1,143 @@
From 2e9b3a3a6e7b2055479e110c5cbec0d696af8240 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Sun, 21 Sep 2014 17:20:25 +0300
Subject: [PATCH 12/16] Fix incorrect frame rate detection of some videos with
variable frame rate.
Use FFMPEG's r_frame_rate, if it as valid, as a video stream frame rate, otherwise use avg_frame_rate.
Also remove CDVDStreamInfo.rfpsscale, CDVDStreamInfo.rfpsrate, CDemuxStreamVideo.irFpsScale and CDemuxStreamVideo.irFpsRate,
they are not needed anymore.
---
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h | 4 ---
.../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 29 +++++++-------------
xbmc/cores/dvdplayer/DVDStreamInfo.cpp | 8 ------
xbmc/cores/dvdplayer/DVDStreamInfo.h | 2 --
4 files changed, 10 insertions(+), 33 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
index 40c16c0..98c3513 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
@@ -148,8 +148,6 @@ public:
{
iFpsScale = 0;
iFpsRate = 0;
- irFpsScale = 0;
- irFpsRate = 0;
iHeight = 0;
iWidth = 0;
fAspect = 0.0;
@@ -164,8 +162,6 @@ public:
virtual ~CDemuxStreamVideo() {}
int iFpsScale; // scale of 1000 and a rate of 29970 will result in 29.97 fps
int iFpsRate;
- int irFpsScale;
- int irFpsRate;
int iHeight; // height of the stream reported by the demuxer
int iWidth; // width of the stream reported by the demuxer
float fAspect; // display aspect of stream
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
index 300bff7..9a2db60 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
@@ -1117,34 +1117,25 @@ CDemuxStream* CDVDDemuxFFmpeg::AddStream(int iId)
#else
AVRational r_frame_rate = pStream->r_frame_rate;
#endif
+ int rFrameRate = 0;
+ if (r_frame_rate.den && r_frame_rate.num)
+ rFrameRate = r_frame_rate.num / r_frame_rate.den;
+ bool rFrameRateValid = rFrameRate >= 5 && rFrameRate <= 100;
- //average fps is more accurate for mkv files
- if (m_bMatroska && pStream->avg_frame_rate.den && pStream->avg_frame_rate.num)
- {
- st->iFpsRate = pStream->avg_frame_rate.num;
- st->iFpsScale = pStream->avg_frame_rate.den;
- }
- else if(r_frame_rate.den && r_frame_rate.num)
+ if (rFrameRateValid)
{
st->iFpsRate = r_frame_rate.num;
st->iFpsScale = r_frame_rate.den;
}
- else
- {
- st->iFpsRate = 0;
- st->iFpsScale = 0;
- }
-
- // added for aml hw decoder, mkv frame-rate can be wrong.
- if (r_frame_rate.den && r_frame_rate.num)
+ else if(pStream->avg_frame_rate.den && pStream->avg_frame_rate.num)
{
- st->irFpsRate = r_frame_rate.num;
- st->irFpsScale = r_frame_rate.den;
+ st->iFpsRate = pStream->avg_frame_rate.num;
+ st->iFpsScale = pStream->avg_frame_rate.den;
}
else
{
- st->irFpsRate = 0;
- st->irFpsScale = 0;
+ st->iFpsRate = 0;
+ st->iFpsScale = 0;
}
if (pStream->codec_info_nb_frames > 0
diff --git a/xbmc/cores/dvdplayer/DVDStreamInfo.cpp b/xbmc/cores/dvdplayer/DVDStreamInfo.cpp
index c1dbd85..03facbe 100644
--- a/xbmc/cores/dvdplayer/DVDStreamInfo.cpp
+++ b/xbmc/cores/dvdplayer/DVDStreamInfo.cpp
@@ -52,8 +52,6 @@ void CDVDStreamInfo::Clear()
fpsscale = 0;
fpsrate = 0;
- rfpsscale= 0;
- rfpsrate = 0;
height = 0;
width = 0;
aspect = 0.0;
@@ -97,8 +95,6 @@ bool CDVDStreamInfo::Equal(const CDVDStreamInfo& right, bool withextradata)
// VIDEO
if( fpsscale != right.fpsscale
|| fpsrate != right.fpsrate
- || rfpsscale!= right.rfpsscale
- || rfpsrate != right.rfpsrate
|| height != right.height
|| width != right.width
|| stills != right.stills
@@ -159,8 +155,6 @@ void CDVDStreamInfo::Assign(const CDVDStreamInfo& right, bool withextradata)
// VIDEO
fpsscale = right.fpsscale;
fpsrate = right.fpsrate;
- rfpsscale= right.rfpsscale;
- rfpsrate = right.rfpsrate;
height = right.height;
width = right.width;
aspect = right.aspect;
@@ -220,8 +214,6 @@ void CDVDStreamInfo::Assign(const CDemuxStream& right, bool withextradata)
const CDemuxStreamVideo *stream = static_cast<const CDemuxStreamVideo*>(&right);
fpsscale = stream->iFpsScale;
fpsrate = stream->iFpsRate;
- rfpsscale = stream->irFpsScale;
- rfpsrate = stream->irFpsRate;
height = stream->iHeight;
width = stream->iWidth;
aspect = stream->fAspect;
diff --git a/xbmc/cores/dvdplayer/DVDStreamInfo.h b/xbmc/cores/dvdplayer/DVDStreamInfo.h
index de66625..d775d78 100644
--- a/xbmc/cores/dvdplayer/DVDStreamInfo.h
+++ b/xbmc/cores/dvdplayer/DVDStreamInfo.h
@@ -58,8 +58,6 @@ public:
// VIDEO
int fpsscale; // scale of 1000 and a rate of 29970 will result in 29.97 fps
int fpsrate;
- int rfpsscale;
- int rfpsrate;
int height; // height of the stream reported by the demuxer
int width; // width of the stream reported by the demuxer
float aspect; // display aspect as reported by demuxer
--
1.7.9.5

View File

@ -0,0 +1,46 @@
From 12685fbccb83b93051d618a2a6192625da673296 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Sun, 19 Oct 2014 16:20:33 +0300
Subject: [PATCH 13/16] Save settings only if they were modified after the
last save
This prevents from multiple saving the same settings and helps to resolve
the issue on Amlogic G18REF TV-boxes when setiings may be lost after a poweroff.
On G18REF When you press the red button on the remote the system receives a signal that power
is about to off. XBMC always writes guisettings.xml before exit, and the same settings
may be written several times from different places in code. But the power gets turned off
before the system completes all shutdown procedures. There may be the case that guisettings.xml
is written half-way and couldn't be read upon next boot, so the XBMC creates a new one with
default settings.
With this fix the settings will be written at exit only once, minimizing the risk of being lost.
---
xbmc/settings/Settings.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index 3c981a4..0850bce 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -207,6 +207,17 @@ bool CSettings::Save(const std::string &file)
if (!m_settingsManager->Save(root))
return false;
+ // Avoid saving if the settings saved earlier are indetical to the current ones
+ if (CFile::Exists(file))
+ {
+ std::string fileMD5 = CUtil::GetFileMD5(file);
+ TiXmlPrinter xmlPrinter;
+ xmlDoc.Accept(&xmlPrinter);
+ std::string settingsMD5 = XBMC::XBMC_MD5::GetMD5(xmlPrinter.CStr());
+ if (fileMD5 == settingsMD5)
+ return true;
+ }
+
return xmlDoc.SaveFile(file);
}
--
1.7.9.5

View File

@ -0,0 +1,45 @@
From 3daad356fe95b304b8ba995dae476ec77664c989 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Fri, 10 Oct 2014 23:56:59 +0300
Subject: [PATCH 14/16] [aml] Fix periodic video stuttering during playback of
some media files and streams
---
xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
index e859eaa..007f3a6 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
@@ -1994,19 +1994,15 @@ void CAMLCodec::Process()
double error = app_pts - (double)pts_video/PTS_FREQ;
double abs_error = fabs(error);
- if (abs_error > 0.125)
+ if (abs_error > 0.150)
{
- //CLog::Log(LOGDEBUG, "CAMLCodec::Process pts diff = %f", error);
- if (abs_error > 0.150)
- {
- // big error so try to reset pts_pcrscr
- SetVideoPtsSeconds(app_pts);
- }
- else
- {
- // small error so try to avoid a frame jump
- SetVideoPtsSeconds((double)pts_video/PTS_FREQ + error/4);
- }
+ // big error so try to reset pts_pcrscr
+ SetVideoPtsSeconds(app_pts);
+ }
+ else
+ {
+ // small error so try to avoid a frame jump
+ SetVideoPtsSeconds((double)pts_video/PTS_FREQ + error/4);
}
}
}
--
1.7.9.5

View File

@ -0,0 +1,179 @@
From ea22621b073bf1c01aeeb3bb3c24468bf11e7e38 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Thu, 6 Nov 2014 08:14:39 +0200
Subject: [PATCH 15/16] [aml] Remove dependency on libamplayer and amffmpeg
---
xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 79 +-------------------
.../DVDCodecs/Video/DVDVideoCodecAmlogic.cpp | 3 -
2 files changed, 3 insertions(+), 79 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
index 007f3a6..8422d7d 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
@@ -50,9 +50,9 @@
#include <stdlib.h>
#include <sys/ioctl.h>
-// amcodec include
extern "C" {
#include <amcodec/codec.h>
+#include <libavutil/avutil.h>
} // extern "C"
typedef struct {
@@ -91,19 +91,11 @@ public:
virtual int codec_set_cntl_mode(codec_para_t *pcodec, unsigned int mode)=0;
virtual int codec_set_cntl_avthresh(codec_para_t *pcodec, unsigned int avthresh)=0;
virtual int codec_set_cntl_syncthresh(codec_para_t *pcodec, unsigned int syncthresh)=0;
-
- // grab these from libamplayer
- virtual int h263vld(unsigned char *inbuf, unsigned char *outbuf, int inbuf_len, int s263)=0;
- virtual int decodeble_h263(unsigned char *buf)=0;
-
- // grab this from amffmpeg so we do not have to load DllAvUtil
- virtual AVRational av_d2q(double d, int max)=0;
};
class DllLibAmCodec : public DllDynamic, DllLibamCodecInterface
{
- // libamcodec is static linked into libamplayer.so
- DECLARE_DLL_WRAPPER(DllLibAmCodec, "libamplayer.so")
+ DECLARE_DLL_WRAPPER(DllLibAmCodec, "libamcodec.so")
DEFINE_METHOD1(int, codec_init, (codec_para_t *p1))
DEFINE_METHOD1(int, codec_close, (codec_para_t *p1))
@@ -121,11 +113,6 @@ class DllLibAmCodec : public DllDynamic, DllLibamCodecInterface
DEFINE_METHOD2(int, codec_set_cntl_avthresh, (codec_para_t *p1, unsigned int p2))
DEFINE_METHOD2(int, codec_set_cntl_syncthresh,(codec_para_t *p1, unsigned int p2))
- DEFINE_METHOD4(int, h263vld, (unsigned char *p1, unsigned char *p2, int p3, int p4))
- DEFINE_METHOD1(int, decodeble_h263, (unsigned char *p1))
-
- DEFINE_METHOD2(AVRational, av_d2q, (double p1, int p2))
-
BEGIN_METHOD_RESOLVE()
RESOLVE_METHOD(codec_init)
RESOLVE_METHOD(codec_close)
@@ -142,11 +129,6 @@ class DllLibAmCodec : public DllDynamic, DllLibamCodecInterface
RESOLVE_METHOD(codec_set_cntl_mode)
RESOLVE_METHOD(codec_set_cntl_avthresh)
RESOLVE_METHOD(codec_set_cntl_syncthresh)
-
- RESOLVE_METHOD(h263vld)
- RESOLVE_METHOD(decodeble_h263)
-
- RESOLVE_METHOD(av_d2q)
END_METHOD_RESOLVE()
public:
@@ -345,8 +327,6 @@ typedef struct am_private_t
unsigned int video_ratio64;
unsigned int video_rate;
unsigned int video_rotation_degree;
- int flv_flag;
- int h263_decodable;
int extrasize;
uint8_t *extradata;
DllLibAmCodec *m_dll;
@@ -439,7 +419,6 @@ static vformat_t codecid_to_vformat(enum AVCodecID id)
case AV_CODEC_ID_H263I:
case AV_CODEC_ID_MSMPEG4V2:
case AV_CODEC_ID_MSMPEG4V3:
- case AV_CODEC_ID_FLV1:
format = VFORMAT_MPEG4;
break;
case AV_CODEC_ID_RV10:
@@ -1221,51 +1200,6 @@ int set_header_info(am_private_t *para)
{
return divx3_prefix(pkt);
}
- else if (para->video_codec_type == VIDEO_DEC_FORMAT_H263)
- {
- return PLAYER_UNSUPPORT;
- unsigned char *vld_buf;
- int vld_len, vld_buf_size = para->video_width * para->video_height * 2;
-
- if (!pkt->data_size) {
- return PLAYER_SUCCESS;
- }
-
- if ((pkt->data[0] == 0) && (pkt->data[1] == 0) && (pkt->data[2] == 1) && (pkt->data[3] == 0xb6)) {
- return PLAYER_SUCCESS;
- }
-
- vld_buf = (unsigned char*)malloc(vld_buf_size);
- if (!vld_buf) {
- return PLAYER_NOMEM;
- }
-
- if (para->flv_flag) {
- vld_len = para->m_dll->h263vld(pkt->data, vld_buf, pkt->data_size, 1);
- } else {
- if (0 == para->h263_decodable) {
- para->h263_decodable = para->m_dll->decodeble_h263(pkt->data);
- if (0 == para->h263_decodable) {
- CLog::Log(LOGDEBUG, "[%s]h263 unsupport video and audio, exit", __FUNCTION__);
- return PLAYER_UNSUPPORT;
- }
- }
- vld_len = para->m_dll->h263vld(pkt->data, vld_buf, pkt->data_size, 0);
- }
-
- if (vld_len > 0) {
- if (pkt->buf) {
- free(pkt->buf);
- }
- pkt->buf = vld_buf;
- pkt->buf_size = vld_buf_size;
- pkt->data = pkt->buf;
- pkt->data_size = vld_len;
- } else {
- free(vld_buf);
- pkt->data_size = 0;
- }
- }
} else if (para->video_format == VFORMAT_VC1) {
if (para->video_codec_type == VIDEO_DEC_FORMAT_WMV3) {
unsigned i, check_sum = 0, data_len = 0;
@@ -1458,7 +1392,7 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)
am_private->video_pid = hints.pid;
// handle video ratio
- AVRational video_ratio = m_dll->av_d2q(1, SHRT_MAX);
+ AVRational video_ratio = av_d2q(1, SHRT_MAX);
//if (!hints.forced_aspect)
// video_ratio = m_dll->av_d2q(hints.aspect, SHRT_MAX);
am_private->video_ratio = ((int32_t)video_ratio.num << 16) | video_ratio.den;
@@ -1529,13 +1463,6 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)
else
am_private->video_codec_type = codec_tag_to_vdec_type(am_private->video_codec_id);
- am_private->flv_flag = 0;
- if (am_private->video_codec_id == AV_CODEC_ID_FLV1)
- {
- am_private->video_codec_tag = CODEC_TAG_F263;
- am_private->flv_flag = 1;
- }
-
CLog::Log(LOGDEBUG, "CAMLCodec::OpenDecoder "
"hints.width(%d), hints.height(%d), hints.codec(%d), hints.codec_tag(%d), hints.pid(%d)",
hints.width, hints.height, hints.codec, hints.codec_tag, hints.pid);
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp
index 960aae1..57f8e40 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAmlogic.cpp
@@ -108,9 +108,6 @@ bool CDVDVideoCodecAmlogic::Open(CDVDStreamInfo &hints, CDVDCodecOptions &option
// amcodec can't handle h263
return false;
break;
- case AV_CODEC_ID_FLV1:
- m_pFormatName = "am-flv1";
- break;
case AV_CODEC_ID_RV10:
case AV_CODEC_ID_RV20:
case AV_CODEC_ID_RV30:
--
1.7.9.5

View File

@ -0,0 +1,28 @@
From ff1b77d929a8ff79fff1b4b9da41ac473523a02c Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com>
Date: Sun, 2 Nov 2014 15:54:29 +0200
Subject: [PATCH 16/16] [aml] Add some key mappings for HDMI CEC
---
xbmc/input/linux/LinuxInputDevices.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
index 0b0f7ae..c84930f 100644
--- a/xbmc/input/linux/LinuxInputDevices.cpp
+++ b/xbmc/input/linux/LinuxInputDevices.cpp
@@ -250,6 +250,11 @@ KeyMap keyMap[] = {
{ KEY_PRINT , XBMCK_PRINT },
{ KEY_QUESTION , XBMCK_HELP },
{ KEY_BACK , XBMCK_BACKSPACE },
+ { KEY_SELECT , XBMCK_RETURN },
+ { KEY_RED , XBMCK_TAB },
+ { KEY_GREEN , XBMCK_z },
+ { KEY_YELLOW , XBMCK_i },
+ { KEY_BLUE , XBMCK_c },
// The Little Black Box Remote Additions
{ 384 , XBMCK_LEFT }, // Red
{ 378 , XBMCK_RIGHT }, // Green
--
1.7.9.5

View File

@ -0,0 +1,12 @@
diff --git a/xbmc/input/linux/LinuxInputDevices.cpp b/xbmc/input/linux/LinuxInputDevices.cpp
index ee21474..5dcaf69 100644
--- a/xbmc/input/linux/LinuxInputDevices.cpp
+++ b/xbmc/input/linux/LinuxInputDevices.cpp
@@ -242,6 +242,7 @@ KeyMap keyMap[] = {
{ KEY_RECORD , XBMCK_RECORD },
{ KEY_REWIND , XBMCK_REWIND },
{ KEY_PHONE , XBMCK_PHONE },
+ { KEY_HOMEPAGE , XBMCK_BROWSER_HOME},
{ KEY_REFRESH , XBMCK_SHUFFLE },
{ KEY_SCROLLUP , XBMCK_PAGEUP },
{ KEY_SCROLLDOWN , XBMCK_PAGEDOWN },

View File

@ -0,0 +1,13 @@
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index f92bd59..387bd3d 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2605,7 +2605,7 @@
<group id="2">
<setting id="input.remoteaskeyboard" type="boolean" label="21449" help="36376">
<level>1</level>
- <default>false</default>
+ <default>true</default>
<control type="toggle" />
</setting>
<setting id="input.enablemouse" type="boolean" label="21369" help="36377">

View File

@ -0,0 +1,13 @@
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in b/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in
index 8a97889..78506b1 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in
@@ -27,8 +27,6 @@ endif
ifeq (@USE_LIBAMCODEC@,1)
SRCS += AMLCodec.cpp
SRCS += DVDVideoCodecAmlogic.cpp
-INCLUDES += -I$(prefix)/include/amcodec
-INCLUDES += -I$(prefix)/include/amplayer
endif
ifeq (@USE_ANDROID@,1)

View File

@ -0,0 +1,21 @@
diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml
index 45682a2..74fbd13 100644
--- a/system/keymaps/keyboard.xml
+++ b/system/keymaps/keyboard.xml
@@ -57,7 +57,7 @@
<key id='65446'>Back</key>
<m>ActivateWindow(PlayerControls)</m>
<s>ActivateWindow(shutdownmenu)</s>
- <escape>PreviousMenu</escape>
+ <escape>Back</escape>
<i>Info</i>
<menu>ContextMenu</menu>
<c>ContextMenu</c>
@@ -167,6 +167,7 @@
<VirtualKeyboard>
<keyboard>
<backspace>Backspace</backspace>
+ <escape>PreviousMenu</escape>
</keyboard>
</VirtualKeyboard>
<MyTV>

View File

@ -0,0 +1,35 @@
diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml
index 45682a2..b8ce91b 100644
--- a/system/keymaps/keyboard.xml
+++ b/system/keymaps/keyboard.xml
@@ -96,7 +96,7 @@
<backslash>ToggleFullScreen</backslash>
<home>FirstPage</home>
<end>LastPage</end>
- <power>ActivateWindow(shutdownmenu)</power>
+ <power>XBMC.Powerdown()</power>
<sleep>ActivateWindow(shutdownmenu)</sleep>
<!-- PVR windows -->
<e>XBMC.ActivateWindowAndFocus(MyPVR, 31,0, 10,0)</e>
diff --git a/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp b/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
index 5a97fe6..369e790 100644
--- a/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
+++ b/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
@@ -52,7 +52,7 @@ CLogindUPowerSyscall::CLogindUPowerSyscall()
m_canPowerdown = LogindCheckCapability("CanPowerOff");
m_canReboot = LogindCheckCapability("CanReboot");
m_canHibernate = LogindCheckCapability("CanHibernate");
- m_canSuspend = LogindCheckCapability("CanSuspend");
+ m_canSuspend = false;
InhibitDelayLock();
@@ -97,7 +97,7 @@ CLogindUPowerSyscall::~CLogindUPowerSyscall()
bool CLogindUPowerSyscall::Powerdown()
{
- return LogindSetPowerState("PowerOff");
+ return Suspend();
}
bool CLogindUPowerSyscall::Reboot()

View File

@ -0,0 +1,13 @@
diff -Naur a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
--- a/drivers/media/dvb-core/dvb_frontend.c 2014-12-08 17:33:43.262657721 +0100
+++ b/drivers/media/dvb-core/dvb_frontend.c 2014-12-08 17:34:37.126207052 +0100
@@ -2416,6 +2416,9 @@
if(cmd == FE_SET_PROPERTY) {
tvps = (struct dtv_properties __user *)parg;
+ if(fe->ops.set_mode)
+ fe->ops.set_mode(fe, FE_QPSK);
+
dev_dbg(fe->dvb->device, "%s: properties.num = %d\n", __func__, tvps->num);
dev_dbg(fe->dvb->device, "%s: properties.props = %p\n", __func__, tvps->props);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
diff --git a/init/main.c b/init/main.c
index 9484f4b..db55edd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -880,8 +880,14 @@ static noinline void __init kernel_init_freeable(void)
do_basic_setup();
/* Open the /dev/console on the rootfs, this should never fail */
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
- pr_err("Warning: unable to open an initial console.\n");
+ char *console = "/dev_console";
+
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
+ if (sys_open(console, O_RDWR, 0) < 0)
+ printk(KERN_WARNING "Warning: unable to open an initial console.\n");
+ sys_unlink(console);
+ }
(void) sys_dup(0);
(void) sys_dup(0);

View File

@ -0,0 +1,28 @@
diff --git a/arch/arm/mach-meson6/pm.c b/arch/arm/mach-meson6/pm.c
index 2c08ec1..9b865e7 100755
--- a/arch/arm/mach-meson6/pm.c
+++ b/arch/arm/mach-meson6/pm.c
@@ -1056,7 +1056,22 @@ static void power_off_unused_pll(void)
}
static void m6ref_set_vccx2(int power_on)
{
-
+ if (power_on) {
+ printk(KERN_INFO "%s() Power ON\n", __FUNCTION__);
+ aml_clr_reg32_mask(P_PREG_PAD_GPIO0_EN_N,(1<<26));
+ aml_clr_reg32_mask(P_PREG_PAD_GPIO0_O,(1<<26));
+
+ aml_set_reg32_bits(SECBUS2_REG_ADDR(0), 1, 0, 1); // set TEST_n output mode
+ aml_set_reg32_bits(AOBUS_REG_ADDR(0x24), 1, 31, 1); // set TEST_n pin H
+ }
+ else {
+ printk(KERN_INFO "%s() Power OFF\n", __FUNCTION__);
+ aml_clr_reg32_mask(P_PREG_PAD_GPIO0_EN_N,(1<<26));
+ aml_set_reg32_mask(P_PREG_PAD_GPIO0_O,(1<<26));
+
+ aml_set_reg32_bits(SECBUS2_REG_ADDR(0), 1, 0, 1); // set TEST_n output mode
+ aml_set_reg32_bits(AOBUS_REG_ADDR(0x24), 0, 31, 1); // set TEST_n pin H
+ }
}
static struct meson_pm_config aml_pm_pdata = {