mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
Revert "tegra-alt: adsp: add runtime suspend delay"
This reverts commit e88ffa5fc211e68b888027ede341e264717a57d6. If system is suspended before autosuspend time expires, runtime_suspend does not get called and ADSP does not get suspended. This breaks audio playback after resume due to incorrect state of ADSP after system resume. Originally autosuspend delay was added to avoid frequent OS suspend and resume. No functionality issues were/are seen even without autosuspend delay. So removing autosuspend delay to avoid this issue. Remove unnecessary debug print. Bug 200090996 Change-Id: I9bfb5056e74690cf29a56273a825705cbecc0ac1 Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com> Reviewed-on: http://git-master/r/731620 (cherry picked from commit 53d141ffa25c4e89625bfef8d299da452d8859a4) Reviewed-on: http://git-master/r/740606 Reviewed-on: http://git-master/r/750724 Tested-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
This commit is contained in:
committed by
Sameer Pujar
parent
8ccccf865d
commit
57d003c3ef
@@ -57,9 +57,6 @@
|
||||
/* Flag to enable/disable loading of ADSP firmware */
|
||||
#define ENABLE_ADSP 1
|
||||
|
||||
/* Suspend delay to avoid frequent ADSP suspend/resume */
|
||||
#define TEGRA210_ADSP_SUSPEND_DELAY (3000) /* ms */
|
||||
|
||||
static struct tegra210_adsp_app_desc {
|
||||
const char *name;
|
||||
const char *fw_name;
|
||||
@@ -1604,15 +1601,6 @@ static int tegra210_adsp_runtime_resume(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tegra210_adsp_runtime_idle(struct device *dev)
|
||||
{
|
||||
struct tegra210_adsp *adsp = dev_get_drvdata(dev);
|
||||
dev_dbg(adsp->dev, "%s\n", __func__);
|
||||
pm_runtime_mark_last_busy(adsp->dev);
|
||||
pm_runtime_autosuspend(adsp->dev);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ADSP platform driver read/write call-back */
|
||||
static int tegra210_adsp_read(struct snd_soc_component *component,
|
||||
unsigned int reg, unsigned int *val)
|
||||
@@ -1709,8 +1697,7 @@ static int tegra210_adsp_mux_put(struct snd_kcontrol *kcontrol,
|
||||
snd_soc_dapm_mux_update_power(dapm, kcontrol, val, e, NULL);
|
||||
|
||||
err_put:
|
||||
pm_runtime_mark_last_busy(adsp->dev);
|
||||
pm_runtime_put_autosuspend(adsp->dev);
|
||||
pm_runtime_put(adsp->dev);
|
||||
return ret ? ret : 1;
|
||||
}
|
||||
|
||||
@@ -1771,8 +1758,7 @@ static int tegra210_adsp_widget_event(struct snd_soc_dapm_widget *w,
|
||||
* Actmon takes care of adjusting frequency later. */
|
||||
pm_runtime_get_sync(adsp->dev);
|
||||
adsp_update_dfs(500000, 1);
|
||||
pm_runtime_mark_last_busy(adsp->dev);
|
||||
pm_runtime_put_autosuspend(adsp->dev);
|
||||
pm_runtime_put(adsp->dev);
|
||||
tegra210_adsp_send_state_msg(app, nvfx_state_active,
|
||||
TEGRA210_ADSP_MSG_FLAG_SEND);
|
||||
}
|
||||
@@ -2384,8 +2370,7 @@ static int tegra210_adsp_set_param(struct snd_kcontrol *kcontrol,
|
||||
pm_runtime_get_sync(adsp->dev);
|
||||
ret = tegra210_adsp_send_msg(app->apm, &apm_msg,
|
||||
TEGRA210_ADSP_MSG_FLAG_SEND);
|
||||
pm_runtime_mark_last_busy(adsp->dev);
|
||||
pm_runtime_put_autosuspend(adsp->dev);
|
||||
pm_runtime_put(adsp->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2414,8 +2399,6 @@ static int tegra210_adsp_apm_put(struct snd_kcontrol *kcontrol,
|
||||
apm_msg_t apm_msg;
|
||||
int ret = 0;
|
||||
|
||||
pr_info("%s : mc->reg %d\n", __func__, mc->reg);
|
||||
|
||||
if (!adsp->init_done) {
|
||||
dev_warn(adsp->dev, "ADSP is not booted yet\n");
|
||||
return 0;
|
||||
@@ -2435,8 +2418,7 @@ static int tegra210_adsp_apm_put(struct snd_kcontrol *kcontrol,
|
||||
pm_runtime_get_sync(adsp->dev);
|
||||
ret = tegra210_adsp_send_msg(app->apm, &apm_msg,
|
||||
TEGRA210_ADSP_MSG_FLAG_SEND);
|
||||
pm_runtime_mark_last_busy(adsp->dev);
|
||||
pm_runtime_put_autosuspend(adsp->dev);
|
||||
pm_runtime_put(adsp->dev);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -2574,10 +2556,6 @@ static int tegra210_adsp_audio_platform_probe(struct platform_device *pdev)
|
||||
pdev->dev.dma_mask = &tegra_dma_mask;
|
||||
pdev->dev.coherent_dma_mask = tegra_dma_mask;
|
||||
|
||||
/* Delay suspend to avoid frequent ADSP OS suspend-resume */
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev,
|
||||
TEGRA210_ADSP_SUSPEND_DELAY);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
if (!pm_runtime_enabled(&pdev->dev))
|
||||
goto err_pm_disable;
|
||||
@@ -2751,7 +2729,7 @@ static int tegra210_adsp_audio_platform_remove(struct platform_device *pdev)
|
||||
|
||||
static const struct dev_pm_ops tegra210_adsp_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_adsp_runtime_suspend,
|
||||
tegra210_adsp_runtime_resume, tegra210_adsp_runtime_idle)
|
||||
tegra210_adsp_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_adsp_audio_driver = {
|
||||
|
||||
Reference in New Issue
Block a user