GrEq audio library
Hello everyone,
I am using a STM32H750 with STM32CubeExpansion_Audio_V1.1.1 and I am trying to use the Graphical equalizer library.
This is what I've done:
I have an aux audio signal that I'm sampling at 96Khz with a DMA's interrupt transfer every 1 ms ( 1 ms == 96 samples). Then I am using "arm_fir_decimate_q15" in order to have a buffer of 48 samples. This buffer is the input of GrEq library's processing function.
The GrEq library configuration is:
nb_bands = GREQ_NB_BANDS_8;
user_gain_per_band_dB = 0; /* For all 8 band */
nb_bytes_per_Sample = 2; /* 16 bits in one sample */
nb_channels = 2; /* stereo */
buffer_size = 48; /* Samples for channel */
mode = INTERLEAVED;
During run time, thanks to a custom graphical interface , I can change the "user_gain_per_band_dB " and then call for "greq_setConfig" without any errors.
This is my GrEq processing function's core:
void audio_equalize_adc(uint16_t *in_out_buff, uint16_t size)
{
/* Create audio stereo buffer */
for (uint16_t i = 0; i < size; i++)
{
audio_equal_buff[i * 2] = in_out_buff[i];
audio_equal_buff[(i * 2) + 1] = in_out_buff[i];
}
BufferHandler_in.data_ptr = audio_equal_buff;
greq_process(&BufferHandler_in, &BufferHandler_in, pGreqPersistentMem);
/* Return to audio mono */
for (uint16_t i = 0; i < size; i++)
{
in_out_buff[i] = audio_equal_buff[i * 2];
}
}
Where :
- in_out_buff is arm_fir_decimate_q15 output buffer (48 samples size);
- uint16_t audio_equal_buff is a local buffer of 48*2 samples size (GrEq needs a stereo input signal as indicated in its documentation);
- size is 48;
The problem is that I don't hear a difference in the audio post equalization. Can anyone suggest which is the problem?
Thanks in advance
