Skip to content

Commit 352e1eb

Browse files
LongWang100broonie
authored andcommitted
ASoC: max98373: change power down sequence for smart amp
In order to avoid pop noise which occurs when switching device from speaker to headphone, the amplifier should power down first when stopping playback. Signed-off-by: Long Wang <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Rander Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 0b186bb commit 352e1eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/codecs/max98373.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static int max98373_dac_event(struct snd_soc_dapm_widget *w,
3131
MAX98373_GLOBAL_EN_MASK, 1);
3232
usleep_range(30000, 31000);
3333
break;
34-
case SND_SOC_DAPM_POST_PMD:
34+
case SND_SOC_DAPM_PRE_PMD:
3535
regmap_update_bits(max98373->regmap,
3636
MAX98373_R20FF_GLOBAL_SHDN,
3737
MAX98373_GLOBAL_EN_MASK, 0);
@@ -64,7 +64,7 @@ static const struct snd_kcontrol_new max98373_spkfb_control =
6464
static const struct snd_soc_dapm_widget max98373_dapm_widgets[] = {
6565
SND_SOC_DAPM_DAC_E("Amp Enable", "HiFi Playback",
6666
MAX98373_R202B_PCM_RX_EN, 0, 0, max98373_dac_event,
67-
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
67+
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
6868
SND_SOC_DAPM_MUX("DAI Sel Mux", SND_SOC_NOPM, 0, 0,
6969
&max98373_dai_controls),
7070
SND_SOC_DAPM_OUTPUT("BE_OUT"),

0 commit comments

Comments
 (0)