Fixes for desktop configuration

This commit is contained in:
zador-blood-stained 2016-10-05 19:32:23 +03:00
parent 93798dcc5f
commit 1fc7615b70
12 changed files with 193 additions and 24 deletions

View File

@ -104,11 +104,12 @@ chroot_prepare_distccd()
#
chroot_build_packages()
{
local failed=()
for release in jessie xenial; do
for arch in armhf arm64; do
display_alert "Starting package building process" "$release $arch" "info"
local target_dir=$DEST/buildpkg/${release}-${arch}-v4
local target_dir=$DEST/buildpkg/${release}-${arch}-v5
local distcc_bindaddr="127.0.0.2"
[[ ! -f $target_dir/root/.debootstrap-complete ]] && create_chroot "$target_dir" "$release" "$arch"
@ -212,10 +213,11 @@ chroot_build_packages()
display_alert "Done building" "$package_name $release $arch" "ext"
ls *.deb 2>/dev/null
mv *.deb /root 2>/dev/null
exit 0
else
display_alert "Failed building" "$package_name $release $arch" "err"
exit 2
fi
exit 0
EOF
chmod +x $target_dir/root/build.sh
@ -225,12 +227,19 @@ chroot_build_packages()
eval systemd-nspawn -a -q -D $target_dir --tmpfs=/root/build --tmpfs=/tmp --bind-ro $SRC/lib/extras-buildpkgs/:/root/overlay \
--bind-ro $SRC/sources/extra/:/root/sources /bin/bash -c "/root/build.sh" 2>&1 \
${PROGRESS_LOG_TO_FILE:+' | tee -a $DEST/debug/buildpkg.log'}
[[ ${PIPESTATUS[0]} -eq 2 ]] && failed+=("$package_name:$release:$arch")
mv $target_dir/root/*.deb $plugin_target_dir 2>/dev/null
done
# cleanup for distcc
kill $(</var/run/distcc/${release}-${arch}.pid)
done
done
if [[ ${#failed[@]} -gt 0 ]]; then
display_alert "Following packages failed to build:" "" "wrn"
for p in ${failed[@]}; do
display_alert "$p"
done
fi
} #############################################################################
# chroot_installpackages_local

147
config/mpv_sunxi.conf Normal file
View File

@ -0,0 +1,147 @@
#
# MPV configuration file for Armbian
#
# Warning:
#
# The commented example options usually do _not_ set the default values. Call
# mpv with --list-options to see the default values for most options. There is
# no builtin or example mpv.conf with all the defaults.
#
#
# Configuration files are read system-wide from /etc/mpv/mpv.conf
# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override
# system-wide settings, all of which are overridden by the command line.
#
# Configuration file settings and the command line options use the same
# underlying mechanisms. Most options can be put into the configuration file
# by dropping the preceding '--'. See the man page for a complete list of
# options.
#
# Lines starting with '#' are comments and are ignored.
#
# See the CONFIGURATION FILES section in the man page
# for a detailed description of the syntax.
#
# Profiles should be placed at the bottom of the configuration file to ensure
# that settings wanted as defaults are not restricted to specific profiles.
##################
# video settings #
##################
# Start in fullscreen mode by default.
#fs=yes
# force starting with centered window
#geometry=50%:50%
# don't allow a new window to have a size larger than 90% of the screen size
#autofit-larger=90%x90%
# Do not close the window on exit.
#keep-open=yes
# Do not wait with showing the video window until it has loaded. (This will
# resize the window once video is loaded. Also always shows a window with
# audio.)
#force-window=immediate
# Disable the On Screen Controller (OSC).
#osc=no
# Keep the player window on top of all other windows.
#ontop=yes
# Specify default video driver (see --vo=help for a list).
# This one selects high quality video scaling etc. - can cause problems with
# some drivers and GPUs.
vo=vdpau
# Force video to lock on the display's refresh rate, and change video and audio
# speed to some degree to ensure synchronous playback - can cause problems
# with some drivers and desktop environments.
#video-sync=display-resample
# Enable hardware decoding if available. Often, this does not work with all
# video outputs, but should work well with default settings on most systems.
# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
# may or may not help.
hwdec=vdpau
hwdec-codecs=all
# set default saturation to 100
saturation=100
##################
# audio settings #
##################
# Specify default audio driver (see --ao=help for a list).
#ao=alsa
# Disable softvol usage, and always use the system mixer if available.
#softvol=no
# Do not filter audio to keep pitch when changing playback speed.
#audio-pitch-correction=no
# Output 5.1 audio natively, and upmix/downmix audio with a different format.
#audio-channels=5.1
# Disable any automatic remix, _if_ the audio output accepts the audio format.
# of the currently played file. See caveats mentioned in the manpage.
# (This is the default.)
#audio-channels=auto
##################
# other settings #
##################
# Pretend to be a web browser. Might fix playback with some streaming sites,
# but also will break with shoutcast streams.
#user-agent="Mozilla/5.0"
# cache settings
#
# Use 150MB input cache by default. The cache is enabled for network streams only.
#cache-default=153600
#
# Use 150MB input cache for everything, even local files.
#cache=153600
#
# Disable the behavior that the player will pause if the cache goes below a
# certain fill size.
#cache-pause=no
#
# Read ahead about 5 seconds of audio and video packets.
#demuxer-readahead-secs=5.0
#
# Raise readahead from demuxer-readahead-secs to this value if a cache is active.
#cache-secs=50.0
# Display English subtitles if available.
#slang=en
# Play Finnish audio if available, fall back to English otherwise.
#alang=fi,en
# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
# If the file seems to be valid UTF-8, prefer UTF-8.
#sub-codepage=utf8:cp1256
# You can also include other configuration files.
#include=/path/to/the/file/you/want/to/include
############
# Profiles #
############
# The options declared as part of profiles override global default settings,
# but only take effect when the profile is active.
# The following profile can be enabled on the command line with: --profile=invert
#[invert]
# The profile forces this video filter:
#vf-add=flip

View File

@ -4,6 +4,7 @@ local package_name="libvdpau"
local package_repo="https://anongit.freedesktop.org/git/vdpau/libvdpau.git"
local package_ref="branch:master"
local package_builddeps="graphviz ghostscript doxygen-latex x11proto-dri2-dev pkg-config libxext-dev libx11-dev dh-autoreconf"
local package_upstream_version="1.1.1-10"
local package_install_chroot="libvdpau1 libvdpau-dev"
local package_install_target="libvdpau1"
local package_component="${release}-desktop"

View File

@ -3,8 +3,8 @@
# depends on libvdpau
local package_name="FFmpeg"
local package_repo="https://github.com/FFmpeg/FFmpeg.git"
local package_ref="tag:n3.1.3"
local package_upstream_version="7:3.1.3"
local package_ref="tag:n3.1.4"
local package_upstream_version="7:3.1.4"
local package_builddeps="dpkg-dev flite1-dev frei0r-plugins-dev ladspa-sdk libass-dev libavc1394-dev libbluray-dev libbs2b-dev libbz2-dev libcaca-dev libcdio-paranoia-dev libdc1394-22-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgme-dev libgnutls28-dev libgsm1-dev libiec61883-dev liblzma-dev libmodplug-dev libmp3lame-dev libopencv-dev libopenjpeg-dev libopus-dev libpulse-dev librtmp-dev libschroedinger-dev libsctp-dev libsdl1.2-dev libshine-dev libsnappy-dev libsoxr-dev libspeex-dev libssh-gcrypt-dev libtheora-dev libtwolame-dev libva-dev libvdpau-dev libvorbis-dev libvpx-dev libwavpack-dev libwebp-dev libx264-dev libx265-dev libxext-dev libxvidcore-dev libxvmc-dev libzmq3-dev libzvbi-dev pkg-config yasm"
local package_install_chroot="libavutil-ffmpeg54 libavutil-dev libpostproc-ffmpeg53 libswresample-ffmpeg1 libswscale-ffmpeg3 libswscale-dev libavresample-ffmpeg2 libavresample-dev libavcodec-ffmpeg56 libswresample-dev libavcodec-dev libpostproc-dev libavformat-ffmpeg56 libavformat-dev libavfilter-ffmpeg5 libavfilter-dev libavdevice-ffmpeg56 libavdevice-dev"
local package_install_target="libavutil-ffmpeg54 libpostproc-ffmpeg53 libswresample-ffmpeg1 libswscale-ffmpeg3 libavresample-ffmpeg2 libavcodec-ffmpeg56 libavformat-ffmpeg56 libavfilter-ffmpeg5 libavdevice-ffmpeg56 ffmpeg"

View File

@ -4,7 +4,7 @@ local package_name="guvcview"
local package_repo="https://github.com/avafinger/guvcview.git"
local package_ref="branch:master"
local package_upstream_version="2.0.2.1"
local package_builddeps="intltool dh-autoreconf autotools-dev libsdl1.2-dev libgtk-3-dev portaudio19-dev libpng12-dev libudev-dev libusb-1.0-0-dev libpulse-dev libgsl0-dev libv4l-dev libv4l2rds0 libsdl2-dev"
local package_builddeps="intltool dh-autoreconf autotools-dev libavcodec-dev libavutil-dev libsdl1.2-dev libgtk-3-dev portaudio19-dev libpng12-dev libudev-dev libusb-1.0-0-dev libpulse-dev libgsl0-dev libv4l-dev libv4l2rds0 libsdl2-dev"
local package_install_target="libguvcview-1.1-1 guvcview"
local package_component="${release}-desktop"

View File

@ -13,5 +13,5 @@ package_checkbuild()
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes && $BOARD != orangepiplus2e && $BOARD != orangepiplus ]]
[[ $LINUXFAMILY =~ sun[4578]i && $BRANCH == default && $BUILD_DESKTOP == yes && $BOARD != orangepiplus2e && $BOARD != orangepiplus ]]
}

View File

@ -14,5 +14,5 @@ package_checkbuild()
package_checkinstall()
{
[[ $LINUXFAMILY == sun*i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
[[ $LINUXFAMILY =~ sun[4578]i && $BRANCH == default && $BUILD_DESKTOP == yes ]]
}

View File

@ -6,7 +6,7 @@ local package_name="mpv"
local package_repo="https://github.com/mpv-player/mpv.git"
local package_ref="tag:v0.20.0"
local package_upstream_version="0.20.0"
local package_builddeps="libasound2-dev libass-dev libbluray-dev libcdio-paranoia-dev libdvdnav-dev libdvdread-dev libenca-dev libegl1-mesa-dev libgl1-mesa-dev libguess-dev libjpeg-dev liblcms2-dev liblua5.2-dev libpulse-dev librubberband-dev libsdl2-dev libsndio-dev libva-dev libvdpau-dev libx11-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev pkg-config python python-docutils"
local package_builddeps="libasound2-dev libass-dev libbluray-dev libcdio-paranoia-dev libdvdnav-dev libdvdread-dev libenca-dev libegl1-mesa-dev libgl1-mesa-dev libguess-dev libjpeg-dev liblcms2-dev liblua5.2-dev libpulse-dev librubberband-dev libsdl2-dev libsndio-dev libva-dev libvdpau-dev libx11-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxss-dev libxv-dev pkg-config python python-docutils"
local package_install_target="libmpv1 mpv"
local package_component="${release}-desktop"

View File

@ -11,7 +11,7 @@ case "$1" in
echo "Mali binary driver can be used only with legacy kernel" 1>&2
exit 1
fi
if [ -z "$LINUXFAMILY" ] || ! ( [ "$LINUXFAMILY" = "sun4i" ] || [ "$LINUXFAMILY" = "sun7i" ] || [ "$LINUXFAMILY" = "sun8i" ] ); then
if [ -z "$LINUXFAMILY" ] || ! ( [ "$LINUXFAMILY" = "sun4i" ] || [ "$LINUXFAMILY" = "sun5i" ] || [ "$LINUXFAMILY" = "sun7i" ] || [ "$LINUXFAMILY" = "sun8i" ] ); then
echo "Mali binary driver can be used only on sunxi hardware" 1>&2
exit 1
fi

View File

@ -77,7 +77,7 @@ index 0000000..49705cc
+
+#endif
diff --git a/sunxi_disp.c b/sunxi_disp.c
index 89a029b..3c93401 100644
index 89a029b..6cd934f 100644
--- a/sunxi_disp.c
+++ b/sunxi_disp.c
@@ -21,6 +21,7 @@
@ -88,7 +88,7 @@ index 89a029b..3c93401 100644
#include <sys/ioctl.h>
#include "kernel-headers/sunxi_disp_ioctl.h"
#include "vdpau_private.h"
@@ -202,24 +203,37 @@ static int sunxi_disp_set_video_layer(struct sunxi_disp *sunxi_disp, int x, int
@@ -202,24 +203,38 @@ static int sunxi_disp_set_video_layer(struct sunxi_disp *sunxi_disp, int x, int
ioctl(disp->fd, DISP_CMD_LAYER_OPEN, args);
@ -99,40 +99,47 @@ index 89a029b..3c93401 100644
- // set doing this unconditionally is costly.
if (surface->csc_change)
{
- ioctl(disp->fd, DISP_CMD_LAYER_ENHANCE_OFF, args);
- args[2] = 0xff * surface->brightness + 0x20;
- ioctl(disp->fd, DISP_CMD_LAYER_SET_BRIGHT, args);
- args[2] = 0x20 * surface->contrast;
- ioctl(disp->fd, DISP_CMD_LAYER_SET_CONTRAST, args);
- args[2] = 0x20 * surface->saturation;
- ioctl(disp->fd, DISP_CMD_LAYER_SET_SATURATION, args);
- // hue scale is randomly chosen, no idea how it maps exactly
- args[2] = (32 / 3.14) * surface->hue + 0x20;
- ioctl(disp->fd, DISP_CMD_LAYER_SET_HUE, args);
- ioctl(disp->fd, DISP_CMD_LAYER_ENHANCE_ON, args);
+ uint32_t b, c, s, h;
+
ioctl(disp->fd, DISP_CMD_LAYER_ENHANCE_OFF, args);
- args[2] = 0xff * surface->brightness + 0x20;
+ /* ioctl(disp->fd, DISP_CMD_LAYER_ENHANCE_OFF, args); */
+
+ /* scale VDPAU: -1.0 ~ 1.0 to SUNXI: 0 ~ 100 */
+ b = args[2] = ((surface->brightness + 1.0) * 50.0) + 0.5;
ioctl(disp->fd, DISP_CMD_LAYER_SET_BRIGHT, args);
- args[2] = 0x20 * surface->contrast;
+ /* ioctl(disp->fd, DISP_CMD_LAYER_SET_BRIGHT, args); */
+
+ /* scale VDPAU: 0.0 ~ 10.0 to SUNXI: 0 ~ 100 */
+ if (surface->contrast <= 1.0)
+ c = args[2] = (surface->contrast * 50.0) + 0.5;
+ else
+ c = args[2] = (50.0 + (surface->contrast - 1.0) * 50.0 / 9.0) + 0.5;
ioctl(disp->fd, DISP_CMD_LAYER_SET_CONTRAST, args);
- args[2] = 0x20 * surface->saturation;
+ /* ioctl(disp->fd, DISP_CMD_LAYER_SET_CONTRAST, args); */
+
+ /* scale VDPAU: 0.0 ~ 10.0 to SUNXI: 0 ~ 100 */
+ if (surface->saturation <= 1.0)
+ s = args[2] = (surface->saturation * 50.0) + 0.5;
+ else
+ s = args[2] = (50.0 + (surface->saturation - 1.0) * 50.0 / 9.0) + 0.5;
ioctl(disp->fd, DISP_CMD_LAYER_SET_SATURATION, args);
- // hue scale is randomly chosen, no idea how it maps exactly
- args[2] = (32 / 3.14) * surface->hue + 0x20;
+ /* ioctl(disp->fd, DISP_CMD_LAYER_SET_SATURATION, args); */
+
+ /* scale VDPAU: -PI ~ PI to SUNXI: 0 ~ 100 */
+ h = args[2] = (((surface->hue / M_PI) + 1.0) * 50.0) + 0.5;
ioctl(disp->fd, DISP_CMD_LAYER_SET_HUE, args);
+ /* ioctl(disp->fd, DISP_CMD_LAYER_SET_HUE, args); */
+
ioctl(disp->fd, DISP_CMD_LAYER_ENHANCE_ON, args);
+ /* ioctl(disp->fd, DISP_CMD_LAYER_ENHANCE_ON, args); */
+ VDPAU_DBG("Presentation queue csc change");
+ VDPAU_DBG("display driver -> bright: %d, contrast: %d, saturation: %d, hue: %d", b, c, s, h);
+ VDPAU_DBG("Not changing display settings to workaround csc brightness bug");
surface->csc_change = 0;
}

View File

@ -227,8 +227,8 @@ create_board_package()
install -m 755 $SRC/lib/scripts/h3consumption $destination/usr/bin
fi
if [[ $LINUXCONFIG == *sun* ]]; then
if [[ $BRANCH != next ]]; then
if [[ $LINUXFAMILY == sun*i ]]; then
if [[ $BRANCH == default ]]; then
# add soc temperature app
local codename=$(lsb_release -sc)
if [[ -z $codename || "sid" == *"$codename"* ]]; then
@ -244,6 +244,11 @@ create_board_package()
fex2bin $SRC/lib/config/fex/${i%*.fex}.fex $destination/boot/bin/${i%*.fex}.bin
done
# add mpv config
cp $SRC/lib/mpv_sunxi.conf $destination/usr/share/armbian/mpv_sunxi.conf
echo "export VDPAU_OSD=1" > $destination/etc/profile.d/90-vdpau.sh
chmod 755 $destination/etc/profile.d/90-vdpau.sh
# bluetooth device enabler - for cubietruck
# TODO: move to tools or sunxi-common.inc
#install $SRC/lib/scripts/brcm40183 $destination/etc/default