Commit 77a76b04 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull second batch of media updates from Mauro Carvalho Chehab:
 "This is the second part of the media patches.  It contains the media
  controller next generation patches, with is the result of one year of
  discussions and development.  It also contains patches to enable media
  controller support at the DVB subsystem.

  The goal is to improve the media controller to allow proper support
  for other types of Video4Linux devices (radio and TV ones) and to
  extend the media controller functionality to allow it to be used by
  other subsystems like DVB, ALSA and IIO.

  In order to use the new functionality, a new ioctl is needed
  (MEDIA_IOC_G_TOPOLOGY).  As we're still discussing how to pack the
  struct fields of this ioctl in order to avoid compat32 issues, I
  decided to add a patch at the end of this series commenting out the
  new ioctl, in order to postpone the addition of the new ioctl to the
  next Kernel version (4.6).

  With that, no userspace visible changes should happen at the media
  controller API, as the existing ioctls are untouched.  Yet, it helps
  DVB, ALSA and IIO developers to develop and test the patches adding
  media controller support there, as the core will contain all required
  internal changes to allow adding support for devices that belong to
  those subsystems"

* tag 'media/v4.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (177 commits)
  [media] Postpone the addition of MEDIA_IOC_G_TOPOLOGY
  [media] mxl111sf: Add a tuner entity
  [media] dvbdev: create links on devices with multiple frontends
  [media] media-entitiy: add a function to create multiple links
  [media] dvb-usb-v2: postpone removal of media_device
  [media] dvbdev: Add RF connector if needed
  [media] dvbdev: remove two dead functions if !CONFIG_MEDIA_CONTROLLER_DVB
  [media] call media_device_init() before registering the V4L2 device
  [media] uapi/media.h: Use u32 for the number of graph objects
  [media] media-entity: don't sleep at media_device_register_entity()
  [media] media-entity: increase max number of PADs
  [media] media-entity.h: document the remaining functions
  [media] media-device.h: use just one u32 counter for object ID
  [media] media-entity.h fix documentation for several parameters
  [media] DocBook: document media_entity_graph_walk_cleanup()
  [media] move documentation to the header files
  [media] media: Move MEDIA_ENTITY_MAX_PADS from media-entity.h to media-entity.c
  [media] media: Remove pre-allocated entity enumeration bitmap
  [media] staging: v4l: davinci_vpbe: Use the new media graph walk interface
  [media] staging: v4l: omap4iss: Use the new media graph walk interface
  ...
parents 50ae833e be0270ec
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -263,6 +263,7 @@ X!Isound/sound_firmware.c
!Iinclude/media/lirc_dev.h
!Iinclude/media/lirc_dev.h
    </sect1>
    </sect1>
    <sect1><title>Media Controller devices</title>
    <sect1><title>Media Controller devices</title>
!Pinclude/media/media-device.h Media Controller
!Iinclude/media/media-device.h
!Iinclude/media/media-device.h
!Iinclude/media/media-devnode.h
!Iinclude/media/media-devnode.h
!Iinclude/media/media-entity.h
!Iinclude/media/media-entity.h
+30 −14
Original line number Original line Diff line number Diff line
@@ -58,21 +58,36 @@
    <title>Media device model</title>
    <title>Media device model</title>
    <para>Discovering a device internal topology, and configuring it at runtime,
    <para>Discovering a device internal topology, and configuring it at runtime,
    is one of the goals of the media controller API. To achieve this, hardware
    is one of the goals of the media controller API. To achieve this, hardware
    devices are modelled as an oriented graph of building blocks called entities
    devices and Linux Kernel interfaces are modelled as graph objects on
    connected through pads.</para>
    an oriented graph. The object types that constitute the graph are:</para>
    <para>An entity is a basic media hardware or software building block. It can
    <itemizedlist>
    correspond to a large variety of logical blocks such as physical hardware
    <listitem><para>An <emphasis role="bold">entity</emphasis>
    devices (CMOS sensor for instance), logical hardware devices (a building
    is a basic media hardware or software building block. It can correspond to
    block in a System-on-Chip image processing pipeline), DMA channels or
    a large variety of logical blocks such as physical hardware devices
    physical connectors.</para>
    (CMOS sensor for instance), logical hardware devices (a building block in
    <para>A pad is a connection endpoint through which an entity can interact
    a System-on-Chip image processing pipeline), DMA channels or physical
    with other entities. Data (not restricted to video) produced by an entity
    connectors.</para></listitem>
    flows from the entity's output to one or more entity inputs. Pads should not
    <listitem><para>An <emphasis role="bold">interface</emphasis>
    be confused with physical pins at chip boundaries.</para>
    is a graph representation of a Linux Kernel userspace API interface,
    <para>A link is a point-to-point oriented connection between two pads,
    like a device node or a sysfs file that controls one or more entities
    either on the same entity or on different entities. Data flows from a source
    in the graph.</para></listitem>
    pad to a sink pad.</para>
    <listitem><para>A <emphasis role="bold">pad</emphasis>
    is a data 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.</para></listitem>
    <listitem><para>A <emphasis role="bold">data link</emphasis>
    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.</para></listitem>
    <listitem><para>An <emphasis role="bold">interface link</emphasis>
    is a point-to-point bidirectional control connection between a Linux
    Kernel interface and an entity.m</para></listitem>
    </itemizedlist>
  </section>
  </section>

  <!-- All non-ioctl specific data types go here. -->
  &sub-media-types;
