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 <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/710727
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
This commit is contained in:
Viraj Karandikar
2015-02-24 16:06:02 +05:30
committed by Sameer Pujar
parent 32771bb391
commit fb6932c04a

View File

@@ -1527,9 +1527,13 @@ static int tegra210_adsp_widget_event(struct snd_soc_dapm_widget *w,
return 0; return 0;
if (SND_SOC_DAPM_EVENT_ON(event)) { 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_send_state_msg(app, nvfx_state_active,
TEGRA210_ADSP_MSG_FLAG_SEND); TEGRA210_ADSP_MSG_FLAG_SEND);
}
} else { } else {
if (IS_APM_IN(w->reg)) { if (IS_APM_IN(w->reg)) {
tegra210_adsp_send_state_msg(app, nvfx_state_inactive, tegra210_adsp_send_state_msg(app, nvfx_state_inactive,