Skip to content

[RFC][Do not merge] Topology: Low-pass capture FIR for sof-cml-rt5682 - #2434

Closed
singalsu wants to merge 1 commit into
thesofproject:masterfrom
singalsu:rfc_tplg_fir_lpf
Closed

singalsu wants to merge 1 commit into
thesofproject:masterfrom
singalsu:rfc_tplg_fir_lpf

Conversation

@singalsu

Copy link
Copy Markdown
Collaborator

This patch is invasive and impacts ICL, WHL, and CML platforms
with RT5682 codec. It limits audio capture bandwidth to 7 kHz.

The purpose is to demonstrate usage of FIR low-pass filter to
capture PCM0 pipeline to mitigate apparent audio bus data corruption.
The seen noise waveform looks like random PCM bit flips. This
kind of patch should be only last resort.

The patch also shows a proposal how to propagate pipeline filter
coefficients data definition at topology top level. It is an
useful way to avoid to create different new pipeline macros for
different desired frequency response.

The macro PIPELINE_PCM_ADD is enhanced to set from arguments 14
and 15 macros PIPELINE_FILTER1 and PIPELINE_FILTER2. If they
are set the macros for EQ pipeline will include coefficients from
those files in the order that they are defined.

The other clean up for topology macros include definions for unique
volume tokens and unique filter coefficient definitions.

Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com

This patch is invasive and impacts ICL, WHL, and CML platforms
with RT5682 codec. It limits audio capture bandwidth to 7 kHz.

The purpose is to demonstrate usage of FIR low-pass filter to
capture PCM0 pipeline to mitigate apparent audio bus data corruption.
The seen noise waveform looks like random PCM bit flips. This
kind of patch should be only last resort.

The patch also shows a proposal how to propagate pipeline filter
coefficients data definition at topology top level. It is an
useful way to avoid to create different new pipeline macros for
different desired frequency response.

The macro PIPELINE_PCM_ADD is enhanced to set from arguments 14
and 15 macros PIPELINE_FILTER1 and PIPELINE_FILTER2. If they
are set the macros for EQ pipeline will include coefficients from
those files in the order that they are defined.

The other clean up for topology macros include definions for unique
volume tokens and unique filter coefficient definitions.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu

Copy link
Copy Markdown
Collaborator Author

The FIR frequency response is a kaiser low-pass with 40 dB attenuation. The filter needs to be pretty short to react fast to impulses so the applied attenuation is quite low for a FIR.

Screenshot from 2020-02-25 17-17-19

I'll add later the design code to FIR example in SOF/tools/tune/eq.

@plbossart

Copy link
Copy Markdown
Member

The purpose is to demonstrate usage of FIR low-pass filter to
capture PCM0 pipeline to mitigate apparent audio bus data corruption.

Sorry @singalsu I don't get the idea. You will still get noise with a cut-off at 7kHz, how does this make the results better? It's still noise. You can correct for acoustic issues with a filter, data corruption can't be recovered from with linear filters.

@singalsu

Copy link
Copy Markdown
Collaborator Author

I'm not recommending this... I made this to experiment improvement to EQ pipelines to define the desired response for FIR and IIR at top level topology instead of creating lot of different EQ pipeline macros.

@singalsu

Copy link
Copy Markdown
Collaborator Author

There's no need to keep this open (the PR id can be used to get this for testing needs). I'll make another PR with just the topology macros improvements but no change to currently applied processing.

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.

2 participants