Skip to content

Commit

Permalink
Merge pull request #131 from hifiberry/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
hifiberry authored Aug 5, 2020
2 parents 2e862a1 + f43362a commit 9415916
Show file tree
Hide file tree
Showing 17 changed files with 115 additions and 18 deletions.
6 changes: 3 additions & 3 deletions buildroot/package/beocreate/beocreate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#
################################################################################

BEOCREATE_VERSION = 155c255d30591e436295b0d5bbdaf8519741a68f
BEOCREATE_VERSION = 493bafa71e4d9df9ae4609e72a448eec87129018
BEOCREATE_SITE = $(call github,bang-olufsen,create,$(BEOCREATE_VERSION))

BEOCREATE_VERSION = c5708c23c9649fc8e387d061ca5cea3a16588355
BEOCREATE_SITE = $(call github,hifiberry,create,$(BEOCREATE_VERSION))
#BEOCREATE_VERSION = c5708c23c9649fc8e387d061ca5cea3a16588355
#BEOCREATE_SITE = $(call github,hifiberry,create,$(BEOCREATE_VERSION))

BEOCREATE_DEPENDENCIES += nodejs

Expand Down
1 change: 1 addition & 0 deletions buildroot/package/dsptoolkit/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config BR2_PACKAGE_DSPTOOLKIT
select BR2_PACKAGE_PYTHON_SPIDEV
select BR2_PACKAGE_PYTHON_ZEROCONF
select BR2_PACKAGE_PYTHON_ALSAAUDIO
select BR2_PACKAGE_PYTHON_REQUESTS
select BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_PYTHON3_SSL
select BR2_PACKAGE_CA_CERTIFICATES
2 changes: 1 addition & 1 deletion buildroot/package/dsptoolkit/S90sigmatcp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/sh

# Additional options that are passed to SigmaTCP server
OPTIONS="--alsa"
#OPTIONS="--alsa"

case "$1" in
start)
Expand Down
2 changes: 1 addition & 1 deletion buildroot/package/hifiberry-automount/list-smb-servers
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

for host in `nmblookup -s /dev/null -S workgroup | grep "20" | awk '{print $1}'`; do
for host in `nmblookup -s /dev/null -S workgroup | grep "<20>" | awk '{print $1}'`; do
IPS=""
for ip in `nmblookup -s /dev/null $host | awk '{print $1}'`; do
IPS="$IPS $ip"
Expand Down
2 changes: 1 addition & 1 deletion buildroot/package/hifiberry-localbrowser/weston.service
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ User=root
StandardInput=tty-fail

[Install]
WantedBy=multiuser.target
WantedBy=multi-user.target

2 changes: 0 additions & 2 deletions buildroot/package/hifiberry-psplash/psplash-quit.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[Unit]
Description=Terminate Psplash Boot Screen
After=psplash-start.service
ConditionPathExists=!/boot/nosplash

[Service]
Type=oneshot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ConditionPathExists=!/boot/nosplash

[Service]
Type=oneshot
ExecStart=/usr/bin/psplash -n
ExecStart=/usr/bin/psplash
RemainAfterExit=yes

[Install]
Expand Down
2 changes: 2 additions & 0 deletions buildroot/package/hifiberry-test/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ choice
bool "None - just copy flash tools"
config HIFIBERRY_TEST_DAC2HD
bool "DAC2 HD"
config HIFIBERRY_TEST_DSPADDON
bool "DSP add-on board"
config HIFIBERRY_TEST_AMP2
bool "Amp2"
config HIFIBERRY_TEST_DACRTC
Expand Down
18 changes: 14 additions & 4 deletions buildroot/package/hifiberry-test/S99testdac2hd
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@ case "$1" in
# Program EEPROM
PATH=$PATH:/opt/hifiberry/contrib
export PATH
/opt/hifiberry/contrib/hbflash.sh -w -f=/opt/hifiberry/contrib/dac2hd.eep -t=24c32

amixer sset DAC 100%
play -n synth 60 sine 1000 &
/opt/hifiberry/contrib/hbflash.sh --writeread -f=/opt/hifiberry/contrib/dac2hd.eep -t=24c32
if [ "$?" != "0" ]; then
echo
echo
echo
echo "EEPROM write FAIL, data not correct"
echo "aborting..."
echo
echo
echo
else
amixer sset DAC 100%
play -n synth 60 sine 1000 &
fi

