1
<refentry id="media-ioc-setup-link">
3
<refentrytitle>ioctl MEDIA_IOC_SETUP_LINK</refentrytitle>
8
<refname>MEDIA_IOC_SETUP_LINK</refname>
9
<refpurpose>Modify the properties of a link</refpurpose>
15
<funcdef>int <function>ioctl</function></funcdef>
16
<paramdef>int <parameter>fd</parameter></paramdef>
17
<paramdef>int <parameter>request</parameter></paramdef>
18
<paramdef>struct media_link_desc *<parameter>argp</parameter></paramdef>
24
<title>Arguments</title>
28
<term><parameter>fd</parameter></term>
30
<para>File descriptor returned by
31
<link linkend='media-func-open'><function>open()</function></link>.</para>
35
<term><parameter>request</parameter></term>
37
<para>MEDIA_IOC_SETUP_LINK</para>
41
<term><parameter>argp</parameter></term>
50
<title>Description</title>
52
<para>To change link properties applications fill a &media-link-desc; with
53
link identification information (source and sink pad) and the new requested
54
link flags. They then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to
55
that structure.</para>
56
<para>The only configurable property is the <constant>ENABLED</constant>
57
link flag to enable/disable a link. Links marked with the
58
<constant>IMMUTABLE</constant> link flag can not be enabled or disabled.
60
<para>Link configuration has no side effect on other links. If an enabled
61
link at the sink pad prevents the link from being enabled, the driver
62
returns with an &EBUSY;.</para>
63
<para>Only links marked with the <constant>DYNAMIC</constant> link flag can
64
be enabled/disabled while streaming media data. Attempting to enable or
65
disable a streaming non-dynamic link will return an &EBUSY;.</para>
66
<para>If the specified link can't be found the driver returns with an
75
<term><errorcode>EINVAL</errorcode></term>
77
<para>The &media-link-desc; references a non-existing link, or the
78
link is immutable and an attempt to modify its configuration was made.