cancel
Showing results for 
Search instead for 
Did you mean: 

Reading audio from CN11 jack connector on 32F746GDISCOVERY

AZane.1
Associate II

Hello, is there any example available that implements audio reads from the from CN11 jack connector on 32F746GDISCOVERY board?

1 ACCEPTED SOLUTION

Accepted Solutions
AZane.1
Associate II

I solved looking into this very thorough video: https://www.youtube.com/watch?v=O2XaCFsWxSw&t=1272s&ab_channel=PizzaBeerEngineering and its associated repo: https://github.com/bootladder/audioprocessor for the STM32F769 Discovery board. I have set up a fork of the original that implements a simple pass-through on the 32F746GDISCOVERY: https://github.com/zanellia/audioprocessor.

Note: Note: Just in case someone else finds this useful, I figured that a simple pass-through can be obtained adapting https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Projects/STM32746G-Discovery/Examples/BSP/Src/audio_loopback.c from the STM32Cube repo. It mostly requires changing this line https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery_audio.c#L893 such that it allows 

INPUT_DEVICE_INPUT_LINE_1

 too and fix the gain of the wm8994 codec here https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/BSP/Components/wm8994/wm8994.c#L310 from 0x0035  to 0x0025 (both right and left channel).

View solution in original post

3 REPLIES 3
Imen.D
ST Employee

Hello @AZane.1​ ,

Welcome to the STM32 Community :smiling_face_with_smiling_eyes:

There is an ready for use "Audio" example in the STM32CubeF7 MCU package called "Audio_playback_and_record" based on STM32746G-Discovery at this path: \STM32Cube_FW_F7_V1.16.0\Projects\STM32746G-Discovery\Applications\Audio\Audio_playback_and_record

You find more details on how to use this example in the readme.txt file.

Here is the STM32746G-Discovery user manual UM1907, You find in page 17 more information about Audio hardware features on this board.

Hope this helps you.

Please mark my answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
AZane.1
Associate II

Hi @Imen DAHMEN​ , thanks for your reply! Unfortunately, the example by you indicated records audio from the MEMS microphones MP45DT02 (similarly to what is done in the preloaded Demo). I was wondering if there is any example that uses the jack input (CN11). Also, I was wondering why for this board it is not possible to use INPUT_DEVICE_INPUT_LINE_1 when calling BSP_AUDIO_IN_OUT_Init (see https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery_audio.c#L893). Is it possible at all to stream audio on the jack output CN10 while reading from the jack input CN11? Thanks!

AZane.1
Associate II

I solved looking into this very thorough video: https://www.youtube.com/watch?v=O2XaCFsWxSw&t=1272s&ab_channel=PizzaBeerEngineering and its associated repo: https://github.com/bootladder/audioprocessor for the STM32F769 Discovery board. I have set up a fork of the original that implements a simple pass-through on the 32F746GDISCOVERY: https://github.com/zanellia/audioprocessor.

Note: Note: Just in case someone else finds this useful, I figured that a simple pass-through can be obtained adapting https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Projects/STM32746G-Discovery/Examples/BSP/Src/audio_loopback.c from the STM32Cube repo. It mostly requires changing this line https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery_audio.c#L893 such that it allows 

INPUT_DEVICE_INPUT_LINE_1

 too and fix the gain of the wm8994 codec here https://github.com/STMicroelectronics/STM32CubeF7/blob/master/Drivers/BSP/Components/wm8994/wm8994.c#L310 from 0x0035  to 0x0025 (both right and left channel).