Skip to content

Commit

Permalink
Merge pull request #139 from hifiberry/development
Browse files Browse the repository at this point in the history
20200908 release
  • Loading branch information
hifiberry authored Sep 9, 2020
2 parents 3954fcd + 9e71fcf commit d9a9327
Show file tree
Hide file tree
Showing 38 changed files with 723 additions and 107 deletions.
7 changes: 7 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
20200901:
- Improved UI navigation for local music
- Backup/Restore option
- improved updater shows available updates
- local web browser supports HTTPS now
- various bugfixes and improvements

20200727
- add SMB servers in the UI
- add/change artist pictures and coverart vin the UI
Expand Down
2 changes: 2 additions & 0 deletions build-release
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ echo
./build-config $1 release
./clean $1
./compile $1
# For some reason, first build sometimes fails
./compile $1
./create-image $1 $TS
echo $TS > images/VERSION
echo "UPDATER$1=updater-$TS-pi$1.tar.gz" >> images/listing
3 changes: 2 additions & 1 deletion buildroot/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ comment "Base packages"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/hifiberry-base/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/hifiberry-tools/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/hifiberry-updater/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/copy-overlays/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/alsa-plugins/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/alsa-eq/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/configtxt/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/raspi-wifi/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/hifiberry-systemd/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/watchdog/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/hifiberry-watchdog/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/disable-samba/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/enable-arm7/Config.in"
source "$BR2_EXTERNAL_HIFIBERRY_PATH/package/pigpiod-systemd/Config.in"
Expand Down
2 changes: 1 addition & 1 deletion buildroot/package/beocreate-music/beocreate-music.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
################################################################################

BEOCREATE_MUSIC_VERSION = 33e62c9f24b29262207ad468fcf432cd9bb47388
BEOCREATE_MUSIC_VERSION = 9478499c22c490aa784216194637b838f6477483
BEOCREATE_MUSIC_SITE = $(call github,tuomashamalainen,beocreate-music,$(BEOCREATE_MUSIC_VERSION))

define BEOCREATE_MUSIC_INSTALL_TARGET_CMDS
Expand Down
4 changes: 2 additions & 2 deletions buildroot/package/beocreate/beocreate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#
################################################################################

BEOCREATE_VERSION = 493bafa71e4d9df9ae4609e72a448eec87129018
BEOCREATE_VERSION = 17461f6da4d49186bbe6db3627b7fc88f19bc4f5
BEOCREATE_SITE = $(call github,bang-olufsen,create,$(BEOCREATE_VERSION))

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

BEOCREATE_DEPENDENCIES += nodejs
Expand Down
6 changes: 6 additions & 0 deletions buildroot/package/copy-overlays/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
config BR2_PACKAGE_COPY_OVERLAYS
bool "copy overlays"
help
"copy device tree binaries to overlays directory"


22 changes: 22 additions & 0 deletions buildroot/package/copy-overlays/copy-overlays.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
################################################################################
#
# copy-overlays
#
################################################################################


COPY_OVERLAYS_DEPENDENCIES = rpi-firmware linux

define COPY_OVERLAYS_INSTALL_TARGET_CMDS
echo "Copying overlays"
mkdir -p $(TARGET_DIR)/usr/lib/firmware/rpi/overlays
for i in hifiberry vc4 i2c-gpio; do \
cp -v $(BUILD_DIR)/linux-custom/arch/arm/boot/dts/overlays/$$i*.dtbo $(BINARIES_DIR)/rpi-firmware/overlays; \
cp -v $(BUILD_DIR)/linux-custom/arch/arm/boot/dts/overlays/$$i*.dtbo $(TARGET_DIR)/usr/lib/firmware/rpi/overlays; \
done
for i in $(BUILD_DIR)/linux-custom/arch/arm/boot/dts/bcm*rpi*.dtb; do \
cp -v $$i $(BINARIES_DIR); \
done
endef

