Merge pull request #2073 from chewitt/slice-8.2

slice: add projects and other changes for Slice and Slice3
This commit is contained in:
MilhouseVH 2017-10-09 03:40:43 +01:00 committed by GitHub
commit c40f234923
62 changed files with 1912 additions and 10 deletions

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View 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() {
:
}

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View 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
}

View 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/
}

View File

@ -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() {

View File

@ -188,6 +188,10 @@ else
KODI_ARCH="-DWITH_ARCH=$TARGET_ARCH"
fi
if [ "$PROJECT" = "Slice" -o "$PROJECT" = "Slice3" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET led_tools"
fi
if [ ! "$KODIPLAYER_DRIVER" = default ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET $KODIPLAYER_DRIVER"
if [ "$KODIPLAYER_DRIVER" = bcm2835-driver ]; then
@ -333,6 +337,9 @@ post_makeinstall_target() {
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "os.openelec.tv" $ADDON_MANIFEST
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "repository.libreelec.tv" $ADDON_MANIFEST
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "service.libreelec.settings" $ADDON_MANIFEST
if [ "$PROJECT" = "Slice" -o "$PROJECT" = "Slice3" ]; then
xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "service.slice" $ADDON_MANIFEST
fi
# more binaddons cross compile badness meh
sed -e "s:INCLUDE_DIR /usr/include/kodi:INCLUDE_DIR $SYSROOT_PREFIX/usr/include/kodi:g" \

View File

@ -31,10 +31,7 @@ PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
make_target() {
if [ -f $DISTRO_DIR/$DISTRO/config/dt-blob.dts ]; then
echo Compiling device tree blob
$(kernel_path)/scripts/dtc/dtc -O dtb -o dt-blob.bin $DISTRO_DIR/$DISTRO/config/dt-blob.dts
fi
:
}
makeinstall_target() {
@ -43,17 +40,24 @@ makeinstall_target() {
cp -PRv bootcode.bin $INSTALL/usr/share/bootloader
cp -PRv fixup_x.dat $INSTALL/usr/share/bootloader/fixup.dat
cp -PRv start_x.elf $INSTALL/usr/share/bootloader/start.elf
[ -f dt-blob.bin ] && cp -PRv dt-blob.bin $INSTALL/usr/share/bootloader/dt-blob.bin
cp -PRv $PKG_DIR/scripts/update.sh $INSTALL/usr/share/bootloader
if [ -f $DISTRO_DIR/$DISTRO/config/distroconfig.txt ]; then
if [ -f $PROJECT_DIR/$PROJECT/devices/$DEVICE/config/distroconfig.txt ]; then
cp -PRv $PROJECT_DIR/$PROJECT/devices/$DEVICE/config/distroconfig.txt $INSTALL/usr/share/bootloader
elif [ -f $PROJECT_DIR/$PROJECT/config/distroconfig.txt ]; then
cp -PRv $PROJECT_DIR/$PROJECT/config/distroconfig.txt $INSTALL/usr/share/bootloader
elif [ -f $DISTRO_DIR/$DISTRO/config/distroconfig.txt ]; then
cp -PRv $DISTRO_DIR/$DISTRO/config/distroconfig.txt $INSTALL/usr/share/bootloader
else
cp -PRv $PKG_DIR/files/3rdparty/bootloader/distroconfig.txt $INSTALL/usr/share/bootloader
fi
if [ -f $DISTRO_DIR/$DISTRO/config/config.txt ]; then
if [ -f $PROJECT_DIR/$PROJECT/devices/$DEVICE/config/config.txt ]; then
cp -PRv $PROJECT_DIR/$PROJECT/devices/$DEVICE/config/config.txt $INSTALL/usr/share/bootloader
elif [ -f $PROJECT_DIR/$PROJECT/config/config.txt ]; then
cp -PRv $PROJECT_DIR/$PROJECT/config/config.txt $INSTALL/usr/share/bootloader
elif [ -f $DISTRO_DIR/$DISTRO/config/config.txt ]; then
cp -PRv $DISTRO_DIR/$DISTRO/config/config.txt $INSTALL/usr/share/bootloader
else
cp -PRv $PKG_DIR/files/3rdparty/bootloader/config.txt $INSTALL/usr/share/bootloader

View File

@ -25,7 +25,7 @@ mkdir -p $RELEASE_DIR/3rdparty/bootloader
cp -PR $BUILD/bcm2835-bootloader-*/bootcode.bin $RELEASE_DIR/3rdparty/bootloader/
cp -PR $BUILD/bcm2835-bootloader-*/fixup_x.dat $RELEASE_DIR/3rdparty/bootloader/fixup.dat
cp -PR $BUILD/bcm2835-bootloader-*/start_x.elf $RELEASE_DIR/3rdparty/bootloader/start.elf
[ -f $BUILD/bcm2835-bootloader-*/dt-blob.bin ] && cp -PR $BUILD/bcm2835-bootloader-*/dt-blob.bin $RELEASE_DIR/3rdparty/bootloader/
[ -f $BUILD/slice-firmware-*/dt-blob.bin ] && cp -PR $BUILD/slice-firmware-*/dt-blob.bin $RELEASE_DIR/3rdparty/bootloader/
cp -PR $INSTALL/usr/share/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/
cp -PR $INSTALL/usr/share/bootloader/overlays $RELEASE_DIR/3rdparty/bootloader/
cp -PR $INSTALL/usr/share/bootloader/config.txt $RELEASE_DIR/3rdparty/bootloader/

View File

@ -0,0 +1,44 @@
###############################################################################
# This file is part of LibreELEC - https://LibreELEC.tv
# Copyright (C) 2014 Gordon Hollingworth (gordon@fiveninjas.com)
#
# 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="led_tools"
PKG_VERSION="0.1"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.fiveninjas.com"
PKG_URL="http://updates.fiveninjas.com/src/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain zlib libpng slice-addon"
PKG_DEPENDS_HOST="toolchain"
PKG_SECTION="tools"
PKG_SHORTDESC="led_tools"
PKG_LONGDESC="LED tools, these are a set of tools to control the LEDs on Slice"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
make_target() {
make CC="$CC" \
CFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS"
}
makeinstall_target() {
mkdir -p $INSTALL/usr/bin
cp led_png $INSTALL/usr/bin
}

View File

@ -0,0 +1,43 @@
################################################################################
# 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-addon"
PKG_VERSION="1.0"
PKG_REV="101"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE=""
PKG_URL=""
PKG_DEPENDS_TARGET=""
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="no"
make_target() {
(
cd $ROOT
scripts/create_addon slice
)
}
makeinstall_target() {
mkdir -p $INSTALL/usr/share/kodi/addons
cp -R $BUILD/$ADDONS/slice/service.slice $INSTALL/usr/share/kodi/addons
}

View File

@ -2846,7 +2846,7 @@ CONFIG_SND_SOC_ADAU7002=m
# CONFIG_SND_SOC_CS42L52 is not set
# CONFIG_SND_SOC_CS42L56 is not set
# CONFIG_SND_SOC_CS42L73 is not set
# CONFIG_SND_SOC_CS4265 is not set
CONFIG_SND_SOC_CS4265=m
# CONFIG_SND_SOC_CS4270 is not set
# CONFIG_SND_SOC_CS4271_I2C is not set
# CONFIG_SND_SOC_CS4271_SPI is not set

View File

@ -2939,7 +2939,7 @@ CONFIG_SND_SOC_ADAU7002=m
# CONFIG_SND_SOC_CS42L52 is not set
# CONFIG_SND_SOC_CS42L56 is not set
# CONFIG_SND_SOC_CS42L73 is not set
# CONFIG_SND_SOC_CS4265 is not set
CONFIG_SND_SOC_CS4265=m
# CONFIG_SND_SOC_CS4270 is not set
# CONFIG_SND_SOC_CS4271_I2C is not set
# CONFIG_SND_SOC_CS4271_SPI is not set

View File

@ -0,0 +1,23 @@
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 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/>.
################################################################################
# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!
dtoverlay=slice
dtoverlay=ws2812
dtoverlay=mmc

View File

@ -0,0 +1,172 @@
// Definitions for Slice hardware
/dts-v1/;
/plugin/;
#include "dt-bindings/clock/bcm2835.h"
/ {
compatible = "brcm,bcm2708";
//
// Set up GPIOs:
// I2C1 on GPIO44,45
// LIRC input/output on GPIO4 and 37 (NB GPIO4 NC on Slice)
// I2S on GPIO28-31
//
fragment@0 {
target = <&gpio>;
__overlay__ {
i2c1_pins: i2c1 {
brcm,pins = <44 45>;
brcm,function = <6>; /* alt2 */
};
lirc_pins: lirc_pins {
brcm,pins = <4 37>; // <out in>
brcm,function = <1 0>; // out in
brcm,pull = <0 1>; // off down
};
i2s_pins: i2s {
brcm,pins = <28 29 30 31>;
brcm,function = <6>; /* alt2 */
};
ws2812_pins: ws2812 {
brcm,pins = <40>;
brcm,function = <4>; /* alt0 */
};
};
};
//
// I2C at 100KHz
//
fragment@1 {
target = <&i2c1>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <100000>;
};
};
//
// Add devices to I2C1 Bus:
// PCF8523 RTC device
// CS4265 Audio CODEC
//
fragment@2 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pcf8523@68 {
compatible = "nxp,pcf8523";
reg = <0x68>;
nxp,xtalcap-7pf; /* set crystal load to 7pf */
status = "okay";
};
cs4265@4e {
#sound-dai-cells = <0>;
compatible = "cirrus,cs4265";
reg = <0x4e>;
cs4265-reset-gpios = <&gpio 33 0>; /* AUD_RST_N on GPIO33 */
cirrus,no-s16le; /* remove S16LE support to workaround I2S controller issue */
status = "okay";
};
};
};
//
// LIRC
//
fragment@3 {
target-path = "/";
__overlay__ {
lirc_rpi: lirc_rpi {
compatible = "rpi,lirc-rpi";
pinctrl-names = "default";
pinctrl-0 = <&lirc_pins>;
status = "okay";
// Override autodetection of IR receiver circuit
// (0 = active high, 1 = active low, -1 = no override )
rpi,sense = <0xffffffff>;
// Software carrier
// (0 = off, 1 = on)
rpi,softcarrier = <1>;
// Invert output
// (0 = off, 1 = on)
rpi,invert = <0>;
// Enable debugging messages
// (0 = off, 1 = on)
rpi,debug = <0>;
};
};
};
//
// Audio driver
//
fragment@4 {
#address-cells = <1>;
#size-cells = <1>;
target = <&sound>;
__overlay__ {
compatible = "fiveninjas,slice";
clocks = <&cprman BCM2835_CLOCK_GP0>;
clock-names = "gp0";
pinctrl-names = "default";
i2s-controller = <&i2s>;
status = "okay";
};
};
//
// Enable I2S
//
fragment@5 {
target = <&i2s>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
brcm,enable-mmap;
status = "okay";
};
};
//
// WS2812B LEDs driver
//
fragment@6 {
target = <&soc>;
__overlay__ {
#address-cells = <1>;
#size-cells = <1>;
ws2812: ws2812 {
compatible = "rpi,ws2812";
pinctrl-names = "default";
pinctrl-0 = <&ws2812_pins>;
reg = <0x7e20c000 0x100>; /* PWM */
dmas = <&dma 5>;
dma-names = "pwm_dma";
led-en-gpios = <&gpio 43 0>;
rpi,invert = <1>;
rpi,num_leds = <25>;
status = "okay";
};
};
};
//
// Disable standard audio
//
fragment@7 {
target = <&audio>;
__overlay__ {
status = "disabled";
};
};
};

View File

@ -0,0 +1,33 @@
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2708";
fragment@0 {
target = <&soc>;
__overlay__ {
#address-cells = <1>;
#size-cells = <1>;
ws2812: ws2812 {
compatible = "rpi,ws2812";
reg = <0x7e20c000 0x100>; /* PWM */
dmas = <&dma 5>;
dma-names = "pwm_dma";
led-en-gpios = <&gpio 43 0>;
rpi,invert = <1>;
rpi,num_leds = <25>;
status = "okay";
};
};
};
__overrides__ {
invert = <&ws2812>,"rpi,invert:0";
num_leds = <&ws2812>,"rpi,num_leds:0";
};
};

View File

@ -0,0 +1,2 @@
#!/bin/bash
hdparm -S60 /dev/sda

View File

@ -0,0 +1,19 @@
#!/bin/bash
LEDDIR="/usr/share/kodi/addons/service.slice/resources/media/ledpatterns"
case "$1" in
halt)
hdparm -y /dev/sda
led_png $LEDDIR/shutdown.png
;;
poweroff)
hdparm -y /dev/sda
led_png $LEDDIR/shutdown.png
;;
reboot)
led_png $LEDDIR/shutdown.png
;;
*)
;;
esac

