xref: /OK3568_Linux_fs/kernel/Documentation/userspace-api/media/dvb/video-select-source.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
2*4882a593Smuzhiyun.. c:namespace:: DTV.video
3*4882a593Smuzhiyun
4*4882a593Smuzhiyun.. _VIDEO_SELECT_SOURCE:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun===================
7*4882a593SmuzhiyunVIDEO_SELECT_SOURCE
8*4882a593Smuzhiyun===================
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunName
11*4882a593Smuzhiyun----
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunVIDEO_SELECT_SOURCE
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun.. attention:: This ioctl is deprecated.
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunSynopsis
18*4882a593Smuzhiyun--------
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun.. c:macro:: VIDEO_SELECT_SOURCE
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun``int ioctl(fd, VIDEO_SELECT_SOURCE, video_stream_source_t source)``
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunArguments
25*4882a593Smuzhiyun---------
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun.. flat-table::
28*4882a593Smuzhiyun    :header-rows:  0
29*4882a593Smuzhiyun    :stub-columns: 0
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun    -  .. row 1
32*4882a593Smuzhiyun
33*4882a593Smuzhiyun       -  int fd
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun       -  File descriptor returned by a previous call to open().
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun    -  .. row 2
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun       -  int request
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun       -  Equals VIDEO_SELECT_SOURCE for this command.
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun    -  .. row 3
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun       -  video_stream_source_t source
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun       -  Indicates which source shall be used for the Video stream.
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunDescription
50*4882a593Smuzhiyun-----------
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunThis ioctl is for Digital TV devices only. This ioctl was also supported by the
53*4882a593SmuzhiyunV4L2 ivtv driver, but that has been replaced by the ivtv-specific
54*4882a593Smuzhiyun``IVTV_IOC_PASSTHROUGH_MODE`` ioctl.
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunThis ioctl call informs the video device which source shall be used for
57*4882a593Smuzhiyunthe input data. The possible sources are demux or memory. If memory is
58*4882a593Smuzhiyunselected, the data is fed to the video device through the write command.
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun.. c:type:: video_stream_source_t
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun.. code-block:: c
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun	typedef enum {
65*4882a593Smuzhiyun		VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */
66*4882a593Smuzhiyun		VIDEO_SOURCE_MEMORY /* If this source is selected, the stream
67*4882a593Smuzhiyun				comes from the user through the write
68*4882a593Smuzhiyun				system call */
69*4882a593Smuzhiyun	} video_stream_source_t;
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunReturn Value
72*4882a593Smuzhiyun------------
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunOn success 0 is returned, on error -1 and the ``errno`` variable is set
75*4882a593Smuzhiyunappropriately. The generic error codes are described at the
76*4882a593Smuzhiyun:ref:`Generic Error Codes <gen-errors>` chapter.
77