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

rndce

Well-Known Member
Nhóm phát triển họ đã trả lời vụ cấu hình roon, bác nào ở nhà thử giúp
C27HIj.png
Trong trả lời cho mình họ có nói như sau:

To use the symphonic-mpd driver for Xenomai, you will need to write your PCM to /dev/xsink.
There are many ways to configure the driver for Xenomai, but the same method as for Spotify Connect is useful.
That is, specify default as the device for alsa.
( see /etc/spotifyd.conf )
If hw:0,0 is specified as the alsa device, then the driver for Xenomai will be set to It will not be used and will be played using the normal ALSA library/ALSA driver.

.
Mình chép file xsink ra pc mở lên ko thấy gì bên trong, không biết ghi vào kiểu gìo_O

Còn file spotifyd.conf bên trong có nội dung như sau:
--------------------

[global]
username = ******************
password = ******************
device_name = symphonic-mpd
bitrate = 320
backend = alsa
device = default

onevent = "/bin/bash /home/pi/configs/spotify_event.sh"
volume-normalisation = false
#cache_path = /run
#volume-control = alsa # or alsa_linear, or softvol
#normalisation-pregain = -10
#use-keyring = true
#mixer = PCM

---------------------
Từ lúc smpd mới xuất hiện, bác @tellme0823 dường như đã hỏi vấn đề này để xuất dùng aplay-rt, rtalsa, xsink để xuất âm cho Roon -> Bác @quatmo dường như cũng đã nghiên cứu, bác @tml3nr có lẽ hiểu rõ món này.
Đến bây giờ muốn chạy Roon trên smpd, vẫn phải chạy thêm 2 lịnh này:

Mã:
sudo systemctl stop pipe
sudo systemctl restart roonbridge
Và âm thanh vẫn xuất trực tiếp ra ALSA, không qua PIPE

Về hướng SMPD openhome

Quote trả lời của bạn papalius
Originally Posted by thanhvo31
@papalius
Is it possible to install Openhome to Smpd 1.0.6? It is binary package.
Raspberry Pi
Hi thanhvo31,

The source for openhome was made available to the public.
With a few libraries(glib, libxml, libxslt) built and a few modifications to the OpenHome Player's Makefile for aarch64, it looked like I could build it, but...
A large number of dependent library errors occurred late in the build

usr/bin/ld: cannot find -lSourceSongcast
I get about 20 errors like this.

If you install the dependent libraries one by one, I'm sure you'll be able to successfully build them at some point.

If you're willing to take the time to try, we can provide some support.

However, even if you do succeed in building it, whether or not you can get the sound out of the rtalsa/xsink driver is a different matter.
It may be easy to set up, or you may need to modify the source. This depends on how openhome is using the ALSA library.


By the way, RoonBridge was able to cope with the problem with a few source modifications. Squeezelite on the other hand has a hard time. openhome, well... I don't know.

If you're going to use the ALSA driver to produce sound instead of going through the rtalsa/xsink driver, then there's no advantage to using symphonic-mpd.
It's the same as running a low-latency kernel with the overhead of Xenomai kernel.

You can get good real-time performance only when you build your application with Xenomai API and RTDM

Mấy anh lại đau đàu đây.
Bác @Thanhvo31 cũng đã hỏi dev Nhật về rtalsa/xsink driver.
Hix mấy cái aplay-rt, rtalsa, xsink khó quá đi. Không biết ông @paparius dùng source code gì nữa. Symphonic-mpd 1.0.10 ổng bỏ bớt xsink rồi. Em suy đoán aplay-rt có thể là cái alsa aplay rồi ổng chế cháo thành aplay-rt; cái rtalsa thì chưa rõ. :):mad:

Gần đây, bác @TuanQuynhAudio đào lại món này, bác @tml3nr, bác @quatmo lại nghiên cứu tiếp aplay-rt, rtalsa, xsink -> bác @tml3nr mod lại bản smpd 0.6A có PIPE nhưng đã có sẵn librespot output pipe aplay-rt, các món Tidal Connect phải xuất trực tiếp ALSA không qua PIPE.
Hôm nay xem xuất âm của SMPD 0.9.6
Xem qua:
MPD (mpd.conf) xuất âm qua PIPE
Mã:
audio_output {
    dop "yes"
    type "pipe"
    name "pipe"
    command "exec /home/pi/misc/pcminfo.sh"
}

asound.conf
Mã:
pcm.!default{
  type plug
  slave.pcm{
    @func getenv
    vars [ DEFAULT_SAMPLE_FORMAT ]
    default "PIPE"
  }
}

pcm.S16{
  type plug
  slave{
    pcm "PIPE"
  }
}

pcm.S24{
  type plug
  slave{
    pcm "PIPE"
    format S24
  }
}

pcm.S32{
  type plug
  slave{
    pcm "PIPE"
    format S32
  }
}

pcm.PIPE{
  type file
  slave.pcm null
  file "|exec /home/pi/misc/pcminfo.sh %f %r %c DEFAULT"
  format raw
}


Cấu hình cho TC xuất ra PIPE, thay vì xuất thẳng alsa hw.
Mã:
--playback-device "PIPE" \

Kết quả: TC đi qua Pipe OK. Các bác cấu hình test thử nhé.
Cuối cùng thì bác @quatmo cũng đã tìm ra cách để sử dụng PIPE của smpd cho món Tidal Connect.
Sẵn trớn bác xem lại một lần nữa thử ,có sử dụng PIPE cho Roobridge ko ah?

 

quatmo

Well-Known Member
Setup thêm mấy cái UPNP/AirPlay dễ không Bác... được cho em xin link hướng dẫn làm luôn nhé :D
UPNP/AirPlay là của chính Volumio họ build, bản này 3.14 họ bỏ ra. Mình nghĩ là rất khó cài riêng vào. Cũng thử cài AirPlay nhưng tốn nhiều time không cài được. Mình cài AP để thay thế UPNP thì Ok nhưng AP có âm thanh thì Volumio mất âm thanh.


Bác có bản volumio có YT connect không bác cho mình xin.
YT connect bác chờ một thời gian nữa.
 

quatmo

Well-Known Member
Từ lúc smpd mới xuất hiện, bác @tellme0823 dường như đã hỏi vấn đề này để xuất dùng aplay-rt, rtalsa, xsink để xuất âm cho Roon -> Bác @quatmo dường như cũng đã nghiên cứu, bác @tml3nr có lẽ hiểu rõ món này.
Đến bây giờ muốn chạy Roon trên smpd, vẫn phải chạy thêm 2 lịnh này:

Mã:
sudo systemctl stop pipe
sudo systemctl restart roonbridge
Và âm thanh vẫn xuất trực tiếp ra ALSA, không qua PIPE


Bác @Thanhvo31 cũng đã hỏi dev Nhật về rtalsa/xsink driver.


Gần đây, bác @TuanQuynhAudio đào lại món này, bác @tml3nr, bác @quatmo lại nghiên cứu tiếp aplay-rt, rtalsa, xsink -> bác @tml3nr mod lại bản smpd 0.6A có PIPE nhưng đã có sẵn librespot output pipe aplay-rt, các món Tidal Connect phải xuất trực tiếp ALSA không qua PIPE.

Cuối cùng thì bác @quatmo cũng đã tìm ra cách để sử dụng PIPE của smpd cho món Tidal Connect.
Sẵn trớn bác xem lại một lần nữa thử ,có sử dụng PIPE cho Roobridge ko ah?
Mình không chắc bác, không chắc đúng đi qua pipe hay có đi ra rt-alsa hay không. Các bác test thử xem. Cũng chưa test nghe xem khác biệt gì không.
 

rndce

Well-Known Member
Mình không chắc bác, không chắc đúng đi qua pipe hay có đi ra rt-alsa hay không. Các bác test thử xem. Cũng chưa test nghe xem khác biệt gì không.
Mình nghĩ là có. Bác xem lại ruột cùa 2 file:
pipe.service:
Mã:
[Unit]
Description=symphonic-mpd pipe service
Wants=network-online.target
After=sound.target
After=network.target network-online.target

