Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv into openelec-settings

This commit is contained in:
Stephan Raue 2013-02-04 03:27:29 +01:00
commit afe6121f3e
39 changed files with 869 additions and 368 deletions

View File

@ -1,37 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
cd $PKG_BUILD
# binary search & replace (strings must be same length!)
# mediasrv
# /etc/sunI»dtek.conf
# /etc/sundtek.conf
# libdrv_em28xx.so
# /etc/sundtek.conf
# mediaclient
# /etc/sundtek_diseqc.conf
perl -pi -e 's|/etc|/tmp|g' opt/bin/mediasrv
perl -pi -e 's|/etc|/tmp|g' opt/bin/dvb/libdrv_em28xx.so
perl -pi -e 's|/etc|/tmp|g' opt/bin/mediaclient

View File

@ -1,35 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="sundtek"
PKG_VERSION="20120912"
PKG_REV="0"
PKG_ARCH="i386 x86_64 arm"
PKG_LICENSE="nonfree"
PKG_SITE="http://support.sundtek.com/"
PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}-${ARCH}.tar.gz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS=""
PKG_PRIORITY="optional"
PKG_SECTION="driver/dvb"
PKG_SHORTDESC="Sundtek USB Stick DVB userspace driver"
PKG_LONGDESC="Driver for Sundtek MediaTV Pro (DVB-C, DVB-T, AnalogTV, Composite, S-Video, FM-Radio USB Stick) and Sundtek SkyTV Ultimate (DVB-S/S2 USB)."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -1,85 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. /etc/profile
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv"
SUNDTEK_READY="/var/run/sundtek.ready"
ADAPTER_WAIT_TIME=120
NETWORK_TUNER_IP=$(awk '/^network_tuner_ip=/ {split($0,a,"="); printf("%s", a[2])}' "$ADDON_HOME/sundtek.conf")
mkdir -p $ADDON_HOME
if [ ! -f "$ADDON_HOME/sundtek.conf" ]; then
cp $ADDON_DIR/config/* $ADDON_HOME/
fi
SUNDTEK_ARG="--pluginpath=$ADDON_DIR/bin --daemon"
if [ -z "$(pidof mediasrv)" ]; then
rm -f /var/log/mediasrv.log
rm -f /var/log/mediaclient.log
rm -f $SUNDTEK_READY
rm -f /tmp/sundtek.conf
ln -sf $ADDON_HOME/sundtek.conf /tmp/sundtek.conf
mediasrv $SUNDTEK_ARG
if [ -n "$NETWORK_TUNER_IP" ]; then
logger -t Sundtek "### Trying to connect Sundtek device $NETWORK_TUNER_IP ###"
mediaclient --mount=$NETWORK_TUNER_IP
else
logger -t Sundtek "### Trying to attach Sundtek device ###"
fi
# wait for device to get attached or connected
cnt=0
while [ 1 ]; do
if [ -n "$NETWORK_TUNER_IP" -a -e /dev/dvb/adapter*/frontend* ]; then
sh $ADDON_DIR/bin/device-attached.sh
fi
if [ -f $SUNDTEK_READY ]; then
rm -f $SUNDTEK_READY
break
elif [ "$cnt" = "$ADAPTER_WAIT_TIME" ]; then
logger -t Sundtek "### No Sundtek device attached or connected ###"
return
fi
let cnt=cnt+1
usleep 500000
done
(
# save adapter serial number in background
sleep 4
serial_number_old=$(cat $ADDON_HOME/adapters.txt 2>/dev/null)
serial_number_new=$(mediaclient -e | awk '/device / {print $0} /ID:/ {print $2}')
if [ "$serial_number_old" != "$serial_number_new" ]; then
echo "$serial_number_new" >$ADDON_HOME/adapters.txt
fi
)&
fi
export LD_PRELOAD=$ADDON_DIR/lib/libmediaclient.so:$LD_PRELOAD

View File

