From 84e75ee2695dd3ac19436555b64ca4a82ae024cc Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Wed, 12 Dec 2018 15:26:18 +0530 Subject: [PATCH] Revert "ASoC: Machine: ignore suspend for dai-links" This reverts commit 1114afa7e3d861631d0585d76ca54363f46361c3 (manual revert done to resolve conflicts) Earlier suspend was ignored for Android because of high suspend latency in snd_soc_suspend(), this was breaking system suspend KPIs. This alone was contributing to around 3 seconds of latency. One more reason to ignore suspend was, during Android playback or capture, device cannot go suspend because of acquired wake locks. There was an issue in ASoC core which is fixed now in upstream, which helps to reduce the suspend times. The same is available in downstream kernel and below is the commit. "ASoC: core: Don't schedule DAPM work if already in target state" With this patch suspend/Resume latency for ASoC in 3 trials are 7.362/0.091, 5.445/0.088 and 5.096/0.087 ms respectively. Bug 200390814 Change-Id: Iae3b4f19f34568585ed120460f173d4b234a3eb1 Signed-off-by: Sameer Pujar Reviewed-on: https://git-master.nvidia.com/r/1971226 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: Mohan Kumar D GVS: Gerrit_Virtual_Submit Reviewed-by: Ravindra Lokhande Reviewed-by: mobile promotions Tested-by: mobile promotions --- .../machine_drivers/tegra_machine_driver_mobile.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c index 26f41e11..106cee69 100644 --- a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c +++ b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c @@ -96,7 +96,6 @@ struct tegra_machine_soc_data { static int tegra_machine_driver_remove(struct platform_device *); static int tegra_machine_driver_probe(struct platform_device *); static void dai_link_setup(struct platform_device *); -static void ignore_suspend(struct snd_soc_card *); static int tegra_machine_sfc_init(struct snd_soc_pcm_runtime *); static int tegra_machine_rt565x_init(struct snd_soc_pcm_runtime *); @@ -993,14 +992,6 @@ static const struct of_device_id tegra_machine_of_match[] = { {}, }; -static void __maybe_unused ignore_suspend(struct snd_soc_card *card) -{ - struct snd_soc_pcm_runtime *rtd; - list_for_each_entry(rtd, &card->rtd_list, list) { - rtd->dai_link->ignore_suspend = true; - } -} - static int tegra_machine_driver_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; @@ -1097,10 +1088,6 @@ static int tegra_machine_driver_probe(struct platform_device *pdev) goto err_alloc_dai_link; } -#ifdef CONFIG_ANDROID - ignore_suspend(card); -#endif - tegra_machine_add_i2s_codec_controls(card, machine->soc_data->num_xbar_dai_links + machine->num_codec_links);