public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Cliff Cai <cliffcai.sh@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org
Subject: Re: Asking advice for Camera/ISP driver framework design
Date: Thu, 15 Sep 2011 20:10:52 +0300	[thread overview]
Message-ID: <4E72319C.4030904@iki.fi> (raw)
In-Reply-To: <CAFhB-RB8Pm--H5__kjKN=v=7pF0xtt_VKJw0Dh3YfQ6GE+4KVg@mail.gmail.com>

Cliff Cai wrote:
> On Thu, Sep 15, 2011 at 6:20 PM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
>> Hi Cliff,
>>
>> On Wednesday 14 September 2011 08:13:32 Cliff Cai wrote:
>>> Dear guys,
>>>
>>> I'm currently working on a camera/ISP Linux driver project.Of course,I
>>> want it to be a V4L2 driver,but I got a problem about how to design
>>> the driver framework.
>>> let me introduce the background of this ISP(Image signal processor) a
>>> little bit.
>>> 1.The ISP has two output paths,first one called main path which is
>>> used to transfer image data for taking picture and recording,the other
>>> one called preview path which is used to transfer image data for
>>> previewing.
>>> 2.the two paths have the same image data input from sensor,but their
>>> outputs are different,the output of main path is high quality and
>>> larger image,while the output of preview path is smaller image.
>>> 3.the two output paths have independent DMA engines used to move image
>>> data to system memory.
>>>
>>> The problem is currently, the V4L2 framework seems only support one
>>> buffer queue,and in my case,obviously,two buffer queues are required.
>>> Any idea/advice for implementing such kind of V4L2 driver? or any
>>> other better solutions?
>>
>> Your driver should create two video nodes, one for each stream. They will each
>> have their own buffers queue.
>>
>> The driver should also implement the media controller API to let applications
>> discover that the video nodes are related and how they interact with the ISP.
> 
> Hi Laurent,
> 
> As "Documentation/media-framework" says, one of the goals of media
> device model is "Discovering a device internal topology,and
> configuring it at runtime".I'm just a bit confused about how
> applications can discover the related video notes? Could you explain
> it a little more?

Hi Cliff,

The major and minor numbers of video nodes are provided to the user
space in struct media_entity_desc (defined in include/linux/media.h)
using MEDIA_IOC_ENUM_ENTITIES IOCTL. The major and minor numbers define
which device node corresponds to the video device; this isn't trivial
for an application to do so there's a library which makes it easier:

<URL:http://git.ideasonboard.org/?p=media-ctl.git;a=summary>

See src/media.h for the interface. An example how to use this is
available in src/main.c.

Entities the type of which is MEDIA_ENT_T_DEVNODE_V4L are V4L2 device nodes.

Regards,

-- 
Sakari Ailus
sakari.ailus@iki.fi

  reply	other threads:[~2011-09-15 17:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAFhB-RACaxtkBuXsch5-giTBqCHR+s5_SP-sGeR=E1HVeGfQLQ@mail.gmail.com>
2011-09-14  6:13 ` Asking advice for Camera/ISP driver framework design Cliff Cai
2011-09-14  7:41   ` Scott Jiang
2011-09-15 10:20   ` Laurent Pinchart
2011-09-15 15:38     ` Cliff Cai
2011-09-15 17:10       ` Sakari Ailus [this message]
2011-09-18 23:25         ` Laurent Pinchart
2011-09-26 10:55         ` Hans Verkuil
2011-09-26 16:03           ` Laurent Pinchart
2011-09-26 16:38             ` Hans Verkuil
2011-09-15 17:14   ` Sakari Ailus
2011-09-16  2:44     ` Cliff Cai
2011-09-16 20:23       ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E72319C.4030904@iki.fi \
    --to=sakari.ailus@iki.fi \
    --cc=cliffcai.sh@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox