Skip to content
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

intel_adsp: ssp: Add DMA Control Configuration API to Intel SSP DAI Driver #73158

Conversation

tmleman
Copy link
Collaborator

@tmleman tmleman commented May 22, 2024

Add DMA Control Configuration API to Intel SSP DAI Driver

This pull request introduces a series of enhancements to the Intel SSP DAI driver in Zephyr, aimed at providing more granular control over DMA settings. The changes include the addition of a new API function for DMA control configuration and a refactoring of the TLV parsing logic for improved modularity and reusability.

Summary of Changes

  • Commit f1eb040: A new API function config_update is introduced to the DAI driver API. This function allows setting DMA control parameters independently from the full DAI configuration blob, offering greater flexibility in DMA behavior configuration.

  • Commit 9d51439: The TLV parsing code is refactored out of the dai_ssp_parse_aux_data function into a new function dai_ssp_parse_tlv. This standalone function can process multiple TLV entries from a given buffer, simplifying the original function and enhancing code reusability.

  • Commit 5d3777a: The dai_ssp_dma_control_set API function is added to the Intel SSP DAI driver. It enables the setting of DMA control parameters specifically for the SSP interface, allowing for more detailed control of DMA configurations.

SOF CI: thesofproject/sof#9156

@tmleman tmleman force-pushed the topic/upstream/pr/driver/intel/ssp/dma_constrol branch 2 times, most recently from 1a4a32d to 23c6dd6 Compare May 23, 2024 14:40
@tmleman tmleman requested a review from lyakh May 24, 2024 11:16
softwarecki
softwarecki previously approved these changes Jun 5, 2024
pjdobrowolski
pjdobrowolski previously approved these changes Jun 11, 2024
@kv2019i kv2019i added the platform: Intel ADSP Intel Audio platforms label Jun 13, 2024
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Sorry, late review .. some concerns on how this extends dai.h, see inline

@tmleman tmleman force-pushed the topic/upstream/pr/driver/intel/ssp/dma_constrol branch 2 times, most recently from 932f277 to bcbf5ee Compare June 14, 2024 14:40
@tmleman tmleman requested a review from kv2019i June 14, 2024 14:40
@tmleman tmleman force-pushed the topic/upstream/pr/driver/intel/ssp/dma_constrol branch 3 times, most recently from 05ca110 to c9d5c0b Compare June 17, 2024 11:00
kv2019i
kv2019i previously approved these changes Jun 17, 2024
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Thanks, this looks nicer for dai.h.

dnikodem
dnikodem previously approved these changes Jun 17, 2024
tmleman added 2 commits June 17, 2024 14:13
This patch introduces a new API function, `dai_config_update`, in the
DAI driver API to enable runtime updates to the DAI configuration. This
function allows bespoke configuration parameters to be set, enabling
updates that are specific to the DAI implementation and can be applied
outside of the regular configuration flow.

The addition of this API provides greater flexibility for adjusting DAI
settings at runtime, which is particularly useful in scenarios where
only specific parameters need to be modified without the need to
reconfigure the entire DAI interface.

Signed-off-by: Tomasz Leman <[email protected]>
Refactor the TLV parsing code from the dai_ssp_parse_aux_data function
into a new, separate function called dai_ssp_parse_tlv. This change
improves the modularity of the code and allows for the TLV parsing logic
to be reused in other contexts where only TLV data needs to be parsed
without the entire configuration blob.

The new dai_ssp_parse_tlv function takes a pointer to the TLV data and
its length as parameters, enabling it to process a buffer containing
multiple TLV entries. The original dai_ssp_parse_aux_data function is
now simplified to prepare the TLV data and call the new parsing
function.

Signed-off-by: Tomasz Leman <[email protected]>
pjdobrowolski
pjdobrowolski previously approved these changes Jun 18, 2024
@tmleman tmleman force-pushed the topic/upstream/pr/driver/intel/ssp/dma_constrol branch from c9d5c0b to 5d3777a Compare June 18, 2024 07:55
@tmleman
Copy link
Collaborator Author

tmleman commented Jun 18, 2024

Small correction, I missed one ID.

This commit adds a new API function, `dai_ssp_dma_control_set`, to the
Intel SSP DAI driver. This function is designed to set DMA control
parameters specifically for the SSP interface.

The addition of this API function allows for more granular control of
DMA settings, which can be beneficial in scenarios where DMA
configuration needs to be modified independently of other DAI settings.

Signed-off-by: Tomasz Leman <[email protected]>
@nashif nashif added this to the v4.0.0 milestone Jun 18, 2024
@tmleman
Copy link
Collaborator Author

tmleman commented Jul 29, 2024

@nashif I think this one can be merged since 3.7 has been released.

@aescolar aescolar merged commit 44464c4 into zephyrproject-rtos:main Jul 29, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.