From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-sh@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>,
Sakari Ailus <sakari.ailus@iki.fi>,
Prabhakar Lad <prabhakar.lad@ti.com>
Subject: Re: [PATCH 1/6 v4] media: V4L2: support asynchronous subdevice registration
Date: Tue, 08 Jan 2013 14:27:09 +0000 [thread overview]
Message-ID: <50EC2CBD.3080102@gmail.com> (raw)
In-Reply-To: <1446871.ydXdxJD4sK@avalon>
Hi Laurent,
On 01/08/2013 01:41 PM, Laurent Pinchart wrote:
>> Subdev names are exposed to user space by the media controller API.
>> So they are really part of an ABI, aren't they ?
>
> They're used to construct the name exposed to userspace, but the media
> controller core could probably handle that internally by concatenating the
> driver name and the subdev name.
>
>> Also having I2C bus number or I2C slave address as part of the subdev
>> name makes it more difficult to write portable applications. Hence
>> in sensor drivers I used to overwrite subdev name to remove I2C bus
>> and slave address, as the format used v4l2_i2c_subdev_init() seemed
>> highly unsuitable..
>
> This clearly shows that we need to discuss the matter and agree on a common
> mode of operation.
>
> Aren't applications that use the subdev name directly inherently non-portable
> anyway ? If you want your application to support different boards/sensors/SoCs
> you should discover the pipeline and find the sensor by iterating over
> entities, instead of using the sensor entity name.
It depends on how we define the entity names :) It the names change from
board
to board and are completely unreliable then user space applications
using them
have no any chance to be generic. Nevertheless, struct
media_entity_desc::name
[1] has currently no specific semantics defined, e.g. for V4L2.
It's likely way better for the kernel space to be no constrained by the
subdev
user space name requirement. But having no clear definition of the
entity names
brings more trouble to user space. E.g. when a sensor exposes multiple
subdevs.
User space library/application could then reference them by entity name. It
seems difficult to me to handle such multiple subdev devices without
somehow
reliable subdev names.
I imagine a system with multiple sensors of same type sitting on
different I2C
busses, then appending I2C bus number/slave address to the name would be
useful.
And is it always possible to discover the pipeline, as opposite to e.g.
using
configuration file to activate all required links ? Configurations could be
of course per board file, but then at least we should keep subdev names
constant through the kernel releases.
[1] http://linuxtv.org/downloads/v4l-dvb-apis/media-ioc-enum-entities.html
--
Regards,
Sylwester
next prev parent reply other threads:[~2013-01-08 14:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-26 17:49 [PATCH v3 0/6] V4L2 asynchronous probing + soc-camera example Guennadi Liakhovetski
2012-12-26 17:49 ` [PATCH 1/6] media: V4L2: support asynchronous subdevice registration Guennadi Liakhovetski
2013-01-07 10:23 ` [PATCH 1/6 v4] " Guennadi Liakhovetski
2013-01-08 8:10 ` Laurent Pinchart
2013-01-08 9:25 ` Guennadi Liakhovetski
2013-01-08 9:41 ` Laurent Pinchart
2013-01-08 9:56 ` Guennadi Liakhovetski
2013-01-08 10:21 ` Laurent Pinchart
2013-01-08 10:26 ` Guennadi Liakhovetski
2013-01-08 10:35 ` Laurent Pinchart
2013-01-08 11:37 ` Sylwester Nawrocki
2013-01-08 12:41 ` Laurent Pinchart
2013-01-08 13:15 ` Sakari Ailus
2013-01-08 21:17 ` Laurent Pinchart
2013-03-12 16:59 ` V4L2 subdevice naming (was Re: [PATCH 1/6 v4] media: V4L2: support asynchronous subdevice registrati Guennadi Liakhovetski
2013-01-08 14:27 ` Sylwester Nawrocki [this message]
2013-01-08 21:20 ` [PATCH 1/6 v4] media: V4L2: support asynchronous subdevice registration Laurent Pinchart
2013-01-08 19:26 ` Sylwester Nawrocki
2013-01-08 14:52 ` Sylwester Nawrocki
2013-01-08 21:23 ` Laurent Pinchart
2013-01-08 10:06 ` [PATCH 1/6 v5] " Guennadi Liakhovetski
2013-01-10 5:42 ` Prabhakar Lad
2012-12-26 17:49 ` [PATCH 2/6] media: soc-camera: switch I2C subdevice drivers to use v4l2-clk Guennadi Liakhovetski
2013-01-08 8:02 ` Laurent Pinchart
2012-12-26 17:49 ` [PATCH 3/6] soc-camera: add V4L2-async support Guennadi Liakhovetski
2012-12-26 17:49 ` [PATCH 4/6] sh_mobile_ceu_camera: add asynchronous subdevice probing support Guennadi Liakhovetski
2012-12-26 17:49 ` [PATCH 5/6] imx074: support asynchronous probing Guennadi Liakhovetski
2012-12-26 17:49 ` [PATCH 6/6] ARM: shmobile: convert ap4evb to asynchronously register camera subdevices Guennadi Liakhovetski
2013-01-08 4:27 ` Simon Horman
2013-01-08 22:35 ` Guennadi Liakhovetski
2013-01-09 0:04 ` Simon Horman
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=50EC2CBD.3080102@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=prabhakar.lad@ti.com \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@iki.fi \
/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;
as well as URLs for NNTP newsgroup(s).