View File

@ -0,0 +1,23 @@
[Unit]
Description=Debug Shell on /dev/console
DefaultDependencies=no
ConditionKernelCommandLine=console
[Service]
WorkingDirectory=/storage
Environment="ENV=/etc/profile"
ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"'
ExecStart=/bin/sh
Restart=always
RestartSec=0
StandardInput=tty
TTYPath=/dev/console
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
[Install]
WantedBy=sysinit.target

View File

@ -0,0 +1,25 @@
<confdir:pcm/iec958.conf>
snd_slice.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.AES0 {
type integer
}
@args.AES1 {
type integer
}
@args.AES2 {
type integer
}
@args.AES3 {
type integer
}
type hooks
slave.pcm {
type hw
card $CARD
}
}

View File

@ -0,0 +1,28 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
# Enable io_is_busy for improved sdhost performance - essentially, equivalent of force_turbo=1 but for mmc
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
# Configure frequency scaling properties - should improve performance a little (turbo, in most cases)
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<showexitbutton>false</showexitbutton>
<remotedelay>1</remotedelay>
<fanartres>720</fanartres>
<imageres>540</imageres>
<samba>
<clienttimeout>30</clienttimeout>
</samba>
</advancedsettings>

1
projects/Slice/linux Symbolic link
View File

@ -0,0 +1 @@
../RPi/linux

143
projects/Slice/options Normal file
View File

@ -0,0 +1,143 @@
################################################################################
# setup system defaults
################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case $TARGET_ARCH in
arm)
# TARGET_CPU:
# arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d
# arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c
# arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t
# arm720t arm740t strongarm strongarm110 strongarm1100
# strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t
# arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi
# arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e
# arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s
# arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4
# cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.
TARGET_CPU="arm1176jzf-s"
# TARGET_FLOAT:
# Specifies which floating-point ABI to use. Permissible values are:
# soft softfp hard
TARGET_FLOAT="hard"
# TARGET_FPU:
# This specifies what floating point hardware (or hardware emulation) is
# available on the target. Permissible names are:
# fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16
# vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16
# neon-vfpv4.
TARGET_FPU="vfp"
;;
esac
# Bootloader to use (syslinux / u-boot / bcm2835-bootloader)
BOOTLOADER="bcm2835-bootloader"
# u-boot version to use (default)
UBOOT_VERSION="default"
# Configuration for u-boot
UBOOT_CONFIG=""
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# Kernel target
KERNEL_TARGET="zImage"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET=""
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD="dtbs overlays/slice.dtbo overlays/ws2812.dtbo"
# Kernel to use. values can be:
# default: default mainline kernel
LINUX="default-rpi"
# NOOBS supported hex versions (legacy)
NOOBS_HEX="2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,0092,0093"
# NOOBS supported model versions
NOOBS_SUPPORTED_MODELS='"Pi Model","Pi Compute Module","Pi Zero"'
################################################################################
# setup build defaults
################################################################################
# Project CFLAGS
PROJECT_CFLAGS=""
# SquashFS compression method (gzip / lzo / xz)
SQUASHFS_COMPRESSION="lzo"
################################################################################
# setup project defaults
################################################################################
# build and install ALSA Audio support (yes / no)
ALSA_SUPPORT="yes"
# OpenGL(X) implementation to use (no / mesa)
OPENGL="no"
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)
OPENGLES="bcm2835-driver"
# include uvesafb support (yes / no)
UVESAFB_SUPPORT="no"
# Displayserver to use (x11 / no)
DISPLAYSERVER="no"
# Windowmanager to use (ratpoison / fluxbox / none)
WINDOWMANAGER="none"
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia)
# Space separated list is supported,
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia"
GRAPHIC_DRIVERS=""
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
KODIPLAYER_DRIVER="bcm2835-driver"
# Modules to install in initramfs for early boot
INITRAMFS_MODULES=""
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-rpi slice-firmware"
# build and install ATV IR remote support (yes / no)
ATVCLIENT_SUPPORT="no"
# build with swap support (yes / no)
SWAP_SUPPORT="yes"
# swap support enabled per default (yes / no)
SWAP_ENABLED_DEFAULT="no"
# swapfile size if SWAP_SUPPORT=yes in MB
SWAPFILESIZE="128"
# build with installer (yes / no)
INSTALLER_SUPPORT="no"
# build debug with valgrind (yes / no)
# Not available for armv6. Increases image size significantly
VALGRIND="no"
# kernel image name
KERNEL_NAME="kernel.img"
# additional drivers to install:
# for a list of additinoal drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS media_build rpi-cirrus-config slice-drivers"

View File

