Skip to content

cherry-pick: smart_amp fix and pdm1 topology from main - #7121

Closed
johnylin76 wants to merge 4 commits into
thesofproject:rpl-001-drop-stablefrom
johnylin76:rpl-001-pick-0218
Closed

johnylin76 wants to merge 4 commits into
thesofproject:rpl-001-drop-stablefrom
johnylin76:rpl-001-pick-0218

Conversation

@johnylin76

Copy link
Copy Markdown
Contributor

cherry-picking #7048, #7075, #7076 from main.

94a816735c6c35a0ae1518484df9bb5219fb882d has fixed the merge conflict

There is a rballoc() call during module_init() lacking the
correspondent rfree() on module_free(). Replace it with
module_allocate_memory() to ensure the memory to be freed
by module_adapter.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
(cherry picked from commit eedd76a)
Adds new topology build based on sof-adl-max98360a-rt5682-2way
with appending arg `-DDMIC_DAI_LINK_16k_PDM=STEREO_PDM1` for existing
ADL-P projects.

Signed-off-by: Pin-chih Lin <johnylin@google.com>
(cherry picked from commit feeb51f)
@marc-hb

marc-hb commented Feb 18, 2023

Copy link
Copy Markdown
Collaborator

@singalsu the testbench is reporting some worrying memory errors in this branch

https://github.com/thesofproject/sof/actions/runs/4209803419/jobs/7307029813

@marc-hb

marc-hb commented Feb 18, 2023

Copy link
Copy Markdown
Collaborator

94a8167 has fixed the merge conflict

The conflict happened because this PR skips @lyakh's commit 6c94904 "smart_amp: fix buffer acquisition".

https://github.com/thesofproject/sof/commits/main/src/audio/smart_amp

Are you sure you want to skip that commit? It says "fix" :-)

@singalsu

Copy link
Copy Markdown
Collaborator

@singalsu the testbench is reporting some worrying memory errors in this branch

https://github.com/thesofproject/sof/actions/runs/4209803419/jobs/7307029813

Unrelated to this PR but similar has happened before too. I have not been able to replicate it. How can I see which SOF commit was used for test build?

lyakh and others added 2 commits February 20, 2023 17:22
Instead of acquiring and releasing buffers locally multiple times,
do that once for .copy(), .trigger() and .prepare() methods.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
(cherry picked from commit 6c94904)
…hone.

There are two pops caused by SOF Firmware.

Pop occurs when switch from headphone to speaker:
When switch to headphone, audio playback data still remains in
DSM internal processing buffer and not consumed by DMA.
So when switch back to speaker, the DSM processing buffer is not clean,
then pop noise occurs. We can clean and reset the point for
DSM internal processing buffer by called this function 'smart_amp_init'
in function 'smart_amp_prepare'.

Pop occurs when switch from speaker to headphone:
The feedback and feed-forward buffer processing should be independent.
But the number of frames processed by DSM feedforward is corrupted by
feedback buffer calculation. When capture pipeline exists,
the number of frames for feedforward is always same as feedback.
And the number of frames for feedback is zero at the first time
when the capture pipeline setup. Then the number of frames processed
by DSM feed forward is also zero though there are many frames in
playback buffer. So the available frames will become larger.
It is easy to exceed the limit size of DSM input.
Then it will cause the buffer overflow and we could hear obvious pop
noise from speaker. We fix it by calculating the number of frames
for feedforward and feedback respectively.

Signed-off-by: Long Wang <long.wang@analog.com>
(cherry picked from commit 8a1798e)
@johnylin76

Copy link
Copy Markdown
Contributor Author

94a8167 has fixed the merge conflict

The conflict happened because this PR skips @lyakh's commit 6c94904 "smart_amp: fix buffer acquisition".

https://github.com/thesofproject/sof/commits/main/src/audio/smart_amp

Are you sure you want to skip that commit? It says "fix" :-)

Thanks @marc-hb I think you're right. It's more effective and secure to cherry-pick 6c94904 "smart_amp: fix buffer acquisition" back as well prior to #7048. There is no merge conflict to solve then.

@lgirdwood

Copy link
Copy Markdown
Member

@mwasko fyi, should this go to cavs 2.5 branch only now ?

@mwasko

mwasko commented Feb 21, 2023

Copy link
Copy Markdown
Contributor

@mwasko fyi, should this go to cavs 2.5 branch only now ?

@johnylin76 we are completing the transition to cavs2.5-001-drop-stable, so please submit any new backport commits there.

@cujomalainey

Copy link
Copy Markdown
Contributor

closing since we can't move branches, need to remake this

@marc-hb

marc-hb commented Feb 21, 2023

Copy link
Copy Markdown
Collaborator

https://github.com/thesofproject/sof/actions/runs/4209803419/jobs/7307029813

Unrelated to this PR but similar has happened before too. I have not been able to replicate it. How can I see which SOF commit was used for test build?

The "build testbench" build logs show the full SHA1 of the merge commit; I made sure of that for situations like these. github.com lets you fetch full, 40-digit SHA1 directly. Put a branch or tag on it after fetching it because github will likely garbage collect it after a while.

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.

8 participants