mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
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> Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
parent
a70116e190
commit
6030d318e2
1 changed files with 17 additions and 0 deletions
|
|
@ -265,8 +265,13 @@ static int snd_compr_write_data(struct snd_compr_stream *stream,
|
|||
(app_pointer * runtime->buffer_size);
|
||||
|
||||
dstn = runtime->buffer + app_pointer;
|
||||
#ifdef CONFIG_AUDIO_QGKI
|
||||
pr_debug("copying %zu at %lld\n",
|
||||
count, app_pointer);
|
||||
#else
|
||||
pr_debug("copying %ld at %lld\n",
|
||||
(unsigned long)count, app_pointer);
|
||||
#endif
|
||||
if (count < runtime->buffer_size - app_pointer) {
|
||||
if (copy_from_user(dstn, buf, count))
|
||||
return -EFAULT;
|
||||
|
|
@ -308,7 +313,11 @@ static ssize_t snd_compr_write(struct file *f, const char __user *buf,
|
|||
}
|
||||
|
||||
avail = snd_compr_get_avail(stream);
|
||||
#ifdef CONFIG_AUDIO_QGKI
|
||||
pr_debug("avail returned %zu\n", avail);
|
||||
#else
|
||||
pr_debug("avail returned %ld\n", (unsigned long)avail);
|
||||
#endif
|
||||
/* calculate how much we can write to buffer */
|
||||
if (avail > count)
|
||||
avail = count;
|
||||
|
|
@ -365,7 +374,11 @@ static ssize_t snd_compr_read(struct file *f, char __user *buf,
|
|||
}
|
||||
|
||||
avail = snd_compr_get_avail(stream);
|
||||
#ifdef CONFIG_AUDIO_QGKI
|
||||
pr_debug("avail returned %zu\n", avail);
|
||||
#else
|
||||
pr_debug("avail returned %ld\n", (unsigned long)avail);
|
||||
#endif
|
||||
/* calculate how much we can read from buffer */
|
||||
if (avail > count)
|
||||
avail = count;
|
||||
|
|
@ -423,7 +436,11 @@ static __poll_t snd_compr_poll(struct file *f, poll_table *wait)
|
|||
poll_wait(f, &stream->runtime->sleep, wait);
|
||||
|
||||
avail = snd_compr_get_avail(stream);
|
||||
#ifdef CONFIG_AUDIO_QGKI
|
||||
pr_debug("avail is %zu\n", avail);
|
||||
#else
|
||||
pr_debug("avail is %ld\n", (unsigned long)avail);
|
||||
#endif
|
||||
/* check if we have at least one fragment to fill */
|
||||
switch (stream->runtime->state) {
|
||||
case SNDRV_PCM_STATE_DRAINING:
|
||||
|
|
|
|||
Loading…
Reference in a new issue