From: Takashi Iwai Subject: Re: CS4281 AC 97 format Date: Wed, 10 May 2006 15:23:59 +0200 Message-ID: References: <1147199687.4460e0c7aa733@webmail.colorado.edu> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1147199687.4460e0c7aa733@webmail.colorado.edu> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Saqib bin Sohail Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Tue, 09 May 2006 12:34:47 -0600, Saqib bin Sohail wrote: > > 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'); 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