blob: 438c832033674bbff7e449b2ffd08a7849e2c2f8 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define DMX_FILTER_SIZE 16
Christopher Ferris05d08e92016-02-04 13:16:38 -080024enum dmx_output {
Tao Baod7db5942015-01-28 10:07:51 -080025 DMX_OUT_DECODER,
26 DMX_OUT_TAP,
Tao Baod7db5942015-01-28 10:07:51 -080027 DMX_OUT_TS_TAP,
28 DMX_OUT_TSDEMUX_TAP
Christopher Ferris05d08e92016-02-04 13:16:38 -080029};
30typedef enum dmx_output dmx_output_t;
Christopher Ferris05d08e92016-02-04 13:16:38 -080031typedef enum dmx_input {
Tao Baod7db5942015-01-28 10:07:51 -080032 DMX_IN_FRONTEND,
33 DMX_IN_DVR
Ben Cheng655a7c02013-10-16 16:09:24 -070034} dmx_input_t;
Christopher Ferris05d08e92016-02-04 13:16:38 -080035typedef enum dmx_ts_pes {
Tao Baod7db5942015-01-28 10:07:51 -080036 DMX_PES_AUDIO0,
37 DMX_PES_VIDEO0,
38 DMX_PES_TELETEXT0,
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 DMX_PES_SUBTITLE0,
Tao Baod7db5942015-01-28 10:07:51 -080040 DMX_PES_PCR0,
41 DMX_PES_AUDIO1,
42 DMX_PES_VIDEO1,
Christopher Ferris05d08e92016-02-04 13:16:38 -080043 DMX_PES_TELETEXT1,
Tao Baod7db5942015-01-28 10:07:51 -080044 DMX_PES_SUBTITLE1,
45 DMX_PES_PCR1,
46 DMX_PES_AUDIO2,
Christopher Ferris05d08e92016-02-04 13:16:38 -080047 DMX_PES_VIDEO2,
Tao Baod7db5942015-01-28 10:07:51 -080048 DMX_PES_TELETEXT2,
49 DMX_PES_SUBTITLE2,
50 DMX_PES_PCR2,
Christopher Ferris05d08e92016-02-04 13:16:38 -080051 DMX_PES_AUDIO3,
Tao Baod7db5942015-01-28 10:07:51 -080052 DMX_PES_VIDEO3,
53 DMX_PES_TELETEXT3,
54 DMX_PES_SUBTITLE3,
Christopher Ferris05d08e92016-02-04 13:16:38 -080055 DMX_PES_PCR3,
Tao Baod7db5942015-01-28 10:07:51 -080056 DMX_PES_OTHER
Ben Cheng655a7c02013-10-16 16:09:24 -070057} dmx_pes_type_t;
58#define DMX_PES_AUDIO DMX_PES_AUDIO0
Christopher Ferris05d08e92016-02-04 13:16:38 -080059#define DMX_PES_VIDEO DMX_PES_VIDEO0
Tao Baod7db5942015-01-28 10:07:51 -080060#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
Ben Cheng655a7c02013-10-16 16:09:24 -070061#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
62#define DMX_PES_PCR DMX_PES_PCR0
Christopher Ferris05d08e92016-02-04 13:16:38 -080063typedef struct dmx_filter {
Tao Baod7db5942015-01-28 10:07:51 -080064 __u8 filter[DMX_FILTER_SIZE];
65 __u8 mask[DMX_FILTER_SIZE];
66 __u8 mode[DMX_FILTER_SIZE];
Christopher Ferris05d08e92016-02-04 13:16:38 -080067} dmx_filter_t;
Tao Baod7db5942015-01-28 10:07:51 -080068struct dmx_sct_filter_params {
69 __u16 pid;
70 dmx_filter_t filter;
Christopher Ferris05d08e92016-02-04 13:16:38 -080071 __u32 timeout;
Tao Baod7db5942015-01-28 10:07:51 -080072 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070073#define DMX_CHECK_CRC 1
74#define DMX_ONESHOT 2
Christopher Ferris05d08e92016-02-04 13:16:38 -080075#define DMX_IMMEDIATE_START 4
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define DMX_KERNEL_CLIENT 0x8000
77};
Tao Baod7db5942015-01-28 10:07:51 -080078struct dmx_pes_filter_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -080079 __u16 pid;
Tao Baod7db5942015-01-28 10:07:51 -080080 dmx_input_t input;
81 dmx_output_t output;
82 dmx_pes_type_t pes_type;
Christopher Ferris05d08e92016-02-04 13:16:38 -080083 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070084};
85typedef struct dmx_caps {
Tao Baod7db5942015-01-28 10:07:51 -080086 __u32 caps;
87 int num_decoders;
Ben Cheng655a7c02013-10-16 16:09:24 -070088} dmx_caps_t;
Christopher Ferris05d08e92016-02-04 13:16:38 -080089typedef enum dmx_source {
Tao Baod7db5942015-01-28 10:07:51 -080090 DMX_SOURCE_FRONT0 = 0,
Christopher Ferris05d08e92016-02-04 13:16:38 -080091 DMX_SOURCE_FRONT1,
Tao Baod7db5942015-01-28 10:07:51 -080092 DMX_SOURCE_FRONT2,
93 DMX_SOURCE_FRONT3,
94 DMX_SOURCE_DVR0 = 16,
Christopher Ferris05d08e92016-02-04 13:16:38 -080095 DMX_SOURCE_DVR1,
Tao Baod7db5942015-01-28 10:07:51 -080096 DMX_SOURCE_DVR2,
97 DMX_SOURCE_DVR3
Ben Cheng655a7c02013-10-16 16:09:24 -070098} dmx_source_t;
Christopher Ferris05d08e92016-02-04 13:16:38 -080099struct dmx_stc {
Tao Baod7db5942015-01-28 10:07:51 -0800100 unsigned int num;
101 unsigned int base;
102 __u64 stc;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800103};
Ben Cheng655a7c02013-10-16 16:09:24 -0700104#define DMX_START _IO('o', 41)
105#define DMX_STOP _IO('o', 42)
Ben Cheng655a7c02013-10-16 16:09:24 -0700106#define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800107#define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
Ben Cheng655a7c02013-10-16 16:09:24 -0700108#define DMX_SET_BUFFER_SIZE _IO('o', 45)
109#define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800111#define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t)
Ben Cheng655a7c02013-10-16 16:09:24 -0700112#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
113#define DMX_ADD_PID _IOW('o', 51, __u16)
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define DMX_REMOVE_PID _IOW('o', 52, __u16)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800115#endif