-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC: SOF: DMIC: Fixed length IPC #1924
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
ASoC: SOF: DMIC: Fixed length IPC #1924
Conversation
|
The similar PR for firmware would increase ABI minor to 15. Since the ABI minor for current kernel is behind by one this would increase ABI minor to 14 that is not consistent. Probably the feature from firmware should be merged first to get to version 14 and have 15 on both sides with this merged. I've tested this with all combinations of new/new, new/old, old/new for kernel and FW on UP2+DMIC kit and no issues seen. |
plbossart
left a comment
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.
minor comments, looks good otherwise.
Need to align on ABI change, there are already two changes competing for ABI 15.
97c2fb4 to
f9a84c5
Compare
ranj063
left a comment
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.
@singalsu but for the one change in comment as requested by Pierre, the patch looks good. Thanks!
kv2019i
left a comment
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.
Thanks @singalsu Minor comments to documentation, and we need to clarify what is the right ABI version to use.
f9a84c5 to
b14d68b
Compare
|
I've addressed the comments in my way except the sdev->private and ABI minor version. |
|
On FW side review @lgirdwood said this should have ABI minor version 14 so my guess was wrong. I'll wait for other comments before I update this. |
kv2019i
left a comment
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.
Looks good now @singalsu
Not sure who should do this, but I manually added this PR to the ABI classifier as well:
https://github.com/orgs/thesofproject/projects/2?card_filter_query=dmic
Thanks! I didn't know about that. I'll learn how to do it. |
b14d68b to
728154c
Compare
|
I just pushed new version with extra if statement brackets removed and changed ABI minor back to 14. |
728154c to
a245cbe
Compare
|
Thanks for quick review work to everyone. The firmware proposal PR is now updated to match this one. |
|
Just waiting on thesofproject/sof#2610 now.. |
This patch fixes the typo in word "microphone". Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch changes the flexible array member pdm[] into a fixed array of four that is the max. number of stereo PDM controllers in the current Intel platforms. The change simplifies DMIC DAI load code and aligns the IPC with other DAI types. The change is compatible with old and new firmware with similar change. The ABI minor version is increased due to change in IPC headers. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch restores the field name to fifo_bits_b since the legacy firmware compatibility code (for firmware ABI 3.0.0 or earlier) sets it in sof_link_dmic_load() function in topology.c. Setting of reserved_2 didn't look appropriate. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
a245cbe to
57f8967
Compare
|
This leaves abi.h at minor 15. No other changes into this PR. |
kv2019i
left a comment
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.
Agreed with @lgirdwood to reclassify this to ABI15. Updated to latest sof-dev and as no changes otherwise, seems ready to go.
| * Used to track the pdm config array index currently being parsed | ||
| */ | ||
| sdev->private = kzalloc(sizeof(u32), GFP_KERNEL); | ||
| if (!sdev->private) { |
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.
Do I understand correctly that this now conflicts with #1766? But the conflict seems to be easy to resolve.
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.
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.
@kv2019i you want me to update it? Sure can do, but so far I'm not aware of many cases of such take-overs. Is it urgent? Or was it just a typo?
| uint32_t reserved_1; /**< Reserved */ | ||
| uint16_t fifo_bits; /**< FIFO word length (16 or 32) */ | ||
| uint16_t reserved_2; /**< Reserved */ | ||
| uint16_t fifo_bits_b; /**< Deprecated since firmware ABI 3.0.1 */ |
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.
I'm wondering how we're going to handle such deprecation? Do we set a grace period of, say, a year and then remove this backward compatibility and then claim the field as "reserved?"
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.
@lyakh I don't think you really ever get back reserved bits via deprecation unless you end up in a situation where you absolutely have to. I.e. rare enough event, so better worry about the process when the time comes.
lyakh
left a comment
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.
@singalsu would be good to have those additional remarks addressed in a new PR
| #define SOF_DAI_INTEL_SSP_CLKCTRL_BCLK_IDLE_HIGH BIT(5) | ||
|
|
||
| /* DMIC max. four controllers for eight microphone channels */ | ||
| #define SOF_DAI_INTEL_DMIC_NUM_CTRL 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.
sorry for chiming in so late with this. This can be made a separate PR: should we add a check of num_pdm_active <= SOF_DAI_INTEL_DMIC_NUM_CTRL? I think it would be good to tighten up our topology consistency checks.
| * that does not include the PDM controller config array | ||
| * Set the common params to 0. | ||
| */ | ||
| /* Ensure the entire DMIC config struct is zeros */ |
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 comment could be just drop, it doesn't seem to add a lot of information. In fact, looking at it: the below memset() is completely redundant. The caller has already 0-initialised the whole config. @singalsu could you make an additional PR to remove this too?
|
Thanks @lyakh . Let' s merge this version if the FW side progresses this week, and handle updates in separate PR. |
No description provided.