Skip to content

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

Closed

Description

@RDharageswari

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.

Activity

  1. added
    bugSomething isn't working as expected
    MTLApplies to Meteor Lake platform
    on Aug 22, 2023
  2. lgirdwood commented on Aug 23, 2023

    @lgirdwood
    Member

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

  3. kv2019i commented on Aug 23, 2023

    @kv2019i
    Collaborator

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

  4. kv2019i commented on Aug 23, 2023

    @kv2019i
    Collaborator

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

  5. ranj063 commented on Aug 24, 2023

    @ranj063
    Collaborator

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

  6. yongzhi1 commented on Aug 25, 2023

    @yongzhi1
    Contributor

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

  7. ranj063 commented on Aug 25, 2023

    @ranj063
    Collaborator

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

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

  8. RanderWang commented on Sep 22, 2023

    @RanderWang
    Collaborator

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

  9. mengdonglin commented on Sep 25, 2023

    @mengdonglin
    Collaborator

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

    @RDharageswari @yongzhi1 @ranj063 FYI

  10. kv2019i commented on Oct 10, 2023

    @kv2019i
    Collaborator

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

  11. RanderWang commented on Oct 12, 2023

    @RanderWang
    Collaborator

    Let me close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Echo ReferenceApplies to echo referenceFix SubmittedFix has been submitted, to be fully verifiedMTLApplies to Meteor Lake platformP1Blocker bugs or important featuresbugSomething isn't working as expectedtopologyTopology issues

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions