CS4281 AC 97 format
Hi
I am trying to implement cs4281.c driver in VxWorks, and seem to have it working reasonably, but I can't understand the format of ADC_BUFFER. (Hardware is not my thing and have never played with a sound card before the past one month)
I recorded almost 10 seconds of data (128000 samples at 11025 samples per second with 8 bit mono) and dumped into a file. (see attached file) the file was obviously in hex format and i converted it. Now if I pass that hex file to playback, it sort of plays back nicely, but the problem is I am not sure how to interpret the data. I am taking the file and doing the following:
-> i convert the hex into decimal and the data ranges from -128 to 127 -> i load that into matlab y = ('c:\song.dat');
-> i divide each sample by 255 so the data ranges from -1 to 1 (approximately) -> i use wavwrite(y,11025,8,'c:\song.wav');
I can sort of recognize the song but its so distorted. I am pretty sure that I am getting the right data out of the ADC_Buffer when I record but I am unable to understand how to right interpret the data. It would be great if someone could reply.
Both hex and int files are available below.
http://jobim.colorado.edu/~sohail/song.dat
http://jobim.colorado.edu/~sohail/song.text
--
Saqib bin Sohail
PhD ECE
University of Colorado at Boulder
Res: (303) 786 0636
http://ucsu.colorado.edu/~sohail/index.html
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
At Tue, 09 May 2006 12:34:47 -0600,
Quoted 14 lines · Saqib bin Sohail
Hi
I am trying to implement
cs4281.cdriver in VxWorks, and seem to have it working reasonably, but I can't understand the format ofADC_BUFFER. (Hardware is not my thing and have never played with a sound card before the past one month)I recorded almost 10 seconds of data (128000 samples at 11025 samples per second with 8 bit mono) and dumped into a file. (see attached file) the file was obviously in hex format and i converted it. Now if I pass that hex file to playback, it sort of plays back nicely, but the problem is I am not sure how to interpret the data. I am taking the file and doing the following:
Quoted 4 lines
-> i convert the hex into decimal and the data ranges from -128 to 127 -> i load that into matlab y = ('c:\song.dat');
-> i divide each sample by 255 so the data ranges from -1 to 1 (approximately) -> i usewavwrite(y,11025,8,'c:\song.wav');
First of all, what is the reason of this conversion?
The cs4281 chip supports both signed and unsigned formats for 8, 16 and 32bit little/big-endian data natively for both playback and capture.
Takashi
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642