diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2013-11-01 11:56:56 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-01 13:48:37 -0400 |
commit | b0101b4f14d591719f53f7f38ede3651113e6a53 (patch) | |
tree | d54c22ec623e124ebed7aa8d00eea261fd3674a3 /sound/soc/codecs/wm_adsp.c | |
parent | 562c5e6f52bc9ed48b8dc9cef97923b64bd843ec (diff) |
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/codecs/wm_adsp.c')
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 9 |
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, | |||
1361 | struct snd_soc_codec *codec = w->codec; | 1361 | struct snd_soc_codec *codec = w->codec; |
1362 | struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec); | 1362 | struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec); |
1363 | struct wm_adsp *dsp = &dsps[w->shift]; | 1363 | struct wm_adsp *dsp = &dsps[w->shift]; |
1364 | struct wm_adsp_alg_region *alg_region; | ||
1364 | struct wm_coeff_ctl *ctl; | 1365 | struct wm_coeff_ctl *ctl; |
1365 | int ret; | 1366 | int ret; |
1366 | int val; | 1367 | int val; |
@@ -1438,6 +1439,14 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w, | |||
1438 | 1439 | ||
1439 | list_for_each_entry(ctl, &dsp->ctl_list, list) | 1440 | list_for_each_entry(ctl, &dsp->ctl_list, list) |
1440 | ctl->enabled = 0; | 1441 | ctl->enabled = 0; |
1442 | |||
1443 | while (!list_empty(&dsp->alg_regions)) { | ||
1444 | alg_region = list_first_entry(&dsp->alg_regions, | ||
1445 | struct wm_adsp_alg_region, | ||
1446 | list); | ||
1447 | list_del(&alg_region->list); | ||
1448 | kfree(alg_region); | ||
1449 | } | ||
1441 | break; | 1450 | break; |
1442 | 1451 | ||
1443 | default: | 1452 | default: |