summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2013-11-01 15:56:56 +0000
committerMark Brown <broonie@linaro.org>2013-11-01 10:48:37 -0700
commitb0101b4f14d591719f53f7f38ede3651113e6a53 (patch)
treed54c22ec623e124ebed7aa8d00eea261fd3674a3 /sound/soc
parent562c5e6f52bc9ed48b8dc9cef97923b64bd843ec (diff)
downloadblackbird-op-linux-b0101b4f14d591719f53f7f38ede3651113e6a53.tar.gz
blackbird-op-linux-b0101b4f14d591719f53f7f38ede3651113e6a53.zip
ASoC: wm_adsp: Remove and free algorithm regions for ADSP1
Do it in a similar fashion as we do for ADSP2. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm_adsp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 1f1fc0dd716e..cc3575b5783f 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -1361,6 +1361,7 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
struct snd_soc_codec *codec = w->codec;
struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec);
struct wm_adsp *dsp = &dsps[w->shift];
+ struct wm_adsp_alg_region *alg_region;
struct wm_coeff_ctl *ctl;
int ret;
int val;
@@ -1438,6 +1439,14 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
list_for_each_entry(ctl, &dsp->ctl_list, list)
ctl->enabled = 0;
+
+ while (!list_empty(&dsp->alg_regions)) {
+ alg_region = list_first_entry(&dsp->alg_regions,
+ struct wm_adsp_alg_region,
+ list);
+ list_del(&alg_region->list);
+ kfree(alg_region);
+ }
break;
default:
OpenPOWER on IntegriCloud