[Service]
EnvironmentFile=/etc/environment
Type=simple
CPUAffinity=1
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=99
LimitRTPRIO=99
LimitMEMLOCK=infinity
StartLimitBurst=0
User=root
Group=root

# none, realtime, best-effort, idle
IOSchedulingClass=realtime

# 0(highest) - 7(lowest)
IOSchedulingPriority=0

ExecStart=/home/pi/configs/pipe.sh exec

Restart=always
StartLimitInterval=5

[Install]
WantedBy=multi-user.target
và file pipe.sh:
Mã:
#!/bin/bash

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

opt_aplay="--device=${device} -i ${pcminfo}"

case "$1" in
  exec)
  if [ ! -e $pcminfo ]; then
  touch $pcminfo
  chmod 666 $pcminfo
  echo "$DEFAULT_SAMPLE_FORMAT 44100 2 DEFAULT" > $pcminfo
  fi

  read format rate ch < $pcminfo
  gravity='$GRAVITY_'$rate
  eval echo "$gravity" > /proc/xenomai/clock/coreclk
  exec /usr/local/bin/aplay-rt $opt_aplay
  ;;
esac



 

rndce

Well-Known Member
Mình nghĩ là có. Bác xem lại ruột cùa 2 file:
pipe.service:
Mã:
[Unit]
Description=symphonic-mpd pipe service
Wants=network-online.target
After=sound.target
After=network.target network-online.target

[Service]
EnvironmentFile=/etc/environment
Type=simple
CPUAffinity=1
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=99
LimitRTPRIO=99
LimitMEMLOCK=infinity
StartLimitBurst=0
User=root
Group=root

# none, realtime, best-effort, idle
IOSchedulingClass=realtime

# 0(highest) - 7(lowest)
IOSchedulingPriority=0

ExecStart=/home/pi/configs/pipe.sh exec

Restart=always
StartLimitInterval=5

[Install]
WantedBy=multi-user.target
và file pipe.sh:
Mã:
#!/bin/bash

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

opt_aplay="--device=${device} -i ${pcminfo}"

case "$1" in
  exec)
  if [ ! -e $pcminfo ]; then
  touch $pcminfo
  chmod 666 $pcminfo
  echo "$DEFAULT_SAMPLE_FORMAT 44100 2 DEFAULT" > $pcminfo
  fi

  read format rate ch < $pcminfo
  gravity='$GRAVITY_'$rate
  eval echo "$gravity" > /proc/xenomai/clock/coreclk
  exec /usr/local/bin/aplay-rt $opt_aplay
  ;;
esac
Tidal Connect trên SMPD 0.96 của mình khi set -- playbackdevice "BossDAC: Boss DAC HiFi [Master] pcm512x-hifi-0 (hw:0,0)", khi kiểm tra file bằng lệnh : sudo systemctl status ifi-streamer-tidal-connect, thì nó báo là:
May 06 21:52:38 smpd tidal_connect_application[370]: Could not find device: 'BossDAC: Boss DAC HiFi [Master] pcm512x-hifi-0 (hw:0,0)'. Fallback to default device
May 06 21:52:38 smpd tidal_connect_application[370]: Valid devices are: 'S16' 'S24' 'S32' 'PIPE' 'default'
- > Nhưng Tidal Connect vẫn hót trên smpd 0.96.


Mã:
pi@smpd:~ $ sudo systemctl status ifi-streamer-tidal-connect
● ifi-streamer-tidal-connect.service - RasPi Streamer Tidal Connect Service
   Loaded: loaded (/lib/systemd/system/ifi-streamer-tidal-connect.service; enabled)
   Active: active (running) since Thu 2021-05-06 21:52:33 JST; 7min ago
Main PID: 370 (tidal_connect_a)
   CGroup: /system.slice/ifi-streamer-tidal-connect.service
           └─370 /usr/ifi/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-path /usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat -f HiTide RasPi Streamer ...