@ -24,9 +24,4 @@
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config/
cp -P $PKG_DIR/config/* $ADDON_BUILD/$PKG_ADDON_ID/config/
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin/
cp -Pa $ROOT/$BUILD/sundtek-*/opt/bin/* $ADDON_BUILD/$PKG_ADDON_ID/bin/
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib/
cp -Pa $ROOT/$BUILD/sundtek-*/opt/lib/*.so $ADDON_BUILD/$PKG_ADDON_ID/lib/
cp -P $PKG_DIR/settings-default.xml $ADDON_BUILD/$PKG_ADDON_ID/

View File

@ -1,12 +1,16 @@
3.0.1
- bump addon version
addon renamed to just sundtek
added addon settings
sundtek's binaries are downloaded on first run
automatically download new version of the binaries if available
added preload library to .profile (to run mediaclient, w_scan, ... from console)
2.1.4
support for Raspberry Pi
2.1.3
support for network tuner
2.1.2
support for multiple Sundtek tuners
support for working with other tuners (kernel drivers)

View File

@ -2,11 +2,8 @@
# sundtek.conf
#
# Call attach/detach script when new device appears/disappears
# Do not change this line!
device_attach=/storage/.xbmc/addons/driver.dvb.sundtek-mediatv/bin/device-attached.sh
# network tuner IP address (OpenELEC specific)
#network_tuner_ip=xxx.xxx.xxx.xxx
# Do not change this line (OpenElec addon require this) !
device_attach=/storage/.xbmc/addons/driver.dvb.sundtek/bin/device-attached.sh
# Infrared Control Support is disabled/enabled
ir_disabled=1
@ -19,8 +16,11 @@ bulk_notification=on
# Get adapter serial number with mediaclient -e
# or look into file adapter_serial_number.txt
[SERIALNUMBER]
#[SERIALNUMBER]
# Choose initial DVB mode for hybrid DVB-T/DVB-C devices only
#initial_dvb_mode=[DVBC|DVBT]
# default mode is DVB-C, we must set it to DVB-T if needed
#initial_dvb_mode=DVBT
#[U123456789012]
#initial_dvb_mode=DVBT

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -18,15 +18,15 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="sundtek-mediatv"
PKG_NAME="sundtek"
PKG_VERSION="3.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="nonfree"
PKG_SITE="http://support.sundtek.com/"
PKG_URL=""
PKG_DEPENDS="sundtek"
PKG_BUILD_DEPENDS="sundtek"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS=""
PKG_PRIORITY="optional"
PKG_SECTION="driver/dvb"
PKG_SHORTDESC="Sundtek USB Stick DVB userspace driver"

View File

@ -0,0 +1,7 @@
<settings>
<setting id="AUTO_UPDATE" value="false" />
<setting id="ANALOG_TV" value="false" />
<setting id="NETWORK_TUNER_IP" value="0.0.0.0" />
<setting id="SETTLE_TIME" value="0" />
<setting id="RUN_USER_SCRIPT" value="false" />
</settings>

View File

@ -20,10 +20,9 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
. /etc/profile
cd $PKG_BUILD/installer/src
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek"
LDFLAGS="" make KERNELDIR=$(kernel_path)
fix_module_depends "h826d.ko" "averusbh826d,videodev"
logger -t Sundtek "### Sundtek manual start ###"
. $ADDON_DIR/bin/userspace-driver.sh

View File

@ -20,9 +20,11 @@
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
. /etc/profile
VER=`ls $BUILD/linux*/modules/lib/modules`
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek"
mkdir -p $INSTALL/lib/modules/$VER/aver_h826d
cp $PKG_BUILD/installer/src/*.ko $INSTALL/lib/modules/$VER/aver_h826d
export LD_PRELOAD=$ADDON_DIR/lib/libmediaclient.so
logger -t Sundtek "### Sundtek manual stop ###"
mediaclient --shutdown

View File

@ -0,0 +1,197 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. /etc/profile
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek"
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.dvb.sundtek"
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
SUNDTEK_READY="/var/run/sundtek.ready"
mkdir -p $ADDON_HOME
if [ ! -f "$ADDON_HOME/sundtek.conf" ]; then
cp $ADDON_DIR/config/* $ADDON_HOME/
fi
if [ ! -f "$ADDON_SETTINGS" ]; then
cp $ADDON_DIR/settings-default.xml $ADDON_SETTINGS
fi
mkdir -p /var/config
cat "$ADDON_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/sundtek-addon.conf
. /var/config/sundtek-addon.conf
if [ "$AUTO_UPDATE" = "true" -a -f $ADDON_DIR/bin/mediasrv ]; then
logger -t Sundtek "### Checking for new Sundtek binary installer ###"
touch $ADDON_HOME/driver-version.txt
wget -O /tmp/sundtek-driver-version.txt http://sundtek.de/media/latest.phtml
md5_1=$(md5sum -b /tmp/sundtek-driver-version.txt | awk '{print $1}')
md5_2=$(md5sum -b $ADDON_HOME/driver-version.txt | awk '{print $1}')
if [ "$md5_1" != "$md5_2" ]; then
logger -t Sundtek "### Updating Sundtek binary installer ###"
rm -f $ADDON_DIR/bin/mediasrv
fi
rm -f /tmp/sundtek-driver-version.txt
fi
if [ ! -f $ADDON_DIR/bin/mediasrv ]; then
logger -t Sundtek "### Downloading installer ###"
cd $ADDON_DIR
mkdir -p bin lib tmp
cd tmp/
ARCH=$(sed -n 's|.*\.\([^-]*\)-.*|\1|p' /etc/release | tr -d '\n')
if [ "$ARCH" = "x86_64" ]; then
INSTALLER_URL="http://sundtek.de/media/netinst/64bit/installer.tar.gz"
elif [ "$ARCH" = "i386" ]; then
INSTALLER_URL="http://sundtek.de/media/netinst/32bit/installer.tar.gz"
elif [ "$ARCH" = "arm" ]; then
INSTALLER_URL="http://sundtek.de/media/netinst/armsysvhf/installer.tar.gz"
else
logger -t Sundtek "### Unsupported architecture ###"
cd ..
rm -fr tmp/
exit 1
fi
# test only !!!
#INSTALLER_URL="http://sundtek.de/support/installer.tar.gz"
wget -O installer.tar.gz $INSTALLER_URL
wget -O ../driver-version.txt http://sundtek.de/media/latest.phtml
logger -t Sundtek "### Extracting installer ###"
tar -xzf installer.tar.gz
if [ $? -ne 0 ]; then
logger -t Sundtek "### Installer damaged ###"
cd ..
rm -fr tmp/
exit 2
fi
cp -Pa opt/bin/* ../bin/
cp -Pa opt/lib/* ../lib/
cp ../driver-version.txt $ADDON_HOME/
cd ..
rm -fr tmp/
logger -t Sundtek "### Installer finished ###"
fi
if [ ! -f $ADDON_HOME/driver-version.txt ]; then
cp $ADDON_DIR/driver-version.txt $ADDON_HOME/
fi
# enable to install same version again
rm -f /storage/.xbmc/addons/packages/driver.dvb.sundtek-*
# add alias for /opt/bin/mediaclient
#alias_set="$(grep /opt/bin/mediaclient /storage/.profile 2>/dev/null)"
alias_set="$(grep libmediaclient.so /storage/.profile 2>/dev/null)"
if [ -z "$alias_set" ]; then
echo "" >>/storage/.profile
#echo "alias /opt/bin/mediaclient=/storage/.xbmc/addons/driver.dvb.sundtek/bin/mediaclient" >>/storage/.profile
echo "[ -f /storage/.xbmc/addons/driver.dvb.sundtek/lib/libmediaclient.so ] && export LD_PRELOAD=/storage/.xbmc/addons/driver.dvb.sundtek/lib/libmediaclient.so" >>/storage/.profile
echo "" >>/storage/.profile
fi
export LD_PRELOAD=$ADDON_DIR/lib/libmediaclient.so
if [ "$ANALOG_TV" = "true" -a ! -f "$ADDON_DIR/bin/plugins/lib/libavcodec.so.54.12.100" ]; then
logger -t Sundtek "### Downloading missing ffmpeg libraries ###"
cd $ADDON_DIR/bin
mkdir -p plugins/
cd plugins/
ARCH=$(sed -n 's|.*\.\([^-]*\)-.*|\1|p' /etc/release | tr -d '\n')
wget -O sundtek-ffmpeg-analog_tv-lib.tgz http://dl.dropbox.com/u/8224157/public/sundtek/sundtek-ffmpeg-analog_tv-lib-$ARCH.tgz
logger -t Sundtek "### Extracting ffmpeg libraries ###"
tar -xzf sundtek-ffmpeg-analog_tv-lib.tgz
if [ $? -ne 0 ]; then
logger -t Sundtek "### Ffmpeg library archive damaged ###"
rm -f sundtek-ffmpeg-analog_tv-lib.tgz
exit 2
fi
rm -f sundtek-ffmpeg-analog_tv-lib.tgz
fi
if [ -z "$(pidof mediasrv)" ]; then
rm -f /var/log/mediasrv.log
rm -f /var/log/mediaclient.log
rm -f $SUNDTEK_READY
mediasrv --wait-for-devices -p $ADDON_DIR/bin -c $ADDON_HOME/sundtek.conf -d
if [ -n "$NETWORK_TUNER_IP" -a "$NETWORK_TUNER_IP" != "0.0.0.0" ]; then
logger -t Sundtek "### Trying to connect to Sundtek network device IP $NETWORK_TUNER_IP ###"
mediaclient --mount=$NETWORK_TUNER_IP
else
logger -t Sundtek "### Trying to attach Sundtek device ###"
fi
# wait for device to get attached or connected
for i in $(seq 1 240); do
if [ -n "$NETWORK_TUNER_IP" -a -e /dev/dvb/adapter*/frontend* ]; then
sh $ADDON_DIR/bin/device-attached.sh
fi
if [ -f $SUNDTEK_READY ]; then
rm -f $SUNDTEK_READY
logger -t Sundtek "### Sundtek ready ###"
if [ -n $SETTLE_TIME -a $SETTLE_TIME -gt 0 ]; then
logger -t Sundtek "### Settle for $SETTLE_TIME sec ###"
sleep $SETTLE_TIME
fi
break
elif [ "$i" = "240" ]; then
logger -t Sundtek "### No Sundtek device attached or connected ###"
return
else
usleep 500000
fi
done
if [ "$ANALOG_TV" = "true" ]; then
logger -t Sundtek "### Switching to analog TV mode ###"
#rm -fr /dev/dvb/
mediaclient --disable-dvb=/dev/dvb/adapter0
fi
if [ "$RUN_USER_SCRIPT" = "true" -a -f "$ADDON_HOME/userscript.sh" ]; then
logger -t Sundtek "### Running user script $ADDON_HOME/userscript.sh ###"
cat $ADDON_HOME/userscript.sh | dos2unix >/var/run/sundtek-userscript.sh
sh /var/run/sundtek-userscript.sh
fi
(
# save adapter serial number in background
sleep 5
serial_number_old=$(cat $ADDON_HOME/adapters.txt 2>/dev/null)
serial_number_new=$(mediaclient -e | awk '/device / {print $0} /ID:/ {print $2}')
if [ "$serial_number_old" != "$serial_number_new" ]; then
echo "$serial_number_new" >$ADDON_HOME/adapters.txt
fi
)&
fi

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<string id="1000">General</string>
<string id="1011">Auto update binary driver</string>
<string id="1012">Analog TV</string>
<string id="1013">Network tuner IP</string>
<string id="1014">Extra settle time</string>
<string id="1015">Run user script</string>
</strings>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<category label="1000">
<setting label="1010" type="lsep" />
<setting type="sep" />
<setting id="AUTO_UPDATE" type="bool" label="1011" default="false" />
<setting id="ANALOG_TV" type="bool" label="1012" default="false" enable="false" />
<setting id="NETWORK_TUNER_IP" type="ipaddress" label="1013" default="0.0.0.0" />
<setting id="SETTLE_TIME" type="number" label="1014" default="0" />
<setting id="RUN_USER_SCRIPT" type="bool" label="1015" default="false" />
</category>
</settings>

View File

@ -23,12 +23,12 @@
. /etc/profile
LOCKDIR="/var/lock/"
LOCKFILE="sundtek-mediatv"
LOCKFILE="sundtek"
case "$1" in
hibernate|suspend)
if [ -n "$(pidof mediasrv)" ]; then
progress "Shutting down Sundtek MediaTV DVB driver for suspending..."
progress "Shutting down Sundtek DVB driver for suspending..."
mkdir -p "$LOCKDIR"
touch "$LOCKDIR/$LOCKFILE"
mediaclient --shutdown

View File

@ -0,0 +1,16 @@
# INTEL HBR WORKAROUND FOR DTS-MA & Dolby TrueHD PLAYBACK
# Uncomment the following lines to disable any S/PDIF out to deliver
# bitstreamed audio on Intel builds. This is a rough workaround for
# users that have both S/PDIF and HDMI audio outputs on their motherboard
# or motherboard+discrete graphics combo.
# EVEN IF YOU ARE NOT USING THE S/PDIF OUTPUT
# but still have one, you will need to uncomment the lines below !
# after uncommenting these lines, you must reboot for these settings to take effect
# blacklist snd_hda_codec_realtek
# blacklist snd_hda_codec_sigmatel
# blacklist snd_hda_codec_cirrus

View File

@ -24,3 +24,6 @@
mkdir -p $INSTALL/etc/modprobe.d
cp -P $PKG_DIR/config/alsa-base.conf $INSTALL/etc/modprobe.d
mkdir -p $INSTALL/usr/config
cp -R $PKG_DIR/config/modprobe.d $INSTALL/usr/config

View File

@ -373,7 +373,7 @@
SPLASHIMAGE="/splash/splash.png"
fi
ply-image $SPLASHIMAGE > /dev/null 2>&1 &
ply-image $SPLASHIMAGE > /dev/null 2>&1
fi
}

View File

@ -0,0 +1,107 @@
diff -ur _/core/rtw_mp.c rt8192cu-master/core/rtw_mp.c
--- _/core/rtw_mp.c 2012-07-09 10:32:18.000000000 +0200
+++ rt8192cu-master/core/rtw_mp.c 2012-12-21 03:13:45.358137142 +0100
@@ -1140,8 +1140,7 @@
_rtw_memset(ptr, payload, pkt_end - ptr);
//3 6. start thread
- pmp_priv->tx.PktTxThread = kernel_thread(mp_xmit_packet_thread, pmp_priv, CLONE_FS|CLONE_FILES);
- if(pmp_priv->tx.PktTxThread < 0)
+ if(!start_kthread(&pmp_priv->tx.PktTxThread, mp_xmit_packet_thread, pmp_priv, "8192cu-mp-xmit"))
DBG_871X("Create PktTx Thread Fail !!!!!\n");
}
diff -ur _/include/osdep_service.h rt8192cu-master/include/osdep_service.h
--- _/include/osdep_service.h 2012-07-09 10:32:18.000000000 +0200
+++ rt8192cu-master/include/osdep_service.h 2012-12-21 03:09:05.314123589 +0100
@@ -100,6 +100,9 @@
#include <linux/pci.h>
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
+ #include <linux/kthread.h>
+#endif
#ifdef CONFIG_USB_HCI
typedef struct urb * PURB;
@@ -133,8 +136,12 @@
//typedef u32 _irqL;
typedef unsigned long _irqL;
typedef struct net_device * _nic_hdl;
-
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
typedef pid_t _thread_hdl_;
+#else
+ typedef struct task_struct * _thread_hdl_;
+#endif
typedef int thread_return;
typedef void* thread_context;
@@ -827,4 +834,8 @@
#endif
+#ifdef PLATFORM_LINUX
+extern int start_kthread(_thread_hdl_ *t_hdl, int (*threadfn)(void *data),
+ void *data, const char *name);
+#endif
diff -ur _/os_dep/linux/os_intfs.c rt8192cu-master/os_dep/linux/os_intfs.c
--- _/os_dep/linux/os_intfs.c 2012-12-21 03:17:25.618147802 +0100
+++ rt8192cu-master/os_dep/linux/os_intfs.c 2012-12-21 03:14:14.554138555 +0100
@@ -797,27 +797,22 @@
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_start_drv_threads\n"));
#ifdef CONFIG_SDIO_HCI
- padapter->xmitThread = kernel_thread(rtw_xmit_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->xmitThread < 0)
+ if(!start_kthread(&padapter->xmitThread, rtw_xmit_thread, padapter, "8192cu-xmit"))
_status = _FAIL;
#endif
#ifdef CONFIG_RECV_THREAD_MODE
- padapter->recvThread = kernel_thread(recv_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->recvThread < 0)
+ if(!start_kthread(&padapter->recvThread, recv_thread, padapter, "8192cu-recv"))
_status = _FAIL;
#endif
- padapter->cmdThread = kernel_thread(rtw_cmd_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->cmdThread < 0)
+ if(!start_kthread(&padapter->cmdThread, rtw_cmd_thread, padapter, "8192cu-cmd"))
_status = _FAIL;
else
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); //wait for cmd_thread to run
-
#ifdef CONFIG_EVENT_THREAD_MODE
- padapter->evtThread = kernel_thread(event_thread, padapter, CLONE_FS|CLONE_FILES);
- if(padapter->evtThread < 0)
+ if(!start_kthread(&padapter->evtThread, event_thread, padapter, "8192cu-evt"))
_status = _FAIL;
#endif
diff -ur _/os_dep/osdep_service.c rt8192cu-master/os_dep/osdep_service.c
--- _/os_dep/osdep_service.c 2012-12-21 03:17:25.618147802 +0100
+++ rt8192cu-master/os_dep/osdep_service.c 2012-12-21 03:08:30.330121896 +0100
@@ -1553,3 +1553,19 @@
#endif
}
+#ifdef PLATFORM_LINUX
+int start_kthread(_thread_hdl_ *t_hdl, int (*threadfn)(void *data),
+ void *data, const char *name)
+{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+ *t_hdl = kernel_thread(threadfn, data, CLONE_FS|CLONE_FILES);
+ if(*t_hdl < 0)
+#else
+ *t_hdl = kthread_run(threadfn, data, name);
+ if(IS_ERR(*t_hdl))
+#endif
+ return 0;
+ return -1;
+}
+#endif
+

View File

@ -1,36 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="aver_h826d"
PKG_VERSION="0.10"
PKG_REV="1"
PKG_ARCH="i386 x86_64"
PKG_LICENSE="GPL"
PKG_SITE="http://www.avermedia-usa.com/avertv/product/ProductDetail.aspx?Id=431&tab=APDriver"
[ "$TARGET_ARCH" = "i386" ] && PKG_URL="http://www.avermedia-usa.com/AVerTV/Upload/Download/C038A827H826_Installer_x86_0.10-Beta_091126.zip"
[ "$TARGET_ARCH" = "x86_64" ] && PKG_URL="http://www.avermedia-usa.com/AVerTV/Upload/Download/C038A827H826_Installer_x64_0.10-Beta_091126.zip"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain linux"
PKG_PRIORITY="optional"
PKG_SECTION="driver"
PKG_SHORTDESC="AVerTV Hybrid Volar MAX H826 driver"
PKG_LONGDESC="AVerTV Hybrid Volar MAX H826 driver"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -1,65 +0,0 @@
diff -Nr -u0 original/installer/installer.sh modified/installer/installer.sh
--- original/installer/installer.sh 2009-11-13 11:47:33.000000000 +0100
+++ modified/installer/installer.sh 2011-08-28 20:58:38.000000000 +0200
@@ -177,13 +176,0 @@
- if [[ "$kversion" != "2" || "$kpatchlevel" != "6" ]]; then
- dialog --backtitle "$BACKTITLE" \
- --title "Kernel version error" \
- --msgbox "Installer cannot determine kernel version or the running kernel is not 2.6.x kernel. \n\
-Installer will abort now.
-" \
- 10 $WIDTH
- log "generate_kdep_string: wrong kernel version ${kversion}.${kpatchlevel}.${ksublevel}. Abort."
- log_from_file $ksrc/Makefile #s016
- log_from_file $kobj/Makefile #s016
- exit
- fi
-
diff -Nr -u0 original/installer/src/aver/osdep.c modified/installer/src/aver/osdep.c
--- original/installer/src/aver/osdep.c 2009-11-13 11:54:56.000000000 +0100
+++ modified/installer/src/aver/osdep.c 2011-08-28 20:19:19.000000000 +0200
@@ -89 +88,0 @@
-#include <linux/smp_lock.h>
@@ -435 +434 @@
- init_MUTEX(tmp);
+ sema_init(tmp, 1);
@@ -439 +438 @@
- init_MUTEX_LOCKED(tmp);
+ sema_init(tmp, 0);
@@ -1069,0 +1069 @@
+static DEFINE_MUTEX(dvbdev_mutex);
@@ -1072 +1072 @@
- lock_kernel();
+ mutex_lock(&dvbdev_mutex);
@@ -1077 +1077 @@
- unlock_kernel();
+ mutex_unlock(&dvbdev_mutex);
diff -Nr -u0 original/installer/src/aver/osdep_dvb.c modified/installer/src/aver/osdep_dvb.c
--- original/installer/src/aver/osdep_dvb.c 2009-11-13 11:54:57.000000000 +0100
+++ modified/installer/src/aver/osdep_dvb.c 2011-08-28 20:19:36.000000000 +0200
@@ -79 +78,0 @@
-#include <linux/smp_lock.h>
@@ -233 +232 @@
- init_MUTEX(&p->feedlock);
+ sema_init(&p->feedlock, 1);
diff -Nr -u0 original/installer/src/aver/osdep_th2.c modified/installer/src/aver/osdep_th2.c
--- original/installer/src/aver/osdep_th2.c 2009-11-13 11:54:57.000000000 +0100
+++ modified/installer/src/aver/osdep_th2.c 2011-08-28 20:20:00.000000000 +0200
@@ -78 +77,0 @@
-#include <linux/smp_lock.h>
@@ -80,0 +80 @@
+#include "osdep.h"
@@ -90 +90 @@
- lock_kernel();
+ SysLockKernel();
@@ -100 +100 @@
- unlock_kernel();
+ SysUnlockKernel();
diff -Nr -u0 original/installer/src/aver/osdep_v4l2.c modified/installer/src/aver/osdep_v4l2.c
--- original/installer/src/aver/osdep_v4l2.c 2009-11-13 11:54:58.000000000 +0100
+++ modified/installer/src/aver/osdep_v4l2.c 2011-08-28 20:20:19.000000000 +0200
@@ -75,0 +76,2 @@
+#define VFL_TYPE_VTX 3
+
@@ -84 +85,0 @@
-#include <linux/smp_lock.h>

View File

@ -1 +0,0 @@
http://linuxtv.org/wiki/index.php/AVerMedia_AverTV_Hybrid_Volar_HX_(A827)

View File

@ -1,11 +0,0 @@
diff -Naur AVERMEDIA-Linux-x64-H826D-0.10-beta/installer/src/driver-core.c AVERMEDIA-Linux-x64-H826D-0.10-beta.patch/installer/src/driver-core.c
--- AVERMEDIA-Linux-x64-H826D-0.10-beta/installer/src/driver-core.c 2009-11-13 11:54:59.000000000 +0100
+++ AVERMEDIA-Linux-x64-H826D-0.10-beta.patch/installer/src/driver-core.c 2011-12-21 02:32:24.008225956 +0100
@@ -81,6 +81,7 @@
#include "aver/id.h"
#include "driver-core.h"
#include <linux/version.h>
+#include <linux/module.h>

View File

@ -1,13 +0,0 @@
diff --git a/installer/src/Makefile b/installer/src/Makefile
index 7679c65..a83fb0b 100644
--- a/installer/src/Makefile
+++ b/installer/src/Makefile
@@ -56,7 +56,7 @@ h826d-objs := $(COBJS) $(PREBUILD_OBJ)
averusbh826d-objs := aver/averusb-mod.o
default:: links
$(MAKE) -C $(KERNELSRC) O=$(KERNELOBJ) SUBDIRS=`pwd` $(TARGET)
- $(CROSS_COMPILE)strip --strip-debug *.ko
+ $(STRIP) --strip-debug *.ko

View File

@ -1,52 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program 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, or (at your option)
# any later version.
#
# This Program 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.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
ZIP_PKG="`echo $PKG_URL | sed 's%.*/\(.*\)$%\1%'`"
mkdir -p $BUILD/${PKG_NAME}-${PKG_VERSION}
unzip $SOURCES/$1/$ZIP_PKG -d $BUILD/${PKG_NAME}-${PKG_VERSION} >/dev/null 2>&1
tail -n +115 $BUILD/${PKG_NAME}-${PKG_VERSION}/H826D_Installer_*/AVERMEDIA-Linux-*-H826D-0.10-beta.sh | bzip2 -d | tar xf - -C $BUILD/${PKG_NAME}-${PKG_VERSION}
# this code is copied from scripts/unpack
PKG_BUILD=`ls -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION}`
for i in $PKG_DIR/patches-manual/$PKG_NAME-$PKG_VERSION*.patch ; do
if [ -f "$i" ]; then
PATCH=`basename $i`
PT=`echo $PATCH | sed 's/.*\.\(.*\)$/\1/'`
if [ "$PT" != "patch" -a "$PT" != "$TARGET_ARCH" ]; then
printf "%${INDENT}c SKIP PATCH: $i\n" >&$SILENT_OUT
continue;
else
printf "%${INDENT}c APPLY PATCH: $i\n" >&$SILENT_OUT
cat $i | patch -p1 -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT
fi
fi
done
# prebuild objects were hex edited for kernel 3.1
[ "$TARGET_ARCH" = "x86_64" ] && KVSTR=x64
[ "$TARGET_ARCH" = "i386" ] && KVSTR=4GREG
cp -rf $PKG_DIR/kdep_2.6.30/OBJ-$KVSTR/* $BUILD/${PKG_NAME}-${PKG_VERSION}/installer/src

View File

@ -0,0 +1,266 @@
From dcda5806165c155d90b9aa466a1602cf4726012b Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 12 Oct 2012 17:24:51 +0200
Subject: [PATCH] ALSA: hda - Add workaround for conflicting IEC958 controls
When both an SPDIF and an HDMI device are created on the same card
instance, multiple IEC958 controls are created with indices=0, 1, ...
But the alsa-lib configuration can't know which index corresponds
actually to which PCM device, and both the SPDIF and the HDMI
configurations point to the first IEC958 control wrongly.
This patch introduces a (hackish and ugly) workaround: the IEC958
controls for the SPDIF device are re-labeled with device=1 when HDMI
coexists. The device=1 corresponds to the actual PCM device for
SPDIF, so it's anyway a better representation. In future, HDMI
controls should be moved with the corresponding PCM device number,
too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_codec.c | 60 ++++++++++++++++++++++++++++------------
sound/pci/hda/hda_codec.h | 1 +
sound/pci/hda/hda_local.h | 8 +++--
sound/pci/hda/patch_cirrus.c | 5 ++-
sound/pci/hda/patch_hdmi.c | 7 ++--
sound/pci/hda/patch_realtek.c | 7 ++--
sound/pci/hda/patch_sigmatel.c | 7 ++--
7 files changed, 63 insertions(+), 32 deletions(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index ee958a7..2da7875 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2166,12 +2166,12 @@ EXPORT_SYMBOL_HDA(snd_hda_set_vmaster_tlv);
/* find a mixer control element with the given name */
static struct snd_kcontrol *
-_snd_hda_find_mixer_ctl(struct hda_codec *codec,
- const char *name, int idx)
+find_mixer_ctl(struct hda_codec *codec, const char *name, int dev, int idx)
{
struct snd_ctl_elem_id id;
memset(&id, 0, sizeof(id));
id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
+ id.device = dev;
id.index = idx;
if (snd_BUG_ON(strlen(name) >= sizeof(id.name)))
return NULL;
@@ -2189,15 +2189,16 @@ _snd_hda_find_mixer_ctl(struct hda_codec *codec,
struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec,
const char *name)
{
- return _snd_hda_find_mixer_ctl(codec, name, 0);
+ return find_mixer_ctl(codec, name, 0, 0);
}
EXPORT_SYMBOL_HDA(snd_hda_find_mixer_ctl);
-static int find_empty_mixer_ctl_idx(struct hda_codec *codec, const char *name)
+static int find_empty_mixer_ctl_idx(struct hda_codec *codec, const char *name,
+ int dev)
{
int idx;
for (idx = 0; idx < 16; idx++) { /* 16 ctlrs should be large enough */
- if (!_snd_hda_find_mixer_ctl(codec, name, idx))
+ if (!find_mixer_ctl(codec, name, dev, idx))
return idx;
}
return -EBUSY;
@@ -3148,26 +3149,48 @@ static struct snd_kcontrol_new dig_mixes[] = {
};
/**
- * snd_hda_create_spdif_out_ctls - create Output SPDIF-related controls
+ * snd_hda_create_dig_out_ctls - create Output SPDIF-related controls
* @codec: the HDA codec
- * @nid: audio out widget NID
- *
- * Creates controls related with the SPDIF output.
- * Called from each patch supporting the SPDIF out.
+ * @associated_nid: NID that new ctls associated with
+ * @cvt_nid: converter NID
+ * @type: HDA_PCM_TYPE_*
+ * Creates controls related with the digital output.
+ * Called from each patch supporting the digital out.
*
* Returns 0 if successful, or a negative error code.
*/
-int snd_hda_create_spdif_out_ctls(struct hda_codec *codec,
- hda_nid_t associated_nid,
- hda_nid_t cvt_nid)
+int snd_hda_create_dig_out_ctls(struct hda_codec *codec,
+ hda_nid_t associated_nid,
+ hda_nid_t cvt_nid,
+ int type)
{
int err;
struct snd_kcontrol *kctl;
struct snd_kcontrol_new *dig_mix;
- int idx;
+ int idx, dev = 0;
+ const int spdif_pcm_dev = 1;
struct hda_spdif_out *spdif;
- idx = find_empty_mixer_ctl_idx(codec, "IEC958 Playback Switch");
+ if (codec->primary_dig_out_type == HDA_PCM_TYPE_HDMI &&
+ type == HDA_PCM_TYPE_SPDIF) {
+ dev = spdif_pcm_dev;
+ } else if (codec->primary_dig_out_type == HDA_PCM_TYPE_SPDIF &&
+ type == HDA_PCM_TYPE_HDMI) {
+ for (idx = 0; idx < codec->spdif_out.used; idx++) {
+ spdif = snd_array_elem(&codec->spdif_out, idx);
+ for (dig_mix = dig_mixes; dig_mix->name; dig_mix++) {
+ kctl = find_mixer_ctl(codec, dig_mix->name, 0, idx);
+ if (!kctl)
+ break;
+ kctl->id.device = spdif_pcm_dev;
+ }
+ }
+ codec->primary_dig_out_type = HDA_PCM_TYPE_HDMI;
+ }
+ if (!codec->primary_dig_out_type)
+ codec->primary_dig_out_type = type;
+
+ idx = find_empty_mixer_ctl_idx(codec, "IEC958 Playback Switch", dev);
if (idx < 0) {
printk(KERN_ERR "hda_codec: too many IEC958 outputs\n");
return -EBUSY;
@@ -3177,6 +3200,7 @@ int snd_hda_create_spdif_out_ctls(struct hda_codec *codec,
kctl = snd_ctl_new1(dig_mix, codec);
if (!kctl)
return -ENOMEM;
+ kctl->id.device = dev;
kctl->id.index = idx;
kctl->private_value = codec->spdif_out.used - 1;
err = snd_hda_ctl_add(codec, associated_nid, kctl);
@@ -3189,7 +3213,7 @@ int snd_hda_create_spdif_out_ctls(struct hda_codec *codec,
spdif->status = convert_to_spdif_status(spdif->ctls);
return 0;
}
-EXPORT_SYMBOL_HDA(snd_hda_create_spdif_out_ctls);
+EXPORT_SYMBOL_HDA(snd_hda_create_dig_out_ctls);
/* get the hda_spdif_out entry from the given NID
* call within spdif_mutex lock
@@ -3364,7 +3388,7 @@ int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid)
struct snd_kcontrol_new *dig_mix;
int idx;
- idx = find_empty_mixer_ctl_idx(codec, "IEC958 Capture Switch");
+ idx = find_empty_mixer_ctl_idx(codec, "IEC958 Capture Switch", 0);
if (idx < 0) {
printk(KERN_ERR "hda_codec: too many IEC958 inputs\n");
return -EBUSY;
@@ -4472,7 +4496,7 @@ int snd_hda_add_new_ctls(struct hda_codec *codec,
addr = codec->addr;
else if (!idx && !knew->index) {
idx = find_empty_mixer_ctl_idx(codec,
- knew->name);
+ knew->name, 0);
if (idx <= 0)
return err;
} else
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 10a03b0..62d4229 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -836,6 +836,7 @@ struct hda_codec {
struct mutex hash_mutex;
struct snd_array spdif_out;
unsigned int spdif_in_enable; /* SPDIF input enable? */
+ int primary_dig_out_type; /* primary digital out PCM type */
const hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */
struct snd_array init_pins; /* initial (BIOS) pin configurations */
struct snd_array driver_pins; /* pin configs set by codec parser */
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index 09dbdc3..8c43198 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -240,9 +240,11 @@ int snd_hda_mixer_bind_tlv(struct snd_kcontrol *kcontrol, int op_flag,
/*
* SPDIF I/O
*/
-int snd_hda_create_spdif_out_ctls(struct hda_codec *codec,
- hda_nid_t associated_nid,
- hda_nid_t cvt_nid);
+int snd_hda_create_dig_out_ctls(struct hda_codec *codec,
+ hda_nid_t associated_nid,
+ hda_nid_t cvt_nid, int type);
+#define snd_hda_create_spdif_out_ctls(codec, anid, cnid) \
+ snd_hda_create_dig_out_ctls(codec, anid, cnid, HDA_PCM_TYPE_SPDIF)
int snd_hda_create_spdif_in_ctls(struct hda_codec *codec, hda_nid_t nid);
/*
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 61a7113..a7f8790 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -873,8 +873,9 @@ static int build_digital_output(struct hda_codec *codec)
if (!spec->multiout.dig_out_nid)
return 0;
- err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid,
- spec->multiout.dig_out_nid);
+ err = snd_hda_create_dig_out_ctls(codec, spec->multiout.dig_out_nid,
+ spec->multiout.dig_out_nid,
+ spec->pcm_rec[1].pcm_type);
if (err < 0)
return err;
err = snd_hda_create_spdif_share_sw(codec, &spec->multiout);
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 71555cc..39ca100 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1589,9 +1589,10 @@ static int generic_hdmi_build_controls(struct hda_codec *codec)
if (err < 0)
return err;
- err = snd_hda_create_spdif_out_ctls(codec,
- per_pin->pin_nid,
- per_pin->mux_nids[0]);
+ err = snd_hda_create_dig_out_ctls(codec,
+ per_pin->pin_nid,
+ per_pin->mux_nids[0],
+ HDA_PCM_TYPE_HDMI);
if (err < 0)
return err;
snd_hda_spdif_ctls_unassign(codec, pin_idx);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8253b4e..2d2bb66 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1836,9 +1836,10 @@ static int __alc_build_controls(struct hda_codec *codec)
return err;
}
if (spec->multiout.dig_out_nid) {
- err = snd_hda_create_spdif_out_ctls(codec,
- spec->multiout.dig_out_nid,
- spec->multiout.dig_out_nid);
+ err = snd_hda_create_dig_out_ctls(codec,
+ spec->multiout.dig_out_nid,
+ spec->multiout.dig_out_nid,
+ spec->pcm_rec[1].pcm_type);
if (err < 0)
return err;
if (!spec->no_analog) {
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 770013f..6214165 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1136,9 +1136,10 @@ static int stac92xx_build_controls(struct hda_codec *codec)
}
if (spec->multiout.dig_out_nid) {
- err = snd_hda_create_spdif_out_ctls(codec,
- spec->multiout.dig_out_nid,
- spec->multiout.dig_out_nid);
+ err = snd_hda_create_dig_out_ctls(codec,
+ spec->multiout.dig_out_nid,
+ spec->multiout.dig_out_nid,
+ spec->autocfg.dig_out_type[0]);
if (err < 0)
return err;
err = snd_hda_create_spdif_share_sw(codec,
--
1.7.7.6

View File

@ -0,0 +1,66 @@
From b3ed803a1f4012a5067087674b8b1efad22d2bb0 Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Sun, 3 Feb 2013 17:28:34 +0200
Subject: [PATCH] ALSA: hda - Fix default multichannel HDMI mapping regression
Commit d45e6889ee69456a4d5b1bbb32252f460cd48fa9 ("ALSA: hda - Provide
the proper channel mapping for generic HDMI driver") added support for
custom channel maps in the HDA HDMI driver. Due to a mistake in an
'if' condition the custom map is always used even when no such map has
been set. This causes incorrect channel mapping for multichannel audio
by default.
Pass per_pin->chmap_set to hdmi_setup_channel_mapping() as a parameter
so that it can use it for detecting if a custom map has been set instead
of checking if map is NULL (which is never the case).
Reported-by: Staffan Lindberg <pike@xbmc.org>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: stable@vger.kernel.org
---
This also affects stable 3.7, but not earlier versions.
sound/pci/hda/patch_hdmi.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 807a2aa..e85959f 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -714,9 +714,10 @@ static void hdmi_setup_fake_chmap(unsigned char *map, int ca)
static void hdmi_setup_channel_mapping(struct hda_codec *codec,
hda_nid_t pin_nid, bool non_pcm, int ca,
- int channels, unsigned char *map)
+ int channels, unsigned char *map,
+ bool chmap_set)
{
- if (!non_pcm && map) {
+ if (!non_pcm && chmap_set) {
hdmi_manual_setup_channel_mapping(codec, pin_nid,
channels, map);
} else {
@@ -905,7 +906,8 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
pin_nid,
channels);
hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
- channels, per_pin->chmap);
+ channels, per_pin->chmap,
+ per_pin->chmap_set);
hdmi_stop_infoframe_trans(codec, pin_nid);
hdmi_fill_audio_infoframe(codec, pin_nid,
ai.bytes, sizeof(ai));
@@ -915,7 +917,8 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
* accordingly */
if (per_pin->non_pcm != non_pcm)
hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
- channels, per_pin->chmap);
+ channels, per_pin->chmap,
+ per_pin->chmap_set);
}
per_pin->non_pcm = non_pcm;
--
1.7.10

View File

@ -22,9 +22,6 @@
. config/options $1
# disable build of GOOM until its fixed
XBMC_VIS_GOOM="no"
if [ "$DISPLAYSERVER" = "xorg-server" ]; then
XBMC_XORG="--enable-x11 --enable-xrandr"
else

View File

@ -0,0 +1,39 @@
From ac86e23aa11861a4fa063fb2fa05f10cbc4eea19 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Fri, 1 Feb 2013 18:37:20 +0000
Subject: [PATCH] [rbp] Avoid blocking the video thread keeping the video fifo
full. OpenMAX IL is an asynchronous media player. The key
to getting good performance is to ensure the audio and
video fifo have sufficient data to withstand any processing
spikes by the ARM. Ideally the fifos would allow the arm to
crash, and video and audio playback to continue smoothly
for a couple of seconds.
I've examined the fifo behaviour, and found the video fifo is always almost empty. (The audio fifo is full).
It turns out that the PlayerVideo task (which submits video frames to GPU fifo) blocks until the presentation time has arrived before calling FlipPage (in order to keep subtitles etc. synced).
This is very bad. We generally only one frame of video data in the GPU fifo. This means a spike in ARM workload (e.g. bringing up OSD, or a peak in bitrate) causes the fifo to empty and video to stutter.
The patch here avoids blocking, and lets the FlipPage happen on a later packet.
I've found with this patch, my test clip (1080p with software DTS audio decode) I can play without stuttering at 700MHz. Without this patch it fails to play even at 1000MHz.
---
xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
index 90f94aa..5f3f050 100644
--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp
@@ -455,8 +455,8 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket)
double pts_media = m_av_clock->OMXMediaTime(false, false);
ProcessOverlays(iGroupId, pts_media);
- while(!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < (iCurrentClock + iSleepTime + DVD_MSEC_TO_TIME(500)) )
- Sleep(1);
+ if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < (iCurrentClock + iSleepTime + DVD_MSEC_TO_TIME(500)) )
+ return;
g_renderManager.FlipPage(CThread::m_bStop, (iCurrentClock + iSleepTime) / DVD_TIME_BASE, -1, FS_NONE);
--
1.7.10

View File

@ -0,0 +1,91 @@
From 5016973c68567e0691c9dc6c14d78de9e7d4558c Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Fri, 25 Jan 2013 23:00:13 +0000
Subject: [PATCH] [rbp] Add support for new video codecs Latest firmware has a
start_x.elf with support for additional codecs. These are
MJPEG, VP6, VP8 and Ogg Theora. They are software GPU
accelerated and should be good for SD resolutions. This
update should be harmless with firmware that doesn't
support the new codecs - they will fail to open and behave
as before.
---
xbmc/cores/omxplayer/OMXVideo.cpp | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp
index 9215fd9..45e10fe 100644
--- a/xbmc/cores/omxplayer/OMXVideo.cpp
+++ b/xbmc/cores/omxplayer/OMXVideo.cpp
@@ -69,7 +69,10 @@
#define OMX_MPEG2V_DECODER OMX_VIDEO_DECODER
#define OMX_VC1_DECODER OMX_VIDEO_DECODER
#define OMX_WMV3_DECODER OMX_VIDEO_DECODER
+#define OMX_VP6_DECODER OMX_VIDEO_DECODER
#define OMX_VP8_DECODER OMX_VIDEO_DECODER
+#define OMX_THEORA_DECODER OMX_VIDEO_DECODER
+#define OMX_MJPEG_DECODER OMX_VIDEO_DECODER
#define MAX_TEXT_LENGTH 1024
@@ -145,6 +148,7 @@ bool COMXVideo::NaluFormatStartCodes(enum CodecID codec, uint8_t *in_extradata,
bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace, bool hdmi_clock_sync)
{
+ bool vflip = false;
Close();
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
@@ -248,6 +252,18 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace, b
m_codingType = OMX_VIDEO_CodingMPEG4;
m_video_codec_name = "omx-h263";
break;
+ case CODEC_ID_VP6:
+ // this form is encoded upside down
+ vflip = true;
+ // fall through
+ case CODEC_ID_VP6F:
+ case CODEC_ID_VP6A:
+ // (role name) video_decoder.vp6
+ // VP6
+ decoder_name = OMX_VP6_DECODER;
+ m_codingType = OMX_VIDEO_CodingVP6;
+ m_video_codec_name = "omx-vp6";
+ break;
case CODEC_ID_VP8:
// (role name) video_decoder.vp8
// VP8
@@ -255,6 +271,21 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace, b
m_codingType = OMX_VIDEO_CodingVP8;
m_video_codec_name = "omx-vp8";
break;
+ case CODEC_ID_THEORA:
+ // (role name) video_decoder.theora
+ // theora
+ decoder_name = OMX_THEORA_DECODER;
+ m_codingType = OMX_VIDEO_CodingTheora;
+ m_video_codec_name = "omx-theora";
+ break;
+ case CODEC_ID_MJPEG:
+ case CODEC_ID_MJPEGB:
+ // (role name) video_decoder.mjpg
+ // mjpg
+ decoder_name = OMX_MJPEG_DECODER;
+ m_codingType = OMX_VIDEO_CodingMJPEG;
+ m_video_codec_name = "omx-mjpeg";
+ break;
case CODEC_ID_VC1:
case CODEC_ID_WMV3:
// (role name) video_decoder.vc1
@@ -594,6 +625,8 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace, b
configDisplay.transform = OMX_DISPLAY_ROT0;
break;
}
+ if (vflip)
+ configDisplay.transform = OMX_DISPLAY_MIRROR_ROT180;
omx_err = m_omx_render.SetConfig(OMX_IndexConfigDisplayRegion, &configDisplay);
if(omx_err != OMX_ErrorNone)
--
1.7.10

View File

@ -0,0 +1,26 @@
From 5c61cc2c3ef7b047060742d736fd2a8cc037ae57 Mon Sep 17 00:00:00 2001
From: Jim Carroll <thecarrolls@jiminger.com>
Date: Sun, 3 Feb 2013 16:31:51 -0500
Subject: [PATCH] Remove some annoying log-spam.
---
xbmc/interfaces/python/CallbackHandler.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbmc/interfaces/python/CallbackHandler.cpp b/xbmc/interfaces/python/CallbackHandler.cpp
index 01707b9..61c0b5f 100644
--- a/xbmc/interfaces/python/CallbackHandler.cpp
+++ b/xbmc/interfaces/python/CallbackHandler.cpp
@@ -35,8 +35,8 @@
*/
PythonCallbackHandler::PythonCallbackHandler() : RetardedAsynchCallbackHandler("PythonCallbackHandler")
{
+ TRACE;
objectThreadState = PyThreadState_Get();
- CLog::Log(LOGDEBUG,"NEWADDON PythonCallbackHandler construction with PyThreadState 0x%lx",(long)objectThreadState);
}
/**
--
1.7.10

View File

@ -293,7 +293,7 @@
LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz"
# Modules to install in initramfs for early boot
INITRAMFS_MODULES=""
INITRAMFS_MODULES="uvesafb xhci-hcd"
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,