Cannot record or playback audio on I2S using example app on WP7607


I have been having issues recording or playing audio files using the I2S interface on the mangOH Red board.

Initially I tested the I2S interface with a voice call. I used the test application “audioMcc” which is provided with the Legato source code in “apps/test/audio/audioMcc”. Once built I ran the program with the following commands:

app start audioMccTest
app runProc audioMccTest --exe=audioMccTest -- <phone number> I2S

The voice call was established and I could use the headphone/mic to listen/speak over the voice call. It worked as expected.

I then tested the I2S interface by recording to a WAV file. I used another test application “audioPlaybackRec”, with the following commands:

wm8940_demo --i2s
app runProc audioPlaybackRec --exe=audioPlaybackRecTest -- REC I2S /tmp/record.wav WAV STOP=5

The output WAV file was silent, and contained only zeros. I noticed some kernel errors on “logread” as the record was starting:

Jan  1 00:12:56 swi-mdm9x28-wp user.err kernel: [   99.089225] afe_callback: cmd = 0x100f3 returned error = 0x2
Jan  1 00:12:56 swi-mdm9x28-wp user.err kernel: [   99.094007] afe_set_lpass_clk_cfg: config cmd failed
Jan  1 00:12:56 swi-mdm9x28-wp user.err kernel: [   99.098802] afe_set_lpass_clock_v2: afe_set_lpass_clk_cfg_v2 failed -22
Jan  1 00:12:56 swi-mdm9x28-wp user.err kernel: [   99.105478] mdm_sec_mi2s_clk_ctl:afe set mclk failed

I also tried playing a file into the I2S interface using the same test application, but with the arguments “PB I2S /tmp/tone.wav”. The same kernel errors occurred, and no sound came out of the headphones.

Is recording and playback of I2S supported on the WP7607? I don’t understand why a voice call would work with I2S, but record/playback would not.

This is all using example applications it should be straight-forward for someone to replicate. Any help would be appreciated.

Hardware / software setup is as follows:

  • mangOH Red board with WP7607 modem
  • Headphone/mic connected to 3.5 inch jack
  • Legato version 19.02.0 (R13.1 GENERIC for WP7607)


how about running by “app runProc audioPlaybackRec audioPlaybackRecTest --exe=audioPlaybackRecTest – PB_SAMPLES MIC /usr/share/sounds/0-to-9.wav 1 8000 16”

i can hear voice in the audio jack.

I’ve tried the command you suggested, and it worked. I can now use REC_SAMPLES MIC 1 48000 16 and PB_SAMPLES MIC 1 48000 16 to record and playback from the I2S interface.

The Legato documentation it says MIC is for accessing the analog mic/speaker, but the documentation appears to be wrong in this case.

Thanks very much for your help.