@ -0,0 +1,102 @@
From 073c2c6a118a03b70a29fd302e48f1f75bc7e5bc Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Wed, 24 May 2017 19:17:24 +0100
Subject: [PATCH] Revert "PR11222"
This reverts commit 6cc9ab253753aeb62b01d3e654bbfa77a7f22a42.
---
.../resource.language.en_gb/resources/strings.po | 15 --------------
system/peripherals.xml | 4 +---
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 23 +++++++---------------
3 files changed, 8 insertions(+), 34 deletions(-)
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 6443f3d..e0060d1 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -19745,18 +19745,3 @@ msgstr ""
msgctxt "#39010"
msgid "Select sort method"
msgstr ""
-
-#: system/peripherals.xml
-msgctxt "#38050"
-msgid "Remote button press delay before repeating (ms)"
-msgstr ""
-
-#: system/peripherals.xml
-msgctxt "#38051"
-msgid "Remote button press repeat rate (ms)"
-msgstr ""
-
-#: system/peripherals.xml
-msgctxt "#38052"
-msgid "Remote button press release time (ms)"
-msgstr ""
diff --git a/system/peripherals.xml b/system/peripherals.xml
index 02b1a9e..d5704b2 100644
--- a/system/peripherals.xml
+++ b/system/peripherals.xml
@@ -31,9 +31,7 @@
<setting key="device_type" type="int" value="1" configurable="0" />
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
- <setting key="double_tap_timeout_ms" type="int" min="50" max="1000" step="50" value="300" label="38050" order="16" />
- <setting key="button_repeat_rate_ms" type="int" min="0" max="250" step="10" value="0" label="38051" order="17" />
- <setting key="button_release_delay_ms" type="int" min="0" max="500" step="50" value="0" label="38052" order="18" />
+ <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
</peripheral>
<peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index d04a632..d032ffd 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -803,10 +803,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key)
CLog::Log(LOGDEBUG, "%s - received key %2x duration %d", __FUNCTION__, key.iButton, key.iDuration);
CSingleLock lock(m_critSection);
- // avoid the queue getting too long
- if (m_configuration.iButtonRepeatRateMs && m_buttonQueue.size() > 5)
- return;
- if (m_configuration.iButtonRepeatRateMs == 0 && key.iDuration > 0)
+ if (key.iDuration > 0)
{
if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0)
{
@@ -1299,15 +1296,6 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
m_configuration.bActivateSource = config.bActivateSource;
bChanged |= SetSetting("activate_source", m_configuration.bActivateSource == 1);
- m_configuration.iDoubleTapTimeoutMs = config.iDoubleTapTimeoutMs;
- bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeoutMs);
-
- m_configuration.iButtonRepeatRateMs = config.iButtonRepeatRateMs;
- bChanged |= SetSetting("button_repeat_rate_ms", (int)m_configuration.iButtonRepeatRateMs);
-
- m_configuration.iButtonReleaseDelayMs = config.iButtonReleaseDelayMs;
- bChanged |= SetSetting("button_release_delay_ms", (int)m_configuration.iButtonReleaseDelayMs);
-
m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby;
m_configuration.iFirmwareVersion = config.iFirmwareVersion;
@@ -1403,10 +1391,13 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
m_configuration.bPowerOffOnStandby = iStandbyAction == LOCALISED_ID_SUSPEND ? 1 : 0;
m_bShutdownOnStandby = iStandbyAction == LOCALISED_ID_POWEROFF;
- // double tap prevention timeout in ms
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
+ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
+ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
+#else
+ // backwards compatibility. will be removed once the next major release of libCEC is out
m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
- m_configuration.iButtonRepeatRateMs = GetSettingInt("button_repeat_rate_ms");
- m_configuration.iButtonReleaseDelayMs = GetSettingInt("button_release_delay_ms");
+#endif
if (GetSettingBool("pause_playback_on_deactivate"))
{
--
2.7.4

View File

@ -0,0 +1 @@
../../../RPi/patches/kodi/kodi-001-backport.patch

View File

@ -0,0 +1,45 @@
--- a/system/keymaps/keyboard.xml 2016-09-17 16:35:20.000000000 +0100
+++ b/system/keymaps/keyboard.xml 2016-10-01 19:31:07.928719606 +0100
@@ -56,7 +56,7 @@
<menu mod="longpress">Menu</menu>
<c>ContextMenu</c>
<c mod="longpress">Menu</c>
- <space>Pause</space>
+ <space>PlayPause</space>
<x>Stop</x>
<period>SkipNext</period>
<comma>SkipPrevious</comma>
@@ -321,8 +321,8 @@
<l>NextSubtitle</l>
<left>StepBack</left>
<right>StepForward</right>
- <up>ChapterOrBigStepForward</up>
- <down>ChapterOrBigStepBack</down>
+ <up>VolumeUp</up>
+ <down>VolumeDown</down>
<up mod="longpress">AudioNextLanguage</up>
<down mod="longpress">NextSubtitle</down>
<a>AudioDelay</a>
@@ -425,8 +425,8 @@
<right>StepForward</right>
<left mod="longpress">Rewind</left>
<right mod="longpress">FastForward</right>
- <up>SkipNext</up>
- <down>SkipPrevious</down>
+ <up>VolumeUp</up>
+ <down>VolumeDown</down>
<o>PlayerProcessInfo</o>
<l>LockPreset</l>
<escape>FullScreen</escape>
@@ -632,8 +632,8 @@
<keyboard>
<left>StepBack</left>
<right>StepForward</right>
- <up>Up</up>
- <down>Down</down>
+ <up>VolumeUp</up>
+ <down>VolumeDown</down>
<return>OSD</return>
<enter>OSD</enter>
<return mod="longpress">ActivateWindow(PVROSDChannels)</return>

View File

@ -0,0 +1,10 @@
--- a/xbmc/windows/GUIWindowSystemInfo.cpp 2013-02-21 22:09:04.765734381 +0400
+++ b/xbmc/windows/GUIWindowSystemInfo.cpp 2013-02-22 16:12:57.942164800 +0400
@@ -100,7 +100,6 @@
#endif
SetControlLabel(i++, "%s: %s", 12390, SYSTEM_UPTIME);
SetControlLabel(i++, "%s: %s", 12394, SYSTEM_TOTALUPTIME);
- SetControlLabel(i++, "%s: %s", 12395, SYSTEM_BATTERY_LEVEL);
}
else if (m_section == CONTROL_BT_STORAGE)
{

View File

@ -0,0 +1 @@
../../../RPi/patches/linux/linux-01-RPi_support.patch

View File

@ -0,0 +1,17 @@
--- a/drivers/rtc/rtc-pcf8523.c 2016-10-01 10:16:30.259771931 +0100
+++ b/drivers/rtc/rtc-pcf8523.c 2016-10-01 10:21:29.762638800 +0100
@@ -291,7 +291,13 @@ static int pcf8523_probe(struct i2c_clie
if (!pcf)
return -ENOMEM;
- err = pcf8523_select_capacitance(client, true);
+ if (of_property_read_bool(client->dev.of_node, "nxp,xtalcap-7pf")) {
+ printk(KERN_ERR "PCF8523 - set 7pF crystal load");
+ err = pcf8523_select_capacitance(client, false);
+ } else {
+ printk(KERN_ERR "PCF8523 - set 12pF crystal load");
+ err = pcf8523_select_capacitance(client, true);
+ }
if (err < 0)
return err;

View File

@ -0,0 +1,45 @@
--- linux-4.4-rc7-old/sound/soc/codecs/cs4265.c 2016-01-13 20:56:05.637652775 +0000
+++ linux-4.4-rc7/sound/soc/codecs/cs4265.c 2016-01-17 11:21:16.977652775 +0000
@@ -157,7 +157,7 @@
SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2,
3, 1, 0),
SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum),
- SOC_SINGLE("MMTLR Data Switch", 0,
+ SOC_SINGLE("MMTLR Data Switch", CS4265_SPDIF_CTL2,
1, 1, 0),
SOC_ENUM("Mono Channel Select", spdif_mono_select_enum),
SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24),
@@ -199,8 +199,6 @@
SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_IN("DIN2", NULL, 0,
SND_SOC_NOPM, 0, 0),
- SND_SOC_DAPM_AIF_IN("TXIN", NULL, 0,
- CS4265_SPDIF_CTL2, 5, 1),
SND_SOC_DAPM_OUTPUT("LINEOUTL"),
SND_SOC_DAPM_OUTPUT("LINEOUTR"),
@@ -384,7 +382,6 @@
static int cs4265_digital_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
-
if (mute) {
snd_soc_update_bits(codec, CS4265_DAC_CTL,
CS4265_DAC_CTL_MUTE,
@@ -410,7 +407,7 @@
struct snd_soc_codec *codec = dai->codec;
struct cs4265_private *cs4265 = snd_soc_codec_get_drvdata(codec);
int index;
-
+printk(KERN_ERR "cs4265_pcm_hw_params: format = 0x%x, width = %d\n", cs4265->format, params_width(params));
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE &&
((cs4265->format & SND_SOC_DAIFMT_FORMAT_MASK)
== SND_SOC_DAIFMT_RIGHT_J))
@@ -469,6 +466,7 @@
static int cs4265_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
+printk(KERN_ERR "set_bias_level %d\n", level);
switch (level) {
case SND_SOC_BIAS_ON:
break;

View File

@ -0,0 +1,23 @@
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 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/>.
################################################################################
# WARNING: DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN WHEN UPGRADING!
dtoverlay=slice
dtoverlay=ws2812
dtoverlay=mmc

View File

@ -0,0 +1,172 @@
// Definitions for Slice hardware
/dts-v1/;
/plugin/;
#include "dt-bindings/clock/bcm2835.h"
/ {
compatible = "brcm,bcm2708";
//
// Set up GPIOs:
// I2C1 on GPIO44,45
// LIRC input/output on GPIO4 and 37 (NB GPIO4 NC on Slice)
// I2S on GPIO28-31
//
fragment@0 {
target = <&gpio>;
__overlay__ {
i2c1_pins: i2c1 {
brcm,pins = <44 45>;
brcm,function = <6>; /* alt2 */
};
lirc_pins: lirc_pins {
brcm,pins = <4 37>; // <out in>
brcm,function = <1 0>; // out in
brcm,pull = <0 1>; // off down
};
i2s_pins: i2s {
brcm,pins = <28 29 30 31>;
brcm,function = <6>; /* alt2 */
};
ws2812_pins: ws2812 {
brcm,pins = <40>;
brcm,function = <4>; /* alt0 */
};
};
};
//
// I2C at 100KHz
//
fragment@1 {
target = <&i2c1>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
clock-frequency = <100000>;
};
};
//
// Add devices to I2C1 Bus:
// PCF8523 RTC device
// CS4265 Audio CODEC
//
fragment@2 {
target = <&i2c1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pcf8523@68 {
compatible = "nxp,pcf8523";
reg = <0x68>;
nxp,xtalcap-7pf; /* set crystal load to 7pf */
status = "okay";
};
cs4265@4e {
#sound-dai-cells = <0>;
compatible = "cirrus,cs4265";
reg = <0x4e>;
cs4265-reset-gpios = <&gpio 33 0>; /* AUD_RST_N on GPIO33 */
cirrus,no-s16le; /* remove S16LE support to workaround I2S controller issue */
status = "okay";
};
};
};
//
// LIRC
//
fragment@3 {
target-path = "/";
__overlay__ {
lirc_rpi: lirc_rpi {
compatible = "rpi,lirc-rpi";
pinctrl-names = "default";
pinctrl-0 = <&lirc_pins>;
status = "okay";
// Override autodetection of IR receiver circuit
// (0 = active high, 1 = active low, -1 = no override )
rpi,sense = <0xffffffff>;
// Software carrier
// (0 = off, 1 = on)
rpi,softcarrier = <1>;
// Invert output
// (0 = off, 1 = on)
rpi,invert = <0>;
// Enable debugging messages
// (0 = off, 1 = on)
rpi,debug = <0>;
};
};
};
//
// Audio driver
//
fragment@4 {
#address-cells = <1>;
#size-cells = <1>;
target = <&sound>;
__overlay__ {
compatible = "fiveninjas,slice";
clocks = <&cprman BCM2835_CLOCK_GP0>;
clock-names = "gp0";
pinctrl-names = "default";
i2s-controller = <&i2s>;
status = "okay";
};
};
//
// Enable I2S
//
fragment@5 {
target = <&i2s>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
brcm,enable-mmap;
status = "okay";
};
};
//
// WS2812B LEDs driver
//
fragment@6 {
target = <&soc>;
__overlay__ {
#address-cells = <1>;
#size-cells = <1>;
ws2812: ws2812 {
compatible = "rpi,ws2812";
pinctrl-names = "default";
pinctrl-0 = <&ws2812_pins>;
reg = <0x7e20c000 0x100>; /* PWM */
dmas = <&dma 5>;
dma-names = "pwm_dma";
led-en-gpios = <&gpio 43 0>;
rpi,invert = <1>;
rpi,num_leds = <25>;
status = "okay";
};
};
};
//
// Disable standard audio
//
fragment@7 {
target = <&audio>;
__overlay__ {
status = "disabled";
};
};
};