$(eval $(generic-package))
2 changes: 1 addition & 1 deletion buildroot/package/dspprofiles/dsp-addon-96-11.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<metadata type="profileName">DSP add-on</metadata>
<metadata type="profileVersion">11</metadata>
<metadata type="programID">dsp-addon</metadata>
<metadata type="modelName" modelID="dsp-addon">DSP add-on board 96kHz</metadata>
<metadata type="modelName" modelID="dsp-addon">DSP add-on</metadata>
<metadata type="checksum">DB4848AC505FB1520A9AEE53084F92CD</metadata>
<metadata type="balanceRegister" storable="yes">715</metadata>
<metadata type="spdifTXUserDataSource" storable="yes">63135</metadata>
Expand Down
10 changes: 5 additions & 5 deletions buildroot/package/dsptoolkit/dsptoolkit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
#
################################################################################

DSPTOOLKIT_VERSION = cb752dc96e8569020038b3b61e20af914b321e49
DSPTOOLKIT_VERSION = 4ca04e88fd4f846131bc579636994b522845cbeb
DSPTOOLKIT_SITE = $(call github,hifiberry,hifiberry-dsp,$(DSPTOOLKIT_VERSION))
DSPTOOLKIT_SETUP_TYPE = setuptools
DSPTOOLKIT_LICENSE = MIT
DSPTOOLKIT_LICENSE_FILES = LICENSE.md

define DSPTOOLKIT_POST_INSTALL_TARGET_CMD
$(INSTALL) -D -m 0644 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/dsptoolkit/sigmatcp.conf \
$(TARGET_DIR)/etc/sigmatcp.conf
$(TARGET_DIR)/etc/sigmatcp.conf
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/dsptoolkit/dump-spdif-status.sh \
$(TARGET_DIR)/opt/hifiberry/bin/dump-spdif-status
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/dsptoolkit/spdif2pi
$(TARGET_DIR)/opt/hifiberry/bin/spdif2pi
$(TARGET_DIR)/opt/hifiberry/bin/dump-spdif-status
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/dsptoolkit/spdif2pi \
$(TARGET_DIR)/opt/hifiberry/bin/spdif2pi
endef

DSPTOOLKIT_POST_INSTALL_TARGET_HOOKS += DSPTOOLKIT_POST_INSTALL_TARGET_CMD
Expand Down
2 changes: 1 addition & 1 deletion buildroot/package/hifiberry-automount/mount-data.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Mount /data
After=local-fs.target
After=local-fs.target datacollector.service

[Service]
Type=oneshot
Expand Down
6 changes: 5 additions & 1 deletion buildroot/package/hifiberry-automount/mount-smb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ for m in `cat /etc/smbmounts.conf | grep -v ^#`; do
# Check if share is on a .local host, resolve this first
HOST=`echo $m | awk -F\; '{print $2}' | awk -F\/ '{print $3}'`
if [[ $HOST == *.local ]]; then
IP=`avahi-resolve-host-name $HOST | awk '{print $2}'`
IP=`avahi-resolve-host-name -4 $HOST | awk '{print $2}'`
if [ "$IP" != "" ]; then
m=`echo $m | sed s/$HOST/$IP/`
fi
Expand All @@ -17,6 +17,10 @@ for m in `cat /etc/smbmounts.conf | grep -v ^#`; do
mountcmd=`echo $m | awk -F\; '$5=="" { $5="rw" } {print "mount -t cifs -o user=" $3 ",password=" $4 "," $5 " " $2 " /data/library/music/" $1}'`
echo $mountcmd
${mountcmd}

if [ -x /opt/hifiberry/bin/report-activation ]; then
/opt/hifiberry/bin/report-activation mount_samba
fi
done
if [ -x /opt/hifiberry/bin/update-mpd-db ]; then
/opt/hifiberry/bin/update-mpd-db &
Expand Down
17 changes: 16 additions & 1 deletion buildroot/package/hifiberry-automount/mount-usb.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ do_mount()
OPTS+=",users,gid=100,umask=000,shortname=mixed,utf8=1,flush"
OVERLAY=0
fi

if [[ ${ID_FS_TYPE} == "ntfs" ]]; then
OPTS+=" -t ntfs-3g"
OVERLAY=0
fi

# Do not support overlays (for now)
OVERLAY=0

if [ -x /opt/hifiberry/bin/report-activation ]; then
/opt/hifiberry/bin/report-activation mount_${ID_FS_TYPE}
fi

