Exemplo n.º 1
0
int
notify_fire(const char *name)
{
	int no;

	no = model_lookup_notify(name);
	if (no == -1) return -1;
	ipc_start(CMD_NOTIFY, NULL, 0, no);
	// FIXME: optional argument
	ipc_send(TO_PARENT);
	return 0;
}
Exemplo n.º 2
0
Arquivo: job.c Projeto: Tayyib/uludag
static int
send_result(int cmd, const char *data, size_t size)
{
	ipc_start(cmd, chan, chan_id, 0);
	if (CMD_RESULT == cmd) {
		if (bk_app)
			ipc_pack_arg(bk_app, strlen(bk_app));
		else
			ipc_pack_arg("comar", 5);
	}
	if (data) {
		if (size == 0) size = strlen(data);
		ipc_pack_arg(data, size);
	}
	ipc_send(TO_PARENT);
	return 0;
}
Exemplo n.º 3
0
static inline int fimc_resume_out(struct fimc_control *ctrl)
{
        int index = -1, ret = -1;

	switch (ctrl->out->overlay.mode) {
	case FIMC_OVERLAY_NONE:
		if (ctrl->status == FIMC_ON_IDLE_SLEEP) {
		        ret = fimc_outdev_set_param(ctrl);
		        if (ret < 0)
		                fimc_err("Fail: fimc_outdev_set_param\n");

			ctrl->status = FIMC_STREAMON_IDLE;
		} else if (ctrl->status == FIMC_OFF_SLEEP) {
			ctrl->status = FIMC_STREAMOFF;
		} else {
			fimc_err("%s: Undefined status : %d\n", 
						__func__, ctrl->status);
		}
		break;

	case FIMC_OVERLAY_DMA_AUTO:
		if (ctrl->status == FIMC_ON_IDLE_SLEEP) {
			fimc_outdev_resume_dma(ctrl);
		        ret = fimc_outdev_set_param(ctrl);
		        if (ret < 0)
		                fimc_err("Fail: fimc_outdev_set_param\n");

			ctrl->status = FIMC_STREAMON_IDLE;

		} else if (ctrl->status == FIMC_OFF_SLEEP) {
			ctrl->status = FIMC_STREAMOFF;
		} else {
			fimc_err("%s: Undefined status : %d\n", 
						__func__, ctrl->status);
		}

		break;

	case FIMC_OVERLAY_DMA_MANUAL:
		if (ctrl->status == FIMC_ON_IDLE_SLEEP) {
		        ret = fimc_outdev_set_param(ctrl);
		        if (ret < 0)
		                fimc_err("Fail: fimc_outdev_set_param\n");

			ctrl->status = FIMC_STREAMON_IDLE;

		} else if (ctrl->status == FIMC_OFF_SLEEP) {
			ctrl->status = FIMC_STREAMOFF;
		} else {
			fimc_err("%s: Undefined status : %d\n", 
						__func__, ctrl->status);
		}

		break;

	case FIMC_OVERLAY_FIFO:
		if (ctrl->status == FIMC_ON_SLEEP) {
		        ctrl->status = FIMC_READY_ON;

		        ret = fimc_outdev_set_param(ctrl);
		        if (ret < 0)
		                fimc_err("Fail: fimc_outdev_set_param\n");

#if defined(CONFIG_VIDEO_IPC)
	                if (ctrl->out->pix.field == V4L2_FIELD_INTERLACED_TB)
	                        ipc_start();
#endif
			index = ctrl->out->idx.active;
	                fimc_outdev_set_src_addr(ctrl, ctrl->out->src[index].base);

	                ret = fimc_start_fifo(ctrl);
	                if (ret < 0)
	                        fimc_err("Fail: fimc_start_fifo\n");

	                ctrl->status = FIMC_STREAMON;
		} else if (ctrl->status == FIMC_OFF_SLEEP) {
			ctrl->status = FIMC_STREAMOFF;
		} else {
			fimc_err("%s: Undefined status : %d\n", __func__, ctrl->status);
		}

		break;
	}

	return 0;
}