Skip to content

Commit

Permalink
topology2: sdw-dmic-generic: add eqiir to control DC offset
Browse files Browse the repository at this point in the history
For some reason we had the EQIIR for topology1/IPC3 but we didn't add
it for topology2/IPC4.  All recordings show there's a strong DC offset
with RT722 and other codecs, so let's add this component by default in
the non-passthrough cases.

FIXME: the instance numbers for eqiir don't look quite right, for some
reason we cannot use eqiir.41.0, as if the instance number was global
and not in the scope of a pipeline?

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  • Loading branch information
plbossart committed Jul 26, 2024
1 parent a544eb3 commit 7357a04
Showing 1 changed file with 54 additions and 5 deletions.
59 changes: 54 additions & 5 deletions tools/topology/topology2/platform/intel/sdw-dmic-generic.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# route and pipeline index start from pcm id * 10

Define {
SDW_DMIC_CAPTURE_PCM_NAME "Microphone"
SDW_DMIC_STREAM 'SDW3-Capture'
SDW_DMIC_BE_ID 4
SDW_DMIC_PASSTHROUGH "false"
}

Object.Dai.ALH [
Expand Down Expand Up @@ -77,6 +79,37 @@ Object.Widget {
]
}

IncludeByKey.SDW_DMIC_PASSTHROUGH {
"false" {

# FIXME: we force the instance to '1' to avoid a conflict with eqiir.11.0
# if we used the array notation.
Object.Widget.eqiir.1
{
num_input_audio_formats 1
num_output_audio_formats 1
index 41
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]

Object.Control.bytes."1" {
<include/components/eqiir/highpass_40hz_0db_48khz.conf>
name '$SDW_DMIC_CAPTURE_PCM_NAME Capture IIR Eq'
}
}
}
}

Object.PCM.pcm [
{
name "Microphone"
Expand All @@ -93,9 +126,25 @@ Object.PCM.pcm [
}
]

Object.Base.route [
{
source "alh-copier.$SDW_DMIC_STREAM.0"
sink "host-copier.4.capture"
IncludeByKey.SDW_DMIC_PASSTHROUGH {
"true" {
Object.Base.route [
{
source "alh-copier.$SDW_DMIC_STREAM.0"
sink "host-copier.4.capture"
}
]
}
]
"false" {
Object.Base.route [
{
source "alh-copier.$SDW_DMIC_STREAM.0"
sink "eqiir.41.1"
}
{
source "eqiir.41.1"
sink "host-copier.4.capture"
}
]
}
}

0 comments on commit 7357a04

Please sign in to comment.