我有 MPD 和DSP模块在 rpi debian jessie 中运行
DSP 模块有助于添加系统范围的音频效果。
由于 MPD 创建自己的用户,因此mpd
它无法识别 DSP 库在根目录中执行的所有配置。
我怎样才能解决这个问题?
我已经像这样配置了 alsa
我的默认值.asoundrc
pcm.dsp {
type plug
slave {
format FLOAT
rate unchanged
channels unchanged
pcm {
type ladspa
path "/usr/lib/ladspa"
playback_plugins [{
label "ladspa_dsp"
}]
slave.pcm {
type plug
slave {
pcm "hw:0,0"
rate unchanged
channels unchanged
}
}
}
}
}
pcm.!default {
type copy
slave.pcm "dsp"
}
默认情况下运行mpg321 -a dsp music_test/test_track.mp3
效果很好。
但自从MPD 创建自己的用户 mpd
,我无法让它识别默认的 alsa 设备dsp
,而是抛出错误。
pi@raspberrypi:~ $ sudo -u mpd mpg321 -a dsp music_test/Pashmina.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
now maintained by Nanakos Chrysostomos and others.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title : 02 Pashmina SongsMp3.Com Artist : Amit Trivedi
Album : Fitoor SongsMp3.Com Year : 2016
Comment : SongsMp3.Com Genre : Bollywood
Directory: music_test
Playing MPEG stream from Pashmina.mp3 ...
MPEG 1.0 layer III, 320 kbit/s, 44100 Hz joint-stereo
ladspa_dsp: error: no config files found
ALSA lib pcm_ladspa.c:1509:(snd_pcm_ladspa_add_plugin) Unable to find or load plugin 'ladspa_dsp' ID 0, path '/usr/lib/ladspa'
Can't open libao driver with device dsp (is device in use?)
这是 MPD 日志
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM dsp
Jul 18 19:17 : exception: Failed to open "default" [alsa]
Jul 18 19:17 : exception: nested: Failed to open ALSA device "dsp": No such file or directory
Jul 18 19:17 : exception: Failed to open "default" [alsa]
Jul 18 19:17 : exception: nested: Failed to open ALSA device "dsp": No such file or directory
我怎样才能解决这个问题?
我如何告诉用户“mpd”从默认根用户访问所有内容。
答案1
该文件~/.asoundrc
包含用户的定义。
该文件/etc/asound.conf
包含所有用户的定义。