aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>2015-05-28 02:14:18 -0400
committerMark Brown <broonie@kernel.org>2015-05-28 15:27:00 -0400
commit01f202c7b4b40025f3ea4721c52e7f78545e3b07 (patch)
tree8732a6c7b99718003a482a69dbbd452c4fdfe785
parent506c148ee5e1bfb836116353305927ca4c21a23e (diff)
ASoC: Intel: fix broadwell module removing failed issue
In haswell-pcm module unloading, we can't free runtime modules directly, for they may be already freed in runtime suspend. Here add executing suspend call to unload runtime modules, only for status not equal to RPM_SUSPEND, to fix broadwell module removing failed issue. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/haswell/sst-haswell-pcm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c b/sound/soc/intel/haswell/sst-haswell-pcm.c
index 225c04c38e42..1557e37abe19 100644
--- a/sound/soc/intel/haswell/sst-haswell-pcm.c
+++ b/sound/soc/intel/haswell/sst-haswell-pcm.c
@@ -1103,8 +1103,10 @@ static int hsw_pcm_remove(struct snd_soc_platform *platform)
1103 snd_soc_platform_get_drvdata(platform); 1103 snd_soc_platform_get_drvdata(platform);
1104 int i; 1104 int i;
1105 1105
1106 /* execute a suspend call to unload all FW resources */
1107 if (!pm_runtime_status_suspended(platform->dev))
1108 pm_runtime_put_sync_suspend(platform->dev);
1106 pm_runtime_disable(platform->dev); 1109 pm_runtime_disable(platform->dev);
1107 hsw_pcm_free_modules(priv_data);
1108 1110
1109 for (i = 0; i < ARRAY_SIZE(hsw_dais); i++) { 1111 for (i = 0; i < ARRAY_SIZE(hsw_dais); i++) {
1110 if (hsw_dais[i].playback.channels_min) 1112 if (hsw_dais[i].playback.channels_min)