This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请教下AIC23配置问题



我将音频文件放到SD卡中,用DSP5509A将其读取出来,并发送给AIC23,但是播放出来的音乐感觉全是杂音,请问是对AIC23的配置不对吗?我放在SD卡中的文件是MP3文件,比特率是128Kbps,SD卡文件读取是正常的

我的音乐是9秒,但是AIC23播放出来的声音长度大概5秒左右

用AIC23播放警报声是正常的(参考的例程),因为对音频解码方面不太了解,请问下有哪些资料可以参考吗?


/*数字音频接口格式设置
AIC23为主模式,数据为DSP模式,数据长度16位*/  
Uint16 digital_audio_inteface_format[2]={0x0e,0x53};
/*AIC23的波特率设置,采样率为44.1K*/
Uint16 sample_rate_control[2] = {0x10,0x23};
/*AIC23寄存器复位*/
Uint16 reset[2] ={0x1e,0x00};
/*AIC23节电方式设置,所有部分均所与工作状态*/
Uint16 power_down_control[2] ={0x0c,0x03};
/*AIC23模拟音频的控制
DAC使能,ADC输入选择为Line*/
Uint16 analog_aduio_path_control[2] ={0x08,0x10};
/*AIC23数字音频通路的控制*/
Uint16 digital_audio_path_control[2] ={0x0a,0x05};
/*AIC23数字接口的使能*/
Uint16 digital_interface_activation[2] ={0x12,0x01};
/*AIC23左通路音频调节*/
Uint16 left_line_input_volume_control[2] ={0x00,0x17};
/*AIC23右通路音频调节*/
Uint16 right_line_input_volume_control[2] ={0x02,0x17};
/*AIC23耳机左通路音频调节*/
Uint16 left_headphone_volume_control[2] ={0x05,0x11};
/*AIC23耳机右通路音频调节*/
Uint16 right_headphone_volume_control[2] = {0x07,0x11};
/*定义McBSP的句柄*/
MCBSP_Handle hMcbsp;

 /*回放音频*/
 while(TRUE)
 {
  while(!MCBSP_rrdy(hMcbsp)){};

   for(temp=0;temp<8;temp++)
   {
   retVal = MMC_read(mmc0,sd_addr,datareceive,512);
   for(i=0;i<256;i++)
   {
    datasend[i+temp*256]=lb2b(datareceive[i]);
   }
   sd_addr+=0x200;
   }
   if(sd_addr>=0x428000)
   {
    sd_addr=0x403000;
    while(1);
   }
   for(i=0;i<2048;i++)
   {
    MCBSP_write16(hMcbsp,datasend[i]);
    while(!MCBSP_rrdy(hMcbsp)){};
   }

 };
}