summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRavindra Lokhande <rlokhande@nvidia.com>2014-04-09 15:21:10 +0530
committerMandar Padmawar <mpadmawar@nvidia.com>2014-04-28 04:45:31 -0700
commit9886fce8ce56b4298e33259ef92b3f3d116cae5e (patch)
tree7887e9e8869d02ceffe1e75e3a6d8159aec0bbb8 /sound
parent6c2a151e545412a8817af4295cfcee2ddca4efaa (diff)
ASoC: Tegra: fix offload for 64bit platform
Bug 1501400 Change-Id: I50d43d6d042b40475a0594e90495baee63c19c7c Signed-off-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-on: http://git-master/r/399786 GVS: Gerrit_Virtual_Submit Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra30_avp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sound/soc/tegra/tegra30_avp.c b/sound/soc/tegra/tegra30_avp.c
index 58a4cc370186..e15b66bcff24 100644
--- a/sound/soc/tegra/tegra30_avp.c
+++ b/sound/soc/tegra/tegra30_avp.c
@@ -800,7 +800,8 @@ static int tegra30_avp_pcm_set_params(int id,
avp_stream->notify_cb = params->period_elapsed_cb;
avp_stream->notify_args = params->period_elapsed_args;
- stream->source_buffer_system = params->source_buf.virt_addr;
+ stream->source_buffer_system =
+ (uintptr_t) (params->source_buf.virt_addr);
stream->source_buffer_avp = params->source_buf.phys_addr;
stream->source_buffer_size = params->buffer_size;
@@ -1015,7 +1016,8 @@ static int tegra30_avp_compr_set_params(int id,
return ret;
}
- stream->source_buffer_system = avp_stream->source_buf.virt_addr;
+ stream->source_buffer_system =
+ (uintptr_t) avp_stream->source_buf.virt_addr;
stream->source_buffer_avp = avp_stream->source_buf.phys_addr;
if (stream->source_buffer_size > AVP_COMPR_THRESHOLD) {
@@ -1100,7 +1102,7 @@ static int tegra30_avp_compr_write(int id, char __user *buf, int bytes)
struct tegra30_avp_audio *audio_avp = avp_audio_ctx;
struct tegra30_avp_stream *avp_stream = &audio_avp->avp_stream[id];
struct stream_data *stream = avp_stream->stream;
- void *dst = stream->source_buffer_system +
+ void *dst = (char *)(uintptr_t)stream->source_buffer_system +
stream->source_buffer_write_position;
int avail = 0;
int write = 0;
@@ -1138,8 +1140,8 @@ static int tegra30_avp_compr_write(int id, char __user *buf, int bytes)
return -EFAULT;
}
- ret = copy_from_user(stream->source_buffer_system, buf + write,
- bytes - write);
+ ret = copy_from_user((void *)(uintptr_t)stream->source_buffer_system,
+ buf + write, bytes - write);
if (ret < 0) {
dev_err(audio_avp->dev, "Failed to copy user data.");
return -EFAULT;