public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: vkalia@codeaurora.org
Cc: linux-media@vger.kernel.org
Subject: Re: Query: Mutiple CAPTURE ports on a single device
Date: Thu, 13 Mar 2014 10:02:16 +0100	[thread overview]
Message-ID: <53217418.40405@xs4all.nl> (raw)
In-Reply-To: <04588cf620ba3635c9a59e6eb92d0000.squirrel@www.codeaurora.org>

Hi Vinay!

On 03/12/14 18:58, vkalia@codeaurora.org wrote:
> Hi
> 
> I have a v4l2 driver for a hardware which is capable of taking one input
> and producing two outputs. Eg: Downscaler which takes one input @ 1080p
> and two outputs - one @ 720p and other at VGA. My driver is currently
> implemented as having two capabilities -
> 
> 1. V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
> 2. V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
> 
> Do you know if I can have two CAPTURE capabilities. In that case how do I
> distinguish between QBUF/DQBUF of each capability?

The answer depends on how your driver is organized: is it a memory-to-memory
device (i.e. it has one video node that is used for both output and capture
to/from the m2m hardware) or does it have two video nodes, one for output to
the hardware, one for capture from the hardware?

In the first case you won't be able to implement this using the M2M API.

In the second case it is quite easy: you just create another video capture
node. For every frame send to the hardware you'll get a frame back at each
of the two capture nodes, one 720p, one VGA.

This is actually quite common, there are many drivers that have multiple
video nodes that give back the same video source but in different formats
(e.g. raw video and compressed video).

Each video node basically represents a DMA engine. So if you have multiple
DMA engines, you'll need multiple video nodes.

Regards,

	Hans

  reply	other threads:[~2014-03-13  9:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 17:58 Query: Mutiple CAPTURE ports on a single device vkalia
2014-03-13  9:02 ` Hans Verkuil [this message]
2014-03-13 18:59   ` vkalia

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=53217418.40405@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=vkalia@codeaurora.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