Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
driver: imx: Add PDM MICFIL driver #8184
driver: imx: Add PDM MICFIL driver #8184
Changes from all commits
c76f8a9
d9aed2e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is identical to the case below (8 / 2 = 4).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this has the same final value! But, I prefer to keep it that way to keep this in line with the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... This is very... strange. It's your area so it's up to you to decide, but... This looks very confusing to me. You have multiple
switch
-case
entries for different quality values, you seem to have different formulae, ant comments specify different "kfactor" values, but the result is the same. At the very least I'd put a comment there, preferably I'd unify all thecase
s and provide just one formula, and just explain in the comment how that matches the documentationThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this comes from this table:
and this formula
I will add more comments to better explain the code.
What we want is to compute the CLK_DIV value so that we proper setup the MICFIL registers.
since
and since
K
andPDM_CLK_RATE
have different values for different clk rates we end up with equal values sometimes, but as I said I prefer to write the complete formulas for documentation purposes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, an explanation would be good, because even with that table I don't understand: e.g. with high quality the formula in the table seems to be
whereas you use