if ! /bin/mount -o ${OPTS} ${DEVICE} ${MOUNT_POINT}; then
# Error during mount process: cleanup mountpoint
Expand All @@ -90,8 +102,11 @@ do_mount()
fi
else
echo "Creating symlink as ${ID_FS_TYPE} does not support overlays"
if [ -h ${MUSICDIR}/${LABEL} ]; then
rm ${MUSICDIR}/${LABEL}
fi
if [ -a ${MUSICDIR}/${LABEL} ]; then
mv ${MUSICDIR}/${LABEL} ${MUSICDIR}/${LABEL}.bak
mv ${MUSICDIR}/${LABEL} ${MUSICDIR}/../${LABEL}.bak
fi

ln -s ${MOUNT_POINT} ${MUSICDIR}/${LABEL}
Expand Down
1 change: 1 addition & 0 deletions buildroot/package/hifiberry-automount/usbmount@.service
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Unit]
Description=Mount USB Drive on %i
Requires=mount-data.service
After=datacollector.service

[Service]
Type=oneshot
Expand Down
1 change: 1 addition & 0 deletions buildroot/package/hifiberry-localbrowser/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ config BR2_PACKAGE_HIFIBERRY_LOCALBROWSER
select BR2_PACKAGE_COG
select BR2_PACKAGE_WAYLAND
select BR2_PACKAGE_LIBWPE
select BR2_PACKAGE_GLIB_NETWORKING
select BR2_PACKAGE_WPEBACKEND_FDO
select BR2_PACKAGE_WPEWEBKIT_ARCH_SUPPORTS
select BR2_PACKAGE_WPEWEBKIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ define HIFIBERRY_LOCALBROWSER_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0755 $(BR2_EXTERNAL_HIFIBERRY_PATH)/package/hifiberry-localbrowser/enable-vc \
$(TARGET_DIR)/opt/hifiberry/bin/enable-vc
mkdir -p $(TARGET_DIR)/lib/systemd/system-preset
echo "disable weston.service" >> $(TARGET_DIR)/lib/systemd/system-preset/99-localbrowser.preset
echo "disable cog.service" >> $(TARGET_DIR)/lib/systemd/system-preset/99-localbrowser.preset
# echo "disable weston.service" >> $(TARGET_DIR)/lib/systemd/system-preset/99-localbrowser.preset
# echo "disable cog.service" >> $(TARGET_DIR)/lib/systemd/system-preset/99-localbrowser.preset
endef

$(eval $(generic-package))
1 change: 1 addition & 0 deletions buildroot/package/hifiberry-psplash/psplash-start.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ConditionPathExists=!/boot/nosplash
Type=oneshot
ExecStart=/usr/bin/psplash -n
RemainAfterExit=yes
Restart=no

[Install]
WantedBy=sysinit.target
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ConditionPathExists=!/boot/nosplash
Type=oneshot
ExecStart=/usr/bin/psplash
RemainAfterExit=yes
Restart=no

[Install]
WantedBy=sysinit.target
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_DAC2PRO
bool "DAC2 Pro"
config HIFIBERRY_TEST_DSPADDON
bool "DSP add-on board"
config HIFIBERRY_TEST_AMP2
Expand Down
55 changes: 55 additions & 0 deletions buildroot/package/hifiberry-test/S99testdac2pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#! /bin/sh

# Write profile to DAC2HD and play a test tone

OUT=/dev/tty1

# Cleanup some stuff
rm /etc/init.d/S49ntp 2>/dev/null
rm /etc/init.d/S90sigmatcp 2>/dev/null
# rm /etc/init.d/S40network 2>/dev/null
# rm /etc/init.d/S50sshd 2>/dev/null

case "$1" in
start)
i2c=`cat /boot/config.txt | grep i2c-gpio`
if [ "$i2c" == "" ]; then
echo "dtoverlay=i2c-gpio" >> /boot/config.txt
echo "dtparam=i2c_gpio_sda=0" >> /boot/config.txt
echo "dtparam=i2c_gpio_scl=1" >> /boot/config.txt
fi

# Program EEPROM
PATH=$PATH:/opt/hifiberry/contrib
export PATH
/opt/hifiberry/contrib/hbflash.sh --writeread -f=/opt/hifiberry/contrib/dac2pro.eep -t=24c32
if [ "$?" != "0" ]; then
echo
echo
echo
echo "EEPROM write FAIL, data not correct"
echo "aborting..."
echo
echo
echo
else
amixer sset PCM 100%
i2cset -y 1 0x60 0x01 0xc0
i2cset -y 1 0x60 0x02 0x31
play -n synth 60 sine 1000 &

