Forum Discussion
Altera_Forum
Honored Contributor
16 years agoDE2 Audio Codec Programming
Hi,
I am engg student.I are working on SOPC baesd speech to text conversion.I am confused with how to to program audio codec for Audio to Digital conversion for input from microphone and give it to FPGA.25 Replies
- Altera_Forum
Honored Contributor
Good day
I still have not found it out. My development board (altera cyclone II) passes the input(linein) straight to the output (lineout) irrespective of the bypass setting. Does anybody know how to prevent the input displaying on the output. - Altera_Forum
Honored Contributor
--- Quote Start --- Good Day Everyone The g00_audio_interface.vhd code does not process the input of audio, as stated in the pretext information. Does anyone know how the input can be done? (in VHDL code) --- Quote End --- I also need to know how. should you find help elsewhere, please let me know n I sure will do the same... Kind Regards - Altera_Forum
Honored Contributor
Good Day Everyone
The g00_audio_interface.vhd code does not process the input of audio, as stated in the pretext information. Does anyone know how the input can be done? (in VHDL code) Kind Regards - Altera_Forum
Honored Contributor
--- Quote Start --- I have tested this on both the DE1 and DE2 boards. --- Quote End --- Hi, I am wondering how you tested it. Did you send random values on your data lines? I'm trying yo used this code on a different development board but the principles are the same. Regards, Hunter - Altera_Forum
Honored Contributor
Would be nice if guys can attach the file for the linein, i have been trying to do it, and just can't.. I have read the datasheet... Thank You.
- Altera_Forum
Honored Contributor
Thanks for your vhdl code jjclark. It is really helpful.
I have set it up and it works perfect. I am now trying to feed line in from the audio codec. But am having trouble, as the output has a lot of noise. Im guessing its got something to do with my timing? Would you be able to attach an example of line in? That would be very appreciated. - Altera_Forum
Honored Contributor
--- Quote Start --- Hi, I am engg student.I are working on SOPC baesd speech to text conversion.I am confused with how to to program audio codec for Audio to Digital conversion for input from microphone and give it to FPGA. --- Quote End --- Go throw the data sheet of codec configure the codec registor ,the sound digital data will be available on ADCDAT of codec - Altera_Forum
Honored Contributor
Hello, you should read the WM8731 datasheet. All the details you need are in there.
- Altera_Forum
Honored Contributor
--- Quote Start --- Hello Mr. Khan, you could use one of the PLLs on the Cyclone II chip to convert from 50MHz to 24MHz. Or you could just implement a simple counter. You could just divide by 2 (giving 25MHz). This would result in a sampling rate slightly more than 48KHz, but depending on your application would probably not make an audible difference. --- Quote End --- Dear sir i have done the intitialization of the codec registor by using the 50Mhz crystal i am getting ack , sir i am not getting whether xclk i.e the master clock of codec must require to fetch the data from LR chanal please sugest the logic for sound fetching & more about the DSP mode of codec. - Altera_Forum
Honored Contributor
Hello Mr. Khan, you could use one of the PLLs on the Cyclone II chip to convert from 50MHz to 24MHz. Or you could just implement a simple counter. You could just divide by 2 (giving 25MHz). This would result in a sampling rate slightly more than 48KHz, but depending on your application would probably not make an audible difference.