imx6 and PCM5310 Audio codec

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6 and PCM5310 Audio codec

1,289 Views
gerhardrauterbe
Contributor II

Hello together,

for a customer project we want to use a PCM5310 audio codec from TI . Unfortunatlly  ther is no driver availible. So we had to write our own SOC driver for this codec. Especially the I2S bus is a problem

The big question is the masterclock for the I2S bus of the codec  According the data sheet for the codec it should be for 48kHz sampling frequency 12.288MHz or 24.5760 or 36.864 MHz. For a sampling frequency of 44,1kHz it should be 11,2896MHz or 22,5792MHz.

We use GPIO 05 (Pad R4) which could be used as a clock signal routed to the Audio PLL4  for the master clock. Therefore we want to connect it to this PLL. So the question is, how we should set this PLL and the dividers to get one of the necessary frequencies. I read into the cklock chapter of the imx6 spec  and had the idea to change the frequency of the PLL from 650MHz up to 1104MHz, by change the factor for the PLL from 27 to 46. If I dived this by 30, I get a frequency of 36,80MHz which means a divergence of 0.2%

The question is now. Is this a correct idea and if yes, how can I program it.  My idea is, that I have to make changes inside  clock.c

regards Gerhard

Labels (3)
0 Kudos
5 Replies

689 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Gerhard,

     I don't recommend you use clock that outputs from CPU, you had better use an independent crystal or oscillator for  codec, such as 22.5792M or others. then setting codec to work as master, and I2S on cpu to work as slave. This usage can ensure clock's accuracy.

Regards,

Weidong

0 Kudos

689 Views
gerhardrauterbe
Contributor II

Hello Weidong,

the external oscillator was also my suggestion, when I tried to find a solution, but unfortunatlly the hardware was developed and built  before  without thinking about this problem.  So we have now the problem, when we start to develop the codec.

0 Kudos

689 Views
YixingKong
Senior Contributor IV

Gerhard

This discussion is closed since no activity. If you still need help, please feel free to reply with an update to this discussion, or create another discussion.

Thanks,

0 Kudos

689 Views
YixingKong
Senior Contributor IV

Gerhard

We have not got your response yet and will close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.

Thanks,

Yixing

0 Kudos

689 Views
YixingKong
Senior Contributor IV

Gerhard

Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.

Thanks,

Yixing

0 Kudos