Skip to content

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

Merged
mwasko merged 4 commits into
cavs2.5-001-drop-stablefrom
cavs2.5-tmp-mergeback0222
Apr 7, 2023
Merged

mwasko merged 4 commits into
cavs2.5-001-drop-stablefrom
cavs2.5-tmp-mergeback0222

Conversation

@johnylin76

Copy link
Copy Markdown
Contributor

According to #7121, new back-porting commits should be landed in cavs2.5-001-drop-stable instead.

johnylin76 and others added 4 commits February 22, 2023 15:01
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)
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)

@lgirdwood lgirdwood 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.

@mwasko backports from main.

@sys-pt1s

sys-pt1s commented Apr 6, 2023

Copy link
Copy Markdown

Can one of the admins verify this patch?

@lgirdwood

Copy link
Copy Markdown
Member

@mwasko @marcinszkudlinski ping

@mwasko
mwasko merged commit a4626a7 into cavs2.5-001-drop-stable Apr 7, 2023
@johnylin76
johnylin76 deleted the cavs2.5-tmp-mergeback0222 branch March 5, 2025 05:35
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.

6 participants