summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libc/kernel/common/linux/if.h11
-rw-r--r--libc/kernel/common/linux/if_vlan.h5
-rw-r--r--libc/kernel/common/linux/in_route.h40
-rw-r--r--libc/kernel/common/linux/msm_audio_sbc.h45
-rwxr-xr-x[-rw-r--r--]libc/kernel/common/linux/msm_vidc_dec.h50
-rw-r--r--libc/kernel/common/linux/msm_vidc_enc.h44
-rw-r--r--libc/kernel/common/media/msm_camera.h37
7 files changed, 178 insertions, 54 deletions
diff --git a/libc/kernel/common/linux/if.h b/libc/kernel/common/linux/if.h
index 47c29d9..6ceb869 100644
--- a/libc/kernel/common/linux/if.h
+++ b/libc/kernel/common/linux/if.h
@@ -17,6 +17,7 @@
#include <linux/compiler.h>
#define IFNAMSIZ 16
+#define IFALIASZ 256
#include <linux/hdlc/ioctl.h>
#define IFF_UP 0x1
@@ -42,13 +43,21 @@
#define IFF_LOWER_UP 0x10000
#define IFF_DORMANT 0x20000
-#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
+#define IFF_ECHO 0x40000
+
+#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO| IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
#define IFF_802_1Q_VLAN 0x1
#define IFF_EBRIDGE 0x2
#define IFF_SLAVE_INACTIVE 0x4
#define IFF_MASTER_8023AD 0x8
#define IFF_MASTER_ALB 0x10
+#define IFF_BONDING 0x20
+#define IFF_SLAVE_NEEDARP 0x40
+#define IFF_ISATAP 0x80
+#define IFF_MASTER_ARPMON 0x100
+#define IFF_WAN_HDLC 0x200
+#define IFF_XMIT_DST_RELEASE 0x400
#define IF_GET_IFACE 0x0001
#define IF_GET_PROTO 0x0002
diff --git a/libc/kernel/common/linux/if_vlan.h b/libc/kernel/common/linux/if_vlan.h
index d3d2df2..2e894be 100644
--- a/libc/kernel/common/linux/if_vlan.h
+++ b/libc/kernel/common/linux/if_vlan.h
@@ -25,6 +25,11 @@ enum vlan_ioctl_cmds {
GET_VLAN_VID_CMD
};
+enum vlan_flags {
+ VLAN_FLAG_REORDER_HDR = 0x1,
+ VLAN_FLAG_GVRP = 0x2,
+};
+
enum vlan_name_types {
VLAN_NAME_TYPE_PLUS_VID,
VLAN_NAME_TYPE_RAW_PLUS_VID,
diff --git a/libc/kernel/common/linux/in_route.h b/libc/kernel/common/linux/in_route.h
new file mode 100644
index 0000000..071824f
--- /dev/null
+++ b/libc/kernel/common/linux/in_route.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_IN_ROUTE_H
+#define _LINUX_IN_ROUTE_H
+
+#define RTCF_DEAD RTNH_F_DEAD
+#define RTCF_ONLINK RTNH_F_ONLINK
+
+#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC
+
+#define RTCF_NOTIFY 0x00010000
+#define RTCF_DIRECTDST 0x00020000
+#define RTCF_REDIRECTED 0x00040000
+#define RTCF_TPROXY 0x00080000
+
+#define RTCF_FAST 0x00200000
+#define RTCF_MASQ 0x00400000
+#define RTCF_SNAT 0x00800000
+#define RTCF_DOREDIRECT 0x01000000
+#define RTCF_DIRECTSRC 0x04000000
+#define RTCF_DNAT 0x08000000
+#define RTCF_BROADCAST 0x10000000
+#define RTCF_MULTICAST 0x20000000
+#define RTCF_REJECT 0x40000000
+#define RTCF_LOCAL 0x80000000
+
+#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
+
+#define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK)
+
+#endif
diff --git a/libc/kernel/common/linux/msm_audio_sbc.h b/libc/kernel/common/linux/msm_audio_sbc.h
new file mode 100644
index 0000000..322856c
--- /dev/null
+++ b/libc/kernel/common/linux/msm_audio_sbc.h
@@ -0,0 +1,45 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __MSM_AUDIO_SBC_H
+#define __MSM_AUDIO_SBC_H
+
+#include <linux/msm_audio.h>
+
+#define AUDIO_SET_SBC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM+0), struct msm_audio_sbc_enc_config)
+
+#define AUDIO_GET_SBC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM+1), struct msm_audio_sbc_enc_config)
+
+#define AUDIO_SBC_BA_LOUDNESS 0x0
+#define AUDIO_SBC_BA_SNR 0x1
+
+#define AUDIO_SBC_MODE_MONO 0x0
+#define AUDIO_SBC_MODE_DUAL 0x1
+#define AUDIO_SBC_MODE_STEREO 0x2
+#define AUDIO_SBC_MODE_JSTEREO 0x3
+
+#define AUDIO_SBC_BANDS_8 0x1
+
+#define AUDIO_SBC_BLOCKS_4 0x0
+#define AUDIO_SBC_BLOCKS_8 0x1
+#define AUDIO_SBC_BLOCKS_12 0x2
+#define AUDIO_SBC_BLOCKS_16 0x3
+
+struct msm_audio_sbc_enc_config {
+ uint32_t channels;
+ uint32_t sample_rate;
+ uint32_t bit_allocation;
+ uint32_t number_of_subbands;
+ uint32_t number_of_blocks;
+ uint32_t bit_rate;
+ uint32_t mode;
+};
+#endif
diff --git a/libc/kernel/common/linux/msm_vidc_dec.h b/libc/kernel/common/linux/msm_vidc_dec.h
index b4a8460..eaeb8b3 100644..100755
--- a/libc/kernel/common/linux/msm_vidc_dec.h
+++ b/libc/kernel/common/linux/msm_vidc_dec.h
@@ -83,8 +83,8 @@
#define VDEC_IOCTL_MAGIC 'v'
struct vdec_ioctl_msg {
- void *inputparam;
- void *outputparam;
+ void __user *in;
+ void __user *out;
};
#define VDEC_IOCTL_GET_PROFILE_LEVEL_SUPPORTED _IOWR(VDEC_IOCTL_MAGIC, 0, struct vdec_ioctl_msg)
@@ -153,17 +153,17 @@ struct vdec_allocatorproperty {
uint32_t mincount;
uint32_t maxcount;
uint32_t actualcount;
- uint32_t buffer_size;
+ size_t buffer_size;
uint32_t alignment;
uint32_t buf_poolid;
};
struct vdec_bufferpayload {
- uint8_t *bufferaddr;
- uint32_t buffer_len;
+ void __user *bufferaddr;
+ size_t buffer_len;
int pmem_fd;
- uint32_t offset;
- uint32_t mmaped_size;
+ size_t offset;
+ size_t mmaped_size;
};
struct vdec_setbuffer_cmd {
@@ -404,40 +404,39 @@ struct vdec_picsize {
};
struct vdec_seqheader {
- uint8_t *ptr_seqheader;
- uint32_t seq_header_len;
+ void __user *ptr_seqheader;
+ size_t seq_header_len;
int pmem_fd;
- uint32_t pmem_offset;
+ size_t pmem_offset;
};
struct vdec_mberror {
- uint8_t *ptr_errormap;
- uint32_t err_mapsize;
+ void __user *ptr_errormap;
+ size_t err_mapsize;
};
struct vdec_input_frameinfo {
- uint8_t *bufferaddr;
- uint32_t offset;
- uint32_t datalen;
+ void __user *bufferaddr;
+ size_t offset;
+ size_t datalen;
uint32_t flags;
int64_t timestamp;
void *client_data;
int pmem_fd;
- uint32_t pmem_offset;
+ size_t pmem_offset;
};
struct vdec_framesize {
- uint32_t n_left;
- uint32_t n_top;
- uint32_t n_right;
- uint32_t n_bottom;
+ uint32_t left;
+ uint32_t top;
+ uint32_t right;
+ uint32_t bottom;
};
struct vdec_output_frameinfo {
- uint8_t *phy_addr;
- uint8_t *bufferaddr;
- uint32_t offset;
- uint32_t len;
+ void __user *bufferaddr;
+ size_t offset;
+ size_t len;
uint32_t flags;
int64_t time_stamp;
void *client_data;
@@ -454,7 +453,6 @@ struct vdec_msginfo {
uint32_t status_code;
uint32_t msgcode;
union vdec_msgdata msgdata;
- uint32_t msgdatasize;
+ size_t msgdatasize;
};
#endif
-
diff --git a/libc/kernel/common/linux/msm_vidc_enc.h b/libc/kernel/common/linux/msm_vidc_enc.h
index 9de4953..9183b70 100644
--- a/libc/kernel/common/linux/msm_vidc_enc.h
+++ b/libc/kernel/common/linux/msm_vidc_enc.h
@@ -74,22 +74,22 @@
#define VEN_PROFILE_H264_HIGH 5
#define VEN_PROFILE_H263_BASELINE 6
-#define VEN_LEVEL_MPEG4_0 0x1
-#define VEN_LEVEL_MPEG4_1 0x2
-#define VEN_LEVEL_MPEG4_2 0x3
-#define VEN_LEVEL_MPEG4_3 0x4
-#define VEN_LEVEL_MPEG4_4 0x5
-#define VEN_LEVEL_MPEG4_5 0x6
-#define VEN_LEVEL_MPEG4_3b 0x7
-#define VEN_LEVEL_MPEG4_6 0x8
-
-#define VEN_LEVEL_H264_1 0x9
-#define VEN_LEVEL_H264_1b 0xA
-#define VEN_LEVEL_H264_1p1 0xB
-#define VEN_LEVEL_H264_1p2 0xC
-#define VEN_LEVEL_H264_1p3 0xD
-#define VEN_LEVEL_H264_2 0xE
-#define VEN_LEVEL_H264_2p1 0xF
+#define VEN_LEVEL_MPEG4_0 0x1
+#define VEN_LEVEL_MPEG4_1 0x2
+#define VEN_LEVEL_MPEG4_2 0x3
+#define VEN_LEVEL_MPEG4_3 0x4
+#define VEN_LEVEL_MPEG4_4 0x5
+#define VEN_LEVEL_MPEG4_5 0x6
+#define VEN_LEVEL_MPEG4_3b 0x7
+#define VEN_LEVEL_MPEG4_6 0x8
+
+#define VEN_LEVEL_H264_1 0x9
+#define VEN_LEVEL_H264_1b 0xA
+#define VEN_LEVEL_H264_1p1 0xB
+#define VEN_LEVEL_H264_1p2 0xC
+#define VEN_LEVEL_H264_1p3 0xD
+#define VEN_LEVEL_H264_2 0xE
+#define VEN_LEVEL_H264_2p1 0xF
#define VEN_LEVEL_H264_2p2 0x10
#define VEN_LEVEL_H264_3 0x11
#define VEN_LEVEL_H264_3p1 0x12
@@ -130,7 +130,8 @@
#define VEN_FLUSH_ALL 3
#define VEN_INPUTFMT_NV12 1
-#define VEN_INPUTFMT_NV21 2
+#define VEN_INPUTFMT_NV21 2
+#define VEN_INPUTFMT_NV12_16M2KA 3
#define VEN_ROTATION_0 1
#define VEN_ROTATION_90 2
@@ -148,8 +149,8 @@
#define VEN_IOCTLBASE_ENC 0x850
struct venc_ioctl_msg{
- void *inputparam;
- void *outputparam;
+ void __user *in;
+ void __user *out;
};
#define VEN_IOCTL_SET_INTF_VERSION _IOW(VEN_IOCTLBASE_NENC, 0, struct venc_ioctl_msg)
@@ -276,7 +277,7 @@ struct venc_allocatorproperty{
struct venc_bufferpayload{
unsigned char *pbuffer;
- unsigned long nsize;
+ size_t sz;
int fd;
unsigned int offset;
unsigned int maped_size;
@@ -285,7 +286,7 @@ struct venc_bufferpayload{
struct venc_buffer{
unsigned char *ptrbuffer;
- unsigned long size;
+ unsigned long sz;
unsigned long len;
unsigned long offset;
long long timestamp;
@@ -400,4 +401,3 @@ struct venc_msg{
unsigned long msgdata_size;
};
#endif
-
diff --git a/libc/kernel/common/media/msm_camera.h b/libc/kernel/common/media/msm_camera.h
index a7cc621..5a07ac9 100644
--- a/libc/kernel/common/media/msm_camera.h
+++ b/libc/kernel/common/media/msm_camera.h
@@ -18,7 +18,11 @@
#include <linux/types.h>
#include <asm/sizes.h>
#include <linux/ioctl.h>
+#ifdef MSM_CAMERA_GCC
+#include <time.h>
+#else
#include <linux/time.h>
+#endif
#define MSM_CAM_IOCTL_MAGIC 'm'
@@ -64,6 +68,10 @@
#define MSM_CAM_IOCTL_SENSOR_IO_CFG _IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *)
+#define MSM_CAM_IOCTL_CONFIG_VPE _IOW(MSM_CAM_IOCTL_MAGIC, 27, struct msm_camera_vpe_cfg_cmd *)
+
+#define MSM_CAM_IOCTL_AXI_VPE_CONFIG _IOW(MSM_CAM_IOCTL_MAGIC, 28, struct msm_camera_vpe_cfg_cmd *)
+
#define MSM_CAMERA_LED_OFF 0
#define MSM_CAMERA_LED_LOW 1
#define MSM_CAMERA_LED_HIGH 2
@@ -101,6 +109,15 @@ struct msm_vfe_evt_msg {
unsigned short type;
unsigned short msg_id;
unsigned int len;
+ uint32_t frame_id;
+ void *data;
+};
+
+struct msm_vpe_evt_msg {
+ unsigned short type;
+ unsigned short msg_id;
+ unsigned int len;
+ uint32_t frame_id;
void *data;
};
@@ -174,6 +191,8 @@ struct msm_camera_cfg_cmd {
#define CMD_STATS_IHIST_ENABLE 38
#define CMD_STATS_RS_ENABLE 39
#define CMD_STATS_CS_ENABLE 40
+#define CMD_VPE 41
+#define CMD_AXI_CFG_VPE 42
struct msm_vfe_cfg_cmd {
int cmd_type;
@@ -181,6 +200,12 @@ struct msm_vfe_cfg_cmd {
void *value;
};
+struct msm_vpe_cfg_cmd {
+ int cmd_type;
+ uint16_t length;
+ void *value;
+};
+
#define MAX_CAMERA_ENABLE_NAME_LEN 32
struct camera_enable_cmd {
char name[MAX_CAMERA_ENABLE_NAME_LEN];
@@ -202,7 +227,8 @@ struct camera_enable_cmd {
#define MSM_PMEM_SKIN 13
#define MSM_PMEM_VIDEO 14
#define MSM_PMEM_PREVIEW 15
-#define MSM_PMEM_MAX 16
+#define MSM_PMEM_VIDEO_VPE 16
+#define MSM_PMEM_MAX 17
#define STAT_AEAW 0
#define STAT_AEC 1
@@ -253,10 +279,11 @@ struct outputCfg {
#define MSM_FRAME_PREV_2 1
#define MSM_FRAME_ENC 2
-#define OUTPUT_TYPE_P 1
-#define OUTPUT_TYPE_T 2
-#define OUTPUT_TYPE_S 3
-#define OUTPUT_TYPE_V 4
+#define OUTPUT_TYPE_P (1<<0)
+#define OUTPUT_TYPE_T (1<<1)
+#define OUTPUT_TYPE_S (1<<2)
+#define OUTPUT_TYPE_V (1<<3)
+#define OUTPUT_TYPE_L (1<<4)
struct msm_frame {
struct timespec ts;