Hello
I am trying to receive sound from the CMB into my Beaglebone AI. I have followed this https://www.ti.com/lit/an/sprac97/sprac97.pdf and managed to set the driver, since I can see the capture device like this:
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
or
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
I have configured the pins this way:
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)
But I dont fully understand the changes that must be made in ALSA configuration since my asound.conf splits channels:
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" }
and i think this might be my problem because whenever I try to record something I get this error:
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
So what do I have to do?