syncing servers

This commit is contained in:
Jamie Albert
2025-12-07 17:31:31 +00:00
parent f6e60b144d
commit 9c3274881e
54 changed files with 5048 additions and 2 deletions

BIN
servers/pan/.alsaequal.bin Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,6 @@
RESET="66 66 66 66 66 66 66 66 66 66"
Bass_Vibrant="66 69 69 68 66 66 69 66 74 68"
Tamed_Bass_Depth="63 68 66 69 66 66 71 66 74 69"
Sleep="58 63 61 64 66 66 71 66 74 69"
TREBLE="66 66 66 66 66 66 66 71 76 76"
BASS="76 76 71 66 66 66 66 66 66 66"

39
servers/pan/.ash_history Normal file
View File

@@ -0,0 +1,39 @@
wget -O - https://raw.githubusercontent.com/lovehifi/tidalconnect-picore/main/install.sh | sh
tce-remove ipv6-netfilter-5.15.35-pcpCore-v71.tcz
tce-ab
q
nano /etc/passwd
tce-load -wi nano
nano /etc/passwd
#exit
exit
sudo cp -r .terminfo /root/
nano /etc/passwd
sudo !!
sudo nano /etc/passwd
filetool.sh -b
sudo filetool.sh -b
pcp bu
cd Tidal-Connect-Armv7/
mv -f ../tidal_connect bin/
mv -f ../speaker_controller bin/
mv ../i* id_certificate/
mv -f id_certificate/ifi-pa-devs-get bin/
mv ../IfiAudio_* id_certificate/
nano tidal.sh
cd ../
nano .boot.sh
chmod +x .boot.sh
nano .boot.sh
nano .boot.sh
ifconfig
sudo pcp bu
./.boot.sh
nano .boot.sh
tce-load openssl
tce-load -wi openssl
tce-ab
./.boot.sh
nano .boot.sh
./.boot.sh
sudo pcp bu

50
servers/pan/.ashrc Normal file
View File

@@ -0,0 +1,50 @@
# ~/.ashrc: Executed by SHells.
#
. /etc/init.d/tc-functions
if [ -n "$DISPLAY" ]
then
`which editor >/dev/null` && EDITOR=editor || EDITOR=vi
else
EDITOR=vi
fi
export EDITOR
PS1='\[\033[01;32m\]\u@\h:\[\033[00m\]\[\033[01;34m\]\w\$\[\033[00m\] '
export PS1
TCEDEV="/dev/$(readlink /etc/sysconfig/tcedir | cut -d '/' -f3)"
TCEMNT="/mnt/$(readlink /etc/sysconfig/tcedir | cut -d '/' -f3)"
BOOTDEV=${TCEDEV%%?}1
BOOTMNT=${TCEMNT%%?}1
# Alias definitions.
#
alias df='df -h'
alias du='du -h'
alias ls='ls -p'
alias ll='ls -l'
alias la='ls -la'
# Avoid errors... use -f to skip confirmation.
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
# Change directory to
alias ce="cd $TCEMNT/tce"
alias ceo="cd $TCEMNT/tce/optional"
alias c1="cd $BOOTMNT"
alias c2="cd $TCEMNT"
# Mount partition
alias m1="mount $BOOTMNT"
alias m2="mount $TCEMNT"
# Unmount partition
alias u1="umount $BOOTMNT"
alias u2="umount $TCEMNT"
# Edit config files
alias vicfg="vi $BOOTMNT/config.txt"
alias vicmd="vi $BOOTMNT/cmdline.txt"

119
servers/pan/.bash_history Normal file
View File

