1 <refentry id="vidioc-g-sliced-vbi-cap">
3 <refentrytitle>ioctl VIDIOC_G_SLICED_VBI_CAP</refentrytitle>
8 <refname>VIDIOC_G_SLICED_VBI_CAP</refname>
9 <refpurpose>Query sliced VBI capabilities</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 v4l2_sliced_vbi_cap *<parameter>argp</parameter></paramdef>
24 <title>Arguments</title>
28 <term><parameter>fd</parameter></term>
34 <term><parameter>request</parameter></term>
36 <para>VIDIOC_G_SLICED_VBI_CAP</para>
40 <term><parameter>argp</parameter></term>
49 <title>Description</title>
51 <para>To find out which data services are supported by a sliced
52 VBI capture or output device, applications initialize the
53 <structfield>type</structfield> field of a &v4l2-sliced-vbi-cap;,
54 clear the <structfield>reserved</structfield> array and
55 call the <constant>VIDIOC_G_SLICED_VBI_CAP</constant> ioctl. The
56 driver fills in the remaining fields or returns an &EINVAL; if the
57 sliced VBI API is unsupported or <structfield>type</structfield>
60 <para>Note the <structfield>type</structfield> field was added,
61 and the ioctl changed from read-only to write-read, in Linux 2.6.19.</para>
63 <table pgwide="1" frame="none" id="v4l2-sliced-vbi-cap">
64 <title>struct <structname>v4l2_sliced_vbi_cap</structname></title>
66 <colspec colname="c1" colwidth="3*" />
67 <colspec colname="c2" colwidth="3*" />
68 <colspec colname="c3" colwidth="2*" />
69 <colspec colname="c4" colwidth="2*" />
70 <colspec colname="c5" colwidth="2*" />
71 <spanspec spanname="hspan" namest="c3" nameend="c5" />
75 <entry><structfield>service_set</structfield></entry>
76 <entry spanname="hspan">A set of all data services
77 supported by the driver. Equal to the union of all elements of the
78 <structfield>service_lines </structfield> array.</entry>
82 <entry><structfield>service_lines</structfield>[2][24]</entry>
83 <entry spanname="hspan">Each element of this array
84 contains a set of data services the hardware can look for or insert
85 into a particular scan line. Data services are defined in <xref
86 linkend="vbi-services" />. Array indices map to ITU-R
87 line numbers (see also <xref
88 linkend="vbi-525" /> and <xref
89 linkend="vbi-625" />) as follows:</entry>
94 <entry>Element</entry>
95 <entry>525 line systems</entry>
96 <entry>625 line systems</entry>
101 <entry><structfield>service_lines</structfield>[0][1]</entry>
102 <entry align="center">1</entry>
103 <entry align="center">1</entry>
108 <entry><structfield>service_lines</structfield>[0][23]</entry>
109 <entry align="center">23</entry>
110 <entry align="center">23</entry>
115 <entry><structfield>service_lines</structfield>[1][1]</entry>
116 <entry align="center">264</entry>
117 <entry align="center">314</entry>
122 <entry><structfield>service_lines</structfield>[1][23]</entry>
123 <entry align="center">286</entry>
124 <entry align="center">336</entry>
132 <entry spanname="hspan">The number of VBI lines the
133 hardware can capture or output per frame, or the number of services it
134 can identify on a given line may be limited. For example on PAL line
135 16 the hardware may be able to look for a VPS or Teletext signal, but
136 not both at the same time. Applications can learn about these limits
137 using the &VIDIOC-S-FMT; ioctl as described in <xref
138 linkend="sliced" />.</entry>
146 <entry spanname="hspan">Drivers must set
147 <structfield>service_lines</structfield>[0][0] and
148 <structfield>service_lines</structfield>[1][0] to zero.</entry>
151 <entry>&v4l2-buf-type;</entry>
152 <entry><structfield>type</structfield></entry>
153 <entry>Type of the data stream, see <xref
154 linkend="v4l2-buf-type" />. Should be
155 <constant>V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</constant> or
156 <constant>V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</constant>.</entry>
160 <entry><structfield>reserved</structfield>[3]</entry>
161 <entry spanname="hspan">This array is reserved for future
162 extensions. Applications and drivers must set it to zero.</entry>
168 <!-- See also dev-sliced-vbi.sgml -->
169 <table pgwide="1" frame="none" id="vbi-services">
170 <title>Sliced VBI services</title>
172 <colspec colname="c1" colwidth="2*" />
173 <colspec colname="c2" colwidth="1*" />
174 <colspec colname="c3" colwidth="1*" />
175 <colspec colname="c4" colwidth="2*" />
176 <colspec colname="c5" colwidth="2*" />
177 <spanspec spanname='rlp' namest='c3' nameend='c5' />
180 <entry>Symbol</entry>
182 <entry>Reference</entry>
183 <entry>Lines, usually</entry>
184 <entry>Payload</entry>
189 <entry><constant>V4L2_SLICED_TELETEXT_B</constant> (Teletext
191 <entry>0x0001</entry>
192 <entry><xref linkend="ets300706" />, <xref linkend="itu653" /></entry>
193 <entry>PAL/SECAM line 7-22, 320-335 (second field 7-22)</entry>
194 <entry>Last 42 of the 45 byte Teletext packet, that is
195 without clock run-in and framing code, lsb first transmitted.</entry>
198 <entry><constant>V4L2_SLICED_VPS</constant></entry>
199 <entry>0x0400</entry>
200 <entry><xref linkend="ets300231" /></entry>
201 <entry>PAL line 16</entry>
202 <entry>Byte number 3 to 15 according to Figure 9 of
203 ETS 300 231, lsb first transmitted.</entry>
206 <entry><constant>V4L2_SLICED_CAPTION_525</constant></entry>
207 <entry>0x1000</entry>
208 <entry><xref linkend="eia608" /></entry>
209 <entry>NTSC line 21, 284 (second field 21)</entry>
210 <entry>Two bytes in transmission order, including parity
211 bit, lsb first transmitted.</entry>
214 <entry><constant>V4L2_SLICED_WSS_625</constant></entry>
215 <entry>0x4000</entry>
216 <entry><xref linkend="en300294" />, <xref linkend="itu1119" /></entry>
217 <entry>PAL/SECAM line 23</entry>
221 Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
225 <entry><constant>V4L2_SLICED_VBI_525</constant></entry>
226 <entry>0x1000</entry>
227 <entry spanname="rlp">Set of services applicable to 525
228 line systems.</entry>
231 <entry><constant>V4L2_SLICED_VBI_625</constant></entry>
232 <entry>0x4401</entry>
233 <entry spanname="rlp">Set of services applicable to 625
234 line systems.</entry>
247 <term><errorcode>EINVAL</errorcode></term>
249 <para>The device does not support sliced VBI capturing or
250 output, or the value in the <structfield>type</structfield> field is
261 sgml-parent-document: "v4l2.sgml"
262 indent-tabs-mode: nil