</chapter>
</chapter>


<appendix id="media-user-func">
<appendix id="media-user-func">
@@ -83,6 +98,7 @@
  &sub-media-func-ioctl;
  &sub-media-func-ioctl;
  <!-- All ioctls go here. -->
  <!-- All ioctls go here. -->
  &sub-media-ioc-device-info;
  &sub-media-ioc-device-info;
  &sub-media-ioc-g-topology;
  &sub-media-ioc-enum-entities;
  &sub-media-ioc-enum-entities;
  &sub-media-ioc-enum-links;
  &sub-media-ioc-enum-links;
  &sub-media-ioc-setup-link;
  &sub-media-ioc-setup-link;
+2 −102
Original line number Original line Diff line number Diff line
@@ -59,15 +59,6 @@
    <para>Entity IDs can be non-contiguous. Applications must
    <para>Entity IDs can be non-contiguous. Applications must
    <emphasis>not</emphasis> try to enumerate entities by calling
    <emphasis>not</emphasis> try to enumerate entities by calling
    MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para>
    MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para>
    <para>Two or more entities that share a common non-zero
    <structfield>group_id</structfield> value are considered as logically
    grouped. Groups are used to report
    <itemizedlist>
      <listitem><para>ALSA, VBI and video nodes that carry the same media
      stream</para></listitem>
      <listitem><para>lens and flash controllers associated with a sensor</para></listitem>
    </itemizedlist>
    </para>


    <table pgwide="1" frame="none" id="media-entity-desc">
    <table pgwide="1" frame="none" id="media-entity-desc">
      <title>struct <structname>media_entity_desc</structname></title>
      <title>struct <structname>media_entity_desc</structname></title>
@@ -106,7 +97,7 @@
	    <entry><structfield>revision</structfield></entry>
	    <entry><structfield>revision</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Entity revision in a driver/hardware specific format.</entry>
	    <entry>Entity revision. Always zero (obsolete)</entry>
	  </row>
	  </row>
	  <row>
	  <row>
	    <entry>__u32</entry>
	    <entry>__u32</entry>
@@ -120,7 +111,7 @@
	    <entry><structfield>group_id</structfield></entry>
	    <entry><structfield>group_id</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Entity group ID</entry>
	    <entry>Entity group ID. Always zero (obsolete)</entry>
	  </row>
	  </row>
	  <row>
	  <row>
	    <entry>__u16</entry>
	    <entry>__u16</entry>
