ASoC: tegra-alt: remove redundant system sleep APIs

Late system sleep callbacks just invoke runtime PM calls if the device
is not in the desired state. There is no need to have separate APIs for
this, instead it can directly rely on pm_runtime_force_suspend/resume()
APIs to achieve similar behavior.

Another reason for this patch is, currently ACONNECT driver is using
pm_runtime_force_*() to indirectly invoke runtime PM callbacks. Runtime
suspend of ACONNECT fails complaining that there is an active child.
Though all XBAR devices are runtime suspended, the runtime PM state of
the corresponding device does not reflect it. Hence there is an error
in __pm_runtime_set_status() for ACONNECT. This is seen when the audio
playback is active and system tries to enter suspend. On system resume,
audio fails to resume playback and kernel panic is seen. Hence current
patch moves to pm_runtime_force_*() calls for system sleep for all XBAR
devices.

Bug 200509219
Bug 200503387

Change-Id: I5d531b0aa1a347686f7cca21fc40fe926b34f3a5
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2093331
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sameer Pujar
2019-04-09 16:03:20 +05:30
parent 28684681fa
commit 2c39ffad8a
18 changed files with 38 additions and 330 deletions

View File

@@ -124,24 +124,6 @@ static int tegra186_dspk_runtime_resume(struct device *dev)
return 0;
}
#ifdef CONFIG_PM_SLEEP
static int tegra186_dspk_suspend(struct device *dev)
{
if (pm_runtime_status_suspended(dev))
return 0;
return tegra186_dspk_runtime_suspend(dev);
}
static int tegra186_dspk_resume(struct device *dev)
{
if (pm_runtime_status_suspended(dev))
return 0;
return tegra186_dspk_runtime_resume(dev);
}
#endif
static int tegra186_dspk_set_audio_cif(struct tegra186_dspk *dspk,
struct snd_pcm_hw_params *params,
unsigned int reg, struct snd_soc_dai *dai)
@@ -656,8 +638,8 @@ static int tegra186_dspk_platform_remove(struct platform_device *pdev)
static const struct dev_pm_ops tegra186_dspk_pm_ops = {
SET_RUNTIME_PM_OPS(tegra186_dspk_runtime_suspend,
tegra186_dspk_runtime_resume, NULL)
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra186_dspk_suspend,
tegra186_dspk_resume)
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
pm_runtime_force_resume)
};
static struct platform_driver tegra186_dspk_driver = {