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

Commit b838d5cb authored by Fred Oh's avatar Fred Oh
Browse files

ASoC: msm: qdsp6v2: reduce debug logs



q6asm_get_next_buf print too many logs if debug message is enabled. It
cause watchdog bark. Default log level to verbos.

Change-Id: Ifcfc88ae30916a2cc43d7806258ef8868e416cea
Signed-off-by: default avatarFred Oh <fred@codeaurora.org>
parent 2fe0c79b
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -412,9 +412,10 @@ static void q6asm_session_free(struct audio_client *ac)
	return;
}

static uint32_t q6asm_get_next_buf(uint32_t curr_buf, uint32_t max_buf_cnt)
static uint32_t q6asm_get_next_buf(struct audio_client *ac,
		uint32_t curr_buf, uint32_t max_buf_cnt)
{
	pr_debug("%s: curr_buf = %d, max_buf_cnt = %d\n",
	dev_vdbg(ac->dev, "%s: curr_buf = %d, max_buf_cnt = %d\n",
		 __func__, curr_buf, max_buf_cnt);
	curr_buf += 1;
	return (curr_buf >= max_buf_cnt) ? 0 : curr_buf;
@@ -1797,7 +1798,7 @@ void *q6asm_is_cpu_buf_avail(int dir, struct audio_client *ac, uint32_t *size,
		user accesses this function,increase cpu
		buf(to avoid another api)*/
		port->buf[idx].used = dir;
		port->cpu_buf = q6asm_get_next_buf(port->cpu_buf,
		port->cpu_buf = q6asm_get_next_buf(ac, port->cpu_buf,
						   port->max_buf_cnt);
		mutex_unlock(&port->lock);
		return data;
@@ -1849,7 +1850,7 @@ void *q6asm_is_cpu_buf_avail_nolock(int dir, struct audio_client *ac,
	 * buf(to avoid another api)
	 */
	port->buf[idx].used = dir;
	port->cpu_buf = q6asm_get_next_buf(port->cpu_buf,
	port->cpu_buf = q6asm_get_next_buf(ac, port->cpu_buf,
					   port->max_buf_cnt);
	return data;
}
@@ -4859,7 +4860,7 @@ static int __q6asm_read(struct audio_client *ac, bool is_custom_len_reqd,
		read.buf_size = is_custom_len_reqd ? len : ab->size;
		read.seq_id = port->dsp_buf;
		read.hdr.token = port->dsp_buf;
		port->dsp_buf = q6asm_get_next_buf(port->dsp_buf,
		port->dsp_buf = q6asm_get_next_buf(ac, port->dsp_buf,
						   port->max_buf_cnt);
		mutex_unlock(&port->lock);
		dev_vdbg(ac->dev, "%s: buf add[%pa] token[%d] uid[%d]\n",
@@ -4938,7 +4939,7 @@ int q6asm_read_nolock(struct audio_client *ac)
			}
		}

		port->dsp_buf = q6asm_get_next_buf(port->dsp_buf,
		port->dsp_buf = q6asm_get_next_buf(ac, port->dsp_buf,
						   port->max_buf_cnt);
		dev_vdbg(ac->dev, "%s: buf add[%pa] token[%d] uid[%d]\n",
				__func__, &ab->phys, read.hdr.token,
@@ -5144,7 +5145,7 @@ int q6asm_write(struct audio_client *ac, uint32_t len, uint32_t msw_ts,
			write.flags = (0x00000000 | (flags & 0x800000FF));
		else
			write.flags = (0x80000000 | flags);
		port->dsp_buf = q6asm_get_next_buf(port->dsp_buf,
		port->dsp_buf = q6asm_get_next_buf(ac, port->dsp_buf,
						   port->max_buf_cnt);
		buf_node = list_first_entry(&ac->port[IN].mem_map_handle,
				struct asm_buffer_node,
@@ -5222,7 +5223,7 @@ int q6asm_write_nolock(struct audio_client *ac, uint32_t len, uint32_t msw_ts,
			write.flags = (0x00000000 | (flags & 0x800000FF));
		else
			write.flags = (0x80000000 | flags);
		port->dsp_buf = q6asm_get_next_buf(port->dsp_buf,
		port->dsp_buf = q6asm_get_next_buf(ac, port->dsp_buf,
						   port->max_buf_cnt);

		dev_vdbg(ac->dev, "%s: ab->phys[%pa]bufadd[0x%x]token[0x%x] buf_id[0x%x]buf_size[0x%x]mmaphdl[0x%x]"