-
Notifications
You must be signed in to change notification settings - Fork 318
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
audio: dai-zephyr: convert DMA src/dst addresses to host-relative addresses #8948
Conversation
@@ -751,8 +751,17 @@ static int dai_set_dma_config(struct dai_data *dd, struct comp_dev *dev) | |||
for (i = 0; i < dma_cfg->block_count; i++) { | |||
dma_block_cfg->dest_scatter_en = config->scatter; | |||
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) { |
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.
Why add a new if
based on direction?
You can use the one below, from line 765.
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.
my bad, fixed!
cdb9394
to
de3f581
Compare
…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>
@wszypelt Can you check? Job 13725213 was cancelled and exceptation is this PR is a no-op for Intel platforms. |
@kv2019i Internal Intel CI System - all green |
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).