WP76xx I2S Stereo Recording not Working


we are testing recording via I2S interface on WP76xx. Although we are setting le_audio_OpenI2sRx(LE_AUDIO_I2S_STEREO) the file only records mono instead of stereo.

The Product Specification is listing I2S to be capable doing stereo. Is this correct?

We also followed le_audio_OpenI2sRx which calls pa_audio_SetI2sChannelMode to set the mode, but we can’t find pa_audio_SetI2sChannelMode in the legato sources. There is only the simulation version of it.
Where is the source code for pa_audio_SetI2sChannelMode?


It is not opened source for this api

Have you set your codec to be stereo?

do you mean le_audio_SetEncodingFormat(fileAudioRef, LE_AUDIO_WAVE);? That’s what is set at the moment

I mean your hardware codec

can you tell me the API function, or documentation that is describing that?

I don’t know your codec

what exactly do you mean with codec?

The slave is sending data for the left and right channel. At the moment these are some values to check if both channels are in the recording, but we are missing one channel in the recording.

We confirmed that the slave is sending it correctly by measuring it with an oscilloscope.

So why is one channel missing?

I already read in another post for wp75, that it’s only capable of recording mono. Does this also apply to the wp76?

What hardware codec are you using

I don’t know what you mean with hardware codec. Which side? Slave or Master?

Can you give me an example of hardware codecs so I know what you are talking about?

As I wrote, the slave is sending some values for the left and right channel. 16bit for the left and then 16bit for the right channel.

E.g. mangoh red is using wm8944 audio codec

The slave is a ADC with 2 channels, 16 bit/channel. So it’s stereo.
We are able to send defined 16 bit words for each channel from the slave to the wp76.

We are sending 0x1111 and 0x3333 for one channel and 0x2222 and 0xa00a for the other channel.

In the file that we are recording, we can see the following:

00000030: 1111 1111 3333 3333 1111 1111 3333 3333  ....3333....3333
00000040: 1111 1111 3333 3333 1111 1111 3333 3333  ....3333....3333
00000050: 1111 1111 3333 3333 1111 1111 3333 3333  ....3333....3333

So you can clearly see, that a channel is missing.
We measured it with the oscilloscope and can confirm that the slave is indeed sending the two channels:

So the question remains:

Why is the wp76 recording in mono? How can we change it to record in stereo?

no experience on this before, but can you try if aplay can play stereo wave file?

amix 'PRI_MI2S_RX Audio Mixer MultiMedia’1
amix ‘PRI_MI2S_RX Channels’ 2
aplay /data/stereo.wav

I’m not able to listen to a file since this is a custom board and doesn’t have an audio output.
And the command is not working:

root@swi-mdm9x28-wp:~# amix 'PRI_MI2S_RX Channels'2
can't find control

I saw this, you might give a try.
(if it does not work, I have no idea then)

root@swi-mdm9x28-wp:~# amix 'MI2S_RX Channels' 1
Value: 1 idx:0
root@swi-mdm9x28-wp:~# amix 'MI2S_TX Channels' 1
Value: 1 idx:0