View File

@ -0,0 +1,33 @@
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2708";
fragment@0 {
target = <&soc>;
__overlay__ {
#address-cells = <1>;
#size-cells = <1>;
ws2812: ws2812 {
compatible = "rpi,ws2812";
reg = <0x7e20c000 0x100>; /* PWM */
dmas = <&dma 5>;
dma-names = "pwm_dma";
led-en-gpios = <&gpio 43 0>;
rpi,invert = <1>;
rpi,num_leds = <25>;
status = "okay";
};
};
};
__overrides__ {
invert = <&ws2812>,"rpi,invert:0";
num_leds = <&ws2812>,"rpi,num_leds:0";
};
};

View File

@ -0,0 +1,2 @@
#!/bin/bash
hdparm -S60 /dev/sda

View File

@ -0,0 +1,19 @@
#!/bin/bash
LEDDIR="/usr/share/kodi/addons/service.slice/resources/media/ledpatterns"
case "$1" in
halt)
hdparm -y /dev/sda
led_png $LEDDIR/shutdown.png
;;
poweroff)
hdparm -y /dev/sda
led_png $LEDDIR/shutdown.png
;;
reboot)
led_png $LEDDIR/shutdown.png
;;
*)
;;
esac

View File

@ -0,0 +1,23 @@
[Unit]
Description=Debug Shell on /dev/console
DefaultDependencies=no
ConditionKernelCommandLine=console
[Service]
WorkingDirectory=/storage
Environment="ENV=/etc/profile"
ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"'
ExecStart=/bin/sh
Restart=always
RestartSec=0
StandardInput=tty
TTYPath=/dev/console
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
[Install]
WantedBy=sysinit.target

