AnsweredAssumed Answered

audio codec ad1836 in bf561

Question asked by dilbalu on Jul 28, 2010
Latest reply on Aug 24, 2010 by HEGDE

hi,

my name is dileep kumar & iam new to blackfin processors

here iam trying to read a file (.wav or dat) and store the samples in a buffer(each 16 bit data) and transmitt through transmit buffer through codec, i.e iam not taking input from audio device (like in talkthrough example)but i want to transmit my data through codec with the same settings of codec,

 

so i dont know where to start,or as iam trying to do is wright or not,

 

what iam trying is  ...>read data from a dat file(16 bit) ..

                                copying a single word(16 bit sample)on each interrupt in to the variable 'ichannel0leftout'  in PROCESS_DATA().C

 

             
#define VEC_SIZE 256     

fract16   in[VEC_SIZE] = {#include "in.dat"};  //file taken from fir example for bf561 (upto now i am just trying to see a sinwave in scope at codec//

int out[VEC_SIZE];
int data;
void Process_Data(void)
{

   data = in[cnt];
  
     iChannel0LeftOut  = data;//iChannel0LeftIn;
     iChannel0RightOut = data;//iChannel0RightIn;
  iChannel1LeftOut  = data;//iChannel1LeftIn;
  iChannel1RightOut = data;// iChannel1RightIn;
  
        out[cnt] = data; //cnt is incrimented for each interrupt in isr.c

 

} and modifications i have done in isr.c file is

 

Process_Data();
cnt++;

 

if(cnt==256)       //as i am having 256 samples and for repeating transmission of those samples
   cnt = 0;

 

 

 

 

iam thinking that,  in talkthrough example given in vdsp tool, data is load into irxbuffer and they are transmitted to ichannel0leftin and same copied to i channel0leftout and sent to transmit buffer itxbuffer and then to DAC,

and ichannel0leftout(or)in are extern integer(2bytes) variables i.e they can transmit only 16bit data,

 

so iam trying to copy my 16 bit data into ichannel0leftout for each interrupt.

 

does this works??, please let me know where iam going wrong or how to proceed

Outcomes