Skip to content

Conversation

@LaurentiuM1234
Copy link
Contributor

The DMAC has the same view of the address space as the HOST. As such, the source and destination addresses need to be converted to HOST-relative addresses before attempting to perform a DMA transfer. This is only relevant for platforms for which the DSP and HOST have different views of the address space (e.g: i.MX8ULP).

@LaurentiuM1234 LaurentiuM1234 marked this pull request as ready for review March 14, 2024 14:43
dma_block_cfg->block_size = config->elem_array.elems[i].size;
dma_block_cfg->source_address = config->elem_array.elems[i].src;
dma_block_cfg->dest_address = config->elem_array.elems[i].dest;
if (dev->direction == SOF_IPC_STREAM_PLAYBACK) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why add a new if based on direction?
You can use the one below, from line 765.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my bad, fixed!

…resses

The DMAC has the same view of the address space as the HOST.
As such, the source and destination addresses need to be converted
to HOST-relative addresses before attempting to perform a DMA
transfer. This is only relevant for platforms for which the DSP
and HOST have different views of the address space (e.g: i.MX8ULP).

Also, if a platform doesn't define the `local_to_host` macro
(used for converting DSP local address to HOST-relative address)
we assume that the HOST and the DSP have the same view of the
address space. As such, we also add a definition of `local_to_host`
which will just return the passed address.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
@kv2019i
Copy link
Collaborator

kv2019i commented Mar 15, 2024

@wszypelt Can you check? Job 13725213 was cancelled and exceptation is this PR is a no-op for Intel platforms.

@wszypelt
Copy link

@kv2019i Internal Intel CI System - all green

@dbaluta dbaluta merged commit fc48fbd into thesofproject:main Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants