From 63bb55cf62e40d83690e25707bcb5e9d87ea5ef4 Mon Sep 17 00:00:00 2001 From: Uday Gupta Date: Fri, 6 Mar 2015 10:55:30 -0800 Subject: [PATCH] ASoC: tegra-alt: ADSP plugin removal/addition fix With multiple APM's present, plugin addition or removal does not work. Fix it by checking only for ADSP_APP when trying to find the APM of which the plugin is part of. Bug 1605750 Change-Id: I457b04a5f1ead9ac682f734b0d145f5250c411a9 Signed-off-by: Uday Gupta Reviewed-on: http://git-master/r/714834 Reviewed-by: Omar Nemri Tested-by: Omar Nemri Reviewed-by: Stephen Holmes Reviewed-by: Arun Shamanna Lakshmi Tested-by: Arun Shamanna Lakshmi --- sound/soc/tegra-alt/tegra210_adsp_alt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/tegra-alt/tegra210_adsp_alt.c b/sound/soc/tegra-alt/tegra210_adsp_alt.c index 3f25ab6a..7b0d5c44 100644 --- a/sound/soc/tegra-alt/tegra210_adsp_alt.c +++ b/sound/soc/tegra-alt/tegra210_adsp_alt.c @@ -757,7 +757,7 @@ static int tegra210_adsp_remove_connection(struct tegra210_adsp *adsp, struct tegra210_adsp_app *plugin) { struct tegra210_adsp_app *app; - uint32_t i, source, apm_out = 0; + uint32_t i, source, apm_out = TEGRA210_ADSP_NONE; if (!IS_ADSP_APP(plugin->reg)) return 0; @@ -767,7 +767,7 @@ static int tegra210_adsp_remove_connection(struct tegra210_adsp *adsp, /* if the path is already broken, do not continue */ if (!app->connect) continue; - while (app->reg != TEGRA210_ADSP_NONE) { + while (IS_ADSP_APP(app->reg)) { if (app->reg == plugin->reg) { apm_out = i; break;