Em đang dùng RopieeeXL làm renderer, ko biết so với APlayer thì thế nào bác ơi? Em thấy ropieeexl cho âm thanh khá ổn và chạy nhẹ, tối ưu hơn moode và volumio.
Có cách nào cho fix cứng full volume của Server và renderer về max hết để có bit perfect ko bác ơi. Em muốn bypass qua tất cả các volume của phần mềm, dac vì vol em chỉnh trên preamp ạ?
Lâu rồi em không test lại ropieee, nên không rõ lắm. Theo thông tin trên web ropieeexl dùng upmpdcli để làm upnp renderer.
Nếu chạy trên cùng một OS, theo em thì aprenderer tiếng hay hơn upmpdcli.
Anh test thử xem sao ạ.
Trong mô hình upnp, volume nằm ở renderer. upnp server chỉ truyền file đi.
Muốn fix volume của renderer. Anh chạy alsamixer. Kéo cho volume lên 100%. Nếu cần thì chạy thêm lệnh sau để save lại:
Nói về bit perfect thì chuyện hơi dài. Về lý thuyết thì muốn bit perfect file nhạc khi đến dac xử lý phải không được thay đổi bit depth và sample rate.
Nhưng nếu như dac chỉ support 24 hay 32 bit thì file nhạc 16 bit phải được cộng thêm 0 vào (Padding) cho đủ 24 / 32 bit dac mới làm việc được. Việc này được cho là ít hay không ảnh hưởng đến âm thanh. Nhưng không còn được coi là bit perfect nữa.
Nếu thay đổi sample rate âm thanh sẽ biến đổi nhiều hơn. Hay hay dở tùy quan điểm mỗi người. Nhưng theo em mình nên nắm rõ để kiểm soát nó sao cho kết quả tốt nhất.
Thí dụ như khi mình dùng một dac không support multirate mà nó fix ở 48 hay 96Khz. Thì khi play 16/44.1 nó sẽ phải upsampling ở một chổ nào đó. Khi đó mình sẽ quyết định xem nên upsampling ở đâu, như thế nào.
Trên pi. Mình có thể dùng
alsacap và các lệnh sau để check dac. Thí dụ bên dưới em test dac Topping E30:
Mã:
pi@pi4:~ $ alsacap
*** Scanning for playback devices ***
Card 1, ID `E30', name `E30'
Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
2 channels, sampling rate 44100..768000 Hz
Sample formats: S32_LE, SPECIAL, DSD_U32_BE
Buffer size range from 16 to 131072
Period size range from 8 to 65536
Subdevice 0, name `subdevice #0'
Vậy có vẻ như dac này default PCM 32. DSD 32 bit.
Ta check tiếp:
Check aplay -L:
Mã:
pi@pi4:~ $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
sysdefault:CARD=E30
E30, USB Audio
Default Audio Device
front:CARD=E30,DEV=0
E30, USB Audio
Front speakers
surround21:CARD=E30,DEV=0
E30, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=E30,DEV=0
E30, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=E30,DEV=0
E30, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=E30,DEV=0
E30, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=E30,DEV=0
E30, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=E30,DEV=0
E30, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=E30,DEV=0
E30, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=E30,DEV=0
E30, USB Audio
Direct sample mixing device
dsnoop:CARD=E30,DEV=0
E30, USB Audio
Direct sample snooping device
hw:CARD=E30,DEV=0
E30, USB Audio
Direct hardware device without any conversions
plughw:CARD=E30,DEV=0
E30, USB Audio
Hardware device with all software conversions
Trong mấy cái output này. Đáng chú ý nhất là:
sysdefault:CARD=E30 | Default Audio Device
dmix:CARD=E30,DEV=0 | Direct sample mixing device
hw:CARD=E30,DEV=0 | Direct hardware device without any conversions
plughw:CARD=E30,DEV=0 | Hardware device with all software conversions
Mình sẽ dùng một số file wave để test.
Mã:
pi@pi4:~ $ aplay 1644.wav -D hw:CARD=E30
Playing WAVE '1644.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1339: Sample format non available
Available formats:
- S32_LE
- SPECIAL
- DSD_U32_BE
Sample format non available | Không play được.
Mã:
pi@pi4:~ $ aplay 3244.wav -D hw:CARD=E30
Playing WAVE '3244.wav' : Signed 32 bit Little Endian, Rate 44100 Hz, Stereo
Playing WAVE '3244.wav' : Signed 32 bit Little Endian, Rate 44100 Hz, Stereo | Play được. Dac báo 44.1KHz.
Kết luận: hw:CARD=E30 chỉ tiếp nhận 32 bit. Như vậy là trước khi đưa vào dac. File 16 bit đã được thêm vào cho đủ 32 bit.
Test tiếp:
Mã:
pi@pi4:~ $ aplay 1644.wav -D plughw:CARD=E30
Playing WAVE '1644.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Playing WAVE '1644.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo | Play được. plughw:CARD=E30 phát được 16/44.1 vì nó software conversion. Cái output này dùng được cho spotifyd.
More info:
https://thewelltemperedcomputer.com/Intro/SQ/BitPerfectPlayback.htm
https://soundcheck-audio.blogspot.com/2011/04/resampling-if-you-cant-avoid-it.html
https://archphile.org/manual/archphile-manual.pdf | page 35