检查音频捕获设备时出错



你好,我正在尝试检查Beaglebone AI是否从TIDA-1454获得正确的I2S,所以如果我尝试arecord test.wav,我会得到:

debian@beaglebone:/etc/arecord-d 10 ALSA库pcm_dsnop.c:638:(snd_pcm_dsono_open(无法打开从属设备的跳线:main:828:音频打开错误:没有这样的文件或目录

但由于我从arecord -l:获得此输出,因此检测到卡

**** List of CAPTURE Hardware Devices ****
card 1: PCM5102a [PCM5102a], device 0: davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

arecord -L:

debian@beaglebone:/var/lib/cloud9$ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
onboard
onboard_capture_left
onboard_playback_left
onboard_capture_right
onboard_playback_right
plug_onboard_capture_left
plug_onboard_playback_left
default
sysdefault:CARD=PCM5102a
PCM5102a,
Default Audio Device
dmix:CARD=PCM5102a,DEV=0
PCM5102a,
Direct sample mixing device
dsnoop:CARD=PCM5102a,DEV=0
PCM5102a,
Direct sample snooping device
hw:CARD=PCM5102a,DEV=0
PCM5102a,
Direct hardware device without any conversions
plughw:CARD=PCM5102a,DEV=0
PCM5102a,
Hardware device with all software conversions

和ALSA配置:

pcm.onboard{
type hw
card 0
}
ctl.onboard {
type hw
card 0
}
### Dsnoop splited channels
pcm.onboard_capture_left {
type dsnoop
ipc_key 32
slave {
pcm "onboard"
channels 2
rate 48000
format S32_LE
}
bindings.0  0
}
pcm.onboard_playback_left {
type dmix
ipc_key 33
slave {
pcm "onboard"
channels 2
}
bindings.0  0
}

pcm.onboard_capture_right {
type dsnoop
ipc_key 32
slave {
pcm "onboard"
channels 2
rate 48000
format S32_LE
}
bindings.0  1
}
pcm.onboard_playback_right {
type dmix
ipc_key 33
slave {
pcm "onboard"
channels 2
}
bindings.0  1
}

### PLUGS ##
### used with darkice
### device = plug:plug_onboard_left
pcm.plug_onboard_capture_left{
type plug
slave.pcm "onboard_capture_left"
}
pcm.plug_onboard_playback_left{
type plug
slave.pcm "onboard_playback_left"
}
pcm.!default {
type asym
playback.pcm "plug_onboard_playback_left"
capture.pcm "plug_onboard_capture_left"
}

那么问题出在哪里呢?

录制时,您应该告诉alsa要使用什么设备:

**** List of CAPTURE Hardware Devices ****
card 1: PCM5102a [PCM5102a], device 0: davinci-mcasp.0-pcm5102a-hifi >pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

您的设备地址为:hw:1,0(card 1device 0(

因此:

arecord --device="hw:1,0" test.wav

他应该问你格式,例如:

Available format:
- S8
- S16_LE

然后你可以添加格式:

arecord --device="hw:1,0" -f S16_LE test.wav

相关内容

  • 没有找到相关文章

最新更新