页次: 1
我在按照 Spotifyd 的 README 配置其设置文件的时候,需要填入 “alsa_audio_device”。
device = alsa_audio_device # run `aplay -L` for possible values
它只简单介绍说 “run `aplay -L` for possible values”,我运行了 `aplay -L`(输出结果附在下面)但不知应该填入什么。
瞎尝试了几个,不是启动后在 spotify 中找不到当前运行 spotifyd 的设备,就是在其他设备的 spotify app 上能控制 spotifyd 播放,但实际上运行 spotifyd 的设备没有声音。
有找到两篇博文中介绍到了别人是怎么填的,但我也没能理解我该填什么。
https://leethax.org/2017/11/08/rasp.html
https://www.famipow.com/jots/listen-spo … -headless/
请问有没有大佬能给我一点指导
这是 `aplay -L`输出的结果。
➜ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
jack
JACK Audio Connection Kit
pulse
PulseAudio Sound Server
hdmi:CARD=HDMI,DEV=0
HDA Intel HDMI, HDMI 0
HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
HDA Intel HDMI, HDMI 1
HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
HDA Intel HDMI, HDMI 2
HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
HDA Intel HDMI, HDMI 3
HDMI Audio Output
hdmi:CARD=HDMI,DEV=4
HDA Intel HDMI, HDMI 4
HDMI Audio Output
usbstream:CARD=HDMI
HDA Intel HDMI
USB Stream Output
default:CARD=PCH
HDA Intel PCH, ALC3234 Analog
Default Audio Device
sysdefault:CARD=PCH
HDA Intel PCH, ALC3234 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC3234 Analog
Front speakers
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC3234 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC3234 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC3234 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC3234 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC3234 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC3234 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=PCH
HDA Intel PCH
USB Stream Output
这是我的 spotifyd 配置文件:
[global]
username = user
password = pass
backend = alsa # run `spotifyd --backends` for possible values
device = alsa_audio_device # run `aplay -L` for possible values
# control = alsa_audio_device # device for the mixer, if not the same as 'device'
volume-control = softvol # or alsa_linear, or alsa
# onevent = command_to_run_on_playback_events
device_name = archlinuxcn # must not contain spaces
bitrate = 160 # or 96, or 320
cache_path = /……/cache
volume-normalisation = true
normalisation-pregain = -10
离线
你可能需要填:
device = default:CARD=PCH
像你贴的:https://www.famipow.com/jots/listen-spotify-on-raspberry-headless/
里面填的是
device = hw:0
为什么呢?
然后我找到一个解疑:https://superuser.com/questions/53957/what-do-alsa-devices-like-hw0-0-mean-how-do-i-figure-out-which-to-use
其中说:The hw:X,Y comes from this mapping of your hardware -- in this case, X is the card number, while Y is the device number.
card number 和 device number 可以用 aplay -l 来看到。
希望有参考
最近编辑记录 Tee (2019-09-06 09:42:53)
啦哆咪 - 用Linux制作音乐
https://lado.me
离线
页次: 1