May 06 21:52:38 smpd tidal_connect_application[370]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 06 21:52:38 smpd tidal_connect_application[370]: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
May 06 21:52:38 smpd tidal_connect_application[370]: Cannot connect to server socket err = No such file or directory
May 06 21:52:38 smpd tidal_connect_application[370]: Cannot connect to server request channel
May 06 21:52:38 smpd tidal_connect_application[370]: jack server is not running or cannot be started
May 06 21:52:38 smpd tidal_connect_application[370]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
May 06 21:52:38 smpd tidal_connect_application[370]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
May 06 21:52:38 smpd tidal_connect_application[370]: Could not find device: 'BossDAC: Boss DAC HiFi [Master] pcm512x-hifi-0 (hw:0,0)'. Fallback to default device
May 06 21:52:38 smpd tidal_connect_application[370]: Valid devices are: 'S16' 'S24' 'S32' 'PIPE' 'default'
May 06 21:52:38 smpd tidal_connect_application[370]: STARTED TidalConnect services.
pi@smpd:~ $ sudo nano /lib/systemd/system/ifi-streamer-tidal-connect.service

Chiều nay về mình set lại: --playback-device "PIPE", thì chạy lại sudo systemctl status ifi-streamer-tidal-connect, thì 2 dòng thông báo trên ko còn nữa, và Tidal Connect cũng đã hót trên smpd 0.96.
Và mình thấy điều thuận tiện hơn so với cách trước đây là dễ dàng chuyển đổi qua lại giữa nghe nhạc Tidal và offline (NAS):
- Pause trên Tidal và Play trên webUI là nghe nhạc offline, và ngược lại muốn nghe Tidal thì Pause trên WebUI và bầm play Tidal app trên phone
- (Truóc đây muốn nghe Offline thì stop trên Tidal App và chọn phát trên phone thì nó mới nhã ALSA, ngược lại muốn nghe Tidal thì phải dừng và xóa list nhạc trên WebUI)
Mã:
pi@smpd:~ $ sudo systemctl stop ifi-streamer-tidal-connect

Warning: Unit file of ifi-streamer-tidal-connect.service changed on disk, 'systemctl daemon-reload' recommended.
pi@smpd:~ $ sudo systemctl daemon-reload
pi@smpd:~ $ sudo systemctl restart ifi-streamer-tidal-connect
pi@smpd:~ $ sudo systemctl status ifi-streamer-tidal-connect
● ifi-streamer-tidal-connect.service - RasPi Streamer Tidal Connect Service
   Loaded: loaded (/lib/systemd/system/ifi-streamer-tidal-connect.service; enabled)
   Active: active (running) since Thu 2021-05-06 22:05:01 JST; 10s ago
Main PID: 6119 (tidal_connect_a)
   CGroup: /system.slice/ifi-streamer-tidal-connect.service
           └─6119 /usr/ifi/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-path /usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat -f HiTide RasPi Streamer...

May 06 22:05:01 smpd tidal_connect_application[6119]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
May 06 22:05:01 smpd tidal_connect_application[6119]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 06 22:05:01 smpd tidal_connect_application[6119]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 06 22:05:01 smpd tidal_connect_application[6119]: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
May 06 22:05:01 smpd tidal_connect_application[6119]: Cannot connect to server socket err = No such file or directory
May 06 22:05:01 smpd tidal_connect_application[6119]: Cannot connect to server request channel
May 06 22:05:01 smpd tidal_connect_application[6119]: jack server is not running or cannot be started
May 06 22:05:01 smpd tidal_connect_application[6119]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
May 06 22:05:01 smpd tidal_connect_application[6119]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
May 06 22:05:01 smpd tidal_connect_application[6119]: STARTED TidalConnect services.

PS:
--playback-device "PIPE" : Tidal chỉ stream được nhạc chuẩn 16-44, chuẩn MQA đã giải mã Tầng 1 : 24-96 thì ko hót được
--playback-device "BossDAC: - (hw:0,0)" : Tidal stream qua bình thường chuẩn 16-44, chuẩn MQA giải mã tầng 1 ok luôn. (Nhưng bất tiện trong chuyển đổi qua lại giữa nhạc Tidal và nhạc Offline NAS )

 
Chỉnh sửa lần cuối:

htklinh74

Member
Trước tiên em cảm ơn bác @linh0983 đã chia sẻ link để em download bản SMPD 0.96 về dùng thử.
Tạo thẻ xong gắn vào boot là lên luôn, em cũng loay hoay mãi mà không biết sử dụng nên hiện giờ mới chỉ biết dùng iPhone phát Youtube rồi Airplay để nghe.
Chắc sẽ phải nhờ bác @linh0983 hướng dẫn thêm để biết cách sử dụng. Tại em thấy bác linh0983 dùng cả PC và DT stream nhạc qua SMPD 0.96
Em cũng mới chơi món này nên lọc mọ loay hoay mãi. Em cũng ở ngay gần Khú chế xuất Tân Thuận quận 7 TP HCM nên em xin phép được gia nhập vào hội của các bác. Có dịp nào các bác off thì em tham gia học hỏi thêm kinh nghiệm.
Tks các bác nhiều
 

tml3nr

Moderator
UPNP/AirPlay là của chính Volumio họ build, bản này 3.14 họ bỏ ra. Mình nghĩ là rất khó cài riêng vào. Cũng thử cài AirPlay nhưng tốn nhiều time không cài được. Mình cài AP để thay thế UPNP thì Ok nhưng AP có âm thanh thì Volumio mất âm thanh.

- Anh thử dùng ~/.asoundrc theo kiểu per-user xem sao ạ o_O

YT connect bác chờ một thời gian nữa.
YC là sao anh nhỉ? Nó hoạt động có giống như SC không ạ?
 

quatmo

Well-Known Member
- Anh thử dùng ~/.asoundrc theo kiểu per-user xem sao ạ o_O
YC là sao anh nhỉ? Nó hoạt động có giống như SC không ạ?
Dạ YT Connect chính là dùng App Youtube góc trên nó có nút Cast, khi có thiết bị (Pi) trong mạng nó sẽ hiện trong đó, chọn cast sang Pi. Chọn phát 1 bài hay 1 playlist đều được. Nó truyền link audio only đến thiết bị.
 

tml3nr

Moderator
Dạ YT Connect chính là dùng App Youtube góc trên nó có nút Cast, khi có thiết bị (Pi) trong mạng nó sẽ hiện trong đó, chọn cast sang Pi. Chọn phát 1 bài hay 1 playlist đều được. Nó truyền link audio only đến thiết bị.
Nó giống như raspicast hay là dùng giao thức khác anh nhỉ o_O
 

toi511

Well-Known Member
Trước tiên em cảm ơn bác @linh0983 đã chia sẻ link để em download bản SMPD 0.96 về dùng thử.
Tạo thẻ xong gắn vào boot là lên luôn, em cũng loay hoay mãi mà không biết sử dụng nên hiện giờ mới chỉ biết dùng iPhone phát Youtube rồi Airplay để nghe.
Chắc sẽ phải nhờ bác @linh0983 hướng dẫn thêm để biết cách sử dụng. Tại em thấy bác linh0983 dùng cả PC và DT stream nhạc qua SMPD 0.96
Em cũng mới chơi món này nên lọc mọ loay hoay mãi. Em cũng ở ngay gần Khú chế xuất Tân Thuận quận 7 TP HCM nên em xin phép được gia nhập vào hội của các bác. Có dịp nào các bác off thì em tham gia học hỏi thêm kinh nghiệm.
Tks các bác nhiều
Wellcome
 

tml3nr

Moderator
Anh test so sánh trường hợp dùng Wifi AE như hiện tại của anh với trường hợp bỏ Wifi AE và kết nối dây (màu đỏ) như hình dưới xem có khác biệt gì ề âm thanh không ạ? Mobile kết nối wifi vào Time Capsule.