;;
stop)
Expand Down
28 changes: 28 additions & 0 deletions buildroot/package/hifiberry-test/S99testdspaddon
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#! /bin/sh

# Write profile to DSP DAC and play a test tone

OUT=/dev/tty1

case "$1" in
start)
echo "Programming DSP profile" > $OUT
dsptoolkit install-profile /opt/hifiberry/contrib/dspaddon.xml > $OUT
echo "Testing EEPROM programming" > $OUT
dsptoolkit check-eeprom > $OUT
echo "Playing test tone" > $OUT
play -n synth 30 sine 1000 > $OUT
echo "Done" > $OUT
;;
stop)
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

11 changes: 11 additions & 0 deletions buildroot/package/hifiberry-test/eeprom/eepflash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ while [ "$1" != "" ]; do
-w | --write)
MODE="write"
;;
--writeread)
MODE="writeread"
;;
-t | --type)
if [ "$VALUE" = "24c32" ] || [ "$VALUE" = "24c64" ] || [ "$VALUE" = "24c128" ] ||
[ "$VALUE" = "24c256" ] || [ "$VALUE" = "24c512" ] || [ "$VALUE" = "24c1024" ]; then
Expand Down Expand Up @@ -158,7 +161,15 @@ elif [ "$MODE" = "read" ]
echo "Reading..."
dd if=$SYS/$BUS-00$ADDR/eeprom of=$FILE status=$DD_STATUS
rc=$?
elif [ "$MODE" = "writeread" ]
then
echo "Writing..."
dd if=$FILE of=$SYS/$BUS-00$ADDR/eeprom status=$DD_STATUS
dd if=$SYS/$BUS-00$ADDR/eeprom of=/tmp/eeprom.$$ status=$DD_STATUS
diff $FILE /tmp/eeprom.$$
rc =$?
fi


echo "Closing EEPROM Device."
echo "0x$ADDR" > $SYS/delete_device
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ while [ "$1" != "" ]; do
-w | --write)
MODE="write"
;;
--writeread)
MODE="writeread"
;;
-t | --type)
if [ "$VALUE" = "24c32" ] || [ "$VALUE" = "24c64" ] || [ "$VALUE" = "24c128" ] ||
[ "$VALUE" = "24c256" ] || [ "$VALUE" = "24c512" ] || [ "$VALUE" = "24c1024" ]; then
Expand Down Expand Up @@ -116,6 +119,15 @@ elif [ "$MODE" = "read" ]
echo "Reading..."
dd if=/sys/class/i2c-adapter/i2c-$DEVID/$DEVID-0050/eeprom of=$FILE
rc=$?
elif [ "$MODE" = "writeread" ]
then
echo "Writing..."
dd if=$FILE of=/sys/class/i2c-adapter/i2c-$DEVID/$DEVID-0050/eeprom
dd if=/sys/class/i2c-adapter/i2c-$DEVID/$DEVID-0050/eeprom of=/tmp/eeprom.$$
SIZEORIG=`wc -c $FILE | awk '{print $1}'`
truncate -s $SIZEORIG /tmp/eeprom.$$
diff $FILE /tmp/eeprom.$$
rc=$?
fi

if [ $rc != 0 ]; then
Expand Down
27 changes: 25 additions & 2 deletions buildroot/package/hifiberry-test/hifiberry-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
define HIFIBERRY_TEST_INSTALL_TARGET_CMDS
echo "HiFiBerry Test"
[ -d $(TARGET_DIR)/opt/hifiberry/contrib ] || mkdir -p $(TARGET_DIR)/opt/hifiberry/contrib
$(INSTALL) -D -m 0700 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/hbflash.sh \
$(TARGET_DIR)/opt/hifiberry/contrib
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/dspdac.xml \
$(TARGET_DIR)/opt/hifiberry/contrib
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/dacadcaddon-test.xml \
$(TARGET_DIR)/opt/hifiberry/contrib
$(INSTALL) -D -m 0700 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/eeprom/hbflash.sh \
$(TARGET_DIR)/opt/hifiberry/contrib
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/eeprom/dacplusadcpro.eep \
$(TARGET_DIR)/opt/hifiberry/contrib
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/eeprom/dacplus.eep \
Expand Down Expand Up @@ -46,8 +46,27 @@ define HIFIBERRY_TEST_INSTALL_INIT_SYSV_DAC2HD

