linux/Documentation/DocBook
Laurent Pinchart 53e269c102 [media] media: Entities, pads and links
As video hardware pipelines become increasingly complex and
configurable, the current hardware description through v4l2 subdevices
reaches its limits. In addition to enumerating and configuring
subdevices, video camera drivers need a way to discover and modify at
runtime how those subdevices are connected. This is done through new
elements called entities, pads and links.

An entity is a basic media hardware building block. It can correspond to
a large variety of logical blocks such as physical hardware devices
(CMOS sensor for instance), logical hardware devices (a building block
in a System-on-Chip image processing pipeline), DMA channels or physical
connectors.

A pad is a connection endpoint through which an entity can interact with
other entities. Data (not restricted to video) produced by an entity
flows from the entity's output to one or more entity inputs. Pads should
not be confused with physical pins at chip boundaries.

A link is a point-to-point oriented connection between two pads, either
on the same entity or on different entities. Data flows from a source
pad to a sink pad.

Links are stored in the source entity. To make backwards graph walk
faster, a copy of all links is also stored in the sink entity. The copy
is known as a backlink and is only used to help graph traversal.

The entity API is made of three functions:

- media_entity_init() initializes an entity. The caller must provide an
array of pads as well as an estimated number of links. The links array
is allocated dynamically and will be reallocated if it grows beyond the
initial estimate.

- media_entity_cleanup() frees resources allocated for an entity. It
must be called during the cleanup phase after unregistering the entity
and before freeing it.

- media_entity_create_link() creates a link between two entities. An
entry in the link array of each entity is allocated and stores pointers
to source and sink pads.

When a media device is unregistered, all its entities are unregistered
automatically.

The code is based on Hans Verkuil <hverkuil@xs4all.nl> initial work.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 04:53:10 -03:00
..
dvb [media] DocBook/v4l: update V4L2 revision and update copyright years 2011-01-19 11:51:33 -02:00
v4l [media] media: Entities, pads and links 2011-03-22 04:53:10 -03:00
.gitignore documentation: ignore byproducts from latex 2009-04-02 19:04:53 -07:00
80211.tmpl mac80211: add doc short section on LED triggers 2011-01-10 15:40:52 -05:00
alsa-driver-api.tmpl ALSA: Move ALSA docbooks to be with the rest of the kernel docbooks 2009-03-09 15:22:59 +01:00
debugobjects.tmpl debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. 2009-06-15 21:30:28 -07:00
device-drivers.tmpl docbook: fix broken serial to tty/serial movement 2011-01-22 20:13:56 -08:00
deviceiobook.tmpl docbook: fix errors from x86 headers merger 2010-03-03 07:32:39 -08:00
drm.tmpl drm: fix wrong usages of drm_device in DRM Developer's Guide 2011-02-15 09:01:29 +10:00
filesystems.tmpl Docbook: add fs/eventfd.c and fix typos in it 2011-02-21 15:07:04 -08:00
gadget.tmpl usb gadget: cdc obex glue 2008-10-17 14:40:53 -07:00
genericirq.tmpl genirq-update-kerneldoc.patch 2010-10-12 16:39:07 +02:00
kernel-api.tmpl docbook: add idr/ida to kernel-api docbook 2010-10-26 17:40:56 -07:00
kernel-hacking.tmpl docbook: fix signal_pending() argument 2009-12-09 18:59:52 -08:00
kernel-locking.tmpl Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu into core/rcu 2010-10-07 09:43:11 +02:00
kgdb.tmpl kdb: Add kdb kernel module sample 2010-10-29 13:14:39 -05:00
libata.tmpl Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 2010-05-20 09:27:37 -07:00
librs.tmpl
lsm.tmpl Add missing section ID to lsm.tmpl 2008-02-07 08:42:16 -08:00
Makefile Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-08-25 14:51:42 -04:00
mcabook.tmpl Rationalise Randy's address a bit 2008-10-30 11:38:47 -07:00
media-entities.tmpl [media] media: Media device 2011-03-22 04:53:09 -03:00
media-indices.tmpl V4L/DVB (13572): v4l2-spec: Digital Video Timings API documentation 2009-12-16 00:18:04 -02:00
media.tmpl [media] media: Media device 2011-03-22 04:53:09 -03:00
mtdnand.tmpl tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
networking.tmpl wimax: Makefile, Kconfig and docbook linkage for the stack 2009-01-07 10:00:17 -08:00
rapidio.tmpl docbook: fix fatal rapidio yet again (and more to come) 2008-04-29 20:40:00 -07:00
regulator.tmpl regulator: Add basic DocBook manual 2009-01-08 20:10:34 +00:00
s390-drivers.tmpl docbook: fix s390 fatal error after header files moved 2008-08-05 16:56:29 -07:00
scsi.tmpl Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
sh.tmpl sh: clkfwk: Kill off unused clk_set_rate_ex(). 2010-11-15 18:25:12 +09:00
stylesheet.xsl docbook: use IDs as filenames to support multiple books 2010-08-05 13:21:24 -07:00
tracepoint.tmpl workqueue: Add a workqueue chapter to the tracepoint docbook 2010-08-27 12:27:36 +02:00
uio-howto.tmpl Documentation: change email address for Hans Koch 2010-11-18 15:00:46 -08:00
usb.tmpl
writing_usb_driver.tmpl USB: rename usb_buffer_alloc() and usb_buffer_free() users 2010-05-20 13:21:38 -07:00
writing-an-alsa-driver.tmpl ALSA: Update the documentation for changes of proc files 2010-04-13 12:55:09 +02:00
z8530book.tmpl Rationalise Randy's address a bit 2008-10-30 11:38:47 -07:00