Skip to content
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

[BUG] [MTL] AEC functionality depends on Echo reference endpoint to be started #8075

Closed
RDharageswari opened this issue Aug 22, 2023 · 10 comments
Assignees
Labels
bug Something isn't working as expected Echo Reference Applies to echo reference Fix Submitted Fix has been submitted, to be fully verified MTL Applies to Meteor Lake platform P1 Blocker bugs or important features topology Topology issues

Comments

@RDharageswari
Copy link

With the AEC topology on main, the following endpoints get listed.
i see the following o/p:
rex-rev1 ~ # arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sofrt5682 [sof-rt5682], device 0: Headset () []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofrt5682 [sof-rt5682], device 2: Bluetooth () []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofrt5682 [sof-rt5682], device 27: DMIC0 RTC AEC () []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofrt5682 [sof-rt5682], device 28: DMIC0 RTC AEC NS () []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofrt5682 [sof-rt5682], device 29: EchoRef () []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofrt5682 [sof-rt5682], device 99: DMIC Raw () []
Subdevices: 1/1
Subdevice #0: subdevice #0
rex-rev1 ~ #

This sequence doesnt work:
1)start speaker playback
2)start dmic capture: arecord -Dhw:0,27 /tmp/tmp.wav -c4 -r48000 -fs32_le -vv

there is a strong dependency on echo reference endpoint to be started.
While this works:
1)start speaker playback
2)start echo ref capture
3)start dmic capture: arecord -Dhw:0,27 /tmp/tmp.wav -c4 -r48000 -fs32_le -vv.

There is no need for the echo reference endpoint to be opened from the user space, while speaker playback the data can be fed to AEC without the FE.Kind of hostless stream.

@RDharageswari RDharageswari added bug Something isn't working as expected MTL Applies to Meteor Lake platform labels Aug 22, 2023
@mengdonglin mengdonglin added Echo Reference Applies to echo reference P1 Blocker bugs or important features labels Aug 23, 2023
@lgirdwood
Copy link
Member

lgirdwood commented Aug 23, 2023

@RDharageswari the intention is that connected PCM endpoints are meant to be started in any order with any timing, since its all driven by userspace. There is a topology flag that's meant to tell any shared modules to ignore internal XRUN errors in such cases and I'm wondering if we dont have this set (as this was a common issue when enabled with IPC3 + M4).

@kv2019i
Copy link
Collaborator

kv2019i commented Aug 23, 2023

@RDharageswari I need to investigate the topology definitions, but it does sound this is working as expceted. The long history and rationale is documented here:
#2564

But, but, if the AEC is on the DSP, then we actually should not have the user-space echo ref PCM in topology (or it can be there, but then it has to be used).

@kv2019i
Copy link
Collaborator

kv2019i commented Aug 23, 2023

@yongzhi1 It seems the speaker ref part of the topology is from you? Is the speaker ref to user-space here intentionally?

@ranj063
Copy link
Collaborator

ranj063 commented Aug 24, 2023

@kv2019i I know the root cause for this issue. I am in the provess of removing the host PCM 27 for echo ref adn this should take of this issue as well.

@yongzhi1
Copy link
Contributor

yongzhi1 commented Aug 25, 2023

@yongzhi1 It seems the speaker ref part of the topology is from you? Is the speaker ref to user-space here intentionally?

Yes, the original code is to enable feedback path from speaker, same idea for SDW_AMP_FEEDBACK.

@ranj063
Copy link
Collaborator

ranj063 commented Aug 25, 2023

@yongzhi1 @RDharageswari PR for the modified topology is here: #8101

This change also requires a kernel change in thesofproject/linux#4550

@RanderWang
Copy link
Collaborator

Please include these patches for this feature
Rimage side: thesofproject/rimage#180
Topology: #8101, #8246, #8204
Kernel: thesofproject/linux#4593

@mengdonglin
Copy link
Collaborator

mengdonglin commented Sep 25, 2023

Please include these patches for this feature Rimage side: thesofproject/rimage#180 Topology: #8101, #8246, #8204 Kernel: thesofproject/linux#4593

@RDharageswari @yongzhi1 @ranj063 FYI

@mengdonglin mengdonglin added the Fix Submitted Fix has been submitted, to be fully verified label Sep 25, 2023
@kv2019i
Copy link
Collaborator

kv2019i commented Oct 10, 2023

@RDharageswari @RanderWang @ranj063 can we close this as all the patches referred here are now merged?

@RanderWang
Copy link
Collaborator

Let me close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected Echo Reference Applies to echo reference Fix Submitted Fix has been submitted, to be fully verified MTL Applies to Meteor Lake platform P1 Blocker bugs or important features topology Topology issues
Projects
None yet
Development

No branches or pull requests

8 participants