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

drivers: dma: dma_nxp_edma: allow channel re-configuration #68802

Conversation

LaurentiuM1234
Copy link
Collaborator

Currently, the state transition function doesn't allow the re-configuration of an already configured channel (i.e: CHAN_CONFIGURED -> CHAN_CONFIGURED transition). This causes problems when using pulseaudio and SOF because the same channel ends up being configured multiple times in the beginning due to how pulse seems to work. Logically speaking, re-configuring an already configured channel is not wrong so this commit solves the issue by allowing the CHAN_CONFIGURED -> CHAN_CONFIGURED transition.

Currently, the state transition function doesn't allow
the re-configuration of an already configured channel
(i.e: CHAN_CONFIGURED -> CHAN_CONFIGURED transition). This
causes problems when using `pulseaudio` and `SOF` because
the same channel ends up being configured multiple times
in the beginning due to how pulse seems to work. Logically
speaking, re-configuring an already configured channel is
not wrong so this commit solves the issue by allowing
the CHAN_CONFIGURED -> CHAN_CONFIGURED transition.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
@LaurentiuM1234 LaurentiuM1234 marked this pull request as ready for review February 25, 2024 19:29
@zephyrbot zephyrbot added area: DMA Direct Memory Access platform: NXP Drivers NXP Semiconductors, drivers labels Feb 25, 2024
@iuliana-prodan
Copy link
Collaborator

@LaurentiuM1234 is it possible for Pulse to come and reconfigure your EDMA (already configured by SOF with config X) with config Y?
Wouldn't that break SOF?

@LaurentiuM1234
Copy link
Collaborator Author

@LaurentiuM1234 is it possible for Pulse to come and reconfigure your EDMA (already configured by SOF with config X) with config Y? Wouldn't that break SOF?

This all happens during init so pulse shouldn't interfere with the configurations you set when doing for example aplay. I'm assuming this behavior is part of pulse's initialization process (i.e: when the daemon is spawned).

@teburd teburd assigned dbaluta and unassigned teburd Mar 4, 2024
@teburd
Copy link
Collaborator

teburd commented Mar 4, 2024

Re-assigned to @dbaluta as these are NXP related changes for audio, please re-assign again if needed

@dbaluta
Copy link
Collaborator

dbaluta commented Mar 5, 2024

Thanks @teburd. This is good to be merged! I don't have merge rights, so can you please help merge it?

@henrikbrixandersen henrikbrixandersen merged commit 705d579 into zephyrproject-rtos:main Mar 5, 2024
22 checks passed
@LaurentiuM1234 LaurentiuM1234 deleted the edma_chan_recfg_patch branch March 5, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: DMA Direct Memory Access platform: NXP Drivers NXP Semiconductors, drivers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants