[Sound-open-firmware] [PATCH v3 1/2] host/dai: update pointer cast to support 64-bit library build
Ranjani Sridharan
ranjani.sridharan at linux.intel.com
Wed Jan 17 21:25:43 CET 2018
This patch updates the pointer cast in host/dai for library build
support for 64-bit arch
Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
src/audio/dai.c | 4 ++--
src/audio/host.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/audio/dai.c b/src/audio/dai.c
index b7ad1b4..f3c73b3 100644
--- a/src/audio/dai.c
+++ b/src/audio/dai.c
@@ -293,7 +293,7 @@ static int dai_playback_params(struct comp_dev *dev)
goto err_unwind;
elem->size = dd->period_bytes;
- elem->src = (uint32_t)(dma_buffer->r_ptr) +
+ elem->src = (uintptr_t)(dma_buffer->r_ptr) +
i * dd->period_bytes;
elem->dest = dai_fifo(dd->dai, SOF_IPC_STREAM_PLAYBACK);
@@ -360,7 +360,7 @@ static int dai_capture_params(struct comp_dev *dev)
goto err_unwind;
elem->size = dd->period_bytes;
- elem->dest = (uint32_t)(dma_buffer->w_ptr) +
+ elem->dest = (uintptr_t)(dma_buffer->w_ptr) +
i * dd->period_bytes;
elem->src = dai_fifo(dd->dai, SOF_IPC_STREAM_CAPTURE);
list_item_append(&elem->list, &config->elem_list);
diff --git a/src/audio/host.c b/src/audio/host.c
index 7cb62ef..67472e1 100644
--- a/src/audio/host.c
+++ b/src/audio/host.c
@@ -325,10 +325,10 @@ static int create_local_elems(struct comp_dev *dev)
goto unwind;
if (dev->params.direction == SOF_IPC_STREAM_PLAYBACK)
- e->dest = (uint32_t)(hd->dma_buffer->addr) +
+ e->dest = (uintptr_t)(hd->dma_buffer->addr) +
i * hd->period_bytes;
else
- e->src = (uint32_t)(hd->dma_buffer->addr) +
+ e->src = (uintptr_t)(hd->dma_buffer->addr) +
i * hd->period_bytes;
e->size = hd->period_bytes;
--
2.11.0
More information about the Sound-open-firmware
mailing list