From fb6932c04ae568ac30096df3f8e94eab21c891ed Mon Sep 17 00:00:00 2001 From: Viraj Karandikar Date: Tue, 24 Feb 2015 16:06:02 +0530 Subject: [PATCH] asoc: tegra-alt: set higher adsp clock at start Actmon logic takes time to increase ADSP clock in case of sudden load. This causes initial glitches in audio. Request higher ADSP clock at stream start to avoid this. After initial boost, actmon controls ADSP frequency based on load. Higher ADSP clock is requested only when using ADSP speaker protection path. Bug 200077167 Change-Id: I8d2eae7f1c7e789a1d2012b2fd9b7cf27d6ac851 Signed-off-by: Viraj Karandikar Reviewed-on: http://git-master/r/710727 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Uday Gupta Reviewed-by: Puneet Saxena Reviewed-by: Sumit Bhattacharya --- sound/soc/tegra-alt/tegra210_adsp_alt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/tegra-alt/tegra210_adsp_alt.c b/sound/soc/tegra-alt/tegra210_adsp_alt.c index b8f7fa44..0dff9b85 100644 --- a/sound/soc/tegra-alt/tegra210_adsp_alt.c +++ b/sound/soc/tegra-alt/tegra210_adsp_alt.c @@ -1527,9 +1527,13 @@ static int tegra210_adsp_widget_event(struct snd_soc_dapm_widget *w, return 0; if (SND_SOC_DAPM_EVENT_ON(event)) { - if (IS_APM_IN(w->reg)) + if (IS_APM_IN(w->reg)) { + /* Request higher ADSP clock when starting stream. + * Actmon takes care of adjusting frequency later. */ + adsp_update_dfs(500000, 1); tegra210_adsp_send_state_msg(app, nvfx_state_active, TEGRA210_ADSP_MSG_FLAG_SEND); + } } else { if (IS_APM_IN(w->reg)) { tegra210_adsp_send_state_msg(app, nvfx_state_inactive,