aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/haswell/sst-haswell-pcm.c
diff options
context:
space:
mode:
authorJie Yang <yang.jie@intel.com>2015-05-30 22:33:56 +0800
committerMark Brown <broonie@kernel.org>2015-06-02 15:34:00 +0100
commita209d322dc803d2bb0c92fe1d0c703ddabae6f28 (patch)
treea0247de80af7330824cf7ef77f1d63bc9a4b58a5 /sound/soc/intel/haswell/sst-haswell-pcm.c
parentASoC: Intel: don't need compress offload for broadwell (diff)
downloadlinux-dev-a209d322dc803d2bb0c92fe1d0c703ddabae6f28.tar.xz
linux-dev-a209d322dc803d2bb0c92fe1d0c703ddabae6f28.zip
ASoC: intel: Revert "ASoC: Intel: remove unused function hsw_pcm_free_modules()"
This reverts commit 506c148ee5e1bfb836116353305927ca4c21a23e. We still need this hsw_pcm_free_modules(), we plan to remove the runtime modules at both fw_unload(D0->D3) and snd_soc_sst_haswell_pcm module removing. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/haswell/sst-haswell-pcm.c')
-rw-r--r--sound/soc/intel/haswell/sst-haswell-pcm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c b/sound/soc/intel/haswell/sst-haswell-pcm.c
index 1557e37abe19..bd96629e0941 100644
--- a/sound/soc/intel/haswell/sst-haswell-pcm.c
+++ b/sound/soc/intel/haswell/sst-haswell-pcm.c
@@ -920,6 +920,21 @@ err:
return -ENODEV;
}
+static void hsw_pcm_free_modules(struct hsw_priv_data *pdata)
+{
+ struct sst_hsw *hsw = pdata->hsw;
+ struct hsw_pcm_data *pcm_data;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(mod_map); i++) {
+ pcm_data = &pdata->pcm[mod_map[i].dai_id][mod_map[i].stream];
+ sst_hsw_runtime_module_free(pcm_data->runtime);
+ }
+ if (sst_hsw_is_module_loaded(hsw, SST_HSW_MODULE_WAVES)) {
+ sst_hsw_runtime_module_free(pdata->runtime_waves);
+ }
+}
+
static int hsw_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
struct snd_pcm *pcm = rtd->pcm;