blob: 9b9f46592ad4b718eff69044bcaa45958180bb71 [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 __LINUX_MEDIA_H
20#define __LINUX_MEDIA_H
21#include <linux/ioctl.h>
22#include <linux/types.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <linux/version.h>
25#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0)
26struct media_device_info {
Tao Baod7db5942015-01-28 10:07:51 -080027 char driver[16];
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 char model[32];
30 char serial[40];
31 char bus_info[32];
32 __u32 media_version;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 __u32 hw_revision;
35 __u32 driver_version;
36 __u32 reserved[31];
Ben Cheng655a7c02013-10-16 16:09:24 -070037};
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31)
40#define MEDIA_ENT_TYPE_SHIFT 16
41#define MEDIA_ENT_TYPE_MASK 0x00ff0000
42#define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define MEDIA_ENT_T_DEVNODE (1 << MEDIA_ENT_TYPE_SHIFT)
45#define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1)
46#define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2)
47#define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3)
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080049#define MEDIA_ENT_T_DEVNODE_DVB_FE (MEDIA_ENT_T_DEVNODE + 4)
50#define MEDIA_ENT_T_DEVNODE_DVB_DEMUX (MEDIA_ENT_T_DEVNODE + 5)
51#define MEDIA_ENT_T_DEVNODE_DVB_DVR (MEDIA_ENT_T_DEVNODE + 6)
52#define MEDIA_ENT_T_DEVNODE_DVB_CA (MEDIA_ENT_T_DEVNODE + 7)
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define MEDIA_ENT_T_DEVNODE_DVB_NET (MEDIA_ENT_T_DEVNODE + 8)
55#define MEDIA_ENT_T_DEVNODE_DVB MEDIA_ENT_T_DEVNODE_DVB_FE
Ben Cheng655a7c02013-10-16 16:09:24 -070056#define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT)
57#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -080059#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2)
Ben Cheng655a7c02013-10-16 16:09:24 -070060#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3)
61#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER (MEDIA_ENT_T_V4L2_SUBDEV + 4)
Christopher Ferris05d08e92016-02-04 13:16:38 -080062#define MEDIA_ENT_T_V4L2_SUBDEV_TUNER (MEDIA_ENT_T_V4L2_SUBDEV + 5)
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070064#define MEDIA_ENT_FL_DEFAULT (1 << 0)
65struct media_entity_desc {
Tao Baod7db5942015-01-28 10:07:51 -080066 __u32 id;
67 char name[32];
Christopher Ferris05d08e92016-02-04 13:16:38 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 __u32 type;
70 __u32 revision;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u32 flags;
72 __u32 group_id;
Christopher Ferris05d08e92016-02-04 13:16:38 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 __u16 pads;
75 __u16 links;
Tao Baod7db5942015-01-28 10:07:51 -080076 __u32 reserved[4];
77 union {
Christopher Ferris05d08e92016-02-04 13:16:38 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 struct {
80 __u32 major;
Tao Baod7db5942015-01-28 10:07:51 -080081 __u32 minor;
Christopher Ferris05d08e92016-02-04 13:16:38 -080082 } dev;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 struct {
85 __u32 card;
86 __u32 device;
87 __u32 subdevice;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 } alsa;
90 struct {
91 __u32 major;
92 __u32 minor;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 } v4l;
95 struct {
96 __u32 major;
Tao Baod7db5942015-01-28 10:07:51 -080097 __u32 minor;
Christopher Ferris05d08e92016-02-04 13:16:38 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 } fb;
Tao Baod7db5942015-01-28 10:07:51 -0800100 int dvb;
Tao Baod7db5942015-01-28 10:07:51 -0800101 __u8 raw[184];
102 };
Christopher Ferris05d08e92016-02-04 13:16:38 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700104};
105#define MEDIA_PAD_FL_SINK (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700106#define MEDIA_PAD_FL_SOURCE (1 << 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700107#define MEDIA_PAD_FL_MUST_CONNECT (1 << 2)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700109struct media_pad_desc {
Tao Baod7db5942015-01-28 10:07:51 -0800110 __u32 entity;
Tao Baod7db5942015-01-28 10:07:51 -0800111 __u16 index;
112 __u32 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114 __u32 reserved[2];
Ben Cheng655a7c02013-10-16 16:09:24 -0700115};
Christopher Ferris38062f92014-07-09 15:33:25 -0700116#define MEDIA_LNK_FL_ENABLED (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#define MEDIA_LNK_FL_IMMUTABLE (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700119#define MEDIA_LNK_FL_DYNAMIC (1 << 2)
120struct media_link_desc {
Tao Baod7db5942015-01-28 10:07:51 -0800121 struct media_pad_desc source;
122 struct media_pad_desc sink;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 __u32 flags;
125 __u32 reserved[2];
Christopher Ferris38062f92014-07-09 15:33:25 -0700126};
Ben Cheng655a7c02013-10-16 16:09:24 -0700127struct media_links_enum {
Christopher Ferris05d08e92016-02-04 13:16:38 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 __u32 entity;
130 struct media_pad_desc __user * pads;
Tao Baod7db5942015-01-28 10:07:51 -0800131 struct media_link_desc __user * links;
132 __u32 reserved[4];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700134};
135#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)
Christopher Ferris38062f92014-07-09 15:33:25 -0700136#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc)
Ben Cheng655a7c02013-10-16 16:09:24 -0700137#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700139#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
140#endif