Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4314a0f1 authored by Shashi Kant Maurya's avatar Shashi Kant Maurya
Browse files

asoc: wcd-cpe: Set the dma_mask for cpe_device



Memory allocation for wcd-cpe ramdump fails as memory is
not allocated from CMA reserve leading to CPE configuration
failure.
So force driver to allocate memory from CMA by
initializing the device’s coherent_dma_mask and dma_mask.

Fixes the SVA CPE sound model loading issue on tashalite variants.

Change-Id: Ic47017009aee666e364c7ec3ac62725c77a36b3c
Signed-off-by: default avatarShashi Kant Maurya <smaury@codeaurora.org>
parent ffe853a8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -116,6 +116,8 @@ struct wcd_cpe_attribute {
			 ssize_t count);
};

static u64 wcd_cpe_dma_mask = DMA_BIT_MASK(32);

#define WCD_CPE_ATTR(_name, _mode, _show, _store) \
static struct wcd_cpe_attribute cpe_attr_##_name = { \
	.attr = {.name = __stringify(_name), .mode = _mode}, \
@@ -2034,6 +2036,8 @@ struct wcd_cpe_core *wcd_cpe_init(const char *img_fname,
			__func__);
		goto schedule_dload_work;
	}
	core->dev->coherent_dma_mask = DMA_BIT_MASK(32);
	core->dev->dma_mask = &wcd_cpe_dma_mask;

	arch_setup_dma_ops(core->dev, 0, 0, NULL, 0);
	core->cpe_dump_v_addr = dma_alloc_coherent(core->dev,