Re: mx3_camera and DMA / double buffering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2 Dec 2010, Markus Niebel wrote:

> Hello,
> 
> we're working with a special cameraboard (CCD + Analog Frontend IC). Using the
> soc_camera stack on the i.MX35 (mx3_camera) the following problem arises:
> 
> VIDIOC_STREAMON calls soc_camera_streamon which calls videobuf_streamon - when
> iterating the buffers in the queue the function mx3_videobuf_queue is called
> for every buffer. This sends the buffers to the omage DMA (IDMAC) using the
> tx_submit method. The function ipu_init_channel_buffer (DMA driver ipu_core)
> gets only one buffer from the scatterlist, this leads to a single buffer
> capture.
> 
> In the code of  mx3_videobuf_prepare there is a comment, that the first
> buffer's scatterlist needs to contain two buffers but this is not implemented.
> 
> I try to understand the interworking of the parts (soc_camera, videobuf,
> ipu_core and mx3_camera) and would help to fix it.

Here's the comment, you are referring to:

	/*
	 * We will have to configure the IDMAC channel. It has two slots
	 * for DMA buffers, we shall enter the first two buffers there,
	 * and then submit new buffers in DMA-ready interrupts
	 */

It says nothing about the scatter-list. Each buffer is submitted in an own 
sg-list with one element. They get queued in the ipu_idmac dmaengine 
driver. So, you just have to queue several buffers in your application 
before going to the dequeue stage. Look at contrib/test/capture-example.c 
from http://git.linuxtv.org/v4l-utils.git for an example.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux