Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Stereo AC97 Audio Codec

Status
Not open for further replies.

Tarunfpga1

Newbie level 4
Joined
Apr 23, 2017
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
66
Hello !
I am doing a project in which i am using Xilinx ML-505 FPGA board and there i want to use AC'97 Audio codec IC for audio files. When i'm giving input through Mic or Analog Line-in then i am receiving output through Headphone. But i want to store my sample values in ROM and then from there i want to listen the output so can you help me that for that i have to take values in floating point format or in 2's complement format ??
Thanx!
 

Hi,

AC97... you are talking about files. What files?
I think it rather works with a data stream than a file.
--> please explain

But i want to store my sample values in ROM
"Store" means writing. But ROM is "read only memory", not writing.

Read AC97 datasheet.

Maybe you want:
* mic use as analog input
* convert it to digital with AC97 (sample rate, mono, stereo, but width)
* stream it to FPGA with a digital interface (interface, protocol)
* store in SRAM/Flash (raw or compressed, how many samples / what recording time)
* store it for seconds only, or for years? Only one record, or many, how to select
* replay the record(s)

Data format: for audio there are some standards. Read through them.
I've never heard to store audio data as floating point...what's the idea behind to transform the AC97 data format?

Klaus
 

Ok i just want to play a audio file by giving or storing the data values in 8-bit and that values will be received by AC'97 so this is one way to get audio file from headphone and the other way is that no need to convert audio file into text file and just give directly to stereo jack in fpga board and directly receive the output. So i want to ask about the first way that which type of data should i give or read from ROM is it in 2's complement or other form.
When i read the sine-wave and the values are in give link------"https://gist.github.com/funkfinger/965900", these values stored in ROM from which AC'97 took it and here i received the output as single-tone which is fine but when i sampled the audio file in MATLAB through "audioread" function then i got text file but for those values i am not getting the output through headphone, so i want to ask that to play audio file by reading it's sample values how should i convert .wav file into .txt file and in which format i should read those values to give as input to AC'97. I hope now u got my point.
Thanx !
 

Hi,

I hope now u got my point.
I'm sorry. I'm more confused.

Please draw a sketch with the data flow.
What is the source...what data format..through what interfaces with what data fornat ... to what target.
Just for the first task you decide to develop.

*
Confused:
* audio file: where is it stored?
* are you sure the AC97 can process 8 bit data?
* text file for audio data? Are you sure? What format?
* audio file(digital) to stereo jack(analog)? Without conversion?
* Data format: did you read AC97 datasheet?
* ROM, sine wave, Matlab..
It all sounds to me like a mixture of unelaborated ideas

Please focus on one simple task. And go step by step. Don't reinvent the whole world at once.

Klaus
 

Ok, just focus on this that i have to play audio file through Audio Codec in which input is in the form of sampled values in 16 bit and those values i got from "audioread" function in MATLAB, i.e. by sampling the .wav file. So those values i have written in .vhd file in the form of ROM, now i want to listen that output. I'm getting some noise in the audio. so my question is that the sampled values which i wrote in the .vhd file in the form of ROM should be in which format either 2's complement or fixed point or something other. By the way, no. of samples are around 100,000 in no.
 
Last edited by a moderator:

Hi,

In short:
* read AC97 datasheet
* draw a sketch with data flow

Klaus
 

@Tarunfgpa1

You should have read about WAV, LPCM, and you would have found out that the format of the audio data is usually 2's complement. Unless the audioread function in MATLAB changes the format to something like offset binary it should still be 2's complement (wav is after all a raw format).

Are you sampling the WAV file or are you just reading all the data from the WAV file (these are two entirely different operations). If you under-sampled the WAV file that is likely going to result in more noise.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top