]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASOC: max98090/91: fix for filter configuration: AHPF removed DMIC2_HPF added
authorSharique Mohammad <sharq0406@gmail.com>
Thu, 16 Oct 2025 15:11:52 +0000 (17:11 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 20 Oct 2025 01:39:16 +0000 (02:39 +0100)
The filter configuration register(0x26) has AHPF(bit6) for primary record
path, which is common in max98090 and max98091 and has been defined as
DAPM suppy widget as "AHPF" in
"struct snd_soc_dapm_widget max98090_dapm_widget[]".
It is the DC-Blocking filter for the primary record path.
But the same functionality for secondary record path in the configuration
register(0x26) is DMIC2_HPF(bit2). It is not present as a DAPM supply
widget in the current code. With this patch adding it as a DAPM supply
widget. In the current code, the mics on secondary record path in
code are named as "DMIC3" and "DMIC4", so accordingly naming
DMIC2_HPF(bit2) as "DMIC34_HPF", and declaring it as a DAPM supply
widget in "struct snd_soc_dapm_widget max98091_dapm_widget[]". Also it
is specific to max98091, and should be visible or working only when
max98091 codec chip is used. Therefore, written in
"max98091_dapm_widget[]". As "AHPF" is not part
of secondary record path, replacing it with "DMIC34_HPF" in the
ALSA routes to "DMIC3" and "DMIC4" in "max98091_dapm_routes[]".

Signed-off-by: Sharique Mohammad <sharq0406@gmail.com>
Link: https://patch.msgid.link/20251016151152.1107083-1-sharq0406@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98090.c

index cb1508fc99f8994f4a91b889fcb165ad731af7dc..5aff5a459a433f54c0c0622bcd29b48e51b7c73e 100644 (file)
@@ -1239,6 +1239,8 @@ static const struct snd_soc_dapm_widget max98091_dapm_widgets[] = {
        SND_SOC_DAPM_SUPPLY("DMIC4_ENA", M98090_REG_DIGITAL_MIC_ENABLE,
                 M98090_DIGMIC4_SHIFT, 0, max98090_shdn_event,
                         SND_SOC_DAPM_POST_PMU),
+       SND_SOC_DAPM_SUPPLY("DMIC34_HPF", M98090_REG_FILTER_CONFIG,
+               M98090_FLT_DMIC34HPF_SHIFT, 0, NULL, 0),
 };
 
 static const struct snd_soc_dapm_route max98090_dapm_routes[] = {
@@ -1427,8 +1429,8 @@ static const struct snd_soc_dapm_route max98091_dapm_routes[] = {
        /* DMIC inputs */
        {"DMIC3", NULL, "DMIC3_ENA"},
        {"DMIC4", NULL, "DMIC4_ENA"},
-       {"DMIC3", NULL, "AHPF"},
-       {"DMIC4", NULL, "AHPF"},
+       {"DMIC3", NULL, "DMIC34_HPF"},
+       {"DMIC4", NULL, "DMIC34_HPF"},
 };
 
 static int max98090_add_widgets(struct snd_soc_component *component)