I have setup a pi-zero with digital mems mics from Adafruit, and also the digital DAC. I can use arecord
to record stereo audio, and then aplay
to playback the audio over the DAC. Interestingly, the DAC just worked out of the box after following the MEMS mic pi setup instructions.
My problem comes with full duplex operation. I wrote a C++ JUCE application to test some of the capabilities. If I initialise the inputs only, I can monitor the input device levels. If I initialise the outputs only, I can output synthesised audio. However, when I initialise both inputs an outputs, I cannot even hear synthesised audio playback (the device fails at initialisation with a resource-busy error).
Where should I begin looking into debugging this? I'm an i2s noob. Is full duplex even possible?
Just for reference, the ALSA device list looks like this . .
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpisimplecar [snd_rpi_simple_card], device 0: simple-card_codec_link snd-soc-dummy-dai-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
**** List of CAPTURE Hardware Devices ****
card 0: sndrpisimplecar [snd_rpi_simple_card], device 0: simple-card_codec_link snd-soc-dummy-dai-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
The tail of the output of alsa-conf might also be revealing. I set up the mems mics first, then followed the Adafruit instructions for setting up the DAC (hence the references to hifiberry_dac).
!!ALSA/HDA dmesg
!!--------------
[ 9.197591] asoc-simple-card asoc-simple-card.0: ASoC: CPU DAI 20203000.i2s not registered - will retry
[ 9.360780] asoc-simple-card asoc-simple-card.0: snd-soc-dummy-dai <-> 20203000.i2s mapping ok
[ 9.661734] bcm2835-i2s 20203000.i2s: Trying to bind component to card "snd_rpi_hifiberry_dac" but is already bound to card "snd_rpi_simple_card"
[ 9.661759] snd-hifiberry-dac soc:sound: ASoC: failed to instantiate card -19
[ 9.661923] snd-hifiberry-dac soc:sound: snd_soc_register_card() failed: -19
[ 15.728423] Adding 102396k swap on /var/swap. Priority:-1 extents:1 across:102396k SSFS