Repository navigation
topology: add macro to support multiple fir iir eq filters - #2660
Conversation
There was a problem hiding this comment.
Sorry for causing a misunderstanding. The applying of low-pass into CML RM5682 should not be up-streamed. Only the general technique to pass from topology top level or even makefile the filter blob reference is the part that's needed. The low-pass FIR was an experiment to attenuate bits corruption effect that happened in this platform due to SSP clocks issue and the capability to conceal the issue fir FIR was weak. So, please change the topic of this PR to reflect the processing define updates and drop totally the 7 kHz low-pass blob. The brick-wall FIR is not a very good demo response and it's hard to measure the stop-band spec due to to lot of attenuation.
The demo case to upstream for the technique could be maybe an alternative topology with bass boost IIR or loudness IIR applied (I can make PR for the the m4 filter blobs today -- I need them for testbench usage as well as test response) to headset output PCM with pipe-eq-iir-volume-playback.m4. Also the various 40 Hz high-pass with gain (20 dB) and without should be cleaned up and implemented this way with generic filter blob reference and pipe-eq-iir-volume-capture.m4. Then we would have test cases for both playback and capture EQ.
I can also email to you the demo blobs to let you continue immediately with them and not wait for my PR to get merged. If you'd like to include them to your PR I can close my coming PR. We can proceed like you prefer with them!
Instead of defining keyword lowpass and interpreting it in pipeline macro the macro should get the filename reference directly. There would be eventually tons of this kind keywords and the maintenance would be impossible and at top level no idea what coefficients set gets requested. Even of top level gets a bit clutter I'd prefer that. Since the processing effect is strong it should be very visible at upper level to not accidentally enable something not desired.
Also this approach does not seem to enable to define at top level filter blobs for this kind of speaker rendering pipeline:
PCM --> EQ-IIR --> EQ-FIR --> volume --> DAI
The needs to be a way to pass the separate m4 coefficients blobs for IIR and FIR the pipeline. Currently we don't have more than max. two processing components (+volume) in pipeline but in future there can be more, e.g. three or four. So this system should scale up a bit from this proposal.
Note: I've done several edits to this while trying to make my mind so please ignore the intermediate versions emails you've possibly received.
3c46031 to
53de585
Compare
|
I updated to address @singalsu comments. I changed title and put |
710c67b to
41aec89
Compare
|
@singalsu Default response is flat for iir and fir filters. It can be set by makefile, PIPELINE_FILTER1 or PIPELINE_FILTER2. CMakeLists.txt changes for demonstration for usage of this PR. By default, fir/iir flat coefficient is set. One of topology overrides fir flat with fir loudness. |
There was a problem hiding this comment.
Since this is direct attach DMIC the default should be eq-iir-volume and filter blob 40 Hz high-pass for 48 kHz for dmic01 and 40 Hz highpass for 16 kHz for dmic16k. The gain can be the 0 dB version.
This reveals need for added DMIC16KPROC and DMIC16K_FILTER1 macros handling to get different filter blob for 16 kHz pipeline. The DMICPROC could be reused but for flexibility better to have them separated.
|
Good work, thanks! I proposed some changes for processing setup for enhanced topologies. Also need to add the upper endpoint specific layer for PIPELINE_FILTERx. Also I realized that we need to be able to differentiate the filter configs for 48 kHz and 16 kHz DMIC DAI. But you've done most of the work so those are fairly small further edits. |
The patch 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 filter. Define filter coefficients data with macro DEF_EQFIR_PRIV and DEF_EQFIR_COEF, which will be replaced unique name by adding PIPELINE number. For IIR filter, equivalent macro is DEF_EQIIR_PRIV and DEF_EQIIR_COEF. Makefile define each pipeline processing HSEARPROC, HSMICRPOC, SPKPROC, DMICPROC etc. Each variable should support default value to minimize current topologies. When new filter blob is required, define PIPELINE_FILTERx in makefile. This method provides more flexible way to support variable number of filters in the pipeline. The other clean up for topology macros include definions for unique volume tokens and unique filter coefficient definitions. Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
41aec89 to
77adb46
Compare
77adb46 to
55fe276
Compare
singalsu
left a comment
There was a problem hiding this comment.
Thanks, this is OK for now. In the next step when PIPELINE_FILTERx is definable per end-point we can make more interesting topology variants.
|
The CI checks output will be interesting. Please update your PR if there are issues. |
55fe276 to
1f7de36
Compare
I will create new issue to follow up this. |
1f7de36 to
da9050b
Compare
For headset playback or capture, default pipe is volume. If The high pass
filter is required to prevent HDA codec headset glitches, it can be set by
HSMICPROC=eq-iir-volume. It use use 40 Hz high pass filter with +0 db
boost. If there is DMIC, this set default pipe as eq-iir, which use
the same 40 Hz high-pass filter too. For DMIC16K, 40 Hz high-pass for 16khz
version filter is used.
Default coefficient for FIR/IIR is changed fr m coef flat to coef pass.
Pass configuration has the advantage of low system load.
eq_fir_coef_flat.m4 to eq_fir_coef_pass.m4
eq_iir_coef_flat.m4 to eq_iir_coef_pass.m4
Below pipe files are renamed for naming convention,
pipe-eq-volume-playback.m4 -> pipe-eq-iir-eq-fir-volume-playback.m4
pipe-eq-capture-16khz.m4 -> pipe-eq-iir-volume-capture-16khz.m4
pipe-eq-capture.m4 -> pipe-eq-iir-volume-capture.m4
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
#2707 is created |
|
SOFCI TEST |
|
CI known issues. |
The patch 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 filter. Define filter coefficients data with macro
DEF_EQFIR_PRIV and DEF_EQFIR_COEF, which will be replaced
unique name by adding PIPELINE number. For IIR filter, equivalent macro
is DEF_EQIIR_PRIV and DEF_EQIIR_COEF.
Makefile define each pipeline processing HSEARPROC, HSMICRPOC, SPKPROC,
DMICPROC etc. Each variable should support default value to minimize
current topologies. When new filter blob is required, define
PIPELINE_FILTERx in makefile. This method provides more flexible way
to support variable number of filters in the pipeline.
The other clean up for topology macros include definions for unique
volume tokens and unique filter coefficient definitions.
Signed-off-by: Fred Oh fred.oh@linux.intel.com
Related issues: #2535, #2534