@@ -0,0 +1,119 @@
./.boot.sh
sudo ./.boot.sh
nano Tidal-Connect-Armv7/tidal.sh
sudo ./.boot.sh
nano .bashrc
pcp bu
exit
sudo ./.boot.sh
nano Tidal-Connect-Armv7/tidal.sh
sudo ./.boot.sh
sudo ./.boot.sh
nano Tidal-Connect-Armv7/tidal.sh
sudo ./.boot.sh
cd Tidal-Connect-Armv7/
bin/tidal_connect
sudo bin/tidal_connect
sudo pkill tidal_connect
sudo pkill tidal.sh
sudo pkill tidal.sh
sudo bin/tidal_connect
sudo ./tidal.sh
sudo ./tidal.sh start
nano ./tidal.sh
sudo ./tidal.sh start
cd ../
sudo su
nano Tidal-Connect-Armv7/tidal.sh
qq
exit
bluetoothctl
nano .boot.sh
git clone https://github.com/novaws/rtl8761bu
cd rtl8761bu/
ll
mv rtl8761bu/rtl8761b_mp_chip_bt40_fw_asic_rom_patch_new.dat /lib/firmware/rtl_bt/rtl8761bu_fw.bin
sudo mv rtl8761bu/rtl8761b_mp_chip_bt40_fw_asic_rom_patch_new.dat /lib/firmware/rtl_bt/rtl8761bu_fw.bin
sudo su
cd ../
git clone https://github.com/novaws/rtl8761bu
rm -rf rtl8761bu/
git clone https://github.com/novaws/rtl8761bu
cd rtl8761bu/
sudo su
exit
nano .boot.sh
nano .boot.sh
fieltool.sh -b
sudo filetool.sh -b
pcp bu
sudo pcp bu
sudo su
exit
sudo su
exit
ll
nano .boot.sh
sudo modprobe -r btusb
sudo modprobe btusb
hciconfig hci0 up && /usr/local/lib/bluetooth/bluetoothd &
lsusb
sudo su
cd /mnt
ls
sudo mount -t cifs //192.168.0.231/music /mnt/music -o guest,vers=3.0,uid=1000,gid=1000,iocharset=utf8,file_mode=0775,dir_mode=0775
mkdir music
sudo mkdir music
sudo su
sudo mount -t cifs //192.168.0.231/music /mnt/music -o guest,vers=3.0,uid=1000,gid=1000,iocharset=utf8,file_mode=0775,dir_mode=0775
cd music/
ls
rm -f test_music
sudo rm -f test_music
ls
ls -la
touch /mnt/music/test_from_pi && ls /mnt/music/test_from_pi && rm /mnt/music/test_from_pi
ls -la
sudo touch hi && ls && sudo rm hi
cd ../
sudo umount music/
sudo mount -t cifs //192.168.0.231/music /mnt/music -o guest,vers=3.0,uid=1000,gid=1000,file_mode=0666,dir_mode=0777,iocharset=utf8
touch /mnt/music/client_test && ls /mnt/music/client_test && rm /mnt/music/client_test
sudo umount music
ll
cd music/
ll
touch test
ll
ll
ll
ll
ll
ls -la
cat test
ls -la
mkdir pan/{playlist,music}
ll
mkdir -p pan/{playlist,music}
cd
nano .alsaequal.presets
nano .alsaequal.presets
nano .alsaequal.presets
nano .alsaequal.presets
cd /mnt/music/
ll
cd pan/
ll
mkdir -p information/{artwork,album_reviews,artist_photos,biographies,lyrics}
cd /var/log
ll
tail -f slimserver/server.log
pcp -h
pcp ll
cat /var/www/index.html
sudo su -
mkdir -p /mnt/music/pan/playlist/PlayLogSongLogs
sudo su-
sudo su
tail -f /var/log/pcp_squeezelite.log
sudo tail -f /var/log/pcp_squeezelite.log

2
servers/pan/.bashrc Normal file
View File

@@ -0,0 +1,2 @@
sudo cp -rf /home/tc/.terminfo /root/
source /usr/local/etc/bashrc

11
servers/pan/.boot.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
sudo modprobe -r btusb
sudo modprobe btusb
hciconfig hci0 up && /usr/local/lib/bluetooth/bluetoothd &
sudo pkill tidal.sh
sudo pkill tidal_connect
rm -f /tmp/tisoc-controller
sudo /usr/local/etc/init.d/avahi start
sudo /home/tc/Tidal-Connect-Armv7/tidal.sh start &