echo "Adding drivers to config.txt"
echo "dtoverlay=hifiberry-dacplushd" >> $(BINARIES_DIR)/rpi-firmware/config.txt
echo "dtoverlay=i2c-gpio" >> $(BINARIES_DIR)/rpi-firmware/config.txt
echo "dtparam=i2c_gpio_sda=0" >> $(BINARIES_DIR)/rpi-firmware/config.txt
echo "dtparam=i2c_gpio_scl=1" >> $(BINARIES_DIR)/rpi-firmware/config.txt
echo "" >> $(BINARIES_DIR)/rpi-firmware/config.txt
endef

define HIFIBERRY_TEST_INSTALL_INIT_SYSV_DSPADDON
echo "Installing DSP Add-on test script"
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/S99testdspaddon \
$(TARGET_DIR)/etc/init.d/S99testdspaddon
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/dspprofiles/dsp-addon-96-11.xml \
$(TARGET_DIR)/opt/hifiberry/contrib/dspaddon.xml

echo "Adding drivers to config.txt"

sed -i s/.*hifiberry.*//g $(BINARIES_DIR)/rpi-firmware/config.txt
echo "dtparam=spi=on" >> $(BINARIES_DIR)/rpi-firmware/config.txt
echo "dtoverlay=hifiberry-dacplus" >> $(BINARIES_DIR)/rpi-firmware/config.txt
endef


define HIFIBERRY_TEST_INSTALL_INIT_SYSV_DSPDAC
echo "Installing DAC+ DSP test script"
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-test/S99testdacdsp \
Expand Down Expand Up @@ -123,6 +142,10 @@ ifdef HIFIBERRY_TEST_DAC2HD
HIFIBERRY_TEST_POST_INSTALL_TARGET_HOOKS += HIFIBERRY_TEST_INSTALL_INIT_SYSV_DAC2HD
endif

ifdef HIFIBERRY_TEST_DSPADDON
HIFIBERRY_TEST_POST_INSTALL_TARGET_HOOKS += HIFIBERRY_TEST_INSTALL_INIT_SYSV_DSPADDON
endif

ifdef HIFIBERRY_TEST_AMP2
HIFIBERRY_TEST_POST_INSTALL_TARGET_HOOKS += HIFIBERRY_TEST_INSTALL_INIT_SYSV_AMP2
endif
Expand Down
2 changes: 1 addition & 1 deletion buildroot/package/hifiberry-tools/check-system
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ done
echo $DEV | sed s/,\$//

# Daemons
for i in audiocontrol2 beocreate2 bluetooth bluealsa bluealsa-aplay dlnampris mpd mpd-mpris pigpiod raat shairport-sync sigmatcp snapcastmpris spotify squeezelite sshd ympd ; do
for i in audiocontrol2 beocreate2 bluetooth bluealsa bluealsa-aplay dlnampris mpd mpd-mpris pigpiod raat shairport-sync sigmatcp snapcastmpris spotify squeezelite sshd ympd weston cog; do
check_systemd $i $i.service
done
2 changes: 2 additions & 0 deletions buildroot/package/hifiberry-updater/services
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ snapcastmpris.service
watchdog.service
dlnampris.service
alsaloop.service
weston.service
cog.service

3 changes: 1 addition & 2 deletions buildroot/package/hifiberry-ympd/ympd.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[Unit]
Description=ympd MPD web interface
Requires=mpd.service
After=mpd.service

[Service]
Type=simple
Expand All @@ -13,3 +11,4 @@ RestartSec=5

[Install]
WantedBy=multi-user.target

11 changes: 11 additions & 0 deletions update-ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

cd `dirname $0`
pwd
TS=`date +%Y%m%d`
for i in 0w 2 3 4; do
chmod u+w ../buildroot-$i/target/etc/hifiberry.version
echo $TS > ../buildroot-$i/target/etc/hifiberry.version
chmod u-w ../buildroot-$i/target/etc/hifiberry.version
./compile $i
done

0 comments on commit 9415916

Please sign in to comment.