Raspberry Pi + Rune Audio ::: Một trải nghiệm nghe nhạc mới

Thanhvo31

Well-Known Member
Nhờ bác @tml3nr có cookbook cài TC lên SMPD v0.9.6?

Cứu cánh đây chăng, bác @quatmo

We have prepared a modified file for setting from SMPD v0.9.6 image writing .

(1) Write & start SMPD v0.9.6 image to microSD

(2) File download

cd /home/pi
wget "https://drive.google.com/uc?export=download&id=1R5DdmAbJ00PBRviZaH0O6felPE9TdV3T" -O front_set_v096.tar.gz


Confirmation

ls -l front_set_v096.tar.gz

Check result

-rw-r--r-- 1 pi pi 60036 Aug 14 17:23 front_set_v096.tar.gz

(3) Extraction & backup & modified file copy

sudo tar xfp front_set_v096.tar.gz
cd front_set_v096
./backup.sh
./set.sh


(4) Individual settings
 Change the following 2 files by referring to the steps (1) and (2) at the top of the page.

  • / home / pi / configs / environment
  • /boot/config.txt
(5) Reboot

sudo reboot
 

quatmo

Well-Known Member
Nhờ bác @tml3nr có cookbook cài TC lên SMPD v0.9.6?

Cứu cánh đây chăng, bác @quatmo

We have prepared a modified file for setting from SMPD v0.9.6 image writing .

(1) Write & start SMPD v0.9.6 image to microSD

(2) File download

cd /home/pi
wget "https://drive.google.com/uc?export=download&id=1R5DdmAbJ00PBRviZaH0O6felPE9TdV3T" -O front_set_v096.tar.gz


Confirmation

ls -l front_set_v096.tar.gz

Check result

-rw-r--r-- 1 pi pi 60036 Aug 14 17:23 front_set_v096.tar.gz

(3) Extraction & backup & modified file copy

sudo tar xfp front_set_v096.tar.gz
cd front_set_v096
./backup.sh
./set.sh


(4) Individual settings
 Change the following 2 files by referring to the steps (1) and (2) at the top of the page.

  • / home / pi / configs / environment
  • /boot/config.txt
(5) Reboot

sudo reboot

Có TC cook book SMPD 0.96 của bác @rndce share bác xem page 1060
 

Thanhvo31

Well-Known Member
Bản Pi2/3 này hack não quá không bù cho bản pi4 1.0x, chỉ copy cái vsound vào là kêu liền.

This is the procedure to use SMPD as the front end of smpd player.

★ Notes ★
・ Please execute cat to EOC as it is for file creation and addition.
-Although the file change is described by the nano command in the procedure
 , replace it with a familiar editor and execute it.
-I think that the operation may be unstable depending on the environment, but
 basically it cannot be handled. Please use with your consent.
・This is the procedure for v0.9 series.

※ If you are out from the image writing to the microSD card,
 so we have prepared the modified file, here please refer to the reference.

(1) Addition of / home / pi / configs / environment
 * Added definition for ncat
 * Correct the IP address of NCAT_HOST according to the environment when using HUB

cat << EOC >> /home/pi/configs/environment
######################################################
# ncat
######################################################
NCAT_HOST=10.0.0.2
NCAT_DAT_PORT=4444
NCAT_INS_PORT=4443
NCAT_ACK_PORT=4445
EOC

(2) Change /boot/config.txt
* Comment out the DAC settings

sudo nano /boot/config.txt

Change before

# I2S DAC
dtoverlay=rpi-dac

After change (insert # to the left of dtoverlay)

# I2S DAC
#dtoverlay=rpi-dac

(3) Change /etc/rc.local
 * Load SCTP driver and change settings

sudo nano /etc/rc.local

Change before

# LED Off
echo 0 | sudo tee /sys/class/leds/led0/brightness
echo 0 | sudo tee /sys/class/leds/led1/brightness
;;

After change (;; insert SCTP related above line)

# LED Off
echo 0 | sudo tee /sys/class/leds/led0/brightness
echo 0 | sudo tee /sys/class/leds/led1/brightness
# SCTP
sudo modprobe sctp
echo Y > /sys/module/sctp/parameters/no_checksums
echo 0 > /proc/sys/net/sctp/prsctp_enable
echo 1 > /proc/sys/net/sctp/rcvbuf_policy
;;

(4) Change /etc/mpd.conf
 * Change the file to be called during playback

sudo nano /etc/mpd.conf

Change before

command "exec /home/pi/misc/pcminfo.sh"

After change

command "exec /home/pi/misc/pcminfo_ncat.sh"

(5) Create
 /home/pi/misc/pcminfo_ncat.sh * File called during playback via mpd and alsa

cat << EOC > /home/pi/misc/pcminfo_ncat.sh
#!/bin/bash
PCMINFO=/run/pcminfo
ENVFILE=/etc/environment
. \$ENVFILE
APP=MPD
if [ ! "\$4" = "" ]; then
APP=\$4
fi
echo "\$1 \$2 \$3 \$APP" > \$PCMINFO
/usr/local/bin/ncrecv -l \$NCAT_ACK_PORT -c /bin/true >/dev/null 2>&1 &
cat \$PCMINFO | /usr/local/bin/ncsend --sctp \$NCAT_HOST \$NCAT_INS_PORT
wait
if [ "\$APP" != "AIRPLAY" ]; then
exec cat - | /usr/local/bin/ncsend --sctp --send-only \$NCAT_HOST \$NCAT_DAT_PORT
else
sudo start-stop-daemon --start --quiet --background --exec /home/pi/misc/pipeout2ncat.sh
fi
exit
EOC

Add execute permission & confirm

chmod 755 /home/pi/misc/pcminfo_ncat.sh
ls -l /home/pi/misc/pcminfo_ncat.sh

Check result

-rwxr-xr-x 1 pi pi 516 Oct 19 15:38 /home/pi/misc/pcminfo_ncat.sh

(6) Change /home/pi/configs/pipe.sh
 * Disable aplay-rt startup and add named pipe creation process (for Shairport Sync)

nano /home/pi/configs/pipe.sh

Before change 1

device="hw:0,0"
pcminfo=/run/pcminfo

After change 1 (insert pipeout line)

device="hw:0,0"
pcminfo=/run/pcminfo
pipeout=/run/pipeout

Before change 2

exec)
if [ ! -e $pcminfo ]; then

After change 2 (Insert conditional branch of pipeout directly under exec line)

exec)
if [ ! -e $pipeout ]; then
mkfifo --mode=666 $pipeout
fi
if [ ! -e $pcminfo ]; then

Before change 3

exec /usr/local/bin/aplay-rt $opt_aplay

After change 3 (insert # at the left end)

#exec /usr/local/bin/aplay-rt $opt_aplay

(7) Change /home/pi/configs/shairport_event.sh
 * Fixed to start ncat when Shairport Sync starts.

nano /home/pi/configs/shairport_event.sh

Before change 1

begin)
echo "$DEFAULT_SAMPLE_FORMAT 44100 2 AIRPLAY" > /run/pcminfo
sudo systemctl restart pipe

After change 1 (comment out 2 lines, add 3 lines)

begin)
#echo "$DEFAULT_SAMPLE_FORMAT 44100 2 AIRPLAY" > /run/pcminfo
#sudo systemctl restart pipe
# stop pipe & start ncat
sudo systemctl stop pipe
/home/pi/misc/pcminfo_ncat.sh $DEFAULT_SAMPLE_FORMAT 44100 2 AIRPLAY

Before change 2

end)
# wakeup mpd

After change 2 (3 lines added directly under end)

end)
# stop ncat & start pipe
sudo start-stop-daemon --stop --ppid `pgrep pipeout2ncat`
sudo systemctl start pipe
# wakeup mpd

(8) Change /etc/shairport-sync.conf
 * Change the output destination of pipe

sudo nano /etc/shairport-sync.conf

Change before

name = "/dev/xsink";

After change

name = "/run/pipeout";

(9) Create /home/pi/misc/pipeout2ncat.sh
 * Pass Shairport Sync data to ncat

cat << EOC > /home/pi/misc/pipeout2ncat.sh
#!/bin/bash
PIPEOUT=/run/pipeout
ENVFILE=/etc/environment
. \$ENVFILE
cat \$PIPEOUT | /usr/local/bin/ncsend --sctp --send-only \$NCAT_HOST \$NCAT_DAT_PORT
exit
EOC

Add execute permission & confirm

chmod 755 /home/pi/misc/pipeout2ncat.sh
ls -l /home/pi/misc/pipeout2ncat.sh

Check result

-rwxr-xr-x 1 pi pi 159 Oct 19 15:42 /home/pi/misc/pipeout2ncat.sh

(10) Change /etc/asound.conf
 * Change the file to be called when playing via alsa

sudo nano /etc/asound.conf

Change before

file "|exec /home/pi/misc/pcminfo.sh %f %r %c DEFAULT"

After change

file "|exec /home/pi/misc/pcminfo_ncat.sh %f %r %c DEFAULT"

(11) Copy of ncat command

cd /tmp
wget "https://drive.google.com/uc?export=download&id=1BRfDzFX9L6rZhYA9VxbnvvRgTrBXg_GL" -O front-end_pkg.tar.gz
tar xfp front-end_pkg.tar.gz
sudo cp -p front-end_pkg/ncrecv front-end_pkg/ncsend /usr/local/bin

Confirmation

ls -l /usr/local/bin/nc[rs]*

Check result

-rwxr-xr-x 1 pi pi 43104 Aug 3 17:26 /usr/local/bin/ncrecv
-rwxr-xr-x 1 pi pi 47188 Aug 3 17:31 /usr/local/bin/ncsend

(12) Power off

sudo poweroff

(13) Connect the backend and start
 

Thanhvo31

Well-Known Member
Hôm nay coi kỹ lại, trên https://www.symphonic-mpd.com/forum/topic/71/相談室
Trước khi AoE ra đời thì Donut shop có cả Pi2 làm back end nữa bác @linh0983 , @quatmo

moorea
donuts-shop73

The other day, I learned about the existence of this bulletin board (symphonic-mpd) and returned to the world of net audio for the first time in a while.
Immediately, I am enjoying updating donuts-shop73's separate system.

My configuration is as follows, but there are some issues.
I would appreciate any advice.

Front end
raspberyPi 3b
rpi3-upnpgw-20200103 PPAP-Fr-NAS-HiRes

Backend
raspberyPi 2
rpi3-smpdplayer-i2s-20191013
dac: sabreberry


Operation software cantata

Problem 1 Sound skips when playing high resolution 192kHz and DSD. Playback normally at 96kHz The
following measures have been taken for the front:
-Create an empty file called ncat.conf in the lightMPD folder-Set
audio_buffer_size in mpd.conf to 4096
-Set samplerate_converter in mpd.conf to "soxr very high"

Issue 2 back-end to the latest version of rpi3-smpdplayer-i2s-20200216 put and NG
· No sound
of · cantata of the playback bar moves but skip about 1 minute in a few seconds, and then proceeds to the next song by repeating it

Thank you for your cooperation.
 

linh0983

Well-Known Member
Bác Lâm nghiền ngẫm copy source TC từ Dima sang Ropi tuyệt vời . TC chạy trên Arch rất ngon . o_O

ef5732ee12036d5561e88e57ac978b33.jpg
 
Bên trên