diff options
| -rw-r--r-- | sound/soc/intel/sst-haswell-pcm.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c index 6c6229ae4a02..31ffc0f0498f 100644 --- a/sound/soc/intel/sst-haswell-pcm.c +++ b/sound/soc/intel/sst-haswell-pcm.c | |||
| @@ -137,6 +137,7 @@ struct hsw_priv_data { | |||
| 137 | struct device *dev; | 137 | struct device *dev; |
| 138 | enum hsw_pm_state pm_state; | 138 | enum hsw_pm_state pm_state; |
| 139 | struct snd_soc_card *soc_card; | 139 | struct snd_soc_card *soc_card; |
| 140 | struct sst_module_runtime *runtime_waves; /* sound effect module */ | ||
| 140 | 141 | ||
| 141 | /* page tables */ | 142 | /* page tables */ |
| 142 | struct snd_dma_buffer dmab[HSW_PCM_COUNT][2]; | 143 | struct snd_dma_buffer dmab[HSW_PCM_COUNT][2]; |
| @@ -902,13 +903,10 @@ static int hsw_pcm_create_modules(struct hsw_priv_data *pdata) | |||
| 902 | 903 | ||
| 903 | /* create runtime blocks for module waves */ | 904 | /* create runtime blocks for module waves */ |
| 904 | if (sst_hsw_is_module_loaded(hsw, SST_HSW_MODULE_WAVES)) { | 905 | if (sst_hsw_is_module_loaded(hsw, SST_HSW_MODULE_WAVES)) { |
| 905 | pcm_data = &pdata->pcm[HSW_PCM_COUNT-1][0]; | 906 | pdata->runtime_waves = sst_hsw_runtime_module_create(hsw, |
| 906 | pcm_data->runtime = sst_hsw_runtime_module_create(hsw, | 907 | SST_HSW_MODULE_WAVES, 0); |
| 907 | SST_HSW_MODULE_WAVES, pcm_data->persistent_offset); | 908 | if (pdata->runtime_waves == NULL) |
| 908 | if (pcm_data->runtime == NULL) | ||
| 909 | goto err; | 909 | goto err; |
| 910 | pcm_data->persistent_offset = | ||
| 911 | pcm_data->runtime->persistent_offset; | ||
| 912 | } | 910 | } |
| 913 | 911 | ||
| 914 | return 0; | 912 | return 0; |
| @@ -933,8 +931,7 @@ static void hsw_pcm_free_modules(struct hsw_priv_data *pdata) | |||
| 933 | sst_hsw_runtime_module_free(pcm_data->runtime); | 931 | sst_hsw_runtime_module_free(pcm_data->runtime); |
| 934 | } | 932 | } |
| 935 | if (sst_hsw_is_module_loaded(hsw, SST_HSW_MODULE_WAVES)) { | 933 | if (sst_hsw_is_module_loaded(hsw, SST_HSW_MODULE_WAVES)) { |
| 936 | pcm_data = &pdata->pcm[HSW_PCM_COUNT-1][0]; | 934 | sst_hsw_runtime_module_free(pdata->runtime_waves); |
| 937 | sst_hsw_runtime_module_free(pcm_data->runtime); | ||
| 938 | } | 935 | } |
| 939 | } | 936 | } |
| 940 | 937 | ||
