tegra-alt:adsp: Allow "Min ADSP Clock" ctl always

"Min ADSP Clock" for the APM is set at the widget ON event, which
sometimes occurs immediately on closing the APM connections (like for
SPKPROT); allowing "Min ADSP Clock" setting only if APM is initialized
causes this to be missed at times

Allowing to set "Min ADSP Clock" before APM is initialized will ensure
that it's always available at the subsequent widget event

Bug 200170455

Change-Id: I5500484f42a23abb290431a8e329e57e741a0e14
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: http://git-master/r/1027039
(cherry picked from commit a3ceb08c60ecb398a192dc607c1587b797ca79b7)
Reviewed-on: http://git-master/r/1029374
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
This commit is contained in:
Viswanath L
2016-03-09 13:01:40 +05:30
committed by Sameer Pujar
parent 6c30a39444
commit 93b24a451e

View File

@@ -2722,6 +2722,13 @@ static int tegra210_adsp_apm_put(struct snd_kcontrol *kcontrol,
return -EPERM;
}
/* Controls here may execute whether or not APM is initialized */
if (strstr(kcontrol->id.name, "Min ADSP Clock")) {
app->min_adsp_clock = ucontrol->value.integer.value[0];
return 0;
}
/* Check for APM initialized */
if (!app->plugin) {
dev_warn(adsp->dev, "Unable to set %s, APM %d not initialized\n",
kcontrol->id.name, mc->reg);
@@ -2736,8 +2743,6 @@ static int tegra210_adsp_apm_put(struct snd_kcontrol *kcontrol,
ucontrol->value.integer.value[0];
app->priority = ucontrol->value.integer.value[0];
send_msg = true;
} else if (strstr(kcontrol->id.name, "Min ADSP Clock")) {
app->min_adsp_clock = ucontrol->value.integer.value[0];
} else if (strstr(kcontrol->id.name, "Input Mode")) {
apm_msg.msgq_msg.size =
MSGQ_MSG_WSIZE(apm_set_input_mode_params_t);