-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
nxp: Add SAI driver with the DAI interface #65187
nxp: Add SAI driver with the DAI interface #65187
Conversation
300c574
to
7525186
Compare
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
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.
A very broad comment- based on the dai_protocol
enum, it sort of looks like these formats are just the same as those we support in I2S today: https://docs.zephyrproject.org/latest/hardware/peripherals/audio/i2s.html. Given that, is there any reason this DAI driver could not be written to use the I2S API itself, instead of the SAI peripheral? It seems like the DAI API is intended as a superset of the I2S API, but maybe I'm missing some advantage here.
Absolutely- I don't think we should change SOF application code. What I'm wondering is if it would be possible to create a DAI driver (say |
Although an interesting idea I think that would be an overkill. Sometimes there will be functions that could be imported from i2s but sometimes not. So, I think we complicate things unnecessary. Maybe after we get this in and have it in a stable form we could reduce code duplication by looking at this. |
Understood- you're the expert here, this was just a passing thought :) If it doesn't make sense than no worries |
f5e4ed6
to
3e84947
Compare
3e84947
to
1b32821
Compare
V2 updates
Hopefully I didn't miss anything |
2830367
to
4e91fde
Compare
V3 updates
|
Looks good to me. Now we need to merge dependencies and then we are good to go. Thanks @LaurentiuM1234 ! |
4e91fde
to
32abc9e
Compare
V4 updates
|
32abc9e
to
593cd6d
Compare
593cd6d
to
c1c49d8
Compare
Bump up hal_nxp revision to contain the latest SAI-related changes from NXP HAL side. Signed-off-by: Laurentiu Mihalcea <[email protected]>
This commit introduces some macros and enums which can be used to parse struct dai_config's format field. This is required by the SAI driver since it uses dai_config's format field to select the protocol, clock configuration and clock inversion. This is added to the dai.h header to avoid having to define these macros/enums in each of the DAI drivers. Signed-off-by: Laurentiu Mihalcea <[email protected]>
This commit introduces a new DAI driver used for NXP'S SAI IP. Signed-off-by: Laurentiu Mihalcea <[email protected]>
This commit introduces support for querying i.MX93's SAI clocks. Signed-off-by: Laurentiu Mihalcea <[email protected]>
@kv2019i @lgirdwood could you please take a look at the changes to |
All good! @lgirdwood @kv2019i can you please review commit modifying dai.h common part: 7a9401d |
For now, this PR shall remain a draft until all NXP HAL PRs are ready.
An example DTS node can be found below (i.MX93, SOF usage):
The additional configurations required to get the driver working are (i.MX93):
Tagging @dbaluta and @iuliana-prodan for initial comments.