Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / dmx-get-stc.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _DMX_GET_STC:
4
5 ===========
6 DMX_GET_STC
7 ===========
8
9 Name
10 ----
11
12 DMX_GET_STC
13
14
15 Synopsis
16 --------
17
18 .. c:function:: int ioctl( int fd, DMX_GET_STC, struct dmx_stc *stc)
19     :name: DMX_GET_STC
20
21 Arguments
22 ---------
23
24 ``fd``
25     File descriptor returned by :c:func:`open() <dvb-dmx-open>`.
26
27 ``stc``
28     Pointer to :c:type:`dmx_stc` where the stc data is to be stored.
29
30
31 Description
32 -----------
33
34 This ioctl call returns the current value of the system time counter
35 (which is driven by a PES filter of type :c:type:`DMX_PES_PCR <dmx_ts_pes>`).
36 Some hardware supports more than one STC, so you must specify which one by
37 setting the :c:type:`num <dmx_stc>` field of stc before the ioctl (range 0...n).
38 The result is returned in form of a ratio with a 64 bit numerator
39 and a 32 bit denominator, so the real 90kHz STC value is
40 ``stc->stc / stc->base``.
41
42
43 Return Value
44 ------------
45
46 On success 0 is returned.
47
48 On error -1 is returned, and the ``errno`` variable is set
49 appropriately.
50
51 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
52
53 .. flat-table::
54     :header-rows:  0
55     :stub-columns: 0
56     :widths: 1 16
57
58     -  .. row 1
59
60        -  ``EINVAL``
61
62        -  Invalid stc number.
63
64
65 The generic error codes are described at the
66 :ref:`Generic Error Codes <gen-errors>` chapter.