Skip to content

Commit

Permalink
ASoC: Intel: fix broadwell module removing failed issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liam Girdwood authored and Mark Brown committed May 28, 2015
1 parent 506c148 commit 01f202c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/intel/haswell/sst-haswell-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,8 +1103,10 @@ static int hsw_pcm_remove(struct snd_soc_platform *platform)
snd_soc_platform_get_drvdata(platform);
int i;

/* execute a suspend call to unload all FW resources */
if (!pm_runtime_status_suspended(platform->dev))
pm_runtime_put_sync_suspend(platform->dev);
pm_runtime_disable(platform->dev);
hsw_pcm_free_modules(priv_data);

for (i = 0; i < ARRAY_SIZE(hsw_dais); i++) {
if (hsw_dais[i].playback.channels_min)
Expand Down

0 comments on commit 01f202c

Please sign in to comment.