cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use HAL library to implement a DSP audio library?

misterstarshine
Associate III
Posted on September 13, 2016 at 19:03

Hi.

I would like to use my STM32F746G-Discovery board as a stereo effect unit. I have used STM32Cube to initialize the audio codec. How do I implement a callback routine that reads stereo data from line-in and processes it to line-out through an audio buffer? I want to use 32-bit bitdepth and 96kHz samplerate. I want the callback routine to run automatically and continiously and to have an optional buffer length to be able to control the latency. Thanks in advance.
2 REPLIES 2
richardvenn9
Associate
Posted on September 13, 2016 at 20:39

oops, just reposted pretty much the same question (sorry moderators)!  See my recent post  nucleo-F746ZG I2S example.

 

Did you make any progress towards working interface to audio i2s stream yet?

misterstarshine
Associate III
Posted on September 14, 2016 at 19:29

The only thing I've got to work so far is to use the functions in the file stm32746g_discovery_audio.c

The function BSP_AUDIO_OUT_Play can play an audio buffer of arbitary length. This library seems to be hardcoded to use 16-bit audio only and I also don't know how to output stereo audio.

For a DSP application it would be more useful to have an interrupt that retriggers the dsp callback routine automatically so that the main loop of the program can do other stuff than to transmit audio buffers.