View File

@ -0,0 +1,25 @@
<confdir:pcm/iec958.conf>
snd_slice.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.AES0 {
type integer
}
@args.AES1 {
type integer
}
@args.AES2 {
type integer
}
@args.AES3 {
type integer
}
type hooks
slave.pcm {
type hw
card $CARD
}
}

View File

@ -0,0 +1,28 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
# Enable io_is_busy for improved sdhost performance - essentially, equivalent of force_turbo=1 but for mmc
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
# Configure frequency scaling properties - should improve performance a little (turbo, in most cases)
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<showexitbutton>false</showexitbutton>
<remotedelay>1</remotedelay>
<fanartres>720</fanartres>
<imageres>540</imageres>
<samba>
<clienttimeout>30</clienttimeout>
</samba>
</advancedsettings>

1
projects/Slice3/linux Symbolic link
View File

@ -0,0 +1 @@
../RPi2/linux

139
projects/Slice3/options Normal file
View File

@ -0,0 +1,139 @@
################################################################################
# setup system defaults
################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case $TARGET_ARCH in
arm)
# TARGET_CPU:
# arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d
# arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c
# arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t
# arm720t arm740t strongarm strongarm110 strongarm1100
# strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t
# arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi
# arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e
# arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s
# arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4
# cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.
TARGET_CPU="cortex-a7"
# TARGET_FLOAT:
# Specifies which floating-point ABI to use. Permissible values are:
# soft softfp hard
TARGET_FLOAT="hard"
# TARGET_FPU:
# This specifies what floating point hardware (or hardware emulation) is
# available on the target. Permissible names are:
# fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16
# vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16
# neon-vfpv4.
TARGET_FPU="neon-vfpv4"
;;
esac
# Bootloader to use (syslinux / u-boot / bcm2835-bootloader)
BOOTLOADER="bcm2835-bootloader"
# u-boot version to use (default)
UBOOT_VERSION="default"
# Configuration for u-boot
UBOOT_CONFIG=""
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# Kernel target
KERNEL_TARGET="zImage"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET=""
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD="dtbs overlays/slice.dtbo overlays/ws2812.dtbo"
# Kernel to use. values can be:
# default: default mainline kernel
LINUX="default-rpi"
# NOOBS supported hex versions (legacy)
NOOBS_HEX="1040,1041,2082"
# NOOBS supported model versions
NOOBS_SUPPORTED_MODELS='"Pi 2","Pi 3"'
################################################################################
# setup build defaults
################################################################################
# Project CFLAGS
PROJECT_CFLAGS=""
# SquashFS compression method (gzip / lzo / xz)
SQUASHFS_COMPRESSION="lzo"
################################################################################
# setup project defaults
################################################################################
# build and install ALSA Audio support (yes / no)
ALSA_SUPPORT="yes"
# OpenGL(X) implementation to use (no / mesa)
OPENGL="no"
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)
OPENGLES="bcm2835-driver"
# include uvesafb support (yes / no)
UVESAFB_SUPPORT="no"
# Displayserver to use (x11 / no)
DISPLAYSERVER="no"
# Windowmanager to use (ratpoison / fluxbox / none)
WINDOWMANAGER="none"
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia)
# Space separated list is supported,
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia"
GRAPHIC_DRIVERS=""
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
KODIPLAYER_DRIVER="bcm2835-driver"
# Modules to install in initramfs for early boot
INITRAMFS_MODULES=""
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-rpi slice-firmware"
# build and install ATV IR remote support (yes / no)
ATVCLIENT_SUPPORT="no"
# build with swap support (yes / no)
SWAP_SUPPORT="yes"
# swap support enabled per default (yes / no)
SWAP_ENABLED_DEFAULT="no"
# swapfile size if SWAP_SUPPORT=yes in MB
SWAPFILESIZE="128"
# build with installer (yes / no)
INSTALLER_SUPPORT="no"
# kernel image name
KERNEL_NAME="kernel.img"
# additional drivers to install:
# for a list of additinoal drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS media_build rpi-cirrus-config slice-drivers"