36
servers/pan/.profile Normal file
View File

@@ -0,0 +1,36 @@
# ~/.profile: Executed by Bourne-compatible login SHells.
#
# Path to personal scripts and executables (~/.local/bin).
[ -d "$HOME/.local/bin" ] || mkdir -p "$HOME/.local/bin"
export PATH=$HOME/.local/bin:$PATH
ONDEMAND=/etc/sysconfig/tcedir/ondemand
[ -d "$ONDEMAND" ] && export PATH=$PATH:"$ONDEMAND"
# Environment variables and prompt for Ash SHell
# or Bash. Default is a classic prompt.
#
PS1='\u@\h:\w\$ '
PAGER='less -EM'
MANPAGER='less -isR'
EDITOR=vi
export PS1 PAGER FILEMGR EDITOR MANPAGER
export BACKUP=1
[ "`id -un`" = "`cat /etc/sysconfig/tcuser`" ] && echo "$BACKUP" | sudo tee /etc/sysconfig/backup >/dev/null 2>&1
export FLWM_TITLEBAR_COLOR="58:7D:AA"
if [ -f "$HOME/.ashrc" ]; then
export ENV="$HOME/.ashrc"
. "$HOME/.ashrc"
fi
TERMTYPE=`/usr/bin/tty`
[ ${TERMTYPE:5:3} == "tty" ] && (
[ ! -f /etc/sysconfig/Xserver ] ||
[ -f /etc/sysconfig/text ] ||
[ -e /tmp/.X11-unix/X0 ] ||
startx
)

45
servers/pan/asound.conf Normal file
View File