@@ -171,97 +162,6 @@
	</tbody>
	</tbody>
      </tgroup>
      </tgroup>
    </table>
    </table>

    <table frame="none" pgwide="1" id="media-entity-type">
      <title>Media entity types</title>
      <tgroup cols="2">
        <colspec colname="c1"/>
        <colspec colname="c2"/>
	<tbody valign="top">
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE</constant></entry>
	    <entry>Unknown device node</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE_V4L</constant></entry>
	    <entry>V4L video, radio or vbi device node</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE_FB</constant></entry>
	    <entry>Frame buffer device node</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE_ALSA</constant></entry>
	    <entry>ALSA card</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE_DVB_FE</constant></entry>
	    <entry>DVB frontend devnode</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE_DVB_DEMUX</constant></entry>
	    <entry>DVB demux devnode</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE_DVB_DVR</constant></entry>
	    <entry>DVB DVR devnode</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE_DVB_CA</constant></entry>
	    <entry>DVB CAM devnode</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_DEVNODE_DVB_NET</constant></entry>
	    <entry>DVB network devnode</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV</constant></entry>
	    <entry>Unknown V4L sub-device</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_SENSOR</constant></entry>
	    <entry>Video sensor</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_FLASH</constant></entry>
	    <entry>Flash controller</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_LENS</constant></entry>
	    <entry>Lens controller</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_DECODER</constant></entry>
	    <entry>Video decoder, the basic function of the video decoder is to
	    accept analogue video from a wide variety of sources such as
	    broadcast, DVD players, cameras and video cassette recorders, in
	    either NTSC, PAL or HD format and still occasionally SECAM, separate
	    it into its component parts, luminance and chrominance, and output
	    it in some digital video standard, with appropriate embedded timing
	    signals.</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_ENT_T_V4L2_SUBDEV_TUNER</constant></entry>
	    <entry>TV and/or radio tuner</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table frame="none" pgwide="1" id="media-entity-flag">
      <title>Media entity flags</title>
      <tgroup cols="2">
        <colspec colname="c1"/>
        <colspec colname="c2"/>
	<tbody valign="top">
	  <row>
	    <entry><constant>MEDIA_ENT_FL_DEFAULT</constant></entry>
	    <entry>Default entity for its type. Used to discover the default
	    audio, VBI and video devices, the default camera sensor, ...</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>
  </refsect1>
  </refsect1>


  <refsect1>
  <refsect1>
+0 −56
Original line number Original line Diff line number Diff line
@@ -118,35 +118,6 @@
      </tgroup>
      </tgroup>
    </table>
    </table>


    <table frame="none" pgwide="1" id="media-pad-flag">
      <title>Media pad flags</title>
      <tgroup cols="2">
        <colspec colname="c1"/>
        <colspec colname="c2"/>
	<tbody valign="top">
	  <row>
	    <entry><constant>MEDIA_PAD_FL_SINK</constant></entry>
	    <entry>Input pad, relative to the entity. Input pads sink data and
	    are targets of links.</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_PAD_FL_SOURCE</constant></entry>
	    <entry>Output pad, relative to the entity. Output pads source data
	    and are origins of links.</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_PAD_FL_MUST_CONNECT</constant></entry>
	    <entry>If this flag is set and the pad is linked to any other
	    pad, then at least one of those links must be enabled for the
	    entity to be able to stream. There could be temporary reasons
	    (e.g. device configuration dependent) for the pad to need
	    enabled links even when this flag isn't set; the absence of the
	    flag doesn't imply there is none.</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table pgwide="1" frame="none" id="media-link-desc">
    <table pgwide="1" frame="none" id="media-link-desc">
      <title>struct <structname>media_link_desc</structname></title>
      <title>struct <structname>media_link_desc</structname></title>
      <tgroup cols="3">
      <tgroup cols="3">
@@ -171,33 +142,6 @@
      </tgroup>
      </tgroup>
    </table>
    </table>


    <table frame="none" pgwide="1" id="media-link-flag">
      <title>Media link flags</title>
      <tgroup cols="2">
        <colspec colname="c1"/>
        <colspec colname="c2"/>
	<tbody valign="top">
	  <row>
	    <entry><constant>MEDIA_LNK_FL_ENABLED</constant></entry>
	    <entry>The link is enabled and can be used to transfer media data.
	    When two or more links target a sink pad, only one of them can be
	    enabled at a time.</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_LNK_FL_IMMUTABLE</constant></entry>
	    <entry>The link enabled state can't be modified at runtime. An
	    immutable link is always enabled.</entry>
	  </row>
	  <row>
	    <entry><constant>MEDIA_LNK_FL_DYNAMIC</constant></entry>
	    <entry>The link enabled state can be modified during streaming. This
	    flag is set by drivers and is read-only for applications.</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>
    <para>One and only one of <constant>MEDIA_PAD_FL_SINK</constant> and
    <constant>MEDIA_PAD_FL_SOURCE</constant> must be set for every pad.</para>
  </refsect1>
  </refsect1>


  <refsect1>
  <refsect1>
+394 −0
Original line number Original line Diff line number Diff line
<refentry id="media-g-topology">
  <refmeta>
    <refentrytitle>ioctl MEDIA_IOC_G_TOPOLOGY</refentrytitle>
    &manvol;
  </refmeta>

  <refnamediv>
    <refname>MEDIA_IOC_G_TOPOLOGY</refname>
    <refpurpose>Enumerate the graph topology and graph element properties</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <funcsynopsis>
      <funcprototype>
	<funcdef>int <function>ioctl</function></funcdef>
	<paramdef>int <parameter>fd</parameter></paramdef>
	<paramdef>int <parameter>request</parameter></paramdef>
	<paramdef>struct media_v2_topology *<parameter>argp</parameter></paramdef>
      </funcprototype>
    </funcsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Arguments</title>

    <variablelist>
      <varlistentry>
	<term><parameter>fd</parameter></term>
	<listitem>
	  <para>File descriptor returned by
	  <link linkend='media-func-open'><function>open()</function></link>.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter>request</parameter></term>
	<listitem>
	  <para>MEDIA_IOC_G_TOPOLOGY</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter>argp</parameter></term>
	<listitem>
	  <para></para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para><emphasis role="bold">NOTE:</emphasis> This new ioctl is programmed to be added on Kernel 4.6. Its definition/arguments may change until its final version.</para>

    <para>The typical usage of this ioctl is to call it twice.
    On the first call, the structure defined at &media-v2-topology; should
    be zeroed. At return, if no errors happen, this ioctl will return the
    <constant>topology_version</constant> and the total number of entities,
    interfaces, pads and links.</para>
    <para>Before the second call, the userspace should allocate arrays to
    store the graph elements that are desired, putting the pointers to them
    at the ptr_entities, ptr_interfaces, ptr_links and/or ptr_pads, keeping
    the other values untouched.</para>
    <para>If the <constant>topology_version</constant> remains the same, the
    ioctl should fill the desired arrays with the media graph elements.</para>

    <table pgwide="1" frame="none" id="media-v2-topology">
      <title>struct <structname>media_v2_topology</structname></title>
      <tgroup cols="5">
	<colspec colname="c1" />
	<colspec colname="c2" />
	<colspec colname="c3" />
	<colspec colname="c4" />
	<colspec colname="c5" />
	<tbody valign="top">
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>topology_version</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Version of the media graph topology. When the graph is
		    created, this field starts with zero. Every time a graph
		    element is added or removed, this field is
		    incremented.</entry>
	  </row>
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>num_entities</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Number of entities in the graph</entry>
	  </row>
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>ptr_entities</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>A pointer to a memory area where the entities array
		   will be stored, converted to a 64-bits integer.
		   It can be zero. if zero, the ioctl won't store the
		   entities. It will just update
		   <constant>num_entities</constant></entry>
	  </row>
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>num_interfaces</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Number of interfaces in the graph</entry>
	  </row>
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>ptr_interfaces</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>A pointer to a memory area where the interfaces array
		   will be stored, converted to a 64-bits integer.
		   It can be zero. if zero, the ioctl won't store the
		   interfaces. It will just update
		   <constant>num_interfaces</constant></entry>
	  </row>
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>num_pads</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Total number of pads in the graph</entry>
	  </row>
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>ptr_pads</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>A pointer to a memory area where the pads array
		   will be stored, converted to a 64-bits integer.
		   It can be zero. if zero, the ioctl won't store the
		   pads. It will just update
		   <constant>num_pads</constant></entry>
	  </row>
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>num_links</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Total number of data and interface links in the graph</entry>
	  </row>
	  <row>
	    <entry>__u64</entry>
	    <entry><structfield>ptr_links</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>A pointer to a memory area where the links array
		   will be stored, converted to a 64-bits integer.
		   It can be zero. if zero, the ioctl won't store the
		   links. It will just update
		   <constant>num_links</constant></entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table pgwide="1" frame="none" id="media-v2-entity">
      <title>struct <structname>media_v2_entity</structname></title>
      <tgroup cols="5">
	<colspec colname="c1" />
	<colspec colname="c2" />
	<colspec colname="c3" />
	<colspec colname="c4" />
	<colspec colname="c5" />
	<tbody valign="top">
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>id</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Unique ID for the entity.</entry>
	  </row>
	  <row>
	    <entry>char</entry>
	    <entry><structfield>name</structfield>[64]</entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Entity name as an UTF-8 NULL-terminated string.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>function</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Entity main function, see <xref linkend="media-entity-type" /> for details.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>reserved</structfield>[12]</entry>
	    <entry>Reserved for future extensions. Drivers and applications must
	    set this array to zero.</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table pgwide="1" frame="none" id="media-v2-interface">
      <title>struct <structname>media_v2_interface</structname></title>
      <tgroup cols="5">
	<colspec colname="c1" />
	<colspec colname="c2" />
	<colspec colname="c3" />
	<colspec colname="c4" />
	<colspec colname="c5" />
	<tbody valign="top">
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>id</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Unique ID for the interface.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>intf_type</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Interface type, see <xref linkend="media-intf-type" /> for details.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>flags</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Interface flags. Currently unused.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>reserved</structfield>[9]</entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Reserved for future extensions. Drivers and applications must
	    set this array to zero.</entry>
	  </row>
	  <row>
	    <entry>struct media_v2_intf_devnode</entry>
	    <entry><structfield>devnode</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Used only for device node interfaces. See <xref linkend="media-v2-intf-devnode" /> for details..</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table pgwide="1" frame="none" id="media-v2-intf-devnode">
      <title>struct <structname>media_v2_interface</structname></title>
      <tgroup cols="5">
	<colspec colname="c1" />
	<colspec colname="c2" />
	<colspec colname="c3" />
	<colspec colname="c4" />
	<colspec colname="c5" />
	<tbody valign="top">
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>major</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Device node major number.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>minor</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Device node minor number.</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table pgwide="1" frame="none" id="media-v2-pad">
      <title>struct <structname>media_v2_pad</structname></title>
      <tgroup cols="5">
	<colspec colname="c1" />
	<colspec colname="c2" />
	<colspec colname="c3" />
	<colspec colname="c4" />
	<colspec colname="c5" />
	<tbody valign="top">
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>id</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Unique ID for the pad.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>entity_id</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Unique ID for the entity where this pad belongs.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>flags</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Pad flags, see <xref linkend="media-pad-flag" /> for more details.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>reserved</structfield>[9]</entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Reserved for future extensions. Drivers and applications must
	    set this array to zero.</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

    <table pgwide="1" frame="none" id="media-v2-link">
      <title>struct <structname>media_v2_pad</structname></title>
      <tgroup cols="5">
	<colspec colname="c1" />
	<colspec colname="c2" />
	<colspec colname="c3" />
	<colspec colname="c4" />
	<colspec colname="c5" />
	<tbody valign="top">
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>id</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Unique ID for the pad.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>source_id</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>
	       <para>On pad to pad links: unique ID for the source pad.</para>
	       <para>On interface to entity links: unique ID for the interface.</para>
	    </entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>sink_id</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>
	       <para>On pad to pad links: unique ID for the sink pad.</para>
	       <para>On interface to entity links: unique ID for the entity.</para>
	    </entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>flags</structfield></entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Link flags, see <xref linkend="media-link-flag" /> for more details.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
	    <entry><structfield>reserved</structfield>[5]</entry>
	    <entry></entry>
	    <entry></entry>
	    <entry>Reserved for future extensions. Drivers and applications must
	    set this array to zero.</entry>
	  </row>
	</tbody>
      </tgroup>
    </table>

  </refsect1>

  <refsect1>
    &return-value;

    <variablelist>
      <varlistentry>
	<term><errorcode>ENOSPC</errorcode></term>
	<listitem>
	  <para>This is returned when either one or more of the num_entities,
	  num_interfaces, num_links or num_pads are non-zero and are smaller
	  than the actual number of elements inside the graph. This may happen
	  if the <constant>topology_version</constant> changed when compared
	  to the last time this ioctl was called. Userspace should usually
	  free the area for the pointers, zero the struct elements and call
	  this ioctl again.</para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
</refentry>
Loading