1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_DVBDMX_H_
20#define _UAPI_DVBDMX_H_
21#include <linux/types.h>
22#include <time.h>
23#define DMX_FILTER_SIZE 16
24enum dmx_output {
25  DMX_OUT_DECODER,
26  DMX_OUT_TAP,
27  DMX_OUT_TS_TAP,
28  DMX_OUT_TSDEMUX_TAP
29};
30typedef enum dmx_output dmx_output_t;
31typedef enum dmx_input {
32  DMX_IN_FRONTEND,
33  DMX_IN_DVR
34} dmx_input_t;
35typedef enum dmx_ts_pes {
36  DMX_PES_AUDIO0,
37  DMX_PES_VIDEO0,
38  DMX_PES_TELETEXT0,
39  DMX_PES_SUBTITLE0,
40  DMX_PES_PCR0,
41  DMX_PES_AUDIO1,
42  DMX_PES_VIDEO1,
43  DMX_PES_TELETEXT1,
44  DMX_PES_SUBTITLE1,
45  DMX_PES_PCR1,
46  DMX_PES_AUDIO2,
47  DMX_PES_VIDEO2,
48  DMX_PES_TELETEXT2,
49  DMX_PES_SUBTITLE2,
50  DMX_PES_PCR2,
51  DMX_PES_AUDIO3,
52  DMX_PES_VIDEO3,
53  DMX_PES_TELETEXT3,
54  DMX_PES_SUBTITLE3,
55  DMX_PES_PCR3,
56  DMX_PES_OTHER
57} dmx_pes_type_t;
58#define DMX_PES_AUDIO DMX_PES_AUDIO0
59#define DMX_PES_VIDEO DMX_PES_VIDEO0
60#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
61#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
62#define DMX_PES_PCR DMX_PES_PCR0
63typedef struct dmx_filter {
64  __u8 filter[DMX_FILTER_SIZE];
65  __u8 mask[DMX_FILTER_SIZE];
66  __u8 mode[DMX_FILTER_SIZE];
67} dmx_filter_t;
68struct dmx_sct_filter_params {
69  __u16 pid;
70  dmx_filter_t filter;
71  __u32 timeout;
72  __u32 flags;
73#define DMX_CHECK_CRC 1
74#define DMX_ONESHOT 2
75#define DMX_IMMEDIATE_START 4
76#define DMX_KERNEL_CLIENT 0x8000
77};
78struct dmx_pes_filter_params {
79  __u16 pid;
80  dmx_input_t input;
81  dmx_output_t output;
82  dmx_pes_type_t pes_type;
83  __u32 flags;
84};
85typedef struct dmx_caps {
86  __u32 caps;
87  int num_decoders;
88} dmx_caps_t;
89typedef enum dmx_source {
90  DMX_SOURCE_FRONT0 = 0,
91  DMX_SOURCE_FRONT1,
92  DMX_SOURCE_FRONT2,
93  DMX_SOURCE_FRONT3,
94  DMX_SOURCE_DVR0 = 16,
95  DMX_SOURCE_DVR1,
96  DMX_SOURCE_DVR2,
97  DMX_SOURCE_DVR3
98} dmx_source_t;
99struct dmx_stc {
100  unsigned int num;
101  unsigned int base;
102  __u64 stc;
103};
104#define DMX_START _IO('o', 41)
105#define DMX_STOP _IO('o', 42)
106#define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
107#define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
108#define DMX_SET_BUFFER_SIZE _IO('o', 45)
109#define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
110#define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t)
111#define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t)
112#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
113#define DMX_ADD_PID _IOW('o', 51, __u16)
114#define DMX_REMOVE_PID _IOW('o', 52, __u16)
115#endif
116