Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3cdb6e5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: Cleanup of compress offload drivers"

parents 0d612e2f 60d57b0e
Loading
Loading
Loading
Loading
+13 −12
Original line number Diff line number Diff line
@@ -245,8 +245,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;
@@ -284,7 +284,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;
@@ -339,7 +339,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;
@@ -393,7 +393,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:
@@ -872,6 +872,7 @@ static const struct file_operations snd_compr_file_ops = {
		.write =          snd_compr_write,
		.read =           snd_compr_read,
		.unlocked_ioctl = snd_compr_ioctl,
		.compat_ioctl   = snd_compr_ioctl,
		.mmap =           snd_compr_mmap,
		.poll =           snd_compr_poll,
};
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ struct msm_compr_audio {

	uint32_t codec;
	void    *buffer; /* virtual address */
	uint32_t buffer_paddr; /* physical address */
	phys_addr_t buffer_paddr; /* physical address */
	uint32_t app_pointer;
	uint32_t buffer_size;
	uint32_t byte_offset;