2016-10-03 11:56 AM
Hi.
I would like to record stereo audio with the line-in jack on the STM32F746G Discovery board. I haven't seen any example that deals with stereo input. Is this supposed to be possible at all or is there a hardware of software limitation? According to the schematic the input jack is stereo and is connected in that manner to the audio codec. Thanks in advance #stm32f7-audio-stereo2017-04-03 01:49 PM
I've identified the nosie problem and finally did the first DSP project. Here it is:
if someone interested in. It is DSP 700HZ bandpass filter for radio CW reception.2017-07-30 04:42 PM
Nice one
!I tried adding a delay line and using float buffers in sdram, but the data loaded from sdram appears to be corrupted.
Mapping:
#define DELAY_BUFFER_SIZE ((uint32_t)(DEFAULT_AUDIO_IN_FREQ))// 1 second#define AUDIO_BUFFER_IN AUDIO_REC_START_ADDR#define AUDIO_BUFFER_OUT (AUDIO_BUFFER_IN + (AUDIO_BLOCK_SIZE*2))#define DELAY_BUFFER_START (AUDIO_BUFFER_OUT + (AUDIO_BLOCK_SIZE*2))�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
Example:
void Delay(){ uint32_t i, j; arm_q15_to_float ((uint16_t*)(DELAY_BUFFER_START + dReadPos), delayBufferRead, AUDIO_BLOCK_SIZE); for(i=0, j=0; i < AUDIO_BLOCK_SIZE; i+=2 , ++j) { dSample = delayBufferRead[j] * dFeedback; delayBufferWrite[j] = float_buffer_in[i] + dSample; float_buffer_out[i] = float_buffer_in[i] + dSample * dMix; float_buffer_out[i+1] = float_buffer_out[i]; dWritePos = (dWritePos + 1) % DELAY_BUFFER_SIZE; dReadPos = (dReadPos + 1) % DELAY_BUFFER_SIZE; } arm_float_to_q15 (delayBufferWrite, (uint16_t*)(DELAY_BUFFER_START + dWritePos), AUDIO_BLOCK_SIZE);}�?�?�?�?�?�?�?�?�?�?�?�?�?�?
The dry data, saved in the buffers starting fromaddress0x2002f864 (SRAM),is clear.
float32_t float_buffer_in[AUDIO_BLOCK_SIZE];�?�?float32_t float_buffer_out[AUDIO_BLOCK_SIZE];�?�?�?�?
Only the data from the delay line in SDRAM is corrupted
2017-08-12 05:30 AM
update: if I keep the pointers dReadPos and dWritePos at the same position, the output is a clear bypass, meaning that it can read what I just wrote to SDRAM fine, but if I move the read pointer to an offset behind the write pointer, on the next loop iterations it reads corrupt data.
Any idea how to save a buffer, larger than AUDIO_BLOCK, to an SDRAM location and prevent its data from being overwritten?
2018-02-01 08:11 AM
Hi
Freakk.Freakk
I am following this up close as I am trying to do something similar, building an Audio Processor Unit on the STM32F7. Have you been able to implement that delay line you were talking about? I have been trying to do it but I haven't been able so far. I realised if you increase the block size to larger numbers like 22050 or 44100 (I guess this matches the sampling frequency) you get a straight up delay but I want it to be in an algorithm so I can use it at my will. I would be very interested so please let me know if you figured something out! Thanks in advance
2018-02-07 11:18 PM
Rad one, did you really identified the noise problem? I have tried your DSP project and a get a lot of noise from line in to line out
2018-02-08 12:40 PM
Hi, do you get noisy data from line in to line out? I am trying to make DSP project, but cant get clear data. I tired rad one project but it seems that there is still a lot of noise.
2018-05-27 12:32 PM
Thank you
Dalewski.Rados_aw
I too need to do DSP audio processing with the STM32F7
I downloaded and compiled the project and I see the modifications made to allow using line-in. Running the project as is, it works and I hear no noise with headphones and an A 440 Hz tone as input. I see in the code that the sample rate is set to 16 kHz and my processing will require 96 kHz sample rate. I tried setting the sample rate to 96 kHz which failed with a DMA error and then to 48 kHz which also fails with a DMA error. I will work more with this, but it's certainly a start.