-
Notifications
You must be signed in to change notification settings - Fork 349
Modify the echo reference capture pipeline #8101
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
Conversation
The echo-ref pipeline ie the DAI capture pipeline involving the speaker codec is already part of the list of pipelines that gets set up and triggered when the DMIC capture starts. Therefore, there's no need for the echo-ref PCM to explicitly start the reference capture. So, remove it and connect the codec DAI to the google-rts-aec module directly. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More removals than additions which is always good.
@RDharageswari @yongzhi1 have you been able to validate with AEC ?
@cujomalainey fyi.
|
Hi Liam, |
| source $ECHO_REF_COPIER_MODULE | ||
| sink "host-copier.$ECHO_REF_PCM_ID.capture" | ||
| } | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ranj063 Not necessarily for this PR, but should we still have templates for both cases, echo ref to an AEC running on the DSP (like this case), and echo ref to user-space. I mean a given product will use only one option, not both, but in the past we've enabled both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kv2019i for aec in userspace, we would need the host copier and the PCM but we can't tie it to this topology. So I'd say we should leave it until.theres a need for it.
|
Also not directly related to this PR, but if this is targeted for ChromeOS, can we remove the EQIIR 14.1, we won't use it for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cached comment
why? it's there on purpose to remove the DC component. You absolutely want this in Chrome on DMIC pipelines, it's an endpoint effect here, not something that the user should tweak. |
If that is what it is for we would rather use the dcblock which is a exact duplicate of what we deploy in CRAS. Also we have 0 users of it on intel platforms in the past 9 programs |
We really need @singalsu to comment, but I can tell you 100% of DMIC-based non-Chrome platforms use the EQIIR on the DMIC path. IIRC the EQIIR also boosts the gain. It's a big surprise that Chrome topologies skipped it. |
@RDharageswari ok, pls approve when you are happy with test results. |
The generic Linux user space does not have enhancement for the microphone capture as CRAS in ChromeOS has. Without IIR and gain boost the capture would be very silent. We have got complains about it when it was lacking. The high-pass IIR is better than just gain for boosting the signal since suppressing the lowest frequencies gives more headroom for gain. Also without the IIR we see with various quality microphones components in PCs, that the DC levels that the HW DCCOMP in DMIC is not capable to suppress so it's useful to have IIR or dcblock there to ensure capture is without DC offset. We've used for convenience the IIR EQ instead of dcblock + EQ. I'm adding to tplg2 dcblock and a topology for hda-generic so using it will be possible in IPC4 and tplg2. We could consider it as default for HDA analog capture if the MCPS is lower than IIR (we should be able to optimize). The HDA headset codec also produces a long DC pulse in the capture start. This nocodec topology is just for testing, it's not a reference, so the audio quality aspect with it is not critical. But we should have a good set of components included in my opinion since this undergoes a lot of testing. The hda-generic topologies are a reference for PCs so there we should have a good generic example. |
|
@ranj063 I recommend to keep the IIR there and proceed. We can soon after switch it to dcblock when the conversion work is tested and merged. I missed in my previous comment that this wasn't nocodec where we have similar looking capture pipelines. Also this PR is not related to IIR so it would be anyway other PR. |
The DMIC capture path should support both 4ch and 2ch audio formats. Also, since the Google AEC module only support 16-bit input format, modify the output of the refeence capture DAI accordingly. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
|
Think module-copier.18.1 is redundant, but the patch works fine. |
@yongzhi1 yes lets fix it in a follow up |
|
I am still seeing errors reported by FW. with kernel+topology and firmware for AEC. Working with Ranjani |
The blob contains the input/output audio formats but these are already passed during module init based on hw_params. So no need to have the byte control for it. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@RDharageswari can you please check if the PR works now. I have removed the AEC blob for setting audio formats |
RDharageswari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works good for me.
kv2019i
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ranj063 Feel free to merge if this is ready and kernel status is ok as well.
|
CI has had network issues. Rerun. |
|
SOFCI TEST |
|
@lgirdwood in Internal Intel CI system, all green :) |
| } | ||
|
|
||
| google-rtc-aec."1" { | ||
| Object.Control.bytes."1" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the real AEC version without mockup use the bytes control. Was this added just for the mockup? If the real AEC has bytes control shouldn't we have it in topology to be able to exercise it with about right ballpark size random bytes blob?
The new topology looks like this (Note that there is no capture PCM for echo ref anymore and SSP0-Codec DAI feeds into the google-rtc-ace module directly)

This PR depends on the kernel PR thesofproject/linux#4550