Commit 8601494e authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: media-ioc-enum-entities.rst/-g-topology.rst: clarify ID/name usage

Mention that IDs should not be hardcoded in applications and that the
entity name must be unique within the media topology.
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent e5def285
...@@ -62,15 +62,18 @@ id's until they get an error. ...@@ -62,15 +62,18 @@ id's until they get an error.
- ``id`` - ``id``
- -
- -
- Entity id, set by the application. When the id is or'ed with - Entity ID, set by the application. When the ID is or'ed with
``MEDIA_ENT_ID_FLAG_NEXT``, the driver clears the flag and returns ``MEDIA_ENT_ID_FLAG_NEXT``, the driver clears the flag and returns
the first entity with a larger id. the first entity with a larger ID. Do not expect that the ID will
always be the same for each instance of the device. In other words,
do not hardcode entity IDs in an application.
* - char * - char
- ``name``\ [32] - ``name``\ [32]
- -
- -
- Entity name as an UTF-8 NULL-terminated string. - Entity name as an UTF-8 NULL-terminated string. This name must be unique
within the media topology.
* - __u32 * - __u32
- ``type`` - ``type``
......
...@@ -131,11 +131,14 @@ desired arrays with the media graph elements. ...@@ -131,11 +131,14 @@ desired arrays with the media graph elements.
* - __u32 * - __u32
- ``id`` - ``id``
- Unique ID for the entity. - Unique ID for the entity. Do not expect that the ID will
always be the same for each instance of the device. In other words,
do not hardcode entity IDs in an application.
* - char * - char
- ``name``\ [64] - ``name``\ [64]
- Entity name as an UTF-8 NULL-terminated string. - Entity name as an UTF-8 NULL-terminated string. This name must be unique
within the media topology.
* - __u32 * - __u32
- ``function`` - ``function``
...@@ -166,7 +169,9 @@ desired arrays with the media graph elements. ...@@ -166,7 +169,9 @@ desired arrays with the media graph elements.
* - __u32 * - __u32
- ``id`` - ``id``
- Unique ID for the interface. - Unique ID for the interface. Do not expect that the ID will
always be the same for each instance of the device. In other words,
do not hardcode interface IDs in an application.
* - __u32 * - __u32
- ``intf_type`` - ``intf_type``
...@@ -215,7 +220,9 @@ desired arrays with the media graph elements. ...@@ -215,7 +220,9 @@ desired arrays with the media graph elements.
* - __u32 * - __u32
- ``id`` - ``id``
- Unique ID for the pad. - Unique ID for the pad. Do not expect that the ID will
always be the same for each instance of the device. In other words,
do not hardcode pad IDs in an application.
* - __u32 * - __u32
- ``entity_id`` - ``entity_id``
...@@ -249,7 +256,9 @@ desired arrays with the media graph elements. ...@@ -249,7 +256,9 @@ desired arrays with the media graph elements.
* - __u32 * - __u32
- ``id`` - ``id``
- Unique ID for the link. - Unique ID for the link. Do not expect that the ID will
always be the same for each instance of the device. In other words,
do not hardcode link IDs in an application.
* - __u32 * - __u32
- ``source_id`` - ``source_id``
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment