Skip to content

Add I2S MCLK support to iMX RT #8291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 24, 2023
Merged

Add I2S MCLK support to iMX RT #8291

merged 3 commits into from
Aug 24, 2023

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Aug 17, 2023

Raises NotImplementedError on all other ports with I2S implementations.

@jepler
Copy link

jepler commented Aug 17, 2023

I'm not super familiar with mclk. Does its frequency need to be set, or can it be automatically derived? Wikipedia (not the best source I know) says "Master clock [is] typically 256 x LRCLK" while one random datasheet I found shows it varying over specific values from 128fs to 1152fs (https://www.digikey.com/htmldatasheets/production/755129/0/0/1/ak4430.html)

@tannewt
Copy link
Member Author

tannewt commented Aug 17, 2023

I'm not super familiar with mclk. Does its frequency need to be set, or can it be automatically derived? Wikipedia (not the best source I know) says "Master clock [is] typically 256 x LRCLK" while one random datasheet I found shows it varying over specific values from 128fs to 1152fs (https://www.digikey.com/htmldatasheets/production/755129/0/0/1/ak4430.html)

In the iMX case, the audio code derives a reasonable value to generate the bitclock that the WM8960 is ok with. I think it should generally be a clock faster than the bitclock and in the same phase. I omited setting frequency here to leave it vague until we have a specific need. The I2SOut clock frequency depends on the sample rate so it isn't clear how to define mclk. So, for now, I thought I'd omit it.

Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my review questions!

@tannewt tannewt merged commit ee2207d into adafruit:main Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants