diff options
-rw-r--r-- | include/sound/compress_driver.h | 2 | ||||
-rw-r--r-- | sound/core/compress_offload.c | 8 | ||||
-rw-r--r-- | sound/soc/soc-compress.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index ff6c74153fa1..db8273a5175a 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h | |||
@@ -121,7 +121,7 @@ struct snd_compr_ops { | |||
121 | int (*trigger)(struct snd_compr_stream *stream, int cmd); | 121 | int (*trigger)(struct snd_compr_stream *stream, int cmd); |
122 | int (*pointer)(struct snd_compr_stream *stream, | 122 | int (*pointer)(struct snd_compr_stream *stream, |
123 | struct snd_compr_tstamp *tstamp); | 123 | struct snd_compr_tstamp *tstamp); |
124 | int (*copy)(struct snd_compr_stream *stream, const char __user *buf, | 124 | int (*copy)(struct snd_compr_stream *stream, char __user *buf, |
125 | size_t count); | 125 | size_t count); |
126 | int (*mmap)(struct snd_compr_stream *stream, | 126 | int (*mmap)(struct snd_compr_stream *stream, |
127 | struct vm_area_struct *vma); | 127 | struct vm_area_struct *vma); |
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 1f69863a83d2..52ca4cce1462 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c | |||
@@ -272,10 +272,12 @@ static ssize_t snd_compr_write(struct file *f, const char __user *buf, | |||
272 | if (avail > count) | 272 | if (avail > count) |
273 | avail = count; | 273 | avail = count; |
274 | 274 | ||
275 | if (stream->ops->copy) | 275 | if (stream->ops->copy) { |
276 | retval = stream->ops->copy(stream, buf, avail); | 276 | char __user* cbuf = (char __user*)buf; |
277 | else | 277 | retval = stream->ops->copy(stream, cbuf, avail); |
278 | } else { | ||
278 | retval = snd_compr_write_data(stream, buf, avail); | 279 | retval = snd_compr_write_data(stream, buf, avail); |
280 | } | ||
279 | if (retval > 0) | 281 | if (retval > 0) |
280 | stream->runtime->total_bytes_available += retval; | 282 | stream->runtime->total_bytes_available += retval; |
281 | 283 | ||
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index 29093a306ea2..da83e5658f62 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c | |||
@@ -315,7 +315,7 @@ static int soc_compr_pointer(struct snd_compr_stream *cstream, | |||
315 | } | 315 | } |
316 | 316 | ||
317 | static int soc_compr_copy(struct snd_compr_stream *cstream, | 317 | static int soc_compr_copy(struct snd_compr_stream *cstream, |
318 | const char __user *buf, size_t count) | 318 | char __user *buf, size_t count) |
319 | { | 319 | { |
320 | struct snd_soc_pcm_runtime *rtd = cstream->private_data; | 320 | struct snd_soc_pcm_runtime *rtd = cstream->private_data; |
321 | struct snd_soc_platform *platform = rtd->platform; | 321 | struct snd_soc_platform *platform = rtd->platform; |