Compare commits
207 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d144e7721 | ||
|
|
dfcf29fcec | ||
|
|
2e1fc1aba7 | ||
|
|
8ad20d22a6 | ||
|
|
63760a12d1 | ||
|
|
a284c9d5bc | ||
|
|
b99bae91ea | ||
|
|
daabb1301b | ||
|
|
e808b3d8ad | ||
|
|
92aee3070b | ||
|
|
cddbc32720 | ||
|
|
c789a4ad1b | ||
|
|
5299cf1d93 | ||
|
|
8475f31d2a | ||
|
|
4a620a129a | ||
|
|
241dad6a1a | ||
|
|
46db9a3565 | ||
|
|
2af4df4f0a | ||
|
|
21e699ffd5 | ||
|
|
88971a551a | ||
|
|
a099563512 | ||
|
|
bc3a6e7c6b | ||
|
|
ebf3066572 | ||
|
|
12d33baa24 | ||
|
|
0d59f48407 | ||
|
|
dafd9bdb7b | ||
|
|
b27b2a95cc | ||
|
|
b3ce664f7e | ||
|
|
285d68b3b7 | ||
|
|
e2b4df7333 | ||
|
|
afdf552ba4 | ||
|
|
e385d80c5a | ||
|
|
215b7df748 | ||
|
|
a917a9a1c4 | ||
|
|
996ad540e4 | ||
|
|
429deca122 | ||
|
|
5135f3911d | ||
|
|
e994a82ae5 | ||
|
|
dc2934a984 | ||
|
|
d5bfe006c2 | ||
|
|
67a6991fcf | ||
|
|
18bd6b5478 | ||
|
|
514ae5bba9 | ||
|
|
0b8d0773b0 | ||
|
|
fb5fb91a3e | ||
|
|
c4f8e1b4f0 | ||
|
|
c40f234923 | ||
|
|
37f98b5239 | ||
|
|
763d8e0821 | ||
|
|
319bb26d4e | ||
|
|
39f48f3975 | ||
|
|
b261cb3eff | ||
|
|
8f0afd1530 | ||
|
|
bc86ad98db | ||
|
|
351652bba3 | ||
|
|
0783480fa9 | ||
|
|
c10ee861b8 | ||
|
|
01c51fec6a | ||
|
|
f5c7c8dc5e | ||
|
|
c302deacac | ||
|
|
6d87e3d781 | ||
|
|
04a81af6b4 | ||
|
|
8f8f03dbfa | ||
|
|
191e78e58e | ||
|
|
29af04fc3a | ||
|
|
de111dd5b2 | ||
|
|
c1dcaf7699 | ||
|
|
910b29e202 | ||
|
|
53fdef88c6 | ||
|
|
8ec2004c28 | ||
|
|
818c27d1da | ||
|
|
b651fd6c9b | ||
|
|
72fa600fb2 | ||
|
|
333cef4bfc | ||
|
|
7c3931c054 | ||
|
|
ebc0f91e06 | ||
|
|
30ddac55cd | ||
|
|
22e783687e | ||
|
|
02bb3bb0fc | ||
|
|
a2d75ff269 | ||
|
|
cf9417b501 | ||
|
|
2238b8d42e | ||
|
|
fbb99e9f2f | ||
|
|
d3be1316d2 | ||
|
|
8e53c0735a | ||
|
|
e4368fa60d | ||
|
|
74c883c7c1 | ||
|
|
b89b6f413a | ||
|
|
c87210552e | ||
|
|
8bfc82403f | ||
|
|
ad91bf9dec | ||
|
|
d1f3893465 | ||
|
|
f3413e4e75 | ||
|
|
37326be294 | ||
|
|
04af077a14 | ||
|
|
d5196096a0 | ||
|
|
6ecb5bc094 | ||
|
|
b060789373 | ||
|
|
55860debf3 | ||
|
|
f48bb2d072 | ||
|
|
7b43d13259 | ||
|
|
8b8a3fd30e | ||
|
|
19a1827729 | ||
|
|
1fbb16303b | ||
|
|
35ea6394f6 | ||
|
|
e536132072 | ||
|
|
733bd0eba9 | ||
|
|
6f0d290ab7 | ||
|
|
1ada221e6b | ||
|
|
d33c8126f7 | ||
|
|
45e0ac0327 | ||
|
|
90f3996106 | ||
|
|
1f866ebf00 | ||
|
|
027388f169 | ||
|
|
9bab3b1ef3 | ||
|
|
4c013a65cd | ||
|
|
3dc7f409a4 | ||
|
|
4c15c2d666 | ||
|
|
ba3f6d3aa7 | ||
|
|
42c75b0ed1 | ||
|
|
458bc9849f | ||
|
|
615517d508 | ||
|
|
e52ddc8c88 | ||
|
|
ae9ce1ca8d | ||
|
|
43fb0bb809 | ||
|
|
7eb64adeb5 | ||
|
|
ad3eda88cd | ||
|
|
69ce2cfeb6 | ||
|
|
b8bda970bc | ||
|
|
1704e10abc | ||
|
|
7ece64bea5 | ||
|
|
979b9baea1 | ||
|
|
909c7f2229 | ||
|
|
ebc48f2e52 | ||
|
|
fc983cb39b | ||
|
|
06931afbb4 | ||
|
|
b6f3f9c86a | ||
|
|
a0f5043758 | ||
|
|
04dfa5e7cc | ||
|
|
510401aa2a | ||
|
|
df763ec8cb | ||
|
|
894c10be26 | ||
|
|
23c70d1fca | ||
|
|
a45062b7d5 | ||
|
|
9110823729 | ||
|
|
0a4c147e91 | ||
|
|
28f83fa778 | ||
|
|
ce6bd84cd4 | ||
|
|
ecb139f9d2 | ||
|
|
da2bc78a05 | ||
|
|
6bb3d9556c | ||
|
|
31b93d8c56 | ||
|
|
94eea993f7 | ||
|
|
3d52ca3984 | ||
|
|
dd64e9d1da | ||
|
|
f37a6c50bd | ||
|
|
ee2785b63e | ||
|
|
92d8e0694e | ||
|
|
1ae430dbc7 | ||
|
|
aa7113a528 | ||
|
|
0ef9c41ff2 | ||
|
|
24aa0e7ad6 | ||
|
|
d1f501c72c | ||
|
|
ad0616d6e5 | ||
|
|
0e055a8d07 | ||
|
|
230a24f9f1 | ||
|
|
87573c86e1 | ||
|
|
ee7da2fcf6 | ||
|
|
c166bcea32 | ||
|
|
d252e341ed | ||
|
|
946459fa3f | ||
|
|
935db302e1 | ||
|
|
97c0cbed2c | ||
|
|
3a0c93131a | ||
|
|
7d1dfe6ac4 | ||
|
|
4e10d50bfe | ||
|
|
33e4f03a40 | ||
|
|
f8b307e193 | ||
|
|
06e32afa05 | ||
|
|
c30b314d63 | ||
|
|
2de087dab9 | ||
|
|
72609f4e8d | ||
|
|
c7e8f08b3c | ||
|
|
2d0e20b640 | ||
|
|
0808909d70 | ||
|
|
c1a0ab07cf | ||
|
|
c8e365c3fc | ||
|
|
d65c28092a | ||
|
|
518fa8b5c6 | ||
|
|
9119d3ae5b | ||
|
|
f13a0d1eef | ||
|
|
2bbdb116e3 | ||
|
|
a3a8d635ea | ||
|
|
b29f489f3a | ||
|
|
7056641696 | ||
|
|
e8fe8b4360 | ||
|
|
e0517f8be8 | ||
|
|
bca8001b26 | ||
|
|
b9a5386627 | ||
|
|
910d5e270c | ||
|
|
db5fae31e0 | ||
|
|
94a786c551 | ||
|
|
930813e7e5 | ||
|
|
d49ec62db6 | ||
|
|
3dda333228 | ||
|
|
a947397bf1 | ||
|
|
c9869e1074 |
35
config/addon/xbmc.broken.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="@PKG_ADDON_ID@"
|
||||
name="@ADDON_NAME@"
|
||||
version="@ADDON_VERSION@"
|
||||
provider-name="@PROVIDER_NAME@">
|
||||
<requires>
|
||||
<import addon="os.libreelec.tv" version="@OS_VERSION@"/>
|
||||
<import addon="xbmc.python" version="2.1.0"/>
|
||||
@REQUIRES@
|
||||
</requires>
|
||||
<extension point="xbmc.service" library="default.py">
|
||||
<provides>@PKG_ADDON_PROVIDES@</provides>
|
||||
</extension>
|
||||
<extension point="xbmc.addon.metadata">
|
||||
<summary>@PKG_SHORTDESC@</summary>
|
||||
<description>
|
||||
@PKG_LONGDESC@
|
||||
</description>
|
||||
<disclaimer>
|
||||
@PKG_DISCLAIMER@
|
||||
</disclaimer>
|
||||
<broken>
|
||||
@PKG_ADDON_BROKEN@
|
||||
</broken>
|
||||
<platform>all</platform>
|
||||
<news>
|
||||
@PKG_ADDON_NEWS@
|
||||
</news>
|
||||
<assets>
|
||||
<icon>resources/icon.png</icon>
|
||||
<fanart>resources/fanart.png</fanart>
|
||||
@PKG_ADDON_SCREENSHOT@
|
||||
</assets>
|
||||
</extension>
|
||||
</addon>
|
||||
10
config/path
@@ -69,11 +69,19 @@ SED="sed -i"
|
||||
PKG_DEPENDS_BOOTSTRAP=""
|
||||
PKG_SECTION=""
|
||||
PKG_SHORTDESC="$1 (autogenerated)"
|
||||
PKG_LONGDESC=""
|
||||
PKG_LONGDESC="$1 (autogenerated)"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_PATCH_DIRS=""
|
||||
PKG_NEED_UNPACK=""
|
||||
PKG_SHA256=""
|
||||
PKG_ADDON_BROKEN=""
|
||||
PKG_ADDON_NAME=""
|
||||
PKG_ADDON_PROVIDES=""
|
||||
PKG_ADDON_REQUIRES=""
|
||||
PKG_ADDON_SCREENSHOT=""
|
||||
PKG_ADDON_TYPE=""
|
||||
PKG_DISCLAIMER=""
|
||||
PKG_MAINTAINER=""
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
_PKG_ROOT_NAME=${1%:*}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# VERSION: set full version, use "devel" for development version
|
||||
LIBREELEC_VERSION="8.1.0"
|
||||
LIBREELEC_VERSION="8.2.0.1"
|
||||
|
||||
# OS_VERSION: OS Version
|
||||
OS_VERSION="8.2"
|
||||
|
||||
@@ -29,3 +29,7 @@ PKG_SECTION="tools"
|
||||
PKG_SHORTDESC="Digitial Video Broadcasting (DVB) applications"
|
||||
PKG_LONGDESC="Applications and utilities geared towards the initial setup, testing and operation of an DVB device supporting the DVB-S, DVB-C, DVB-T, and ATSC standards."
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
pre_make_target() {
|
||||
export PERL_USE_UNSAFE_INC=1
|
||||
}
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="ffmpegx"
|
||||
PKG_VERSION="libreelec"
|
||||
PKG_REV="9"
|
||||
PKG_LICENSE="LGPLv2.1+"
|
||||
PKG_SITE="https://ffmpeg.org"
|
||||
PKG_DEPENDS_TARGET="toolchain ffmpeg lame x264"
|
||||
PKG_LONGDESC="FFmpeg built static with additional features"
|
||||
|
||||
pre_configure_target() {
|
||||
cd "$PKG_BUILD"
|
||||
rm -rf ".$TARGET_NAME"
|
||||
cp -PR $(get_build_dir ffmpeg)/* .
|
||||
make clean
|
||||
|
||||
# ffmpeg builds better with these options
|
||||
strip_gold
|
||||
strip_lto
|
||||
|
||||
if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
|
||||
CFLAGS="-DRPI=1 -I$SYSROOT_PREFIX/usr/include/IL -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux $CFLAGS"
|
||||
FFMPEG_LIBS="-lbcm_host -ldl -lmmal -lmmal_core -lmmal_util -lvchiq_arm -lvcos -lvcsm"
|
||||
FFMPEG_RPI_HADE="--enable-mmal --enable-omx-rpi"
|
||||
fi
|
||||
|
||||
# ffmpeg does not build with libx264 on aarch64
|
||||
if [ "$TARGET_ARCH" != "aarch64" ]; then
|
||||
FFMPEG_X264="--enable-libx264"
|
||||
fi
|
||||
|
||||
if [ "$TARGET_ARCH" == "arm" ]; then
|
||||
FFMPEG_ARM_AO="--enable-hardcoded-tables"
|
||||
fi
|
||||
}
|
||||
|
||||
configure_target() {
|
||||
./configure \
|
||||
\
|
||||
`#Licensing options` \
|
||||
--enable-gpl \
|
||||
--enable-nonfree \
|
||||
\
|
||||
`#Documentation options` \
|
||||
--disable-doc \
|
||||
\
|
||||
`#Hardware accelerated decoding encoding` \
|
||||
$FFMPEG_RPI_HADE \
|
||||
\
|
||||
`#External library support` \
|
||||
--enable-libmp3lame \
|
||||
$FFMPEG_X264 \
|
||||
--enable-openssl \
|
||||
\
|
||||
`#Toolchain options` \
|
||||
--arch="$TARGET_ARCH" \
|
||||
--cpu="$TARGET_CPU" \
|
||||
--cross-prefix="$TARGET_PREFIX" \
|
||||
--enable-cross-compile \
|
||||
--sysroot="$SYSROOT_PREFIX" \
|
||||
--sysinclude="$SYSROOT_PREFIX/usr/include" \
|
||||
--target-os="linux" \
|
||||
--nm="$NM" \
|
||||
--ar="$AR" \
|
||||
--as="$CC" \
|
||||
--cc="$CC" \
|
||||
--ld="$CC" \
|
||||
--pkg-config="$TOOLCHAIN/bin/pkg-config" \
|
||||
--host-cc="$HOST_CC" \
|
||||
--host-cflags="$HOST_CFLAGS" \
|
||||
--host-ldflags="$HOST_LDFLAGS" \
|
||||
--host-libs="-lm" \
|
||||
--extra-cflags="$CFLAGS" \
|
||||
--extra-ldflags="$LDFLAGS" \
|
||||
--extra-libs="$FFMPEG_LIBS" \
|
||||
--extra-version="x" \
|
||||
--enable-pic \
|
||||
\
|
||||
`#Advanced options` \
|
||||
$FFMPEG_ARM_AO \
|
||||
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
make install DESTDIR=$INSTALL
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
for ff in $INSTALL/usr/local/bin/*; do mv $ff ${ff}x; done
|
||||
rm -fr $INSTALL/usr/local/include
|
||||
rm -fr $INSTALL/usr/local/share/ffmpeg/examples
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="imagemagick"
|
||||
PKG_VERSION="7.0.5-7"
|
||||
PKG_VERSION="7.0.7-1"
|
||||
PKG_LICENSE="http://www.imagemagick.org/script/license.php"
|
||||
PKG_SITE="http://www.imagemagick.org/"
|
||||
PKG_URL="https://github.com/ImageMagick/ImageMagick/archive/$PKG_VERSION.tar.gz"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,19 +17,17 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="enet"
|
||||
PKG_VERSION="1.3.13"
|
||||
PKG_VERSION="e33ca1d"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE=""
|
||||
PKG_SITE=""
|
||||
PKG_URL="http://enet.bespin.org/download/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_SITE="https://github.com/cgutman/enet/"
|
||||
PKG_URL="https://github.com/cgutman/enet/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="network"
|
||||
PKG_SHORTDESC="ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol)"
|
||||
PKG_LONGDESC="ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol)"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_USE_CMAKE="no"
|
||||
PKG_AUTORECONF="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-2017 Team LibreELEC
|
||||
# Copyright (C) 2017-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -16,13 +16,14 @@
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libite"
|
||||
PKG_VERSION="1.8.3"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/troglobit/libite"
|
||||
PKG_URL="https://github.com/troglobit/libite/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_NAME="fdk-aac"
|
||||
PKG_VERSION="0.1.5"
|
||||
PKG_SHA256="ff53d1d01cacc29c071e23192dfefa93bdbeaf775fc5d296259b4859d0306b79"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="other"
|
||||
PKG_SITE="https://sourceforge.net/projects/opencore-amr/"
|
||||
PKG_URL="https://github.com/mstorsjo/fdk-aac/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="That missing frog DNA you've been looking for"
|
||||
PKG_SECTION="multimedia"
|
||||
PKG_LONGDESC="A standalone library of the Fraunhofer FDK AAC code from Android."
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-static --disable-shared"
|
||||
@@ -0,0 +1,61 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libvpx"
|
||||
PKG_VERSION="1.6.1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSD"
|
||||
PKG_SITE="https://www.webmproject.org"
|
||||
PKG_URL="https://github.com/webmproject/libvpx/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain yasm:host"
|
||||
PKG_SECTION="multimedia"
|
||||
PKG_SHORTDESC="WebM VP8/VP9 Codec SDK"
|
||||
PKG_LONGDESC="The WebM Project is dedicated to developing a high-quality, open video format for the web that's freely available to everyone."
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
configure_target() {
|
||||
|
||||
case $ARCH in
|
||||
aarch64)
|
||||
TARGET_NAME_LIBVPX="arm64-linux-gcc"
|
||||
;;
|
||||
arm)
|
||||
TARGET_NAME_LIBVPX="armv7-linux-gcc"
|
||||
;;
|
||||
x86_64)
|
||||
TARGET_NAME_LIBVPX="x86_64-linux-gcc"
|
||||
;;
|
||||
esac
|
||||
|
||||
$PKG_CONFIGURE_SCRIPT --prefix=/usr \
|
||||
--extra-cflags="$CFLAGS" \
|
||||
--as=yasm \
|
||||
--target=$TARGET_NAME_LIBVPX \
|
||||
--disable-docs \
|
||||
--disable-examples \
|
||||
--disable-shared \
|
||||
--disable-tools \
|
||||
--disable-unit-tests \
|
||||
--disable-vp8-decoder \
|
||||
--disable-vp9-decoder \
|
||||
--enable-ccache \
|
||||
--enable-pic \
|
||||
--enable-static \
|
||||
--enable-vp8 \
|
||||
--enable-vp9
|
||||
}
|
||||
@@ -17,12 +17,14 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="x264"
|
||||
PKG_VERSION="snapshot-20170524-2245-stable"
|
||||
PKG_VERSION="snapshot-20171015-2245"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.videolan.org/developers/x264.html"
|
||||
PKG_URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_URL="https://download.videolan.org/x264/snapshots/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="multimedia"
|
||||
PKG_LONGDESC="x264"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
pre_configure_target() {
|
||||
cd $PKG_BUILD
|
||||
@@ -0,0 +1,33 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2017-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="x265"
|
||||
PKG_VERSION="2.5"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/videolan/x265"
|
||||
PKG_URL="https://github.com/videolan/x265/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="multimedia"
|
||||
PKG_LONGDESC="x265 is a H.265/HEVC video encoder application library"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
pre_configure_target() {
|
||||
LDFLAGS="$LDFLAGS -ldl"
|
||||
cmake -G "Unix Makefiles" ./source
|
||||
}
|
||||
190
packages/addons/addon-depends/ffmpegx/package.mk
Normal file
@@ -0,0 +1,190 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="ffmpegx"
|
||||
PKG_VERSION="3.4"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="LGPLv2.1+"
|
||||
PKG_SITE="https://ffmpeg.org"
|
||||
PKG_URL="https://github.com/FFmpeg/FFmpeg/archive/n${PKG_VERSION}.tar.gz"
|
||||
PKG_SOURCE_DIR="FFmpeg-n${PKG_VERSION}"
|
||||
PKG_DEPENDS_TARGET="toolchain bzip2 fdk-aac libvorbis openssl opus x264 x265 zlib"
|
||||
PKG_SECTION="multimedia"
|
||||
PKG_LONGDESC="FFmpegx is an complete FFmpeg build to support encoding and decoding"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
# Dependencies
|
||||
get_graphicdrivers
|
||||
|
||||
if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bcm2835-driver"
|
||||
fi
|
||||
|
||||
# ARMv6 is no longer supported by libvpx
|
||||
if [ "$PROJECT" != "RPi" -a "$PROJECT" != "Slice" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvpx"
|
||||
fi
|
||||
|
||||
pre_configure_target() {
|
||||
cd $PKG_BUILD
|
||||
rm -rf .$TARGET_NAME
|
||||
|
||||
# ffmpeg builds better with these options
|
||||
strip_gold
|
||||
strip_lto
|
||||
|
||||
if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
|
||||
CFLAGS="-DRPI=1 -I$SYSROOT_PREFIX/usr/include/IL -I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux $CFLAGS"
|
||||
PKG_FFMPEG_LIBS="-lbcm_host -ldl -lmmal -lmmal_core -lmmal_util -lvchiq_arm -lvcos -lvcsm"
|
||||
fi
|
||||
|
||||
if [ "$TARGET_ARCH" == "arm" ]; then
|
||||
PKG_FFMPEG_ARM_AO="--enable-hardcoded-tables"
|
||||
fi
|
||||
|
||||
# HW encoders
|
||||
|
||||
# RPi 0-3
|
||||
if [ "$KODIPLAYER_DRIVER" == "bcm2835-driver" ]; then
|
||||
PKG_FFMPEG_HW_ENCODERS_RPi="\
|
||||
`#Video encoders` \
|
||||
--enable-omx-rpi \
|
||||
--enable-mmal \
|
||||
--enable-encoder=h264_omx \
|
||||
\
|
||||
`#Video hwaccel` \
|
||||
--enable-hwaccel=h264_mmal \
|
||||
--enable-hwaccel=mpeg2_mmal \
|
||||
--enable-hwaccel=mpeg4_mmal \
|
||||
--enable-hwaccel=vc1_mmal"
|
||||
fi
|
||||
|
||||
# Generic
|
||||
if [[ "$TARGET_ARCH" = "x86_64" ]]; then
|
||||
PKG_FFMPEG_HW_ENCODERS_GENERIC="\
|
||||
`#Video encoders` \
|
||||
--enable-encoder=h264_nvenc \
|
||||
--enable-encoder=h264_vaapi \
|
||||
--enable-encoder=hevc_nvenc \
|
||||
--enable-encoder=hevc_vaapi \
|
||||
--enable-encoder=mjpeg_vaapi \
|
||||
--enable-encoder=mpeg2_vaapi \
|
||||
--enable-encoder=vp8_vaapi \
|
||||
--enable-encoder=vp9_vaapi \
|
||||
\
|
||||
`#Video hwaccel` \
|
||||
--enable-hwaccel=h263_vaapi \
|
||||
--enable-hwaccel=h264_vaapi \
|
||||
--enable-hwaccel=hevc_vaapi \
|
||||
--enable-hwaccel=mpeg2_vaapi \
|
||||
--enable-hwaccel=mpeg4_vaapi \
|
||||
--enable-hwaccel=vc1_vaapi \
|
||||
--enable-hwaccel=vp9_vaapi \
|
||||
--enable-hwaccel=wmv3_vaapi"
|
||||
fi
|
||||
|
||||
# Encoders
|
||||
PKG_FFMPEG_ENCODERS="\
|
||||
`#Video encoders` \
|
||||
--enable-libvpx \
|
||||
--enable-encoder=libvpx_vp8 \
|
||||
--enable-encoder=libvpx_vp9 \
|
||||
--enable-libx264 \
|
||||
--enable-encoder=x264 \
|
||||
--enable-libx265 \
|
||||
--enable-encoder=x265 \
|
||||
\
|
||||
`#Audio encoders` \
|
||||
--enable-encoder=ac3 \
|
||||
--enable-encoder=eac3 \
|
||||
--enable-libfdk-aac \
|
||||
--enable-encoder=libfdk-aac \
|
||||
--enable-encoder=flac \
|
||||
--enable-libmp3lame \
|
||||
--enable-encoder=libmp3lame \
|
||||
--enable-libopus \
|
||||
--enable-encoder=libopus \
|
||||
--enable-libvorbis \
|
||||
--enable-encoder=libvorbis"
|
||||
|
||||
}
|
||||
|
||||
configure_target() {
|
||||
./configure \
|
||||
\
|
||||
`#Programs to build` \
|
||||
--enable-ffmpeg \
|
||||
--disable-ffplay \
|
||||
--enable-ffprobe \
|
||||
--disable-ffserver \
|
||||
\
|
||||
`#Static and Shared` \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
\
|
||||
`#Licensing options` \
|
||||
--enable-gpl \
|
||||
--enable-nonfree \
|
||||
\
|
||||
`#Documentation options` \
|
||||
--disable-doc \
|
||||
\
|
||||
`#Hardware accelerated decoding encoding` \
|
||||
$PKG_FFMPEG_HW_ENCODERS_RPi \
|
||||
$PKG_FFMPEG_HW_ENCODERS_GENERIC \
|
||||
\
|
||||
`#General options` \
|
||||
--enable-avresample \
|
||||
\
|
||||
`#Toolchain options` \
|
||||
--arch="$TARGET_ARCH" \
|
||||
--cpu="$TARGET_CPU" \
|
||||
--cross-prefix="$TARGET_PREFIX" \
|
||||
--enable-cross-compile \
|
||||
--sysroot="$SYSROOT_PREFIX" \
|
||||
--sysinclude="$SYSROOT_PREFIX/usr/include" \
|
||||
--target-os="linux" \
|
||||
--nm="$NM" \
|
||||
--ar="$AR" \
|
||||
--as="$CC" \
|
||||
--cc="$CC" \
|
||||
--ld="$CC" \
|
||||
--pkg-config="$TOOLCHAIN/bin/pkg-config" \
|
||||
--host-cc="$HOST_CC" \
|
||||
--host-cflags="$HOST_CFLAGS" \
|
||||
--host-ldflags="$HOST_LDFLAGS" \
|
||||
--host-extralibs="-lm" \
|
||||
--extra-cflags="$CFLAGS" \
|
||||
--extra-ldflags="$LDFLAGS" \
|
||||
--extra-libs="$PKG_FFMPEG_LIBS" \
|
||||
--extra-version="x" \
|
||||
--enable-pic \
|
||||
--enable-openssl \
|
||||
\
|
||||
`#Advanced options` \
|
||||
$PKG_FFMPEG_ARM_AO \
|
||||
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
make install DESTDIR="$INSTALL/../.INSTALL_PKG"
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
for ff in "$INSTALL/../.INSTALL_PKG/usr/local/bin/"*; do mv "$ff" "${ff}x"; done
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libconfuse"
|
||||
PKG_VERSION="3.0"
|
||||
PKG_VERSION="3.2"
|
||||
PKG_LICENSE="https://github.com/martinh/libconfuse/blob/master/LICENSE"
|
||||
PKG_SITE="https://github.com/martinh/libconfuse"
|
||||
PKG_URL="https://github.com/martinh/libconfuse/archive/v$PKG_VERSION.tar.gz"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="rust"
|
||||
PKG_VERSION="1.18.0"
|
||||
PKG_VERSION="1.20.0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://www.rust-lang.org"
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libvncserver"
|
||||
PKG_VERSION="0.9.10"
|
||||
PKG_VERSION="0.9.11"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://libvnc.github.io/"
|
||||
PKG_URL="https://github.com/LibVNC/libvncserver/archive/LibVNCServer-$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="libvncserver-LibVNCServer-$PKG_VERSION"
|
||||
PKG_DEPENDS_TARGET="toolchain libjpeg-turbo libpng"
|
||||
PKG_DEPENDS_TARGET="toolchain libjpeg-turbo libpng openssl"
|
||||
PKG_SECTION="libs"
|
||||
PKG_SHORTDESC="LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program."
|
||||
PKG_LONGDESC="LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program."
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,17 +17,15 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="moonlight-common-c"
|
||||
PKG_VERSION="1d058cb"
|
||||
PKG_VERSION="957b1de"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/irtimmer/moonlight-common-c"
|
||||
PKG_URL="https://github.com/irtimmer/moonlight-common-c/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SITE="https://github.com/moonlight-stream/moonlight-common-c"
|
||||
PKG_URL="https://github.com/moonlight-stream/moonlight-common-c/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION=""
|
||||
PKG_SHORTDESC="Shared C code for the implementation of Nvidia's GameStream protocol"
|
||||
PKG_LONGDESC="Shared C code for the implementation of Nvidia's GameStream protocol"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
make_target() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="moonlight-embedded"
|
||||
PKG_VERSION="9301898"
|
||||
PKG_VERSION="82b956a"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/irtimmer/moonlight-embedded"
|
||||
@@ -26,8 +26,6 @@ PKG_DEPENDS_TARGET="toolchain curl libcec pulseaudio ffmpeg systemd alsa-lib moo
|
||||
PKG_SECTION=""
|
||||
PKG_SHORTDESC="Gamestream client for embedded systems"
|
||||
PKG_LONGDESC="Moonlight Embedded is an open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield, but built for Linux"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
FREESCALE_V4L_INCLUDE=""
|
||||
|
||||
@@ -5,8 +5,8 @@ diff -Naur a/CMakeLists.txt b/CMakeLists.txt
|
||||
|
||||
set_property(TARGET moonlight PROPERTY COMPILE_DEFINITIONS ${MOONLIGHT_DEFINITIONS})
|
||||
target_include_directories(moonlight PRIVATE ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR} ${OPUS_INCLUDE_DIRS} ${EVDEV_INCLUDE_DIRS} ${UDEV_INCLUDE_DIRS})
|
||||
-target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${ALSA_LIBRARY} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
+target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${ALSA_LIBRARY} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS} m)
|
||||
-target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS})
|
||||
+target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS} m)
|
||||
|
||||
add_subdirectory(docs)
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ diff -Naur a/CMakeLists.txt b/CMakeLists.txt
|
||||
|
||||
set_property(TARGET moonlight PROPERTY COMPILE_DEFINITIONS ${MOONLIGHT_DEFINITIONS})
|
||||
target_include_directories(moonlight PRIVATE ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR} ${OPUS_INCLUDE_DIRS} ${EVDEV_INCLUDE_DIRS} ${UDEV_INCLUDE_DIRS})
|
||||
-target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${ALSA_LIBRARY} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS} m)
|
||||
+target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${ALSA_LIBRARY} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS} pthread m)
|
||||
-target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS} m)
|
||||
+target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS} pthread m)
|
||||
|
||||
add_subdirectory(docs)
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/libgamestream/CMakeLists.txt
|
||||
+++ b/libgamestream/CMakeLists.txt
|
||||
@@ -27,7 +27,7 @@ set_target_properties(moonlight-common P
|
||||
target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${AVAHI_INCLUDE_DIRS} ${LIBUUID_INCLUDE_DIRS})
|
||||
target_include_directories(moonlight-common PRIVATE ../third_party/moonlight-common-c/reedsolomon ${ENET_INCLUDE_DIRS})
|
||||
target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LIBUUID_LIBRARIES})
|
||||
-target_link_libraries(moonlight-common ${ENET_LIBRARIES})
|
||||
+target_link_libraries(moonlight-common ${ENET_LIBRARIES} ${OPENSSL_LIBRARIES})
|
||||
|
||||
target_link_libraries(gamestream ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,17 +17,15 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="opus"
|
||||
PKG_VERSION="1.1.2"
|
||||
PKG_VERSION="1.2.1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSD"
|
||||
PKG_SITE="http://www.opus-codec.org"
|
||||
PKG_URL="http://downloads.us.xiph.org/releases/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_URL="https://archive.mozilla.org/pub/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="audio"
|
||||
PKG_SHORTDESC="Codec designed for interactive speech and audio transmission over the Internet"
|
||||
PKG_LONGDESC="Codec designed for interactive speech and audio transmission over the Internet"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
if [ "$TARGET_ARCH" = "arm" ]; then
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,17 +17,15 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="rpi_ws281x"
|
||||
PKG_VERSION="3e6ea50"
|
||||
PKG_VERSION="f580777"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE=""
|
||||
PKG_LICENSE="BSD-3c"
|
||||
PKG_SITE="https://github.com/hyperion-project/rpi_ws281x"
|
||||
PKG_URL="https://github.com/hyperion-project/rpi_ws281x/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION=""
|
||||
PKG_SHORTDESC="Userspace Raspberry Pi PWM library for WS281X LEDs"
|
||||
PKG_LONGDESC="Userspace Raspberry Pi PWM library for WS281X LEDs"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
make_target() {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
103
|
||||
- once a serial number is in config file then ir_disabled parameter
|
||||
needs to be localized below it (it is not global parameter anymore)
|
||||
|
||||
102
|
||||
- Automatically update driver to latest version on first install
|
||||
- Show driver version in addon settings
|
||||
|
||||
@@ -27,6 +27,7 @@ bulk_notification=on
|
||||
|
||||
#[U123456789012]
|
||||
#initial_dvb_mode=DVBT
|
||||
#ir_disabled=1
|
||||
|
||||
#[NETWORK]
|
||||
#device=192.168.1.1:0
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
PKG_NAME="sundtek-mediatv"
|
||||
PKG_VERSION="7.0"
|
||||
PKG_REV="102"
|
||||
PKG_REV="103"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
PKG_SITE="http://support.sundtek.com/"
|
||||
|
||||
@@ -136,7 +136,7 @@ if [ -z "$(pidof mediasrv)" ]; then
|
||||
|
||||
if [ "$USE_NET_TUNERS" = "true" -a -n "$DEVICE1_IP" ]; then
|
||||
# delete all network tuner entries
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^device=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^[^\[]|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
@@ -168,7 +168,7 @@ if [ -z "$(pidof mediasrv)" ]; then
|
||||
fi
|
||||
else
|
||||
# delete all network tuner entries
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^device=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
awk '/^\[NETWORK\]/{flag=1; next} /^[^\[]|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-net
|
||||
mv ${SUNDTEK_CONF_TMP}-net $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
@@ -197,26 +197,26 @@ if [ -z "$(pidof mediasrv)" ]; then
|
||||
[ ! -f $KEYMAP ] && KEYMAP=""
|
||||
|
||||
# remove setttings for this tuner
|
||||
awk -v val="[$SERIAL]" '$0 == val {flag=1; next} /^ir_protocol=|^rcmap=|^initial_dvb_mode=|^#|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-types
|
||||
awk -v val="[$SERIAL]" '$0 == val {flag=1; next} /^[^\[]|^$/{if (flag==1) next} /.*/{flag=0; print}' $SUNDTEK_CONF_TMP >${SUNDTEK_CONF_TMP}-types
|
||||
mv ${SUNDTEK_CONF_TMP}-types $SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
# remove empty lines at the end of file
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $SUNDTEK_CONF_TMP
|
||||
|
||||
ADDNEW=true
|
||||
if [ -n "$DVBMODE" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "initial_dvb_mode=$DVBMODE" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
if [ -n "$IRPROT" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "ir_protocol=$IRPROT" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
if [ -n "$KEYMAP" ]; then
|
||||
[ $ADDNEW = true ] && ADDNEW=false && echo -e "\n[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
echo "rcmap=$KEYMAP" >>$SUNDTEK_CONF_TMP
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
echo "[$SERIAL]" >>$SUNDTEK_CONF_TMP
|
||||
|
||||
[ -n "$DVBMODE" ] && echo "initial_dvb_mode=$DVBMODE" >>$SUNDTEK_CONF_TMP
|
||||
|
||||
if [ "$ENABLE_IR_RECEIVER" = "true" ]; then
|
||||
echo "ir_disabled=0" >>$SUNDTEK_CONF_TMP
|
||||
else
|
||||
echo "ir_disabled=1" >>$SUNDTEK_CONF_TMP
|
||||
fi
|
||||
|
||||
[ -n "$IRPROT" ] && echo "ir_protocol=$IRPROT" >>$SUNDTEK_CONF_TMP
|
||||
[ -n "$KEYMAP" ] && echo "rcmap=$KEYMAP" >>$SUNDTEK_CONF_TMP
|
||||
|
||||
echo "" >>$SUNDTEK_CONF_TMP
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
107
|
||||
- updated moonlight-embedded and moonlight-common-c
|
||||
|
||||
106
|
||||
- rebuild
|
||||
|
||||
105
|
||||
- update moonlight-embedded to support GFE 3.2
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-2017 Team LibreELEC
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -19,7 +19,7 @@
|
||||
PKG_NAME="moonlight"
|
||||
PKG_VERSION="391de3f"
|
||||
PKG_VERSION_NUMBER="2.2.2"
|
||||
PKG_REV="105"
|
||||
PKG_REV="107"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv2"
|
||||
PKG_SITE="https://github.com/dead/script.moonlight"
|
||||
@@ -64,8 +64,8 @@ addon() {
|
||||
cp -P $(get_build_dir moonlight-embedded)/.$TARGET_NAME/moonlight $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp -P $(get_build_dir moonlight-embedded)/.$TARGET_NAME/libgamestream/libgamestream.so* $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp -P $(get_build_dir moonlight-embedded)/.$TARGET_NAME/libgamestream/libmoonlight-common.so* $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp $(get_build_dir moonlight-embedded)/.$TARGET_NAME/libgamestream/libgamestream.so.2 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp $(get_build_dir moonlight-embedded)/.$TARGET_NAME/libgamestream/libmoonlight-common.so.2 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
if [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
|
||||
cp -P $(get_build_dir moonlight-embedded)/.$TARGET_NAME/libmoonlight-pi.so $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
@@ -75,11 +75,9 @@ addon() {
|
||||
cp -P $(get_build_dir moonlight-embedded)/.$TARGET_NAME/libmoonlight-aml.so $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
fi
|
||||
|
||||
cp -P $(get_build_dir libevdev)/.install_pkg/usr/lib/libevdev.so* $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp $(get_build_dir libevdev)/.install_pkg/usr/lib/libevdev.so.2 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/etc
|
||||
cp -P $(get_build_dir moonlight-embedded)/moonlight.conf $ADDON_BUILD/$PKG_ADDON_ID/etc
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/share/moonlight
|
||||
cp -PR $(get_build_dir moonlight-embedded)/mappings $ADDON_BUILD/$PKG_ADDON_ID/share/moonlight
|
||||
cp -P $(get_build_dir moonlight-embedded)/gamecontrollerdb.txt $ADDON_BUILD/$PKG_ADDON_ID/etc
|
||||
}
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
From 7057b4af0c5921393d7a5c79b798cb923a895e67 Mon Sep 17 00:00:00 2001
|
||||
From: HDKiller <hdkiller@gmail.com>
|
||||
Date: Sat, 16 Sep 2017 19:29:42 +0200
|
||||
Subject: [PATCH 1/3] make parameteres compatible with moonlight 2.4.3
|
||||
|
||||
---
|
||||
script.moonlight/bin/moonlight.sh | 22 +++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/script.moonlight/bin/moonlight.sh b/script.moonlight/bin/moonlight.sh
|
||||
index 967c6e0..e389041 100644
|
||||
--- a/script.moonlight/bin/moonlight.sh
|
||||
+++ b/script.moonlight/bin/moonlight.sh
|
||||
@@ -4,6 +4,14 @@
|
||||
|
||||
oe_setup_addon script.moonlight
|
||||
|
||||
+# copy gamecontrollerdb.txt to folder
|
||||
+MOONLIGHT_CONF_DIR="/storage/.config/moonlight"
|
||||
+
|
||||
+if [ ! -f "$MOONLIGHT_CONF_DIR/gamecontrollerdb.txt" ]; then
|
||||
+ mkdir -p $MOONLIGHT_CONF_DIR
|
||||
+ cp $ADDON_DIR/etc/gamecontrollerdb.txt $MOONLIGHT_CONF_DIR
|
||||
+fi
|
||||
+
|
||||
while [ 1 ]; do
|
||||
if [ -f $ADDON_DIR/start_moonlight.tmp ]; then
|
||||
|
||||
@@ -30,13 +38,9 @@ while [ 1 ]; do
|
||||
fi
|
||||
|
||||
if [ "$MOON_FRAMERATE" = "60" ]; then
|
||||
- MOONLIGHT_ARG="$MOONLIGHT_ARG -60fps"
|
||||
+ MOONLIGHT_ARG="$MOONLIGHT_ARG -fps 60"
|
||||
else
|
||||
- MOONLIGHT_ARG="$MOONLIGHT_ARG -30fps"
|
||||
- fi
|
||||
-
|
||||
- if [ "$MOON_FORCEHW" = "true" ]; then
|
||||
- MOONLIGHT_ARG="$MOONLIGHT_ARG -forcehw"
|
||||
+ MOONLIGHT_ARG="$MOONLIGHT_ARG -fps 30"
|
||||
fi
|
||||
|
||||
if [ "$MOON_SURROUND" = "true" ]; then
|
||||
@@ -59,10 +63,6 @@ while [ 1 ]; do
|
||||
MOONLIGHT_ARG="$MOONLIGHT_ARG -audio $MOON_AUDIO"
|
||||
fi
|
||||
|
||||
- if [ "$MOON_MAPPING" != "" ]; then
|
||||
- MOONLIGHT_ARG="$MOONLIGHT_ARG -mapping \"${ADDON_DIR}/share/moonlight/mappings/${MOON_MAPPING}.conf\""
|
||||
- fi
|
||||
-
|
||||
if [ "$MOONLIGHT_APP" != "" ]; then
|
||||
MOONLIGHT_ARG="$MOONLIGHT_ARG -app \"${MOONLIGHT_APP}\""
|
||||
fi
|
||||
@@ -78,7 +78,7 @@ while [ 1 ]; do
|
||||
fi
|
||||
|
||||
modprobe snd_bcm2835 || :
|
||||
- echo $MOONLIGHT_ARG >> $ADDON_LOG_FILE
|
||||
+ echo "${MOONLIGHT_ARG}" >> ${ADDON_LOG_FILE}
|
||||
/bin/sh -c "${ADDON_DIR}/bin/moonlight ${MOONLIGHT_ARG} > ${ADDON_LOG_FILE} 2>&1"
|
||||
rmmod snd_bcm2835 || :
|
||||
systemctl start kodi
|
||||
|
||||
From c93f573cd46305fc630109faf8be8c5032e9c847 Mon Sep 17 00:00:00 2001
|
||||
From: HDKiller <hdkiller@gmail.com>
|
||||
Date: Sun, 17 Sep 2017 07:29:25 +0200
|
||||
Subject: [PATCH 2/3] add new parameter (-4k) and remove obsolete ones
|
||||
(-mapping) since controller config now comes from gamecontrollerdb
|
||||
|
||||
---
|
||||
script.moonlight/bin/moonlight.sh | 2 ++
|
||||
script.moonlight/resources/settings.xml | 5 ++---
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/script.moonlight/bin/moonlight.sh b/script.moonlight/bin/moonlight.sh
|
||||
index e389041..69a5aff 100644
|
||||
--- a/script.moonlight/bin/moonlight.sh
|
||||
+++ b/script.moonlight/bin/moonlight.sh
|
||||
@@ -33,6 +33,8 @@ while [ 1 ]; do
|
||||
MOONLIGHT_ARG="$MOONLIGHT_ARG -720"
|
||||
elif [ "$MOON_RESOLUTION" = "1080p" ]; then
|
||||
MOONLIGHT_ARG="$MOONLIGHT_ARG -1080"
|
||||
+ elif [ "$MOON_RESOLUTION" = "4k" ]; then
|
||||
+ MOONLIGHT_ARG="$MOONLIGHT_ARG -4k"
|
||||
else
|
||||
MOONLIGHT_ARG="$MOONLIGHT_ARG -width $MOON_WIDTH_RESOLUTION -height $MOON_HEIGHT_RESOLUTION"
|
||||
fi
|
||||
diff --git a/script.moonlight/resources/settings.xml b/script.moonlight/resources/settings.xml
|
||||
index d035ecd..723d57e 100644
|
||||
--- a/script.moonlight/resources/settings.xml
|
||||
+++ b/script.moonlight/resources/settings.xml
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<setting id="MOON_SERVER_IP" type="ipaddress" label="Server IP" default="0.0.0.0"/>
|
||||
- <setting id="MOON_RESOLUTION" type="labelenum" label="Resolution" values="Custom|720p|1080p" default="720p" />
|
||||
+ <setting id="MOON_RESOLUTION" type="labelenum" label="Resolution" values="Custom|720p|1080p|4k" default="720p" />
|
||||
<setting id="MOON_WIDTH_RESOLUTION" type="text" label="Width" visible="eq(-1,0)" default="1366" />
|
||||
<setting id="MOON_HEIGHT_RESOLUTION" type="text" label="Height" visible="eq(-2,0)" default="768" />
|
||||
<setting id="MOON_FRAMERATE" type="select" values="30|60" label="FPS" default="30" />
|
||||
@@ -13,6 +13,5 @@
|
||||
<setting id="MOON_LOCALAUDIO" type="bool" label="Play audio locally" default="false"/>
|
||||
<setting id="MOON_SURROUND" type="bool" label="Stream 5.1 surround sound (requires GFE 2.7)" default="false"/>
|
||||
<setting id="MOON_FORCEHW" type="bool" label="Force hardware acceleration" default="true"/>
|
||||
- <setting id="MOON_MAPPING" type="select" label="Control Mapping" values="default|dualshock3|dualshock3alt|dualshock4|rumblepad2|xbox360" default="dualshock4" />
|
||||
<setting id="MOON_AUDIO" type="text" label="Audio Device" default="sysdefault" />
|
||||
-</settings>
|
||||
\ No newline at end of file
|
||||
+</settings>
|
||||
|
||||
From f9bb350c1b99e088e16bf67ef547bfadb6dbd1fc Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Sun, 17 Sep 2017 11:37:41 +0200
|
||||
Subject: [PATCH 3/3] Update moonlight embedded wrapper to 2.4.3
|
||||
|
||||
---
|
||||
script.moonlight/addon.xml | 4 ++--
|
||||
script.moonlight/lib/moonlight.py | 15 +++++++++++++--
|
||||
2 files changed, 15 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/script.moonlight/addon.xml b/script.moonlight/addon.xml
|
||||
index 9d53246..d18a813 100644
|
||||
--- a/script.moonlight/addon.xml
|
||||
+++ b/script.moonlight/addon.xml
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
-<addon id="script.moonlight" name="Moonlight" version="1.0.11" provider-name="dead">
|
||||
+<addon id="script.moonlight" name="Moonlight" version="1.1.1" provider-name="dead">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.14.0"/>
|
||||
</requires>
|
||||
@@ -16,4 +16,4 @@
|
||||
<language></language>
|
||||
<email>gustavobenn@hotmail.com</email>
|
||||
</extension>
|
||||
-</addon>
|
||||
\ No newline at end of file
|
||||
+</addon>
|
||||
diff --git a/script.moonlight/lib/moonlight.py b/script.moonlight/lib/moonlight.py
|
||||
index 7edae39..87065fc 100644
|
||||
--- a/script.moonlight/lib/moonlight.py
|
||||
+++ b/script.moonlight/lib/moonlight.py
|
||||
@@ -10,6 +10,14 @@
|
||||
GS_IO_ERROR = -5
|
||||
GS_NOT_SUPPORTED_4K = -6
|
||||
|
||||
+class DISPLAY_MODE(ctypes.Structure):
|
||||
+ pass
|
||||
+
|
||||
+DISPLAY_MODE._fields_ = [("height", ctypes.c_int),
|
||||
+ ("width", ctypes.c_int),
|
||||
+ ("refresh", ctypes.c_int),
|
||||
+ ("next", ctypes.POINTER(DISPLAY_MODE))]
|
||||
+
|
||||
class SERVER_INFORMATION(ctypes.Structure):
|
||||
_fields_ = [("address", ctypes.c_char_p),
|
||||
("serverInfoAppVersion", ctypes.c_char_p),
|
||||
@@ -20,8 +28,11 @@ class SERVER_DATA(ctypes.Structure):
|
||||
("gpuType", ctypes.c_char_p),
|
||||
("paired", ctypes.c_bool),
|
||||
("supports4K", ctypes.c_bool),
|
||||
+ ("unsupported", ctypes.c_bool),
|
||||
("currentGame", ctypes.c_int),
|
||||
("serverMajorVersion", ctypes.c_int),
|
||||
+ ("gsVersion", ctypes.c_char_p),
|
||||
+ ("modes", DISPLAY_MODE),
|
||||
("serverInfo", SERVER_INFORMATION)]
|
||||
|
||||
class APP_LIST(ctypes.Structure):
|
||||
@@ -37,8 +48,8 @@ class _HTTP_DATA(ctypes.Structure):
|
||||
|
||||
class LibGameStream:
|
||||
def __init__(self, libpath = ""):
|
||||
- self.commonlib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libmoonlight-common.so.0"))
|
||||
- self.gslib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libgamestream.so.0"))
|
||||
+ self.commonlib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libmoonlight-common.so.2"))
|
||||
+ self.gslib = ctypes.cdll.LoadLibrary(os.path.join(libpath, "libgamestream.so.2"))
|
||||
self.connected = False
|
||||
self.address = ""
|
||||
self.key_dir = ""
|
||||
8
packages/addons/service/bluetooth-audio/changelog.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
102
|
||||
- Add strings.po header
|
||||
|
||||
101
|
||||
- Fix log errors
|
||||
|
||||
100
|
||||
- Initial release
|
||||
BIN
packages/addons/service/bluetooth-audio/icon/icon.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
46
packages/addons/service/bluetooth-audio/package.mk
Normal file
@@ -0,0 +1,46 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="bluetooth-audio"
|
||||
PKG_VERSION="0"
|
||||
PKG_REV="102"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE=""
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Provides the ability to change the kodi audio device if a bluetooth audio device is connected"
|
||||
PKG_LONGDESC="Provides the ability to change the kodi audio device if a bluetooth audio device is connected"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Bluetooth Audio Device Changer"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
:
|
||||
}
|
||||
194
packages/addons/service/bluetooth-audio/source/default.py
Normal file
@@ -0,0 +1,194 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import dbus
|
||||
import dbus.mainloop.glib
|
||||
import gobject
|
||||
import json
|
||||
import threading
|
||||
import time
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
__addon__ = xbmcaddon.Addon()
|
||||
__addonid__ = __addon__.getAddonInfo('id')
|
||||
|
||||
gobject.threads_init()
|
||||
|
||||
class KodiFunctions(object):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
self.getjson = {
|
||||
"jsonrpc": "2.0",
|
||||
"method": "Settings.GetSettingValue",
|
||||
"params": {
|
||||
"setting": "audiooutput.audiodevice",
|
||||
},
|
||||
"id": 1,
|
||||
}
|
||||
|
||||
self.setjson = {
|
||||
"jsonrpc": "2.0",
|
||||
"method": "Settings.SetSettingValue",
|
||||
"params": {
|
||||
"setting": "audiooutput.audiodevice",
|
||||
"value": "",
|
||||
},
|
||||
"id": 1,
|
||||
}
|
||||
|
||||
if __addon__.getSetting('audiodevice') == '':
|
||||
self.audiodevice = json.loads(xbmc.executeJSONRPC(json.dumps(self.getjson)))['result']['value']
|
||||
__addon__.setSetting('audiodevice', self.audiodevice)
|
||||
else:
|
||||
self.audiodevice = __addon__.getSetting('audiodevice')
|
||||
self.pulsedevice = 'PULSE:Default'
|
||||
|
||||
self.select_default()
|
||||
|
||||
def select_default(self):
|
||||
|
||||
self.setjson['params']['value'] = self.audiodevice
|
||||
xbmc.executeJSONRPC(json.dumps(self.setjson))
|
||||
|
||||
def select_pulse(self):
|
||||
|
||||
self.setjson['params']['value'] = self.pulsedevice
|
||||
xbmc.executeJSONRPC(json.dumps(self.setjson))
|
||||
|
||||
class BluetoothAudioClient(object):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
xbmc.log('%s: starting add-on' % __addonid__, xbmc.LOGNOTICE)
|
||||
|
||||
self.devices = {}
|
||||
self.signal_added = None
|
||||
self.signal_removed = None
|
||||
|
||||
self.kodi = KodiFunctions()
|
||||
|
||||
self._setup_loop()
|
||||
self._setup_bus()
|
||||
self._setup_signals()
|
||||
|
||||
def quit(self):
|
||||
|
||||
xbmc.log('%s: stopping add-on' % __addonid__, xbmc.LOGNOTICE)
|
||||
|
||||
self.kodi.select_default()
|
||||
|
||||
self.signal_added.remove()
|
||||
self.signal_removed.remove()
|
||||
|
||||
self._loop.quit()
|
||||
|
||||
def _setup_loop(self):
|
||||
|
||||
self._loop = gobject.MainLoop()
|
||||
|
||||
self._thread = threading.Thread(target=self._loop.run)
|
||||
self._thread.start()
|
||||
|
||||
def _setup_bus(self):
|
||||
|
||||
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
|
||||
self._bus = dbus.SystemBus()
|
||||
|
||||
def _setup_signals(self):
|
||||
|
||||
self.signal_added = self._bus.add_signal_receiver(handler_function=self.switch_audio,
|
||||
signal_name='InterfacesAdded',
|
||||
dbus_interface='org.freedesktop.DBus.ObjectManager',
|
||||
bus_name='org.bluez',
|
||||
member_keyword='signal')
|
||||
|
||||
self.signal_removed = self._bus.add_signal_receiver(handler_function=self.switch_audio,
|
||||
signal_name='InterfacesRemoved',
|
||||
dbus_interface='org.freedesktop.DBus.ObjectManager',
|
||||
bus_name='org.bluez',
|
||||
member_keyword='signal')
|
||||
|
||||
def switch_audio(self, *args, **kwargs):
|
||||
|
||||
device_path = args[0]
|
||||
|
||||
try:
|
||||
if kwargs['signal'] == 'InterfacesAdded':
|
||||
|
||||
self.devices[device_path] = {
|
||||
'Connected': '',
|
||||
'Device': '',
|
||||
'Class': '',
|
||||
}
|
||||
|
||||
device = self._bus.get_object('org.bluez', device_path)
|
||||
device_iface = dbus.Interface(device, dbus.PROPERTIES_IFACE)
|
||||
self.devices[device_path]['Device'] = device_iface.Get('org.bluez.MediaTransport1', 'Device')
|
||||
|
||||
audio_device_path = self._bus.get_object('org.bluez', self.devices[device_path]['Device'])
|
||||
audio_device_iface = dbus.Interface(audio_device_path, dbus.PROPERTIES_IFACE)
|
||||
self.devices[device_path]['Class'] = audio_device_iface.Get('org.bluez.Device1', 'Class')
|
||||
self.devices[device_path]['Connected'] = audio_device_iface.Get('org.bluez.Device1', 'Connected')
|
||||
|
||||
if self.devices[device_path]['Class'] & (1 << 21):
|
||||
xbmc.log('%s: bluetooth audio device connected' % __addonid__, xbmc.LOGNOTICE)
|
||||
xbmc.log('%s: switching to bluetooth audio device' % __addonid__, xbmc.LOGNOTICE)
|
||||
self.kodi.select_pulse()
|
||||
|
||||
elif kwargs['signal'] == 'InterfacesRemoved':
|
||||
if self.devices[device_path]['Device'] is not None and self.devices[device_path]['Class'] & (1 << 21):
|
||||
audio_device_path = self._bus.get_object('org.bluez', self.devices[device_path]['Device'])
|
||||
audio_device_iface = dbus.Interface(audio_device_path, dbus.PROPERTIES_IFACE)
|
||||
self.devices[device_path]['Connected'] = audio_device_iface.Get('org.bluez.Device1', 'Connected')
|
||||
|
||||
while self.devices[device_path]['Connected']:
|
||||
self.devices[device_path]['Connected'] = audio_device_iface.Get('org.bluez.Device1', 'Connected')
|
||||
time.sleep(0.1)
|
||||
|
||||
xbmc.log('%s: bluetooth audio device disconnected' % __addonid__, xbmc.LOGNOTICE)
|
||||
xbmc.log('%s: checking for other connected devices' % __addonid__, xbmc.LOGNOTICE)
|
||||
|
||||
for path in self.devices:
|
||||
if self.devices[path]['Connected'] and self.devices[path]['Class'] & (1 << 21):
|
||||
xbmc.log('%s: found connected bluetooth audio device' % __addonid__, xbmc.LOGNOTICE)
|
||||
return
|
||||
|
||||
xbmc.log('%s: switching to default audio device' % __addonid__, xbmc.LOGNOTICE)
|
||||
self.kodi.select_default()
|
||||
|
||||
except (TypeError, KeyError, dbus.exceptions.DBusException) as e:
|
||||
xbmc.log('%s: ' % __addonid__ + unicode(e), xbmc.LOGERROR)
|
||||
|
||||
class BluetoothMonitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
xbmc.Monitor.__init__(self)
|
||||
|
||||
if (__name__ == "__main__"):
|
||||
monitor = BluetoothMonitor()
|
||||
client = BluetoothAudioClient()
|
||||
|
||||
monitor.waitForAbort()
|
||||
|
||||
client.quit()
|
||||
|
||||
del BluetoothAudioClient
|
||||
del BluetoothMonitor
|
||||
@@ -0,0 +1,19 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: bluetooth-audio
|
||||
# Addon id: service.bluetooth-audio
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: en\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "Audio Device"
|
||||
msgstr ""
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting label="30001" type="text" id="audiodevice" default=""/>
|
||||
</category>
|
||||
</settings>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
8.0.102
|
||||
103
|
||||
- Update to 77b33a6
|
||||
|
||||
102
|
||||
- Build with Linux 4.7 RPi libraries
|
||||
|
||||
8.0.101
|
||||
101
|
||||
- Move settings to Kodi
|
||||
|
||||
8.0.100
|
||||
100
|
||||
- Initial addon
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="dispmanx_vnc"
|
||||
PKG_VERSION="78e6673"
|
||||
PKG_REV="102"
|
||||
PKG_VERSION="77b33a6"
|
||||
PKG_REV="103"
|
||||
PKG_ARCH="arm"
|
||||
PKG_ADDON_PROJECTS="RPi RPi2"
|
||||
PKG_LICENSE="OSS"
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
115:
|
||||
117
|
||||
- Update to 3.2.34.0
|
||||
- Use reworked ffmpegx
|
||||
|
||||
116
|
||||
- Update to verson 3.2.27.0
|
||||
- Rename to Emby Server
|
||||
|
||||
115
|
||||
- Update to version 3.2.26.0
|
||||
|
||||
114:
|
||||
114
|
||||
- Update to version 3.2.17.0
|
||||
- Rebuild libx264, ffmpegx and imagemagick
|
||||
- Use ffmpgex by default
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="emby"
|
||||
PKG_VERSION="3.2.26.0"
|
||||
PKG_REV="115"
|
||||
PKG_VERSION="3.2.34.0"
|
||||
PKG_REV="117"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://emby.media"
|
||||
PKG_URL="https://github.com/MediaBrowser/Emby/releases/download/$PKG_VERSION/Emby.Mono.zip"
|
||||
PKG_DEPENDS_TARGET="toolchain ffmpegx imagemagick"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Emby: a personal media server"
|
||||
PKG_LONGDESC="Emby ($PKG_VERSION) brings your home videos, music, and photos together, automatically converting and streaming your media on-the-fly to any device"
|
||||
PKG_SHORTDESC="Emby Server: a personal media server"
|
||||
PKG_LONGDESC="Emby Server ($PKG_VERSION) brings your home videos, music, and photos together, automatically converting and streaming your media on-the-fly to any device"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Emby"
|
||||
PKG_ADDON_NAME="Emby Server"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_ADDON_REQUIRES="tools.mono:0.0.0"
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy)"
|
||||
@@ -57,12 +57,12 @@ addon() {
|
||||
$ADDON_BUILD/$PKG_ADDON_ID/Emby.Mono/SQLitePCLRaw.provider.sqlite3.dll.config
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -L $(get_build_dir ffmpegx)/.install_pkg/usr/local/bin/ffmpegx \
|
||||
$(get_build_dir ffmpegx)/.install_pkg/usr/local/bin/ffprobex \
|
||||
cp -L $(get_build_dir ffmpegx)/.INSTALL_PKG/usr/local/bin/ffmpegx \
|
||||
$(get_build_dir ffmpegx)/.INSTALL_PKG/usr/local/bin/ffprobex \
|
||||
$ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp -L $(get_build_dir imagemagick)/.install_pkg/usr/lib/libMagickCore-7.Q8.so.2 \
|
||||
cp -L $(get_build_dir imagemagick)/.install_pkg/usr/lib/libMagickCore-7.Q8.so.? \
|
||||
$(get_build_dir imagemagick)/.install_pkg/usr/lib/libMagickWand-7.Q8.so \
|
||||
$ADDON_BUILD/$PKG_ADDON_ID/lib/
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
106
|
||||
- Update to version 1c21232
|
||||
|
||||
105
|
||||
- Update protobuf to 3.1.0
|
||||
- Fix build with gcc 6
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2009-2016 Lukas Rusak (lrusak@libreelec.tv)
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -17,8 +18,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="hyperion"
|
||||
PKG_VERSION="355a324"
|
||||
PKG_REV="105"
|
||||
PKG_VERSION="1c21232"
|
||||
PKG_REV="106"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/hyperion-project/hyperion"
|
||||
PKG_URL="https://github.com/hyperion-project/hyperion/archive/$PKG_VERSION.tar.gz"
|
||||
@@ -31,21 +32,21 @@ PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Hyperion"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
AMLOGIC_SUPPORT="-DENABLE_AMLOGIC=0"
|
||||
DISPMANX_SUPPORT="-DENABLE_DISPMANX=0"
|
||||
FB_SUPPORT="-DENABLE_FB=1"
|
||||
X11_SUPPORT="-DENABLE_X11=0"
|
||||
PKG_AMLOGIC_SUPPORT="-DENABLE_AMLOGIC=0"
|
||||
PKG_DISPMANX_SUPPORT="-DENABLE_DISPMANX=0"
|
||||
PKG_FB_SUPPORT="-DENABLE_FB=1"
|
||||
PKG_X11_SUPPORT="-DENABLE_X11=0"
|
||||
|
||||
if [ "$KODIPLAYER_DRIVER" = "libamcodec" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libamcodec"
|
||||
AMLOGIC_SUPPORT="-DENABLE_AMLOGIC=1"
|
||||
PKG_AMLOGIC_SUPPORT="-DENABLE_AMLOGIC=1"
|
||||
elif [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bcm2835-driver"
|
||||
DISPMANX_SUPPORT="-DENABLE_DISPMANX=1"
|
||||
FB_SUPPORT="-DENABLE_FB=0"
|
||||
PKG_DISPMANX_SUPPORT="-DENABLE_DISPMANX=1"
|
||||
PKG_FB_SUPPORT="-DENABLE_FB=0"
|
||||
elif [ "$DISPLAYSERVER" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET xorg-server xrandr"
|
||||
X11_SUPPORT="-DENABLE_X11=1"
|
||||
PKG_X11_SUPPORT="-DENABLE_X11=1"
|
||||
fi
|
||||
|
||||
pre_build_target() {
|
||||
@@ -58,9 +59,9 @@ pre_configure_target() {
|
||||
|
||||
PKG_CMAKE_OPTS_TARGET="-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \
|
||||
-DHYPERION_VERSION_ID="$PKG_VERSION" \
|
||||
$AMLOGIC_SUPPORT \
|
||||
$DISPMANX_SUPPORT \
|
||||
$FB_SUPPORT \
|
||||
$PKG_AMLOGIC_SUPPORT \
|
||||
$PKG_DISPMANX_SUPPORT \
|
||||
$PKG_FB_SUPPORT \
|
||||
-DENABLE_OSX=0 \
|
||||
-DUSE_SYSTEM_PROTO_LIBS=1 \
|
||||
-DENABLE_SPIDEV=1 \
|
||||
@@ -68,7 +69,7 @@ PKG_CMAKE_OPTS_TARGET="-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \
|
||||
-DENABLE_V4L2=1 \
|
||||
-DENABLE_WS2812BPWM=0 \
|
||||
-DENABLE_WS281XPWM=1 \
|
||||
$X11_SUPPORT \
|
||||
$PKG_X11_SUPPORT \
|
||||
-DENABLE_QT5=1 \
|
||||
-DENABLE_TESTS=0 \
|
||||
-Wno-dev"
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
103
|
||||
- Update to 2.2
|
||||
|
||||
102
|
||||
- Upgrade to 2.1
|
||||
- Update to 2.1
|
||||
|
||||
101
|
||||
- Upgrade to 2.0
|
||||
- Update to 2.0
|
||||
|
||||
100
|
||||
- Initial addon
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="inadyn"
|
||||
PKG_VERSION="2.1"
|
||||
PKG_REV="102"
|
||||
PKG_VERSION="2.2"
|
||||
PKG_REV="103"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv2"
|
||||
PKG_SITE="http://troglobit.com/inadyn.html"
|
||||
PKG_URL="https://github.com/troglobit/inadyn/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain libconfuse libite openssl"
|
||||
PKG_DEPENDS_TARGET="toolchain libconfuse openssl"
|
||||
PKG_SECTION="service/system"
|
||||
PKG_SHORTDESC="Inadyn: a small and simple Dynamic Domain Name System client"
|
||||
PKG_LONGDESC="Inadyn ($PKG_VERSION) is a small and simple Dynamic Domain Name System (DDNS) client with HTTPS support. It is commonly available in many GNU/Linux distributions, used in off-the-shelf routers and Internet gateways to automate the task of keeping your DNS record up to date with any IP address changes from your ISP. It can also be used in installations with redundant (backup) connections to the Internet."
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
107
|
||||
- Update to ddfc28f
|
||||
|
||||
106
|
||||
- Rework code
|
||||
- Display artist and title on track load
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="librespot"
|
||||
PKG_VERSION="910974e"
|
||||
PKG_REV="106"
|
||||
PKG_VERSION="ddfc28f"
|
||||
PKG_REV="107"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/plietar/$PKG_NAME/"
|
||||
@@ -43,7 +43,7 @@ configure_target() {
|
||||
|
||||
make_target() {
|
||||
cd src
|
||||
$CARGO_BUILD --no-default-features --features "alsa-backend pulseaudio-backend with-avahi"
|
||||
$CARGO_BUILD --no-default-features --features "alsa-backend pulseaudio-backend"
|
||||
cd "$PKG_BUILD/.$TARGET_NAME"/*/release
|
||||
$STRIP librespot
|
||||
}
|
||||
|
||||
@@ -1,222 +0,0 @@
|
||||
From a825f84d9d00b196232fcccc5b5e441654c4e5a0 Mon Sep 17 00:00:00 2001
|
||||
From: shanemeagher <shanemeagher@outlook.com>
|
||||
Date: Fri, 9 Jun 2017 22:43:54 +0800
|
||||
Subject: [PATCH] Build librespot with avahi support for Discovery
|
||||
|
||||
rust-mdns is still the default and can be specified explicitly with --with-rust-mdns switch.
|
||||
Added --with-avahi switch to build librespot to use avahi for discovery using dns-sd package.
|
||||
---
|
||||
Cargo.lock | 10 ++++++++++
|
||||
Cargo.toml | 7 +++++--
|
||||
contrib/Dockerfile | 3 +++
|
||||
contrib/docker-build-avahi.sh | 24 ++++++++++++++++++++++++
|
||||
src/authentication/discovery.rs | 27 ++++++++++++++++++++++++++-
|
||||
src/lib.rs | 6 +++++-
|
||||
6 files changed, 73 insertions(+), 4 deletions(-)
|
||||
create mode 100755 contrib/docker-build-avahi.sh
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 30fafca..eff0925 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -6,6 +6,7 @@ dependencies = [
|
||||
"base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "dns-sd 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -144,6 +145,15 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
+name = "dns-sd"
|
||||
+version = "0.1.3"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+dependencies = [
|
||||
+ "libc 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 5d64719..c543e92 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -52,7 +52,8 @@ alsa = { git = "https://github.com/plietar/rust-alsa", optional = tru
|
||||
portaudio-rs = { version = "0.3.0", optional = true }
|
||||
libpulse-sys = { git = "https://github.com/astro/libpulse-sys", optional = true }
|
||||
|
||||
-mdns = { git = "https://github.com/plietar/rust-mdns" }
|
||||
+mdns = { git = "https://github.com/plietar/rust-mdns", optional = true }
|
||||
+dns-sd = { version = "~0.1.3", optional = true }
|
||||
|
||||
error-chain = { version = "0.9.0", default_features = false }
|
||||
futures = "0.1.8"
|
||||
@@ -71,8 +72,10 @@ portaudio-backend = ["portaudio-rs"]
|
||||
pulseaudio-backend = ["libpulse-sys"]
|
||||
|
||||
with-tremor = ["tremor"]
|
||||
+with-rust-mdns = ["mdns"]
|
||||
+with-avahi = ["dns-sd"]
|
||||
|
||||
-default = ["portaudio-backend"]
|
||||
+default = ["portaudio-backend","with-rust-mdns"]
|
||||
|
||||
[package.metadata.deb]
|
||||
maintainer = "nobody"
|
||||
diff --git a/contrib/Dockerfile b/contrib/Dockerfile
|
||||
index 68a39b7..f6aec14 100644
|
||||
--- a/contrib/Dockerfile
|
||||
+++ b/contrib/Dockerfile
|
||||
@@ -4,6 +4,8 @@
|
||||
#
|
||||
# The resulting image can be used to build librespot for linux x86_64, armhf and armel.
|
||||
# $ docker run -v /tmp/librespot-build:/build librespot-cross
|
||||
+# To build librespot with avahi support
|
||||
+# $ docker run -v /tmp/librespot-build:/build librespot-cross /src/contrib/docker-build-avahi.sh
|
||||
#
|
||||
# The compiled binaries will be located in /tmp/librespot-build
|
||||
#
|
||||
@@ -23,6 +25,7 @@ RUN apt-get update
|
||||
|
||||
RUN apt-get install -y curl git build-essential crossbuild-essential-arm64 crossbuild-essential-armel crossbuild-essential-armhf crossbuild-essential-mipsel
|
||||
RUN apt-get install -y libasound2-dev libasound2-dev:arm64 libasound2-dev:armel libasound2-dev:armhf libasound2-dev:mipsel
|
||||
+RUN apt-get install -y libavahi-compat-libdnssd-dev libavahi-compat-libdnssd-dev:arm64 libavahi-compat-libdnssd-dev:armel libavahi-compat-libdnssd-dev:armhf libavahi-compat-libdnssd-dev:mipsel
|
||||
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
ENV PATH="/root/.cargo/bin/:${PATH}"
|
||||
diff --git a/contrib/docker-build-avahi.sh b/contrib/docker-build-avahi.sh
|
||||
new file mode 100755
|
||||
index 0000000..c25b248
|
||||
--- /dev/null
|
||||
+++ b/contrib/docker-build-avahi.sh
|
||||
@@ -0,0 +1,24 @@
|
||||
+#!/usr/bin/env bash
|
||||
+set -eux
|
||||
+
|
||||
+cargo build --release --no-default-features --features "alsa-backend with-avahi"
|
||||
+cp /usr/lib/x86_64-linux-gnu/libdns_sd.so.1 /build/release
|
||||
+
|
||||
+export PKG_CONFIG_ALLOW_CROSS=0
|
||||
+
|
||||
+export PKG_CONFIG_PATH=/usr/lib/aarch64-unknown-linux-gnu/pkgconfig
|
||||
+cargo build --release --target aarch64-unknown-linux-gnu --no-default-features --features "alsa-backend with-avahi"
|
||||
+cp /usr/lib/aarch64-linux-gnu/libdns_sd.so.1 /build/aarch64-unknown-linux-gnu/release
|
||||
+
|
||||
+export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabi/pkgconfig
|
||||
+cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features "alsa-backend with-avahi"
|
||||
+cp /usr/lib/arm-linux-gnueabi/libdns_sd.so.1 /build/arm-unknown-linux-gnueabi/release
|
||||
+
|
||||
+export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig
|
||||
+cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features "alsa-backend with-avahi"
|
||||
+cp /usr/lib/arm-linux-gnueabihf/libdns_sd.so.1 /build/arm-unknown-linux-gnueabihf/release
|
||||
+
|
||||
+export PKG_CONFIG_PATH=/usr/lib/mipsel-linux-gnu/pkgconfig
|
||||
+cargo build --release --target mipsel-unknown-linux-gnu --no-default-features --features "alsa-backend with-avahi"
|
||||
+cp /usr/libmipsel-linux-gnu/libdns_sd.so.1 /build/mipsel-unknown-linux-gnu/release
|
||||
+
|
||||
diff --git a/src/authentication/discovery.rs b/src/authentication/discovery.rs
|
||||
index 8c5b005..d385294 100644
|
||||
--- a/src/authentication/discovery.rs
|
||||
+++ b/src/authentication/discovery.rs
|
||||
@@ -7,7 +7,6 @@ use futures::sync::mpsc;
|
||||
use futures::{Future, Stream, BoxFuture, Poll, Async};
|
||||
use hyper::server::{Service, NewService, Request, Response, Http};
|
||||
use hyper::{self, Get, Post, StatusCode};
|
||||
-use mdns;
|
||||
use num_bigint::BigUint;
|
||||
use rand;
|
||||
use std::collections::BTreeMap;
|
||||
@@ -20,6 +19,12 @@ use url;
|
||||
use authentication::Credentials;
|
||||
use util;
|
||||
|
||||
+#[cfg(feature = "with-rust-mdns")]
|
||||
+use mdns;
|
||||
+
|
||||
+#[cfg(feature = "with-avahi")]
|
||||
+use dns_sd::DNSService;
|
||||
+
|
||||
#[derive(Clone)]
|
||||
struct Discovery(Arc<DiscoveryInner>);
|
||||
struct DiscoveryInner {
|
||||
@@ -202,7 +207,10 @@ impl NewService for Discovery {
|
||||
|
||||
pub struct DiscoveryStream {
|
||||
credentials: mpsc::UnboundedReceiver<Credentials>,
|
||||
+ #[cfg(feature = "with-rust-mdns")]
|
||||
_svc: mdns::Service,
|
||||
+ #[cfg(feature = "with-avahi")]
|
||||
+ _svc: DNSService,
|
||||
task: Box<Future<Item=(), Error=io::Error>>,
|
||||
}
|
||||
|
||||
@@ -212,8 +220,13 @@ pub fn discovery(handle: &Handle, device_name: String, device_id: String)
|
||||
let (discovery, creds_rx) = Discovery::new(device_name.clone(), device_id);
|
||||
|
||||
let listener = TcpListener::bind(&"0.0.0.0:0".parse().unwrap(), handle)?;
|
||||
+
|
||||
+ #[cfg(feature = "with-rust-mdns")]
|
||||
let addr = listener.local_addr()?;
|
||||
|
||||
+ #[cfg(feature = "with-avahi")]
|
||||
+ let port = listener.local_addr().unwrap().port();
|
||||
+
|
||||
let http = Http::new();
|
||||
let handle_ = handle.clone();
|
||||
let task = Box::new(listener.incoming().for_each(move |(socket, addr)| {
|
||||
@@ -221,13 +234,25 @@ pub fn discovery(handle: &Handle, device_name: String, device_id: String)
|
||||
Ok(())
|
||||
}));
|
||||
|
||||
+ #[cfg(feature = "with-rust-mdns")]
|
||||
let responder = mdns::Responder::spawn(&handle)?;
|
||||
+
|
||||
+ #[cfg(feature = "with-rust-mdns")]
|
||||
let svc = responder.register(
|
||||
"_spotify-connect._tcp".to_owned(),
|
||||
device_name,
|
||||
addr.port(),
|
||||
&["VERSION=1.0", "CPath=/"]);
|
||||
|
||||
+ #[cfg(feature = "with-avahi")]
|
||||
+ let svc = DNSService::register(Some(&*device_name),
|
||||
+ "_spotify-connect._tcp",
|
||||
+ None,
|
||||
+ None,
|
||||
+ port,
|
||||
+ &["VERSION=1.0", "CPath=/"])
|
||||
+ .unwrap();
|
||||
+
|
||||
Ok(DiscoveryStream {
|
||||
credentials: creds_rx,
|
||||
_svc: svc,
|
||||
diff --git a/src/lib.rs b/src/lib.rs
|
||||
index 2a50249..b1b77ef 100644
|
||||
--- a/src/lib.rs
|
||||
+++ b/src/lib.rs
|
||||
@@ -19,7 +19,6 @@ extern crate crypto;
|
||||
extern crate getopts;
|
||||
extern crate hyper;
|
||||
extern crate linear_map;
|
||||
-extern crate mdns;
|
||||
extern crate num_bigint;
|
||||
extern crate num_integer;
|
||||
extern crate num_traits;
|
||||
@@ -50,6 +49,11 @@ extern crate portaudio_rs;
|
||||
#[cfg(feature = "libpulse-sys")]
|
||||
extern crate libpulse_sys;
|
||||
|
||||
+#[cfg(feature = "with-rust-mdns")]
|
||||
+extern crate mdns;
|
||||
+
|
||||
+#[cfg(feature = "with-avahi")]
|
||||
+extern crate dns_sd;
|
||||
|
||||
#[macro_use] mod component;
|
||||
pub mod album_cover;
|
||||
@@ -0,0 +1,135 @@
|
||||
From b0d70bed1d5f3614f0e966c53c3a4898c7b33918 Mon Sep 17 00:00:00 2001
|
||||
From: awiouy <awiouy@gmail.com>
|
||||
Date: Mon, 4 Sep 2017 23:01:38 +0200
|
||||
Subject: [PATCH] use dns-sd instead of mdns for discovery
|
||||
|
||||
---
|
||||
Cargo.lock | 19 +++++--------------
|
||||
Cargo.toml | 2 +-
|
||||
src/discovery.rs | 19 ++++++++++---------
|
||||
src/lib.rs | 2 +-
|
||||
4 files changed, 17 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index d8128db..5f54617 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -277,7 +277,7 @@ dependencies = [
|
||||
"librespot-metadata 0.1.0",
|
||||
"librespot-protocol 0.1.0",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "mdns 0.2.0 (git+https://github.com/plietar/rust-mdns)",
|
||||
+ "dns-sd 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"portaudio-rs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"protobuf 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -386,20 +386,12 @@ version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
-name = "mdns"
|
||||
-version = "0.2.0"
|
||||
-source = "git+https://github.com/plietar/rust-mdns#c0fc73502d7d752a4ffeb5268a017561405e218c"
|
||||
+name = "dns-sd"
|
||||
+version = "0.1.3"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
- "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "dns-parser 0.3.2 (git+https://github.com/plietar/dns-parser)",
|
||||
- "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "multimap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "net2 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1099,7 +1091,6 @@ dependencies = [
|
||||
"checksum magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf0336886480e671965f794bc9b6fce88503563013d1bfb7a502c81fe3ac527"
|
||||
"checksum magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40d014c7011ac470ae28e2f76a02bfea4a8480f73e701353b49ad7a8d75f4699"
|
||||
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
|
||||
-"checksum mdns 0.2.0 (git+https://github.com/plietar/rust-mdns)" = "<none>"
|
||||
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
|
||||
"checksum mime 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c5ca99d8a021c1687882fd68dca26e601ceff5c26571c7cb41cf4ed60d57cb2d"
|
||||
"checksum mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "dbd91d3bfbceb13897065e97b2ef177a09a438cb33612b2d371bf568819a9313"
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index f4e6349..131e4f3 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -36,7 +36,7 @@ futures = "0.1.8"
|
||||
getopts = "0.2.14"
|
||||
hyper = "0.11.2"
|
||||
log = "0.3.5"
|
||||
-mdns = { git = "https://github.com/plietar/rust-mdns" }
|
||||
+dns-sd = "0.1.3"
|
||||
num-bigint = "0.1.35"
|
||||
protobuf = "1.1"
|
||||
rand = "0.3.13"
|
||||
diff --git a/src/discovery.rs b/src/discovery.rs
|
||||
index 3eaa5f0..6f9a4ae 100644
|
||||
--- a/src/discovery.rs
|
||||
+++ b/src/discovery.rs
|
||||
@@ -6,7 +6,7 @@ use futures::sync::mpsc;
|
||||
use futures::{Future, Stream, BoxFuture, Poll, Async};
|
||||
use hyper::server::{Service, NewService, Request, Response, Http};
|
||||
use hyper::{self, Get, Post, StatusCode};
|
||||
-use mdns;
|
||||
+use dns_sd::DNSService;
|
||||
use num_bigint::BigUint;
|
||||
use rand;
|
||||
use std::collections::BTreeMap;
|
||||
@@ -203,7 +203,7 @@ impl NewService for Discovery {
|
||||
|
||||
pub struct DiscoveryStream {
|
||||
credentials: mpsc::UnboundedReceiver<Credentials>,
|
||||
- _svc: mdns::Service,
|
||||
+ _svc: DNSService,
|
||||
task: Box<Future<Item=(), Error=io::Error>>,
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ pub fn discovery(handle: &Handle, config: ConnectConfig, device_id: String)
|
||||
let (discovery, creds_rx) = Discovery::new(config.clone(), device_id);
|
||||
|
||||
let listener = TcpListener::bind(&"0.0.0.0:0".parse().unwrap(), handle)?;
|
||||
- let addr = listener.local_addr()?;
|
||||
+ let port = listener.local_addr().unwrap().port();
|
||||
|
||||
let http = Http::new();
|
||||
let handle_ = handle.clone();
|
||||
@@ -222,12 +222,13 @@ pub fn discovery(handle: &Handle, config: ConnectConfig, device_id: String)
|
||||
Ok(())
|
||||
}));
|
||||
|
||||
- let responder = mdns::Responder::spawn(&handle)?;
|
||||
- let svc = responder.register(
|
||||
- "_spotify-connect._tcp".to_owned(),
|
||||
- config.name,
|
||||
- addr.port(),
|
||||
- &["VERSION=1.0", "CPath=/"]);
|
||||
+ let svc = DNSService::register(Some(&*config.name),
|
||||
+ "_spotify-connect._tcp",
|
||||
+ None,
|
||||
+ None,
|
||||
+ port,
|
||||
+ &["VERSION=1.0", "CPath=/"])
|
||||
+ .unwrap();
|
||||
|
||||
Ok(DiscoveryStream {
|
||||
credentials: creds_rx,
|
||||
diff --git a/src/lib.rs b/src/lib.rs
|
||||
index b9c920e..dfaf5a2 100644
|
||||
--- a/src/lib.rs
|
||||
+++ b/src/lib.rs
|
||||
@@ -13,7 +13,7 @@ extern crate base64;
|
||||
extern crate crypto;
|
||||
extern crate futures;
|
||||
extern crate hyper;
|
||||
-extern crate mdns;
|
||||
+extern crate dns_sd;
|
||||
extern crate num_bigint;
|
||||
extern crate protobuf;
|
||||
extern crate rand;
|
||||
@@ -1,25 +1,35 @@
|
||||
diff -Naur librespot/src/player.rs librespot-hooks/src/player.rs
|
||||
--- librespot/src/player.rs 2017-07-09 20:01:31.000000000 +0200
|
||||
+++ librespot-hooks/src/player.rs 2017-07-22 13:46:06.741727001 +0200
|
||||
@@ -2,6 +2,7 @@
|
||||
From a20f55c268bf44d6923be4cad6c6fdfecfc5dd8a Mon Sep 17 00:00:00 2001
|
||||
From: awiouy <awiouy@gmail.com>
|
||||
Date: Tue, 12 Sep 2017 09:37:53 +0200
|
||||
Subject: [PATCH] kodi hooks
|
||||
|
||||
---
|
||||
src/player.rs | 25 +++++++++++++++++--------
|
||||
1 file changed, 17 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/player.rs b/src/player.rs
|
||||
index 29380e3..44b9a24 100644
|
||||
--- a/src/player.rs
|
||||
+++ b/src/player.rs
|
||||
@@ -1,6 +1,7 @@
|
||||
use futures::sync::oneshot;
|
||||
use futures::{future, Future};
|
||||
use std::borrow::Cow;
|
||||
use std::io::{Read, Seek};
|
||||
+use std::env;
|
||||
use std::mem;
|
||||
use std::sync::mpsc::{RecvError, TryRecvError};
|
||||
use std::thread;
|
||||
@@ -11,7 +12,7 @@
|
||||
@@ -13,7 +14,7 @@ use core::util::{self, SpotifyId, Subfile};
|
||||
use audio_backend::Sink;
|
||||
use audio_decrypt::AudioDecrypt;
|
||||
use audio_file::AudioFile;
|
||||
-use metadata::{FileFormat, Track};
|
||||
+use metadata::{Artist, FileFormat, Track};
|
||||
use session::{Bitrate, Session};
|
||||
use audio::{AudioFile, AudioDecrypt};
|
||||
use audio::{VorbisDecoder, VorbisPacket};
|
||||
-use metadata::{FileFormat, Track, Metadata};
|
||||
+use metadata::{Artist, FileFormat, Track, Metadata};
|
||||
use mixer::AudioFilter;
|
||||
use util::{self, SpotifyId, Subfile};
|
||||
@@ -212,7 +213,7 @@
|
||||
Some(Err(e)) => panic!("Vorbis error {:?}", e),
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -215,7 +216,7 @@ impl PlayerInternal {
|
||||
|
||||
None => {
|
||||
self.sink.stop().unwrap();
|
||||
- self.run_onstop();
|
||||
@@ -27,12 +37,12 @@ diff -Naur librespot/src/player.rs librespot-hooks/src/player.rs
|
||||
|
||||
let old_state = mem::replace(&mut self.state, PlayerState::Stopped);
|
||||
old_state.signal_end_of_track();
|
||||
@@ -224,6 +225,12 @@
|
||||
@@ -227,6 +228,12 @@ impl PlayerInternal {
|
||||
debug!("command={:?}", cmd);
|
||||
match cmd {
|
||||
PlayerCommand::Load(track_id, play, position, end_of_track) => {
|
||||
+ let track = self.session.metadata().get::<Track>(track_id).wait().unwrap();
|
||||
+ let artist = self.session.metadata().get::<Artist>(track.artists[0]).wait().unwrap();
|
||||
+ let track = Track::get(&self.session, track_id).wait().unwrap();
|
||||
+ let artist = Artist::get(&self.session, track.artists[0]).wait().unwrap();
|
||||
+ env::set_var("LS_ARTIST", artist.name);
|
||||
+ env::set_var("LS_TITLE", track.name);
|
||||
+ self.run_onstart();
|
||||
@@ -40,7 +50,7 @@ diff -Naur librespot/src/player.rs librespot-hooks/src/player.rs
|
||||
if self.state.is_playing() {
|
||||
self.sink.stop().unwrap();
|
||||
}
|
||||
@@ -232,7 +239,7 @@
|
||||
@@ -235,7 +242,7 @@ impl PlayerInternal {
|
||||
Some(decoder) => {
|
||||
if play {
|
||||
if !self.state.is_playing() {
|
||||
@@ -49,7 +59,7 @@ diff -Naur librespot/src/player.rs librespot-hooks/src/player.rs
|
||||
}
|
||||
self.sink.start().unwrap();
|
||||
|
||||
@@ -242,7 +249,7 @@
|
||||
@@ -245,7 +252,7 @@ impl PlayerInternal {
|
||||
};
|
||||
} else {
|
||||
if self.state.is_playing() {
|
||||
@@ -58,16 +68,16 @@ diff -Naur librespot/src/player.rs librespot-hooks/src/player.rs
|
||||
}
|
||||
|
||||
self.state = PlayerState::Paused {
|
||||
@@ -255,7 +262,7 @@
|
||||
@@ -258,7 +265,7 @@ impl PlayerInternal {
|
||||
None => {
|
||||
end_of_track.complete(());
|
||||
if self.state.is_playing() {
|
||||
- self.run_onstop();
|
||||
+ info!("onstart 3");
|
||||
+ info!("onstop 3");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -276,7 +283,7 @@
|
||||
@@ -279,7 +286,7 @@ impl PlayerInternal {
|
||||
if let PlayerState::Paused { .. } = self.state {
|
||||
self.state.paused_to_playing();
|
||||
|
||||
@@ -76,7 +86,7 @@ diff -Naur librespot/src/player.rs librespot-hooks/src/player.rs
|
||||
self.sink.start().unwrap();
|
||||
} else {
|
||||
warn!("Player::play called from invalid state");
|
||||
@@ -288,17 +295,19 @@
|
||||
@@ -291,17 +298,19 @@ impl PlayerInternal {
|
||||
self.state.playing_to_paused();
|
||||
|
||||
self.sink.stop().unwrap();
|
||||
@@ -1,3 +1,12 @@
|
||||
From e9bb269936ea26b1c0c698b8d05aaf68e2e79bcc Mon Sep 17 00:00:00 2001
|
||||
From: awiouy <awiouy@gmail.com>
|
||||
Date: Tue, 12 Sep 2017 09:41:14 +0200
|
||||
Subject: [PATCH] use librespot_sink pulseadio sink
|
||||
|
||||
---
|
||||
src/audio_backend/pulseaudio.rs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/audio_backend/pulseaudio.rs b/src/audio_backend/pulseaudio.rs
|
||||
index 3b9a09b..ce78062 100644
|
||||
--- a/src/audio_backend/pulseaudio.rs
|
||||
@@ -101,12 +101,13 @@ if [ -n "$ls_p" -a -n "$ls_u" ]; then
|
||||
fi
|
||||
|
||||
if [ "$ls_O" == "Kodi" ]; then
|
||||
LIBRESPOT="$LIBRESPOT --backend pulseaudio"
|
||||
LIBRESPOT="$LIBRESPOT --backend pulseaudio --device-type TV"
|
||||
else
|
||||
init_alsa
|
||||
if [ -n "$ls_o" ]; then
|
||||
LIBRESPOT="$LIBRESPOT --device \"$ls_o\""
|
||||
fi
|
||||
LIBRESPOT="$LIBRESPOT --device-type Speaker"
|
||||
fi
|
||||
|
||||
if [ -z "$(pactl list short modules | grep sink_name=$LS_SINK)" ]; then
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
104
|
||||
- update OSCam to 11391
|
||||
|
||||
103
|
||||
- update OSCam to 11350
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="oscam"
|
||||
PKG_VERSION="d6fe72c"
|
||||
PKG_VERSION_NUMBER="11350"
|
||||
PKG_REV="103"
|
||||
PKG_VERSION="2563c02"
|
||||
PKG_VERSION_NUMBER="11391"
|
||||
PKG_REV="104"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.streamboard.tv/oscam/wiki"
|
||||
|
||||
9
packages/addons/service/slice/changelog.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
102
|
||||
- Fix rew pattern not working
|
||||
- Change logging to use LOGDEBUG
|
||||
|
||||
101
|
||||
- Fix sleep.png so all LED's turn off
|
||||
|
||||
100
|
||||
- Initial release
|
||||
BIN
packages/addons/service/slice/icon/icon.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
47
packages/addons/service/slice/package.mk
Normal file
@@ -0,0 +1,47 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="slice"
|
||||
PKG_VERSION="0"
|
||||
PKG_REV="102"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE=""
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Controls the LED lights on the Slice box using Kodi actions"
|
||||
PKG_LONGDESC="Controls the LED lights on the Slice box using Kodi actions"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Slice"
|
||||
PKG_ADDON_PROJECTS="Slice Slice3"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
:
|
||||
}
|
||||
249
packages/addons/service/slice/source/default.py
Normal file
@@ -0,0 +1,249 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
from PIL import Image
|
||||
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
import Queue
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
'''
|
||||
ffwd.png
|
||||
pause.png
|
||||
play.png
|
||||
quit.png
|
||||
rew.png
|
||||
shutdown.png
|
||||
skipf.png
|
||||
skipr.png
|
||||
sleep.png
|
||||
startup.png
|
||||
stop.png
|
||||
wake.png
|
||||
'''
|
||||
|
||||
__addon__ = xbmcaddon.Addon()
|
||||
__path__ = __addon__.getAddonInfo('path')
|
||||
|
||||
class PNGPatternPlayer(threading.Thread):
|
||||
|
||||
def __init__(self):
|
||||
threading.Thread.__init__(self)
|
||||
self.path = __path__ + "/resources/media/ledpatterns"
|
||||
self.patterns = Queue.Queue()
|
||||
self.responses = Queue.Queue()
|
||||
self.stopped = False
|
||||
self.memo = {}
|
||||
self.start()
|
||||
|
||||
def setPath(self, path):
|
||||
if self.path != path:
|
||||
self.path = path
|
||||
self.memo = {}
|
||||
|
||||
def clearPattern(self):
|
||||
with open('/dev/ws2812', 'wb') as f:
|
||||
'write null multiple times as the LEDs can get locked up with fast operations'
|
||||
for n in range(5):
|
||||
f.write(bytearray(25))
|
||||
|
||||
def playPattern(self, file, delay):
|
||||
xbmc.log('playing pattern: %s' % file, xbmc.LOGDEBUG)
|
||||
|
||||
'get pixel data from a cache if available, otherwise load and calculate'
|
||||
if file not in self.memo:
|
||||
image = Image.open(file)
|
||||
pixels = image.load()
|
||||
width, height = image.size
|
||||
data = []
|
||||
|
||||
for y in range(height):
|
||||
x_pixels = []
|
||||
for x in range(width):
|
||||
pixel = []
|
||||
r, g, b, a = pixels[x, y]
|
||||
pixel.append(hex(r)[2:].zfill(2))
|
||||
pixel.append(hex(g)[2:].zfill(2))
|
||||
pixel.append(hex(b)[2:].zfill(2))
|
||||
pixel.append(hex(a)[2:].zfill(2))
|
||||
x_pixels.append(''.join(str(e) for e in pixel))
|
||||
data.append(' '.join(str(e) for e in x_pixels))
|
||||
|
||||
self.memo[file] = data
|
||||
|
||||
for hexline in self.memo[file]:
|
||||
if not self.stopped:
|
||||
with open('/dev/ws2812', 'wb') as f:
|
||||
f.write(bytearray.fromhex(hexline))
|
||||
time.sleep(delay)
|
||||
else:
|
||||
break
|
||||
|
||||
def play(self, file, repeat=False, delay=0.030, wait=None):
|
||||
self.stopped = True
|
||||
|
||||
if wait is not None:
|
||||
# wait up to specified time if this pattern is to be processed synchronously
|
||||
self.patterns.put((file, repeat, delay, True))
|
||||
try:
|
||||
result = self.responses.get(block=True, timeout=wait)
|
||||
except Queue.Empty:
|
||||
pass
|
||||
else:
|
||||
self.patterns.put((file, repeat, delay, False))
|
||||
|
||||
def stop(self, wait=None):
|
||||
self.play(None, wait=wait)
|
||||
|
||||
def run(self):
|
||||
repeat = False
|
||||
|
||||
while True:
|
||||
try:
|
||||
(file, repeat, delay, wait) = self.patterns.get(block=True, timeout=0 if repeat and not self.stopped else None)
|
||||
|
||||
self.stopped = False
|
||||
|
||||
if file is not None:
|
||||
self.playPattern("%s/%s.png" % (self.path, file), delay)
|
||||
else:
|
||||
self.clearPattern()
|
||||
|
||||
if wait:
|
||||
self.responses.put(True)
|
||||
|
||||
# Queue will be empty if we're repeating the last pattern and there is no new work
|
||||
except Queue.Empty:
|
||||
self.playPattern("%s/%s.png" % (self.path, file), delay)
|
||||
|
||||
class SlicePlayer(xbmc.Player):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Player.__init__(self)
|
||||
|
||||
'maps kodi player speed to delay in seconds'
|
||||
self.speed_map = {-32: 0.015,
|
||||
-16: 0.025,
|
||||
-8: 0.030,
|
||||
-4: 0.035,
|
||||
-2: 0.040,
|
||||
-1: 0.060,
|
||||
0: 0.000,
|
||||
1: 0.060,
|
||||
2: 0.040,
|
||||
4: 0.035,
|
||||
8: 0.030,
|
||||
16: 0.025,
|
||||
32: 0.015,
|
||||
}
|
||||
|
||||
self.speed = 1
|
||||
patterns.play('startup', False, 0.02)
|
||||
xbmc.log('service.slice add-on started', xbmc.LOGNOTICE)
|
||||
|
||||
def onPlayBackEnded(self):
|
||||
'Will be called when Kodi stops playing a file'
|
||||
|
||||
patterns.play('stop')
|
||||
|
||||
def onPlayBackPaused(self):
|
||||
'Will be called when user pauses a playing file'
|
||||
|
||||
patterns.play('pause')
|
||||
|
||||
def onPlayBackResumed(self):
|
||||
'Will be called when user resumes a paused file'
|
||||
|
||||
patterns.play('play')
|
||||
|
||||
def onPlayBackSeek(self, iTime, seekOffset):
|
||||
'Will be called when user seeks to a time'
|
||||
|
||||
# todo: not working
|
||||
|
||||
xbmc.log('time offset: %d' % iTime, xbmc.LOGDEBUG)
|
||||
xbmc.log('seek offset: %d' % seekOffset, xbmc.LOGDEBUG)
|
||||
|
||||
if seekOffset > 0:
|
||||
patterns.play('skipf')
|
||||
else:
|
||||
patterns.play('skipr')
|
||||
|
||||
def onPlayBackSeekChapter(self, chapter):
|
||||
'Will be called when user performs a chapter seek'
|
||||
pass
|
||||
|
||||
def onPlayBackSpeedChanged(self, speed):
|
||||
'Will be called when players speed changes. (eg. user FF/RW)'
|
||||
|
||||
xbmc.log('seek speed: %d' % speed, xbmc.LOGDEBUG)
|
||||
|
||||
self.speed = speed
|
||||
|
||||
if self.speed != 1:
|
||||
if self.speed < 0:
|
||||
patterns.play('rew', True, self.speed_map[self.speed])
|
||||
elif self.speed > 0:
|
||||
patterns.play('ffwd', True, self.speed_map[self.speed])
|
||||
else:
|
||||
patterns.stop()
|
||||
|
||||
def onPlayBackStarted(self):
|
||||
'Will be called when Kodi starts playing a file'
|
||||
|
||||
patterns.play('play')
|
||||
|
||||
def onPlayBackStopped(self):
|
||||
'Will be called when user stops Kodi playing a file'
|
||||
|
||||
patterns.play('stop')
|
||||
|
||||
class SliceMonitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
|
||||
def onScreensaverActivated(self):
|
||||
'Will be called when screensaver kicks in'
|
||||
|
||||
patterns.play('sleep')
|
||||
|
||||
def onScreensaverDeactivated(self):
|
||||
'Will be called when screensaver goes off'
|
||||
|
||||
patterns.play('wake')
|
||||
|
||||
def onSettingsChanged(self):
|
||||
'Will be called when addon settings are changed'
|
||||
|
||||
# meh
|
||||
|
||||
if (__name__ == "__main__"):
|
||||
patterns = PNGPatternPlayer()
|
||||
player = SlicePlayer()
|
||||
monitor = SliceMonitor()
|
||||
|
||||
monitor.waitForAbort()
|
||||
patterns.play('shutdown', wait=5.0)
|
||||
|
||||
del SliceMonitor
|
||||
del SlicePlayer
|
||||
del PNGPatternPlayer
|
||||
|
After Width: | Height: | Size: 235 B |
|
After Width: | Height: | Size: 247 B |
|
After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 242 B |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 229 B |
|
After Width: | Height: | Size: 228 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
48
packages/addons/service/tvheadend/package.mk
Normal file
@@ -0,0 +1,48 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2017-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="tvheadend"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE=""
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="service.multimedia"
|
||||
PKG_SHORTDESC="Add-on removed"
|
||||
PKG_LONGDESC="Add-on removed"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_ADDON_BROKEN="Tvheadend 4.0 is no longer maintained and has been superseded by Tvheadend 4.2."
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Tvheadend Server 4.0"
|
||||
PKG_ADDON_TYPE="xbmc.broken"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
:
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
112
|
||||
- update to 4.2.3-20
|
||||
- changed name
|
||||
|
||||
111
|
||||
- update to Tvheadend 4.2.2-75
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://LibreELEC.tv
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
@@ -17,9 +17,9 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="tvheadend42"
|
||||
PKG_VERSION="a84adb2"
|
||||
PKG_VERSION_NUMBER="4.2.2-75"
|
||||
PKG_REV="111"
|
||||
PKG_VERSION="407c8a3"
|
||||
PKG_VERSION_NUMBER="4.2.3-20"
|
||||
PKG_REV="112"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.tvheadend.org"
|
||||
@@ -32,7 +32,7 @@ PKG_LONGDESC="Tvheadend ($PKG_VERSION_NUMBER): is a TV streaming server for Linu
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Tvheadend 4.2"
|
||||
PKG_ADDON_NAME="Tvheadend Server 4.2"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
|
||||
# transcoding only for generic
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
108
|
||||
- Update to 5.4.0.201
|
||||
|
||||
107
|
||||
- Update to 5.2.0.224
|
||||
|
||||
106
|
||||
- Update to 5.2.0.215
|
||||
|
||||
105
|
||||
- Update to 5.0.1.1
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="mono"
|
||||
PKG_VERSION="5.0.1.1"
|
||||
PKG_REV="105"
|
||||
PKG_VERSION="5.4.0.201"
|
||||
PKG_REV="108"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="http://www.mono-project.com"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="bcm2835-driver"
|
||||
PKG_VERSION="b2420fc"
|
||||
PKG_VERSION="93aae13"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
PKG_SITE="http://www.broadcom.com"
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
|
||||
|
||||
From 905d1b30ac7cb0e31c57cec0533825c8f170b942 Mon Sep 17 00:00:00 2001
|
||||
From: Victor Stinner <victor.stinner@gmail.com>
|
||||
Date: Mon, 9 Jan 2017 11:10:41 +0100
|
||||
Subject: [PATCH] Don't use getentropy() on Linux
|
||||
|
||||
Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but
|
||||
read from /dev/urandom to get random bytes, for example in os.urandom(). On
|
||||
Linux, getentropy() is implemented which getrandom() is blocking mode, whereas
|
||||
os.urandom() should not block.
|
||||
|
||||
(cherry picked from commit 2687486756721e39164fa9f597e468c35d495227)
|
||||
---
|
||||
Python/random.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Python/random.c b/Python/random.c
|
||||
index b4bc1f3..f3f5d14 100644
|
||||
--- a/Python/random.c
|
||||
+++ b/Python/random.c
|
||||
@@ -94,8 +94,15 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
|
||||
}
|
||||
|
||||
/* Issue #25003: Don't use getentropy() on Solaris (available since
|
||||
- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
|
||||
-#elif defined(HAVE_GETENTROPY) && !defined(sun)
|
||||
+ Solaris 11.3), it is blocking whereas os.urandom() should not block.
|
||||
+
|
||||
+ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24
|
||||
+ implements it with the getrandom() syscall which can fail with ENOSYS,
|
||||
+ and this error is not supported in py_getentropy() and getrandom() is called
|
||||
+ with flags=0 which blocks until system urandom is initialized, which is not
|
||||
+ the desired behaviour to seed the Python hash secret nor for os.urandom():
|
||||
+ see the PEP 524 which was only implemented in Python 3.6. */
|
||||
+#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
|
||||
#define PY_GETENTROPY 1
|
||||
|
||||
/* Fill buffer with size pseudo-random bytes generated by getentropy().
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="RTL8188EU"
|
||||
PKG_VERSION="18a5f33"
|
||||
PKG_VERSION="c5113ff"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
# realtek: PKG_SITE="http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=274&DownTypeID=3&GetDown=false&Downloads=true"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="RTL8192EU"
|
||||
PKG_VERSION="c23c613"
|
||||
PKG_VERSION="192bad4"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/Mange/rtl8192eu-linux-driver"
|
||||
|
||||
@@ -20,8 +20,8 @@ PKG_NAME="brcmap6xxx-aml"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://openlinux.amlogic.com:8000/download/ARM/wifi/"
|
||||
PKG_VERSION="1.201.59.5-b82e63f"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_VERSION="de3f5c5"
|
||||
PKG_URL="https://github.com/openwetek/brcmap6xxx-aml/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain linux wlan-firmware-aml"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
|
||||
@@ -491,6 +491,7 @@ CONFIG_VIDEO_SAA6752HS=m
|
||||
#
|
||||
CONFIG_MEDIA_TUNER=m
|
||||
CONFIG_MEDIA_TUNER_SIMPLE=m
|
||||
CONFIG_MEDIA_TUNER_TDA18250=m
|
||||
CONFIG_MEDIA_TUNER_TDA8290=m
|
||||
CONFIG_MEDIA_TUNER_TDA827X=m
|
||||
CONFIG_MEDIA_TUNER_TDA18271=m
|
||||
@@ -594,6 +595,7 @@ CONFIG_DVB_TDA10048=m
|
||||
CONFIG_DVB_AF9013=m
|
||||
CONFIG_DVB_EC100=m
|
||||
CONFIG_DVB_STV0367=m
|
||||
CONFIG_DVB_STV0367=m
|
||||
CONFIG_DVB_CXD2820R=m
|
||||
CONFIG_DVB_RTL2830=m
|
||||
CONFIG_DVB_RTL2832=m
|
||||
|
||||
@@ -413,6 +413,7 @@ CONFIG_VIDEO_MT9V011=m
|
||||
#
|
||||
CONFIG_MEDIA_TUNER=m
|
||||
CONFIG_MEDIA_TUNER_SIMPLE=m
|
||||
CONFIG_MEDIA_TUNER_TDA18250=m
|
||||
CONFIG_MEDIA_TUNER_TDA8290=m
|
||||
CONFIG_MEDIA_TUNER_TDA827X=m
|
||||
CONFIG_MEDIA_TUNER_TDA18271=m
|
||||
@@ -504,6 +505,7 @@ CONFIG_DVB_DIB7000P=m
|
||||
CONFIG_DVB_TDA10048=m
|
||||
CONFIG_DVB_AF9013=m
|
||||
CONFIG_DVB_EC100=m
|
||||
CONFIG_DVB_STV0367=m
|
||||
CONFIG_DVB_CXD2820R=m
|
||||
CONFIG_DVB_RTL2830=m
|
||||
CONFIG_DVB_RTL2832=m
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
+add linux-062-imon_pad_ignore_diagonal.patch
|
||||
+add linux-202-lnbp22_patch_for_more_power_if_rotor.patch
|
||||
+add linux-203-stb0899_enable_low_symbol_rate.patch
|
||||
+add linux-220-Xbox-One-DVB-T2-stick-support.patch
|
||||
+add linux-260-fix-for-kernel-4.11.patch
|
||||
+add linux-261-fix-for-kernel-4.11-dibusb-license.patch
|
||||
+add linux-262-fix-for-kernel-4.11-hauppauge_dualhd_second_tuner_support.patch
|
||||
+add linux-263-fix-for-kernel-4.11-tbs5580-support.patch
|
||||
+add linux-264-fix-for-kernel-4.11-lirc-fixes.patch
|
||||
+add linux-265-fix-for-kernel-4.11-cinergy-s2-dual-support.patch
|
||||
|
||||
@@ -1,587 +0,0 @@
|
||||
From: Brad Love <hidden@email.co>
|
||||
Date: Sun, 16 Apr 2017 00:13:39 -0500
|
||||
Subject: Hauppauge DualHD DVB/ATSC second tuner support
|
||||
https://github.com/b-rad-NDi/Ubuntu-media-tree-kernel-builder/tree/master/patches/ubuntu-zesty-4.10.0/extra
|
||||
|
||||
diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c
|
||||
index c9b1eb3..c50769f 100644
|
||||
--- a/drivers/media/dvb-frontends/lgdt3306a.c
|
||||
+++ b/drivers/media/dvb-frontends/lgdt3306a.c
|
||||
@@ -624,6 +624,9 @@ static int lgdt3306a_set_modulation(struct lgdt3306a_state *state,
|
||||
case QAM_256:
|
||||
ret = lgdt3306a_set_qam(state, QAM_256);
|
||||
break;
|
||||
+ case QAM_AUTO:
|
||||
+ ret = lgdt3306a_set_qam(state, QAM_64);
|
||||
+ break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -649,6 +652,7 @@ static int lgdt3306a_agc_setup(struct lgdt3306a_state *state,
|
||||
break;
|
||||
case QAM_64:
|
||||
case QAM_256:
|
||||
+ case QAM_AUTO:
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
@@ -703,6 +707,7 @@ static int lgdt3306a_spectral_inversion(struct lgdt3306a_state *state,
|
||||
break;
|
||||
case QAM_64:
|
||||
case QAM_256:
|
||||
+ case QAM_AUTO:
|
||||
/* Auto ok for QAM */
|
||||
ret = lgdt3306a_set_inversion_auto(state, 1);
|
||||
break;
|
||||
@@ -726,6 +731,7 @@ static int lgdt3306a_set_if(struct lgdt3306a_state *state,
|
||||
break;
|
||||
case QAM_64:
|
||||
case QAM_256:
|
||||
+ case QAM_AUTO:
|
||||
if_freq_khz = state->cfg->qam_if_khz;
|
||||
break;
|
||||
default:
|
||||
@@ -1644,6 +1650,9 @@ static int lgdt3306a_read_signal_strength(struct dvb_frontend *fe,
|
||||
case QAM_256:
|
||||
ref_snr = 2800; /* 28dB */
|
||||
break;
|
||||
+ case QAM_AUTO:
|
||||
+ ref_snr = 2200; /* 22dB */
|
||||
+ break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
|
||||
index 146341a..d2e5b8d 100644
|
||||
--- a/drivers/media/usb/em28xx/em28xx-cards.c
|
||||
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
|
||||
@@ -508,8 +508,10 @@ static struct em28xx_reg_seq plex_px_bcud[] = {
|
||||
};
|
||||
|
||||
/*
|
||||
- * 2040:0265 Hauppauge WinTV-dualHD DVB
|
||||
- * 2040:026d Hauppauge WinTV-dualHD ATSC/QAM
|
||||
+ * 2040:0265 Hauppauge WinTV-dualHD DVB ISOC
|
||||
+ * 2040:8265 Hauppauge WinTV-dualHD DVB Bulk
|
||||
+ * 2040:026d Hauppauge WinTV-dualHD ATSC/QAM ISOC
|
||||
+ * 2040:826d Hauppauge WinTV-dualHD ATSC/QAM Bulk
|
||||
* reg 0x80/0x84:
|
||||
* GPIO_0: Yellow LED tuner 1, 0=on, 1=off
|
||||
* GPIO_1: Green LED tuner 1, 0=on, 1=off
|
||||
@@ -2376,7 +2378,8 @@ struct em28xx_board em28xx_boards[] = {
|
||||
.has_dvb = 1,
|
||||
},
|
||||
/*
|
||||
- * 2040:0265 Hauppauge WinTV-dualHD (DVB version).
|
||||
+ * 2040:0265 Hauppauge WinTV-dualHD (DVB version) ISOC.
|
||||
+ * 2040:8265 Hauppauge WinTV-dualHD (DVB version) BULK.
|
||||
* Empia EM28274, 2x Silicon Labs Si2168, 2x Silicon Labs Si2157
|
||||
*/
|
||||
[EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB] = {
|
||||
@@ -2387,11 +2390,13 @@ struct em28xx_board em28xx_boards[] = {
|
||||
.tuner_type = TUNER_ABSENT,
|
||||
.tuner_gpio = hauppauge_dualhd_dvb,
|
||||
.has_dvb = 1,
|
||||
+ .has_dual_ts = 1,
|
||||
.ir_codes = RC_MAP_HAUPPAUGE,
|
||||
.leds = hauppauge_dualhd_leds,
|
||||
},
|
||||
/*
|
||||
- * 2040:026d Hauppauge WinTV-dualHD (model 01595 - ATSC/QAM).
|
||||
+ * 2040:026d Hauppauge WinTV-dualHD (model 01595 - ATSC/QAM) ISOC.
|
||||
+ * 2040:826d Hauppauge WinTV-dualHD (model 01595 - ATSC/QAM) BULK.
|
||||
* Empia EM28274, 2x LG LGDT3306A, 2x Silicon Labs Si2157
|
||||
*/
|
||||
[EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595] = {
|
||||
@@ -2402,6 +2407,7 @@ struct em28xx_board em28xx_boards[] = {
|
||||
.tuner_type = TUNER_ABSENT,
|
||||
.tuner_gpio = hauppauge_dualhd_dvb,
|
||||
.has_dvb = 1,
|
||||
+ .has_dual_ts = 1,
|
||||
.ir_codes = RC_MAP_HAUPPAUGE,
|
||||
.leds = hauppauge_dualhd_leds,
|
||||
},
|
||||
@@ -2530,8 +2536,12 @@ struct usb_device_id em28xx_id_table[] = {
|
||||
.driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 },
|
||||
{ USB_DEVICE(0x2040, 0x0265),
|
||||
.driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB },
|
||||
+ { USB_DEVICE(0x2040, 0x8265),
|
||||
+ .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB },
|
||||
{ USB_DEVICE(0x2040, 0x026d),
|
||||
.driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 },
|
||||
+ { USB_DEVICE(0x2040, 0x826d),
|
||||
+ .driver_info = EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 },
|
||||
{ USB_DEVICE(0x0438, 0xb002),
|
||||
.driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 },
|
||||
{ USB_DEVICE(0x2001, 0xf112),
|
||||
@@ -3222,7 +3232,8 @@ static void em28xx_release_resources(struct em28xx *dev)
|
||||
em28xx_i2c_unregister(dev, 1);
|
||||
em28xx_i2c_unregister(dev, 0);
|
||||
|
||||
- usb_put_dev(udev);
|
||||
+ if(dev->ts == PRIMARY_TS)
|
||||
+ usb_put_dev(udev);
|
||||
|
||||
/* Mark device as unused */
|
||||
clear_bit(dev->devno, em28xx_devused);
|
||||
@@ -3415,6 +3426,34 @@ static int em28xx_init_dev(struct em28xx *dev, struct usb_device *udev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+int em28xx_duplicate_dev(struct em28xx *dev)
|
||||
+{
|
||||
+ int nr;
|
||||
+ struct em28xx *sec_dev = kzalloc(sizeof(*sec_dev), GFP_KERNEL);
|
||||
+ if (sec_dev == NULL) {
|
||||
+ dev->dev_next = NULL;
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+ memcpy(sec_dev, dev, sizeof(sizeof(*sec_dev)));
|
||||
+ /* Check to see next free device and mark as used */
|
||||
+ do {
|
||||
+ nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
|
||||
+ if (nr >= EM28XX_MAXBOARDS) {
|
||||
+ /* No free device slots */
|
||||
+ printk(DRIVER_NAME ": Supports only %i em28xx boards.\n",
|
||||
+ EM28XX_MAXBOARDS);
|
||||
+ kfree(sec_dev);
|
||||
+ dev->dev_next = NULL;
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+ } while (test_and_set_bit(nr, em28xx_devused));
|
||||
+ sec_dev->devno = nr;
|
||||
+ snprintf(sec_dev->name, 28, "em28xx #%d", nr);
|
||||
+ sec_dev->dev_next = NULL;
|
||||
+ dev->dev_next = sec_dev;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */
|
||||
#define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03))
|
||||
|
||||
@@ -3428,7 +3467,8 @@ static int em28xx_usb_probe(struct usb_interface *interface,
|
||||
struct usb_device *udev;
|
||||
struct em28xx *dev = NULL;
|
||||
int retval;
|
||||
- bool has_vendor_audio = false, has_video = false, has_dvb = false;
|
||||
+ bool has_vendor_audio = false, has_video = false;
|
||||
+ bool has_dvb = false, has_dvb_ts2 = false;
|
||||
int i, nr, try_bulk;
|
||||
const int ifnum = interface->altsetting[0].desc.bInterfaceNumber;
|
||||
char *speed;
|
||||
@@ -3534,6 +3574,19 @@ static int em28xx_usb_probe(struct usb_interface *interface,
|
||||
}
|
||||
}
|
||||
break;
|
||||
+ case 0x85:
|
||||
+ if (usb_endpoint_xfer_isoc(e)) {
|
||||
+ if (size > dev->dvb_max_pkt_size_isoc_ts2) {
|
||||
+ has_dvb_ts2 = true; /* see NOTE (~) */
|
||||
+ dev->dvb_ep_isoc_ts2 = e->bEndpointAddress;
|
||||
+ dev->dvb_max_pkt_size_isoc_ts2 = size;
|
||||
+ dev->dvb_alt_isoc = i;
|
||||
+ }
|
||||
+ } else {
|
||||
+ has_dvb_ts2 = true;
|
||||
+ dev->dvb_ep_bulk_ts2 = e->bEndpointAddress;
|
||||
+ }
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
/* NOTE:
|
||||
@@ -3615,6 +3668,10 @@ static int em28xx_usb_probe(struct usb_interface *interface,
|
||||
dev->has_video = has_video;
|
||||
dev->ifnum = ifnum;
|
||||
|
||||
+ dev->ts = PRIMARY_TS;
|
||||
+ snprintf(dev->name, 28, "em28xx");
|
||||
+ dev->dev_next = NULL;
|
||||
+
|
||||
if (has_vendor_audio) {
|
||||
dev_err(&interface->dev,
|
||||
"Audio interface %i found (Vendor Class)\n", ifnum);
|
||||
@@ -3694,6 +3751,61 @@ static int em28xx_usb_probe(struct usb_interface *interface,
|
||||
dev->dvb_xfer_bulk ? "bulk" : "isoc");
|
||||
}
|
||||
|
||||
+ if(dev->board.has_dual_ts && em28xx_duplicate_dev(dev) == 0)
|
||||
+ {
|
||||
+ dev->dev_next->ts = SECONDARY_TS;
|
||||
+ dev->dev_next->alt = -1;
|
||||
+ dev->dev_next->is_audio_only = has_vendor_audio && !(has_video || has_dvb);
|
||||
+ dev->dev_next->has_video = false;
|
||||
+ dev->dev_next->ifnum = ifnum;
|
||||
+ dev->dev_next->model = id->driver_info;
|
||||
+
|
||||
+ mutex_init(&dev->dev_next->lock);
|
||||
+ retval = em28xx_init_dev(dev->dev_next, udev, interface, dev->dev_next->devno);
|
||||
+ if (retval) {
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ if (usb_xfer_mode < 0) {
|
||||
+ if (dev->dev_next->board.is_webcam)
|
||||
+ try_bulk = 1;
|
||||
+ else
|
||||
+ try_bulk = 0;
|
||||
+ } else {
|
||||
+ try_bulk = usb_xfer_mode > 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Select USB transfer types to use */
|
||||
+ if (has_dvb) {
|
||||
+ if (!dev->dvb_ep_isoc_ts2 || (try_bulk && dev->dvb_ep_bulk_ts2))
|
||||
+ dev->dev_next->dvb_xfer_bulk = 1;
|
||||
+ dev_info(&dev->intf->dev, "dvb ts2 set to %s mode.\n",
|
||||
+ dev->dev_next->dvb_xfer_bulk ? "bulk" : "isoc");
|
||||
+ }
|
||||
+
|
||||
+ dev->dev_next->dvb_ep_isoc = dev->dvb_ep_isoc_ts2;
|
||||
+ dev->dev_next->dvb_ep_bulk = dev->dvb_ep_bulk_ts2;
|
||||
+ dev->dev_next->dvb_max_pkt_size_isoc = dev->dvb_max_pkt_size_isoc_ts2;
|
||||
+ dev->dev_next->dvb_alt_isoc = dev->dvb_alt_isoc;
|
||||
+
|
||||
+ /* Configuare hardware to support TS2*/
|
||||
+ if(dev->dvb_xfer_bulk) {
|
||||
+ /* The ep4 and ep5 are configuared for BULK */
|
||||
+ em28xx_write_reg(dev, 0x0b, 0x96);
|
||||
+ mdelay(100);
|
||||
+ em28xx_write_reg(dev, 0x0b, 0x80);
|
||||
+ mdelay(100);
|
||||
+ } else {
|
||||
+ /* The ep4 and ep5 are configuared for ISO */
|
||||
+ em28xx_write_reg(dev, 0x0b, 0x96);
|
||||
+ mdelay(100);
|
||||
+ em28xx_write_reg(dev, 0x0b, 0x82);
|
||||
+ mdelay(100);
|
||||
+ }
|
||||
+
|
||||
+ kref_init(&dev->dev_next->ref);
|
||||
+ }
|
||||
+
|
||||
kref_init(&dev->ref);
|
||||
|
||||
request_modules(dev);
|
||||
@@ -3736,15 +3848,28 @@ static void em28xx_usb_disconnect(struct usb_interface *interface)
|
||||
if (!dev)
|
||||
return;
|
||||
|
||||
+ if(dev->dev_next!=NULL) {
|
||||
+ dev->dev_next->disconnected = 1;
|
||||
+ dev_info(&dev->intf->dev, "Disconnecting %s\n", dev->dev_next->name);
|
||||
+ flush_request_modules(dev->dev_next);
|
||||
+ }
|
||||
+
|
||||
dev->disconnected = 1;
|
||||
|
||||
- dev_err(&dev->intf->dev, "Disconnecting\n");
|
||||
+ dev_err(&dev->intf->dev, "Disconnecting %s\n", dev->name);
|
||||
|
||||
flush_request_modules(dev);
|
||||
|
||||
em28xx_close_extension(dev);
|
||||
|
||||
+ if(dev->dev_next!=NULL)
|
||||
+ em28xx_release_resources(dev->dev_next);
|
||||
em28xx_release_resources(dev);
|
||||
+
|
||||
+ if(dev->dev_next!=NULL) {
|
||||
+ kref_put(&dev->dev_next->ref, em28xx_free_device);
|
||||
+ dev->dev_next = NULL;
|
||||
+ }
|
||||
kref_put(&dev->ref, em28xx_free_device);
|
||||
}
|
||||
|
||||
diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
|
||||
index 1d0d8cc..ca0ddd5 100644
|
||||
--- a/drivers/media/usb/em28xx/em28xx-core.c
|
||||
+++ b/drivers/media/usb/em28xx/em28xx-core.c
|
||||
@@ -638,10 +638,39 @@ int em28xx_capture_start(struct em28xx *dev, int start)
|
||||
dev->chip_id == CHIP_ID_EM28174 ||
|
||||
dev->chip_id == CHIP_ID_EM28178) {
|
||||
/* The Transport Stream Enable Register moved in em2874 */
|
||||
- rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE,
|
||||
- start ?
|
||||
- EM2874_TS1_CAPTURE_ENABLE : 0x00,
|
||||
- EM2874_TS1_CAPTURE_ENABLE);
|
||||
+ if(dev->dvb_xfer_bulk) {
|
||||
+ /* TS1 Maximum Transfer Size = 188 * EM28XX_DVB_BULK_PACKET_MULTIPLIER */
|
||||
+ em28xx_write_reg(dev, EM2874_R5D_TS1_PKT_SIZE, 0xef);
|
||||
+ } else {
|
||||
+ /* TS1 Maximum Transfer Size = 188 * 5 */
|
||||
+ em28xx_write_reg(dev, EM2874_R5D_TS1_PKT_SIZE, 0x05);
|
||||
+ }
|
||||
+
|
||||
+ if(dev->board.has_dual_ts) {
|
||||
+ if(start) {
|
||||
+ if(dev->dvb_xfer_bulk) {
|
||||
+ /* TS2 Maximum Transfer Size = 188 * EM28XX_DVB_BULK_PACKET_MULTIPLIER */
|
||||
+ em28xx_write_reg(dev, EM2874_R5E_TS2_PKT_SIZE, 0xef);
|
||||
+ } else {
|
||||
+ /* TS2 Maximum Transfer Size = 188 * 5 */
|
||||
+ em28xx_write_reg(dev, EM2874_R5E_TS2_PKT_SIZE, 0x05);
|
||||
+ }
|
||||
+ rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE,
|
||||
+ (EM2874_TS1_CAPTURE_ENABLE | EM2874_TS2_CAPTURE_ENABLE),
|
||||
+ (EM2874_TS1_CAPTURE_ENABLE | EM2874_TS2_CAPTURE_ENABLE));
|
||||
+ } else {
|
||||
+ if(dev->ts == PRIMARY_TS) {
|
||||
+ rc = em28xx_toggle_reg_bits(dev, EM2874_R5F_TS_ENABLE, EM2874_TS1_CAPTURE_ENABLE);
|
||||
+ } else {
|
||||
+ rc = em28xx_toggle_reg_bits(dev, EM2874_R5F_TS_ENABLE, EM2874_TS2_CAPTURE_ENABLE);
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ rc = em28xx_write_reg_bits(dev, EM2874_R5F_TS_ENABLE,
|
||||
+ start ?
|
||||
+ EM2874_TS1_CAPTURE_ENABLE : 0x00,
|
||||
+ EM2874_TS1_CAPTURE_ENABLE);
|
||||
+ }
|
||||
} else {
|
||||
/* FIXME: which is the best order? */
|
||||
/* video registers are sampled by VREF */
|
||||
@@ -1077,7 +1106,11 @@ int em28xx_register_extension(struct em28xx_ops *ops)
|
||||
mutex_lock(&em28xx_devlist_mutex);
|
||||
list_add_tail(&ops->next, &em28xx_extension_devlist);
|
||||
list_for_each_entry(dev, &em28xx_devlist, devlist) {
|
||||
- ops->init(dev);
|
||||
+ if (ops->init) {
|
||||
+ ops->init(dev);
|
||||
+ if(dev->dev_next!=NULL)
|
||||
+ ops->init(dev->dev_next);
|
||||
+ }
|
||||
}
|
||||
mutex_unlock(&em28xx_devlist_mutex);
|
||||
pr_info("em28xx: Registered (%s) extension\n", ops->name);
|
||||
@@ -1091,7 +1124,11 @@ void em28xx_unregister_extension(struct em28xx_ops *ops)
|
||||
|
||||
mutex_lock(&em28xx_devlist_mutex);
|
||||
list_for_each_entry(dev, &em28xx_devlist, devlist) {
|
||||
- ops->fini(dev);
|
||||
+ if (ops->fini) {
|
||||
+ if(dev->dev_next!=NULL)
|
||||
+ ops->fini(dev->dev_next);
|
||||
+ ops->fini(dev);
|
||||
+ }
|
||||
}
|
||||
list_del(&ops->next);
|
||||
mutex_unlock(&em28xx_devlist_mutex);
|
||||
@@ -1106,8 +1143,11 @@ void em28xx_init_extension(struct em28xx *dev)
|
||||
mutex_lock(&em28xx_devlist_mutex);
|
||||
list_add_tail(&dev->devlist, &em28xx_devlist);
|
||||
list_for_each_entry(ops, &em28xx_extension_devlist, next) {
|
||||
- if (ops->init)
|
||||
+ if (ops->init) {
|
||||
ops->init(dev);
|
||||
+ if(dev->dev_next!=NULL)
|
||||
+ ops->init(dev->dev_next);
|
||||
+ }
|
||||
}
|
||||
mutex_unlock(&em28xx_devlist_mutex);
|
||||
}
|
||||
@@ -1118,8 +1158,11 @@ void em28xx_close_extension(struct em28xx *dev)
|
||||
|
||||
mutex_lock(&em28xx_devlist_mutex);
|
||||
list_for_each_entry(ops, &em28xx_extension_devlist, next) {
|
||||
- if (ops->fini)
|
||||
+ if (ops->fini) {
|
||||
+ if(dev->dev_next!=NULL)
|
||||
+ ops->fini(dev->dev_next);
|
||||
ops->fini(dev);
|
||||
+ }
|
||||
}
|
||||
list_del(&dev->devlist);
|
||||
mutex_unlock(&em28xx_devlist_mutex);
|
||||
@@ -1134,6 +1177,8 @@ int em28xx_suspend_extension(struct em28xx *dev)
|
||||
list_for_each_entry(ops, &em28xx_extension_devlist, next) {
|
||||
if (ops->suspend)
|
||||
ops->suspend(dev);
|
||||
+ if(dev->dev_next!=NULL)
|
||||
+ ops->suspend(dev->dev_next);
|
||||
}
|
||||
mutex_unlock(&em28xx_devlist_mutex);
|
||||
return 0;
|
||||
@@ -1148,6 +1193,8 @@ int em28xx_resume_extension(struct em28xx *dev)
|
||||
list_for_each_entry(ops, &em28xx_extension_devlist, next) {
|
||||
if (ops->resume)
|
||||
ops->resume(dev);
|
||||
+ if(dev->dev_next!=NULL)
|
||||
+ ops->resume(dev->dev_next);
|
||||
}
|
||||
mutex_unlock(&em28xx_devlist_mutex);
|
||||
return 0;
|
||||
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
|
||||
index 82edd37..e10b1ac 100644
|
||||
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
|
||||
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
|
||||
@@ -199,13 +199,13 @@ static int em28xx_start_streaming(struct em28xx_dvb *dvb)
|
||||
int rc;
|
||||
struct em28xx_i2c_bus *i2c_bus = dvb->adapter.priv;
|
||||
struct em28xx *dev = i2c_bus->dev;
|
||||
- struct usb_device *udev = interface_to_usbdev(dev->intf);
|
||||
+// struct usb_device *udev = interface_to_usbdev(dev->intf);
|
||||
int dvb_max_packet_size, packet_multiplier, dvb_alt;
|
||||
|
||||
if (dev->dvb_xfer_bulk) {
|
||||
if (!dev->dvb_ep_bulk)
|
||||
return -ENODEV;
|
||||
- dvb_max_packet_size = 512; /* USB 2.0 spec */
|
||||
+ dvb_max_packet_size = 188;
|
||||
packet_multiplier = EM28XX_DVB_BULK_PACKET_MULTIPLIER;
|
||||
dvb_alt = 0;
|
||||
} else { /* isoc */
|
||||
@@ -218,7 +218,8 @@ static int em28xx_start_streaming(struct em28xx_dvb *dvb)
|
||||
dvb_alt = dev->dvb_alt_isoc;
|
||||
}
|
||||
|
||||
- usb_set_interface(udev, dev->ifnum, dvb_alt);
|
||||
+ /* moved to em28xx_dvb_init*/
|
||||
+ //usb_set_interface(udev, dev->ifnum, dvb_alt);
|
||||
rc = em28xx_set_mode(dev, EM28XX_DIGITAL_MODE);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
@@ -1128,8 +1129,9 @@ static void em28xx_unregister_dvb(struct em28xx_dvb *dvb)
|
||||
|
||||
static int em28xx_dvb_init(struct em28xx *dev)
|
||||
{
|
||||
- int result = 0;
|
||||
+ int result = 0, dvb_alt = 0;
|
||||
struct em28xx_dvb *dvb;
|
||||
+ struct usb_device *udev;
|
||||
|
||||
if (dev->is_audio_only) {
|
||||
/* Shouldn't initialize IR for this interface */
|
||||
@@ -1155,7 +1157,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
|
||||
result = em28xx_alloc_urbs(dev, EM28XX_DIGITAL_MODE,
|
||||
dev->dvb_xfer_bulk,
|
||||
EM28XX_DVB_NUM_BUFS,
|
||||
- 512,
|
||||
+ 188,
|
||||
EM28XX_DVB_BULK_PACKET_MULTIPLIER);
|
||||
} else {
|
||||
result = em28xx_alloc_urbs(dev, EM28XX_DIGITAL_MODE,
|
||||
@@ -1913,7 +1915,8 @@ static int em28xx_dvb_init(struct em28xx *dev)
|
||||
si2168_config.ts_mode = SI2168_TS_SERIAL;
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
- info.addr = 0x64;
|
||||
+ if(dev->ts == PRIMARY_TS) info.addr = 0x64;
|
||||
+ else info.addr = 0x67;
|
||||
info.platform_data = &si2168_config;
|
||||
request_module(info.type);
|
||||
client = i2c_new_device(&dev->i2c_adap[dev->def_i2c_bus], &info);
|
||||
@@ -1939,7 +1942,8 @@ static int em28xx_dvb_init(struct em28xx *dev)
|
||||
#endif
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
- info.addr = 0x60;
|
||||
+ if(dev->ts == PRIMARY_TS) info.addr = 0x60;
|
||||
+ else info.addr = 0x63;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
client = i2c_new_device(adapter, &info);
|
||||
@@ -1975,7 +1979,8 @@ static int em28xx_dvb_init(struct em28xx *dev)
|
||||
lgdt3306a_config.fe = &dvb->fe[0];
|
||||
lgdt3306a_config.i2c_adapter = &adapter;
|
||||
strlcpy(info.type, "lgdt3306a", sizeof(info.type));
|
||||
- info.addr = 0x59;
|
||||
+ if(dev->ts == PRIMARY_TS) info.addr = 0x59;
|
||||
+ else info.addr = 0x0e;
|
||||
info.platform_data = &lgdt3306a_config;
|
||||
request_module(info.type);
|
||||
client = i2c_new_device(&dev->i2c_adap[dev->def_i2c_bus],
|
||||
@@ -2002,7 +2007,8 @@ static int em28xx_dvb_init(struct em28xx *dev)
|
||||
#endif
|
||||
memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
strlcpy(info.type, "si2157", sizeof(info.type));
|
||||
- info.addr = 0x60;
|
||||
+ if(dev->ts == PRIMARY_TS) info.addr = 0x60;
|
||||
+ else info.addr = 0x62;
|
||||
info.platform_data = &si2157_config;
|
||||
request_module(info.type);
|
||||
|
||||
@@ -2045,6 +2051,14 @@ static int em28xx_dvb_init(struct em28xx *dev)
|
||||
if (result < 0)
|
||||
goto out_free;
|
||||
|
||||
+ if (dev->dvb_xfer_bulk) {
|
||||
+ dvb_alt = 0;
|
||||
+ } else { /* isoc */
|
||||
+ dvb_alt = dev->dvb_alt_isoc;
|
||||
+ }
|
||||
+
|
||||
+ udev = interface_to_usbdev(dev->intf);
|
||||
+ usb_set_interface(udev, dev->ifnum, dvb_alt);
|
||||
dev_info(&dev->intf->dev, "DVB extension successfully initialized\n");
|
||||
|
||||
kref_get(&dev->ref);
|
||||
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
|
||||
index e8d97d5..132638e 100644
|
||||
--- a/drivers/media/usb/em28xx/em28xx.h
|
||||
+++ b/drivers/media/usb/em28xx/em28xx.h
|
||||
@@ -190,7 +190,7 @@
|
||||
USB 2.0 spec says bulk packet size is always 512 bytes
|
||||
*/
|
||||
#define EM28XX_BULK_PACKET_MULTIPLIER 384
|
||||
-#define EM28XX_DVB_BULK_PACKET_MULTIPLIER 384
|
||||
+#define EM28XX_DVB_BULK_PACKET_MULTIPLIER 240
|
||||
|
||||
#define EM28XX_INTERLACED_DEFAULT 1
|
||||
|
||||
@@ -216,6 +216,9 @@
|
||||
/* max. number of button state polling addresses */
|
||||
#define EM28XX_NUM_BUTTON_ADDRESSES_MAX 5
|
||||
|
||||
+#define PRIMARY_TS 0
|
||||
+#define SECONDARY_TS 1
|
||||
+
|
||||
enum em28xx_mode {
|
||||
EM28XX_SUSPEND,
|
||||
EM28XX_ANALOG_MODE,
|
||||
@@ -456,6 +459,7 @@ struct em28xx_board {
|
||||
unsigned int mts_firmware:1;
|
||||
unsigned int max_range_640_480:1;
|
||||
unsigned int has_dvb:1;
|
||||
+ unsigned int has_dual_ts:1;
|
||||
unsigned int is_webcam:1;
|
||||
unsigned int valid:1;
|
||||
unsigned int has_ir_i2c:1;
|
||||
@@ -620,6 +624,7 @@ struct em28xx {
|
||||
unsigned int is_audio_only:1;
|
||||
enum em28xx_int_audio_type int_audio_type;
|
||||
enum em28xx_usb_audio_type usb_audio_type;
|
||||
+ unsigned char name[32];
|
||||
|
||||
struct em28xx_board board;
|
||||
|
||||
@@ -681,6 +686,8 @@ struct em28xx {
|
||||
u8 ifnum; /* number of the assigned usb interface */
|
||||
u8 analog_ep_isoc; /* address of isoc endpoint for analog */
|
||||
u8 analog_ep_bulk; /* address of bulk endpoint for analog */
|
||||
+ u8 dvb_ep_isoc_ts2; /* address of isoc endpoint for DVB TS2*/
|
||||
+ u8 dvb_ep_bulk_ts2; /* address of bulk endpoint for DVB TS2*/
|
||||
u8 dvb_ep_isoc; /* address of isoc endpoint for DVB */
|
||||
u8 dvb_ep_bulk; /* address of bulk endpoint for DVB */
|
||||
int alt; /* alternate setting */
|
||||
@@ -694,6 +701,8 @@ struct em28xx {
|
||||
int dvb_alt_isoc; /* alternate setting for DVB isoc transfers */
|
||||
unsigned int dvb_max_pkt_size_isoc; /* isoc max packet size of the
|
||||
selected DVB ep at dvb_alt */
|
||||
+ unsigned int dvb_max_pkt_size_isoc_ts2; /* isoc max packet size of the
|
||||
+ selected DVB ep at dvb_alt */
|
||||
unsigned int dvb_xfer_bulk:1; /* use bulk instead of isoc
|
||||
transfers for DVB */
|
||||
char urb_buf[URB_MAX_CTRL_SIZE]; /* urb control msg buffer */
|
||||
@@ -725,6 +734,9 @@ struct em28xx {
|
||||
struct media_entity input_ent[MAX_EM28XX_INPUT];
|
||||
struct media_pad input_pad[MAX_EM28XX_INPUT];
|
||||
#endif
|
||||
+
|
||||
+ struct em28xx *dev_next;
|
||||
+ int ts;
|
||||
};
|
||||
|
||||
#define kref_to_dev(d) container_of(d, struct em28xx, ref)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
45
packages/linux-drivers/slice-drivers/package.mk
Normal file
@@ -0,0 +1,45 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="slice-drivers"
|
||||
PKG_VERSION="d02f3e7"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/LibreELEC/slice-drivers"
|
||||
PKG_URL="https://github.com/LibreELEC/slice-drivers/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain linux"
|
||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="linux kernel modules for the Slice box"
|
||||
PKG_LONGDESC="linux kernel modules for the Slice box"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
pre_make_target() {
|
||||
unset LDFLAGS
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make KDIR=$(kernel_path)
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME
|
||||
cp *.ko $INSTALL/usr/lib/modules/$(get_module_dir)/$PKG_NAME
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="brcmfmac_sdio-firmware-rpi"
|
||||
PKG_VERSION="0.1"
|
||||
PKG_VERSION="0.2"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/LibreELEC/LibreELEC.tv"
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
HCIATTACH=/usr/bin/hciattach
|
||||
SERIAL=$(awk '/^Serial/{ print $3 }' /proc/cpuinfo)
|
||||
B1=${SERIAL:10:2}
|
||||
B2=${SERIAL:12:2}
|
||||
B3=${SERIAL:14:2}
|
||||
BDADDR=$(printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa)))
|
||||
|
||||
if [ "$(cat /proc/device-tree/aliases/uart0)" = "$(cat /proc/device-tree/aliases/serial1)" ] ; then
|
||||
if [ "$(wc -c /proc/device-tree/soc/gpio@7e200000/uart0_pins/brcm\,pins | cut -f 1 -d ' ')" = "16" ] ; then
|
||||
/usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow -
|
||||
$HCIATTACH /dev/serial1 bcm43xx 3000000 flow - $BDADDR
|
||||
else
|
||||
/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -
|
||||
$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
|
||||
fi
|
||||
else
|
||||
/usr/bin/hciattach /dev/serial1 bcm43xx 460800 noflow -
|
||||
$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR
|
||||
fi
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# LibreELEC 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,
|
||||
# LibreELEC 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/>.
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="dvb-firmware"
|
||||
PKG_VERSION="1.2.1"
|
||||
PKG_VERSION="1.2.2"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="Free-to-use"
|
||||
PKG_SITE="https://github.com/LibreELEC/dvb-firmware"
|
||||
@@ -26,8 +27,6 @@ PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="firmware"
|
||||
PKG_SHORTDESC="dvb-firmware: firmwares for various DVB drivers"
|
||||
PKG_LONGDESC="dvb-firmware: firmwares for various DVB drivers"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
make_target() {
|
||||
|
||||
@@ -67,4 +67,7 @@ makeinstall_target() {
|
||||
done
|
||||
done < ${fwlist}
|
||||
done
|
||||
|
||||
# The following file is installed by brcmfmac_sdio-firmware-rpi
|
||||
rm -fr $FW_TARGET_DIR/brcm/brcmfmac43430-sdio.bin
|
||||
}
|
||||
|
||||
44
packages/linux-firmware/slice-firmware/package.mk
Normal file
@@ -0,0 +1,44 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2016-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC 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.
|
||||
#
|
||||
# LibreELEC 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 LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="slice-firmware"
|
||||
PKG_VERSION="0f463cc"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/FiveNinjas/slice-firmware"
|
||||
PKG_URL="https://github.com/libreelec/slice-firmware/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain dtc"
|
||||
PKG_SECTION="linux-firmware"
|
||||
PKG_SHORTDESC="BCM270x firmware related stuff for Slice"
|
||||
PKG_LONGDESC="BCM270x firmware related stuff for Slice"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
make_target() {
|
||||
if [ "$PROJECT" = "Slice3" ]; then
|
||||
$(kernel_path)/scripts/dtc/dtc -O dtb -I dts -o dt-blob.bin slice3-dt-blob.dts
|
||||
elif [ "$PROJECT" = "Slice" ]; then
|
||||
$(kernel_path)/scripts/dtc/dtc -O dtb -I dts -o dt-blob.bin slice-dt-blob.dts
|
||||
fi
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL/usr/share/bootloader/
|
||||
cp -a $PKG_BUILD/dt-blob.bin $INSTALL/usr/share/bootloader/
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="wlan-firmware"
|
||||
PKG_VERSION="25d0c93"
|
||||
PKG_VERSION="34a47d9"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="Free-to-use"
|
||||
PKG_SITE="https://github.com/LibreELEC/wlan-firmware"
|
||||
|
||||
@@ -35,7 +35,7 @@ case "$LINUX" in
|
||||
PKG_PATCH_DIRS="amlogic-3.10"
|
||||
;;
|
||||
amlogic-3.14)
|
||||
PKG_VERSION="f6f2e4c"
|
||||
PKG_VERSION="c8c32b4"
|
||||
PKG_URL="https://github.com/LibreELEC/linux-amlogic/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="$PKG_NAME-amlogic-$PKG_VERSION*"
|
||||
PKG_PATCH_DIRS="amlogic-3.14"
|
||||
@@ -59,7 +59,7 @@ case "$LINUX" in
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET imx6-status-led imx6-soc-fan irqbalanced"
|
||||
;;
|
||||
default-rpi)
|
||||
PKG_VERSION="4.9.41"
|
||||
PKG_VERSION="4.9.59"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v4.x/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_PATCH_DIRS="default-rpi"
|
||||
;;
|
||||
@@ -135,6 +135,16 @@ post_patch() {
|
||||
sed -i -e "s|^CONFIG_ISCSI_IBFT_FIND=.*$|# CONFIG_ISCSI_IBFT_FIND is not set|" $PKG_BUILD/.config
|
||||
sed -i -e "s|^CONFIG_ISCSI_IBFT=.*$|# CONFIG_ISCSI_IBFT is not set|" $PKG_BUILD/.config
|
||||
fi
|
||||
|
||||
# install extra dts files
|
||||
for f in $PROJECT_DIR/$PROJECT/config/*-overlay.dts; do
|
||||
[ -f "$f" ] && cp -v $f $PKG_BUILD/arch/$TARGET_KERNEL_ARCH/boot/dts/overlays || true
|
||||
done
|
||||
if [ -n "$DEVICE" ]; then
|
||||
for f in $PROJECT_DIR/$PROJECT/devices/$DEVICE/config/*-overlay.dts; do
|
||||
[ -f "$f" ] && cp -v $f $PKG_BUILD/arch/$TARGET_KERNEL_ARCH/boot/dts/overlays || true
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
makeinstall_host() {
|
||||
|
||||
@@ -1,7 +1,37 @@
|
||||
diff -Naur linux-3.19/drivers/hid/hid-core.c linux-3.19.patch/drivers/hid/hid-core.c
|
||||
--- linux-3.19/drivers/hid/hid-core.c 2015-02-09 03:54:22.000000000 +0100
|
||||
+++ linux-3.19.patch/drivers/hid/hid-core.c 2015-02-11 00:06:14.966131308 +0100
|
||||
@@ -1886,6 +1886,10 @@
|
||||
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
|
||||
index cd4599c..86b22f7 100644
|
||||
--- a/drivers/hid/Kconfig
|
||||
+++ b/drivers/hid/Kconfig
|
||||
@@ -768,6 +768,12 @@ config HID_STEELSERIES
|
||||
---help---
|
||||
Support for Steelseries SRW-S1 steering wheel
|
||||
|
||||
+config HID_SPINELPLUS
|
||||
+ tristate "Spinel Plus remote control"
|
||||
+ depends on USB_HID
|
||||
+ ---help---
|
||||
+ Say Y here if you have a Spinel Plus (0471:206c/20cc/0613/2168) remote
|
||||
+
|
||||
config HID_SUNPLUS
|
||||
tristate "Sunplus wireless desktop"
|
||||
depends on HID
|
||||
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile
|
||||
index 86b2b57..89dbf38 100644
|
||||
--- a/drivers/hid/Makefile
|
||||
+++ b/drivers/hid/Makefile
|
||||
@@ -88,6 +88,7 @@ obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o
|
||||
obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o
|
||||
obj-$(CONFIG_HID_SONY) += hid-sony.o
|
||||
obj-$(CONFIG_HID_SPEEDLINK) += hid-speedlink.o
|
||||
+obj-$(CONFIG_HID_SPINELPLUS) += hid-spinelplus.o
|
||||
obj-$(CONFIG_HID_STEELSERIES) += hid-steelseries.o
|
||||
obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o
|
||||
obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index 2b89c70..c83cfdc 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -2014,6 +2014,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PENMOUNT, USB_DEVICE_ID_PENMOUNT_6000) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
|
||||
@@ -11,25 +41,28 @@ diff -Naur linux-3.19/drivers/hid/hid-core.c linux-3.19.patch/drivers/hid/hid-co
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
|
||||
#if IS_ENABLED(CONFIG_HID_ROCCAT)
|
||||
diff -Naur linux-3.19/drivers/hid/hid-ids.h linux-3.19.patch/drivers/hid/hid-ids.h
|
||||
--- linux-3.19/drivers/hid/hid-ids.h 2015-02-09 03:54:22.000000000 +0100
|
||||
+++ linux-3.19.patch/drivers/hid/hid-ids.h 2015-02-11 00:04:45.885977057 +0100
|
||||
@@ -743,6 +743,10 @@
|
||||
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_RISO_KAGAKU, USB_DEVICE_ID_RI_KA_WEBMAIL) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 9845189..e016cd1 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -813,6 +813,10 @@
|
||||
|
||||
#define USB_VENDOR_ID_PHILIPS 0x0471
|
||||
#define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1 0x206c
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2 0x20cc
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3 0x0613
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_4 0x2168
|
||||
|
||||
|
||||
#define USB_VENDOR_ID_PI_ENGINEERING 0x05f3
|
||||
#define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL 0xff
|
||||
diff -Naur linux-3.19/drivers/hid/hid-spinelplus.c linux-3.19.patch/drivers/hid/hid-spinelplus.c
|
||||
--- linux-3.19/drivers/hid/hid-spinelplus.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-3.19.patch/drivers/hid/hid-spinelplus.c 2015-02-11 00:04:45.886977059 +0100
|
||||
@@ -0,0 +1,104 @@
|
||||
diff --git a/drivers/hid/hid-spinelplus.c b/drivers/hid/hid-spinelplus.c
|
||||
new file mode 100644
|
||||
index 0000000..381c7b3
|
||||
--- /dev/null
|
||||
+++ b/drivers/hid/hid-spinelplus.c
|
||||
@@ -0,0 +1,95 @@
|
||||
+/*
|
||||
+ * HID driver for "PHILIPS MCE USB IR Receiver- Spinel plus" remotes
|
||||
+ *
|
||||
@@ -122,43 +155,6 @@ diff -Naur linux-3.19/drivers/hid/hid-spinelplus.c linux-3.19.patch/drivers/hid/
|
||||
+ .probe = spinelplus_probe,
|
||||
+};
|
||||
+
|
||||
+static int __init spinelplus_init(void)
|
||||
+{
|
||||
+ return hid_register_driver(&spinelplus_driver);
|
||||
+}
|
||||
+module_hid_driver(spinelplus_driver);
|
||||
+
|
||||
+static void __exit spinelplus_exit(void)
|
||||
+{
|
||||
+ hid_unregister_driver(&spinelplus_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(spinelplus_init);
|
||||
+module_exit(spinelplus_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Naur linux-3.19/drivers/hid/Kconfig linux-3.19.patch/drivers/hid/Kconfig
|
||||
--- linux-3.19/drivers/hid/Kconfig 2015-02-09 03:54:22.000000000 +0100
|
||||
+++ linux-3.19.patch/drivers/hid/Kconfig 2015-02-11 00:04:45.886977059 +0100
|
||||
@@ -702,6 +702,12 @@
|
||||
---help---
|
||||
Support for Steelseries SRW-S1 steering wheel
|
||||
|
||||
+config HID_SPINELPLUS
|
||||
+ tristate "Spinel Plus remote control"
|
||||
+ depends on USB_HID
|
||||
+ ---help---
|
||||
+ Say Y here if you have a Spinel Plus (0471:206c/20cc/0613/2168) remote
|
||||
+
|
||||
config HID_SUNPLUS
|
||||
tristate "Sunplus wireless desktop"
|
||||
depends on HID
|
||||
diff -Naur linux-3.19/drivers/hid/Makefile linux-3.19.patch/drivers/hid/Makefile
|
||||
--- linux-3.19/drivers/hid/Makefile 2015-02-09 03:54:22.000000000 +0100
|
||||
+++ linux-3.19.patch/drivers/hid/Makefile 2015-02-11 00:04:45.886977059 +0100
|
||||
@@ -107,6 +107,7 @@
|
||||
obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o
|
||||
obj-$(CONFIG_HID_SONY) += hid-sony.o
|
||||
obj-$(CONFIG_HID_SPEEDLINK) += hid-speedlink.o
|
||||
+obj-$(CONFIG_HID_SPINELPLUS) += hid-spinelplus.o
|
||||
obj-$(CONFIG_HID_STEELSERIES) += hid-steelseries.o
|
||||
obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o
|
||||
obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
From abfbd6e4fc3cd4ff256207312605c69ad23ed215 Mon Sep 17 00:00:00 2001
|
||||
From: MilhouseVH <milhouseVH.github@nmacleod.com>
|
||||
Date: Sun, 29 Oct 2017 15:31:10 +0000
|
||||
Subject: [PATCH 1/3] lan78xx: Disable WOL
|
||||
|
||||
---
|
||||
drivers/net/usb/lan78xx.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
|
||||
index f33460c..ff4ad6c 100644
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -1618,7 +1618,7 @@ static const struct ethtool_ops lan78xx_ethtool_ops = {
|
||||
.get_sset_count = lan78xx_get_sset_count,
|
||||
.get_strings = lan78xx_get_strings,
|
||||
.get_wol = lan78xx_get_wol,
|
||||
- .set_wol = lan78xx_set_wol,
|
||||
+// .set_wol = lan78xx_set_wol,
|
||||
.get_eee = lan78xx_get_eee,
|
||||
.set_eee = lan78xx_set_eee,
|
||||
.get_pauseparam = lan78xx_get_pause,
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
From 31a1f69f2fe9f158a27bdf7d6a516a84c6a054a9 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Tue, 17 Oct 2017 15:04:29 +0100
|
||||
Subject: [PATCH 2/3] lan78xx: Enable LED0 and LED1
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/net/usb/lan78xx.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
|
||||
index ff4ad6c..65c86c2 100644
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -2204,6 +2204,7 @@ static int lan78xx_reset(struct lan78xx_net *dev)
|
||||
|
||||
ret = lan78xx_read_reg(dev, HW_CFG, &buf);
|
||||
buf |= HW_CFG_MEF_;
|
||||
+ buf |= HW_CFG_LED0_EN_ | HW_CFG_LED1_EN_;
|
||||
ret = lan78xx_write_reg(dev, HW_CFG, buf);
|
||||
|
||||
ret = lan78xx_read_reg(dev, USB_CFG0, &buf);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
From 2c5e254d9cff51d8e01cb3fe4cf35d87823e1f0d Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Fri, 21 Jul 2017 11:30:18 +0100
|
||||
Subject: [PATCH 3/3] lan78xx: Read MAC address from DT if present
|
||||
|
||||
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
---
|
||||
drivers/net/usb/lan78xx.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
|
||||
index 65c86c2..0113ac4 100644
|
||||
--- a/drivers/net/usb/lan78xx.c
|
||||
+++ b/drivers/net/usb/lan78xx.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <linux/mdio.h>
|
||||
#include <net/ip6_checksum.h>
|
||||
#include <linux/microchipphy.h>
|
||||
+#include <linux/of_net.h>
|
||||
#include "lan78xx.h"
|
||||
|
||||
#define DRIVER_AUTHOR "WOOJUNG HUH <woojung.huh@microchip.com>"
|
||||
@@ -1638,6 +1639,14 @@ static void lan78xx_init_mac_address(struct lan78xx_net *dev)
|
||||
u32 addr_lo, addr_hi;
|
||||
int ret;
|
||||
u8 addr[6];
|
||||
+ const u8 *mac_addr;
|
||||
+
|
||||
+ /* maybe the boot loader passed the MAC address in devicetree */
|
||||
+ mac_addr = of_get_mac_address(dev->udev->dev.of_node);
|
||||
+ if (mac_addr) {
|
||||
+ ether_addr_copy(addr, mac_addr);
|
||||
+ goto set_mac_addr;
|
||||
+ }
|
||||
|
||||
ret = lan78xx_read_reg(dev, RX_ADDRL, &addr_lo);
|
||||
ret = lan78xx_read_reg(dev, RX_ADDRH, &addr_hi);
|
||||
@@ -1666,6 +1675,7 @@ static void lan78xx_init_mac_address(struct lan78xx_net *dev)
|
||||
"MAC address set to random addr");
|
||||
}
|
||||
|
||||
+set_mac_addr:
|
||||
addr_lo = addr[0] | (addr[1] << 8) |
|
||||
(addr[2] << 16) | (addr[3] << 24);
|
||||
addr_hi = addr[4] | (addr[5] << 8);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -0,0 +1,354 @@
|
||||
From: Ben Seri <ben@armis.com>
|
||||
|
||||
commit e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 upstream.
|
||||
|
||||
Validate the output buffer length for L2CAP config requests and responses
|
||||
to avoid overflowing the stack buffer used for building the option blocks.
|
||||
|
||||
Signed-off-by: Ben Seri <ben@armis.com>
|
||||
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
---
|
||||
net/bluetooth/l2cap_core.c | 80 ++++++++++++++++++++++++---------------------
|
||||
1 file changed, 43 insertions(+), 37 deletions(-)
|
||||
|
||||
--- a/net/bluetooth/l2cap_core.c
|
||||
+++ b/net/bluetooth/l2cap_core.c
|
||||
@@ -58,7 +58,7 @@ static struct sk_buff *l2cap_build_cmd(s
|
||||
u8 code, u8 ident, u16 dlen, void *data);
|
||||
static void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len,
|
||||
void *data);
|
||||
-static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data);
|
||||
+static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size);
|
||||
static void l2cap_send_disconn_req(struct l2cap_chan *chan, int err);
|
||||
|
||||
static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
|
||||
@@ -1473,7 +1473,7 @@ static void l2cap_conn_start(struct l2ca
|
||||
|
||||
set_bit(CONF_REQ_SENT, &chan->conf_state);
|
||||
l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
|
||||
- l2cap_build_conf_req(chan, buf), buf);
|
||||
+ l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
|
||||
chan->num_conf_req++;
|
||||
}
|
||||
|
||||
@@ -2977,12 +2977,15 @@ static inline int l2cap_get_conf_opt(voi
|
||||
return len;
|
||||
}
|
||||
|
||||
-static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val)
|
||||
+static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val, size_t size)
|
||||
{
|
||||
struct l2cap_conf_opt *opt = *ptr;
|
||||
|
||||
BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
|
||||
|
||||
+ if (size < L2CAP_CONF_OPT_SIZE + len)
|
||||
+ return;
|
||||
+
|
||||
opt->type = type;
|
||||
opt->len = len;
|
||||
|
||||
@@ -3007,7 +3010,7 @@ static void l2cap_add_conf_opt(void **pt
|
||||
*ptr += L2CAP_CONF_OPT_SIZE + len;
|
||||
}
|
||||
|
||||
-static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan)
|
||||
+static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t size)
|
||||
{
|
||||
struct l2cap_conf_efs efs;
|
||||
|
||||
@@ -3035,7 +3038,7 @@ static void l2cap_add_opt_efs(void **ptr
|
||||
}
|
||||
|
||||
l2cap_add_conf_opt(ptr, L2CAP_CONF_EFS, sizeof(efs),
|
||||
- (unsigned long) &efs);
|
||||
+ (unsigned long) &efs, size);
|
||||
}
|
||||
|
||||
static void l2cap_ack_timeout(struct work_struct *work)
|
||||
@@ -3181,11 +3184,12 @@ static inline void l2cap_txwin_setup(str
|
||||
chan->ack_win = chan->tx_win;
|
||||
}
|
||||
|
||||
-static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data)
|
||||
+static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t data_size)
|
||||
{
|
||||
struct l2cap_conf_req *req = data;
|
||||
struct l2cap_conf_rfc rfc = { .mode = chan->mode };
|
||||
void *ptr = req->data;
|
||||
+ void *endptr = data + data_size;
|
||||
u16 size;
|
||||
|
||||
BT_DBG("chan %p", chan);
|
||||
@@ -3210,7 +3214,7 @@ static int l2cap_build_conf_req(struct l
|
||||
|
||||
done:
|
||||
if (chan->imtu != L2CAP_DEFAULT_MTU)
|
||||
- l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu);
|
||||
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu, endptr - ptr);
|
||||
|
||||
switch (chan->mode) {
|
||||
case L2CAP_MODE_BASIC:
|
||||
@@ -3229,7 +3233,7 @@ done:
|
||||
rfc.max_pdu_size = 0;
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
|
||||
- (unsigned long) &rfc);
|
||||
+ (unsigned long) &rfc, endptr - ptr);
|
||||
break;
|
||||
|
||||
case L2CAP_MODE_ERTM:
|
||||
@@ -3249,21 +3253,21 @@ done:
|
||||
L2CAP_DEFAULT_TX_WINDOW);
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
|
||||
- (unsigned long) &rfc);
|
||||
+ (unsigned long) &rfc, endptr - ptr);
|
||||
|
||||
if (test_bit(FLAG_EFS_ENABLE, &chan->flags))
|
||||
- l2cap_add_opt_efs(&ptr, chan);
|
||||
+ l2cap_add_opt_efs(&ptr, chan, endptr - ptr);
|
||||
|
||||
if (test_bit(FLAG_EXT_CTRL, &chan->flags))
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_EWS, 2,
|
||||
- chan->tx_win);
|
||||
+ chan->tx_win, endptr - ptr);
|
||||
|
||||
if (chan->conn->feat_mask & L2CAP_FEAT_FCS)
|
||||
if (chan->fcs == L2CAP_FCS_NONE ||
|
||||
test_bit(CONF_RECV_NO_FCS, &chan->conf_state)) {
|
||||
chan->fcs = L2CAP_FCS_NONE;
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1,
|
||||
- chan->fcs);
|
||||
+ chan->fcs, endptr - ptr);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -3281,17 +3285,17 @@ done:
|
||||
rfc.max_pdu_size = cpu_to_le16(size);
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
|
||||
- (unsigned long) &rfc);
|
||||
+ (unsigned long) &rfc, endptr - ptr);
|
||||
|
||||
if (test_bit(FLAG_EFS_ENABLE, &chan->flags))
|
||||
- l2cap_add_opt_efs(&ptr, chan);
|
||||
+ l2cap_add_opt_efs(&ptr, chan, endptr - ptr);
|
||||
|
||||
if (chan->conn->feat_mask & L2CAP_FEAT_FCS)
|
||||
if (chan->fcs == L2CAP_FCS_NONE ||
|
||||
test_bit(CONF_RECV_NO_FCS, &chan->conf_state)) {
|
||||
chan->fcs = L2CAP_FCS_NONE;
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1,
|
||||
- chan->fcs);
|
||||
+ chan->fcs, endptr - ptr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -3302,10 +3306,11 @@ done:
|
||||
return ptr - data;
|
||||
}
|
||||
|
||||
-static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data)
|
||||
+static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data, size_t data_size)
|
||||
{
|
||||
struct l2cap_conf_rsp *rsp = data;
|
||||
void *ptr = rsp->data;
|
||||
+ void *endptr = data + data_size;
|
||||
void *req = chan->conf_req;
|
||||
int len = chan->conf_len;
|
||||
int type, hint, olen;
|
||||
@@ -3407,7 +3412,7 @@ done:
|
||||
return -ECONNREFUSED;
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
|
||||
- (unsigned long) &rfc);
|
||||
+ (unsigned long) &rfc, endptr - ptr);
|
||||
}
|
||||
|
||||
if (result == L2CAP_CONF_SUCCESS) {
|
||||
@@ -3420,7 +3425,7 @@ done:
|
||||
chan->omtu = mtu;
|
||||
set_bit(CONF_MTU_DONE, &chan->conf_state);
|
||||
}
|
||||
- l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->omtu);
|
||||
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->omtu, endptr - ptr);
|
||||
|
||||
if (remote_efs) {
|
||||
if (chan->local_stype != L2CAP_SERV_NOTRAFIC &&
|
||||
@@ -3434,7 +3439,7 @@ done:
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
|
||||
sizeof(efs),
|
||||
- (unsigned long) &efs);
|
||||
+ (unsigned long) &efs, endptr - ptr);
|
||||
} else {
|
||||
/* Send PENDING Conf Rsp */
|
||||
result = L2CAP_CONF_PENDING;
|
||||
@@ -3467,7 +3472,7 @@ done:
|
||||
set_bit(CONF_MODE_DONE, &chan->conf_state);
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
|
||||
- sizeof(rfc), (unsigned long) &rfc);
|
||||
+ sizeof(rfc), (unsigned long) &rfc, endptr - ptr);
|
||||
|
||||
if (test_bit(FLAG_EFS_ENABLE, &chan->flags)) {
|
||||
chan->remote_id = efs.id;
|
||||
@@ -3481,7 +3486,7 @@ done:
|
||||
le32_to_cpu(efs.sdu_itime);
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS,
|
||||
sizeof(efs),
|
||||
- (unsigned long) &efs);
|
||||
+ (unsigned long) &efs, endptr - ptr);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -3495,7 +3500,7 @@ done:
|
||||
set_bit(CONF_MODE_DONE, &chan->conf_state);
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc),
|
||||
- (unsigned long) &rfc);
|
||||
+ (unsigned long) &rfc, endptr - ptr);
|
||||
|
||||
break;
|
||||
|
||||
@@ -3517,10 +3522,11 @@ done:
|
||||
}
|
||||
|
||||
static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
|
||||
- void *data, u16 *result)
|
||||
+ void *data, size_t size, u16 *result)
|
||||
{
|
||||
struct l2cap_conf_req *req = data;
|
||||
void *ptr = req->data;
|
||||
+ void *endptr = data + size;
|
||||
int type, olen;
|
||||
unsigned long val;
|
||||
struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC };
|
||||
@@ -3538,13 +3544,13 @@ static int l2cap_parse_conf_rsp(struct l
|
||||
chan->imtu = L2CAP_DEFAULT_MIN_MTU;
|
||||
} else
|
||||
chan->imtu = val;
|
||||
- l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu);
|
||||
+ l2cap_add_conf_opt(&ptr, L2CAP_CONF_MTU, 2, chan->imtu, endptr - ptr);
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_FLUSH_TO:
|
||||
chan->flush_to = val;
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_FLUSH_TO,
|
||||
- 2, chan->flush_to);
|
||||
+ 2, chan->flush_to, endptr - ptr);
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_RFC:
|
||||
@@ -3558,13 +3564,13 @@ static int l2cap_parse_conf_rsp(struct l
|
||||
chan->fcs = 0;
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC,
|
||||
- sizeof(rfc), (unsigned long) &rfc);
|
||||
+ sizeof(rfc), (unsigned long) &rfc, endptr - ptr);
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_EWS:
|
||||
chan->ack_win = min_t(u16, val, chan->ack_win);
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_EWS, 2,
|
||||
- chan->tx_win);
|
||||
+ chan->tx_win, endptr - ptr);
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_EFS:
|
||||
@@ -3577,7 +3583,7 @@ static int l2cap_parse_conf_rsp(struct l
|
||||
return -ECONNREFUSED;
|
||||
|
||||
l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS, sizeof(efs),
|
||||
- (unsigned long) &efs);
|
||||
+ (unsigned long) &efs, endptr - ptr);
|
||||
break;
|
||||
|
||||
case L2CAP_CONF_FCS:
|
||||
@@ -3682,7 +3688,7 @@ void __l2cap_connect_rsp_defer(struct l2
|
||||
return;
|
||||
|
||||
l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
|
||||
- l2cap_build_conf_req(chan, buf), buf);
|
||||
+ l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
|
||||
chan->num_conf_req++;
|
||||
}
|
||||
|
||||
@@ -3890,7 +3896,7 @@ sendresp:
|
||||
u8 buf[128];
|
||||
set_bit(CONF_REQ_SENT, &chan->conf_state);
|
||||
l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
|
||||
- l2cap_build_conf_req(chan, buf), buf);
|
||||
+ l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
|
||||
chan->num_conf_req++;
|
||||
}
|
||||
|
||||
@@ -3968,7 +3974,7 @@ static int l2cap_connect_create_rsp(stru
|
||||
break;
|
||||
|
||||
l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
|
||||
- l2cap_build_conf_req(chan, req), req);
|
||||
+ l2cap_build_conf_req(chan, req, sizeof(req)), req);
|
||||
chan->num_conf_req++;
|
||||
break;
|
||||
|
||||
@@ -4080,7 +4086,7 @@ static inline int l2cap_config_req(struc
|
||||
}
|
||||
|
||||
/* Complete config. */
|
||||
- len = l2cap_parse_conf_req(chan, rsp);
|
||||
+ len = l2cap_parse_conf_req(chan, rsp, sizeof(rsp));
|
||||
if (len < 0) {
|
||||
l2cap_send_disconn_req(chan, ECONNRESET);
|
||||
goto unlock;
|
||||
@@ -4114,7 +4120,7 @@ static inline int l2cap_config_req(struc
|
||||
if (!test_and_set_bit(CONF_REQ_SENT, &chan->conf_state)) {
|
||||
u8 buf[64];
|
||||
l2cap_send_cmd(conn, l2cap_get_ident(conn), L2CAP_CONF_REQ,
|
||||
- l2cap_build_conf_req(chan, buf), buf);
|
||||
+ l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
|
||||
chan->num_conf_req++;
|
||||
}
|
||||
|
||||
@@ -4174,7 +4180,7 @@ static inline int l2cap_config_rsp(struc
|
||||
char buf[64];
|
||||
|
||||
len = l2cap_parse_conf_rsp(chan, rsp->data, len,
|
||||
- buf, &result);
|
||||
+ buf, sizeof(buf), &result);
|
||||
if (len < 0) {
|
||||
l2cap_send_disconn_req(chan, ECONNRESET);
|
||||
goto done;
|
||||
@@ -4204,7 +4210,7 @@ static inline int l2cap_config_rsp(struc
|
||||
/* throw out any old stored conf requests */
|
||||
result = L2CAP_CONF_SUCCESS;
|
||||
len = l2cap_parse_conf_rsp(chan, rsp->data, len,
|
||||
- req, &result);
|
||||
+ req, sizeof(req), &result);
|
||||
if (len < 0) {
|
||||
l2cap_send_disconn_req(chan, ECONNRESET);
|
||||
goto done;
|
||||
@@ -4781,7 +4787,7 @@ static void l2cap_do_create(struct l2cap
|
||||
set_bit(CONF_REQ_SENT, &chan->conf_state);
|
||||
l2cap_send_cmd(chan->conn, l2cap_get_ident(chan->conn),
|
||||
L2CAP_CONF_REQ,
|
||||
- l2cap_build_conf_req(chan, buf), buf);
|
||||
+ l2cap_build_conf_req(chan, buf, sizeof(buf)), buf);
|
||||
chan->num_conf_req++;
|
||||
}
|
||||
}
|
||||
@@ -7457,7 +7463,7 @@ static void l2cap_security_cfm(struct hc
|
||||
set_bit(CONF_REQ_SENT, &chan->conf_state);
|
||||
l2cap_send_cmd(conn, l2cap_get_ident(conn),
|
||||
L2CAP_CONF_REQ,
|
||||
- l2cap_build_conf_req(chan, buf),
|
||||
+ l2cap_build_conf_req(chan, buf, sizeof(buf)),
|
||||
buf);
|
||||
chan->num_conf_req++;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
|
||||
index d95744d..3b75c7e 100644
|
||||
--- a/fs/cifs/connect.c
|
||||
+++ b/fs/cifs/connect.c
|
||||
@@ -1270,9 +1270,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
|
||||
|
||||
vol->actimeo = CIFS_DEF_ACTIMEO;
|
||||
|
||||
- /* FIXME: add autonegotiation -- for now, SMB1 is default */
|
||||
- vol->ops = &smb1_operations;
|
||||
- vol->vals = &smb1_values;
|
||||
+ /* FIXME: add autonegotiation -- for now, SMB2.1 is default */
|
||||
+ vol->ops = &smb21_operations;
|
||||
+ vol->vals = &smb21_values;
|
||||
|
||||
vol->echo_interval = SMB_ECHO_INTERVAL_DEFAULT;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="LibreELEC-settings"
|
||||
PKG_VERSION="4f81a2d"
|
||||
PKG_VERSION="12c5f24"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="prop."
|
||||
PKG_SITE="https://libreelec.tv"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="inputstream.adaptive"
|
||||
PKG_VERSION="a02656d"
|
||||
PKG_VERSION="f2904b5"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.kodi.tv"
|
||||
PKG_URL="https://github.com/peak3d/inputstream.adaptive/archive/$PKG_VERSION.tar.gz"
|
||||
@@ -28,17 +28,6 @@ PKG_LONGDESC="inputstream.adaptive"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p wv && cd wv
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DDECRYPTERPATH=special://home/cdm \
|
||||
$PKG_BUILD/wvdecrypter
|
||||
make
|
||||
|
||||
cp -P $PKG_BUILD/.$TARGET_NAME/wv/libssd_wv.so $INSTALL/usr/lib
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
cp -R $PKG_BUILD/.install_pkg/usr/share/$MEDIACENTER/addons/$PKG_NAME/* $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
@@ -46,6 +35,6 @@ addon() {
|
||||
ADDONSO=$(xmlstarlet sel -t -v "/addon/extension/@library_linux" $ADDON_BUILD/$PKG_ADDON_ID/addon.xml)
|
||||
cp -L $PKG_BUILD/.install_pkg/usr/lib/$MEDIACENTER/addons/$PKG_NAME/$ADDONSO $ADDON_BUILD/$PKG_ADDON_ID/
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib/
|
||||
cp -P $PKG_BUILD/.$TARGET_NAME/wv/libssd_wv.so $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID
|
||||
cp -P $PKG_BUILD/.$TARGET_NAME/wvdecrypter/libssd_wv.so $ADDON_BUILD/$PKG_ADDON_ID
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="pvr.hts"
|
||||
PKG_VERSION="4e2a833"
|
||||
PKG_VERSION="d0b6f1f"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="pvr.iptvsimple"
|
||||
PKG_VERSION="d782816"
|
||||
PKG_VERSION="2a649d7"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="pvr.vuplus"
|
||||
PKG_VERSION="25c4883"
|
||||
PKG_VERSION="c1e6a22"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
||||