summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Lu <brent.lu@intel.com>2024-05-27 14:35:52 -0500
committerMark Brown <broonie@kernel.org>2024-05-29 11:10:59 +0100
commit1085350387056812d19abaf20c59674ce36f0b8c (patch)
tree7a87aa3aa9f7697be4b44fa8a1561e1dc8bdbe62
parent660f029afe9bc4217e600f5616c66b855615b666 (diff)
ASoC: Intel: sof_da7219: disable max98373 speaker pins in late_probe
Commit 94d2d0897474 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function") disables speaker pins in late_probe to allow DSP to enter low power state. Add same code to sof_da7219 driver. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240527193552.165567-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/boards/sof_da7219.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/sof_da7219.c b/sound/soc/intel/boards/sof_da7219.c
index 0e3c352a1672..fa1f7d2d8278 100644
--- a/sound/soc/intel/boards/sof_da7219.c
+++ b/sound/soc/intel/boards/sof_da7219.c
@@ -180,6 +180,19 @@ static void da7219_codec_exit(struct snd_soc_pcm_runtime *rtd)
static int card_late_probe(struct snd_soc_card *card)
{
+ struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
+ struct snd_soc_dapm_context *dapm = &card->dapm;
+ int err;
+
+ if (ctx->amp_type == CODEC_MAX98373) {
+ /* Disable Left and Right Spk pin after boot */
+ snd_soc_dapm_disable_pin(dapm, "Left Spk");
+ snd_soc_dapm_disable_pin(dapm, "Right Spk");
+ err = snd_soc_dapm_sync(dapm);
+ if (err < 0)
+ return err;
+ }
+
return sof_intel_board_card_late_probe(card);
}