PulseAudio无法检测RaspBMC上的声卡
我正在尝试将raspbmc(在Raspberry Pi型号b上运行)的默认音频输出录制到原始wav流(我希望通过管道将其传输到piFM,以将音频传输到FM调谐器)。 我没有成功地使用arecord,并且发现raspbmc的默认音频引擎是pulseaudio,所以我尝试了使用PulseAudio无法检测RaspBMC上的声卡,audio,raspberry-pi,alsa,pulseaudio,Audio,Raspberry Pi,Alsa,Pulseaudio,我正在尝试将raspbmc(在Raspberry Pi型号b上运行)的默认音频输出录制到原始wav流(我希望通过管道将其传输到piFM,以将音频传输到FM调谐器)。 我没有成功地使用arecord,并且发现raspbmc的默认音频引擎是pulseaudio,所以我尝试了使用parecord/pacat的whle方法 我的pi通过HDMI连接到电视,声音正常工作。 但是pactllist只提供了以下接收器/源: Sink #0 State: SUSPENDED Na
parecord
/pacat
的whle方法
我的pi通过HDMI连接到电视,声音正常工作。
但是pactl
list只提供了以下接收器/源:
Sink #0
State: SUSPENDED
Name: auto_null
Description: Dummy Output
Driver: module-null-sink.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 4
Mute: no
Volume: 0: 100% 1: 100%
0: 0.00 dB 1: 0.00 dB
balance 0.00
Base Volume: 100%
0.00 dB
Monitor Source: auto_null.monitor
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Dummy Output"
device.class = "abstract"
device.icon_name = "audio-card"
Formats:
pcm
Source #0
State: SUSPENDED
Name: auto_null.monitor
Description: Monitor of Dummy Output
Driver: module-null-sink.c
Sample Specification: s16le 2ch 44100Hz
Channel Map: front-left,front-right
Owner Module: 4
Mute: no
Volume: 0: 100% 1: 100%
0: 0.00 dB 1: 0.00 dB
balance 0.00
Base Volume: 100%
0.00 dB
Monitor of Sink: auto_null
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Monitor of Dummy Output"
device.class = "monitor"
device.icon_name = "audio-input-microphone"
Formats:
pcm
此外,aplay
给了我:
pi@raspbmc:~$ aplay -l
aplay: device_list:252: no soundcards found...
pi@raspbmc:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
尝试从默认设备录制音频时,不会录制任何内容。
当我尝试使用paplay播放声音时,不会播放任何声音(没有错误,只是没有声音)
那么我在这里错过了什么?我只需要将所有播放的声音发送到另一个程序
我在谷歌、论坛、维基和博客上花了数小时,但还没有找到适合我的设置的解决方案
提前谢谢
编辑:
/raspbmc上不存在dev/audio,/dev/snd只包含“timer”条目您可能需要为声音设备加载内核模块,如下所示:
# modprobe snd-bcm2835
这将导致一些新的设备文件出现在pulseaudio将检测为卡0的/dev/snd/
中。如果我理解正确的话,这个设备是一个让pulseaudio通过ALSA输出声音的层。将其添加到/etc/modules
中,使其在引导时自动加载
在我的设置中,默认情况下ALSA通过HDMI输出声音。如果没有,或者如果您希望将其更改为phono插孔,可以使用amixer
命令:
$ amixer cset numid=3 <output>
0=auto
1=headphones
2=hdmi
$amixer cset numid=3
0=自动
1=耳机
2=hdmi
来源:。与他们的示例相反,我可以以非特权用户pi而不是root用户的身份执行此命令。我已经为此奋斗了大约一周左右。尽管在我的linux菜单配置中为snd_bcm2835启用了ALSA
pi@raspi:~$ aplay -l
aplay: device_list:250: no soundcards found...
及
这是固定的:
尝试将dtparam=audio=on添加到/boot/config.txt
来源:非常感谢fzinken>到目前为止,您找到解决此问题的方法了吗?
# aplay output.wav
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function
snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat
returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer
returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file
or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:788: audio open error: No such file or directory