fi

;;
stop)
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

1 change: 1 addition & 0 deletions buildroot/package/hifiberry-test/eeprom/compile-eep
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ eepmake dacplusadcpro.txt dacplusadcpro.eep /boot/overlays/hifiberry-dacplusadcp
eepmake dacplusadc.txt dacplusadc.eep /boot/overlays/hifiberry-dacplusadc.dtbo
eepmake dac2hd.txt dac2hd.eep /boot/overlays/hifiberry-dacplushd.dtbo
eepmake amp100.txt amp100.eep /boot/overlays/hifiberry-dacplus.dtbo
eepmake dac2pro.txt dac2pro.eep /boot/overlays/hifiberry-dacplus.dtbo
91 changes: 91 additions & 0 deletions buildroot/package/hifiberry-test/eeprom/dac2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
########################################################################
# EEPROM settings text file
#
# Edit this file for your particular board and run through eepmake tool,
# then use eepflash tool to write to attached HAT ID EEPROM
#
# Tools available:
# eepmake Parses EEPROM text file and creates binary .eep file
# eepdump Dumps a binary .eep file as human readable text (for debug)
# eepflash Write or read .eep binary image to/from HAT EEPROM
#
########################################################################

########################################################################
# Vendor info

# 128 bit UUID. If left at zero eepmake tool will auto-generate
# RFC 4122 compliant UUID
product_uuid 00000000-0000-0000-0000-000000000000

# 16 bit product id
product_id 0x0000

# 16 bit product version
product_ver 0x0000

# ASCII vendor string (max 255 characters)
vendor "HiFiBerry"

# ASCII product string (max 255 characters)
product "DAC+"


########################################################################
# GPIO bank settings, set to nonzero to change from the default.
# NOTE these setting can only be set per BANK, uncommenting any of
# these will force the bank to use the custom setting.

# drive strength, 0=default, 1-8=2,4,6,8,10,12,14,16mA, 9-15=reserved
gpio_drive 0

# 0=default, 1=slew rate limiting, 2=no slew limiting, 3=reserved
gpio_slew 0

# 0=default, 1=hysteresis disabled, 2=hysteresis enabled, 3=reserved
gpio_hysteresis 0

# If board back-powers Pi via 5V GPIO header pins:
# 0 = board does not back-power
# 1 = board back-powers and can supply the Pi with a minimum of 1.3A
# 2 = board back-powers and can supply the Pi with a minimum of 2A
# 3 = reserved
# If back_power=2 then USB high current mode will be automatically
# enabled on the Pi
back_power 0

########################################################################
# GPIO pins, uncomment for GPIOs used on board
# Options for FUNCTION: INPUT, OUTPUT, ALT0-ALT5
# Options for PULL: DEFAULT, UP, DOWN, NONE
# NB GPIO0 and GPIO1 are reserved for ID EEPROM so cannot be set

# GPIO FUNCTION PULL
# ---- -------- ----
setgpio 2 ALT0 UP
setgpio 3 ALT0 UP
#setgpio 4 INPUT DEFAULT
#setgpio 5 OUTPUT DEFAULT
#setgpio 6 OUTPUT DEFAULT
#setgpio 7 INPUT DEFAULT
#setgpio 8 INPUT DEFAULT
#setgpio 9 INPUT DEFAULT
#setgpio 10 INPUT DEFAULT
#setgpio 11 INPUT DEFAULT
#setgpio 12 INPUT DEFAULT
#setgpio 13 INPUT DEFAULT
#setgpio 14 INPUT DEFAULT
#setgpio 15 INPUT DEFAULT
#setgpio 16 INPUT DEFAULT
#setgpio 17 INPUT DEFAULT
setgpio 18 ALT0 DEFAULT
setgpio 19 ALT0 DEFAULT
setgpio 20 ALT0 DEFAULT
setgpio 21 ALT0 DEFAULT
#setgpio 22 INPUT DEFAULT
#setgpio 23 INPUT DEFAULT
#setgpio 24 INPUT DEFAULT
#setgpio 25 INPUT DEFAULT
#setgpio 26 INPUT DEFAULT
#setgpio 27 INPUT DEFAULT

Binary file not shown.
Loading

0 comments on commit d9a9327

Please sign in to comment.