ABSRlIrwJrsKJVczoqE_R7sv6_iF1u3-e8dtBaBiMz9vTpwmqzS7kfN4ij8lZJX8SNMQJh17RByZC9yuUoEgTnUUZfVdkz4x1Zu9AreQaz9WOxr92zKDgvjRlWY14ZP-03TqjXEIeCRy2p3FaVXUCYeI3m0zOQtnHBl1omrzg7pOgeItfcMTokHg9Ihb5-LEf6qUhhQFATGA9AzO013DeO8RYsPatU9-Cxn432iE1fGdDvFBTHBMxyMrjWAGGKrsT0A9ndgTJmYyI_-IJ_5cKMyvHVoxSVeNMX-I0x08lPC_S4avcLP7eEmKERhXB3iwzgoSNE_DXM0O5ZPH147IruLKGG94FqEJzcTZ1AspGb3qMynhIh_8MD6PfOf2a8PHT8nuwnKoIPQQvSDndWzOqgX34OptK0T3lttz57-OiRZdQteZXbC9NvExooF2hdGI4iYIoG4giOStOHPw5LhxKGo1DpA0e0QBzh1kyriL0L-WHnTuQlug0N81UTOi2c2w_yNrgg3RmuyYiu2RzMMGYBbkPJBHGvx0VuujO84-kaNEf1br6dES0DGWyLHK7al9iLdb2tU7Q3a7hpaErBPlJxm3lYnPvXdHr_ndPeFFAdU4rEscJn6uYl7oWBHOdU0VDERLCtUFOio0PrHvL3k9N1tqmTfyycgGHlyxY2kQFvBh8LX2P3fySNc-tZX2a66RtToe21B8s_1Anh-dE-OoNDHEI69_hy2p63TU04Q=w2549-h4663-ft
Để em test lại thử xem sao ạ. Do trước đây khi dùng pi với boss dac, e, cắm dây vào TC tiếng nó sạn hơn wifi nhiều nên em chưa cắm dây cho NP5.
 

tml3nr

Moderator
Hôm nay xem xuất âm của SMPD 0.9.6
Xem qua:
MPD (mpd.conf) xuất âm qua PIPE
Mã:
audio_output {
  dop "yes"
  type "pipe"
  name "pipe"
  command "exec /home/pi/misc/pcminfo.sh"
}

asound.conf
Mã:
pcm.!default{
  type plug
  slave.pcm{
  @func getenv
  vars [ DEFAULT_SAMPLE_FORMAT ]
  default "PIPE"
  }
}

pcm.S16{
  type plug
  slave{
  pcm "PIPE"
  }
}

pcm.S24{
  type plug
  slave{
  pcm "PIPE"
  format S24
  }
}

pcm.S32{
  type plug
  slave{
  pcm "PIPE"
  format S32
  }
}

pcm.PIPE{
  type file
  slave.pcm null
  file "|exec /home/pi/misc/pcminfo.sh %f %r %c DEFAULT"
  format raw
}


Cấu hình cho TC xuất ra PIPE, thay vì xuất thẳng alsa hw.
Mã:
--playback-device "PIPE" \

Kết quả: TC đi qua Pipe OK. Các bác cấu hình test thử nhé.

Tidal Connect trên SMPD 0.96 của mình khi set -- playbackdevice "BossDAC: Boss DAC HiFi [Master] pcm512x-hifi-0 (hw:0,0)", khi kiểm tra file bằng lệnh : sudo systemctl status ifi-streamer-tidal-connect, thì nó báo là:
May 06 21:52:38 smpd tidal_connect_application[370]: Could not find device: 'BossDAC: Boss DAC HiFi [Master] pcm512x-hifi-0 (hw:0,0)'. Fallback to default device
May 06 21:52:38 smpd tidal_connect_application[370]: Valid devices are: 'S16' 'S24' 'S32' 'PIPE' 'default'
- > Nhưng Tidal Connect vẫn hót trên smpd 0.96.


Mã:
pi@smpd:~ $ sudo systemctl status ifi-streamer-tidal-connect
● ifi-streamer-tidal-connect.service - RasPi Streamer Tidal Connect Service
   Loaded: loaded (/lib/systemd/system/ifi-streamer-tidal-connect.service; enabled)
   Active: active (running) since Thu 2021-05-06 21:52:33 JST; 7min ago
Main PID: 370 (tidal_connect_a)
   CGroup: /system.slice/ifi-streamer-tidal-connect.service
           └─370 /usr/ifi/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-path /usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat -f HiTide RasPi Streamer ...

