alarm/kodi-rbp: spdif/toslink passthrough fix for hifiberry-digi+ card #1468

This commit is contained in:
Lukasz Jankowski 2017-03-27 01:39:18 +01:00 committed by Oleg Rakhmanov
parent 709bbaf35b
commit f8947586b6
2 changed files with 21 additions and 3 deletions

View file

@ -13,7 +13,7 @@ pkgbase=kodi-rbp
pkgname=('kodi-rbp' 'kodi-rbp-eventclients' 'kodi-rbp-tools-texturepacker' 'kodi-rbp-dev')
_codename=Krypton
pkgver=17.1
pkgrel=1
pkgrel=2
arch=('armv6h' 'armv7h')
url="http://kodi.tv"
license=('GPL2')
@ -29,14 +29,16 @@ source=("https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
'99-kodi.rules'
'https://github.com/popcornmix/xbmc/commit/0c320b6cdd4fb409be45008e6b9042463d54b742.patch'
'https://github.com/popcornmix/xbmc/commit/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch'
'polkit.rules')
'polkit.rules'
'hifiberry_digi.patch')
sha256sums=('303f3903cbb57ccc2961f09cf3746505542bcb129a464f0687d7ca8601cebbee'
'5235068d5800d69f0287087815990e7fe8d6572733d60c8800546d35f608e87f'
'b31570f95654434b01fd8531612fbb6be77cbc1c519dd60f92feae26eb160f3d'
'813f8c622c341eefb33774115199d2abe9c189cf2ce52e79719dbd42d48a1274'
'd830c010ead152bc9a9ba6b812c985d6e649bda7480fec9b3c451f5ea03ba792'
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96')
'9ea592205023ba861603d74b63cdb73126c56372a366dc4cb7beb379073cbb96'
'0b9d951911a8576c26dec8a31f394282677e48afff49b9579448121d27b8509e')
prepare() {
cd "$srcdir/xbmc-$pkgver-$_codename"
@ -44,6 +46,8 @@ prepare() {
patch -Np1 -i "$srcdir/0c320b6cdd4fb409be45008e6b9042463d54b742.patch"
# fix for files with GMC
patch -Np1 -i "$srcdir/4d983105d7fd65b1d92f2ae2602e6e1cdcaddbe0.patch"
# fix for lack of passthrough audio with hifiberry-digi+ card
patch -Np1 -i "$srcdir/hifiberry_digi.patch"
[[ -d kodi-build ]] && rm -rf kodi-build
mkdir $srcdir/kodi-build

View file

@ -0,0 +1,14 @@
diff -rupN a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2016-04-24 07:48:30.000000000 +0100
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2016-07-06 23:15:14.851453568 +0100
@@ -1342,6 +1342,10 @@ void CAESinkALSA::EnumerateDevice(AEDevi
if (snd_card_get_name(cardNr, &cardName) == 0)
info.m_displayName = cardName;
+ /* hifiberry digi doesn't correctly report as iec958 device. Needs fixing in kernel driver */
+ if (info.m_displayName == "snd_rpi_hifiberry_digi")
+ info.m_deviceType = AE_DEVTYPE_IEC958;
+
if (info.m_deviceType == AE_DEVTYPE_HDMI && info.m_displayName.size() > 5 &&
info.m_displayName.substr(info.m_displayName.size()-5) == " HDMI")
{