From 25d0f01d03f45d4d8594c66aa3dbe5275deed890 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Wed, 31 Oct 2018 10:25:38 -0700 Subject: [PATCH] dmic: fix mem alloc for dmic params The dmic params struct should be allocated in RZONE_RUNTIME instead of RZONE_SYS so that it can be freed. This fixes the DSP panic caused while it is freed after setting the DMIC config. Signed-off-by: Ranjani Sridharan --- src/drivers/intel/cavs/dmic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/intel/cavs/dmic.c b/src/drivers/intel/cavs/dmic.c index 34ad33344f89..ab90705096da 100644 --- a/src/drivers/intel/cavs/dmic.c +++ b/src/drivers/intel/cavs/dmic.c @@ -1118,7 +1118,7 @@ static int dmic_set_config(struct dai *dai, struct sof_ipc_dai_config *config) */ size = sizeof(*prm) + DMIC_HW_CONTROLLERS * sizeof(struct sof_ipc_dai_dmic_pdm_ctrl); - prm = rzalloc(RZONE_SYS, SOF_MEM_CAPS_RAM, size); + prm = rzalloc(RZONE_RUNTIME, SOF_MEM_CAPS_RAM, size); if (!prm) { trace_dmic_error("eac"); return -ENOMEM;