Skip to content

Conversation

@ranj063
Copy link
Collaborator

@ranj063 ranj063 commented Aug 25, 2023

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)
sof-mtl-max98357a-rt5682-ssp2-ssp0

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

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>
Copy link
Member

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

@RDharageswari
Copy link

Hi Liam,
I am seeing some issues w.r.t third capture..Will continue to test and update

source $ECHO_REF_COPIER_MODULE
sink "host-copier.$ECHO_REF_PCM_ID.capture"
}
]
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@cujomalainey
Copy link
Contributor

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.

Copy link
Contributor

@cujomalainey cujomalainey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cached comment

@plbossart
Copy link
Member

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.

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.
Adding @singalsu for more comments.

@cujomalainey
Copy link
Contributor

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.

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. Adding @singalsu for more comments.

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

@plbossart
Copy link
Member

plbossart commented Aug 29, 2023

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.

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. Adding @singalsu for more comments.

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.

@lgirdwood
Copy link
Member

Hi Liam, I am seeing some issues w.r.t third capture..Will continue to test and update

@RDharageswari ok, pls approve when you are happy with test results.

@singalsu
Copy link
Collaborator

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.

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. Adding @singalsu for more comments.

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.

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.

@singalsu
Copy link
Collaborator

@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>
@yongzhi1
Copy link
Contributor

yongzhi1 commented Sep 6, 2023

Think module-copier.18.1 is redundant, but the patch works fine.

@ranj063
Copy link
Collaborator Author

ranj063 commented Sep 6, 2023

Think module-copier.18.1 is redundant, but the patch works fine.

@yongzhi1 yes lets fix it in a follow up

@RDharageswari
Copy link

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>
@ranj063
Copy link
Collaborator Author

ranj063 commented Sep 8, 2023

I am still seeing errors reported by FW. with kernel+topology and firmware for AEC. Working with Ranjani

@RDharageswari can you please check if the PR works now. I have removed the AEC blob for setting audio formats

Copy link

@RDharageswari RDharageswari left a 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.

Copy link
Collaborator

@kv2019i kv2019i left a 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.

@lgirdwood
Copy link
Member

CI has had network issues. Rerun.

@lgirdwood
Copy link
Member

SOFCI TEST

@lgirdwood
Copy link
Member

@wszypelt @lrudyX CI seems to be in pending state, any chance someone could manually restart. Thanks !

@wszypelt
Copy link

@lgirdwood in Internal Intel CI system, all green :)

@lgirdwood lgirdwood changed the title Modify the echo reference capture pipeline [DNM pending kernel PR] Modify the echo reference capture pipeline Sep 14, 2023
}

google-rtc-aec."1" {
Object.Control.bytes."1" {
Copy link
Collaborator

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?

@ranj063 ranj063 changed the title [DNM pending kernel PR] Modify the echo reference capture pipeline Modify the echo reference capture pipeline Oct 3, 2023
@kv2019i kv2019i merged commit 9e9120a into thesofproject:main Oct 3, 2023
@ranj063 ranj063 deleted the main-082323 branch October 3, 2023 15:16
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.

9 participants