Skip to content

host: unify component for all DMA types - #1565

Merged
jajanusz merged 9 commits into
thesofproject:masterfrom
tlauda:topic/host-refactor2
Jun 25, 2019
Merged

host: unify component for all DMA types#1565
jajanusz merged 9 commits into
thesofproject:masterfrom
tlauda:topic/host-refactor2

Conversation

@tlauda

Copy link
Copy Markdown
Contributor

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 tomasz.lauda@linux.intel.com

tlauda added 8 commits June 13, 2019 14:38
DW-DMA should ignore copy call if flags include
DMA_COPY_PRELOAD.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Unifies host_copy implementation for all types
of DMA.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Ignores request for HDA-DMA configuration if the
channel is in active state.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
Checks if dma_sg_elem_array buffer is allocated
before performing cache writeback or invalidation.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
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 <tomasz.lauda@linux.intel.com>
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
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 <tomasz.lauda@linux.intel.com>
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 <tomasz.lauda@linux.intel.com>
Comment threadsrc/audio/host.c
#if !CONFIG_DMA_GW
struct hc_buf host;
#if !CONFIG_DMA_GW
struct hc_buf local;

Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Collaborator

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.

@lgirdwoodlgirdwood left a comment

Copy link
Copy Markdown
Member

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.

@jajanuszjajanusz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good job

Comment threadsrc/audio/host.c Outdated

Copy link
Copy Markdown
Contributor

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.

Comment threadsrc/audio/host.c Outdated

Copy link
Copy Markdown
Contributor

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.

@dbaluta

Copy link
Copy Markdown
Collaborator

@tlauda We should be careful to run all regression test we have! Other than that, excellent work!

@jajanusz

Copy link
Copy Markdown
Contributor

@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 <tomasz.lauda@linux.intel.com>
@tlauda
tlaudaforce-pushed the topic/host-refactor2 branch from 30ab3f7 to 2825d47CompareJune 24, 2019 06:32
@tlauda

tlauda commented Jun 24, 2019

Copy link
Copy Markdown
ContributorAuthor

@mengdonglin@keqiaozhang It's been over a week. Can I assume that it's not breaking legacy platforms?

@lgirdwood

Copy link
Copy Markdown
Member

@tlauda I have a feeling there has been some national holidays for @mengdonglin and @keqiaozhang last week but some folks seem back today.

@Jiangxinx

Copy link
Copy Markdown
Contributor

I have done sanity test for this PR on apl and byt platform.

env
kernel (topic/sof-dev): 0087d4a
topology: sof-apl-pcm512x.tplg & sof-apl-nocodec.tplg & sof-byt-rt5651.tplg & sof-byt-nocodec.tplg

Test result

test casebyt nocodecbyt rt5651apl up2 nocodecapl up2 nocodec(xcc)apl up2 PCM512xapl up2 PCM512x(xcc)
repeat 3 times playback over headsetPassedPassedPassedPassedPassedPassed
Pause/Resume playback over headset - 10 timesFailedFailedPassedPassedPassedPassed
Play an audio for 3 minutesPassedPassedPassedPassedPassedPassed
Change volume during playback.PassedPassedPassedPassedPassedPassed
aplay - playback over HDMI (hw:0, 2)N/AN/AN/AN/APassedPassed
stop/resume playback over HDMIN/AN/AN/AN/APassedPassed
repeat 3 times playback over HDMIN/AN/AN/AN/APassedPassed
Pause/Resume playback over HDMIN/AN/AN/AN/APassedPassed
Play an audio for 3 minutes over HDMIN/AN/AN/AN/APassedPassed
Change volume during playback over HDMI.N/AN/AN/AN/APassedPassed
arecord - capture over headset(hw:0,0) (HDA Analog)PassedPassedPassedPassedN/AN/A
Change volume during capture (hw:0,0).PassedPassedPassedPassedN/AN/A
Pause/Resume capture (hw:0,0)Failed (#1578)Failed (#1578)PassedPassedN/AN/A
Capture a audio for 5 minutes via HDA AnalogPassedPassedPassedPassedN/AN/A
repeat 3 times capturePassedPassedPassedPassedN/AN/A
Stop/Resume capturePassedPassedPassedPassedN/AN/A
arecord - capture over DMIC32 (hw:0,6)N/AN/APassedPassedN/AN/A
Change volume during capture over DMIC32 (hw:0,6) .N/AN/APassedPassedN/AN/A
Pause/Resume capture over DMIC32 (hw:0,6)N/AN/APassedPassedN/AN/A
Capture a audio for 5 minutes over DMIC32 (hw:0,6)N/AN/APassedPassedN/AN/A
repeat 3 times capture over DMIC32 (hw:0,6)N/AN/APassedPassedN/AN/A
Stop/Resume capture over DMIC32 (hw:0,6)N/AN/APassedPassedN/AN/A
Do playback and capture at same timePassedPassedPassedPassedN/AN/A
2 aplay_Analogue + Media PlaybackPassedPassedFailed (#1526)Failed (#1526)Failed (#1526)Failed (#1526)
2 aplay_Analogue + HDMIN/AN/AN/AN/APassedPassed
Check the audio channel via speaker-testPassedPassedPassedPassedPassedPassed
Check the runtime PM statusN/AN/APassedPassedPassedPassed
Modules reloadPassedPassedPassedPassedPassedPassed
Modules reload - 100 timesPassedPassedPassedPassedPassedPassed

@tlauda

Copy link
Copy Markdown
ContributorAuthor

@Jiangxinx To sum up, do we have any regression or not?

@Jiangxinx

Copy link
Copy Markdown
Contributor

Sorry to this mission: This pr have not another regression issues
Pause/Resume playback over headset - 10 times can be also reproduced on daily version.

Sign up for freeto 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.

host.c: remove DMA specific logic

5 participants

@tlauda@dbaluta@jajanusz@lgirdwood@Jiangxinx