Skip to main content
AKueh.1
Associate
January 10, 2023
Solved

How to record audio samples with STM32F7508-DK (via line in)

  • January 10, 2023
  • 1 reply
  • 787 views

Hello,

I am wondering if it is possible to record the actual raw audio samples directly from the line in?

I tried to use the BSP example number three and stoped after recording the data. I recorded a sinus with 1 kHz. But when looking at the data most of them are 32768 and some few data are around 9000. Is this some kind of audio coding? Or what do I need to do, to see my acual sinus wave in my samples at this point?

Thanks!

This topic has been closed for replies.
Best answer by AKueh.1

Nevermind, the issue was that the ADC was totally overdriven. I used the wm8994 driver provided by the BSP example. And during the configuration of INPUT_DEVICE_INPUT_LINE_1 there was a +3dB gain for left and right channel. Of course, when using an microphone as input it could be okay - but when using an audio card as audio source I had to remove +30dB gain.

Now everything works as expected :)

1 reply

AKueh.1
AKueh.1AuthorBest answer
Associate
January 11, 2023

Nevermind, the issue was that the ADC was totally overdriven. I used the wm8994 driver provided by the BSP example. And during the configuration of INPUT_DEVICE_INPUT_LINE_1 there was a +3dB gain for left and right channel. Of course, when using an microphone as input it could be okay - but when using an audio card as audio source I had to remove +30dB gain.

Now everything works as expected :)