aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/sof_rt5682.c
diff options
context:
space:
mode:
authorDharageswari R <dharageswari.r@intel.com>2020-06-25 14:12:58 -0500
committerMark Brown <broonie@kernel.org>2020-06-26 13:35:17 +0100
commit94d2d08974746bd0f469ec5c1e50c613de558bfc (patch)
tree02606f35c6222ea7e1d2bd01ab73ed3c85e7c248 /sound/soc/intel/boards/sof_rt5682.c
parentASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log (diff)
downloadlinux-dev-94d2d08974746bd0f469ec5c1e50c613de558bfc.tar.xz
linux-dev-94d2d08974746bd0f469ec5c1e50c613de558bfc.zip
ASoC: Intel: Boards: tgl_max98373: add dai_trigger function
Speaker amplifier feedback is not modeled as being dependent on any active output. Even when there is no playback happening, parts of the graph, specifically the IV sense->speaker protection->output remains active and this prevents the DSP from entering low-power states. This patch suggests a machine driver level approach where the speaker pins are enabled/disabled dynamically depending on stream start/stop events. DPAM graph representations show the feedback loop is indeed disabled and low-power states can be reached. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200625191308.3322-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/sof_rt5682.c')
-rw-r--r--sound/soc/intel/boards/sof_rt5682.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index f80ed62025f3..20ab2664f7c8 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -318,6 +318,7 @@ static int sof_card_late_probe(struct snd_soc_card *card)
{
struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
struct snd_soc_component *component = NULL;
+ struct snd_soc_dapm_context *dapm = &card->dapm;
char jack_name[NAME_SIZE];
struct sof_hdmi_pcm *pcm;
int err;
@@ -356,6 +357,14 @@ static int sof_card_late_probe(struct snd_soc_card *card)
i++;
}
+ if (sof_rt5682_quirk & SOF_MAX98373_SPEAKER_AMP_PRESENT) {
+ /* 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 hdac_hdmi_jack_port_init(component, &card->dapm);
}