May 06 21:52:38 smpd tidal_connect_application[370]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 06 21:52:38 smpd tidal_connect_application[370]: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
May 06 21:52:38 smpd tidal_connect_application[370]: Cannot connect to server socket err = No such file or directory
May 06 21:52:38 smpd tidal_connect_application[370]: Cannot connect to server request channel
May 06 21:52:38 smpd tidal_connect_application[370]: jack server is not running or cannot be started
May 06 21:52:38 smpd tidal_connect_application[370]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
May 06 21:52:38 smpd tidal_connect_application[370]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
May 06 21:52:38 smpd tidal_connect_application[370]: Could not find device: 'BossDAC: Boss DAC HiFi [Master] pcm512x-hifi-0 (hw:0,0)'. Fallback to default device
May 06 21:52:38 smpd tidal_connect_application[370]: Valid devices are: 'S16' 'S24' 'S32' 'PIPE' 'default'
May 06 21:52:38 smpd tidal_connect_application[370]: STARTED TidalConnect services.
pi@smpd:~ $ sudo nano /lib/systemd/system/ifi-streamer-tidal-connect.service

Chiều nay về mình set lại: --playback-device "PIPE", thì chạy lại sudo systemctl status ifi-streamer-tidal-connect, thì 2 dòng thông báo trên ko còn nữa, và Tidal Connect cũng đã hót trên smpd 0.96.
Và mình thấy điều thuận tiện hơn so với cách trước đây là dễ dàng chuyển đổi qua lại giữa nghe nhạc Tidal và offline (NAS):
- Pause trên Tidal và Play trên webUI là nghe nhạc offline, và ngược lại muốn nghe Tidal thì Pause trên WebUI và bầm play Tidal app trên phone
- (Truóc đây muốn nghe Offline thì stop trên Tidal App và chọn phát trên phone thì nó mới nhã ALSA, ngược lại muốn nghe Tidal thì phải dừng và xóa list nhạc trên WebUI)
Mã:
pi@smpd:~ $ sudo systemctl stop ifi-streamer-tidal-connect

Warning: Unit file of ifi-streamer-tidal-connect.service changed on disk, 'systemctl daemon-reload' recommended.
pi@smpd:~ $ sudo systemctl daemon-reload
pi@smpd:~ $ sudo systemctl restart ifi-streamer-tidal-connect
pi@smpd:~ $ sudo systemctl status ifi-streamer-tidal-connect
● ifi-streamer-tidal-connect.service - RasPi Streamer Tidal Connect Service
   Loaded: loaded (/lib/systemd/system/ifi-streamer-tidal-connect.service; enabled)
   Active: active (running) since Thu 2021-05-06 22:05:01 JST; 10s ago
Main PID: 6119 (tidal_connect_a)
   CGroup: /system.slice/ifi-streamer-tidal-connect.service
           └─6119 /usr/ifi/ifi-tidal-release/bin/tidal_connect_application --tc-certificate-path /usr/ifi/ifi-tidal-release/id_certificate/IfiAudio_ZenStream.dat -f HiTide RasPi Streamer...

May 06 22:05:01 smpd tidal_connect_application[6119]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
May 06 22:05:01 smpd tidal_connect_application[6119]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 06 22:05:01 smpd tidal_connect_application[6119]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 06 22:05:01 smpd tidal_connect_application[6119]: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
May 06 22:05:01 smpd tidal_connect_application[6119]: Cannot connect to server socket err = No such file or directory
May 06 22:05:01 smpd tidal_connect_application[6119]: Cannot connect to server request channel
May 06 22:05:01 smpd tidal_connect_application[6119]: jack server is not running or cannot be started
May 06 22:05:01 smpd tidal_connect_application[6119]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
May 06 22:05:01 smpd tidal_connect_application[6119]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
May 06 22:05:01 smpd tidal_connect_application[6119]: STARTED TidalConnect services.

Dùng giao thức DIAL
Quá hay các anh ạ :eek::eek::eek:
 
Bên trên