cancel
Showing results for 
Search instead for 
Did you mean: 

Can both microphones and Line In audio input channels on STM32F769I DISCO board be used simultaneously for 2 different audio sources?

Vandana Rajan
Associate II
Posted on April 30, 2018 at 06:27

STM32F769I DISCO board has 2 input options (mics and line in) and 2 output options (headphones and speaker). According to the examples in the CUBE package, we have the option to use both outputs simultaneously. Is it possible to use both the audio inputs simultaneously? I mean, can I have one audio source from line-in to headphones and another from mics to speakers, at the same time? Does the hardware architecture allow this?

4 REPLIES 4
Andrew Neil
Evangelist
Posted on April 30, 2018 at 08:53

What does the User Manual for the Disco board tell you?

Have you looked at the schematics?

Posted on April 30, 2018 at 10:21

Both input sources (microphones and line-in) and both outputs (headphones and speakers) are connected to a single CODEC,  WM8994ECS, and it has only one bidir SPI connection (i.e. one stereo channel in, one stereo channel out).

In other ways, the mcu can read only one stereo source (two chnnels) and write one stereo destination (two channels) at a time.

The sources and destinations may be routed inside the CODEC, which may or may not suit your purpose, it's upon you to decide. Whether this is possible at all, it is - as Andrew said above - something you have to find out by reading the CODEC's datasheet.

JW

Vandana Rajan
Associate II
Posted on May 03, 2018 at 12:53

I have gone through the user manual of wm8994 codec chip used in the 769 disco board. 

https://d3uzseaevmutz1.cloudfront.net/pubs/proDatasheet/WM8994_v4.5.pdf

 

I have also gone through the wm8994.c file shipped with the Cube package. I observed that the audio interface 1 (AIF1)  (see pages 6 and 64 of the pdf) is being used by both the microphones and the line in inputs. Data from microphones reach the codec chip via AIF1, whereas line in (which is directly connected to the codec) data goes to the microcontroller via AIF1. This makes me wonder if it is possible at all to use both mics and line in to send 2 different audio to the outputs.

Posted on May 03, 2018 at 22:18

I made a mistake - was only quickly skimming the manual to the 769 DISCO.

Turns out, the microphones are NOT connected to the CODEC:

0690X0000060AzNQAU.png

DFSDM_CKOUT/DFSDM_DATIN1/DFSDM_DATIN5 is connected to the mcu, and to DFSDM pins of it, so you can input the signal from all 4 microphones into the mcu directly. That leaves only the jack input to be read through the ADCs, that's two channel.

The test points may be a way how the microphones *could* be connected (by soldering patch wires on the board) to the CODEC: even if - as you say - there inputs from ADCs are multiplexed by inputs from the digital microphones, IMO two of them could still be used:

0690X0000060AyKQAU.png

But that's not necessary, just an option, if you'd want to try that.

There must be noted here that this CODEC supports TDM, and is connected to SAI which should also support TDM, thus it may be possible to transfer 4 channels simultaneously in both directions.

The output involves a very extensive mix, but as far as I understand it, it may be possible to use 2 of the 4 TDM channels as headphone output and 2 of them as speaker output simultaneously.

JW