ASoC: msm: qdsp6v2: Cleanup of compress offload drivers
Clean up the format specifiers for compress offload drivers and add compat ioctl support Change-Id: I0829830336ec62c66658d6a5199d73b61249f791 Signed-off-by: Damir Didjusto <damird@codeaurora.org> Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
This commit is contained in:
parent
c58f710d7d
commit
583170e962
1 changed files with 13 additions and 12 deletions
|
@ -244,8 +244,8 @@ static int snd_compr_write_data(struct snd_compr_stream *stream,
|
|||
(app_pointer * runtime->buffer_size);
|
||||
|
||||
dstn = runtime->buffer + app_pointer;
|
||||
pr_debug("copying %ld at %lld\n",
|
||||
(unsigned long)count, app_pointer);
|
||||
pr_debug("copying %zu at %lld\n",
|
||||
count, app_pointer);
|
||||
if (count < runtime->buffer_size - app_pointer) {
|
||||
if (copy_from_user(dstn, buf, count))
|
||||
return -EFAULT;
|
||||
|
@ -283,7 +283,7 @@ static ssize_t snd_compr_write(struct file *f, const char __user *buf,
|
|||
}
|
||||
|
||||
avail = snd_compr_get_avail(stream);
|
||||
pr_debug("avail returned %ld\n", (unsigned long)avail);
|
||||
pr_debug("avail returned %zu\n", avail);
|
||||
/* calculate how much we can write to buffer */
|
||||
if (avail > count)
|
||||
avail = count;
|
||||
|
@ -338,7 +338,7 @@ static ssize_t snd_compr_read(struct file *f, char __user *buf,
|
|||
}
|
||||
|
||||
avail = snd_compr_get_avail(stream);
|
||||
pr_debug("avail returned %ld\n", (unsigned long)avail);
|
||||
pr_debug("avail returned %zu\n", avail);
|
||||
/* calculate how much we can read from buffer */
|
||||
if (avail > count)
|
||||
avail = count;
|
||||
|
@ -391,7 +391,7 @@ static unsigned int snd_compr_poll(struct file *f, poll_table *wait)
|
|||
poll_wait(f, &stream->runtime->sleep, wait);
|
||||
|
||||
avail = snd_compr_get_avail(stream);
|
||||
pr_debug("avail is %ld\n", (unsigned long)avail);
|
||||
pr_debug("avail is %zu\n", avail);
|
||||
/* check if we have at least one fragment to fill */
|
||||
switch (stream->runtime->state) {
|
||||
case SNDRV_PCM_STATE_DRAINING:
|
||||
|
@ -862,14 +862,15 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
|
|||
}
|
||||
|
||||
static const struct file_operations snd_compr_file_ops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = snd_compr_open,
|
||||
.release = snd_compr_free,
|
||||
.write = snd_compr_write,
|
||||
.read = snd_compr_read,
|
||||
.owner = THIS_MODULE,
|
||||
.open = snd_compr_open,
|
||||
.release = snd_compr_free,
|
||||
.write = snd_compr_write,
|
||||
.read = snd_compr_read,
|
||||
.unlocked_ioctl = snd_compr_ioctl,
|
||||
.mmap = snd_compr_mmap,
|
||||
.poll = snd_compr_poll,
|
||||
.compat_ioctl = snd_compr_ioctl,
|
||||
.mmap = snd_compr_mmap,
|
||||
.poll = snd_compr_poll,
|
||||
};
|
||||
|
||||
static int snd_compress_dev_register(struct snd_device *device)
|
||||
|
|
Loading…
Add table
Reference in a new issue