From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCHv6 02/12] media-ioc-g-topology.rst: document new 'index' field
Date: Fri, 13 Jul 2018 12:23:34 -0300 [thread overview]
Message-ID: <20180713122334.68661b55@coco.lan> (raw)
In-Reply-To: <20180710084512.99238-3-hverkuil@xs4all.nl>
Em Tue, 10 Jul 2018 10:45:02 +0200
Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> Document the new struct media_v2_pad 'index' field.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> .../media/uapi/mediactl/media-ioc-g-topology.rst | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst b/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst
> index a3f259f83b25..bae2b4db89cc 100644
> --- a/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst
> +++ b/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst
> @@ -176,7 +176,7 @@ desired arrays with the media graph elements.
> * - struct media_v2_intf_devnode
> - ``devnode``
> - Used only for device node interfaces. See
> - :c:type:`media_v2_intf_devnode` for details..
> + :c:type:`media_v2_intf_devnode` for details.
>
>
> .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}|
> @@ -218,7 +218,15 @@ desired arrays with the media graph elements.
> - Pad flags, see :ref:`media-pad-flag` for more details.
>
> * - __u32
> - - ``reserved``\ [5]
> + - ``index``
> + - Pad index, starts at 0. Only valid if ``MEDIA_V2_PAD_HAS_INDEX(media_version)``
> + returns true. The ``media_version`` is defined in struct
> + :c:type:`media_device_info` and can be retrieved using
> + :ref:`MEDIA_IOC_DEVICE_INFO`. Pad indices are stable. If new pads are added
> + for an entity in the future, then those will be added at the end.
Hmm... Pad indexes may not be stable. That's by the way why we
need a better way to enum it, and the Properties API was thinking
to solve (and why we didn't add PAD index to this ioctl at the
first place).
The problem happens for example on TV demods and tuners:
different models may have different kinds of output PADs:
- analog luminance carrier samples;
- analog chrominance sub-carrier samples;
- sliced VBI data;
- audio RF sub-carrier samples;
- audio mono data;
- audio stereo data.
The same bridge chip can live with different demods, but need to
setup the pipelines according with the type of the PAD. As right now
we don't have any way to associate a PAD with an specific type of
output, what happens is that the V4L2 core associates a pad number
with an specific type of output. So, drivers may be exposing
PADs that don't exist, in practice, just to make them compatible
with similar subdevs.
Once we add a properties API (or something equivalent), the
PAD numbers will change and subdevs will only expose the ones
that really exists.
Thanks,
Mauro
next prev parent reply other threads:[~2018-07-13 15:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 8:45 [PATCHv6 00/12] media/mc: fix inconsistencies Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 01/12] media: add 'index' to struct media_v2_pad Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 02/12] media-ioc-g-topology.rst: document new 'index' field Hans Verkuil
2018-07-13 15:23 ` Mauro Carvalho Chehab [this message]
2018-07-17 11:58 ` Hans Verkuil
2018-07-24 10:53 ` Mauro Carvalho Chehab
2018-07-24 11:08 ` [PATCHv6.1 " Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 03/12] media: add flags field to struct media_v2_entity Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 04/12] media-ioc-g-topology.rst: document new 'flags' field Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 05/12] media: rename MEDIA_ENT_F_DTV_DECODER to MEDIA_ENT_F_DV_DECODER Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 06/12] media.h: add MEDIA_ENT_F_DV_ENCODER Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 07/12] media.h: reorder video en/decoder functions Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 08/12] ad9389b/adv7511: set proper media entity function Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 09/12] adv7180/tvp514x/tvp7002: fix " Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 10/12] media/i2c: add missing entity functions Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 11/12] media-ioc-enum-links.rst: improve pad index description Hans Verkuil
2018-07-24 11:09 ` [PATCHv6.1 " Hans Verkuil
2018-07-10 8:45 ` [PATCHv6 12/12] media-ioc-enum-entities.rst/-g-topology.rst: clarify ID/name usage Hans Verkuil
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=20180713122334.68661b55@coco.lan \
--to=mchehab+samsung@kernel.org \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.