This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Tida-01454:在 AM5729中配置 I2S CMB

Guru**** 1125820 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/simulation-hardware-system-design-tools-group/sim-hw-system-design/f/simulation-hardware-system-design-tools-forum/1070442/tida-01454-configuring-i2s-cmb-in-am5729

部件号:Tida-01454
《线程:BeagleBone》中讨论的其他部分

你好

我正在尝试从 CMB 接收声音,并将声音输入我的 BeagleBone AI。 我已经按照 https://www.ti.com/lit/an/sprac97/sprac97.pdf 的要求设置 了驱动程序,因为我可以看到如下所示的捕获设备:

debian@beaglebone:/etc$ 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

或  

debian@beaglebone:/etc$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCM5102a [PCM5102a], device 0: davinci-mcasp.0-pcm5102a-hifi pcm5102a-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

我用这种方式配置了引脚:

P9.12                                171 fast rx down  0 mcasp 0 rx clk   mcasp@48460000 (mcasp1_pins)
P9.27b                               172 fast rx       0 mcasp 0 rx fs    mcasp@48460000 (mcasp1_pins)
P9.18b                               173 fast rx       0 mcasp 0 d0       mcasp@48460000 (mcasp1_pins)

但我不完全理解在我的 asound.conf 分割信道后必须对 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"
}

我认为这可能是我的问题,因为每当我试图记录某些内容时,我都会遇到这种错误:

debian@beaglebone:/var/lib/cloud9$ arecord --device="hw:1,0" -d 20 -f S16_LE test.wav                                                                                                                                                                             
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
arecord: pcm_read:2145: read error: Input/output error

那么我该怎么办呢?