diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2009-12-09 06:40:03 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 03:53:16 -0400 |
commit | 97548ed4c4661502cdfd1aabd5d3876fa4f5cc2e (patch) | |
tree | c85b85954f53e3a97b6590de8d5d5396e7c43358 /Documentation/media-framework.txt | |
parent | 1651333b09743887bc2dd3d158a11853a2be3fe7 (diff) |
[media] media: Links setup
Create the following ioctl and implement it at the media device level to
setup links.
- MEDIA_IOC_SETUP_LINK: Modify the properties of a given link
The only property that can currently be modified is the ENABLED link
flag to enable/disable a link. Links marked with the IMMUTABLE link flag
can not be enabled or disabled.
Enabling or disabling a link has effects on entities' use count. Those
changes are automatically propagated through the graph.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.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>
Diffstat (limited to 'Documentation/media-framework.txt')
-rw-r--r-- | Documentation/media-framework.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt index 78ae02095372..4809221c0ff9 100644 --- a/Documentation/media-framework.txt +++ b/Documentation/media-framework.txt | |||
@@ -259,6 +259,16 @@ When the graph traversal is complete the function will return NULL. | |||
259 | Graph traversal can be interrupted at any moment. No cleanup function call is | 259 | Graph traversal can be interrupted at any moment. No cleanup function call is |
260 | required and the graph structure can be freed normally. | 260 | required and the graph structure can be freed normally. |
261 | 261 | ||
262 | Helper functions can be used to find a link between two given pads, or a pad | ||
263 | connected to another pad through an enabled link | ||
264 | |||
265 | media_entity_find_link(struct media_pad *source, | ||
266 | struct media_pad *sink); | ||
267 | |||
268 | media_entity_remote_source(struct media_pad *pad); | ||
269 | |||
270 | Refer to the kerneldoc documentation for more information. | ||
271 | |||
262 | 272 | ||
263 | Use count and power handling | 273 | Use count and power handling |
264 | ---------------------------- | 274 | ---------------------------- |
@@ -271,3 +281,35 @@ track the number of users of every entity for power management needs. | |||
271 | The use_count field is owned by media drivers and must not be touched by entity | 281 | The use_count field is owned by media drivers and must not be touched by entity |
272 | drivers. Access to the field must be protected by the media device graph_mutex | 282 | drivers. Access to the field must be protected by the media device graph_mutex |
273 | lock. | 283 | lock. |
284 | |||
285 | |||
286 | Links setup | ||
287 | ----------- | ||
288 | |||
289 | Link properties can be modified at runtime by calling | ||
290 | |||
291 | media_entity_setup_link(struct media_link *link, u32 flags); | ||
292 | |||
293 | The flags argument contains the requested new link flags. | ||
294 | |||
295 | The only configurable property is the ENABLED link flag to enable/disable a | ||
296 | link. Links marked with the IMMUTABLE link flag can not be enabled or disabled. | ||
297 | |||
298 | When a link is enabled or disabled, the media framework calls the | ||
299 | link_setup operation for the two entities at the source and sink of the link, | ||
300 | in that order. If the second link_setup call fails, another link_setup call is | ||
301 | made on the first entity to restore the original link flags. | ||
302 | |||
303 | Media device drivers can be notified of link setup operations by setting the | ||
304 | media_device::link_notify pointer to a callback function. If provided, the | ||
305 | notification callback will be called before enabling and after disabling | ||
306 | links. | ||
307 | |||
308 | Entity drivers must implement the link_setup operation if any of their links | ||
309 | is non-immutable. The operation must either configure the hardware or store | ||
310 | the configuration information to be applied later. | ||
311 | |||
312 | Link configuration must not have any side effect on other links. If an enabled | ||
313 | link at a sink pad prevents another link at the same pad from being disabled, | ||
314 | the link_setup operation must return -EBUSY and can't implicitly disable the | ||
315 | first enabled link. | ||