@@ -0,0 +1,45 @@
# Optimized ALSA config for piCorePlayer - Syntax-fixed plug for format/resampling quality
pcm.!default {
type plug
slave.pcm "equal" # Routes to EQ chain (equal -> plugequal -> plugdefault -> hw:0,0)
ttable.0.0 1
ttable.1.1 1
rate 44100 # Default; auto-resamples sources (up to 192kHz) with dither for stable bass/highs
}
ctl.!default {
type hw
card 0
}
# Intermediate plug PCM for EQ compatibility/resampling (explicit format in slave)
pcm.plugdefault {
type plug
slave {
pcm "hw:0,0" # Direct to bcm2835 headphone jack (3.5mm)
rate 44100
format S16_LE # Native Pi format only here; dither reduces artifacts on conversion
}
}
# ALSA 10-band Equalizer (your working LADSPA - unchanged)
ctl.equal {
type equal;
controls "/home/tc/.alsaequal.bin"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.plugequal {
type equal;
slave.pcm "plugdefault";
controls "/home/tc/.alsaequal.bin"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.equal {
type plug;
slave.pcm plugequal;
ttable.0.0 1
ttable.1.1 1
}

View File

@@ -0,0 +1,68 @@
# default - Generated by piCorePlayer
pcm.!default {
type hw
slave.pcm "hw:0,0"
}
pcm.pcpinput {
type plug
card 0
device 0
}
#---ALSA EQ Below--------
pcm.sound_device {
type hw
slave.pcm {
type hw
card
device 0
}
}
ctl.equal {
type equal;
controls "/home/tc/.alsaequal.bin"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.plugequal {
type equal;
slave.pcm "sound_device";
controls "/home/tc/.alsaequal.bin"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.equal {
type plug;
slave.pcm plugequal;
}
#Bluetooth bt_W-King - Generated by pCP
pcm.bt_W-King {
type plug
slave.pcm {
type bluealsa
service "org.bluealsa"
device F4:4E:FC:1A:52:ED
profile "a2dp"
}
}
ctl.equal_bt_W-King {
type equal;
controls "/home/tc/.alsaequal.bin.bt_W-King"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.plugequal_bt_W-King {
type equal;
slave.pcm "bt_W-King";
controls "/home/tc/.alsaequal.bin.bt_W-King"
library "/usr/local/lib/ladspa/caps.so"
}
pcm.equal_bt_W-King {
type plug;
slave.pcm plugequal_bt_W-King;
}

102
servers/pan/pcp-powerbutton.sh Executable file
View File

@@ -0,0 +1,102 @@
#!/bin/sh
#
# piCorePlayer Power Button Script - Used to shutdown pCP with a GPIO input.
#
# Defaults are for the Audiophonics power button
DEBUG=0
IN_LOW=0
PIN_IN=17
PIN_OUT=22
PUPDOWN="off"
PATH=/bin:/usr/bin:/usr/local/bin
usage() {
echo " usage: $0 [-i] [-o] [--low] [--help] [--debug]"
echo " -i GPIO input pin to shutdown pCP"
echo " -o GPIO output pin for successful pCP boot"
echo " --low Input is active low (and set pull up resistor)"
echo " --high Input is active high (and set pull down resistor)"
echo " --debug Script run as normal, but will not shutdown pCP"
echo " --help script usage"
echo ""
echo " Note: pin numbers are in BCM notation"
echo ""
exit 1
}
validate_pin(){
VAL=$(echo $1 | grep -o '[[:digit:]]*')
if [ "$VAL" != "" ]; then
if [ $VAL -le 31 ]; then
return 0
fi
fi
return 1
}
which pinctrl > /dev/null
if [ $? -ne 0 ]; then
if [ -f /etc/sysconfig/tcedir/optional/raspi-utils.tcz ]; then
tce-load -i raspi-utils.tcz
else
echo "Raspi-utils required for this command"
echo "Install using: pcp-load -w raspi-utils.tcz"
exit 1
fi
fi
O=$(getopt -al help,low,high,debug -- i:o:h "$@") || exit 1
eval set -- "$O"
[ "$1" = "--" ] && echo "No command line settings, Using defaults"; echo ""
while true; do
case "$1" in
-i) PIN_IN=$2; shift;;
-o) PIN_OUT=$2; shift;;
--debug) DEBUG=1;;
--low) IN_LOW=1; PUPDOWN="pu";;
--high) IN_LOW=0; PUPDOWN="pd";;
--help) usage;;
--) shift; break;;
-*) usage;;
*) break;;
esac
shift
done
echo "piCorePlayer Power button shutdown script starting..."
validate_pin $PIN_IN
if [ $? -ne 0 ]; then
echo "Error in Input Pin Assignment"
exit 1
fi
validate_pin $PIN_OUT
if [ $? -ne 0 ]; then
echo "Error in Output Pin Assignment"
exit 1
fi
echo "Asserting pins : "
echo -n "ShutDown : GPIO${PIN_IN}=in, "
[ ${IN_LOW} -eq 1 ] && echo "Low" || echo "High"
echo "BootOK : GPIO${PIN_OUT}=out, High"
sudo pinctrl set $PIN_IN ip $PUPDOWN
sudo pinctrl set $PIN_OUT op dh
[ $IN_LOW -eq 0 ] && IN_CHK="hi" || IN_CHK="lo"
while [ 1 ]; do
if [ "$(sudo /usr/local/bin/pinctrl get ${PIN_IN} | awk -F' ' '{print $5}')" = "$IN_CHK" ]; do
echo "piCorePlayer shutting down."
[ $DEBUG -eq 0 ] && exitcheck.sh shutdown
break
fi
/bin/sleep 1
done
exit 0

33
servers/pan/powerscript.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
#========================================================================================
# Basic gpio script
#----------------------------------------------------------------------------------------
# squeezelite -S /home/tc/powerscript.sh
#
# squeezelite sets $1 to:
# 0: off
# 1: on
# 2: initialising
#----------------------------------------------------------------------------------------
# Version: 0.01 2016-03-03 GE
# Original.
# type tty at prompt to determine dev
#TERMINAL=/dev/console # boot console
TERMINAL=/dev/pts/0 # ssh window
case $1 in
2)
echo "$1: Initialising..." >$TERMINAL
;;
1)
echo "$1: turn on" >$TERMINAL
;;
0)
echo "$1: turn off" >$TERMINAL
;;
esac