Topology: Add DMIC capture pipeline with gain and high-pass filter#95
Conversation
| @@ -0,0 +1,75 @@ | |||
| # | |||
| # Topology for generic Apollolake board with no codec. | |||
There was a problem hiding this comment.
Yes, it should be e.g. "Apollo Lake board with direct attach digital microphones array"
| # Controls | ||
| # | ||
|
|
||
| # 50 Hz 2nd order high-pass and +20 dB gain 09-Oct-2018 |
There was a problem hiding this comment.
Btw, can we load this from file yet ? or alternatively include it as a M4 macro (from coefficient generator script) ?
There was a problem hiding this comment.
the "bytes" field in eqiir_priv can be a "file". So same bytes as now written to file should work. I think Seppo's octave script can write the binary file already.
There was a problem hiding this comment.
This part of m4 is automatically generated by the EQ tool, function eq_tplg_write(). I just copy & pasted it into this place. It could be an include as well if you prefer. No editing need would avoid risk to manually corrupt the blob so maybe it would be better.
I don't know myself how the binary file would be set up but that should be possible too.
There was a problem hiding this comment.
so, you can just change the bytes = 0x12 etc to file = eq_response. The eq_response is a binary file containing the same bytes as now. When you compile the m4 with alsa_tplg you need to set environment variable ALSA_CONFIG_TPLG to point to the directory you have the binary response file.
This patch adds topology sof-apl-eq-dmic to help testing acoustical audio capture via DMIC or work as example for other machine drivers. The capture format is set as four channels, S32_LE, 48 kHz. The IIR EQ is a 2nd order Butterworth high-pass with cut-off frequency at 50 Hz to suppress non-audible lowest frequencies. The EQ provides additional +20 dB gain to avoid the recording to sound too silent. The IIR EQ or additional FIR EQ instance can when needed provide other form factor specific equalization. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
bc85f61 to
27281d7
Compare
|
@lgirdwood @juimonen I just pushed fix for this PR. I corrected the comment and moved the the filter coefficients into a separate included file. Those .m4 files are generated directly by EQ tool. I feel the text ASCII for coefficients is nicer than binary since it's possible to "decode" the header by looking the bytes value. I added also flat response coefficients for FIR and IIR so it's then easy to replace the response to flat by just altering the include statement. If this approach looks OK I can update the playback topology to use the same coefficients for the default flat setup that's used there. |
This patch adds topology sof-apl-eq-dmic to help testing acoustical
audio capture via DMIC or work as example for other machine drivers. The
capture format is set as four channels, S32_LE, 48 kHz. The IIR EQ is
a 2nd order Butterworth high-pass with cut-off frequency at 50 Hz to
suppress non-audible lowest frequencies. The EQ provides additional
+20 dB gain to avoid the recording to sound too silent.
The IIR EQ or additional FIR EQ instance can when needed provide other
form factor specific equalization.
Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com