Path: blob/master/Documentation/DocBook/v4l/media-ioc-setup-link.xml
10821 views
<refentry id="media-ioc-setup-link">1<refmeta>2<refentrytitle>ioctl MEDIA_IOC_SETUP_LINK</refentrytitle>3&manvol;4</refmeta>56<refnamediv>7<refname>MEDIA_IOC_SETUP_LINK</refname>8<refpurpose>Modify the properties of a link</refpurpose>9</refnamediv>1011<refsynopsisdiv>12<funcsynopsis>13<funcprototype>14<funcdef>int <function>ioctl</function></funcdef>15<paramdef>int <parameter>fd</parameter></paramdef>16<paramdef>int <parameter>request</parameter></paramdef>17<paramdef>struct media_link_desc *<parameter>argp</parameter></paramdef>18</funcprototype>19</funcsynopsis>20</refsynopsisdiv>2122<refsect1>23<title>Arguments</title>2425<variablelist>26<varlistentry>27<term><parameter>fd</parameter></term>28<listitem>29<para>File descriptor returned by30<link linkend='media-func-open'><function>open()</function></link>.</para>31</listitem>32</varlistentry>33<varlistentry>34<term><parameter>request</parameter></term>35<listitem>36<para>MEDIA_IOC_SETUP_LINK</para>37</listitem>38</varlistentry>39<varlistentry>40<term><parameter>argp</parameter></term>41<listitem>42<para></para>43</listitem>44</varlistentry>45</variablelist>46</refsect1>4748<refsect1>49<title>Description</title>5051<para>To change link properties applications fill a &media-link-desc; with52link identification information (source and sink pad) and the new requested53link flags. They then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to54that structure.</para>55<para>The only configurable property is the <constant>ENABLED</constant>56link flag to enable/disable a link. Links marked with the57<constant>IMMUTABLE</constant> link flag can not be enabled or disabled.58</para>59<para>Link configuration has no side effect on other links. If an enabled60link at the sink pad prevents the link from being enabled, the driver61returns with an &EBUSY;.</para>62<para>Only links marked with the <constant>DYNAMIC</constant> link flag can63be enabled/disabled while streaming media data. Attempting to enable or64disable a streaming non-dynamic link will return an &EBUSY;.</para>65<para>If the specified link can't be found the driver returns with an66&EINVAL;.</para>67</refsect1>6869<refsect1>70&return-value;7172<variablelist>73<varlistentry>74<term><errorcode>EBUSY</errorcode></term>75<listitem>76<para>The link properties can't be changed because the link is77currently busy. This can be caused, for instance, by an active media78stream (audio or video) on the link. The ioctl shouldn't be retried if79no other action is performed before to fix the problem.</para>80</listitem>81</varlistentry>82<varlistentry>83<term><errorcode>EINVAL</errorcode></term>84<listitem>85<para>The &media-link-desc; references a non-existing link, or the86link is immutable and an attempt to modify its configuration was made.87</para>88</listitem>89</varlistentry>90</variablelist>91</refsect1>92</refentry>939495