Skip to content

Topology: HDA Generic: Headset filters configuration from CMakeLists.txt - #3796

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
singalsu:hda_generic_improve_eqdef
Jan 29, 2021
Merged

Topology: HDA Generic: Headset filters configuration from CMakeLists.txt#3796
lgirdwood merged 1 commit into
thesofproject:masterfrom
singalsu:hda_generic_improve_eqdef

Conversation

@singalsu

Copy link
Copy Markdown
Collaborator

This patch eases the definition of headset post processing filters
blobs. First, the macro name PPROC is changed to HSPROC to indicate
the processing targets headset endpoint.

The CMakeLists.txt for topologies is edited to add build of topology
sof-hda-generic-eq.tplg that does not include DMIC endpoints for
devices without such. Previously there was no variant without
DMIC enable.

The main macro sof-hda-generic.m4 is enhanced to define HSPROC as
volume to use pipeline pipe-volume-playback.m4 when it has not been
defined in CMakeLists.txt.

The definitions for PIPELINE_FILTERx are copied from endpoint specific
HSPROC_FILTERx if they were defined. If they were left undefined
the pipeline will apply default processing configuration (e.g.
for EQs pass-through).

In the example the EQs are left to pass-through. The topology
sof-hda-generic-eq.tplg shows an example of explicitly setting
the filter coefficients at the top level. The FILTER1 is impacts the
first algorithm in pipeline (IIR) and FILTER2 the second algorithm
algorithm (FIR) in the used HSPROC definition eq-iir-eq-fir-volume.
In this case volume does not support such but for future there could
be FILTER3, FILTER4, ... added if need. The current m4 macros support
now only HSPROC_FILTER1 and HSPROC_FILTER2.

The patch adds undefine to PIPELINE_FILTERx in intel-generic-dmic.m4 to
make sure the macro is not set by other than DMICPROC_FILTERx. The
same is done for 16 kHz DMIC capture. Currently there were no issues
caused by it.

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

This patch eases the definition of headset post processing filters
blobs. First, the macro name PPROC is changed to HSPROC to indicate
the processing targets headset endpoint.

The CMakeLists.txt for topologies is edited to add build of topology
sof-hda-generic-eq.tplg that does not include DMIC endpoints for
devices without such. Previously there was no variant without
DMIC enable.

The main macro sof-hda-generic.m4 is enhanced to define HSPROC as
volume to use pipeline pipe-volume-playback.m4 when it has not been
defined in CMakeLists.txt.

The definitions for PIPELINE_FILTERx are copied from endpoint specific
HSPROC_FILTERx if they were defined. If they were left undefined
the pipeline will apply default processing configuration (e.g.
for EQs pass-through).

In the example the EQs are left to pass-through. The topology
sof-hda-generic-eq.tplg shows an example of explicitly setting
the filter coefficients at the top level. The FILTER1 is impacts the
first algorithm in pipeline (IIR) and FILTER2 the second algorithm
algorithm (FIR) in the used HSPROC definition eq-iir-eq-fir-volume.
In this case volume does not support such but for future there could
be FILTER3, FILTER4, ... added if need. The current m4 macros support
now only HSPROC_FILTER1 and HSPROC_FILTER2.

The patch adds undefine to PIPELINE_FILTERx in intel-generic-dmic.m4 to
make sure the macro is not set by other than DMICPROC_FILTERx. The
same is done for 16 kHz DMIC capture. Currently there were no issues
caused by it.

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

Copy link
Copy Markdown
Collaborator Author

When doing comparison (diff -udr topology.old topology) of ALSA topology .conf files before and after the PR I noticed that there was a change in HDA capture EQ filter coefficients for sof-hda-generic-eq*.conf. It was because previous version of topology defined PIPELINE_FILTER1 and continued without undefine. It replaced in those topologies the intended high-pass filter (to mitigate codec capture settling ) with pass-trough.

The mistake was before unnoticed. The sof-hda-generic-eq*.tplg are not used by default so there's not much harm from this. Also not all HDA codecs have issues with DC pulse from headset capture that the high-pass filter was added for. The normal sof-hda-generic-1/2/3/4ch.tplg were not impacted.

@singalsu
singalsu marked this pull request as ready for review January 28, 2021 14:33

@juimonen juimonen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm, let's still see final CI report.

@lgirdwood
lgirdwood merged commit cb92499 into thesofproject:master Jan 29, 2021
@singalsu
singalsu deleted the hda_generic_improve_eqdef branch June 15, 2021 08:21
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.

3 participants