cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 discovery audio line-in

konrad2399
Associate II
Posted on October 06, 2015 at 21:10

Hi.

I've started to play with STM32F7 discovery. I got to DSP audio example from hands-on and I would like to use line-in instead of microphones. Unfortunately when I've changed

BSP_AUDIO_IN_OUT_Init(INPUT_DEVICE_DIGITAL_MICROPHONE_2, OUTPUT_DEVICE_HEADPHONE, 90, DEFAULT_AUDIO_IN_FREQ);

to

BSP_AUDIO_IN_OUT_Init(INPUT_DEVICE_INPUT_LINE_1, OUTPUT_DEVICE_HEADPHONE, 90, DEFAULT_AUDIO_IN_FREQ);

Only thing that's coming is noise. Could anyone help me to get line-in working? Best regards Konrad #https://github.com/laurent-lator #stm32f7-audio
24 REPLIES 24
briancavanagh91
Associate II
Posted on November 07, 2015 at 04:41

Maybe you are right about the ''signal'' being just crosstalk.

But I find nothing in the codec manual that indicates single-ended line one cannot be be digitized and output through AIF1DAT and reintroduced through AIF1DAC.

Nice job getting EmBitz up and running quickly.

Christopher Pappas
Senior II
Posted on November 07, 2015 at 18:41

I used Emblocks a couple of years ago for another dev board.

Unfortunately, I am still having the same issues with Embitz debugger and the ST-Link interface. I get ''Debugger exited with status 1'' and then the degugger screen closes. Seems to be a Windows 8.1 problem. I tried the various attemts to fix it (mostly from the emblocks website forum) but still can't debug at this point. So I have to build, and then load the HEX file manually to the board using ST-Link Utility for now.

I am getting to the point where I'm thinking of just sending Wolfson Audio an email to ask them what is going on with this codec. I had a similar problem to this on another board a while ago (with an earlier WM codec chip). The codec manual seems to be missing some info, it almost seems like an internal bug with the silicon or something.

briancavanagh91
Associate II
Posted on November 07, 2015 at 21:21

I'm looking into using an Olimex STM32F405 header board with an external codec (not a wm8994) for my audio project.

briancavanagh91
Associate II
Posted on November 07, 2015 at 21:24

You might try the STLinkGDB version from Sep this year. It works OK for me.

________________

Attachments :

STLinkGDB.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzj2&d=%2Fa%2F0X0000000bOj%2FnN4L0JCV.VBlN__elL2BOmwyPAz4YrV6M.hZFOrQ8yc&asPdf=false
Christopher Pappas
Senior II
Posted on November 12, 2015 at 16:44

For now, I am looking into using the PWM pins on the Arduino header to use as audio output. The good thing, many PWM pins available. The bad thing, low resolution, poor freq response, and high CPU usage

briancavanagh91
Associate II
Posted on November 16, 2015 at 17:59

If you want to do output without input, you might try this demo code that outputs synthesized sound to the headphone.

________________

Attachments :

HeadphoneOutput.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzix&d=%2Fa%2F0X0000000bOi%2Fv4uW969leSCZoxKdmFcL_N5hg58ytMdgJWFqtOlDDAk&asPdf=false
Christopher Pappas
Senior II
Posted on November 17, 2015 at 18:08

I tried out your app here on the 32F746 board. Works very solidly! That's very well written code.

I wrote very basic midi-triggered sample-playback code on the STM32F407 & STM32F429 discovery boards, but I always lacked the knowledge of how to apply filters to the output.

Then I came across this guy who coded a fully-functioning Monophonic Subtractive Synth with Midi control.

Check it out. It has a very well written synth engine (synth.c). Very easy to adapt to new boards.

https://github.com/laurent-latorre/Synthol

Demonstration video:

https://www.youtube.com/watch?v=SS7UrrUPdn0

I modded that code to run more than one instance of the synth engine and added a mixer to blend all the voices to mono. I could get 4 simultaneous voices, but that was with  > 95% of the CPU usage, and it became very unstable.

I was hoping to try to adapt this code to the 32F746 board to see if it would run smoother and with possibly more voices. Unfortunately I lost my entire project to a faulty backup drive, so maybe I will just try to piece it together again from scratch.

hjh
Associate III
Posted on November 29, 2015 at 21:41

Hi guys

Did anybody find the answer of how to solve the problem with the line in on the same timeslot ...I need to take sound in on that plug and use the ear plug to play when it have been filtered ...My code is working very fine with the mics but i can not see how to setup the wm8994 ....anybody have the answer ?

Hjalmar

briancavanagh91
Associate II
Posted on December 27, 2015 at 04:24

Hi Hjalmar,

I was never able to get the input jack to work without noise.

hpeev1972
Associate II
Posted on January 19, 2016 at 19:23

Try this configuration:

BSP_AUDIO_IN_OUT_Init(INPUT_DEVICE_INPUT_LINE_1, OUTPUT_DEVICE_HEADPHONE, 70, DEFAULT_AUDIO_IN_FREQ);
 Do not set volume over 70!