Skip to content

Commit

Permalink
ASoC: intel: Revert "ASoC: Intel: remove unused function hsw_pcm_free…
Browse files Browse the repository at this point in the history
…_modules()"

This reverts commit 506c148.

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>
  • Loading branch information
Jie Yang authored and Mark Brown committed Jun 2, 2015
1 parent 6162682 commit a209d32
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sound/soc/intel/haswell/sst-haswell-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,21 @@ static int hsw_pcm_create_modules(struct hsw_priv_data *pdata)
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;
Expand Down

0 comments on commit a209d32

Please sign in to comment.