Home | History | Annotate | Download | only in linux
      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 __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)
     26 struct media_device_info {
     27   char driver[16];
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29   char model[32];
     30   char serial[40];
     31   char bus_info[32];
     32   __u32 media_version;
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34   __u32 hw_revision;
     35   __u32 driver_version;
     36   __u32 reserved[31];
     37 };
     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 */
     49 #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
     56 #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)
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59 #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2)
     60 #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)
     62 #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 */
     64 #define MEDIA_ENT_FL_DEFAULT (1 << 0)
     65 struct media_entity_desc {
     66   __u32 id;
     67   char name[32];
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69   __u32 type;
     70   __u32 revision;
     71   __u32 flags;
     72   __u32 group_id;
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74   __u16 pads;
     75   __u16 links;
     76   __u32 reserved[4];
     77   union {
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79     struct {
     80       __u32 major;
     81       __u32 minor;
     82     } 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 */
     94     } v4l;
     95     struct {
     96       __u32 major;
     97       __u32 minor;
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99     } fb;
    100     int dvb;
    101     __u8 raw[184];
    102   };
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104 };
    105 #define MEDIA_PAD_FL_SINK (1 << 0)
    106 #define MEDIA_PAD_FL_SOURCE (1 << 1)
    107 #define MEDIA_PAD_FL_MUST_CONNECT (1 << 2)
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109 struct media_pad_desc {
    110   __u32 entity;
    111   __u16 index;
    112   __u32 flags;
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114   __u32 reserved[2];
    115 };
    116 #define MEDIA_LNK_FL_ENABLED (1 << 0)
    117 #define MEDIA_LNK_FL_IMMUTABLE (1 << 1)
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119 #define MEDIA_LNK_FL_DYNAMIC (1 << 2)
    120 struct media_link_desc {
    121   struct media_pad_desc source;
    122   struct media_pad_desc sink;
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124   __u32 flags;
    125   __u32 reserved[2];
    126 };
    127 struct media_links_enum {
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129   __u32 entity;
    130   struct media_pad_desc __user * pads;
    131   struct media_link_desc __user * links;
    132   __u32 reserved[4];
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134 };
    135 #define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)
    136 #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc)
    137 #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139 #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
    140 #endif
    141