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.

L138 changing audio sampling frequency

Other Parts Discussed in Thread: OMAP-L138

Hi all,

I am trying to change the sampling rate on my OMAP-L138 to 8kHz, which I believe is currently stuck at 48kHz.  I have dug through the forum quite a bit but couldn't really find the answer I am looking for.  Currently,  I am using the initialization calls provided in the bsl and copied below for MCASP and AIC3106.  I only added the line in red following the aic3106 documentation to divide the clk by 6.  Do I have to change the AFSRCTL to match this?  I think the mclk is 24.56MHz, but I don't really know how to verify this.  I am fairly new to programming dsps and would really appreciate your help, Thanks in advance!

MCASP->RMASK = 0xFFFFFFFF;
MCASP->RFMT = 0x00008078;
MCASP->AFSRCTL = 0x00000112;
MCASP->ACLKRCTL = 0x000000AF;
MCASP->AHCLKRCTL = 0x00000000;
MCASP->RTDM = 0x00000003;
MCASP->RINTCTL = 0x00000000;
MCASP->RCLKCHK = 0x00FF0008;

AIC3106_writeRegister(2, 0xAA);
AIC3106_writeRegister(3, 0x22);
AIC3106_writeRegister(4, 0x20);
AIC3106_writeRegister(5, 0x6E);
AIC3106_writeRegister(6, 0x23);
AIC3106_writeRegister(7, 0x0A);
AIC3106_writeRegister(8, 0x00);
AIC3106_writeRegister(9, 0x00);
AIC3106_writeRegister(10, 0x00);
AIC3106_writeRegister(15, 0);
AIC3106_writeRegister(16, 0);
AIC3106_writeRegister(19, 0x04);
AIC3106_writeRegister(22, 0x04);
AIC3106_writeRegister(27, 0);
AIC3106_writeRegister(30, 0);
AIC3106_writeRegister(37, 0xE0);
AIC3106_writeRegister(38, 0x10);
AIC3106_writeRegister(43, 10);
AIC3106_writeRegister(44, 10);
AIC3106_writeRegister(58, 0);
AIC3106_writeRegister(72, 0);
AIC3106_writeRegister(82, 0x80);
AIC3106_writeRegister(86, 0x09);
AIC3106_writeRegister(92, 0x80);
AIC3106_writeRegister(93, 0x09);
AIC3106_writeRegister(101, 0x01);
AIC3106_writeRegister(102, 0);