-
Notifications
You must be signed in to change notification settings - Fork 314
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
host: unify component for all DMA types #1565
Conversation
DW-DMA should ignore copy call if flags include DMA_COPY_PRELOAD. Signed-off-by: Tomasz Lauda <[email protected]>
Unifies host_copy implementation for all types of DMA. Signed-off-by: Tomasz Lauda <[email protected]>
Ignores request for HDA-DMA configuration if the channel is in active state. Signed-off-by: Tomasz Lauda <[email protected]>
Checks if dma_sg_elem_array buffer is allocated before performing cache writeback or invalidation. Signed-off-by: Tomasz Lauda <[email protected]>
Changes host_buffer component ops to be a subtype of component set_attribute ops. This change allows to unify host implementation across different types of DMA. Signed-off-by: Tomasz Lauda <[email protected]>
Signed-off-by: Tomasz Lauda <[email protected]>
Removes period_bytes field from host_data struct. This field is only used in host_params, so we don't need it globally. Signed-off-by: Tomasz Lauda <[email protected]>
Adds support for one shot copy to DW-DMA. One shot means that transfer isn't circular, so every copy is basically just restart of DMA engine. Signed-off-by: Tomasz Lauda <[email protected]>
struct hc_buf host; | ||
#if !CONFIG_DMA_GW | ||
struct hc_buf local; |
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.
Here we still branch on CONFIG_DMA_GW. Is this as intended? Because the PR description says we no longer need to branch on this config option.
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.
@tlauda I now see the last patch where the config is removed. So, it looks good to me.
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.
@mengdonglin @keqiaozhang can this be tested on legacy.
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.
good job
src/audio/host.c
Outdated
|
||
if (local_elem->src == hd->source->current_end) { | ||
/* end of element, so use next */ | ||
source_elem = next_buffer(hd->source); | ||
hd->source->current_end = source_elem->src + source_elem->size; |
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.
Codecheck complains that source_elem
can be null here.
src/audio/host.c
Outdated
|
||
if (local_elem->dest == hd->sink->current_end) { | ||
/* end of element, so use next */ | ||
sink_elem = next_buffer(hd->sink); | ||
hd->sink->current_end = sink_elem->dest + sink_elem->size; |
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.
Codecheck complains that sink_elem
can be null here.
@tlauda We should be careful to run all regression test we have! Other than that, excellent work! |
@tlauda ping, UT and CodeCheck didn't pass |
Unifies host component for all DMA types. We don't need to branch on CONFIG_DMA_GW anymore. Signed-off-by: Tomasz Lauda <[email protected]>
30ab3f7
to
2825d47
Compare
@mengdonglin @keqiaozhang It's been over a week. Can I assume that it's not breaking legacy platforms? |
@tlauda I have a feeling there has been some national holidays for @mengdonglin and @keqiaozhang last week but some folks seem back today. |
I have done sanity test for this PR on apl and byt platform. env Test result
|
@Jiangxinx To sum up, do we have any regression or not? |
Sorry to this mission: This pr have not another regression issues |
Unifies host component for all DMA types.
We don't need to branch on CONFIG_DMA_GW anymore.
Closes #1052.
Signed-off-by: Tomasz Lauda [email protected]