View File

@ -0,0 +1,102 @@
From 073c2c6a118a03b70a29fd302e48f1f75bc7e5bc Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Wed, 24 May 2017 19:17:24 +0100
Subject: [PATCH] Revert "PR11222"
This reverts commit 6cc9ab253753aeb62b01d3e654bbfa77a7f22a42.
---
.../resource.language.en_gb/resources/strings.po | 15 --------------
system/peripherals.xml | 4 +---
xbmc/peripherals/devices/PeripheralCecAdapter.cpp | 23 +++++++---------------
3 files changed, 8 insertions(+), 34 deletions(-)
diff --git a/addons/resource.language.en_gb/resources/strings.po b/addons/resource.language.en_gb/resources/strings.po
index 6443f3d..e0060d1 100644
--- a/addons/resource.language.en_gb/resources/strings.po
+++ b/addons/resource.language.en_gb/resources/strings.po
@@ -19745,18 +19745,3 @@ msgstr ""
msgctxt "#39010"
msgid "Select sort method"
msgstr ""
-
-#: system/peripherals.xml
-msgctxt "#38050"
-msgid "Remote button press delay before repeating (ms)"
-msgstr ""
-
-#: system/peripherals.xml
-msgctxt "#38051"
-msgid "Remote button press repeat rate (ms)"
-msgstr ""
-
-#: system/peripherals.xml
-msgctxt "#38052"
-msgid "Remote button press release time (ms)"
-msgstr ""
diff --git a/system/peripherals.xml b/system/peripherals.xml
index 02b1a9e..d5704b2 100644
--- a/system/peripherals.xml
+++ b/system/peripherals.xml
@@ -31,9 +31,7 @@
<setting key="device_type" type="int" value="1" configurable="0" />
<setting key="wake_devices_advanced" type="string" value="" configurable="0" />
<setting key="standby_devices_advanced" type="string" value="" configurable="0" />
- <setting key="double_tap_timeout_ms" type="int" min="50" max="1000" step="50" value="300" label="38050" order="16" />
- <setting key="button_repeat_rate_ms" type="int" min="0" max="250" step="10" value="0" label="38051" order="17" />
- <setting key="button_release_delay_ms" type="int" min="0" max="500" step="50" value="0" label="38052" order="18" />
+ <setting key="double_tap_timeout_ms" type="int" min="0" value="300" configurable="0" />
</peripheral>
<peripheral vendor_product="2548:1001,2548:1002" bus="usb" name="Pulse-Eight CEC Adapter" mapTo="cec">
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index d04a632..d032ffd 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -803,10 +803,7 @@ void CPeripheralCecAdapter::PushCecKeypress(const CecButtonPress &key)
CLog::Log(LOGDEBUG, "%s - received key %2x duration %d", __FUNCTION__, key.iButton, key.iDuration);
CSingleLock lock(m_critSection);
- // avoid the queue getting too long
- if (m_configuration.iButtonRepeatRateMs && m_buttonQueue.size() > 5)
- return;
- if (m_configuration.iButtonRepeatRateMs == 0 && key.iDuration > 0)
+ if (key.iDuration > 0)
{
if (m_currentButton.iButton == key.iButton && m_currentButton.iDuration == 0)
{
@@ -1299,15 +1296,6 @@ void CPeripheralCecAdapter::SetConfigurationFromLibCEC(const CEC::libcec_configu
m_configuration.bActivateSource = config.bActivateSource;
bChanged |= SetSetting("activate_source", m_configuration.bActivateSource == 1);
- m_configuration.iDoubleTapTimeoutMs = config.iDoubleTapTimeoutMs;
- bChanged |= SetSetting("double_tap_timeout_ms", (int)m_configuration.iDoubleTapTimeoutMs);
-
- m_configuration.iButtonRepeatRateMs = config.iButtonRepeatRateMs;
- bChanged |= SetSetting("button_repeat_rate_ms", (int)m_configuration.iButtonRepeatRateMs);
-
- m_configuration.iButtonReleaseDelayMs = config.iButtonReleaseDelayMs;
- bChanged |= SetSetting("button_release_delay_ms", (int)m_configuration.iButtonReleaseDelayMs);
-
m_configuration.bPowerOffOnStandby = config.bPowerOffOnStandby;
m_configuration.iFirmwareVersion = config.iFirmwareVersion;
@@ -1403,10 +1391,13 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
m_configuration.bPowerOffOnStandby = iStandbyAction == LOCALISED_ID_SUSPEND ? 1 : 0;
m_bShutdownOnStandby = iStandbyAction == LOCALISED_ID_POWEROFF;
- // double tap prevention timeout in ms
+#if defined(CEC_DOUBLE_TAP_TIMEOUT_MS_OLD)
+ // double tap prevention timeout in ms. libCEC uses 50ms units for this in 2.2.0, so divide by 50
+ m_configuration.iDoubleTapTimeout50Ms = GetSettingInt("double_tap_timeout_ms") / 50;
+#else
+ // backwards compatibility. will be removed once the next major release of libCEC is out
m_configuration.iDoubleTapTimeoutMs = GetSettingInt("double_tap_timeout_ms");
- m_configuration.iButtonRepeatRateMs = GetSettingInt("button_repeat_rate_ms");
- m_configuration.iButtonReleaseDelayMs = GetSettingInt("button_release_delay_ms");
+#endif
if (GetSettingBool("pause_playback_on_deactivate"))
{
--
2.7.4

View File

@ -0,0 +1 @@
../../../RPi2/patches/kodi/kodi-001-backport.patch

View File

@ -0,0 +1,45 @@
--- a/system/keymaps/keyboard.xml 2016-09-17 16:35:20.000000000 +0100
+++ b/system/keymaps/keyboard.xml 2016-10-01 19:31:07.928719606 +0100
@@ -56,7 +56,7 @@
<menu mod="longpress">Menu</menu>
<c>ContextMenu</c>
<c mod="longpress">Menu</c>
- <space>Pause</space>
+ <space>PlayPause</space>
<x>Stop</x>
<period>SkipNext</period>
<comma>SkipPrevious</comma>
@@ -321,8 +321,8 @@
<l>NextSubtitle</l>
<left>StepBack</left>
<right>StepForward</right>
- <up>ChapterOrBigStepForward</up>
- <down>ChapterOrBigStepBack</down>
+ <up>VolumeUp</up>
+ <down>VolumeDown</down>
<up mod="longpress">AudioNextLanguage</up>
<down mod="longpress">NextSubtitle</down>
<a>AudioDelay</a>
@@ -425,8 +425,8 @@
<right>StepForward</right>
<left mod="longpress">Rewind</left>
<right mod="longpress">FastForward</right>
- <up>SkipNext</up>
- <down>SkipPrevious</down>
+ <up>VolumeUp</up>
+ <down>VolumeDown</down>
<o>PlayerProcessInfo</o>
<l>LockPreset</l>
<escape>FullScreen</escape>
@@ -632,8 +632,8 @@
<keyboard>
<left>StepBack</left>
<right>StepForward</right>
- <up>Up</up>
- <down>Down</down>
+ <up>VolumeUp</up>
+ <down>VolumeDown</down>
<return>OSD</return>
<enter>OSD</enter>
<return mod="longpress">ActivateWindow(PVROSDChannels)</return>

View File

@ -0,0 +1,10 @@
--- a/xbmc/windows/GUIWindowSystemInfo.cpp 2013-02-21 22:09:04.765734381 +0400
+++ b/xbmc/windows/GUIWindowSystemInfo.cpp 2013-02-22 16:12:57.942164800 +0400
@@ -100,7 +100,6 @@
#endif
SetControlLabel(i++, "%s: %s", 12390, SYSTEM_UPTIME);
SetControlLabel(i++, "%s: %s", 12394, SYSTEM_TOTALUPTIME);
- SetControlLabel(i++, "%s: %s", 12395, SYSTEM_BATTERY_LEVEL);
}
else if (m_section == CONTROL_BT_STORAGE)
{

View File

@ -0,0 +1 @@
../../../RPi2/patches/linux/linux-01-RPi_support.patch

View File

@ -0,0 +1,17 @@
--- a/drivers/rtc/rtc-pcf8523.c 2016-10-01 10:16:30.259771931 +0100
+++ b/drivers/rtc/rtc-pcf8523.c 2016-10-01 10:21:29.762638800 +0100
@@ -291,7 +291,13 @@ static int pcf8523_probe(struct i2c_clie
if (!pcf)
return -ENOMEM;
- err = pcf8523_select_capacitance(client, true);
+ if (of_property_read_bool(client->dev.of_node, "nxp,xtalcap-7pf")) {
+ printk(KERN_ERR "PCF8523 - set 7pF crystal load");
+ err = pcf8523_select_capacitance(client, false);
+ } else {
+ printk(KERN_ERR "PCF8523 - set 12pF crystal load");
+ err = pcf8523_select_capacitance(client, true);
+ }
if (err < 0)
return err;

View File

@ -0,0 +1,45 @@
--- linux-4.4-rc7-old/sound/soc/codecs/cs4265.c 2016-01-13 20:56:05.637652775 +0000
+++ linux-4.4-rc7/sound/soc/codecs/cs4265.c 2016-01-17 11:21:16.977652775 +0000
@@ -157,7 +157,7 @@
SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2,
3, 1, 0),
SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum),
- SOC_SINGLE("MMTLR Data Switch", 0,
+ SOC_SINGLE("MMTLR Data Switch", CS4265_SPDIF_CTL2,
1, 1, 0),
SOC_ENUM("Mono Channel Select", spdif_mono_select_enum),
SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24),
@@ -199,8 +199,6 @@
SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_IN("DIN2", NULL, 0,
SND_SOC_NOPM, 0, 0),
- SND_SOC_DAPM_AIF_IN("TXIN", NULL, 0,
- CS4265_SPDIF_CTL2, 5, 1),
SND_SOC_DAPM_OUTPUT("LINEOUTL"),
SND_SOC_DAPM_OUTPUT("LINEOUTR"),
@@ -384,7 +382,6 @@
static int cs4265_digital_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_codec *codec = dai->codec;
-
if (mute) {
snd_soc_update_bits(codec, CS4265_DAC_CTL,
CS4265_DAC_CTL_MUTE,
@@ -410,7 +407,7 @@
struct snd_soc_codec *codec = dai->codec;
struct cs4265_private *cs4265 = snd_soc_codec_get_drvdata(codec);
int index;
-
+printk(KERN_ERR "cs4265_pcm_hw_params: format = 0x%x, width = %d\n", cs4265->format, params_width(params));
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE &&
((cs4265->format & SND_SOC_DAIFMT_FORMAT_MASK)
== SND_SOC_DAIFMT_RIGHT_J))
@@ -469,6 +466,7 @@
static int cs4265_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
+printk(KERN_ERR "set_bias_level %d\n", level);
switch (level) {
case SND_SOC_BIAS_ON:
break;