Skip to content

Commit

Permalink
dmic: fix mem alloc for dmic params
Browse files Browse the repository at this point in the history
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 <ranjani.sridharan@linux.intel.com>
  • Loading branch information
ranj063 committed Oct 31, 2018
1 parent 66bd59b commit 25d0f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/intel/cavs/dmic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 25d0f01

Please sign in to comment.