Exemplo n.º 1
0
int msm_adsp_write(struct msm_adsp_module *module, unsigned dsp_queue_addr,
			void *cmd_buf, size_t cmd_size)
{
	int rc, retries = 0;
#ifdef CONFIG_DEBUG_FS
	uint16_t *ptr;
	int ii;

	if (wdump > 0) {
		ptr = cmd_buf;
		pr_info("A->D:%x\n", module->id);
		pr_info("adsp: %x %d\n", dsp_queue_addr, cmd_size);
		for (ii = 0; ii < cmd_size/2; ii++)
			pr_info("%x ", ptr[ii]);
		pr_info("\n");
	}
#endif /* CONFIG_DEBUG_FS */
	do {
		rc = __msm_adsp_write(module, dsp_queue_addr, cmd_buf,
								cmd_size);
		if (rc == -EAGAIN)
			udelay(10);
	} while (rc == -EAGAIN && retries++ < 300);
	if (retries > 50)
		MM_ERR("adsp: %s command took %d attempts: rc %d\n",
			module->name, retries, rc);
	return rc;
}
int msm_adsp_write(struct msm_adsp_module *module, unsigned dsp_queue_addr,
		   void *cmd_buf, size_t cmd_size)
{
	int rc, retries = 0;
	uint32_t *ptr;
	int ii;

	if (atomic_read(&DEBUG_AUDPP_FLAG)) {
		ptr = cmd_buf;
		pr_info("A->D:%x\n", module->id);
		for (ii = 0; ii < cmd_size/2; ii++) {
			if (ptr[ii]) {
				pr_info("%x ", ptr[ii]);
			}
		}
		pr_info("\n");
	}

	do {
		rc = __msm_adsp_write(module, dsp_queue_addr, cmd_buf, cmd_size);
		if (rc == -EAGAIN)
			udelay(10);
	} while(rc == -EAGAIN && retries++ < 300);
	if (retries > 50)
		pr_warning("adsp: %s command took %d attempts: rc %d\n",
				module->name, retries, rc);
	return rc;
}
Exemplo n.º 3
0
int msm_adsp_write(struct msm_adsp_module *module, unsigned dsp_queue_addr,
		   void *cmd_buf, size_t cmd_size)
{
	int rc, retries = 0;
	do {
		rc = __msm_adsp_write(module, dsp_queue_addr, cmd_buf, cmd_size);
		if (rc == -EAGAIN)
			udelay(10);
	} while(rc == -EAGAIN && retries++ < 100);
	if (retries > 50)
		pr_warning("adsp: %s command took %d attempts: rc %d\n",
				module->name, retries, rc);
	return rc;
}