5

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

debian@beaglebone:/etc$ arecord -d 10 ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) 无法打开从属 arecord: main:828: audio open error: No such file or directory

但是由于我从以下位置获得此输出,因此检测到了该卡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"
}

那么这可能是什么问题?

4

1 回答 1

0

录制时,您应该告诉 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 1, device 0)

所以 :

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

他应该问你格式,例如:

Available format:
- S8
- S16_LE

然后你可以添加格式:

arecord --device="hw:1,0" -f S16_LE test.wav
于 2022-01-24T11:12:12.563 回答