提交 9f0d42a2 编写于 作者: D Dave Stevenson 提交者: Zheng Zengkai

staging: vc04_services: Support sending data to MMAL ports

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

Add the ability to send data to ports. This only supports
zero copy mode as the required bulk transfer setup calls
are not done.
Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.org>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 11d1ff54
......@@ -422,11 +422,19 @@ buffer_from_host(struct vchiq_mmal_instance *instance,
m.u.buffer_from_host.buffer_header.data =
(u32)(unsigned long)buf->buffer;
m.u.buffer_from_host.buffer_header.alloc_size = buf->buffer_size;
m.u.buffer_from_host.buffer_header.length = 0; /* nothing used yet */
m.u.buffer_from_host.buffer_header.offset = 0; /* no offset */
m.u.buffer_from_host.buffer_header.flags = 0; /* no flags */
if (port->type == MMAL_PORT_TYPE_OUTPUT) {
m.u.buffer_from_host.buffer_header.length = 0;
m.u.buffer_from_host.buffer_header.offset = 0;
m.u.buffer_from_host.buffer_header.flags = 0;
m.u.buffer_from_host.buffer_header.pts = MMAL_TIME_UNKNOWN;
m.u.buffer_from_host.buffer_header.dts = MMAL_TIME_UNKNOWN;
} else {
m.u.buffer_from_host.buffer_header.length = buf->length;
m.u.buffer_from_host.buffer_header.offset = 0;
m.u.buffer_from_host.buffer_header.flags = buf->mmal_flags;
m.u.buffer_from_host.buffer_header.pts = buf->pts;
m.u.buffer_from_host.buffer_header.dts = buf->dts;
}
/* clear buffer type sepecific data */
memset(&m.u.buffer_from_host.buffer_header_type_specific, 0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册