am d565791c: am 4f483fb7: Merge "Restore linux/elf-em.h."

# Via Android Git Automerger (1) and others
* commit 'd565791caf490dbb2632f62c32a700d6805d6df3':
  Restore linux/elf-em.h.
diff --git a/original/linux/mfd/msm-adie-codec.h b/original/linux/mfd/msm-adie-codec.h
deleted file mode 100644
index 651d34a..0000000
--- a/original/linux/mfd/msm-adie-codec.h
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifndef __LINUX_MFD_MSM_ADIE_CODEC_H
-#define __LINUX_MFD_MSM_ADIE_CODEC_H
-
-#include <linux/types.h>
-
-/* Value Represents a entry */
-#define ADIE_CODEC_ACTION_ENTRY       0x1
-/* Value representing a delay wait */
-#define ADIE_CODEC_ACTION_DELAY_WAIT      0x2
-/* Value representing a stage reached */
-#define ADIE_CODEC_ACTION_STAGE_REACHED   0x3
-
-/* This value is the state after the client sets the path */
-#define ADIE_CODEC_PATH_OFF                                        0x0050
-
-/* State to which client asks the drv to proceed to where it can
- * set up the clocks and 0-fill PCM buffers
- */
-#define ADIE_CODEC_DIGITAL_READY                                   0x0100
-
-/* State to which client asks the drv to proceed to where it can
- * start sending data after internal steady state delay
- */
-#define ADIE_CODEC_DIGITAL_ANALOG_READY                            0x1000
-
-
-/*  Client Asks adie to switch off the Analog portion of the
- *  the internal codec. After the use of this path
- */
-#define ADIE_CODEC_ANALOG_OFF                                      0x0750
-
-
-/* Client Asks adie to switch off the digital portion of the
- *  the internal codec. After switching off the analog portion.
- *
- *  0-fill PCM may or maynot be sent at this point
- *
- */
-#define ADIE_CODEC_DIGITAL_OFF                                     0x0600
-
-/* State to which client asks the drv to write the default values
- * to the registers */
-#define ADIE_CODEC_FLASH_IMAGE 					   0x0001
-
-/* Path type */
-#define ADIE_CODEC_RX 0
-#define ADIE_CODEC_TX 1
-#define ADIE_CODEC_LB 3
-#define ADIE_CODEC_MAX 4
-
-#define ADIE_CODEC_PACK_ENTRY(reg, mask, val) ((val)|(mask << 8)|(reg << 16))
-
-#define ADIE_CODEC_UNPACK_ENTRY(packed, reg, mask, val) \
-	do { \
-		((reg) = ((packed >> 16) & (0xff))); \
-		((mask) = ((packed >> 8) & (0xff))); \
-		((val) = ((packed) & (0xff))); \
-	} while (0);
-
-struct adie_codec_action_unit {
-	u32 type;
-	u32 action;
-};
-
-struct adie_codec_hwsetting_entry{
-	struct adie_codec_action_unit *actions;
-	u32 action_sz;
-	u32 freq_plan;
-	u32 osr;
-	/* u32  VolMask;
-	 * u32  SidetoneMask;
-	 */
-};
-
-struct adie_codec_dev_profile {
-	u32 path_type; /* RX or TX */
-	u32 setting_sz;
-	struct adie_codec_hwsetting_entry *settings;
-};
-
-struct adie_codec_register {
-	u8 reg;
-	u8 mask;
-	u8 val;
-};
-
-struct adie_codec_register_image {
-	struct adie_codec_register *regs;
-	u32 img_sz;
-};
-
-struct adie_codec_path;
-
-struct adie_codec_anc_data {
-	u32 size;
-	u32 writes[];
-};
-
-struct adie_codec_operations {
-	int	 codec_id;
-	int (*codec_open) (struct adie_codec_dev_profile *profile,
-				struct adie_codec_path **path_pptr);
-	int (*codec_close) (struct adie_codec_path *path_ptr);
-	int (*codec_setpath) (struct adie_codec_path *path_ptr,
-				u32 freq_plan, u32 osr);
-	int (*codec_proceed_stage) (struct adie_codec_path *path_ptr,
-					u32 state);
-	u32 (*codec_freq_supported) (struct adie_codec_dev_profile *profile,
-					u32 requested_freq);
-	int (*codec_enable_sidetone) (struct adie_codec_path *rx_path_ptr,
-					u32 enable);
-	int (*codec_enable_anc) (struct adie_codec_path *rx_path_ptr,
-		u32 enable, struct adie_codec_anc_data *calibration_writes);
-	int (*codec_set_device_digital_volume) (
-					struct adie_codec_path *path_ptr,
-					u32 num_channels,
-					u32 vol_percentage);
-
-	int (*codec_set_device_analog_volume) (struct adie_codec_path *path_ptr,
-						u32 num_channels,
-						u32 volume);
-	int (*codec_set_master_mode) (struct adie_codec_path *path_ptr,
-					u8 master);
-};
-
-int adie_codec_register_codec_operations(
-				const struct adie_codec_operations *codec_ops);
-int adie_codec_open(struct adie_codec_dev_profile *profile,
-	struct adie_codec_path **path_pptr);
-int adie_codec_setpath(struct adie_codec_path *path_ptr,
-	u32 freq_plan, u32 osr);
-int adie_codec_proceed_stage(struct adie_codec_path *path_ptr, u32 state);
-int adie_codec_close(struct adie_codec_path *path_ptr);
-u32 adie_codec_freq_supported(struct adie_codec_dev_profile *profile,
-							u32 requested_freq);
-int adie_codec_enable_sidetone(struct adie_codec_path *rx_path_ptr, u32 enable);
-int adie_codec_enable_anc(struct adie_codec_path *rx_path_ptr, u32 enable,
-	struct adie_codec_anc_data *calibration_writes);
-int adie_codec_set_device_digital_volume(struct adie_codec_path *path_ptr,
-		u32 num_channels, u32 vol_percentage /* in percentage */);
-
-int adie_codec_set_device_analog_volume(struct adie_codec_path *path_ptr,
-		u32 num_channels, u32 volume /* in percentage */);
-
-int adie_codec_set_master_mode(struct adie_codec_path *path_ptr, u8 master);
-#endif
diff --git a/original/linux/msm_adsp.h b/original/linux/msm_adsp.h
deleted file mode 100644
index f6ab29d..0000000
--- a/original/linux/msm_adsp.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- ***   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_MSM_ADSP_H
-#define __LINUX_MSM_ADSP_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-#define ADSP_IOCTL_MAGIC 'q'
-
-struct adsp_command_t {
- uint16_t queue;
- uint32_t len;
- uint8_t *data;
-};
-
-struct adsp_event_t {
- uint16_t type;
- uint32_t timeout_ms;
- uint16_t msg_id;
- uint16_t flags;
- uint32_t len;
- uint8_t *data;
-};
-
-#define ADSP_IOCTL_ENABLE   _IOR(ADSP_IOCTL_MAGIC, 1, unsigned)
-
-#define ADSP_IOCTL_DISABLE   _IOR(ADSP_IOCTL_MAGIC, 2, unsigned)
-
-#define ADSP_IOCTL_DISABLE_ACK   _IOR(ADSP_IOCTL_MAGIC, 3, unsigned)
-
-#define ADSP_IOCTL_WRITE_COMMAND   _IOR(ADSP_IOCTL_MAGIC, 4, struct adsp_command_t *)
-
-#define ADSP_IOCTL_GET_EVENT   _IOWR(ADSP_IOCTL_MAGIC, 5, struct adsp_event_data_t *)
-
-#define ADSP_IOCTL_SET_CLKRATE   _IOR(ADSP_IOCTL_MAGIC, 6, unsigned)
-
-#define ADSP_IOCTL_DISABLE_EVENT_RSP   _IOR(ADSP_IOCTL_MAGIC, 10, unsigned)
-
-struct adsp_pmem_info {
- int fd;
- void *vaddr;
-};
-
-#define ADSP_IOCTL_REGISTER_PMEM   _IOW(ADSP_IOCTL_MAGIC, 13, unsigned)
-
-#define ADSP_IOCTL_UNREGISTER_PMEM   _IOW(ADSP_IOCTL_MAGIC, 14, unsigned)
-
-#define ADSP_IOCTL_ABORT_EVENT_READ   _IOW(ADSP_IOCTL_MAGIC, 15, unsigned)
-
-#define ADSP_IOCTL_LINK_TASK   _IOW(ADSP_IOCTL_MAGIC, 16, unsigned)
-
-#endif
-
diff --git a/original/linux/msm_audio.h b/original/linux/msm_audio.h
deleted file mode 100644
index f2a39e4..0000000
--- a/original/linux/msm_audio.h
+++ /dev/null
@@ -1,367 +0,0 @@
-/* include/linux/msm_audio.h
- *
- * Copyright (C) 2008 Google, Inc.
- * Copyright (c) 2012 Code Aurora Forum. All rights reserved.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_MSM_AUDIO_H
-#define __LINUX_MSM_AUDIO_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-/* PCM Audio */
-
-#define AUDIO_IOCTL_MAGIC 'a'
-
-#define AUDIO_START        _IOW(AUDIO_IOCTL_MAGIC, 0, unsigned)
-#define AUDIO_STOP         _IOW(AUDIO_IOCTL_MAGIC, 1, unsigned)
-#define AUDIO_FLUSH        _IOW(AUDIO_IOCTL_MAGIC, 2, unsigned)
-#define AUDIO_GET_CONFIG   _IOR(AUDIO_IOCTL_MAGIC, 3, unsigned)
-#define AUDIO_SET_CONFIG   _IOW(AUDIO_IOCTL_MAGIC, 4, unsigned)
-#define AUDIO_GET_STATS    _IOR(AUDIO_IOCTL_MAGIC, 5, unsigned)
-#define AUDIO_ENABLE_AUDPP _IOW(AUDIO_IOCTL_MAGIC, 6, unsigned)
-#define AUDIO_SET_ADRC     _IOW(AUDIO_IOCTL_MAGIC, 7, unsigned)
-#define AUDIO_SET_EQ       _IOW(AUDIO_IOCTL_MAGIC, 8, unsigned)
-#define AUDIO_SET_RX_IIR   _IOW(AUDIO_IOCTL_MAGIC, 9, unsigned)
-#define AUDIO_SET_VOLUME   _IOW(AUDIO_IOCTL_MAGIC, 10, unsigned)
-#define AUDIO_PAUSE        _IOW(AUDIO_IOCTL_MAGIC, 11, unsigned)
-#define AUDIO_PLAY_DTMF    _IOW(AUDIO_IOCTL_MAGIC, 12, unsigned)
-#define AUDIO_GET_EVENT    _IOR(AUDIO_IOCTL_MAGIC, 13, unsigned)
-#define AUDIO_ABORT_GET_EVENT _IOW(AUDIO_IOCTL_MAGIC, 14, unsigned)
-#define AUDIO_REGISTER_PMEM _IOW(AUDIO_IOCTL_MAGIC, 15, unsigned)
-#define AUDIO_DEREGISTER_PMEM _IOW(AUDIO_IOCTL_MAGIC, 16, unsigned)
-#define AUDIO_ASYNC_WRITE _IOW(AUDIO_IOCTL_MAGIC, 17, unsigned)
-#define AUDIO_ASYNC_READ _IOW(AUDIO_IOCTL_MAGIC, 18, unsigned)
-#define AUDIO_SET_INCALL _IOW(AUDIO_IOCTL_MAGIC, 19, struct msm_voicerec_mode)
-#define AUDIO_GET_NUM_SND_DEVICE _IOR(AUDIO_IOCTL_MAGIC, 20, unsigned)
-#define AUDIO_GET_SND_DEVICES _IOWR(AUDIO_IOCTL_MAGIC, 21, \
-				struct msm_snd_device_list)
-#define AUDIO_ENABLE_SND_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 22, unsigned)
-#define AUDIO_DISABLE_SND_DEVICE _IOW(AUDIO_IOCTL_MAGIC, 23, unsigned)
-#define AUDIO_ROUTE_STREAM _IOW(AUDIO_IOCTL_MAGIC, 24, \
-				struct msm_audio_route_config)
-#define AUDIO_GET_PCM_CONFIG _IOR(AUDIO_IOCTL_MAGIC, 30, unsigned)
-#define AUDIO_SET_PCM_CONFIG _IOW(AUDIO_IOCTL_MAGIC, 31, unsigned)
-#define AUDIO_SWITCH_DEVICE  _IOW(AUDIO_IOCTL_MAGIC, 32, unsigned)
-#define AUDIO_SET_MUTE       _IOW(AUDIO_IOCTL_MAGIC, 33, unsigned)
-#define AUDIO_UPDATE_ACDB    _IOW(AUDIO_IOCTL_MAGIC, 34, unsigned)
-#define AUDIO_START_VOICE    _IOW(AUDIO_IOCTL_MAGIC, 35, unsigned)
-#define AUDIO_STOP_VOICE     _IOW(AUDIO_IOCTL_MAGIC, 36, unsigned)
-#define AUDIO_REINIT_ACDB    _IOW(AUDIO_IOCTL_MAGIC, 39, unsigned)
-#define AUDIO_OUTPORT_FLUSH  _IOW(AUDIO_IOCTL_MAGIC, 40, unsigned short)
-#define AUDIO_SET_ERR_THRESHOLD_VALUE _IOW(AUDIO_IOCTL_MAGIC, 41, \
-					unsigned short)
-#define AUDIO_GET_BITSTREAM_ERROR_INFO _IOR(AUDIO_IOCTL_MAGIC, 42, \
-			       struct msm_audio_bitstream_error_info)
-
-#define AUDIO_SET_SRS_TRUMEDIA_PARAM _IOW(AUDIO_IOCTL_MAGIC, 43, unsigned)
-
-/* Qualcomm extensions */
-#define AUDIO_SET_STREAM_CONFIG   _IOW(AUDIO_IOCTL_MAGIC, 80, \
-				struct msm_audio_stream_config)
-#define AUDIO_GET_STREAM_CONFIG   _IOR(AUDIO_IOCTL_MAGIC, 81, \
-				struct msm_audio_stream_config)
-#define AUDIO_GET_SESSION_ID _IOR(AUDIO_IOCTL_MAGIC, 82, unsigned short)
-#define AUDIO_GET_STREAM_INFO   _IOR(AUDIO_IOCTL_MAGIC, 83, \
-			       struct msm_audio_bitstream_info)
-#define AUDIO_SET_PAN       _IOW(AUDIO_IOCTL_MAGIC, 84, unsigned)
-#define AUDIO_SET_QCONCERT_PLUS       _IOW(AUDIO_IOCTL_MAGIC, 85, unsigned)
-#define AUDIO_SET_MBADRC       _IOW(AUDIO_IOCTL_MAGIC, 86, unsigned)
-#define AUDIO_SET_VOLUME_PATH   _IOW(AUDIO_IOCTL_MAGIC, 87, \
-				     struct msm_vol_info)
-#define AUDIO_SET_MAX_VOL_ALL _IOW(AUDIO_IOCTL_MAGIC, 88, unsigned)
-#define AUDIO_ENABLE_AUDPRE  _IOW(AUDIO_IOCTL_MAGIC, 89, unsigned)
-#define AUDIO_SET_AGC        _IOW(AUDIO_IOCTL_MAGIC, 90, unsigned)
-#define AUDIO_SET_NS         _IOW(AUDIO_IOCTL_MAGIC, 91, unsigned)
-#define AUDIO_SET_TX_IIR     _IOW(AUDIO_IOCTL_MAGIC, 92, unsigned)
-#define AUDIO_GET_BUF_CFG    _IOW(AUDIO_IOCTL_MAGIC, 93, \
-					struct msm_audio_buf_cfg)
-#define AUDIO_SET_BUF_CFG    _IOW(AUDIO_IOCTL_MAGIC, 94, \
-					struct msm_audio_buf_cfg)
-#define AUDIO_SET_ACDB_BLK _IOW(AUDIO_IOCTL_MAGIC, 95,  \
-					struct msm_acdb_cmd_device)
-#define AUDIO_GET_ACDB_BLK _IOW(AUDIO_IOCTL_MAGIC, 96,  \
-					struct msm_acdb_cmd_device)
-
-#define AUDIO_REGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 97, unsigned)
-#define AUDIO_DEREGISTER_ION _IOW(AUDIO_IOCTL_MAGIC, 98, unsigned)
-
-#define	AUDIO_MAX_COMMON_IOCTL_NUM	100
-
-
-#define HANDSET_MIC			0x01
-#define HANDSET_SPKR			0x02
-#define HEADSET_MIC			0x03
-#define HEADSET_SPKR_MONO		0x04
-#define HEADSET_SPKR_STEREO		0x05
-#define SPKR_PHONE_MIC			0x06
-#define SPKR_PHONE_MONO			0x07
-#define SPKR_PHONE_STEREO		0x08
-#define BT_SCO_MIC			0x09
-#define BT_SCO_SPKR			0x0A
-#define BT_A2DP_SPKR			0x0B
-#define TTY_HEADSET_MIC			0x0C
-#define TTY_HEADSET_SPKR		0x0D
-
-/* Default devices are not supported in a */
-/* device switching context. Only supported */
-/* for stream devices. */
-/* DO NOT USE */
-#define DEFAULT_TX			0x0E
-#define DEFAULT_RX			0x0F
-
-#define BT_A2DP_TX			0x10
-
-#define HEADSET_MONO_PLUS_SPKR_MONO_RX         0x11
-#define HEADSET_MONO_PLUS_SPKR_STEREO_RX       0x12
-#define HEADSET_STEREO_PLUS_SPKR_MONO_RX       0x13
-#define HEADSET_STEREO_PLUS_SPKR_STEREO_RX     0x14
-
-#define I2S_RX				0x20
-#define I2S_TX				0x21
-
-#define ADRC_ENABLE		0x0001
-#define EQ_ENABLE		0x0002
-#define IIR_ENABLE		0x0004
-#define QCONCERT_PLUS_ENABLE	0x0008
-#define MBADRC_ENABLE		0x0010
-#define SRS_ENABLE		0x0020
-#define SRS_DISABLE	0x0040
-
-#define AGC_ENABLE		0x0001
-#define NS_ENABLE		0x0002
-#define TX_IIR_ENABLE		0x0004
-#define FLUENCE_ENABLE		0x0008
-
-#define VOC_REC_UPLINK		0x00
-#define VOC_REC_DOWNLINK	0x01
-#define VOC_REC_BOTH		0x02
-
-struct msm_audio_config {
-	uint32_t buffer_size;
-	uint32_t buffer_count;
-	uint32_t channel_count;
-	uint32_t sample_rate;
-	uint32_t type;
-	uint32_t meta_field;
-	uint32_t bits;
-	uint32_t unused[3];
-};
-
-struct msm_audio_stream_config {
-	uint32_t buffer_size;
-	uint32_t buffer_count;
-};
-
-struct msm_audio_buf_cfg{
-	uint32_t meta_info_enable;
-	uint32_t frames_per_buf;
-};
-
-struct msm_audio_stats {
-	uint32_t byte_count;
-	uint32_t sample_count;
-	uint32_t unused[2];
-};
-
-struct msm_audio_ion_info {
-	int fd;
-	void *vaddr;
-};
-
-struct msm_audio_pmem_info {
-	int fd;
-	void *vaddr;
-};
-
-struct msm_audio_aio_buf {
-	void *buf_addr;
-	uint32_t buf_len;
-	uint32_t data_len;
-	void *private_data;
-	unsigned short mfield_sz; /*only useful for data has meta field */
-};
-
-/* Audio routing */
-
-#define SND_IOCTL_MAGIC 's'
-
-#define SND_MUTE_UNMUTED 0
-#define SND_MUTE_MUTED   1
-
-struct msm_mute_info {
-	uint32_t mute;
-	uint32_t path;
-};
-
-struct msm_vol_info {
-	uint32_t vol;
-	uint32_t path;
-};
-
-struct msm_voicerec_mode {
-	uint32_t rec_mode;
-};
-
-struct msm_snd_device_config {
-	uint32_t device;
-	uint32_t ear_mute;
-	uint32_t mic_mute;
-};
-
-#define SND_SET_DEVICE _IOW(SND_IOCTL_MAGIC, 2, struct msm_device_config *)
-
-#define SND_METHOD_VOICE 0
-
-struct msm_snd_volume_config {
-	uint32_t device;
-	uint32_t method;
-	uint32_t volume;
-};
-
-#define SND_SET_VOLUME _IOW(SND_IOCTL_MAGIC, 3, struct msm_snd_volume_config *)
-
-/* Returns the number of SND endpoints supported. */
-
-#define SND_GET_NUM_ENDPOINTS _IOR(SND_IOCTL_MAGIC, 4, unsigned *)
-
-struct msm_snd_endpoint {
-	int id; /* input and output */
-	char name[64]; /* output only */
-};
-
-/* Takes an index between 0 and one less than the number returned by
- * SND_GET_NUM_ENDPOINTS, and returns the SND index and name of a
- * SND endpoint.  On input, the .id field contains the number of the
- * endpoint, and on exit it contains the SND index, while .name contains
- * the description of the endpoint.
- */
-
-#define SND_GET_ENDPOINT _IOWR(SND_IOCTL_MAGIC, 5, struct msm_snd_endpoint *)
-
-
-#define SND_AVC_CTL _IOW(SND_IOCTL_MAGIC, 6, unsigned *)
-#define SND_AGC_CTL _IOW(SND_IOCTL_MAGIC, 7, unsigned *)
-
-struct msm_audio_pcm_config {
-	uint32_t pcm_feedback;	/* 0 - disable > 0 - enable */
-	uint32_t buffer_count;	/* Number of buffers to allocate */
-	uint32_t buffer_size;	/* Size of buffer for capturing of
-				   PCM samples */
-};
-
-#define AUDIO_EVENT_SUSPEND 0
-#define AUDIO_EVENT_RESUME 1
-#define AUDIO_EVENT_WRITE_DONE 2
-#define AUDIO_EVENT_READ_DONE   3
-#define AUDIO_EVENT_STREAM_INFO 4
-#define AUDIO_EVENT_BITSTREAM_ERROR_INFO 5
-
-#define AUDIO_CODEC_TYPE_MP3 0
-#define AUDIO_CODEC_TYPE_AAC 1
-
-struct msm_audio_bitstream_info {
-	uint32_t codec_type;
-	uint32_t chan_info;
-	uint32_t sample_rate;
-	uint32_t bit_stream_info;
-	uint32_t bit_rate;
-	uint32_t unused[3];
-};
-
-struct msm_audio_bitstream_error_info {
-	uint32_t dec_id;
-	uint32_t err_msg_indicator;
-	uint32_t err_type;
-};
-
-union msm_audio_event_payload {
-	struct msm_audio_aio_buf aio_buf;
-	struct msm_audio_bitstream_info stream_info;
-	struct msm_audio_bitstream_error_info error_info;
-	int reserved;
-};
-
-struct msm_audio_event {
-	int event_type;
-	int timeout_ms;
-	union msm_audio_event_payload event_payload;
-};
-
-#define MSM_SNDDEV_CAP_RX 0x1
-#define MSM_SNDDEV_CAP_TX 0x2
-#define MSM_SNDDEV_CAP_VOICE 0x4
-
-struct msm_snd_device_info {
-	uint32_t dev_id;
-	uint32_t dev_cap; /* bitmask describe capability of device */
-	char dev_name[64];
-};
-
-struct msm_snd_device_list {
-	uint32_t  num_dev; /* Indicate number of device info to be retrieved */
-	struct msm_snd_device_info *list;
-};
-
-struct msm_dtmf_config {
-	uint16_t path;
-	uint16_t dtmf_hi;
-	uint16_t dtmf_low;
-	uint16_t duration;
-	uint16_t tx_gain;
-	uint16_t rx_gain;
-	uint16_t mixing;
-};
-
-#define AUDIO_ROUTE_STREAM_VOICE_RX 0
-#define AUDIO_ROUTE_STREAM_VOICE_TX 1
-#define AUDIO_ROUTE_STREAM_PLAYBACK 2
-#define AUDIO_ROUTE_STREAM_REC      3
-
-struct msm_audio_route_config {
-	uint32_t stream_type;
-	uint32_t stream_id;
-	uint32_t dev_id;
-};
-
-#define AUDIO_MAX_EQ_BANDS 12
-
-struct msm_audio_eq_band {
-	uint16_t     band_idx; /* The band index, 0 .. 11 */
-	uint32_t     filter_type; /* Filter band type */
-	uint32_t     center_freq_hz; /* Filter band center frequency */
-	uint32_t     filter_gain; /* Filter band initial gain (dB) */
-			/* Range is +12 dB to -12 dB with 1dB increments. */
-	uint32_t     q_factor;
-} __attribute__ ((packed));
-
-struct msm_audio_eq_stream_config {
-	uint32_t	enable; /* Number of consequtive bands specified */
-	uint32_t	num_bands;
-	struct msm_audio_eq_band	eq_bands[AUDIO_MAX_EQ_BANDS];
-} __attribute__ ((packed));
-
-struct msm_acdb_cmd_device {
-	uint32_t     command_id;
-	uint32_t     device_id;
-	uint32_t     network_id;
-	uint32_t     sample_rate_id;      /* Actual sample rate value */
-	uint32_t     interface_id;        /* See interface id's above */
-	uint32_t     algorithm_block_id;  /* See enumerations above */
-	uint32_t     total_bytes;         /* Length in bytes used by buffer */
-	uint32_t     *phys_buf;           /* Physical Address of data */
-};
-
-
-#endif
diff --git a/original/linux/msm_audio_aac.h b/original/linux/msm_audio_aac.h
deleted file mode 100644
index 620e5ab..0000000
--- a/original/linux/msm_audio_aac.h
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef __MSM_AUDIO_AAC_H
-#define __MSM_AUDIO_AAC_H
-
-#include <linux/msm_audio.h>
-
-#define AUDIO_SET_AAC_CONFIG  _IOW(AUDIO_IOCTL_MAGIC, \
-  (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned)
-#define AUDIO_GET_AAC_CONFIG  _IOR(AUDIO_IOCTL_MAGIC, \
-  (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned)
-
-#define AUDIO_SET_AAC_ENC_CONFIG  _IOW(AUDIO_IOCTL_MAGIC, \
-  (AUDIO_MAX_COMMON_IOCTL_NUM+3), struct msm_audio_aac_enc_config)
-
-#define AUDIO_GET_AAC_ENC_CONFIG  _IOR(AUDIO_IOCTL_MAGIC, \
-  (AUDIO_MAX_COMMON_IOCTL_NUM+4), struct msm_audio_aac_enc_config)
-
-#define AUDIO_AAC_FORMAT_ADTS		-1
-#define	AUDIO_AAC_FORMAT_RAW		0x0000
-#define	AUDIO_AAC_FORMAT_PSUEDO_RAW	0x0001
-#define AUDIO_AAC_FORMAT_LOAS		0x0002
-#define AUDIO_AAC_FORMAT_ADIF		0x0003
-
-#define AUDIO_AAC_OBJECT_LC            	0x0002
-#define AUDIO_AAC_OBJECT_LTP		0x0004
-#define AUDIO_AAC_OBJECT_ERLC  		0x0011
-#define AUDIO_AAC_OBJECT_BSAC  		0x0016
-
-#define AUDIO_AAC_SEC_DATA_RES_ON       0x0001
-#define AUDIO_AAC_SEC_DATA_RES_OFF      0x0000
-
-#define AUDIO_AAC_SCA_DATA_RES_ON       0x0001
-#define AUDIO_AAC_SCA_DATA_RES_OFF      0x0000
-
-#define AUDIO_AAC_SPEC_DATA_RES_ON      0x0001
-#define AUDIO_AAC_SPEC_DATA_RES_OFF     0x0000
-
-#define AUDIO_AAC_SBR_ON_FLAG_ON	0x0001
-#define AUDIO_AAC_SBR_ON_FLAG_OFF	0x0000
-
-#define AUDIO_AAC_SBR_PS_ON_FLAG_ON	0x0001
-#define AUDIO_AAC_SBR_PS_ON_FLAG_OFF	0x0000
-
-/* Primary channel on both left and right channels */
-#define AUDIO_AAC_DUAL_MONO_PL_PR  0
-/* Secondary channel on both left and right channels */
-#define AUDIO_AAC_DUAL_MONO_SL_SR  1
-/* Primary channel on right channel and 2nd on left channel */
-#define AUDIO_AAC_DUAL_MONO_SL_PR  2
-/* 2nd channel on right channel and primary on left channel */
-#define AUDIO_AAC_DUAL_MONO_PL_SR  3
-
-struct msm_audio_aac_config {
-	signed short format;
-	unsigned short audio_object;
-	unsigned short ep_config;	/* 0 ~ 3 useful only obj = ERLC */
-	unsigned short aac_section_data_resilience_flag;
-	unsigned short aac_scalefactor_data_resilience_flag;
-	unsigned short aac_spectral_data_resilience_flag;
-	unsigned short sbr_on_flag;
-	unsigned short sbr_ps_on_flag;
-	unsigned short dual_mono_mode;
-	unsigned short channel_configuration;
-};
-
-struct msm_audio_aac_enc_config {
-	uint32_t channels;
-	uint32_t sample_rate;
-	uint32_t bit_rate;
-	uint32_t stream_format;
-};
-
-#endif /* __MSM_AUDIO_AAC_H */
diff --git a/original/linux/msm_audio_acdb.h b/original/linux/msm_audio_acdb.h
deleted file mode 100644
index e7f06b5..0000000
--- a/original/linux/msm_audio_acdb.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef __MSM_AUDIO_ACDB_H
-#define __MSM_AUDIO_ACDB_H
-
-#include <linux/msm_audio.h>
-
-#define AUDIO_SET_VOCPROC_CAL		_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned)
-#define AUDIO_SET_VOCPROC_STREAM_CAL	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned)
-#define AUDIO_SET_VOCPROC_VOL_CAL	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+2), unsigned)
-#define AUDIO_SET_AUDPROC_RX_CAL	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+3), unsigned)
-#define AUDIO_SET_AUDPROC_RX_STREAM_CAL	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+4), unsigned)
-#define AUDIO_SET_AUDPROC_RX_VOL_CAL	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+5), unsigned)
-#define AUDIO_SET_AUDPROC_TX_CAL	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+6), unsigned)
-#define AUDIO_SET_AUDPROC_TX_STREAM_CAL	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+7), unsigned)
-#define AUDIO_SET_AUDPROC_TX_VOL_CAL	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+8), unsigned)
-#define AUDIO_SET_SIDETONE_CAL		_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+9), unsigned)
-#define AUDIO_SET_ANC_CAL		_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+10), unsigned)
-#define AUDIO_SET_VOICE_RX_TOPOLOGY	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+11), unsigned)
-#define AUDIO_SET_VOICE_TX_TOPOLOGY	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+12), unsigned)
-#define AUDIO_SET_ADM_RX_TOPOLOGY	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+13), unsigned)
-#define AUDIO_SET_ADM_TX_TOPOLOGY	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+14), unsigned)
-#define AUDIO_SET_ASM_TOPOLOGY	_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+15), unsigned)
-#define AUDIO_SET_AFE_TX_CAL		_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+16), unsigned)
-#define AUDIO_SET_AFE_RX_CAL		_IOW(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_COMMON_IOCTL_NUM+17), unsigned)
-
-
-#define	AUDIO_MAX_ACDB_IOCTL	(AUDIO_MAX_COMMON_IOCTL_NUM+30)
-
-/* ACDB structures */
-struct cal_block {
-	uint32_t	cal_size;	/* Size of Cal Data */
-	uint32_t	cal_offset;	/* offset pointer to Cal Data */
-};
-
-struct sidetone_cal {
-	uint16_t	enable;
-	uint16_t	gain;
-};
-
-/* For Real-Time Audio Calibration */
-#define AUDIO_GET_RTAC_ADM_INFO		_IOR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+1), unsigned)
-#define AUDIO_GET_RTAC_VOICE_INFO	_IOR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+2), unsigned)
-#define AUDIO_GET_RTAC_ADM_CAL	_IOWR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+3), unsigned)
-#define AUDIO_SET_RTAC_ADM_CAL	_IOWR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+4), unsigned)
-#define AUDIO_GET_RTAC_ASM_CAL	_IOWR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+5), unsigned)
-#define AUDIO_SET_RTAC_ASM_CAL	_IOWR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+6), unsigned)
-#define AUDIO_GET_RTAC_CVS_CAL	_IOWR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+7), unsigned)
-#define AUDIO_SET_RTAC_CVS_CAL	_IOWR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+8), unsigned)
-#define AUDIO_GET_RTAC_CVP_CAL	_IOWR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+9), unsigned)
-#define AUDIO_SET_RTAC_CVP_CAL	_IOWR(AUDIO_IOCTL_MAGIC, \
-			(AUDIO_MAX_ACDB_IOCTL+10), unsigned)
-
-#define	AUDIO_MAX_RTAC_IOCTL	(AUDIO_MAX_ACDB_IOCTL+20)
-
-#endif /* __MSM_AUDIO_ACDB_H */
diff --git a/original/linux/msm_audio_wma.h b/original/linux/msm_audio_wma.h
deleted file mode 100644
index 24ff264..0000000
--- a/original/linux/msm_audio_wma.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef __MSM_AUDIO_WMA_H
-#define __MSM_AUDIO_WMA_H
-
-#define AUDIO_GET_WMA_CONFIG  _IOR(AUDIO_IOCTL_MAGIC, \
-	  (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned)
-#define AUDIO_SET_WMA_CONFIG  _IOW(AUDIO_IOCTL_MAGIC, \
-	  (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned)
-
-#define AUDIO_GET_WMA_CONFIG_V2  _IOR(AUDIO_IOCTL_MAGIC, \
-	  (AUDIO_MAX_COMMON_IOCTL_NUM+2), struct msm_audio_wma_config_v2)
-#define AUDIO_SET_WMA_CONFIG_V2  _IOW(AUDIO_IOCTL_MAGIC, \
-	  (AUDIO_MAX_COMMON_IOCTL_NUM+3), struct msm_audio_wma_config_v2)
-
-struct msm_audio_wma_config {
-	unsigned short 	armdatareqthr;
-	unsigned short 	channelsdecoded;
-	unsigned short 	wmabytespersec;
-	unsigned short	wmasamplingfreq;
-	unsigned short	wmaencoderopts;
-};
-
-struct msm_audio_wma_config_v2 {
-	unsigned short	format_tag;
-	unsigned short	numchannels;
-	uint32_t	samplingrate;
-	uint32_t	avgbytespersecond;
-	unsigned short	block_align;
-	unsigned short  validbitspersample;
-	uint32_t	channelmask;
-	unsigned short	encodeopt;
-};
-
-#endif /* __MSM_AUDIO_WMA_H */
diff --git a/original/linux/msm_audio_wmapro.h b/original/linux/msm_audio_wmapro.h
deleted file mode 100644
index b680f41..0000000
--- a/original/linux/msm_audio_wmapro.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef __MSM_AUDIO_WMAPRO_H
-#define __MSM_AUDIO_WMAPRO_H
-
-#define AUDIO_GET_WMAPRO_CONFIG  _IOR(AUDIO_IOCTL_MAGIC, \
-	  (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned)
-#define AUDIO_SET_WMAPRO_CONFIG  _IOW(AUDIO_IOCTL_MAGIC, \
-	  (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned)
-
-struct msm_audio_wmapro_config {
-	unsigned short 	armdatareqthr;
-	uint8_t         validbitspersample;
-	uint8_t         numchannels;
-	unsigned short  formattag;
-	unsigned short  samplingrate;
-	unsigned short  avgbytespersecond;
-	unsigned short  asfpacketlength;
-	unsigned short 	channelmask;
-	unsigned short 	encodeopt;
-	unsigned short	advancedencodeopt;
-	uint32_t	advancedencodeopt2;
-};
-#endif /* __MSM_AUDIO_WMAPRO_H */
diff --git a/original/linux/msm_charm.h b/original/linux/msm_charm.h
deleted file mode 100644
index c31e493..0000000
--- a/original/linux/msm_charm.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _ARCH_ARM_MACH_MSM_MDM_IOCTLS_H
-#define _ARXH_ARM_MACH_MSM_MDM_IOCTLS_H
-
-
-#define CHARM_CODE		0xCC
-#define WAKE_CHARM		_IO(CHARM_CODE, 1)
-#define RESET_CHARM		_IO(CHARM_CODE, 2)
-#define CHECK_FOR_BOOT		_IOR(CHARM_CODE, 3, int)
-#define WAIT_FOR_BOOT		_IO(CHARM_CODE, 4)
-#define NORMAL_BOOT_DONE	_IOW(CHARM_CODE, 5, int)
-#define RAM_DUMP_DONE		_IOW(CHARM_CODE, 6, int)
-#define WAIT_FOR_RESTART	_IOR(CHARM_CODE, 7, int)
-#define GET_DLOAD_STATUS	_IOR(CHARM_CODE, 8, int)
-
-enum charm_boot_type {
-	CHARM_NORMAL_BOOT = 0,
-	CHARM_RAM_DUMPS,
-};
-
-#endif
diff --git a/original/linux/msm_dsps.h b/original/linux/msm_dsps.h
deleted file mode 100644
index a5ac256..0000000
--- a/original/linux/msm_dsps.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _DSPS_H_
-#define _DSPS_H_
-
-#include <linux/ioctl.h>
-
-#define DSPS_IOCTL_MAGIC 'd'
-
-#define DSPS_IOCTL_ON	_IO(DSPS_IOCTL_MAGIC, 1)
-#define DSPS_IOCTL_OFF	_IO(DSPS_IOCTL_MAGIC, 2)
-
-#define DSPS_IOCTL_READ_SLOW_TIMER _IOR(DSPS_IOCTL_MAGIC, 3, unsigned int*)
-#define DSPS_IOCTL_READ_FAST_TIMER _IOR(DSPS_IOCTL_MAGIC, 4, unsigned int*)
-
-#define DSPS_IOCTL_RESET _IO(DSPS_IOCTL_MAGIC, 5)
-
-#endif	/* _DSPS_H_ */
diff --git a/original/linux/msm_hw3d.h b/original/linux/msm_hw3d.h
deleted file mode 100644
index a4afd87..0000000
--- a/original/linux/msm_hw3d.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* include/linux/msm_hw3d.h
- *
- * Copyright (C) 2007 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-
-#ifndef _MSM_HW3D_H_
-#define _MSM_HW3D_H_
-
-#include <linux/fs.h>
-#include <linux/ioctl.h>
-
-struct hw3d_region;
-
-#define HW3D_IOCTL_MAGIC		'h'
-#define HW3D_WAIT_FOR_REVOKE		_IO(HW3D_IOCTL_MAGIC, 0x80)
-#define HW3D_WAIT_FOR_INTERRUPT		_IO(HW3D_IOCTL_MAGIC, 0x81)
-#define HW3D_GET_REGIONS		\
-			_IOR(HW3D_IOCTL_MAGIC, 0x82, struct hw3d_region *)
-
-#define HW3D_REGION_OFFSET(id)		((((uint32_t)(id)) & 0xf) << 28)
-#define HW3D_REGION_ID(addr)		(((uint32_t)(addr) >> 28) & 0xf)
-#define HW3D_OFFSET_IN_REGION(addr)	((uint32_t)(addr) & ~(0xfUL << 28))
-
-enum {
-	HW3D_EBI		= 0,
-	HW3D_SMI		= 1,
-	HW3D_REGS		= 2,
-
-	HW3D_NUM_REGIONS	= HW3D_REGS + 1,
-};
-
-struct hw3d_region {
-	unsigned long		phys;
-	unsigned long		map_offset;
-	unsigned long		len;
-};
-
-int get_msm_hw3d_file(int fd, uint32_t *offs, unsigned long *pbase,
-		      unsigned long *len, struct file **filp);
-void put_msm_hw3d_file(struct file *file);
-bool is_msm_hw3d_file(struct file *file);
-
-#endif /* _MSM_HW3D_H_ */
diff --git a/original/linux/msm_kgsl.h b/original/linux/msm_kgsl.h
deleted file mode 100644
index c8ea7e5..0000000
--- a/original/linux/msm_kgsl.h
+++ /dev/null
@@ -1,479 +0,0 @@
-#ifndef _MSM_KGSL_H
-#define _MSM_KGSL_H
-
-#define KGSL_VERSION_MAJOR        3
-#define KGSL_VERSION_MINOR        12
-
-/*context flags */
-#define KGSL_CONTEXT_SAVE_GMEM		0x00000001
-#define KGSL_CONTEXT_NO_GMEM_ALLOC	0x00000002
-#define KGSL_CONTEXT_SUBMIT_IB_LIST	0x00000004
-#define KGSL_CONTEXT_CTX_SWITCH		0x00000008
-#define KGSL_CONTEXT_PREAMBLE		0x00000010
-#define KGSL_CONTEXT_TRASH_STATE	0x00000020
-#define KGSL_CONTEXT_PER_CONTEXT_TS	0x00000040
-
-#define KGSL_CONTEXT_INVALID 0xffffffff
-
-/* Memory allocayion flags */
-#define KGSL_MEMFLAGS_GPUREADONLY	0x01000000
-
-/* generic flag values */
-#define KGSL_FLAGS_NORMALMODE  0x00000000
-#define KGSL_FLAGS_SAFEMODE    0x00000001
-#define KGSL_FLAGS_INITIALIZED0 0x00000002
-#define KGSL_FLAGS_INITIALIZED 0x00000004
-#define KGSL_FLAGS_STARTED     0x00000008
-#define KGSL_FLAGS_ACTIVE      0x00000010
-#define KGSL_FLAGS_RESERVED0   0x00000020
-#define KGSL_FLAGS_RESERVED1   0x00000040
-#define KGSL_FLAGS_RESERVED2   0x00000080
-#define KGSL_FLAGS_SOFT_RESET  0x00000100
-#define KGSL_FLAGS_PER_CONTEXT_TIMESTAMPS 0x00000200
-
-/* Clock flags to show which clocks should be controled by a given platform */
-#define KGSL_CLK_SRC	0x00000001
-#define KGSL_CLK_CORE	0x00000002
-#define KGSL_CLK_IFACE	0x00000004
-#define KGSL_CLK_MEM	0x00000008
-#define KGSL_CLK_MEM_IFACE 0x00000010
-#define KGSL_CLK_AXI	0x00000020
-
-/*
- * Reset status values for context
- */
-enum kgsl_ctx_reset_stat {
-	KGSL_CTX_STAT_NO_ERROR				= 0x00000000,
-	KGSL_CTX_STAT_GUILTY_CONTEXT_RESET_EXT		= 0x00000001,
-	KGSL_CTX_STAT_INNOCENT_CONTEXT_RESET_EXT	= 0x00000002,
-	KGSL_CTX_STAT_UNKNOWN_CONTEXT_RESET_EXT		= 0x00000003
-};
-
-#define KGSL_CONVERT_TO_MBPS(val) \
-	(val*1000*1000U)
-
-/* device id */
-enum kgsl_deviceid {
-	KGSL_DEVICE_3D0		= 0x00000000,
-	KGSL_DEVICE_2D0		= 0x00000001,
-	KGSL_DEVICE_2D1		= 0x00000002,
-	KGSL_DEVICE_MAX		= 0x00000003
-};
-
-enum kgsl_user_mem_type {
-	KGSL_USER_MEM_TYPE_PMEM		= 0x00000000,
-	KGSL_USER_MEM_TYPE_ASHMEM	= 0x00000001,
-	KGSL_USER_MEM_TYPE_ADDR		= 0x00000002,
-	KGSL_USER_MEM_TYPE_ION		= 0x00000003,
-	KGSL_USER_MEM_TYPE_MAX		= 0x00000004,
-};
-
-struct kgsl_devinfo {
-
-	unsigned int device_id;
-	/* chip revision id
-	* coreid:8 majorrev:8 minorrev:8 patch:8
-	*/
-	unsigned int chip_id;
-	unsigned int mmu_enabled;
-	unsigned int gmem_gpubaseaddr;
-	/*
-	* This field contains the adreno revision
-	* number 200, 205, 220, etc...
-	*/
-	unsigned int gpu_id;
-	unsigned int gmem_sizebytes;
-};
-
-/* this structure defines the region of memory that can be mmap()ed from this
-   driver. The timestamp fields are volatile because they are written by the
-   GPU
-*/
-struct kgsl_devmemstore {
-	volatile unsigned int soptimestamp;
-	unsigned int sbz;
-	volatile unsigned int eoptimestamp;
-	unsigned int sbz2;
-	volatile unsigned int ts_cmp_enable;
-	unsigned int sbz3;
-	volatile unsigned int ref_wait_ts;
-	unsigned int sbz4;
-	unsigned int current_context;
-	unsigned int sbz5;
-};
-
-#define KGSL_MEMSTORE_OFFSET(ctxt_id, field) \
-	((ctxt_id)*sizeof(struct kgsl_devmemstore) + \
-	 offsetof(struct kgsl_devmemstore, field))
-
-/* timestamp id*/
-enum kgsl_timestamp_type {
-	KGSL_TIMESTAMP_CONSUMED = 0x00000001, /* start-of-pipeline timestamp */
-	KGSL_TIMESTAMP_RETIRED  = 0x00000002, /* end-of-pipeline timestamp*/
-	KGSL_TIMESTAMP_QUEUED   = 0x00000003,
-};
-
-/* property types - used with kgsl_device_getproperty */
-enum kgsl_property_type {
-	KGSL_PROP_DEVICE_INFO     = 0x00000001,
-	KGSL_PROP_DEVICE_SHADOW   = 0x00000002,
-	KGSL_PROP_DEVICE_POWER    = 0x00000003,
-	KGSL_PROP_SHMEM           = 0x00000004,
-	KGSL_PROP_SHMEM_APERTURES = 0x00000005,
-	KGSL_PROP_MMU_ENABLE 	  = 0x00000006,
-	KGSL_PROP_INTERRUPT_WAITS = 0x00000007,
-	KGSL_PROP_VERSION         = 0x00000008,
-	KGSL_PROP_GPU_RESET_STAT  = 0x00000009,
-	KGSL_PROP_PWRCTRL         = 0x0000000E,
-};
-
-struct kgsl_shadowprop {
-	unsigned int gpuaddr;
-	unsigned int size;
-	unsigned int flags; /* contains KGSL_FLAGS_ values */
-};
-
-struct kgsl_version {
-	unsigned int drv_major;
-	unsigned int drv_minor;
-	unsigned int dev_major;
-	unsigned int dev_minor;
-};
-
-/* structure holds list of ibs */
-struct kgsl_ibdesc {
-	unsigned int gpuaddr;
-	void *hostptr;
-	unsigned int sizedwords;
-	unsigned int ctrl;
-};
-
-/* ioctls */
-#define KGSL_IOC_TYPE 0x09
-
-/* get misc info about the GPU
-   type should be a value from enum kgsl_property_type
-   value points to a structure that varies based on type
-   sizebytes is sizeof() that structure
-   for KGSL_PROP_DEVICE_INFO, use struct kgsl_devinfo
-   this structure contaings hardware versioning info.
-   for KGSL_PROP_DEVICE_SHADOW, use struct kgsl_shadowprop
-   this is used to find mmap() offset and sizes for mapping
-   struct kgsl_memstore into userspace.
-*/
-struct kgsl_device_getproperty {
-	unsigned int type;
-	void  *value;
-	unsigned int sizebytes;
-};
-
-#define IOCTL_KGSL_DEVICE_GETPROPERTY \
-	_IOWR(KGSL_IOC_TYPE, 0x2, struct kgsl_device_getproperty)
-
-/* IOCTL_KGSL_DEVICE_READ (0x3) - removed 03/2012
- */
-
-/* block until the GPU has executed past a given timestamp
- * timeout is in milliseconds.
- */
-struct kgsl_device_waittimestamp {
-	unsigned int timestamp;
-	unsigned int timeout;
-};
-
-#define IOCTL_KGSL_DEVICE_WAITTIMESTAMP \
-	_IOW(KGSL_IOC_TYPE, 0x6, struct kgsl_device_waittimestamp)
-
-struct kgsl_device_waittimestamp_ctxtid {
-	unsigned int context_id;
-	unsigned int timestamp;
-	unsigned int timeout;
-};
-
-#define IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID \
-	_IOW(KGSL_IOC_TYPE, 0x7, struct kgsl_device_waittimestamp_ctxtid)
-
-/* issue indirect commands to the GPU.
- * drawctxt_id must have been created with IOCTL_KGSL_DRAWCTXT_CREATE
- * ibaddr and sizedwords must specify a subset of a buffer created
- * with IOCTL_KGSL_SHAREDMEM_FROM_PMEM
- * flags may be a mask of KGSL_CONTEXT_ values
- * timestamp is a returned counter value which can be passed to
- * other ioctls to determine when the commands have been executed by
- * the GPU.
- */
-struct kgsl_ringbuffer_issueibcmds {
-	unsigned int drawctxt_id;
-	unsigned int ibdesc_addr;
-	unsigned int numibs;
-	unsigned int timestamp; /*output param */
-	unsigned int flags;
-};
-
-#define IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS \
-	_IOWR(KGSL_IOC_TYPE, 0x10, struct kgsl_ringbuffer_issueibcmds)
-
-/* read the most recently executed timestamp value
- * type should be a value from enum kgsl_timestamp_type
- */
-struct kgsl_cmdstream_readtimestamp {
-	unsigned int type;
-	unsigned int timestamp; /*output param */
-};
-
-#define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_OLD \
-	_IOR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp)
-
-#define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP \
-	_IOWR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp)
-
-/* free memory when the GPU reaches a given timestamp.
- * gpuaddr specify a memory region created by a
- * IOCTL_KGSL_SHAREDMEM_FROM_PMEM call
- * type should be a value from enum kgsl_timestamp_type
- */
-struct kgsl_cmdstream_freememontimestamp {
-	unsigned int gpuaddr;
-	unsigned int type;
-	unsigned int timestamp;
-};
-
-#define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP \
-	_IOW(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp)
-
-/* Previous versions of this header had incorrectly defined
-   IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP as a read-only ioctl instead
-   of a write only ioctl.  To ensure binary compatability, the following
-   #define will be used to intercept the incorrect ioctl
-*/
-
-#define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_OLD \
-	_IOR(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp)
-
-/* create a draw context, which is used to preserve GPU state.
- * The flags field may contain a mask KGSL_CONTEXT_*  values
- */
-struct kgsl_drawctxt_create {
-	unsigned int flags;
-	unsigned int drawctxt_id; /*output param */
-};
-
-#define IOCTL_KGSL_DRAWCTXT_CREATE \
-	_IOWR(KGSL_IOC_TYPE, 0x13, struct kgsl_drawctxt_create)
-
-/* destroy a draw context */
-struct kgsl_drawctxt_destroy {
-	unsigned int drawctxt_id;
-};
-
-#define IOCTL_KGSL_DRAWCTXT_DESTROY \
-	_IOW(KGSL_IOC_TYPE, 0x14, struct kgsl_drawctxt_destroy)
-
-/* add a block of pmem, fb, ashmem or user allocated address
- * into the GPU address space */
-struct kgsl_map_user_mem {
-	int fd;
-	unsigned int gpuaddr;   /*output param */
-	unsigned int len;
-	unsigned int offset;
-	unsigned int hostptr;   /*input param */
-	enum kgsl_user_mem_type memtype;
-	unsigned int reserved;	/* May be required to add
-				params for another mem type */
-};
-
-#define IOCTL_KGSL_MAP_USER_MEM \
-	_IOWR(KGSL_IOC_TYPE, 0x15, struct kgsl_map_user_mem)
-
-struct kgsl_cmdstream_readtimestamp_ctxtid {
-	unsigned int context_id;
-	unsigned int type;
-	unsigned int timestamp; /*output param */
-};
-
-#define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_CTXTID \
-	_IOWR(KGSL_IOC_TYPE, 0x16, struct kgsl_cmdstream_readtimestamp_ctxtid)
-
-struct kgsl_cmdstream_freememontimestamp_ctxtid {
-	unsigned int context_id;
-	unsigned int gpuaddr;
-	unsigned int type;
-	unsigned int timestamp;
-};
-
-#define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_CTXTID \
-	_IOW(KGSL_IOC_TYPE, 0x17, \
-	struct kgsl_cmdstream_freememontimestamp_ctxtid)
-
-/* add a block of pmem or fb into the GPU address space */
-struct kgsl_sharedmem_from_pmem {
-	int pmem_fd;
-	unsigned int gpuaddr;	/*output param */
-	unsigned int len;
-	unsigned int offset;
-};
-
-#define IOCTL_KGSL_SHAREDMEM_FROM_PMEM \
-	_IOWR(KGSL_IOC_TYPE, 0x20, struct kgsl_sharedmem_from_pmem)
-
-/* remove memory from the GPU's address space */
-struct kgsl_sharedmem_free {
-	unsigned int gpuaddr;
-};
-
-#define IOCTL_KGSL_SHAREDMEM_FREE \
-	_IOW(KGSL_IOC_TYPE, 0x21, struct kgsl_sharedmem_free)
-
-struct kgsl_cff_user_event {
-	unsigned char cff_opcode;
-	unsigned int op1;
-	unsigned int op2;
-	unsigned int op3;
-	unsigned int op4;
-	unsigned int op5;
-	unsigned int __pad[2];
-};
-
-#define IOCTL_KGSL_CFF_USER_EVENT \
-	_IOW(KGSL_IOC_TYPE, 0x31, struct kgsl_cff_user_event)
-
-struct kgsl_gmem_desc {
-	unsigned int x;
-	unsigned int y;
-	unsigned int width;
-	unsigned int height;
-	unsigned int pitch;
-};
-
-struct kgsl_buffer_desc {
-	void 			*hostptr;
-	unsigned int	gpuaddr;
-	int				size;
-	unsigned int	format;
-	unsigned int  	pitch;
-	unsigned int  	enabled;
-};
-
-struct kgsl_bind_gmem_shadow {
-	unsigned int drawctxt_id;
-	struct kgsl_gmem_desc gmem_desc;
-	unsigned int shadow_x;
-	unsigned int shadow_y;
-	struct kgsl_buffer_desc shadow_buffer;
-	unsigned int buffer_id;
-};
-
-#define IOCTL_KGSL_DRAWCTXT_BIND_GMEM_SHADOW \
-    _IOW(KGSL_IOC_TYPE, 0x22, struct kgsl_bind_gmem_shadow)
-
-/* add a block of memory into the GPU address space */
-struct kgsl_sharedmem_from_vmalloc {
-	unsigned int gpuaddr;	/*output param */
-	unsigned int hostptr;
-	unsigned int flags;
-};
-
-#define IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC \
-	_IOWR(KGSL_IOC_TYPE, 0x23, struct kgsl_sharedmem_from_vmalloc)
-
-#define IOCTL_KGSL_SHAREDMEM_FLUSH_CACHE \
-	_IOW(KGSL_IOC_TYPE, 0x24, struct kgsl_sharedmem_free)
-
-struct kgsl_drawctxt_set_bin_base_offset {
-	unsigned int drawctxt_id;
-	unsigned int offset;
-};
-
-#define IOCTL_KGSL_DRAWCTXT_SET_BIN_BASE_OFFSET \
-	_IOW(KGSL_IOC_TYPE, 0x25, struct kgsl_drawctxt_set_bin_base_offset)
-
-enum kgsl_cmdwindow_type {
-	KGSL_CMDWINDOW_MIN     = 0x00000000,
-	KGSL_CMDWINDOW_2D      = 0x00000000,
-	KGSL_CMDWINDOW_3D      = 0x00000001, /* legacy */
-	KGSL_CMDWINDOW_MMU     = 0x00000002,
-	KGSL_CMDWINDOW_ARBITER = 0x000000FF,
-	KGSL_CMDWINDOW_MAX     = 0x000000FF,
-};
-
-/* write to the command window */
-struct kgsl_cmdwindow_write {
-	enum kgsl_cmdwindow_type target;
-	unsigned int addr;
-	unsigned int data;
-};
-
-#define IOCTL_KGSL_CMDWINDOW_WRITE \
-	_IOW(KGSL_IOC_TYPE, 0x2e, struct kgsl_cmdwindow_write)
-
-struct kgsl_gpumem_alloc {
-	unsigned long gpuaddr;
-	size_t size;
-	unsigned int flags;
-};
-
-#define IOCTL_KGSL_GPUMEM_ALLOC \
-	_IOWR(KGSL_IOC_TYPE, 0x2f, struct kgsl_gpumem_alloc)
-
-struct kgsl_cff_syncmem {
-	unsigned int gpuaddr;
-	unsigned int len;
-	unsigned int __pad[2]; /* For future binary compatibility */
-};
-
-#define IOCTL_KGSL_CFF_SYNCMEM \
-	_IOW(KGSL_IOC_TYPE, 0x30, struct kgsl_cff_syncmem)
-
-/*
- * A timestamp event allows the user space to register an action following an
- * expired timestamp. Note IOCTL_KGSL_TIMESTAMP_EVENT has been redefined to
- * _IOWR to support fences which need to return a fd for the priv parameter.
- */
-
-struct kgsl_timestamp_event {
-	int type;                /* Type of event (see list below) */
-	unsigned int timestamp;  /* Timestamp to trigger event on */
-	unsigned int context_id; /* Context for the timestamp */
-	void *priv;              /* Pointer to the event specific blob */
-	size_t len;              /* Size of the event specific blob */
-};
-
-#define IOCTL_KGSL_TIMESTAMP_EVENT_OLD \
-	_IOW(KGSL_IOC_TYPE, 0x31, struct kgsl_timestamp_event)
-
-/* A genlock timestamp event releases an existing lock on timestamp expire */
-
-#define KGSL_TIMESTAMP_EVENT_GENLOCK 1
-
-struct kgsl_timestamp_event_genlock {
-	int handle; /* Handle of the genlock lock to release */
-};
-
-/* A fence timestamp event releases an existing lock on timestamp expire */
-
-#define KGSL_TIMESTAMP_EVENT_FENCE 2
-
-struct kgsl_timestamp_event_fence {
-	int fence_fd; /* Fence to signal */
-};
-
-/*
- * Set a property within the kernel.  Uses the same structure as
- * IOCTL_KGSL_GETPROPERTY
- */
-
-#define IOCTL_KGSL_SETPROPERTY \
-	_IOW(KGSL_IOC_TYPE, 0x32, struct kgsl_device_getproperty)
-
-#define IOCTL_KGSL_TIMESTAMP_EVENT \
-	_IOWR(KGSL_IOC_TYPE, 0x33, struct kgsl_timestamp_event)
-
-#ifdef __KERNEL__
-#ifdef CONFIG_MSM_KGSL_DRM
-int kgsl_gem_obj_addr(int drm_fd, int handle, unsigned long *start,
-			unsigned long *len);
-#else
-#define kgsl_gem_obj_addr(...) 0
-#endif
-#endif
-#endif /* _MSM_KGSL_H */
diff --git a/original/linux/msm_mdp.h b/original/linux/msm_mdp.h
deleted file mode 100755
index 5fdc390..0000000
--- a/original/linux/msm_mdp.h
+++ /dev/null
@@ -1,560 +0,0 @@
-/* include/linux/msm_mdp.h
- *
- * Copyright (C) 2007 Google Incorporated
- * Copyright (c) 2012 Code Aurora Forum. All rights reserved.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-#ifndef _MSM_MDP_H_
-#define _MSM_MDP_H_
-
-#include <linux/types.h>
-#include <linux/fb.h>
-
-#define MSMFB_IOCTL_MAGIC 'm'
-#define MSMFB_GRP_DISP          _IOW(MSMFB_IOCTL_MAGIC, 1, unsigned int)
-#define MSMFB_BLIT              _IOW(MSMFB_IOCTL_MAGIC, 2, unsigned int)
-#define MSMFB_SUSPEND_SW_REFRESHER _IOW(MSMFB_IOCTL_MAGIC, 128, unsigned int)
-#define MSMFB_RESUME_SW_REFRESHER _IOW(MSMFB_IOCTL_MAGIC, 129, unsigned int)
-#define MSMFB_CURSOR _IOW(MSMFB_IOCTL_MAGIC, 130, struct fb_cursor)
-#define MSMFB_SET_LUT _IOW(MSMFB_IOCTL_MAGIC, 131, struct fb_cmap)
-#define MSMFB_HISTOGRAM _IOWR(MSMFB_IOCTL_MAGIC, 132, struct mdp_histogram_data)
-/* new ioctls's for set/get ccs matrix */
-#define MSMFB_GET_CCS_MATRIX  _IOWR(MSMFB_IOCTL_MAGIC, 133, struct mdp_ccs)
-#define MSMFB_SET_CCS_MATRIX  _IOW(MSMFB_IOCTL_MAGIC, 134, struct mdp_ccs)
-#define MSMFB_OVERLAY_SET       _IOWR(MSMFB_IOCTL_MAGIC, 135, \
-						struct mdp_overlay)
-#define MSMFB_OVERLAY_UNSET     _IOW(MSMFB_IOCTL_MAGIC, 136, unsigned int)
-
-#define MSMFB_OVERLAY_PLAY      _IOW(MSMFB_IOCTL_MAGIC, 137, \
-						struct msmfb_overlay_data)
-#define MSMFB_OVERLAY_QUEUE	MSMFB_OVERLAY_PLAY
-
-#define MSMFB_GET_PAGE_PROTECTION _IOR(MSMFB_IOCTL_MAGIC, 138, \
-					struct mdp_page_protection)
-#define MSMFB_SET_PAGE_PROTECTION _IOW(MSMFB_IOCTL_MAGIC, 139, \
-					struct mdp_page_protection)
-#define MSMFB_OVERLAY_GET      _IOR(MSMFB_IOCTL_MAGIC, 140, \
-						struct mdp_overlay)
-#define MSMFB_OVERLAY_PLAY_ENABLE     _IOW(MSMFB_IOCTL_MAGIC, 141, unsigned int)
-#define MSMFB_OVERLAY_BLT       _IOWR(MSMFB_IOCTL_MAGIC, 142, \
-						struct msmfb_overlay_blt)
-#define MSMFB_OVERLAY_BLT_OFFSET     _IOW(MSMFB_IOCTL_MAGIC, 143, unsigned int)
-#define MSMFB_HISTOGRAM_START	_IOR(MSMFB_IOCTL_MAGIC, 144, \
-						struct mdp_histogram_start_req)
-#define MSMFB_HISTOGRAM_STOP	_IOR(MSMFB_IOCTL_MAGIC, 145, unsigned int)
-#define MSMFB_NOTIFY_UPDATE	_IOW(MSMFB_IOCTL_MAGIC, 146, unsigned int)
-
-#define MSMFB_OVERLAY_3D       _IOWR(MSMFB_IOCTL_MAGIC, 147, \
-						struct msmfb_overlay_3d)
-
-#define MSMFB_MIXER_INFO       _IOWR(MSMFB_IOCTL_MAGIC, 148, \
-						struct msmfb_mixer_info_req)
-#define MSMFB_OVERLAY_PLAY_WAIT _IOWR(MSMFB_IOCTL_MAGIC, 149, \
-						struct msmfb_overlay_data)
-#define MSMFB_WRITEBACK_INIT _IO(MSMFB_IOCTL_MAGIC, 150)
-#define MSMFB_WRITEBACK_START _IO(MSMFB_IOCTL_MAGIC, 151)
-#define MSMFB_WRITEBACK_STOP _IO(MSMFB_IOCTL_MAGIC, 152)
-#define MSMFB_WRITEBACK_QUEUE_BUFFER _IOW(MSMFB_IOCTL_MAGIC, 153, \
-						struct msmfb_data)
-#define MSMFB_WRITEBACK_DEQUEUE_BUFFER _IOW(MSMFB_IOCTL_MAGIC, 154, \
-						struct msmfb_data)
-#define MSMFB_WRITEBACK_TERMINATE _IO(MSMFB_IOCTL_MAGIC, 155)
-#define MSMFB_MDP_PP _IOWR(MSMFB_IOCTL_MAGIC, 156, struct msmfb_mdp_pp)
-#define MSMFB_OVERLAY_VSYNC_CTRL _IOW(MSMFB_IOCTL_MAGIC, 160, unsigned int)
-#define MSMFB_VSYNC_CTRL  _IOW(MSMFB_IOCTL_MAGIC, 161, unsigned int)
-#define MSMFB_BUFFER_SYNC  _IOW(MSMFB_IOCTL_MAGIC, 162, struct mdp_buf_sync)
-
-#define MSMFB_DISPLAY_COMMIT      _IOW(MSMFB_IOCTL_MAGIC, 164, \
-						struct mdp_display_commit)
-
-#define FB_TYPE_3D_PANEL 0x10101010
-#define MDP_IMGTYPE2_START 0x10000
-#define MSMFB_DRIVER_VERSION	0xF9E8D701
-
-enum {
-	NOTIFY_UPDATE_START,
-	NOTIFY_UPDATE_STOP,
-};
-
-enum {
-	MDP_RGB_565,      /* RGB 565 planer */
-	MDP_XRGB_8888,    /* RGB 888 padded */
-	MDP_Y_CBCR_H2V2,  /* Y and CbCr, pseudo planer w/ Cb is in MSB */
-	MDP_Y_CBCR_H2V2_ADRENO,
-	MDP_ARGB_8888,    /* ARGB 888 */
-	MDP_RGB_888,      /* RGB 888 planer */
-	MDP_Y_CRCB_H2V2,  /* Y and CrCb, pseudo planer w/ Cr is in MSB */
-	MDP_YCRYCB_H2V1,  /* YCrYCb interleave */
-	MDP_Y_CRCB_H2V1,  /* Y and CrCb, pseduo planer w/ Cr is in MSB */
-	MDP_Y_CBCR_H2V1,   /* Y and CrCb, pseduo planer w/ Cr is in MSB */
-	MDP_Y_CRCB_H1V2,
-	MDP_Y_CBCR_H1V2,
-	MDP_RGBA_8888,    /* ARGB 888 */
-	MDP_BGRA_8888,	  /* ABGR 888 */
-	MDP_RGBX_8888,	  /* RGBX 888 */
-	MDP_Y_CRCB_H2V2_TILE,  /* Y and CrCb, pseudo planer tile */
-	MDP_Y_CBCR_H2V2_TILE,  /* Y and CbCr, pseudo planer tile */
-	MDP_Y_CR_CB_H2V2,  /* Y, Cr and Cb, planar */
-	MDP_Y_CR_CB_GH2V2,  /* Y, Cr and Cb, planar aligned to Android YV12 */
-	MDP_Y_CB_CR_H2V2,  /* Y, Cb and Cr, planar */
-	MDP_Y_CRCB_H1V1,  /* Y and CrCb, pseduo planer w/ Cr is in MSB */
-	MDP_Y_CBCR_H1V1,  /* Y and CbCr, pseduo planer w/ Cb is in MSB */
-	MDP_YCRCB_H1V1,   /* YCrCb interleave */
-	MDP_YCBCR_H1V1,   /* YCbCr interleave */
-	MDP_BGR_565,      /* BGR 565 planer */
-	MDP_IMGTYPE_LIMIT,
-	MDP_RGB_BORDERFILL,	/* border fill pipe */
-	MDP_FB_FORMAT = MDP_IMGTYPE2_START,    /* framebuffer format */
-	MDP_IMGTYPE_LIMIT2 /* Non valid image type after this enum */
-};
-
-enum {
-	PMEM_IMG,
-	FB_IMG,
-};
-
-enum {
-	HSIC_HUE = 0,
-	HSIC_SAT,
-	HSIC_INT,
-	HSIC_CON,
-	NUM_HSIC_PARAM,
-};
-
-#define MDSS_MDP_ROT_ONLY		0x80
-#define MDSS_MDP_RIGHT_MIXER		0x100
-
-/* mdp_blit_req flag values */
-#define MDP_ROT_NOP 0
-#define MDP_FLIP_LR 0x1
-#define MDP_FLIP_UD 0x2
-#define MDP_ROT_90 0x4
-#define MDP_ROT_180 (MDP_FLIP_UD|MDP_FLIP_LR)
-#define MDP_ROT_270 (MDP_ROT_90|MDP_FLIP_UD|MDP_FLIP_LR)
-#define MDP_DITHER 0x8
-#define MDP_BLUR 0x10
-#define MDP_BLEND_FG_PREMULT 0x20000
-#define MDP_DEINTERLACE 0x80000000
-#define MDP_SHARPENING  0x40000000
-#define MDP_NO_DMA_BARRIER_START	0x20000000
-#define MDP_NO_DMA_BARRIER_END		0x10000000
-#define MDP_NO_BLIT			0x08000000
-#define MDP_BLIT_WITH_DMA_BARRIERS	0x000
-#define MDP_BLIT_WITH_NO_DMA_BARRIERS    \
-	(MDP_NO_DMA_BARRIER_START | MDP_NO_DMA_BARRIER_END)
-#define MDP_BLIT_SRC_GEM                0x04000000
-#define MDP_BLIT_DST_GEM                0x02000000
-#define MDP_BLIT_NON_CACHED		0x01000000
-#define MDP_OV_PIPE_SHARE		0x00800000
-#define MDP_DEINTERLACE_ODD		0x00400000
-#define MDP_OV_PLAY_NOWAIT		0x00200000
-#define MDP_SOURCE_ROTATED_90		0x00100000
-#define MDP_OVERLAY_PP_CFG_EN		0x00080000
-#define MDP_BACKEND_COMPOSITION		0x00040000
-#define MDP_BORDERFILL_SUPPORTED	0x00010000
-#define MDP_SECURE_OVERLAY_SESSION      0x00008000
-#define MDP_MEMORY_ID_TYPE_FB		0x00001000
-
-#define MDP_TRANSP_NOP 0xffffffff
-#define MDP_ALPHA_NOP 0xff
-
-#define MDP_FB_PAGE_PROTECTION_NONCACHED         (0)
-#define MDP_FB_PAGE_PROTECTION_WRITECOMBINE      (1)
-#define MDP_FB_PAGE_PROTECTION_WRITETHROUGHCACHE (2)
-#define MDP_FB_PAGE_PROTECTION_WRITEBACKCACHE    (3)
-#define MDP_FB_PAGE_PROTECTION_WRITEBACKWACACHE  (4)
-/* Sentinel: Don't use! */
-#define MDP_FB_PAGE_PROTECTION_INVALID           (5)
-/* Count of the number of MDP_FB_PAGE_PROTECTION_... values. */
-#define MDP_NUM_FB_PAGE_PROTECTION_VALUES        (5)
-
-struct mdp_rect {
-	uint32_t x;
-	uint32_t y;
-	uint32_t w;
-	uint32_t h;
-};
-
-struct mdp_img {
-	uint32_t width;
-	uint32_t height;
-	uint32_t format;
-	uint32_t offset;
-	int memory_id;		/* the file descriptor */
-	uint32_t priv;
-};
-
-/*
- * {3x3} + {3} ccs matrix
- */
-
-#define MDP_CCS_RGB2YUV 	0
-#define MDP_CCS_YUV2RGB 	1
-
-#define MDP_CCS_SIZE	9
-#define MDP_BV_SIZE	3
-
-struct mdp_ccs {
-	int direction;			/* MDP_CCS_RGB2YUV or YUV2RGB */
-	uint16_t ccs[MDP_CCS_SIZE];	/* 3x3 color coefficients */
-	uint16_t bv[MDP_BV_SIZE];	/* 1x3 bias vector */
-};
-
-struct mdp_csc {
-	int id;
-	uint32_t csc_mv[9];
-	uint32_t csc_pre_bv[3];
-	uint32_t csc_post_bv[3];
-	uint32_t csc_pre_lv[6];
-	uint32_t csc_post_lv[6];
-};
-
-/* The version of the mdp_blit_req structure so that
- * user applications can selectively decide which functionality
- * to include
- */
-
-#define MDP_BLIT_REQ_VERSION 2
-
-struct mdp_blit_req {
-	struct mdp_img src;
-	struct mdp_img dst;
-	struct mdp_rect src_rect;
-	struct mdp_rect dst_rect;
-	uint32_t alpha;
-	uint32_t transp_mask;
-	uint32_t flags;
-	int sharpening_strength;  /* -127 <--> 127, default 64 */
-};
-
-struct mdp_blit_req_list {
-	uint32_t count;
-	struct mdp_blit_req req[];
-};
-
-#define MSMFB_DATA_VERSION 2
-
-struct msmfb_data {
-	uint32_t offset;
-	int memory_id;
-	int id;
-	uint32_t flags;
-	uint32_t priv;
-	uint32_t iova;
-};
-
-#define MSMFB_NEW_REQUEST -1
-
-struct msmfb_overlay_data {
-	uint32_t id;
-	struct msmfb_data data;
-	uint32_t version_key;
-	struct msmfb_data plane1_data;
-	struct msmfb_data plane2_data;
-	struct msmfb_data dst_data;
-};
-
-struct msmfb_img {
-	uint32_t width;
-	uint32_t height;
-	uint32_t format;
-};
-
-#define MSMFB_WRITEBACK_DEQUEUE_BLOCKING 0x1
-struct msmfb_writeback_data {
-	struct msmfb_data buf_info;
-	struct msmfb_img img;
-};
-
-#define MDP_PP_OPS_READ 0x2
-#define MDP_PP_OPS_WRITE 0x4
-
-struct mdp_qseed_cfg {
-	uint32_t table_num;
-	uint32_t ops;
-	uint32_t len;
-	uint32_t *data;
-};
-
-struct mdp_qseed_cfg_data {
-	uint32_t block;
-	struct mdp_qseed_cfg qseed_data;
-};
-
-#define MDP_OVERLAY_PP_CSC_CFG      0x1
-#define MDP_OVERLAY_PP_QSEED_CFG    0x2
-
-#define MDP_CSC_FLAG_ENABLE	0x1
-#define MDP_CSC_FLAG_YUV_IN	0x2
-#define MDP_CSC_FLAG_YUV_OUT	0x4
-
-struct mdp_csc_cfg {
-	/* flags for enable CSC, toggling RGB,YUV input/output */
-	uint32_t flags;
-	uint32_t csc_mv[9];
-	uint32_t csc_pre_bv[3];
-	uint32_t csc_post_bv[3];
-	uint32_t csc_pre_lv[6];
-	uint32_t csc_post_lv[6];
-};
-
-struct mdp_csc_cfg_data {
-	uint32_t block;
-	struct mdp_csc_cfg csc_data;
-};
-
-struct mdp_overlay_pp_params {
-	uint32_t config_ops;
-	struct mdp_csc_cfg csc_cfg;
-	struct mdp_qseed_cfg qseed_cfg[2];
-};
-
-struct mdp_overlay {
-	struct msmfb_img src;
-	struct mdp_rect src_rect;
-	struct mdp_rect dst_rect;
-	uint32_t z_order;	/* stage number */
-	uint32_t is_fg;		/* control alpha & transp */
-	uint32_t alpha;
-	uint32_t transp_mask;
-	uint32_t flags;
-	uint32_t id;
-	uint32_t user_data[8];
-	struct mdp_overlay_pp_params overlay_pp_cfg;
-};
-
-struct msmfb_overlay_3d {
-	uint32_t is_3d;
-	uint32_t width;
-	uint32_t height;
-};
-
-
-struct msmfb_overlay_blt {
-	uint32_t enable;
-	uint32_t offset;
-	uint32_t width;
-	uint32_t height;
-	uint32_t bpp;
-};
-
-struct mdp_histogram {
-	uint32_t frame_cnt;
-	uint32_t bin_cnt;
-	uint32_t *r;
-	uint32_t *g;
-	uint32_t *b;
-};
-
-
-/*
-
-	mdp_block_type defines the identifiers for each of pipes in MDP 4.3
-
-	MDP_BLOCK_RESERVED is provided for backward compatibility and is
-	deprecated. It corresponds to DMA_P. So MDP_BLOCK_DMA_P should be used
-	instead.
-
-*/
-
-enum {
-	MDP_BLOCK_RESERVED = 0,
-	MDP_BLOCK_OVERLAY_0,
-	MDP_BLOCK_OVERLAY_1,
-	MDP_BLOCK_VG_1,
-	MDP_BLOCK_VG_2,
-	MDP_BLOCK_RGB_1,
-	MDP_BLOCK_RGB_2,
-	MDP_BLOCK_DMA_P,
-	MDP_BLOCK_DMA_S,
-	MDP_BLOCK_DMA_E,
-	MDP_BLOCK_OVERLAY_2,
-	MDP_BLOCK_MAX,
-};
-
-/*
- * mdp_histogram_start_req is used to provide the parameters for
- * histogram start request
- */
-
-struct mdp_histogram_start_req {
-	uint32_t block;
-	uint8_t frame_cnt;
-	uint8_t bit_mask;
-	uint8_t num_bins;
-};
-
-/*
- * mdp_histogram_data is used to return the histogram data, once
- * the histogram is done/stopped/cance
- */
-
-struct mdp_histogram_data {
-	uint32_t block;
-	uint8_t bin_cnt;
-	uint32_t *c0;
-	uint32_t *c1;
-	uint32_t *c2;
-	uint32_t *extra_info;
-};
-
-struct mdp_pcc_coeff {
-	uint32_t c, r, g, b, rr, gg, bb, rg, gb, rb, rgb_0, rgb_1;
-};
-
-struct mdp_pcc_cfg_data {
-	uint32_t block;
-	uint32_t ops;
-	struct mdp_pcc_coeff r, g, b;
-};
-
-enum {
-	mdp_lut_igc,
-	mdp_lut_pgc,
-	mdp_lut_hist,
-	mdp_lut_max,
-};
-
-struct mdp_igc_lut_data {
-	uint32_t block;
-	uint32_t len, ops;
-	uint32_t *c0_c1_data;
-	uint32_t *c2_data;
-};
-
-struct mdp_ar_gc_lut_data {
-	uint32_t x_start;
-	uint32_t slope;
-	uint32_t offset;
-};
-
-struct mdp_pgc_lut_data {
-	uint32_t block;
-	uint32_t flags;
-	uint8_t num_r_stages;
-	uint8_t num_g_stages;
-	uint8_t num_b_stages;
-	struct mdp_ar_gc_lut_data *r_data;
-	struct mdp_ar_gc_lut_data *g_data;
-	struct mdp_ar_gc_lut_data *b_data;
-};
-
-
-struct mdp_hist_lut_data {
-	uint32_t block;
-	uint32_t ops;
-	uint32_t len;
-	uint32_t *data;
-};
-
-struct mdp_lut_cfg_data {
-	uint32_t lut_type;
-	union {
-		struct mdp_igc_lut_data igc_lut_data;
-		struct mdp_pgc_lut_data pgc_lut_data;
-		struct mdp_hist_lut_data hist_lut_data;
-	} data;
-};
-
-struct mdp_bl_scale_data {
-	uint32_t min_lvl;
-	uint32_t scale;
-};
-
-enum {
-	mdp_op_pcc_cfg,
-	mdp_op_csc_cfg,
-	mdp_op_lut_cfg,
-	mdp_op_qseed_cfg,
-	mdp_bl_scale_cfg,
-	mdp_op_max,
-};
-
-struct msmfb_mdp_pp {
-	uint32_t op;
-	union {
-		struct mdp_pcc_cfg_data pcc_cfg_data;
-		struct mdp_csc_cfg_data csc_cfg_data;
-		struct mdp_lut_cfg_data lut_cfg_data;
-		struct mdp_qseed_cfg_data qseed_cfg_data;
-		struct mdp_bl_scale_data bl_scale_data;
-	} data;
-};
-
-#define MDP_MAX_FENCE_FD	10
-#define MDP_BUF_SYNC_FLAG_WAIT	1
-
-struct mdp_buf_sync {
-	uint32_t flags;
-	uint32_t acq_fen_fd_cnt;
-	int *acq_fen_fd;
-	int *rel_fen_fd;
-};
-
-struct mdp_buf_fence {
-	uint32_t flags;
-	uint32_t acq_fen_fd_cnt;
-	int acq_fen_fd[MDP_MAX_FENCE_FD];
-	int rel_fen_fd[MDP_MAX_FENCE_FD];
-};
-
-#define MDP_DISPLAY_COMMIT_OVERLAY 0x00000001
-
-struct mdp_display_commit {
-	uint32_t flags;
-	uint32_t wait_for_finish;
-	struct fb_var_screeninfo var;
-	struct mdp_buf_fence buf_fence;
-};
-
-struct mdp_page_protection {
-	uint32_t page_protection;
-};
-
-
-struct mdp_mixer_info {
-	int pndx;
-	int pnum;
-	int ptype;
-	int mixer_num;
-	int z_order;
-};
-
-#define MAX_PIPE_PER_MIXER  4
-
-struct msmfb_mixer_info_req {
-	int mixer_num;
-	int cnt;
-	struct mdp_mixer_info info[MAX_PIPE_PER_MIXER];
-};
-
-enum {
-	DISPLAY_SUBSYSTEM_ID,
-	ROTATOR_SUBSYSTEM_ID,
-};
-
-#ifdef __KERNEL__
-
-/* get the framebuffer physical address information */
-int get_fb_phys_info(unsigned long *start, unsigned long *len, int fb_num,
-	int subsys_id);
-struct fb_info *msm_fb_get_writeback_fb(void);
-int msm_fb_writeback_init(struct fb_info *info);
-int msm_fb_writeback_start(struct fb_info *info);
-int msm_fb_writeback_queue_buffer(struct fb_info *info,
-		struct msmfb_data *data);
-int msm_fb_writeback_dequeue_buffer(struct fb_info *info,
-		struct msmfb_data *data);
-int msm_fb_writeback_stop(struct fb_info *info);
-int msm_fb_writeback_terminate(struct fb_info *info);
-#endif
-
-#endif /*_MSM_MDP_H_*/
diff --git a/original/linux/msm_q6vdec.h b/original/linux/msm_q6vdec.h
deleted file mode 100644
index 1dca803..0000000
--- a/original/linux/msm_q6vdec.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of Code Aurora nor
- *       the names of its contributors may be used to endorse or promote
- *       products derived from this software without specific prior written
- *       permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef _MSM_VDEC_H_
-#define _MSM_VDEC_H_
-
-#include <linux/types.h>
-
-#define VDEC_IOCTL_MAGIC 'v'
-
-#define VDEC_IOCTL_INITIALIZE   _IOWR(VDEC_IOCTL_MAGIC, 1, struct vdec_init)
-#define VDEC_IOCTL_SETBUFFERS   _IOW(VDEC_IOCTL_MAGIC, 2, struct vdec_buffer)
-#define VDEC_IOCTL_QUEUE        _IOWR(VDEC_IOCTL_MAGIC, 3, \
-					struct vdec_input_buf)
-#define VDEC_IOCTL_REUSEFRAMEBUFFER  _IOW(VDEC_IOCTL_MAGIC, 4, unsigned int)
-#define VDEC_IOCTL_FLUSH        _IOW(VDEC_IOCTL_MAGIC, 5, unsigned int)
-#define VDEC_IOCTL_EOS          _IO(VDEC_IOCTL_MAGIC, 6)
-#define VDEC_IOCTL_GETMSG       _IOR(VDEC_IOCTL_MAGIC, 7, struct vdec_msg)
-#define VDEC_IOCTL_CLOSE        _IO(VDEC_IOCTL_MAGIC, 8)
-#define VDEC_IOCTL_FREEBUFFERS  _IOW(VDEC_IOCTL_MAGIC, 9, struct vdec_buf_info)
-#define VDEC_IOCTL_GETDECATTRIBUTES   _IOR(VDEC_IOCTL_MAGIC, 10, \
-						struct vdec_dec_attributes)
-
-enum {
-	VDEC_FRAME_DECODE_OK,
-	VDEC_FRAME_DECODE_ERR,
-	VDEC_FATAL_ERR,
-	VDEC_FLUSH_FINISH,
-	VDEC_EOS,
-	VDEC_FRAME_FLUSH,
-	VDEC_STREAM_SWITCH,
-	VDEC_SUSPEND_FINISH,
-	VDEC_BUFFER_CONSUMED
-};
-
-enum {
-	VDEC_FLUSH_INPUT,
-	VDEC_FLUSH_OUTPUT,
-	VDEC_FLUSH_ALL
-};
-
-enum {
-	VDEC_BUFFER_TYPE_INPUT,
-	VDEC_BUFFER_TYPE_OUTPUT,
-	VDEC_BUFFER_TYPE_INTERNAL1,
-	VDEC_BUFFER_TYPE_INTERNAL2,
-};
-
-enum {
-	VDEC_QUEUE_SUCCESS,
-	VDEC_QUEUE_FAILED,
-	VDEC_QUEUE_BADSTATE,
-};
-
-struct vdec_input_buf_info {
-	u32 offset;
-	u32 data;
-	u32 size;
-	int timestamp_lo;
-	int timestamp_hi;
-	int avsync_state;
-	u32 flags;
-};
-
-struct vdec_buf_desc {
-	u32 bufsize;
-	u32 num_min_buffers;
-	u32 num_max_buffers;
-};
-
-struct vdec_buf_req {
-	u32 max_input_queue_size;
-	struct vdec_buf_desc input;
-	struct vdec_buf_desc output;
-	struct vdec_buf_desc dec_req1;
-	struct vdec_buf_desc dec_req2;
-};
-
-struct vdec_region_info {
-	u32 src_id;
-	u32 offset;
-	u32 size;
-};
-
-struct vdec_config {
-	u32 fourcc;		/* video format */
-	u32 width;		/* source width */
-	u32 height;		/* source height */
-	u32 order;		/* render decoder order */
-	u32 notify_enable;	/* enable notify input buffer done event */
-	u32 vc1_rowbase;
-	u32 h264_startcode_detect;
-	u32 h264_nal_len_size;
-	u32 postproc_flag;
-	u32 fruc_enable;
-	u32 reserved;
-};
-
-struct vdec_vc1_panscan_regions {
-	int num;
-	int width[4];
-	int height[4];
-	int xoffset[4];
-	int yoffset[4];
-};
-
-struct vdec_cropping_window {
-	u32 x1;
-	u32 y1;
-	u32 x2;
-	u32 y2;
-};
-
-struct vdec_frame_info {
-	u32 status;		/* video decode status */
-	u32 offset;		/* buffer offset */
-	u32 data1;		/* user data field 1 */
-	u32 data2;		/* user data field 2 */
-	int timestamp_lo;	/* lower 32 bits timestamp, in msec */
-	int timestamp_hi;	/* higher 32 bits timestamp, in msec */
-	int cal_timestamp_lo;	/* lower 32 bits cal timestamp, in msec */
-	int cal_timestamp_hi;	/* higher  32 bits cal timestamp, in msec */
-	u32 dec_width;		/* frame roi width */
-	u32 dec_height;		/* frame roi height */
-	struct vdec_cropping_window cwin;	/* The frame cropping window */
-	u32 picture_type[2];	/* picture coding type */
-	u32 picture_format;	/* picture coding format */
-	u32 vc1_rangeY;		/* luma range mapping */
-	u32 vc1_rangeUV;	/* chroma range mapping */
-	u32 picture_resolution;	/* scaling factor */
-	u32 frame_disp_repeat;	/* how often repeated by disp */
-	u32 repeat_first_field;	/* repeat 1st field after 2nd */
-	u32 top_field_first;	/* top field displayed first */
-	u32 interframe_interp;	/* not for inter-frame interp */
-	struct vdec_vc1_panscan_regions panscan;	/* pan region */
-	u32 concealed_macblk_num;	/* number of concealed macro blk */
-	u32 flags;		/* input flags */
-	u32 performance_stats;	/* performance statistics returned by decoder */
-	u32 data3;		/* user data field 3 */
-};
-
-struct vdec_buf_info {
-	u32 buf_type;
-	struct vdec_region_info region;
-	u32 num_buf;
-	u32 islast;
-};
-
-struct vdec_buffer {
-	u32 pmem_id;
-	struct vdec_buf_info buf;
-};
-
-struct vdec_sequence {
-	u8 *header;
-	u32 len;
-};
-
-struct vdec_config_sps {
-	struct vdec_config cfg;
-	struct vdec_sequence seq;
-};
-
-#define VDEC_MSG_REUSEINPUTBUFFER 	1
-#define VDEC_MSG_FRAMEDONE 		2
-
-struct vdec_msg {
-	u32 id;
-
-	union {
-		/* id = VDEC_MSG_REUSEINPUTBUFFER */
-		u32 buf_id;
-		/* id = VDEC_MSG_FRAMEDONE */
-		struct vdec_frame_info vfr_info;
-	};
-};
-
-struct vdec_init {
-	struct vdec_config_sps sps_cfg;
-	struct vdec_buf_req *buf_req;
-};
-
-struct vdec_input_buf {
-	u32 pmem_id;
-	struct vdec_input_buf_info buffer;
-	struct vdec_queue_status *queue_status;
-};
-
-struct vdec_queue_status {
-	u32 status;
-};
-
-struct vdec_dec_attributes {
-	u32 fourcc;
-	u32 profile;
-	u32 level;
-	u32 dec_pic_width;
-	u32 dec_pic_height;
-	struct vdec_buf_desc input;
-	struct vdec_buf_desc output;
-	struct vdec_buf_desc dec_req1;
-	struct vdec_buf_desc dec_req2;
-};
-
-#endif /* _MSM_VDEC_H_ */
diff --git a/original/linux/msm_q6venc.h b/original/linux/msm_q6venc.h
deleted file mode 100755
index db31332..0000000
--- a/original/linux/msm_q6venc.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in the
- *       documentation and/or other materials provided with the distribution.
- *     * Neither the name of Code Aurora nor
- *       the names of its contributors may be used to endorse or promote
- *       products derived from this software without specific prior written
- *       permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef _MSM_VENC_H_
-#define _MSM_VENC_H_
-
-#include <linux/types.h>
-
-#define VENC_MAX_RECON_BUFFERS 2
-
-#define VENC_FLAG_EOS                   0x00000001
-#define VENC_FLAG_END_OF_FRAME          0x00000010
-#define VENC_FLAG_SYNC_FRAME            0x00000020
-#define VENC_FLAG_EXTRA_DATA            0x00000040
-#define VENC_FLAG_CODEC_CONFIG          0x00000080
-
-enum venc_flush_type {
-	VENC_FLUSH_INPUT,
-	VENC_FLUSH_OUTPUT,
-	VENC_FLUSH_ALL
-};
-
-enum venc_state_type {
-	VENC_STATE_PAUSE = 0x1,
-	VENC_STATE_START = 0x2,
-	VENC_STATE_STOP = 0x4
-};
-
-enum venc_event_type_enum {
-	VENC_EVENT_START_STATUS,
-	VENC_EVENT_STOP_STATUS,
-	VENC_EVENT_SUSPEND_STATUS,
-	VENC_EVENT_RESUME_STATUS,
-	VENC_EVENT_FLUSH_STATUS,
-	VENC_EVENT_RELEASE_INPUT,
-	VENC_EVENT_DELIVER_OUTPUT,
-	VENC_EVENT_UNKNOWN_STATUS
-};
-
-enum venc_status_code {
-	VENC_STATUS_SUCCESS,
-	VENC_STATUS_ERROR,
-	VENC_STATUS_INVALID_STATE,
-	VENC_STATUS_FLUSHING,
-	VENC_STATUS_INVALID_PARAM,
-	VENC_STATUS_CMD_QUEUE_FULL,
-	VENC_STATUS_CRITICAL,
-	VENC_STATUS_INSUFFICIENT_RESOURCES,
-	VENC_STATUS_TIMEOUT
-};
-
-enum venc_msg_code {
-	VENC_MSG_INDICATION,
-	VENC_MSG_INPUT_BUFFER_DONE,
-	VENC_MSG_OUTPUT_BUFFER_DONE,
-	VENC_MSG_NEED_OUTPUT_BUFFER,
-	VENC_MSG_FLUSH,
-	VENC_MSG_START,
-	VENC_MSG_STOP,
-	VENC_MSG_PAUSE,
-	VENC_MSG_RESUME,
-	VENC_MSG_STOP_READING_MSG
-};
-
-enum venc_error_code {
-	VENC_S_SUCCESS,
-	VENC_S_EFAIL,
-	VENC_S_EFATAL,
-	VENC_S_EBADPARAM,
-	VENC_S_EINVALSTATE,
-	VENC_S_ENOSWRES,
-	VENC_S_ENOHWRES,
-	VENC_S_EBUFFREQ,
-	VENC_S_EINVALCMD,
-	VENC_S_ETIMEOUT,
-	VENC_S_ENOREATMPT,
-	VENC_S_ENOPREREQ,
-	VENC_S_ECMDQFULL,
-	VENC_S_ENOTSUPP,
-	VENC_S_ENOTIMPL,
-	VENC_S_ENOTPMEM,
-	VENC_S_EFLUSHED,
-	VENC_S_EINSUFBUF,
-	VENC_S_ESAMESTATE,
-	VENC_S_EINVALTRANS
-};
-
-enum venc_mem_region_enum {
-	VENC_PMEM_EBI1,
-	VENC_PMEM_SMI
-};
-
-struct venc_buf_type {
-	unsigned int region;
-	unsigned int phys;
-	unsigned int size;
-	int offset;
-};
-
-struct venc_qp_range {
-	unsigned int min_qp;
-	unsigned int max_qp;
-};
-
-struct venc_frame_rate {
-	unsigned int frame_rate_num;
-	unsigned int frame_rate_den;
-};
-
-struct venc_slice_info {
-	unsigned int slice_mode;
-	unsigned int units_per_slice;
-};
-
-struct venc_extra_data {
-	unsigned int slice_extra_data_flag;
-	unsigned int slice_client_data1;
-	unsigned int slice_client_data2;
-	unsigned int slice_client_data3;
-	unsigned int none_extra_data_flag;
-	unsigned int none_client_data1;
-	unsigned int none_client_data2;
-	unsigned int none_client_data3;
-};
-
-struct venc_common_config {
-	unsigned int standard;
-	unsigned int input_frame_height;
-	unsigned int input_frame_width;
-	unsigned int output_frame_height;
-	unsigned int output_frame_width;
-	unsigned int rotation_angle;
-	unsigned int intra_period;
-	unsigned int rate_control;
-	struct venc_frame_rate frame_rate;
-	unsigned int bitrate;
-	struct venc_qp_range qp_range;
-	unsigned int iframe_qp;
-	unsigned int pframe_qp;
-	struct venc_slice_info slice_config;
-	struct venc_extra_data extra_data;
-};
-
-struct venc_nonio_buf_config {
-	struct venc_buf_type recon_buf1;
-	struct venc_buf_type recon_buf2;
-	struct venc_buf_type wb_buf;
-	struct venc_buf_type cmd_buf;
-	struct venc_buf_type vlc_buf;
-};
-
-struct venc_mpeg4_config {
-	unsigned int profile;
-	unsigned int level;
-	unsigned int time_resolution;
-	unsigned int ac_prediction;
-	unsigned int hec_interval;
-	unsigned int data_partition;
-	unsigned int short_header;
-	unsigned int rvlc_enable;
-};
-
-struct venc_h263_config {
-	unsigned int profile;
-	unsigned int level;
-};
-
-struct venc_h264_config {
-	unsigned int profile;
-	unsigned int level;
-	unsigned int max_nal;
-	unsigned int idr_period;
-};
-
-struct venc_pmem {
-	int src;
-	int fd;
-	unsigned int offset;
-	void *virt;
-	void *phys;
-	unsigned int size;
-};
-
-struct venc_buffer {
-	unsigned char *ptr_buffer;
-	unsigned int size;
-	unsigned int len;
-	unsigned int offset;
-	long long time_stamp;
-	unsigned int flags;
-	unsigned int client_data;
-};
-
-struct venc_buffers {
-	struct venc_pmem recon_buf[VENC_MAX_RECON_BUFFERS];
-	struct venc_pmem wb_buf;
-	struct venc_pmem cmd_buf;
-	struct venc_pmem vlc_buf;
-};
-
-struct venc_buffer_flush {
-	unsigned int flush_mode;
-};
-
-union venc_msg_data {
-	struct venc_buffer buf;
-	struct venc_buffer_flush flush_ret;
-};
-
-struct venc_msg {
-	unsigned int status_code;
-	unsigned int msg_code;
-	union venc_msg_data msg_data;
-	unsigned int msg_data_size;
-};
-
-union venc_codec_config {
-	struct venc_mpeg4_config mpeg4_params;
-	struct venc_h263_config h263_params;
-	struct venc_h264_config h264_params;
-};
-
-struct venc_q6_config {
-	struct venc_common_config config_params;
-	union venc_codec_config codec_params;
-	struct venc_nonio_buf_config buf_params;
-	void *callback_event;
-};
-
-struct venc_hdr_config {
-	struct venc_common_config config_params;
-	union venc_codec_config codec_params;
-};
-
-struct venc_init_config {
-	struct venc_q6_config q6_config;
-	struct venc_buffers q6_bufs;
-};
-
-struct venc_seq_config {
-	int size;
-	struct venc_pmem buf;
-	struct venc_q6_config q6_config;
-};
-
-#define VENC_IOCTL_MAGIC 'V'
-
-#define VENC_IOCTL_CMD_READ_NEXT_MSG \
-	_IOWR(VENC_IOCTL_MAGIC, 1, struct venc_msg)
-
-#define VENC_IOCTL_CMD_STOP_READ_MSG  _IO(VENC_IOCTL_MAGIC, 2)
-
-#define VENC_IOCTL_SET_INPUT_BUFFER \
-	_IOW(VENC_IOCTL_MAGIC, 3, struct venc_pmem)
-
-#define VENC_IOCTL_SET_OUTPUT_BUFFER \
-	_IOW(VENC_IOCTL_MAGIC, 4, struct venc_pmem)
-
-#define VENC_IOCTL_CMD_START _IOW(VENC_IOCTL_MAGIC, 5, struct venc_init_config)
-
-#define VENC_IOCTL_CMD_ENCODE_FRAME \
-	_IOW(VENC_IOCTL_MAGIC, 6, struct venc_buffer)
-
-#define VENC_IOCTL_CMD_FILL_OUTPUT_BUFFER \
-	_IOW(VENC_IOCTL_MAGIC, 7, struct venc_buffer)
-
-#define VENC_IOCTL_CMD_FLUSH \
-	_IOW(VENC_IOCTL_MAGIC, 8, struct venc_buffer_flush)
-
-#define VENC_IOCTL_CMD_PAUSE _IO(VENC_IOCTL_MAGIC, 9)
-
-#define VENC_IOCTL_CMD_RESUME _IO(VENC_IOCTL_MAGIC, 10)
-
-#define VENC_IOCTL_CMD_STOP _IO(VENC_IOCTL_MAGIC, 11)
-
-#define VENC_IOCTL_SET_INTRA_PERIOD \
-	_IOW(VENC_IOCTL_MAGIC, 12, int)
-
-#define VENC_IOCTL_CMD_REQUEST_IFRAME _IO(VENC_IOCTL_MAGIC, 13)
-
-#define VENC_IOCTL_GET_SEQUENCE_HDR \
-	_IOWR(VENC_IOCTL_MAGIC, 14, struct venc_seq_config)
-
-#define VENC_IOCTL_SET_INTRA_REFRESH \
-	_IOW(VENC_IOCTL_MAGIC, 15, int)
-
-#define VENC_IOCTL_SET_FRAME_RATE \
-	_IOW(VENC_IOCTL_MAGIC, 16, struct venc_frame_rate)
-
-#define VENC_IOCTL_SET_TARGET_BITRATE \
-	_IOW(VENC_IOCTL_MAGIC, 17, int)
-
-#define VENC_IOCTL_SET_QP_RANGE \
-	_IOW(VENC_IOCTL_MAGIC, 18, struct venc_qp_range)
-
-#endif
diff --git a/original/linux/msm_rmnet.h b/original/linux/msm_rmnet.h
deleted file mode 100644
index 9f52464..0000000
--- a/original/linux/msm_rmnet.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _MSM_RMNET_H_
-#define _MSM_RMNET_H_
-
-/* Bitmap macros for RmNET driver operation mode. */
-#define RMNET_MODE_NONE     (0x00)
-#define RMNET_MODE_LLP_ETH  (0x01)
-#define RMNET_MODE_LLP_IP   (0x02)
-#define RMNET_MODE_QOS      (0x04)
-#define RMNET_MODE_MASK     (RMNET_MODE_LLP_ETH | \
-			     RMNET_MODE_LLP_IP  | \
-			     RMNET_MODE_QOS)
-
-#define RMNET_IS_MODE_QOS(mode)  \
-	((mode & RMNET_MODE_QOS) == RMNET_MODE_QOS)
-#define RMNET_IS_MODE_IP(mode)   \
-	((mode & RMNET_MODE_LLP_IP) == RMNET_MODE_LLP_IP)
-
-/* IOCTL command enum
- * Values chosen to not conflict with other drivers in the ecosystem */
-enum rmnet_ioctl_cmds_e {
-	RMNET_IOCTL_SET_LLP_ETHERNET = 0x000089F1, /* Set Ethernet protocol  */
-	RMNET_IOCTL_SET_LLP_IP       = 0x000089F2, /* Set RAWIP protocol     */
-	RMNET_IOCTL_GET_LLP          = 0x000089F3, /* Get link protocol      */
-	RMNET_IOCTL_SET_QOS_ENABLE   = 0x000089F4, /* Set QoS header enabled */
-	RMNET_IOCTL_SET_QOS_DISABLE  = 0x000089F5, /* Set QoS header disabled*/
-	RMNET_IOCTL_GET_QOS          = 0x000089F6, /* Get QoS header state   */
-	RMNET_IOCTL_GET_OPMODE       = 0x000089F7, /* Get operation mode     */
-	RMNET_IOCTL_OPEN             = 0x000089F8, /* Open transport port    */
-	RMNET_IOCTL_CLOSE            = 0x000089F9, /* Close transport port   */
-	RMNET_IOCTL_MAX
-};
-
-/* QMI QoS header definition */
-#define QMI_QOS_HDR_S  __attribute((__packed__)) qmi_qos_hdr_s
-struct QMI_QOS_HDR_S {
-	unsigned char    version;
-	unsigned char    flags;
-	unsigned long    flow_id;
-};
-
-#endif /* _MSM_RMNET_H_ */
diff --git a/original/linux/msm_rotator.h b/original/linux/msm_rotator.h
deleted file mode 100644
index 17ae867..0000000
--- a/original/linux/msm_rotator.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef __MSM_ROTATOR_H__
-#define __MSM_ROTATOR_H__
-
-#include <linux/types.h>
-#include <linux/msm_mdp.h>
-
-#define MSM_ROTATOR_IOCTL_MAGIC 'R'
-
-#define MSM_ROTATOR_IOCTL_START   \
-		_IOWR(MSM_ROTATOR_IOCTL_MAGIC, 1, struct msm_rotator_img_info)
-#define MSM_ROTATOR_IOCTL_ROTATE   \
-		_IOW(MSM_ROTATOR_IOCTL_MAGIC, 2, struct msm_rotator_data_info)
-#define MSM_ROTATOR_IOCTL_FINISH   \
-		_IOW(MSM_ROTATOR_IOCTL_MAGIC, 3, int)
-
-#define ROTATOR_VERSION_01	0xA5B4C301
-
-enum rotator_clk_type {
-	ROTATOR_CORE_CLK,
-	ROTATOR_PCLK,
-	ROTATOR_IMEM_CLK
-};
-
-struct msm_rotator_img_info {
-	unsigned int session_id;
-	struct msmfb_img  src;
-	struct msmfb_img  dst;
-	struct mdp_rect src_rect;
-	unsigned int    dst_x;
-	unsigned int    dst_y;
-	unsigned char   rotations;
-	int enable;
-	unsigned int	downscale_ratio;
-	unsigned int secure;
-};
-
-struct msm_rotator_data_info {
-	int session_id;
-	struct msmfb_data src;
-	struct msmfb_data dst;
-	unsigned int version_key;
-	struct msmfb_data src_chroma;
-	struct msmfb_data dst_chroma;
-};
-
-struct msm_rot_clocks {
-	const char *clk_name;
-	enum rotator_clk_type clk_type;
-	unsigned int clk_rate;
-};
-
-struct msm_rotator_platform_data {
-	unsigned int number_of_clocks;
-	unsigned int hardware_version_number;
-	struct msm_rot_clocks *rotator_clks;
-#ifdef CONFIG_MSM_BUS_SCALING
-	struct msm_bus_scale_pdata *bus_scale_table;
-#endif
-	char rot_iommu_split_domain;
-};
-#endif
-
diff --git a/original/linux/msm_vidc_dec.h b/original/linux/msm_vidc_dec.h
deleted file mode 100644
index 0c03e13..0000000
--- a/original/linux/msm_vidc_dec.h
+++ /dev/null
@@ -1,568 +0,0 @@
-#ifndef _MSM_VIDC_DEC_H_
-#define _MSM_VIDC_DEC_H_
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-/* STATUS CODES */
-/* Base value for status codes */
-#define VDEC_S_BASE	0x40000000
-/* Success */
-#define VDEC_S_SUCCESS	(VDEC_S_BASE)
-/* General failure */
-#define VDEC_S_EFAIL	(VDEC_S_BASE + 1)
-/* Fatal irrecoverable  failure. Need to  tear down session. */
-#define VDEC_S_EFATAL   (VDEC_S_BASE + 2)
-/* Error detected in the passed  parameters */
-#define VDEC_S_EBADPARAM	(VDEC_S_BASE + 3)
-/* Command called in invalid  state. */
-#define VDEC_S_EINVALSTATE	(VDEC_S_BASE + 4)
- /* Insufficient OS  resources - thread, memory etc. */
-#define VDEC_S_ENOSWRES	(VDEC_S_BASE + 5)
- /* Insufficient HW resources -  core capacity  maxed  out. */
-#define VDEC_S_ENOHWRES	(VDEC_S_BASE + 6)
-/* Invalid command  called */
-#define VDEC_S_EINVALCMD	(VDEC_S_BASE + 7)
-/* Command timeout. */
-#define VDEC_S_ETIMEOUT	(VDEC_S_BASE + 8)
-/* Pre-requirement is  not met for API. */
-#define VDEC_S_ENOPREREQ	(VDEC_S_BASE + 9)
-/* Command queue is full. */
-#define VDEC_S_ECMDQFULL	(VDEC_S_BASE + 10)
-/* Command is not supported  by this driver */
-#define VDEC_S_ENOTSUPP	(VDEC_S_BASE + 11)
-/* Command is not implemented by thedriver. */
-#define VDEC_S_ENOTIMPL	(VDEC_S_BASE + 12)
-/* Command is not implemented by the driver.  */
-#define VDEC_S_BUSY	(VDEC_S_BASE + 13)
-#define VDEC_S_INPUT_BITSTREAM_ERR (VDEC_S_BASE + 14)
-
-#define VDEC_INTF_VER	1
-#define VDEC_MSG_BASE	0x0000000
-/* Codes to identify asynchronous message responses and events that driver
-  wants to communicate to the app.*/
-#define VDEC_MSG_INVALID	(VDEC_MSG_BASE + 0)
-#define VDEC_MSG_RESP_INPUT_BUFFER_DONE	(VDEC_MSG_BASE + 1)
-#define VDEC_MSG_RESP_OUTPUT_BUFFER_DONE	(VDEC_MSG_BASE + 2)
-#define VDEC_MSG_RESP_INPUT_FLUSHED	(VDEC_MSG_BASE + 3)
-#define VDEC_MSG_RESP_OUTPUT_FLUSHED	(VDEC_MSG_BASE + 4)
-#define VDEC_MSG_RESP_FLUSH_INPUT_DONE	(VDEC_MSG_BASE + 5)
-#define VDEC_MSG_RESP_FLUSH_OUTPUT_DONE	(VDEC_MSG_BASE + 6)
-#define VDEC_MSG_RESP_START_DONE	(VDEC_MSG_BASE + 7)
-#define VDEC_MSG_RESP_STOP_DONE	(VDEC_MSG_BASE + 8)
-#define VDEC_MSG_RESP_PAUSE_DONE	(VDEC_MSG_BASE + 9)
-#define VDEC_MSG_RESP_RESUME_DONE	(VDEC_MSG_BASE + 10)
-#define VDEC_MSG_RESP_RESOURCE_LOADED	(VDEC_MSG_BASE + 11)
-#define VDEC_EVT_RESOURCES_LOST	(VDEC_MSG_BASE + 12)
-#define VDEC_MSG_EVT_CONFIG_CHANGED	(VDEC_MSG_BASE + 13)
-#define VDEC_MSG_EVT_HW_ERROR	(VDEC_MSG_BASE + 14)
-#define VDEC_MSG_EVT_INFO_CONFIG_CHANGED	(VDEC_MSG_BASE + 15)
-#define VDEC_MSG_EVT_INFO_FIELD_DROPPED	(VDEC_MSG_BASE + 16)
-
-/*Buffer flags bits masks.*/
-#define VDEC_BUFFERFLAG_EOS	0x00000001
-#define VDEC_BUFFERFLAG_DECODEONLY	0x00000004
-#define VDEC_BUFFERFLAG_DATACORRUPT	0x00000008
-#define VDEC_BUFFERFLAG_ENDOFFRAME	0x00000010
-#define VDEC_BUFFERFLAG_SYNCFRAME	0x00000020
-#define VDEC_BUFFERFLAG_EXTRADATA	0x00000040
-#define VDEC_BUFFERFLAG_CODECCONFIG	0x00000080
-
-/*Post processing flags bit masks*/
-#define VDEC_EXTRADATA_NONE 0x001
-#define VDEC_EXTRADATA_QP 0x004
-#define VDEC_EXTRADATA_MB_ERROR_MAP 0x008
-#define VDEC_EXTRADATA_SEI 0x010
-#define VDEC_EXTRADATA_VUI 0x020
-#define VDEC_EXTRADATA_VC1 0x040
-
-#define VDEC_CMDBASE	0x800
-#define VDEC_CMD_SET_INTF_VERSION	(VDEC_CMDBASE)
-
-#define VDEC_IOCTL_MAGIC 'v'
-
-struct vdec_ioctl_msg {
-	void __user *in;
-	void __user *out;
-};
-
-/* CMD params: InputParam:enum vdec_codec
-   OutputParam: struct vdec_profile_level*/
-#define VDEC_IOCTL_GET_PROFILE_LEVEL_SUPPORTED \
-	_IOWR(VDEC_IOCTL_MAGIC, 0, struct vdec_ioctl_msg)
-
-/*CMD params:InputParam: NULL
-  OutputParam: uint32_t(bitmask)*/
-#define VDEC_IOCTL_GET_INTERLACE_FORMAT \
-	_IOR(VDEC_IOCTL_MAGIC, 1, struct vdec_ioctl_msg)
-
-/* CMD params: InputParam:  enum vdec_codec
-   OutputParam: struct vdec_profile_level*/
-#define VDEC_IOCTL_GET_CURRENT_PROFILE_LEVEL \
-	_IOWR(VDEC_IOCTL_MAGIC, 2, struct vdec_ioctl_msg)
-
-/*CMD params: SET: InputParam: enum vdec_output_fromat  OutputParam: NULL
-  GET:  InputParam: NULL OutputParam: enum vdec_output_fromat*/
-#define VDEC_IOCTL_SET_OUTPUT_FORMAT \
-	_IOWR(VDEC_IOCTL_MAGIC, 3, struct vdec_ioctl_msg)
-#define VDEC_IOCTL_GET_OUTPUT_FORMAT \
-	_IOWR(VDEC_IOCTL_MAGIC, 4, struct vdec_ioctl_msg)
-
-/*CMD params: SET: InputParam: enum vdec_codec OutputParam: NULL
-  GET: InputParam: NULL OutputParam: enum vdec_codec*/
-#define VDEC_IOCTL_SET_CODEC \
-	_IOW(VDEC_IOCTL_MAGIC, 5, struct vdec_ioctl_msg)
-#define VDEC_IOCTL_GET_CODEC \
-	_IOR(VDEC_IOCTL_MAGIC, 6, struct vdec_ioctl_msg)
-
-/*CMD params: SET: InputParam: struct vdec_picsize outputparam: NULL
- GET: InputParam: NULL outputparam: struct vdec_picsize*/
-#define VDEC_IOCTL_SET_PICRES \
-	_IOW(VDEC_IOCTL_MAGIC, 7, struct vdec_ioctl_msg)
-#define VDEC_IOCTL_GET_PICRES \
-	_IOR(VDEC_IOCTL_MAGIC, 8, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_SET_EXTRADATA \
-	_IOW(VDEC_IOCTL_MAGIC, 9, struct vdec_ioctl_msg)
-#define VDEC_IOCTL_GET_EXTRADATA \
-	_IOR(VDEC_IOCTL_MAGIC, 10, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_SET_SEQUENCE_HEADER \
-	_IOW(VDEC_IOCTL_MAGIC, 11, struct vdec_ioctl_msg)
-
-/* CMD params: SET: InputParam - vdec_allocatorproperty, OutputParam - NULL
-   GET: InputParam - NULL, OutputParam - vdec_allocatorproperty*/
-#define VDEC_IOCTL_SET_BUFFER_REQ \
-	_IOW(VDEC_IOCTL_MAGIC, 12, struct vdec_ioctl_msg)
-#define VDEC_IOCTL_GET_BUFFER_REQ \
-	_IOR(VDEC_IOCTL_MAGIC, 13, struct vdec_ioctl_msg)
-/* CMD params: InputParam - vdec_buffer, OutputParam - uint8_t** */
-#define VDEC_IOCTL_ALLOCATE_BUFFER \
-	_IOWR(VDEC_IOCTL_MAGIC, 14, struct vdec_ioctl_msg)
-/* CMD params: InputParam - uint8_t *, OutputParam - NULL.*/
-#define VDEC_IOCTL_FREE_BUFFER \
-	_IOW(VDEC_IOCTL_MAGIC, 15, struct vdec_ioctl_msg)
-
-/*CMD params: CMD: InputParam - struct vdec_setbuffer_cmd, OutputParam - NULL*/
-#define VDEC_IOCTL_SET_BUFFER \
-	_IOW(VDEC_IOCTL_MAGIC, 16, struct vdec_ioctl_msg)
-
-/* CMD params: InputParam - struct vdec_fillbuffer_cmd, OutputParam - NULL*/
-#define VDEC_IOCTL_FILL_OUTPUT_BUFFER \
-	_IOW(VDEC_IOCTL_MAGIC, 17, struct vdec_ioctl_msg)
-
-/*CMD params: InputParam - struct vdec_frameinfo , OutputParam - NULL*/
-#define VDEC_IOCTL_DECODE_FRAME \
-	_IOW(VDEC_IOCTL_MAGIC, 18, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_LOAD_RESOURCES _IO(VDEC_IOCTL_MAGIC, 19)
-#define VDEC_IOCTL_CMD_START _IO(VDEC_IOCTL_MAGIC, 20)
-#define VDEC_IOCTL_CMD_STOP _IO(VDEC_IOCTL_MAGIC, 21)
-#define VDEC_IOCTL_CMD_PAUSE _IO(VDEC_IOCTL_MAGIC, 22)
-#define VDEC_IOCTL_CMD_RESUME _IO(VDEC_IOCTL_MAGIC, 23)
-
-/*CMD params: InputParam - enum vdec_bufferflush , OutputParam - NULL */
-#define VDEC_IOCTL_CMD_FLUSH _IOW(VDEC_IOCTL_MAGIC, 24, struct vdec_ioctl_msg)
-
-/* ========================================================
- * IOCTL for getting asynchronous notification from driver
- * ========================================================*/
-
-/*IOCTL params: InputParam - NULL, OutputParam - struct vdec_msginfo*/
-#define VDEC_IOCTL_GET_NEXT_MSG \
-	_IOR(VDEC_IOCTL_MAGIC, 25, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_STOP_NEXT_MSG _IO(VDEC_IOCTL_MAGIC, 26)
-
-#define VDEC_IOCTL_GET_NUMBER_INSTANCES \
-	_IOR(VDEC_IOCTL_MAGIC, 27, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_SET_PICTURE_ORDER \
-	_IOW(VDEC_IOCTL_MAGIC, 28, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_SET_FRAME_RATE \
-	_IOW(VDEC_IOCTL_MAGIC, 29, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_SET_H264_MV_BUFFER \
-	_IOW(VDEC_IOCTL_MAGIC, 30, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_FREE_H264_MV_BUFFER \
-	_IOW(VDEC_IOCTL_MAGIC, 31, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_GET_MV_BUFFER_SIZE  \
-	_IOR(VDEC_IOCTL_MAGIC, 32, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_SET_IDR_ONLY_DECODING \
-	_IO(VDEC_IOCTL_MAGIC, 33)
-
-#define VDEC_IOCTL_SET_CONT_ON_RECONFIG  \
-	_IO(VDEC_IOCTL_MAGIC, 34)
-
-#define VDEC_IOCTL_SET_DISABLE_DMX \
-	_IOW(VDEC_IOCTL_MAGIC, 35, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_GET_DISABLE_DMX \
-	_IOR(VDEC_IOCTL_MAGIC, 36, struct vdec_ioctl_msg)
-
-#define VDEC_IOCTL_GET_DISABLE_DMX_SUPPORT \
-	_IOR(VDEC_IOCTL_MAGIC, 37, struct vdec_ioctl_msg)
-
-enum vdec_picture {
-	PICTURE_TYPE_I,
-	PICTURE_TYPE_P,
-	PICTURE_TYPE_B,
-	PICTURE_TYPE_BI,
-	PICTURE_TYPE_SKIP,
-	PICTURE_TYPE_IDR,
-	PICTURE_TYPE_UNKNOWN
-};
-
-enum vdec_buffer {
-	VDEC_BUFFER_TYPE_INPUT,
-	VDEC_BUFFER_TYPE_OUTPUT
-};
-
-struct vdec_allocatorproperty {
-	enum vdec_buffer buffer_type;
-	uint32_t mincount;
-	uint32_t maxcount;
-	uint32_t actualcount;
-	size_t buffer_size;
-	uint32_t alignment;
-	uint32_t buf_poolid;
-};
-
-struct vdec_bufferpayload {
-	void __user *bufferaddr;
-	size_t buffer_len;
-	int pmem_fd;
-	size_t offset;
-	size_t mmaped_size;
-};
-
-struct vdec_setbuffer_cmd {
-	enum vdec_buffer buffer_type;
-	struct vdec_bufferpayload buffer;
-};
-
-struct vdec_fillbuffer_cmd {
-	struct vdec_bufferpayload buffer;
-	void *client_data;
-};
-
-enum vdec_bufferflush {
-	VDEC_FLUSH_TYPE_INPUT,
-	VDEC_FLUSH_TYPE_OUTPUT,
-	VDEC_FLUSH_TYPE_ALL
-};
-
-enum vdec_codec {
-	VDEC_CODECTYPE_H264 = 0x1,
-	VDEC_CODECTYPE_H263 = 0x2,
-	VDEC_CODECTYPE_MPEG4 = 0x3,
-	VDEC_CODECTYPE_DIVX_3 = 0x4,
-	VDEC_CODECTYPE_DIVX_4 = 0x5,
-	VDEC_CODECTYPE_DIVX_5 = 0x6,
-	VDEC_CODECTYPE_DIVX_6 = 0x7,
-	VDEC_CODECTYPE_XVID = 0x8,
-	VDEC_CODECTYPE_MPEG1 = 0x9,
-	VDEC_CODECTYPE_MPEG2 = 0xa,
-	VDEC_CODECTYPE_VC1 = 0xb,
-	VDEC_CODECTYPE_VC1_RCV = 0xc
-};
-
-enum vdec_mpeg2_profile {
-	VDEC_MPEG2ProfileSimple = 0x1,
-	VDEC_MPEG2ProfileMain = 0x2,
-	VDEC_MPEG2Profile422 = 0x4,
-	VDEC_MPEG2ProfileSNR = 0x8,
-	VDEC_MPEG2ProfileSpatial = 0x10,
-	VDEC_MPEG2ProfileHigh = 0x20,
-	VDEC_MPEG2ProfileKhronosExtensions = 0x6F000000,
-	VDEC_MPEG2ProfileVendorStartUnused = 0x7F000000,
-	VDEC_MPEG2ProfileMax = 0x7FFFFFFF
-};
-
-enum vdec_mpeg2_level {
-
-	VDEC_MPEG2LevelLL = 0x1,
-	VDEC_MPEG2LevelML = 0x2,
-	VDEC_MPEG2LevelH14 = 0x4,
-	VDEC_MPEG2LevelHL = 0x8,
-	VDEC_MPEG2LevelKhronosExtensions = 0x6F000000,
-	VDEC_MPEG2LevelVendorStartUnused = 0x7F000000,
-	VDEC_MPEG2LevelMax = 0x7FFFFFFF
-};
-
-enum vdec_mpeg4_profile {
-	VDEC_MPEG4ProfileSimple = 0x01,
-	VDEC_MPEG4ProfileSimpleScalable = 0x02,
-	VDEC_MPEG4ProfileCore = 0x04,
-	VDEC_MPEG4ProfileMain = 0x08,
-	VDEC_MPEG4ProfileNbit = 0x10,
-	VDEC_MPEG4ProfileScalableTexture = 0x20,
-	VDEC_MPEG4ProfileSimpleFace = 0x40,
-	VDEC_MPEG4ProfileSimpleFBA = 0x80,
-	VDEC_MPEG4ProfileBasicAnimated = 0x100,
-	VDEC_MPEG4ProfileHybrid = 0x200,
-	VDEC_MPEG4ProfileAdvancedRealTime = 0x400,
-	VDEC_MPEG4ProfileCoreScalable = 0x800,
-	VDEC_MPEG4ProfileAdvancedCoding = 0x1000,
-	VDEC_MPEG4ProfileAdvancedCore = 0x2000,
-	VDEC_MPEG4ProfileAdvancedScalable = 0x4000,
-	VDEC_MPEG4ProfileAdvancedSimple = 0x8000,
-	VDEC_MPEG4ProfileKhronosExtensions = 0x6F000000,
-	VDEC_MPEG4ProfileVendorStartUnused = 0x7F000000,
-	VDEC_MPEG4ProfileMax = 0x7FFFFFFF
-};
-
-enum vdec_mpeg4_level {
-	VDEC_MPEG4Level0 = 0x01,
-	VDEC_MPEG4Level0b = 0x02,
-	VDEC_MPEG4Level1 = 0x04,
-	VDEC_MPEG4Level2 = 0x08,
-	VDEC_MPEG4Level3 = 0x10,
-	VDEC_MPEG4Level4 = 0x20,
-	VDEC_MPEG4Level4a = 0x40,
-	VDEC_MPEG4Level5 = 0x80,
-	VDEC_MPEG4LevelKhronosExtensions = 0x6F000000,
-	VDEC_MPEG4LevelVendorStartUnused = 0x7F000000,
-	VDEC_MPEG4LevelMax = 0x7FFFFFFF
-};
-
-enum vdec_avc_profile {
-	VDEC_AVCProfileBaseline = 0x01,
-	VDEC_AVCProfileMain = 0x02,
-	VDEC_AVCProfileExtended = 0x04,
-	VDEC_AVCProfileHigh = 0x08,
-	VDEC_AVCProfileHigh10 = 0x10,
-	VDEC_AVCProfileHigh422 = 0x20,
-	VDEC_AVCProfileHigh444 = 0x40,
-	VDEC_AVCProfileKhronosExtensions = 0x6F000000,
-	VDEC_AVCProfileVendorStartUnused = 0x7F000000,
-	VDEC_AVCProfileMax = 0x7FFFFFFF
-};
-
-enum vdec_avc_level {
-	VDEC_AVCLevel1 = 0x01,
-	VDEC_AVCLevel1b = 0x02,
-	VDEC_AVCLevel11 = 0x04,
-	VDEC_AVCLevel12 = 0x08,
-	VDEC_AVCLevel13 = 0x10,
-	VDEC_AVCLevel2 = 0x20,
-	VDEC_AVCLevel21 = 0x40,
-	VDEC_AVCLevel22 = 0x80,
-	VDEC_AVCLevel3 = 0x100,
-	VDEC_AVCLevel31 = 0x200,
-	VDEC_AVCLevel32 = 0x400,
-	VDEC_AVCLevel4 = 0x800,
-	VDEC_AVCLevel41 = 0x1000,
-	VDEC_AVCLevel42 = 0x2000,
-	VDEC_AVCLevel5 = 0x4000,
-	VDEC_AVCLevel51 = 0x8000,
-	VDEC_AVCLevelKhronosExtensions = 0x6F000000,
-	VDEC_AVCLevelVendorStartUnused = 0x7F000000,
-	VDEC_AVCLevelMax = 0x7FFFFFFF
-};
-
-enum vdec_divx_profile {
-	VDEC_DIVXProfile_qMobile = 0x01,
-	VDEC_DIVXProfile_Mobile = 0x02,
-	VDEC_DIVXProfile_HD = 0x04,
-	VDEC_DIVXProfile_Handheld = 0x08,
-	VDEC_DIVXProfile_Portable = 0x10,
-	VDEC_DIVXProfile_HomeTheater = 0x20
-};
-
-enum vdec_xvid_profile {
-	VDEC_XVIDProfile_Simple = 0x1,
-	VDEC_XVIDProfile_Advanced_Realtime_Simple = 0x2,
-	VDEC_XVIDProfile_Advanced_Simple = 0x4
-};
-
-enum vdec_xvid_level {
-	VDEC_XVID_LEVEL_S_L0 = 0x1,
-	VDEC_XVID_LEVEL_S_L1 = 0x2,
-	VDEC_XVID_LEVEL_S_L2 = 0x4,
-	VDEC_XVID_LEVEL_S_L3 = 0x8,
-	VDEC_XVID_LEVEL_ARTS_L1 = 0x10,
-	VDEC_XVID_LEVEL_ARTS_L2 = 0x20,
-	VDEC_XVID_LEVEL_ARTS_L3 = 0x40,
-	VDEC_XVID_LEVEL_ARTS_L4 = 0x80,
-	VDEC_XVID_LEVEL_AS_L0 = 0x100,
-	VDEC_XVID_LEVEL_AS_L1 = 0x200,
-	VDEC_XVID_LEVEL_AS_L2 = 0x400,
-	VDEC_XVID_LEVEL_AS_L3 = 0x800,
-	VDEC_XVID_LEVEL_AS_L4 = 0x1000
-};
-
-enum vdec_h263profile {
-	VDEC_H263ProfileBaseline = 0x01,
-	VDEC_H263ProfileH320Coding = 0x02,
-	VDEC_H263ProfileBackwardCompatible = 0x04,
-	VDEC_H263ProfileISWV2 = 0x08,
-	VDEC_H263ProfileISWV3 = 0x10,
-	VDEC_H263ProfileHighCompression = 0x20,
-	VDEC_H263ProfileInternet = 0x40,
-	VDEC_H263ProfileInterlace = 0x80,
-	VDEC_H263ProfileHighLatency = 0x100,
-	VDEC_H263ProfileKhronosExtensions = 0x6F000000,
-	VDEC_H263ProfileVendorStartUnused = 0x7F000000,
-	VDEC_H263ProfileMax = 0x7FFFFFFF
-};
-
-enum vdec_h263level {
-	VDEC_H263Level10 = 0x01,
-	VDEC_H263Level20 = 0x02,
-	VDEC_H263Level30 = 0x04,
-	VDEC_H263Level40 = 0x08,
-	VDEC_H263Level45 = 0x10,
-	VDEC_H263Level50 = 0x20,
-	VDEC_H263Level60 = 0x40,
-	VDEC_H263Level70 = 0x80,
-	VDEC_H263LevelKhronosExtensions = 0x6F000000,
-	VDEC_H263LevelVendorStartUnused = 0x7F000000,
-	VDEC_H263LevelMax = 0x7FFFFFFF
-};
-
-enum vdec_wmv_format {
-	VDEC_WMVFormatUnused = 0x01,
-	VDEC_WMVFormat7 = 0x02,
-	VDEC_WMVFormat8 = 0x04,
-	VDEC_WMVFormat9 = 0x08,
-	VDEC_WMFFormatKhronosExtensions = 0x6F000000,
-	VDEC_WMFFormatVendorStartUnused = 0x7F000000,
-	VDEC_WMVFormatMax = 0x7FFFFFFF
-};
-
-enum vdec_vc1_profile {
-	VDEC_VC1ProfileSimple = 0x1,
-	VDEC_VC1ProfileMain = 0x2,
-	VDEC_VC1ProfileAdvanced = 0x4
-};
-
-enum vdec_vc1_level {
-	VDEC_VC1_LEVEL_S_Low = 0x1,
-	VDEC_VC1_LEVEL_S_Medium = 0x2,
-	VDEC_VC1_LEVEL_M_Low = 0x4,
-	VDEC_VC1_LEVEL_M_Medium = 0x8,
-	VDEC_VC1_LEVEL_M_High = 0x10,
-	VDEC_VC1_LEVEL_A_L0 = 0x20,
-	VDEC_VC1_LEVEL_A_L1 = 0x40,
-	VDEC_VC1_LEVEL_A_L2 = 0x80,
-	VDEC_VC1_LEVEL_A_L3 = 0x100,
-	VDEC_VC1_LEVEL_A_L4 = 0x200
-};
-
-struct vdec_profile_level {
-	uint32_t profiles;
-	uint32_t levels;
-};
-
-enum vdec_interlaced_format {
-	VDEC_InterlaceFrameProgressive = 0x1,
-	VDEC_InterlaceInterleaveFrameTopFieldFirst = 0x2,
-	VDEC_InterlaceInterleaveFrameBottomFieldFirst = 0x4
-};
-
-enum vdec_output_fromat {
-	VDEC_YUV_FORMAT_NV12 = 0x1,
-	VDEC_YUV_FORMAT_TILE_4x2 = 0x2
-};
-
-enum vdec_output_order {
-	VDEC_ORDER_DISPLAY = 0x1,
-	VDEC_ORDER_DECODE = 0x2
-};
-
-struct vdec_picsize {
-	uint32_t frame_width;
-	uint32_t frame_height;
-	uint32_t stride;
-	uint32_t scan_lines;
-};
-
-struct vdec_seqheader {
-	void __user *ptr_seqheader;
-	size_t seq_header_len;
-	int pmem_fd;
-	size_t pmem_offset;
-};
-
-struct vdec_mberror {
-	void __user *ptr_errormap;
-	size_t err_mapsize;
-};
-
-struct vdec_input_frameinfo {
-	void __user *bufferaddr;
-	size_t offset;
-	size_t datalen;
-	uint32_t flags;
-	int64_t timestamp;
-	void *client_data;
-	int pmem_fd;
-	size_t pmem_offset;
-	void __user *desc_addr;
-	uint32_t desc_size;
-};
-
-struct vdec_framesize {
-	uint32_t   left;
-	uint32_t   top;
-	uint32_t   right;
-	uint32_t   bottom;
-};
-
-struct vdec_aspectratioinfo {
-	uint32_t aspect_ratio;
-	uint32_t par_width;
-	uint32_t par_height;
-};
-
-struct vdec_output_frameinfo {
-	void __user *bufferaddr;
-	size_t offset;
-	size_t len;
-	uint32_t flags;
-	int64_t time_stamp;
-	enum vdec_picture pic_type;
-	void *client_data;
-	void *input_frame_clientdata;
-	struct vdec_framesize framesize;
-	enum vdec_interlaced_format interlaced_format;
-	struct vdec_aspectratioinfo aspect_ratio_info;
-};
-
-union vdec_msgdata {
-	struct vdec_output_frameinfo output_frame;
-	void *input_frame_clientdata;
-};
-
-struct vdec_msginfo {
-	uint32_t status_code;
-	uint32_t msgcode;
-	union vdec_msgdata msgdata;
-	size_t msgdatasize;
-};
-
-struct vdec_framerate {
-	unsigned long fps_denominator;
-	unsigned long fps_numerator;
-};
-
-struct vdec_h264_mv{
-	size_t size;
-	int count;
-	int pmem_fd;
-	int offset;
-};
-
-struct vdec_mv_buff_size{
-	int width;
-	int height;
-	int size;
-	int alignment;
-};
-
-#endif /* end of macro _VDECDECODER_H_ */
diff --git a/original/linux/msm_vidc_enc.h b/original/linux/msm_vidc_enc.h
deleted file mode 100644
index b70ba97..0000000
--- a/original/linux/msm_vidc_enc.h
+++ /dev/null
@@ -1,621 +0,0 @@
-#ifndef _MSM_VIDC_ENC_H_
-#define _MSM_VIDC_ENC_H_
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-/** STATUS CODES*/
-/* Base value for status codes */
-#define VEN_S_BASE	0x00000000
-#define VEN_S_SUCCESS	(VEN_S_BASE)/* Success */
-#define VEN_S_EFAIL	(VEN_S_BASE+1)/* General failure */
-#define VEN_S_EFATAL	(VEN_S_BASE+2)/* Fatal irrecoverable failure*/
-#define VEN_S_EBADPARAM	(VEN_S_BASE+3)/* Error passed parameters*/
-/*Command called in invalid state*/
-#define VEN_S_EINVALSTATE	(VEN_S_BASE+4)
-#define VEN_S_ENOSWRES	(VEN_S_BASE+5)/* Insufficient OS resources*/
-#define VEN_S_ENOHWRES	(VEN_S_BASE+6)/*Insufficient HW resources */
-#define VEN_S_EBUFFREQ	(VEN_S_BASE+7)/* Buffer requirements were not met*/
-#define VEN_S_EINVALCMD	(VEN_S_BASE+8)/* Invalid command called */
-#define VEN_S_ETIMEOUT	(VEN_S_BASE+9)/* Command timeout. */
-/*Re-attempt was made when multiple invocation not supported for API.*/
-#define VEN_S_ENOREATMPT	(VEN_S_BASE+10)
-#define VEN_S_ENOPREREQ	(VEN_S_BASE+11)/*Pre-requirement is not met for API*/
-#define VEN_S_ECMDQFULL	(VEN_S_BASE+12)/*Command queue is full*/
-#define VEN_S_ENOTSUPP	(VEN_S_BASE+13)/*Command not supported*/
-#define VEN_S_ENOTIMPL	(VEN_S_BASE+14)/*Command not implemented.*/
-#define VEN_S_ENOTPMEM	(VEN_S_BASE+15)/*Buffer is not from PMEM*/
-#define VEN_S_EFLUSHED	(VEN_S_BASE+16)/*returned buffer was flushed*/
-#define VEN_S_EINSUFBUF	(VEN_S_BASE+17)/*provided buffer size insufficient*/
-#define VEN_S_ESAMESTATE	(VEN_S_BASE+18)
-#define VEN_S_EINVALTRANS	(VEN_S_BASE+19)
-
-#define VEN_INTF_VER			 1
-
-/*Asynchronous messages from driver*/
-#define VEN_MSG_INDICATION	0
-#define VEN_MSG_INPUT_BUFFER_DONE	1
-#define VEN_MSG_OUTPUT_BUFFER_DONE	2
-#define VEN_MSG_NEED_OUTPUT_BUFFER	3
-#define VEN_MSG_FLUSH_INPUT_DONE	4
-#define VEN_MSG_FLUSH_OUPUT_DONE	5
-#define VEN_MSG_START	6
-#define VEN_MSG_STOP	7
-#define VEN_MSG_PAUSE	8
-#define VEN_MSG_RESUME	9
-#define VEN_MSG_STOP_READING_MSG	10
-
-/*Buffer flags bits masks*/
-#define VEN_BUFFLAG_EOS	0x00000001
-#define VEN_BUFFLAG_ENDOFFRAME	0x00000010
-#define VEN_BUFFLAG_SYNCFRAME	0x00000020
-#define VEN_BUFFLAG_EXTRADATA	0x00000040
-#define VEN_BUFFLAG_CODECCONFIG	0x00000080
-
-/*Post processing flags bit masks*/
-#define VEN_EXTRADATA_NONE          0x001
-#define VEN_EXTRADATA_QCOMFILLER    0x002
-#define VEN_EXTRADATA_SLICEINFO     0x100
-
-/*ENCODER CONFIGURATION CONSTANTS*/
-
-/*Encoded video frame types*/
-#define VEN_FRAME_TYPE_I	1/* I frame type */
-#define VEN_FRAME_TYPE_P	2/* P frame type */
-#define VEN_FRAME_TYPE_B	3/* B frame type */
-
-/*Video codec types*/
-#define VEN_CODEC_MPEG4	1/* MPEG4 Codec */
-#define VEN_CODEC_H264	2/* H.264 Codec */
-#define VEN_CODEC_H263	3/* H.263 Codec */
-
-/*Video codec profile types.*/
-#define VEN_PROFILE_MPEG4_SP      1/* 1 - MPEG4 SP profile      */
-#define VEN_PROFILE_MPEG4_ASP     2/* 2 - MPEG4 ASP profile     */
-#define VEN_PROFILE_H264_BASELINE 3/* 3 - H264 Baseline profile	*/
-#define VEN_PROFILE_H264_MAIN     4/* 4 - H264 Main profile     */
-#define VEN_PROFILE_H264_HIGH     5/* 5 - H264 High profile     */
-#define VEN_PROFILE_H263_BASELINE 6/* 6 - H263 Baseline profile */
-
-/*Video codec profile level types.*/
-#define VEN_LEVEL_MPEG4_0	 0x1/* MPEG4 Level 0  */
-#define VEN_LEVEL_MPEG4_1	 0x2/* MPEG4 Level 1  */
-#define VEN_LEVEL_MPEG4_2	 0x3/* MPEG4 Level 2  */
-#define VEN_LEVEL_MPEG4_3	 0x4/* MPEG4 Level 3  */
-#define VEN_LEVEL_MPEG4_4	 0x5/* MPEG4 Level 4  */
-#define VEN_LEVEL_MPEG4_5	 0x6/* MPEG4 Level 5  */
-#define VEN_LEVEL_MPEG4_3b	 0x7/* MPEG4 Level 3b */
-#define VEN_LEVEL_MPEG4_6	 0x8/* MPEG4 Level 6  */
-
-#define VEN_LEVEL_H264_1	 0x9/* H.264 Level 1   */
-#define VEN_LEVEL_H264_1b        0xA/* H.264 Level 1b  */
-#define VEN_LEVEL_H264_1p1	 0xB/* H.264 Level 1.1 */
-#define VEN_LEVEL_H264_1p2	 0xC/* H.264 Level 1.2 */
-#define VEN_LEVEL_H264_1p3	 0xD/* H.264 Level 1.3 */
-#define VEN_LEVEL_H264_2	 0xE/* H.264 Level 2   */
-#define VEN_LEVEL_H264_2p1	 0xF/* H.264 Level 2.1 */
-#define VEN_LEVEL_H264_2p2	0x10/* H.264 Level 2.2 */
-#define VEN_LEVEL_H264_3	0x11/* H.264 Level 3   */
-#define VEN_LEVEL_H264_3p1	0x12/* H.264 Level 3.1 */
-#define VEN_LEVEL_H264_3p2	0x13/* H.264 Level 3.2 */
-#define VEN_LEVEL_H264_4	0x14/* H.264 Level 4   */
-
-#define VEN_LEVEL_H263_10	0x15/* H.263 Level 10  */
-#define VEN_LEVEL_H263_20	0x16/* H.263 Level 20  */
-#define VEN_LEVEL_H263_30	0x17/* H.263 Level 30  */
-#define VEN_LEVEL_H263_40	0x18/* H.263 Level 40  */
-#define VEN_LEVEL_H263_45	0x19/* H.263 Level 45  */
-#define VEN_LEVEL_H263_50	0x1A/* H.263 Level 50  */
-#define VEN_LEVEL_H263_60	0x1B/* H.263 Level 60  */
-#define VEN_LEVEL_H263_70	0x1C/* H.263 Level 70  */
-
-/*Entropy coding model selection for H.264 encoder.*/
-#define VEN_ENTROPY_MODEL_CAVLC	1
-#define VEN_ENTROPY_MODEL_CABAC	2
-/*Cabac model number (0,1,2) for encoder.*/
-#define VEN_CABAC_MODEL_0	1/* CABAC Model 0. */
-#define VEN_CABAC_MODEL_1	2/* CABAC Model 1. */
-#define VEN_CABAC_MODEL_2	3/* CABAC Model 2. */
-
-/*Deblocking filter control type for encoder.*/
-#define VEN_DB_DISABLE	1/* 1 - Disable deblocking filter*/
-#define VEN_DB_ALL_BLKG_BNDRY	2/* 2 - All blocking boundary filtering*/
-#define VEN_DB_SKIP_SLICE_BNDRY	3/* 3 - Filtering except sliceboundary*/
-
-/*Different methods of Multi slice selection.*/
-#define VEN_MSLICE_OFF	1
-#define VEN_MSLICE_CNT_MB	2 /*number of MBscount per slice*/
-#define VEN_MSLICE_CNT_BYTE	3 /*number of bytes count per slice.*/
-#define VEN_MSLICE_GOB	4 /*Multi slice by GOB for H.263 only.*/
-
-/*Different modes for Rate Control.*/
-#define VEN_RC_OFF	1
-#define VEN_RC_VBR_VFR	2
-#define VEN_RC_VBR_CFR	3
-#define VEN_RC_CBR_VFR	4
-#define VEN_RC_CBR_CFR	5
-
-/*Different modes for flushing buffers*/
-#define VEN_FLUSH_INPUT	1
-#define VEN_FLUSH_OUTPUT	2
-#define VEN_FLUSH_ALL	3
-
-/*Different input formats for YUV data.*/
-#define VEN_INPUTFMT_NV12	1/* NV12 Linear */
-#define VEN_INPUTFMT_NV21	2/* NV21 Linear */
-#define VEN_INPUTFMT_NV12_16M2KA	3/* NV12 Linear */
-
-/*Different allowed rotation modes.*/
-#define VEN_ROTATION_0	1/* 0 degrees */
-#define VEN_ROTATION_90	2/* 90 degrees */
-#define VEN_ROTATION_180	3/* 180 degrees */
-#define VEN_ROTATION_270	4/* 270 degrees */
-
-/*IOCTL timeout values*/
-#define VEN_TIMEOUT_INFINITE	0xffffffff
-
-/*Different allowed intra refresh modes.*/
-#define VEN_IR_OFF	1
-#define VEN_IR_CYCLIC	2
-#define VEN_IR_RANDOM	3
-
-/*IOCTL BASE CODES Not to be used directly by the client.*/
-/* Base value for ioctls that are not related to encoder configuration.*/
-#define VEN_IOCTLBASE_NENC	0x800
-/* Base value for encoder configuration ioctls*/
-#define VEN_IOCTLBASE_ENC	0x850
-
-struct venc_ioctl_msg{
-	void __user *in;
-	void __user *out;
-};
-
-/*NON ENCODER CONFIGURATION IOCTLs*/
-
-/*IOCTL params:SET: InputData - unsigned long, OutputData - NULL*/
-#define VEN_IOCTL_SET_INTF_VERSION \
-	_IOW(VEN_IOCTLBASE_NENC, 0, struct venc_ioctl_msg)
-
-/*IOCTL params:CMD: InputData - venc_timeout, OutputData - venc_msg*/
-#define VEN_IOCTL_CMD_READ_NEXT_MSG \
-	_IOWR(VEN_IOCTLBASE_NENC, 1, struct venc_ioctl_msg)
-
-/*IOCTL params:CMD: InputData - NULL, OutputData - NULL*/
-#define VEN_IOCTL_CMD_STOP_READ_MSG	_IO(VEN_IOCTLBASE_NENC, 2)
-
-/*IOCTL params:SET: InputData - venc_allocatorproperty, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_allocatorproperty*/
-#define VEN_IOCTL_SET_INPUT_BUFFER_REQ \
-	_IOW(VEN_IOCTLBASE_NENC, 3, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_INPUT_BUFFER_REQ \
-	_IOR(VEN_IOCTLBASE_NENC, 4, struct venc_ioctl_msg)
-
-/*IOCTL params:CMD: InputData - venc_bufferpayload, OutputData - NULL*/
-#define VEN_IOCTL_CMD_ALLOC_INPUT_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 5, struct venc_ioctl_msg)
-
-/*IOCTL params:CMD: InputData - venc_bufferpayload, OutputData - NULL*/
-#define VEN_IOCTL_SET_INPUT_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 6, struct venc_ioctl_msg)
-
-/*IOCTL params: CMD: InputData - venc_bufferpayload, OutputData - NULL*/
-#define VEN_IOCTL_CMD_FREE_INPUT_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 7, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - venc_allocatorproperty, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_allocatorproperty*/
-#define VEN_IOCTL_SET_OUTPUT_BUFFER_REQ \
-	_IOW(VEN_IOCTLBASE_NENC, 8, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_OUTPUT_BUFFER_REQ \
-	_IOR(VEN_IOCTLBASE_NENC, 9, struct venc_ioctl_msg)
-
-/*IOCTL params:CMD: InputData - venc_bufferpayload, OutputData - NULL*/
-#define VEN_IOCTL_CMD_ALLOC_OUTPUT_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 10, struct venc_ioctl_msg)
-
-
-/*IOCTL params:CMD: InputData - venc_bufferpayload, OutputData - NULL*/
-#define VEN_IOCTL_SET_OUTPUT_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 11, struct venc_ioctl_msg)
-
-/*IOCTL params:CMD: InputData - venc_bufferpayload, OutputData - NULL.*/
-#define VEN_IOCTL_CMD_FREE_OUTPUT_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 12, struct venc_ioctl_msg)
-
-
-/* Asynchronous respone message code:* VEN_MSG_START*/
-#define VEN_IOCTL_CMD_START	_IO(VEN_IOCTLBASE_NENC, 13)
-
-
-/*IOCTL params:CMD: InputData - venc_buffer, OutputData - NULL
- Asynchronous respone message code:VEN_MSG_INPUT_BUFFER_DONE*/
-#define VEN_IOCTL_CMD_ENCODE_FRAME \
-	_IOW(VEN_IOCTLBASE_NENC, 14, struct venc_ioctl_msg)
-
-
-/*IOCTL params:CMD: InputData - venc_buffer, OutputData - NULL
- Asynchronous response message code:VEN_MSG_OUTPUT_BUFFER_DONE*/
-#define VEN_IOCTL_CMD_FILL_OUTPUT_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 15, struct venc_ioctl_msg)
-
-/*IOCTL params:CMD: InputData - venc_bufferflush, OutputData - NULL
- * Asynchronous response message code:VEN_MSG_INPUT_BUFFER_DONE*/
-#define VEN_IOCTL_CMD_FLUSH \
-	_IOW(VEN_IOCTLBASE_NENC, 16, struct venc_ioctl_msg)
-
-
-/*Asynchronous respone message code:VEN_MSG_PAUSE*/
-#define VEN_IOCTL_CMD_PAUSE	_IO(VEN_IOCTLBASE_NENC, 17)
-
-/*Asynchronous respone message code:VEN_MSG_RESUME*/
-#define VEN_IOCTL_CMD_RESUME _IO(VEN_IOCTLBASE_NENC, 18)
-
-/* Asynchronous respone message code:VEN_MSG_STOP*/
-#define VEN_IOCTL_CMD_STOP _IO(VEN_IOCTLBASE_NENC, 19)
-
-#define VEN_IOCTL_SET_RECON_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 20, struct venc_ioctl_msg)
-
-#define VEN_IOCTL_FREE_RECON_BUFFER \
-	_IOW(VEN_IOCTLBASE_NENC, 21, struct venc_ioctl_msg)
-
-#define VEN_IOCTL_GET_RECON_BUFFER_SIZE \
-	_IOW(VEN_IOCTLBASE_NENC, 22, struct venc_ioctl_msg)
-
-
-
-/*ENCODER PROPERTY CONFIGURATION & CAPABILITY IOCTLs*/
-
-/*IOCTL params:SET: InputData - venc_basecfg, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_basecfg*/
-#define VEN_IOCTL_SET_BASE_CFG \
-	_IOW(VEN_IOCTLBASE_ENC, 1, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_BASE_CFG \
-	_IOR(VEN_IOCTLBASE_ENC, 2, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - venc_switch, OutputData - NULL
-  GET: InputData - NULL, OutputData - venc_switch*/
-#define VEN_IOCTL_SET_LIVE_MODE \
-	_IOW(VEN_IOCTLBASE_ENC, 3, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_LIVE_MODE \
-	_IOR(VEN_IOCTLBASE_ENC, 4, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_profile, OutputData - NULL
-  GET: InputData - NULL, OutputData - venc_profile*/
-#define VEN_IOCTL_SET_CODEC_PROFILE \
-	_IOW(VEN_IOCTLBASE_ENC, 5, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_CODEC_PROFILE \
-	_IOR(VEN_IOCTLBASE_ENC, 6, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - ven_profilelevel, OutputData - NULL
-  GET: InputData - NULL, OutputData - ven_profilelevel*/
-#define VEN_IOCTL_SET_PROFILE_LEVEL \
-	_IOW(VEN_IOCTLBASE_ENC, 7, struct venc_ioctl_msg)
-
-#define VEN_IOCTL_GET_PROFILE_LEVEL \
-	_IOR(VEN_IOCTLBASE_ENC, 8, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - venc_switch, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_switch*/
-#define VEN_IOCTL_SET_SHORT_HDR \
-	_IOW(VEN_IOCTLBASE_ENC, 9, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_SHORT_HDR \
-	_IOR(VEN_IOCTLBASE_ENC, 10, struct venc_ioctl_msg)
-
-
-/*IOCTL params: SET: InputData - venc_sessionqp, OutputData - NULL
-  GET: InputData - NULL, OutputData - venc_sessionqp*/
-#define VEN_IOCTL_SET_SESSION_QP \
-	_IOW(VEN_IOCTLBASE_ENC, 11, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_SESSION_QP \
-	_IOR(VEN_IOCTLBASE_ENC, 12, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_intraperiod, OutputData - NULL
-  GET: InputData - NULL, OutputData - venc_intraperiod*/
-#define VEN_IOCTL_SET_INTRA_PERIOD \
-	_IOW(VEN_IOCTLBASE_ENC, 13, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_INTRA_PERIOD \
-	_IOR(VEN_IOCTLBASE_ENC, 14, struct venc_ioctl_msg)
-
-
-/* Request an Iframe*/
-#define VEN_IOCTL_CMD_REQUEST_IFRAME _IO(VEN_IOCTLBASE_ENC, 15)
-
-/*IOCTL params:GET: InputData - NULL, OutputData - venc_capability*/
-#define VEN_IOCTL_GET_CAPABILITY \
-	_IOR(VEN_IOCTLBASE_ENC, 16, struct venc_ioctl_msg)
-
-
-/*IOCTL params:GET: InputData - NULL, OutputData - venc_seqheader*/
-#define VEN_IOCTL_GET_SEQUENCE_HDR \
-	_IOR(VEN_IOCTLBASE_ENC, 17, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - venc_entropycfg, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_entropycfg*/
-#define VEN_IOCTL_SET_ENTROPY_CFG \
-	_IOW(VEN_IOCTLBASE_ENC, 18, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_ENTROPY_CFG \
-	_IOR(VEN_IOCTLBASE_ENC, 19, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - venc_dbcfg, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_dbcfg*/
-#define VEN_IOCTL_SET_DEBLOCKING_CFG \
-	_IOW(VEN_IOCTLBASE_ENC, 20, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_DEBLOCKING_CFG \
-	_IOR(VEN_IOCTLBASE_ENC, 21, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_intrarefresh, OutputData - NULL
-  GET: InputData - NULL, OutputData - venc_intrarefresh*/
-#define VEN_IOCTL_SET_INTRA_REFRESH \
-	_IOW(VEN_IOCTLBASE_ENC, 22, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_INTRA_REFRESH \
-	_IOR(VEN_IOCTLBASE_ENC, 23, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_multiclicecfg, OutputData - NULL
-  GET: InputData - NULL, OutputData - venc_multiclicecfg*/
-#define VEN_IOCTL_SET_MULTI_SLICE_CFG \
-	_IOW(VEN_IOCTLBASE_ENC, 24, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_MULTI_SLICE_CFG \
-	_IOR(VEN_IOCTLBASE_ENC, 25, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - venc_ratectrlcfg, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_ratectrlcfg*/
-#define VEN_IOCTL_SET_RATE_CTRL_CFG \
-	_IOW(VEN_IOCTLBASE_ENC, 26, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_RATE_CTRL_CFG \
-	_IOR(VEN_IOCTLBASE_ENC, 27, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_voptimingcfg, OutputData - NULL
-  GET: InputData - NULL, OutputData - venc_voptimingcfg*/
-#define VEN_IOCTL_SET_VOP_TIMING_CFG \
-	_IOW(VEN_IOCTLBASE_ENC, 28, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_VOP_TIMING_CFG \
-	_IOR(VEN_IOCTLBASE_ENC, 29, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_framerate, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_framerate*/
-#define VEN_IOCTL_SET_FRAME_RATE \
-	_IOW(VEN_IOCTLBASE_ENC, 30, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_FRAME_RATE \
-	_IOR(VEN_IOCTLBASE_ENC, 31, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_targetbitrate, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_targetbitrate*/
-#define VEN_IOCTL_SET_TARGET_BITRATE \
-	_IOW(VEN_IOCTLBASE_ENC, 32, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_TARGET_BITRATE \
-	_IOR(VEN_IOCTLBASE_ENC, 33, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_rotation, OutputData - NULL
-  GET: InputData - NULL, OutputData - venc_rotation*/
-#define VEN_IOCTL_SET_ROTATION \
-	_IOW(VEN_IOCTLBASE_ENC, 34, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_ROTATION \
-	_IOR(VEN_IOCTLBASE_ENC, 35, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_headerextension, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_headerextension*/
-#define VEN_IOCTL_SET_HEC \
-	_IOW(VEN_IOCTLBASE_ENC, 36, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_HEC \
-	_IOR(VEN_IOCTLBASE_ENC, 37, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - venc_switch, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_switch*/
-#define VEN_IOCTL_SET_DATA_PARTITION \
-	_IOW(VEN_IOCTLBASE_ENC, 38, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_DATA_PARTITION \
-	_IOR(VEN_IOCTLBASE_ENC, 39, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - venc_switch, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_switch*/
-#define VEN_IOCTL_SET_RVLC \
-	_IOW(VEN_IOCTLBASE_ENC, 40, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_RVLC \
-	_IOR(VEN_IOCTLBASE_ENC, 41, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_switch, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_switch*/
-#define VEN_IOCTL_SET_AC_PREDICTION \
-	_IOW(VEN_IOCTLBASE_ENC, 42, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_AC_PREDICTION \
-	_IOR(VEN_IOCTLBASE_ENC, 43, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - venc_qprange, OutputData - NULL
- GET: InputData - NULL, OutputData - venc_qprange*/
-#define VEN_IOCTL_SET_QP_RANGE \
-	_IOW(VEN_IOCTLBASE_ENC, 44, struct venc_ioctl_msg)
-#define VEN_IOCTL_GET_QP_RANGE \
-	_IOR(VEN_IOCTLBASE_ENC, 45, struct venc_ioctl_msg)
-
-#define VEN_IOCTL_GET_NUMBER_INSTANCES \
-	_IOR(VEN_IOCTLBASE_ENC, 46, struct venc_ioctl_msg)
-
-#define VEN_IOCTL_SET_METABUFFER_MODE \
-	_IOW(VEN_IOCTLBASE_ENC, 47, struct venc_ioctl_msg)
-
-
-/*IOCTL params:SET: InputData - unsigned int, OutputData - NULL.*/
-#define VEN_IOCTL_SET_EXTRADATA \
-	_IOW(VEN_IOCTLBASE_ENC, 48, struct venc_ioctl_msg)
-/*IOCTL params:GET: InputData - NULL, OutputData - unsigned int.*/
-#define VEN_IOCTL_GET_EXTRADATA \
-	_IOR(VEN_IOCTLBASE_ENC, 49, struct venc_ioctl_msg)
-
-/*IOCTL params:SET: InputData - NULL, OutputData - NULL.*/
-#define VEN_IOCTL_SET_SLICE_DELIVERY_MODE \
-	_IO(VEN_IOCTLBASE_ENC, 50)
-
-/*IOCTL params:SET: InputData - unsigned int, OutputData - NULL*/
-#define VEN_IOCTL_SET_SPS_PPS_FOR_IDR \
-	_IOW(VEN_IOCTLBASE_ENC, 51, struct venc_ioctl_msg)
-
-struct venc_switch{
-	unsigned char	status;
-};
-
-struct venc_allocatorproperty{
-	unsigned long	 mincount;
-	unsigned long	 maxcount;
-	unsigned long	 actualcount;
-	unsigned long	 datasize;
-	unsigned long	 suffixsize;
-	unsigned long	 alignment;
-	unsigned long	 bufpoolid;
-};
-
-struct venc_bufferpayload{
-	unsigned char *pbuffer;
-	size_t	sz;
-	int	fd;
-	unsigned int	offset;
-	unsigned int	maped_size;
-	unsigned long	filled_len;
-};
-
-struct venc_buffer{
- unsigned char *ptrbuffer;
- unsigned long	sz;
- unsigned long	len;
- unsigned long	offset;
- long long	timestamp;
- unsigned long	flags;
- void	*clientdata;
-};
-
-struct venc_basecfg{
-	unsigned long	input_width;
-	unsigned long	input_height;
-	unsigned long	dvs_width;
-	unsigned long	dvs_height;
-	unsigned long	codectype;
-	unsigned long	fps_num;
-	unsigned long	fps_den;
-	unsigned long	targetbitrate;
-	unsigned long	inputformat;
-};
-
-struct venc_profile{
-	unsigned long	profile;
-};
-struct ven_profilelevel{
-	unsigned long	level;
-};
-
-struct venc_sessionqp{
-	unsigned long	iframeqp;
-	unsigned long	pframqp;
-};
-
-struct venc_qprange{
-	unsigned long	maxqp;
-	unsigned long	minqp;
-};
-struct venc_intraperiod{
-	unsigned long	num_pframes;
-	unsigned long	num_bframes;
-};
-struct venc_seqheader{
-	unsigned char *hdrbufptr;
-	unsigned long	bufsize;
-	unsigned long	hdrlen;
-};
-
-struct venc_capability{
-	unsigned long	codec_types;
-	unsigned long	maxframe_width;
-	unsigned long	maxframe_height;
-	unsigned long	maxtarget_bitrate;
-	unsigned long	maxframe_rate;
-	unsigned long	input_formats;
-	unsigned char	dvs;
-};
-
-struct venc_entropycfg{
-	unsigned longentropysel;
-	unsigned long	cabacmodel;
-};
-
-struct venc_dbcfg{
-	unsigned long	db_mode;
-	unsigned long	slicealpha_offset;
-	unsigned long	slicebeta_offset;
-};
-
-struct venc_intrarefresh{
-	unsigned long	irmode;
-	unsigned long	mbcount;
-};
-
-struct venc_multiclicecfg{
-	unsigned long	mslice_mode;
-	unsigned long	mslice_size;
-};
-
-struct venc_bufferflush{
-	unsigned long	flush_mode;
-};
-
-struct venc_ratectrlcfg{
-	unsigned long	rcmode;
-};
-
-struct	venc_voptimingcfg{
-	unsigned long	voptime_resolution;
-};
-struct venc_framerate{
-	unsigned long	fps_denominator;
-	unsigned long	fps_numerator;
-};
-
-struct venc_targetbitrate{
-	unsigned long	target_bitrate;
-};
-
-
-struct venc_rotation{
-	unsigned long	rotation;
-};
-
-struct venc_timeout{
-	 unsigned long	millisec;
-};
-
-struct venc_headerextension{
-	 unsigned long	header_extension;
-};
-
-struct venc_msg{
-	unsigned long	statuscode;
-	unsigned long	msgcode;
-	struct venc_buffer	buf;
-	unsigned long	msgdata_size;
-};
-
-struct venc_recon_addr{
-	unsigned char *pbuffer;
-	unsigned long buffer_size;
-	unsigned long pmem_fd;
-	unsigned long offset;
-};
-
-struct venc_recon_buff_size{
-	int width;
-	int height;
-	int size;
-	int alignment;
-};
-
-#endif /* _MSM_VIDC_ENC_H_ */
diff --git a/original/media/msm_camera.h b/original/media/msm_camera.h
deleted file mode 100644
index d1d4eaa..0000000
--- a/original/media/msm_camera.h
+++ /dev/null
@@ -1,1979 +0,0 @@
-/* Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-#ifndef __LINUX_MSM_CAMERA_H
-#define __LINUX_MSM_CAMERA_H
-
-#ifdef MSM_CAMERA_BIONIC
-#include <sys/types.h>
-#endif
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#ifdef __KERNEL__
-#include <linux/cdev.h>
-#endif
-#ifdef MSM_CAMERA_GCC
-#include <time.h>
-#else
-#include <linux/time.h>
-#endif
-
-#include <linux/ion.h>
-
-#define BIT(nr)   (1UL << (nr))
-
-#define MSM_CAM_IOCTL_MAGIC 'm'
-
-#define MSM_CAM_IOCTL_GET_SENSOR_INFO \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 1, struct msm_camsensor_info *)
-
-#define MSM_CAM_IOCTL_REGISTER_PMEM \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 2, struct msm_pmem_info *)
-
-#define MSM_CAM_IOCTL_UNREGISTER_PMEM \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 3, unsigned)
-
-#define MSM_CAM_IOCTL_CTRL_COMMAND \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 4, struct msm_ctrl_cmd *)
-
-#define MSM_CAM_IOCTL_CONFIG_VFE  \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 5, struct msm_camera_vfe_cfg_cmd *)
-
-#define MSM_CAM_IOCTL_GET_STATS \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 6, struct msm_camera_stats_event_ctrl *)
-
-#define MSM_CAM_IOCTL_GETFRAME \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 7, struct msm_camera_get_frame *)
-
-#define MSM_CAM_IOCTL_ENABLE_VFE \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 8, struct camera_enable_cmd *)
-
-#define MSM_CAM_IOCTL_CTRL_CMD_DONE \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 9, struct camera_cmd *)
-
-#define MSM_CAM_IOCTL_CONFIG_CMD \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 10, struct camera_cmd *)
-
-#define MSM_CAM_IOCTL_DISABLE_VFE \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 11, struct camera_enable_cmd *)
-
-#define MSM_CAM_IOCTL_PAD_REG_RESET2 \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 12, struct camera_enable_cmd *)
-
-#define MSM_CAM_IOCTL_VFE_APPS_RESET \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 13, struct camera_enable_cmd *)
-
-#define MSM_CAM_IOCTL_RELEASE_FRAME_BUFFER \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 14, struct camera_enable_cmd *)
-
-#define MSM_CAM_IOCTL_RELEASE_STATS_BUFFER \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 15, struct msm_stats_buf *)
-
-#define MSM_CAM_IOCTL_AXI_CONFIG \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 16, struct msm_camera_vfe_cfg_cmd *)
-
-#define MSM_CAM_IOCTL_GET_PICTURE \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 17, struct msm_frame *)
-
-#define MSM_CAM_IOCTL_SET_CROP \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 18, struct crop_info *)
-
-#define MSM_CAM_IOCTL_PICT_PP \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 19, uint8_t *)
-
-#define MSM_CAM_IOCTL_PICT_PP_DONE \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 20, struct msm_snapshot_pp_status *)
-
-#define MSM_CAM_IOCTL_SENSOR_IO_CFG \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 21, struct sensor_cfg_data *)
-
-#define MSM_CAM_IOCTL_FLASH_LED_CFG \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 22, unsigned *)
-
-#define MSM_CAM_IOCTL_UNBLOCK_POLL_FRAME \
-	_IO(MSM_CAM_IOCTL_MAGIC, 23)
-
-#define MSM_CAM_IOCTL_CTRL_COMMAND_2 \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 24, struct msm_ctrl_cmd *)
-
-#define MSM_CAM_IOCTL_AF_CTRL \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 25, struct msm_ctrl_cmt_t *)
-
-#define MSM_CAM_IOCTL_AF_CTRL_DONE \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 26, struct msm_ctrl_cmt_t *)
-
-#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_CAM_IOCTL_STROBE_FLASH_CFG \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 29, uint32_t *)
-
-#define MSM_CAM_IOCTL_STROBE_FLASH_CHARGE \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 30, uint32_t *)
-
-#define MSM_CAM_IOCTL_STROBE_FLASH_RELEASE \
-	_IO(MSM_CAM_IOCTL_MAGIC, 31)
-
-#define MSM_CAM_IOCTL_FLASH_CTRL \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 32, struct flash_ctrl_data *)
-
-#define MSM_CAM_IOCTL_ERROR_CONFIG \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 33, uint32_t *)
-
-#define MSM_CAM_IOCTL_ABORT_CAPTURE \
-	_IO(MSM_CAM_IOCTL_MAGIC, 34)
-
-#define MSM_CAM_IOCTL_SET_FD_ROI \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 35, struct fd_roi_info *)
-
-#define MSM_CAM_IOCTL_GET_CAMERA_INFO \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 36, struct msm_camera_info *)
-
-#define MSM_CAM_IOCTL_UNBLOCK_POLL_PIC_FRAME \
-	_IO(MSM_CAM_IOCTL_MAGIC, 37)
-
-#define MSM_CAM_IOCTL_RELEASE_PIC_BUFFER \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 38, struct camera_enable_cmd *)
-
-#define MSM_CAM_IOCTL_PUT_ST_FRAME \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 39, struct msm_camera_st_frame *)
-
-#define MSM_CAM_IOCTL_V4L2_EVT_NOTIFY \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 40, struct v4l2_event *)
-
-#define MSM_CAM_IOCTL_SET_MEM_MAP_INFO \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 41, struct msm_mem_map_info *)
-
-#define MSM_CAM_IOCTL_ACTUATOR_IO_CFG \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 42, struct msm_actuator_cfg_data *)
-
-#define MSM_CAM_IOCTL_MCTL_POST_PROC \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 43, struct msm_mctl_post_proc_cmd *)
-
-#define MSM_CAM_IOCTL_RESERVE_FREE_FRAME \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 44, struct msm_cam_evt_divert_frame *)
-
-#define MSM_CAM_IOCTL_RELEASE_FREE_FRAME \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 45, struct msm_cam_evt_divert_frame *)
-
-#define MSM_CAM_IOCTL_PICT_PP_DIVERT_DONE \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 46, struct msm_pp_frame *)
-
-#define MSM_CAM_IOCTL_SENSOR_V4l2_S_CTRL \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 47, struct v4l2_control)
-
-#define MSM_CAM_IOCTL_SENSOR_V4l2_QUERY_CTRL \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 48, struct v4l2_queryctrl)
-
-#define MSM_CAM_IOCTL_GET_KERNEL_SYSTEM_TIME \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 49, struct timeval *)
-
-#define MSM_CAM_IOCTL_SET_VFE_OUTPUT_TYPE \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 50, uint32_t *)
-
-#define MSM_CAM_IOCTL_MCTL_DIVERT_DONE \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 51, struct msm_cam_evt_divert_frame *)
-
-#define MSM_CAM_IOCTL_GET_ACTUATOR_INFO \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 52, struct msm_actuator_cfg_data *)
-
-#define MSM_CAM_IOCTL_EEPROM_IO_CFG \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 53, struct msm_eeprom_cfg_data *)
-
-#define MSM_CAM_IOCTL_ISPIF_IO_CFG \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 54, struct ispif_cfg_data *)
-
-#define MSM_CAM_IOCTL_STATS_REQBUF \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 55, struct msm_stats_reqbuf *)
-
-#define MSM_CAM_IOCTL_STATS_ENQUEUEBUF \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 56, struct msm_stats_buf_info *)
-
-#define MSM_CAM_IOCTL_STATS_FLUSH_BUFQ \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 57, struct msm_stats_flush_bufq *)
-
-#define MSM_CAM_IOCTL_SET_MCTL_SDEV \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 58, struct msm_mctl_set_sdev_data *)
-
-#define MSM_CAM_IOCTL_UNSET_MCTL_SDEV \
-	_IOW(MSM_CAM_IOCTL_MAGIC, 59, struct msm_mctl_set_sdev_data *)
-
-#define MSM_CAM_IOCTL_GET_INST_HANDLE \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 60, uint32_t *)
-
-#define MSM_CAM_IOCTL_STATS_UNREG_BUF \
-	_IOR(MSM_CAM_IOCTL_MAGIC, 61, struct msm_stats_flush_bufq *)
-
-
-struct msm_stats_reqbuf {
-	int num_buf;		/* how many buffers requested */
-	int stats_type;	/* stats type */
-};
-
-struct msm_stats_flush_bufq {
-	int stats_type;	/* enum msm_stats_enum_type */
-};
-
-struct msm_mctl_pp_cmd {
-	int32_t  id;
-	uint16_t length;
-	void     *value;
-};
-
-struct msm_mctl_post_proc_cmd {
-	int32_t type;
-	struct msm_mctl_pp_cmd cmd;
-};
-
-#define MSM_CAMERA_LED_OFF  0
-#define MSM_CAMERA_LED_LOW  1
-#define MSM_CAMERA_LED_HIGH 2
-#define MSM_CAMERA_LED_INIT 3
-#define MSM_CAMERA_LED_RELEASE 4
-
-#define MSM_CAMERA_STROBE_FLASH_NONE 0
-#define MSM_CAMERA_STROBE_FLASH_XENON 1
-
-#define MSM_MAX_CAMERA_SENSORS  5
-#define MAX_SENSOR_NAME 32
-#define MAX_CAM_NAME_SIZE 32
-#define MAX_ACT_MOD_NAME_SIZE 32
-#define MAX_ACT_NAME_SIZE 32
-#define NUM_ACTUATOR_DIR 2
-#define MAX_ACTUATOR_SCENARIO 8
-#define MAX_ACTUATOR_REGION 5
-#define MAX_ACTUATOR_INIT_SET 12
-#define MAX_ACTUATOR_TYPE_SIZE 32
-#define MAX_ACTUATOR_REG_TBL_SIZE 8
-
-
-#define MSM_MAX_CAMERA_CONFIGS 2
-
-#define PP_SNAP  0x01
-#define PP_RAW_SNAP ((0x01)<<1)
-#define PP_PREV  ((0x01)<<2)
-#define PP_THUMB ((0x01)<<3)
-#define PP_MASK		(PP_SNAP|PP_RAW_SNAP|PP_PREV|PP_THUMB)
-
-#define MSM_CAM_CTRL_CMD_DONE  0
-#define MSM_CAM_SENSOR_VFE_CMD 1
-
-/* Should be same as VIDEO_MAX_PLANES in videodev2.h */
-#define MAX_PLANES 8
-
-/*****************************************************
- *  structure
- *****************************************************/
-
-/* define five type of structures for userspace <==> kernel
- * space communication:
- * command 1 - 2 are from userspace ==> kernel
- * command 3 - 4 are from kernel ==> userspace
- *
- * 1. control command: control command(from control thread),
- *                     control status (from config thread);
- */
-struct msm_ctrl_cmd {
-	uint16_t type;
-	uint16_t length;
-	void *value;
-	uint16_t status;
-	uint32_t timeout_ms;
-	int resp_fd; /* FIXME: to be used by the kernel, pass-through for now */
-	int vnode_id;  /* video dev id. Can we overload resp_fd? */
-	int queue_idx;
-	uint32_t evt_id;
-	uint32_t stream_type; /* used to pass value to qcamera server */
-	int config_ident; /*used as identifier for config node*/
-};
-
-struct msm_cam_evt_msg {
-	unsigned short type;	/* 1 == event (RPC), 0 == message (adsp) */
-	unsigned short msg_id;
-	unsigned int len;	/* size in, number of bytes out */
-	uint32_t frame_id;
-	void *data;
-	struct timespec timestamp;
-};
-
-struct msm_pp_frame_sp {
-	/* phy addr of the buffer */
-	unsigned long  phy_addr;
-	uint32_t       y_off;
-	uint32_t       cbcr_off;
-	/* buffer length */
-	uint32_t       length;
-	int32_t        fd;
-	uint32_t       addr_offset;
-	/* mapped addr */
-	unsigned long  vaddr;
-};
-
-struct msm_pp_frame_mp {
-	/* phy addr of the plane */
-	unsigned long  phy_addr;
-	/* offset of plane data */
-	uint32_t       data_offset;
-	/* plane length */
-	uint32_t       length;
-	int32_t        fd;
-	uint32_t       addr_offset;
-	/* mapped addr */
-	unsigned long  vaddr;
-};
-
-struct msm_pp_frame {
-	uint32_t       handle; /* stores vb cookie */
-	uint32_t       frame_id;
-	unsigned short buf_idx;
-	int            path;
-	unsigned short image_type;
-	unsigned short num_planes; /* 1 for sp */
-	struct timeval timestamp;
-	union {
-		struct msm_pp_frame_sp sp;
-		struct msm_pp_frame_mp mp[MAX_PLANES];
-	};
-	int node_type;
-	uint32_t inst_handle;
-};
-
-struct msm_cam_evt_divert_frame {
-	unsigned short image_mode;
-	unsigned short op_mode;
-	unsigned short inst_idx;
-	unsigned short node_idx;
-	struct msm_pp_frame frame;
-	int            do_pp;
-};
-
-struct msm_mctl_pp_cmd_ack_event {
-	uint32_t cmd;        /* VPE_CMD_ZOOM? */
-	int      status;     /* 0 done, < 0 err */
-	uint32_t cookie;     /* daemon's cookie */
-};
-
-struct msm_mctl_pp_event_info {
-	int32_t  event;
-	union {
-		struct msm_mctl_pp_cmd_ack_event ack;
-	};
-};
-
-struct msm_isp_event_ctrl {
-	unsigned short resptype;
-	union {
-		struct msm_cam_evt_msg isp_msg;
-		struct msm_ctrl_cmd ctrl;
-		struct msm_cam_evt_divert_frame div_frame;
-		struct msm_mctl_pp_event_info pp_event_info;
-	} isp_data;
-};
-
-#define MSM_CAM_RESP_CTRL              0
-#define MSM_CAM_RESP_STAT_EVT_MSG      1
-#define MSM_CAM_RESP_STEREO_OP_1       2
-#define MSM_CAM_RESP_STEREO_OP_2       3
-#define MSM_CAM_RESP_V4L2              4
-#define MSM_CAM_RESP_DIV_FRAME_EVT_MSG 5
-#define MSM_CAM_RESP_DONE_EVENT        6
-#define MSM_CAM_RESP_MCTL_PP_EVENT     7
-#define MSM_CAM_RESP_MAX               8
-
-#define MSM_CAM_APP_NOTIFY_EVENT  0
-#define MSM_CAM_APP_NOTIFY_ERROR_EVENT  1
-
-/* this one is used to send ctrl/status up to config thread */
-
-struct msm_stats_event_ctrl {
-	/* 0 - ctrl_cmd from control thread,
-	 * 1 - stats/event kernel,
-	 * 2 - V4L control or read request */
-	int resptype;
-	int timeout_ms;
-	struct msm_ctrl_cmd ctrl_cmd;
-	/* struct  vfe_event_t  stats_event; */
-	struct msm_cam_evt_msg stats_event;
-};
-
-/* 2. config command: config command(from config thread); */
-struct msm_camera_cfg_cmd {
-	/* what to config:
-	 * 1 - sensor config, 2 - vfe config */
-	uint16_t cfg_type;
-
-	/* sensor config type */
-	uint16_t cmd_type;
-	uint16_t queue;
-	uint16_t length;
-	void *value;
-};
-
-#define CMD_GENERAL			0
-#define CMD_AXI_CFG_OUT1		1
-#define CMD_AXI_CFG_SNAP_O1_AND_O2	2
-#define CMD_AXI_CFG_OUT2		3
-#define CMD_PICT_T_AXI_CFG		4
-#define CMD_PICT_M_AXI_CFG		5
-#define CMD_RAW_PICT_AXI_CFG		6
-
-#define CMD_FRAME_BUF_RELEASE		7
-#define CMD_PREV_BUF_CFG		8
-#define CMD_SNAP_BUF_RELEASE		9
-#define CMD_SNAP_BUF_CFG		10
-#define CMD_STATS_DISABLE		11
-#define CMD_STATS_AEC_AWB_ENABLE	12
-#define CMD_STATS_AF_ENABLE		13
-#define CMD_STATS_AEC_ENABLE		14
-#define CMD_STATS_AWB_ENABLE		15
-#define CMD_STATS_ENABLE  		16
-
-#define CMD_STATS_AXI_CFG		17
-#define CMD_STATS_AEC_AXI_CFG		18
-#define CMD_STATS_AF_AXI_CFG 		19
-#define CMD_STATS_AWB_AXI_CFG		20
-#define CMD_STATS_RS_AXI_CFG		21
-#define CMD_STATS_CS_AXI_CFG		22
-#define CMD_STATS_IHIST_AXI_CFG		23
-#define CMD_STATS_SKIN_AXI_CFG		24
-
-#define CMD_STATS_BUF_RELEASE		25
-#define CMD_STATS_AEC_BUF_RELEASE	26
-#define CMD_STATS_AF_BUF_RELEASE	27
-#define CMD_STATS_AWB_BUF_RELEASE	28
-#define CMD_STATS_RS_BUF_RELEASE	29
-#define CMD_STATS_CS_BUF_RELEASE	30
-#define CMD_STATS_IHIST_BUF_RELEASE	31
-#define CMD_STATS_SKIN_BUF_RELEASE	32
-
-#define UPDATE_STATS_INVALID		33
-#define CMD_AXI_CFG_SNAP_GEMINI		34
-#define CMD_AXI_CFG_SNAP		35
-#define CMD_AXI_CFG_PREVIEW		36
-#define CMD_AXI_CFG_VIDEO		37
-
-#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
-#define CMD_AXI_CFG_ZSL 43
-#define CMD_AXI_CFG_SNAP_VPE 44
-#define CMD_AXI_CFG_SNAP_THUMB_VPE 45
-
-#define CMD_CONFIG_PING_ADDR 46
-#define CMD_CONFIG_PONG_ADDR 47
-#define CMD_CONFIG_FREE_BUF_ADDR 48
-#define CMD_AXI_CFG_ZSL_ALL_CHNLS 49
-#define CMD_AXI_CFG_VIDEO_ALL_CHNLS 50
-#define CMD_VFE_BUFFER_RELEASE 51
-#define CMD_VFE_PROCESS_IRQ 52
-#define CMD_STATS_BG_ENABLE 53
-#define CMD_STATS_BF_ENABLE 54
-#define CMD_STATS_BHIST_ENABLE 55
-#define CMD_STATS_BG_BUF_RELEASE 56
-#define CMD_STATS_BF_BUF_RELEASE 57
-#define CMD_STATS_BHIST_BUF_RELEASE 58
-#define CMD_VFE_SOF_COUNT_UPDATE 59
-#define CMD_VFE_COUNT_SOF_ENABLE 60
-
-#define CMD_AXI_CFG_PRIM               BIT(8)
-#define CMD_AXI_CFG_PRIM_ALL_CHNLS     BIT(9)
-#define CMD_AXI_CFG_SEC                BIT(10)
-#define CMD_AXI_CFG_SEC_ALL_CHNLS      BIT(11)
-#define CMD_AXI_CFG_TERT1              BIT(12)
-#define CMD_AXI_CFG_TERT2              BIT(13)
-
-#define CMD_AXI_START  0xE1
-#define CMD_AXI_STOP   0xE2
-#define CMD_AXI_RESET  0xE3
-
-
-#define AXI_CMD_PREVIEW      BIT(0)
-#define AXI_CMD_CAPTURE      BIT(1)
-#define AXI_CMD_RECORD       BIT(2)
-#define AXI_CMD_ZSL          BIT(3)
-#define AXI_CMD_RAW_CAPTURE  BIT(4)
-#define AXI_CMD_LIVESHOT     BIT(5)
-
-/* vfe config command: config command(from config thread)*/
-struct msm_vfe_cfg_cmd {
-	int cmd_type;
-	uint16_t length;
-	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];
-};
-
-#define MSM_PMEM_OUTPUT1		0
-#define MSM_PMEM_OUTPUT2		1
-#define MSM_PMEM_OUTPUT1_OUTPUT2	2
-#define MSM_PMEM_THUMBNAIL		3
-#define MSM_PMEM_MAINIMG		4
-#define MSM_PMEM_RAW_MAINIMG		5
-#define MSM_PMEM_AEC_AWB		6
-#define MSM_PMEM_AF			7
-#define MSM_PMEM_AEC			8
-#define MSM_PMEM_AWB			9
-#define MSM_PMEM_RS			10
-#define MSM_PMEM_CS			11
-#define MSM_PMEM_IHIST			12
-#define MSM_PMEM_SKIN			13
-#define MSM_PMEM_VIDEO			14
-#define MSM_PMEM_PREVIEW		15
-#define MSM_PMEM_VIDEO_VPE		16
-#define MSM_PMEM_C2D			17
-#define MSM_PMEM_MAINIMG_VPE    18
-#define MSM_PMEM_THUMBNAIL_VPE  19
-#define MSM_PMEM_BAYER_GRID		20
-#define MSM_PMEM_BAYER_FOCUS	21
-#define MSM_PMEM_BAYER_HIST		22
-#define MSM_PMEM_MAX            23
-
-#define STAT_AEAW			0
-#define STAT_AEC			1
-#define STAT_AF				2
-#define STAT_AWB			3
-#define STAT_RS				4
-#define STAT_CS				5
-#define STAT_IHIST			6
-#define STAT_SKIN			7
-#define STAT_BG				8
-#define STAT_BF				9
-#define STAT_BHIST			10
-#define STAT_MAX			11
-
-#define FRAME_PREVIEW_OUTPUT1		0
-#define FRAME_PREVIEW_OUTPUT2		1
-#define FRAME_SNAPSHOT			2
-#define FRAME_THUMBNAIL			3
-#define FRAME_RAW_SNAPSHOT		4
-#define FRAME_MAX			5
-
-enum msm_stats_enum_type {
-	MSM_STATS_TYPE_AEC, /* legacy based AEC */
-	MSM_STATS_TYPE_AF,  /* legacy based AF */
-	MSM_STATS_TYPE_AWB, /* legacy based AWB */
-	MSM_STATS_TYPE_RS,  /* legacy based RS */
-	MSM_STATS_TYPE_CS,  /* legacy based CS */
-	MSM_STATS_TYPE_IHIST,   /* legacy based HIST */
-	MSM_STATS_TYPE_SKIN,    /* legacy based SKIN */
-	MSM_STATS_TYPE_BG,  /* Bayer Grids */
-	MSM_STATS_TYPE_BF,  /* Bayer Focus */
-	MSM_STATS_TYPE_BHIST,   /* Bayer Hist */
-	MSM_STATS_TYPE_AE_AW,   /* legacy stats for vfe 2.x*/
-	MSM_STATS_TYPE_MAX  /* MAX */
-};
-
-struct msm_stats_buf_info {
-	int type; /* msm_stats_enum_type */
-	int fd;
-	void *vaddr;
-	uint32_t offset;
-	uint32_t len;
-	uint32_t y_off;
-	uint32_t cbcr_off;
-	uint32_t planar0_off;
-	uint32_t planar1_off;
-	uint32_t planar2_off;
-	uint8_t active;
-	int buf_idx;
-};
-
-struct msm_pmem_info {
-	int type;
-	int fd;
-	void *vaddr;
-	uint32_t offset;
-	uint32_t len;
-	uint32_t y_off;
-	uint32_t cbcr_off;
-	uint32_t planar0_off;
-	uint32_t planar1_off;
-	uint32_t planar2_off;
-	uint8_t active;
-};
-
-struct outputCfg {
-	uint32_t height;
-	uint32_t width;
-
-	uint32_t window_height_firstline;
-	uint32_t window_height_lastline;
-};
-
-#define VIDEO_NODE 0
-#define MCTL_NODE 1
-
-#define OUTPUT_1	0
-#define OUTPUT_2	1
-#define OUTPUT_1_AND_2            2   /* snapshot only */
-#define OUTPUT_1_AND_3            3   /* video */
-#define CAMIF_TO_AXI_VIA_OUTPUT_2 4
-#define OUTPUT_1_AND_CAMIF_TO_AXI_VIA_OUTPUT_2 5
-#define OUTPUT_2_AND_CAMIF_TO_AXI_VIA_OUTPUT_1 6
-#define OUTPUT_1_2_AND_3 7
-#define OUTPUT_ALL_CHNLS 8
-#define OUTPUT_VIDEO_ALL_CHNLS 9
-#define OUTPUT_ZSL_ALL_CHNLS 10
-#define LAST_AXI_OUTPUT_MODE_ENUM = OUTPUT_ZSL_ALL_CHNLS
-
-#define OUTPUT_PRIM              BIT(8)
-#define OUTPUT_PRIM_ALL_CHNLS    BIT(9)
-#define OUTPUT_SEC               BIT(10)
-#define OUTPUT_SEC_ALL_CHNLS     BIT(11)
-#define OUTPUT_TERT1             BIT(12)
-#define OUTPUT_TERT2             BIT(13)
-
-
-
-#define MSM_FRAME_PREV_1	0
-#define MSM_FRAME_PREV_2	1
-#define MSM_FRAME_ENC		2
-
-#define OUTPUT_TYPE_P    BIT(0)
-#define OUTPUT_TYPE_T    BIT(1)
-#define OUTPUT_TYPE_S    BIT(2)
-#define OUTPUT_TYPE_V    BIT(3)
-#define OUTPUT_TYPE_L    BIT(4)
-#define OUTPUT_TYPE_ST_L BIT(5)
-#define OUTPUT_TYPE_ST_R BIT(6)
-#define OUTPUT_TYPE_ST_D BIT(7)
-#define OUTPUT_TYPE_R    BIT(8)
-#define OUTPUT_TYPE_R1   BIT(9)
-
-
-
-struct fd_roi_info {
-	void *info;
-	int info_len;
-};
-
-struct msm_mem_map_info {
-	uint32_t cookie;
-	uint32_t length;
-	uint32_t mem_type;
-};
-
-#define MSM_MEM_MMAP		0
-#define MSM_MEM_USERPTR		1
-#define MSM_PLANE_MAX		8
-#define MSM_PLANE_Y			0
-#define MSM_PLANE_UV		1
-
-struct msm_frame {
-	struct timespec ts;
-	int path;
-	int type;
-	unsigned long buffer;
-	uint32_t phy_offset;
-	uint32_t y_off;
-	uint32_t cbcr_off;
-	uint32_t planar0_off;
-	uint32_t planar1_off;
-	uint32_t planar2_off;
-	int fd;
-
-	void *cropinfo;
-	int croplen;
-	uint32_t error_code;
-	struct fd_roi_info roi_info;
-	uint32_t frame_id;
-	int stcam_quality_ind;
-	uint32_t stcam_conv_value;
-
-	struct ion_allocation_data ion_alloc;
-	struct ion_fd_data fd_data;
-	int ion_dev_fd;
-};
-
-enum msm_st_frame_packing {
-	SIDE_BY_SIDE_HALF,
-	SIDE_BY_SIDE_FULL,
-	TOP_DOWN_HALF,
-	TOP_DOWN_FULL,
-};
-
-struct msm_st_crop {
-	uint32_t in_w;
-	uint32_t in_h;
-	uint32_t out_w;
-	uint32_t out_h;
-};
-
-struct msm_st_half {
-	uint32_t buf_p0_off;
-	uint32_t buf_p1_off;
-	uint32_t buf_p0_stride;
-	uint32_t buf_p1_stride;
-	uint32_t pix_x_off;
-	uint32_t pix_y_off;
-	struct msm_st_crop stCropInfo;
-};
-
-struct msm_st_frame {
-	struct msm_frame buf_info;
-	int type;
-	enum msm_st_frame_packing packing;
-	struct msm_st_half L;
-	struct msm_st_half R;
-	int frame_id;
-};
-
-#define MSM_CAMERA_ERR_MASK (0xFFFFFFFF & 1)
-
-struct stats_buff {
-	unsigned long buff;
-	int fd;
-};
-
-struct msm_stats_buf {
-	uint8_t awb_ymin;
-	struct stats_buff aec;
-	struct stats_buff awb;
-	struct stats_buff af;
-	struct stats_buff ihist;
-	struct stats_buff rs;
-	struct stats_buff cs;
-	struct stats_buff skin;
-	int type;
-	uint32_t status_bits;
-	unsigned long buffer;
-	int fd;
-	int length;
-	struct ion_handle *handle;
-	uint32_t frame_id;
-	int buf_idx;
-};
-#define MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT 0
-/* video capture mode in VIDIOC_S_PARM */
-#define MSM_V4L2_EXT_CAPTURE_MODE_PREVIEW \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+1)
-/* extendedmode for video recording in VIDIOC_S_PARM */
-#define MSM_V4L2_EXT_CAPTURE_MODE_VIDEO \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+2)
-/* extendedmode for the full size main image in VIDIOC_S_PARM */
-#define MSM_V4L2_EXT_CAPTURE_MODE_MAIN (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+3)
-/* extendedmode for the thumb nail image in VIDIOC_S_PARM */
-#define MSM_V4L2_EXT_CAPTURE_MODE_THUMBNAIL \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+4)
-#define MSM_V4L2_EXT_CAPTURE_MODE_RAW \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+5)
-#define MSM_V4L2_EXT_CAPTURE_MODE_RDI \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+6)
-#define MSM_V4L2_EXT_CAPTURE_MODE_RDI1 \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+7)
-#define MSM_V4L2_EXT_CAPTURE_MODE_RDI2 \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+8)
-#define MSM_V4L2_EXT_CAPTURE_MODE_AEC \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+9)
-#define MSM_V4L2_EXT_CAPTURE_MODE_AWB \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+10)
-#define MSM_V4L2_EXT_CAPTURE_MODE_AF \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+11)
-#define MSM_V4L2_EXT_CAPTURE_MODE_IHIST \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+12)
-#define MSM_V4L2_EXT_CAPTURE_MODE_CS \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+13)
-#define MSM_V4L2_EXT_CAPTURE_MODE_RS \
-	(MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+14)
-#define MSM_V4L2_EXT_CAPTURE_MODE_MAX (MSM_V4L2_EXT_CAPTURE_MODE_DEFAULT+15)
-
-#define MSM_V4L2_PID_MOTION_ISO              V4L2_CID_PRIVATE_BASE
-#define MSM_V4L2_PID_EFFECT                 (V4L2_CID_PRIVATE_BASE+1)
-#define MSM_V4L2_PID_HJR                    (V4L2_CID_PRIVATE_BASE+2)
-#define MSM_V4L2_PID_LED_MODE               (V4L2_CID_PRIVATE_BASE+3)
-#define MSM_V4L2_PID_PREP_SNAPSHOT          (V4L2_CID_PRIVATE_BASE+4)
-#define MSM_V4L2_PID_EXP_METERING           (V4L2_CID_PRIVATE_BASE+5)
-#define MSM_V4L2_PID_ISO                    (V4L2_CID_PRIVATE_BASE+6)
-#define MSM_V4L2_PID_CAM_MODE               (V4L2_CID_PRIVATE_BASE+7)
-#define MSM_V4L2_PID_LUMA_ADAPTATION	    (V4L2_CID_PRIVATE_BASE+8)
-#define MSM_V4L2_PID_BEST_SHOT              (V4L2_CID_PRIVATE_BASE+9)
-#define MSM_V4L2_PID_FOCUS_MODE	            (V4L2_CID_PRIVATE_BASE+10)
-#define MSM_V4L2_PID_BL_DETECTION           (V4L2_CID_PRIVATE_BASE+11)
-#define MSM_V4L2_PID_SNOW_DETECTION         (V4L2_CID_PRIVATE_BASE+12)
-#define MSM_V4L2_PID_CTRL_CMD               (V4L2_CID_PRIVATE_BASE+13)
-#define MSM_V4L2_PID_EVT_SUB_INFO           (V4L2_CID_PRIVATE_BASE+14)
-#define MSM_V4L2_PID_STROBE_FLASH           (V4L2_CID_PRIVATE_BASE+15)
-#define MSM_V4L2_PID_INST_HANDLE            (V4L2_CID_PRIVATE_BASE+16)
-#define MSM_V4L2_PID_MMAP_INST              (V4L2_CID_PRIVATE_BASE+17)
-#define MSM_V4L2_PID_PP_PLANE_INFO          (V4L2_CID_PRIVATE_BASE+18)
-#define MSM_V4L2_PID_MAX                    MSM_V4L2_PID_PP_PLANE_INFO
-
-/* camera operation mode for video recording - two frame output queues */
-#define MSM_V4L2_CAM_OP_DEFAULT         0
-/* camera operation mode for video recording - two frame output queues */
-#define MSM_V4L2_CAM_OP_PREVIEW         (MSM_V4L2_CAM_OP_DEFAULT+1)
-/* camera operation mode for video recording - two frame output queues */
-#define MSM_V4L2_CAM_OP_VIDEO           (MSM_V4L2_CAM_OP_DEFAULT+2)
-/* camera operation mode for standard shapshot - two frame output queues */
-#define MSM_V4L2_CAM_OP_CAPTURE         (MSM_V4L2_CAM_OP_DEFAULT+3)
-/* camera operation mode for zsl shapshot - three output queues */
-#define MSM_V4L2_CAM_OP_ZSL             (MSM_V4L2_CAM_OP_DEFAULT+4)
-/* camera operation mode for raw snapshot - one frame output queue */
-#define MSM_V4L2_CAM_OP_RAW             (MSM_V4L2_CAM_OP_DEFAULT+5)
-/* camera operation mode for jpeg snapshot - one frame output queue */
-#define MSM_V4L2_CAM_OP_JPEG_CAPTURE    (MSM_V4L2_CAM_OP_DEFAULT+6)
-
-
-#define MSM_V4L2_VID_CAP_TYPE	0
-#define MSM_V4L2_STREAM_ON		1
-#define MSM_V4L2_STREAM_OFF		2
-#define MSM_V4L2_SNAPSHOT		3
-#define MSM_V4L2_QUERY_CTRL		4
-#define MSM_V4L2_GET_CTRL		5
-#define MSM_V4L2_SET_CTRL		6
-#define MSM_V4L2_QUERY			7
-#define MSM_V4L2_GET_CROP		8
-#define MSM_V4L2_SET_CROP		9
-#define MSM_V4L2_OPEN			10
-#define MSM_V4L2_CLOSE			11
-#define MSM_V4L2_SET_CTRL_CMD	12
-#define MSM_V4L2_EVT_SUB_MASK	13
-#define MSM_V4L2_MAX			14
-#define V4L2_CAMERA_EXIT		43
-
-struct crop_info {
-	void *info;
-	int len;
-};
-
-struct msm_postproc {
-	int ftnum;
-	struct msm_frame fthumnail;
-	int fmnum;
-	struct msm_frame fmain;
-};
-
-struct msm_snapshot_pp_status {
-	void *status;
-};
-
-#define CFG_SET_MODE			0
-#define CFG_SET_EFFECT			1
-#define CFG_START			2
-#define CFG_PWR_UP			3
-#define CFG_PWR_DOWN			4
-#define CFG_WRITE_EXPOSURE_GAIN		5
-#define CFG_SET_DEFAULT_FOCUS		6
-#define CFG_MOVE_FOCUS			7
-#define CFG_REGISTER_TO_REAL_GAIN	8
-#define CFG_REAL_TO_REGISTER_GAIN	9
-#define CFG_SET_FPS			10
-#define CFG_SET_PICT_FPS		11
-#define CFG_SET_BRIGHTNESS		12
-#define CFG_SET_CONTRAST		13
-#define CFG_SET_ZOOM			14
-#define CFG_SET_EXPOSURE_MODE		15
-#define CFG_SET_WB			16
-#define CFG_SET_ANTIBANDING		17
-#define CFG_SET_EXP_GAIN		18
-#define CFG_SET_PICT_EXP_GAIN		19
-#define CFG_SET_LENS_SHADING		20
-#define CFG_GET_PICT_FPS		21
-#define CFG_GET_PREV_L_PF		22
-#define CFG_GET_PREV_P_PL		23
-#define CFG_GET_PICT_L_PF		24
-#define CFG_GET_PICT_P_PL		25
-#define CFG_GET_AF_MAX_STEPS		26
-#define CFG_GET_PICT_MAX_EXP_LC		27
-#define CFG_SEND_WB_INFO    28
-#define CFG_SENSOR_INIT    29
-#define CFG_GET_3D_CALI_DATA 30
-#define CFG_GET_CALIB_DATA		31
-#define CFG_GET_OUTPUT_INFO		32
-#define CFG_GET_EEPROM_INFO		33
-#define CFG_GET_EEPROM_DATA		34
-#define CFG_SET_ACTUATOR_INFO		35
-#define CFG_GET_ACTUATOR_INFO           36
-/* TBD: QRD */
-#define CFG_SET_SATURATION            37
-#define CFG_SET_SHARPNESS             38
-#define CFG_SET_TOUCHAEC              39
-#define CFG_SET_AUTO_FOCUS            40
-#define CFG_SET_AUTOFLASH             41
-#define CFG_SET_EXPOSURE_COMPENSATION 42
-#define CFG_SET_ISO                   43
-#define CFG_START_STREAM              44
-#define CFG_STOP_STREAM               45
-#define CFG_GET_CSI_PARAMS            46
-#define CFG_MAX			47
-
-
-#define MOVE_NEAR	0
-#define MOVE_FAR	1
-
-#define SENSOR_PREVIEW_MODE		0
-#define SENSOR_SNAPSHOT_MODE		1
-#define SENSOR_RAW_SNAPSHOT_MODE	2
-#define SENSOR_HFR_60FPS_MODE 3
-#define SENSOR_HFR_90FPS_MODE 4
-#define SENSOR_HFR_120FPS_MODE 5
-
-#define SENSOR_QTR_SIZE			0
-#define SENSOR_FULL_SIZE		1
-#define SENSOR_QVGA_SIZE		2
-#define SENSOR_INVALID_SIZE		3
-
-#define CAMERA_EFFECT_OFF		0
-#define CAMERA_EFFECT_MONO		1
-#define CAMERA_EFFECT_NEGATIVE		2
-#define CAMERA_EFFECT_SOLARIZE		3
-#define CAMERA_EFFECT_SEPIA		4
-#define CAMERA_EFFECT_POSTERIZE		5
-#define CAMERA_EFFECT_WHITEBOARD	6
-#define CAMERA_EFFECT_BLACKBOARD	7
-#define CAMERA_EFFECT_AQUA		8
-#define CAMERA_EFFECT_EMBOSS		9
-#define CAMERA_EFFECT_SKETCH		10
-#define CAMERA_EFFECT_NEON		11
-#define CAMERA_EFFECT_MAX		12
-
-/* QRD */
-#define CAMERA_EFFECT_BW		10
-#define CAMERA_EFFECT_BLUISH	12
-#define CAMERA_EFFECT_REDDISH	13
-#define CAMERA_EFFECT_GREENISH	14
-
-/* QRD */
-#define CAMERA_ANTIBANDING_OFF		0
-#define CAMERA_ANTIBANDING_50HZ		2
-#define CAMERA_ANTIBANDING_60HZ		1
-#define CAMERA_ANTIBANDING_AUTO		3
-
-#define CAMERA_CONTRAST_LV0			0
-#define CAMERA_CONTRAST_LV1			1
-#define CAMERA_CONTRAST_LV2			2
-#define CAMERA_CONTRAST_LV3			3
-#define CAMERA_CONTRAST_LV4			4
-#define CAMERA_CONTRAST_LV5			5
-#define CAMERA_CONTRAST_LV6			6
-#define CAMERA_CONTRAST_LV7			7
-#define CAMERA_CONTRAST_LV8			8
-#define CAMERA_CONTRAST_LV9			9
-
-#define CAMERA_BRIGHTNESS_LV0			0
-#define CAMERA_BRIGHTNESS_LV1			1
-#define CAMERA_BRIGHTNESS_LV2			2
-#define CAMERA_BRIGHTNESS_LV3			3
-#define CAMERA_BRIGHTNESS_LV4			4
-#define CAMERA_BRIGHTNESS_LV5			5
-#define CAMERA_BRIGHTNESS_LV6			6
-#define CAMERA_BRIGHTNESS_LV7			7
-#define CAMERA_BRIGHTNESS_LV8			8
-
-
-#define CAMERA_SATURATION_LV0			0
-#define CAMERA_SATURATION_LV1			1
-#define CAMERA_SATURATION_LV2			2
-#define CAMERA_SATURATION_LV3			3
-#define CAMERA_SATURATION_LV4			4
-#define CAMERA_SATURATION_LV5			5
-#define CAMERA_SATURATION_LV6			6
-#define CAMERA_SATURATION_LV7			7
-#define CAMERA_SATURATION_LV8			8
-
-#define CAMERA_SHARPNESS_LV0		0
-#define CAMERA_SHARPNESS_LV1		3
-#define CAMERA_SHARPNESS_LV2		6
-#define CAMERA_SHARPNESS_LV3		9
-#define CAMERA_SHARPNESS_LV4		12
-#define CAMERA_SHARPNESS_LV5		15
-#define CAMERA_SHARPNESS_LV6		18
-#define CAMERA_SHARPNESS_LV7		21
-#define CAMERA_SHARPNESS_LV8		24
-#define CAMERA_SHARPNESS_LV9		27
-#define CAMERA_SHARPNESS_LV10		30
-
-#define CAMERA_SETAE_AVERAGE		0
-#define CAMERA_SETAE_CENWEIGHT	1
-
-#define  CAMERA_WB_AUTO               1 /* This list must match aeecamera.h */
-#define  CAMERA_WB_CUSTOM             2
-#define  CAMERA_WB_INCANDESCENT       3
-#define  CAMERA_WB_FLUORESCENT        4
-#define  CAMERA_WB_DAYLIGHT           5
-#define  CAMERA_WB_CLOUDY_DAYLIGHT    6
-#define  CAMERA_WB_TWILIGHT           7
-#define  CAMERA_WB_SHADE              8
-
-#define CAMERA_EXPOSURE_COMPENSATION_LV0			12
-#define CAMERA_EXPOSURE_COMPENSATION_LV1			6
-#define CAMERA_EXPOSURE_COMPENSATION_LV2			0
-#define CAMERA_EXPOSURE_COMPENSATION_LV3			-6
-#define CAMERA_EXPOSURE_COMPENSATION_LV4			-12
-
-enum msm_v4l2_saturation_level {
-	MSM_V4L2_SATURATION_L0,
-	MSM_V4L2_SATURATION_L1,
-	MSM_V4L2_SATURATION_L2,
-	MSM_V4L2_SATURATION_L3,
-	MSM_V4L2_SATURATION_L4,
-	MSM_V4L2_SATURATION_L5,
-	MSM_V4L2_SATURATION_L6,
-	MSM_V4L2_SATURATION_L7,
-	MSM_V4L2_SATURATION_L8,
-	MSM_V4L2_SATURATION_L9,
-	MSM_V4L2_SATURATION_L10,
-};
-
-enum msm_v4l2_contrast_level {
-	MSM_V4L2_CONTRAST_L0,
-	MSM_V4L2_CONTRAST_L1,
-	MSM_V4L2_CONTRAST_L2,
-	MSM_V4L2_CONTRAST_L3,
-	MSM_V4L2_CONTRAST_L4,
-	MSM_V4L2_CONTRAST_L5,
-	MSM_V4L2_CONTRAST_L6,
-	MSM_V4L2_CONTRAST_L7,
-	MSM_V4L2_CONTRAST_L8,
-	MSM_V4L2_CONTRAST_L9,
-	MSM_V4L2_CONTRAST_L10,
-};
-
-
-enum msm_v4l2_exposure_level {
-	MSM_V4L2_EXPOSURE_N2,
-	MSM_V4L2_EXPOSURE_N1,
-	MSM_V4L2_EXPOSURE_D,
-	MSM_V4L2_EXPOSURE_P1,
-	MSM_V4L2_EXPOSURE_P2,
-};
-
-enum msm_v4l2_sharpness_level {
-	MSM_V4L2_SHARPNESS_L0,
-	MSM_V4L2_SHARPNESS_L1,
-	MSM_V4L2_SHARPNESS_L2,
-	MSM_V4L2_SHARPNESS_L3,
-	MSM_V4L2_SHARPNESS_L4,
-	MSM_V4L2_SHARPNESS_L5,
-	MSM_V4L2_SHARPNESS_L6,
-};
-
-enum msm_v4l2_expo_metering_mode {
-	MSM_V4L2_EXP_FRAME_AVERAGE,
-	MSM_V4L2_EXP_CENTER_WEIGHTED,
-	MSM_V4L2_EXP_SPOT_METERING,
-};
-
-enum msm_v4l2_iso_mode {
-	MSM_V4L2_ISO_AUTO = 0,
-	MSM_V4L2_ISO_DEBLUR,
-	MSM_V4L2_ISO_100,
-	MSM_V4L2_ISO_200,
-	MSM_V4L2_ISO_400,
-	MSM_V4L2_ISO_800,
-	MSM_V4L2_ISO_1600,
-};
-
-enum msm_v4l2_wb_mode {
-	MSM_V4L2_WB_OFF,
-	MSM_V4L2_WB_AUTO ,
-	MSM_V4L2_WB_CUSTOM,
-	MSM_V4L2_WB_INCANDESCENT,
-	MSM_V4L2_WB_FLUORESCENT,
-	MSM_V4L2_WB_DAYLIGHT,
-	MSM_V4L2_WB_CLOUDY_DAYLIGHT,
-};
-
-enum msm_v4l2_special_effect {
-	MSM_V4L2_EFFECT_OFF,
-	MSM_V4L2_EFFECT_MONO,
-	MSM_V4L2_EFFECT_NEGATIVE,
-	MSM_V4L2_EFFECT_SOLARIZE,
-	MSM_V4L2_EFFECT_SEPIA,
-	MSM_V4L2_EFFECT_POSTERAIZE,
-	MSM_V4L2_EFFECT_WHITEBOARD,
-	MSM_V4L2_EFFECT_BLACKBOARD,
-	MSM_V4L2_EFFECT_AQUA,
-	MSM_V4L2_EFFECT_EMBOSS,
-	MSM_V4L2_EFFECT_SKETCH,
-	MSM_V4L2_EFFECT_NEON,
-	MSM_V4L2_EFFECT_MAX,
-};
-
-enum msm_v4l2_power_line_frequency {
-	MSM_V4L2_POWER_LINE_OFF,
-	MSM_V4L2_POWER_LINE_60HZ,
-	MSM_V4L2_POWER_LINE_50HZ,
-	MSM_V4L2_POWER_LINE_AUTO,
-};
-
-#define CAMERA_ISO_TYPE_AUTO           0
-#define CAMEAR_ISO_TYPE_HJR            1
-#define CAMEAR_ISO_TYPE_100            2
-#define CAMERA_ISO_TYPE_200            3
-#define CAMERA_ISO_TYPE_400            4
-#define CAMEAR_ISO_TYPE_800            5
-#define CAMERA_ISO_TYPE_1600           6
-
-struct sensor_pict_fps {
-	uint16_t prevfps;
-	uint16_t pictfps;
-};
-
-struct exp_gain_cfg {
-	uint16_t gain;
-	uint32_t line;
-};
-
-struct focus_cfg {
-	int32_t steps;
-	int dir;
-};
-
-struct fps_cfg {
-	uint16_t f_mult;
-	uint16_t fps_div;
-	uint32_t pict_fps_div;
-};
-struct wb_info_cfg {
-	uint16_t red_gain;
-	uint16_t green_gain;
-	uint16_t blue_gain;
-};
-struct sensor_3d_exp_cfg {
-	uint16_t gain;
-	uint32_t line;
-	uint16_t r_gain;
-	uint16_t b_gain;
-	uint16_t gr_gain;
-	uint16_t gb_gain;
-	uint16_t gain_adjust;
-};
-struct sensor_3d_cali_data_t{
-	unsigned char left_p_matrix[3][4][8];
-	unsigned char right_p_matrix[3][4][8];
-	unsigned char square_len[8];
-	unsigned char focal_len[8];
-	unsigned char pixel_pitch[8];
-	uint16_t left_r;
-	uint16_t left_b;
-	uint16_t left_gb;
-	uint16_t left_af_far;
-	uint16_t left_af_mid;
-	uint16_t left_af_short;
-	uint16_t left_af_5um;
-	uint16_t left_af_50up;
-	uint16_t left_af_50down;
-	uint16_t right_r;
-	uint16_t right_b;
-	uint16_t right_gb;
-	uint16_t right_af_far;
-	uint16_t right_af_mid;
-	uint16_t right_af_short;
-	uint16_t right_af_5um;
-	uint16_t right_af_50up;
-	uint16_t right_af_50down;
-};
-struct sensor_init_cfg {
-	uint8_t prev_res;
-	uint8_t pict_res;
-};
-
-#define ROLLOFF_CALDATA_SIZE    (17 * 13)
-typedef struct
-{
-    unsigned short          mesh_rolloff_table_size;     // TableSize
-    uint8_t                 r_gain[ROLLOFF_CALDATA_SIZE];   // RGain
-    uint8_t                 gr_gain[ROLLOFF_CALDATA_SIZE];  // GRGain
-    uint8_t                 gb_gain[ROLLOFF_CALDATA_SIZE];  // GBGain
-    uint8_t                 b_gain[ROLLOFF_CALDATA_SIZE];   // BGain
-    uint8_t                 red_ref[17];
-} rolloff_caldata_array_type;
-
-struct sensor_calib_data {
-	/* Color Related Measurements */
-	uint16_t r_over_g;
-	uint16_t b_over_g;
-	uint16_t gr_over_gb;
-
-	/* Lens Related Measurements */
-	uint16_t macro_2_inf;
-	uint16_t inf_2_macro;
-	uint16_t stroke_amt;
-	uint16_t af_pos_1m;
-	uint16_t af_pos_inf;
-	/* Lens Shading Calibration Data */
-	rolloff_caldata_array_type rolloff;
-};
-
-enum msm_sensor_resolution_t {
-	MSM_SENSOR_RES_FULL,
-	MSM_SENSOR_RES_QTR,
-	MSM_SENSOR_RES_2,
-	MSM_SENSOR_RES_3,
-	MSM_SENSOR_RES_4,
-	MSM_SENSOR_RES_5,
-	MSM_SENSOR_RES_6,
-	MSM_SENSOR_RES_7,
-	MSM_SENSOR_INVALID_RES,
-};
-
-struct msm_sensor_output_info_t {
-	uint16_t x_output;
-	uint16_t y_output;
-	uint16_t line_length_pclk;
-	uint16_t frame_length_lines;
-	uint32_t vt_pixel_clk;
-	uint32_t op_pixel_clk;
-	uint16_t binning_factor;
-};
-
-struct sensor_output_info_t {
-	struct msm_sensor_output_info_t *output_info;
-	uint16_t num_info;
-};
-
-struct mirror_flip {
-	int32_t x_mirror;
-	int32_t y_flip;
-};
-
-struct cord {
-	uint32_t x;
-	uint32_t y;
-};
-
-struct msm_eeprom_data_t {
-	void *eeprom_data;
-	uint16_t index;
-};
-
-struct msm_camera_csid_vc_cfg {
-	uint8_t cid;
-	uint8_t dt;
-	uint8_t decode_format;
-};
-
-struct csi_lane_params_t {
-	uint8_t csi_lane_assign;
-	uint8_t csi_lane_mask;
-	uint8_t csi_if;
-	uint8_t csid_core;
-	uint32_t csid_version;
-};
-
-#define CSI_EMBED_DATA 0x12
-#define CSI_RESERVED_DATA_0 0x13
-#define CSI_YUV422_8  0x1E
-#define CSI_RAW8    0x2A
-#define CSI_RAW10   0x2B
-#define CSI_RAW12   0x2C
-
-#define CSI_DECODE_6BIT 0
-#define CSI_DECODE_8BIT 1
-#define CSI_DECODE_10BIT 2
-#define CSI_DECODE_DPCM_10_8_10 5
-
-#define ISPIF_STREAM(intf, action, vfe) (((intf)<<ISPIF_S_STREAM_SHIFT)+\
-	(action)+((vfe)<<ISPIF_VFE_INTF_SHIFT))
-#define ISPIF_ON_FRAME_BOUNDARY   (0x01 << 0)
-#define ISPIF_OFF_FRAME_BOUNDARY  (0x01 << 1)
-#define ISPIF_OFF_IMMEDIATELY     (0x01 << 2)
-#define ISPIF_S_STREAM_SHIFT      4
-#define ISPIF_VFE_INTF_SHIFT      12
-
-#define PIX_0 (0x01 << 0)
-#define RDI_0 (0x01 << 1)
-#define PIX_1 (0x01 << 2)
-#define RDI_1 (0x01 << 3)
-#define RDI_2 (0x01 << 4)
-
-enum msm_ispif_vfe_intf {
-	VFE0,
-	VFE1,
-	VFE_MAX,
-};
-
-enum msm_ispif_intftype {
-	PIX0,
-	RDI0,
-	PIX1,
-	RDI1,
-	RDI2,
-	INTF_MAX,
-};
-
-enum msm_ispif_vc {
-	VC0,
-	VC1,
-	VC2,
-	VC3,
-};
-
-enum msm_ispif_cid {
-	CID0,
-	CID1,
-	CID2,
-	CID3,
-	CID4,
-	CID5,
-	CID6,
-	CID7,
-	CID8,
-	CID9,
-	CID10,
-	CID11,
-	CID12,
-	CID13,
-	CID14,
-	CID15,
-};
-
-struct msm_ispif_params {
-	uint8_t intftype;
-	uint16_t cid_mask;
-	uint8_t csid;
-	uint8_t vfe_intf;
-};
-
-struct msm_ispif_params_list {
-	uint32_t len;
-	struct msm_ispif_params params[4];
-};
-
-enum ispif_cfg_type_t {
-	ISPIF_INIT,
-	ISPIF_SET_CFG,
-	ISPIF_SET_ON_FRAME_BOUNDARY,
-	ISPIF_SET_OFF_FRAME_BOUNDARY,
-	ISPIF_SET_OFF_IMMEDIATELY,
-	ISPIF_RELEASE,
-};
-
-struct ispif_cfg_data {
-	enum ispif_cfg_type_t cfgtype;
-	union {
-		uint32_t csid_version;
-		int cmd;
-		struct msm_ispif_params_list ispif_params;
-	} cfg;
-};
-
-struct sensor_cfg_data {
-	int cfgtype;
-	int mode;
-	int rs;
-	uint8_t max_steps;
-
-	union {
-		int8_t effect;
-		uint8_t lens_shading;
-		uint16_t prevl_pf;
-		uint16_t prevp_pl;
-		uint16_t pictl_pf;
-		uint16_t pictp_pl;
-		uint32_t pict_max_exp_lc;
-		uint16_t p_fps;
-		uint8_t iso_type;
-		struct sensor_init_cfg init_info;
-		struct sensor_pict_fps gfps;
-		struct exp_gain_cfg exp_gain;
-		struct focus_cfg focus;
-		struct fps_cfg fps;
-		struct wb_info_cfg wb_info;
-		struct sensor_3d_exp_cfg sensor_3d_exp;
-		struct sensor_calib_data calib_info;
-		struct sensor_output_info_t output_info;
-		struct msm_eeprom_data_t eeprom_data;
-		struct csi_lane_params_t csi_lane_params;
-		/* QRD */
-		uint16_t antibanding;
-		uint8_t contrast;
-		uint8_t saturation;
-		uint8_t sharpness;
-		int8_t brightness;
-		int ae_mode;
-		uint8_t wb_val;
-		int8_t exp_compensation;
-		struct cord aec_cord;
-		int is_autoflash;
-		struct mirror_flip mirror_flip;
-	} cfg;
-};
-
-struct damping_params_t {
-	uint32_t damping_step;
-	uint32_t damping_delay;
-	uint32_t hw_params;
-};
-
-enum actuator_type {
-	ACTUATOR_VCM,
-	ACTUATOR_PIEZO,
-};
-
-enum msm_actuator_data_type {
-	MSM_ACTUATOR_BYTE_DATA = 1,
-	MSM_ACTUATOR_WORD_DATA,
-};
-
-enum msm_actuator_addr_type {
-	MSM_ACTUATOR_BYTE_ADDR = 1,
-	MSM_ACTUATOR_WORD_ADDR,
-};
-
-enum msm_actuator_write_type {
-	MSM_ACTUATOR_WRITE_HW_DAMP,
-	MSM_ACTUATOR_WRITE_DAC,
-};
-
-struct msm_actuator_reg_params_t {
-	enum msm_actuator_write_type reg_write_type;
-	uint32_t hw_mask;
-	uint16_t reg_addr;
-	uint16_t hw_shift;
-	uint16_t data_shift;
-};
-
-struct reg_settings_t {
-	uint16_t reg_addr;
-	uint16_t reg_data;
-};
-
-struct region_params_t {
-	/* [0] = ForwardDirection Macro boundary
-	   [1] = ReverseDirection Inf boundary
-	 */
-	uint16_t step_bound[2];
-	uint16_t code_per_step;
-};
-
-struct msm_actuator_move_params_t {
-	int8_t dir;
-	int8_t sign_dir;
-	int16_t dest_step_pos;
-	int32_t num_steps;
-	struct damping_params_t *ringing_params;
-};
-
-struct msm_actuator_tuning_params_t {
-	int16_t initial_code;
-	uint16_t pwd_step;
-	uint16_t region_size;
-	uint32_t total_steps;
-	struct region_params_t *region_params;
-};
-
-struct msm_actuator_params_t {
-	enum actuator_type act_type;
-	uint8_t reg_tbl_size;
-	uint16_t data_size;
-	uint16_t init_setting_size;
-	uint32_t i2c_addr;
-	enum msm_actuator_addr_type i2c_addr_type;
-	enum msm_actuator_data_type i2c_data_type;
-	struct msm_actuator_reg_params_t *reg_tbl_params;
-	struct reg_settings_t *init_settings;
-};
-
-struct msm_actuator_set_info_t {
-	struct msm_actuator_params_t actuator_params;
-	struct msm_actuator_tuning_params_t af_tuning_params;
-};
-
-struct msm_actuator_get_info_t {
-	uint32_t focal_length_num;
-	uint32_t focal_length_den;
-	uint32_t f_number_num;
-	uint32_t f_number_den;
-	uint32_t f_pix_num;
-	uint32_t f_pix_den;
-	uint32_t total_f_dist_num;
-	uint32_t total_f_dist_den;
-	uint32_t hor_view_angle_num;
-	uint32_t hor_view_angle_den;
-	uint32_t ver_view_angle_num;
-	uint32_t ver_view_angle_den;
-};
-
-enum af_camera_name {
-	ACTUATOR_MAIN_CAM_0,
-	ACTUATOR_MAIN_CAM_1,
-	ACTUATOR_MAIN_CAM_2,
-	ACTUATOR_MAIN_CAM_3,
-	ACTUATOR_MAIN_CAM_4,
-	ACTUATOR_MAIN_CAM_5,
-	ACTUATOR_WEB_CAM_0,
-	ACTUATOR_WEB_CAM_1,
-	ACTUATOR_WEB_CAM_2,
-};
-
-struct msm_actuator_cfg_data {
-	int cfgtype;
-	uint8_t is_af_supported;
-	union {
-		struct msm_actuator_move_params_t move;
-		struct msm_actuator_set_info_t set_info;
-		struct msm_actuator_get_info_t get_info;
-		enum af_camera_name cam_name;
-	} cfg;
-};
-
-struct msm_eeprom_support {
-	uint16_t is_supported;
-	uint16_t size;
-	uint16_t index;
-	uint16_t qvalue;
-};
-
-struct msm_calib_wb {
-	uint16_t r_over_g;
-	uint16_t b_over_g;
-	uint16_t gr_over_gb;
-};
-
-struct msm_calib_af {
-	uint16_t macro_dac;
-	uint16_t inf_dac;
-	uint16_t start_dac;
-};
-
-struct msm_calib_lsc {
-	uint16_t r_gain[221];
-	uint16_t b_gain[221];
-	uint16_t gr_gain[221];
-	uint16_t gb_gain[221];
-};
-
-struct pixel_t {
-	int x;
-	int y;
-};
-
-struct msm_calib_dpc {
-	uint16_t validcount;
-	struct pixel_t snapshot_coord[128];
-	struct pixel_t preview_coord[128];
-	struct pixel_t video_coord[128];
-};
-
-struct msm_camera_eeprom_info_t {
-	struct msm_eeprom_support af;
-	struct msm_eeprom_support wb;
-	struct msm_eeprom_support lsc;
-	struct msm_eeprom_support dpc;
-};
-
-struct msm_eeprom_cfg_data {
-	int cfgtype;
-	uint8_t is_eeprom_supported;
-	union {
-		struct msm_eeprom_data_t get_data;
-		struct msm_camera_eeprom_info_t get_info;
-	} cfg;
-};
-
-struct sensor_large_data {
-	int cfgtype;
-	union {
-		struct sensor_3d_cali_data_t sensor_3d_cali_data;
-	} data;
-};
-
-enum sensor_type_t {
-	BAYER,
-	YUV,
-	JPEG_SOC,
-};
-
-enum flash_type {
-	LED_FLASH,
-	STROBE_FLASH,
-};
-
-enum strobe_flash_ctrl_type {
-	STROBE_FLASH_CTRL_INIT,
-	STROBE_FLASH_CTRL_CHARGE,
-	STROBE_FLASH_CTRL_RELEASE
-};
-
-struct strobe_flash_ctrl_data {
-	enum strobe_flash_ctrl_type type;
-	int charge_en;
-};
-
-struct msm_camera_info {
-	int num_cameras;
-	uint8_t has_3d_support[MSM_MAX_CAMERA_SENSORS];
-	uint8_t is_internal_cam[MSM_MAX_CAMERA_SENSORS];
-	uint32_t s_mount_angle[MSM_MAX_CAMERA_SENSORS];
-	const char *video_dev_name[MSM_MAX_CAMERA_SENSORS];
-	enum sensor_type_t sensor_type[MSM_MAX_CAMERA_SENSORS];
-};
-
-struct msm_cam_config_dev_info {
-	int num_config_nodes;
-	const char *config_dev_name[MSM_MAX_CAMERA_CONFIGS];
-	int config_dev_id[MSM_MAX_CAMERA_CONFIGS];
-};
-
-struct msm_mctl_node_info {
-	int num_mctl_nodes;
-	const char *mctl_node_name[MSM_MAX_CAMERA_SENSORS];
-};
-
-struct flash_ctrl_data {
-	int flashtype;
-	union {
-		int led_state;
-		struct strobe_flash_ctrl_data strobe_ctrl;
-	} ctrl_data;
-};
-
-#define GET_NAME			0
-#define GET_PREVIEW_LINE_PER_FRAME	1
-#define GET_PREVIEW_PIXELS_PER_LINE	2
-#define GET_SNAPSHOT_LINE_PER_FRAME	3
-#define GET_SNAPSHOT_PIXELS_PER_LINE	4
-#define GET_SNAPSHOT_FPS		5
-#define GET_SNAPSHOT_MAX_EP_LINE_CNT	6
-
-struct msm_camsensor_info {
-	char name[MAX_SENSOR_NAME];
-	uint8_t flash_enabled;
-	uint8_t strobe_flash_enabled;
-	uint8_t actuator_enabled;
-	uint8_t ispif_supported;
-	int8_t total_steps;
-	uint8_t support_3d;
-	enum flash_type flashtype;
-	enum sensor_type_t sensor_type;
-	uint32_t pxlcode; /* enum v4l2_mbus_pixelcode */
-	uint32_t camera_type; /* msm_camera_type */
-	int mount_angle;
-	uint32_t max_width;
-	uint32_t max_height;
-};
-
-#define V4L2_SINGLE_PLANE	0
-#define V4L2_MULTI_PLANE_Y	0
-#define V4L2_MULTI_PLANE_CBCR	1
-#define V4L2_MULTI_PLANE_CB	1
-#define V4L2_MULTI_PLANE_CR	2
-
-struct plane_data {
-	int plane_id;
-	uint32_t offset;
-	unsigned long size;
-};
-
-struct img_plane_info {
-	uint32_t width;
-	uint32_t height;
-	uint32_t pixelformat;
-	uint8_t buffer_type; /*Single/Multi planar*/
-	uint8_t output_port;
-	uint32_t ext_mode;
-	uint8_t num_planes;
-	struct plane_data plane[MAX_PLANES];
-	uint32_t sp_y_offset;
-	uint32_t inst_handle;
-};
-
-#define QCAMERA_NAME "qcamera"
-#define QCAMERA_SERVER_NAME "qcamera_server"
-#define QCAMERA_DEVICE_GROUP_ID 1
-#define QCAMERA_VNODE_GROUP_ID 2
-
-enum msm_cam_subdev_type {
-	CSIPHY_DEV,
-	CSID_DEV,
-	CSIC_DEV,
-	ISPIF_DEV,
-	VFE_DEV,
-	AXI_DEV,
-	VPE_DEV,
-	SENSOR_DEV,
-	ACTUATOR_DEV,
-	EEPROM_DEV,
-	GESTURE_DEV,
-	IRQ_ROUTER_DEV,
-	CPP_DEV,
-	CCI_DEV,
-};
-
-struct msm_mctl_set_sdev_data {
-	uint32_t revision;
-	enum msm_cam_subdev_type sdev_type;
-};
-
-#define MSM_CAM_V4L2_IOCTL_GET_CAMERA_INFO \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t)
-
-#define MSM_CAM_V4L2_IOCTL_GET_CONFIG_INFO \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t)
-
-#define MSM_CAM_V4L2_IOCTL_GET_MCTL_INFO \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl_t)
-
-#define MSM_CAM_V4L2_IOCTL_CTRL_CMD_DONE \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl_t)
-
-#define MSM_CAM_V4L2_IOCTL_GET_EVENT_PAYLOAD \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl_t)
-
-#define MSM_CAM_IOCTL_SEND_EVENT \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct v4l2_event)
-
-#define MSM_CAM_V4L2_IOCTL_CFG_VPE \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_vpe_cfg_cmd)
-
-#define MSM_CAM_V4L2_IOCTL_PRIVATE_S_CTRL \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t)
-
-#define MSM_CAM_V4L2_IOCTL_PRIVATE_G_CTRL \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl_t)
-
-#define VIDIOC_MSM_VPE_INIT \
-	_IO('V', BASE_VIDIOC_PRIVATE + 15)
-
-#define VIDIOC_MSM_VPE_RELEASE \
-	_IO('V', BASE_VIDIOC_PRIVATE + 16)
-
-#define VIDIOC_MSM_VPE_CFG \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_mctl_pp_params *)
-
-#define VIDIOC_MSM_AXI_INIT \
-	_IO('V', BASE_VIDIOC_PRIVATE + 18)
-
-#define VIDIOC_MSM_AXI_RELEASE \
-	_IO('V', BASE_VIDIOC_PRIVATE + 19)
-
-#define VIDIOC_MSM_AXI_CFG \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 20, void *)
-
-#define VIDIOC_MSM_AXI_IRQ \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 21, void *)
-
-#define VIDIOC_MSM_AXI_BUF_CFG \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 22, void *)
-
-#define VIDIOC_MSM_VFE_INIT \
-	_IO('V', BASE_VIDIOC_PRIVATE + 22)
-
-#define VIDIOC_MSM_VFE_RELEASE \
-	_IO('V', BASE_VIDIOC_PRIVATE + 23)
-
-struct msm_camera_v4l2_ioctl_t {
-	uint32_t id;
-	void __user *ioctl_ptr;
-	uint32_t len;
-};
-
-struct msm_camera_vfe_params_t {
-	uint32_t operation_mode;
-	uint32_t capture_count;
-	uint32_t skip_abort;
-	uint16_t port_info;
-	uint32_t inst_handle;
-	uint16_t cmd_type;
-};
-
-enum msm_camss_irq_idx {
-	CAMERA_SS_IRQ_0,
-	CAMERA_SS_IRQ_1,
-	CAMERA_SS_IRQ_2,
-	CAMERA_SS_IRQ_3,
-	CAMERA_SS_IRQ_4,
-	CAMERA_SS_IRQ_5,
-	CAMERA_SS_IRQ_6,
-	CAMERA_SS_IRQ_7,
-	CAMERA_SS_IRQ_8,
-	CAMERA_SS_IRQ_9,
-	CAMERA_SS_IRQ_10,
-	CAMERA_SS_IRQ_11,
-	CAMERA_SS_IRQ_12,
-	CAMERA_SS_IRQ_MAX
-};
-
-enum msm_cam_hw_idx {
-	MSM_CAM_HW_MICRO,
-	MSM_CAM_HW_CCI,
-	MSM_CAM_HW_CSI0,
-	MSM_CAM_HW_CSI1,
-	MSM_CAM_HW_CSI2,
-	MSM_CAM_HW_CSI3,
-	MSM_CAM_HW_ISPIF,
-	MSM_CAM_HW_CPP,
-	MSM_CAM_HW_VFE0,
-	MSM_CAM_HW_VFE1,
-	MSM_CAM_HW_JPEG0,
-	MSM_CAM_HW_JPEG1,
-	MSM_CAM_HW_JPEG2,
-	MSM_CAM_HW_MAX
-};
-
-struct msm_camera_irq_cfg {
-	/* Bit mask of all the camera hardwares that needs to
-	 * be composited into a single IRQ to the MSM.
-	 * Current usage: (may be updated based on hw changes)
-	 * Bits 31:13 - Reserved.
-	 * Bits 12:0
-	 * 12 - MSM_CAM_HW_JPEG2
-	 * 11 - MSM_CAM_HW_JPEG1
-	 * 10 - MSM_CAM_HW_JPEG0
-	 *  9 - MSM_CAM_HW_VFE1
-	 *  8 - MSM_CAM_HW_VFE0
-	 *  7 - MSM_CAM_HW_CPP
-	 *  6 - MSM_CAM_HW_ISPIF
-	 *  5 - MSM_CAM_HW_CSI3
-	 *  4 - MSM_CAM_HW_CSI2
-	 *  3 - MSM_CAM_HW_CSI1
-	 *  2 - MSM_CAM_HW_CSI0
-	 *  1 - MSM_CAM_HW_CCI
-	 *  0 - MSM_CAM_HW_MICRO
-	 */
-	uint32_t cam_hw_mask;
-	uint8_t  irq_idx;
-	uint8_t  num_hwcore;
-};
-
-#define MSM_IRQROUTER_CFG_COMPIRQ \
-	_IOWR('V', BASE_VIDIOC_PRIVATE, void __user *)
-
-#define MAX_NUM_CPP_STRIPS 8
-
-enum msm_cpp_frame_type {
-	MSM_CPP_OFFLINE_FRAME,
-	MSM_CPP_REALTIME_FRAME,
-};
-
-struct msm_cpp_frame_strip_info {
-	int scale_v_en;
-	int scale_h_en;
-
-	int upscale_v_en;
-	int upscale_h_en;
-
-	int src_start_x;
-	int src_end_x;
-	int src_start_y;
-	int src_end_y;
-
-	/* Padding is required for upscaler because it does not
-	 * pad internally like other blocks, also needed for rotation
-	 * rotation expects all the blocks in the stripe to be the same size
-	 * Padding is done such that all the extra padded pixels
-	 * are on the right and bottom
-	*/
-	int pad_bottom;
-	int pad_top;
-	int pad_right;
-	int pad_left;
-
-	int v_init_phase;
-	int h_init_phase;
-	int h_phase_step;
-	int v_phase_step;
-
-	int prescale_crop_width_first_pixel;
-	int prescale_crop_width_last_pixel;
-	int prescale_crop_height_first_line;
-	int prescale_crop_height_last_line;
-
-	int postscale_crop_height_first_line;
-	int postscale_crop_height_last_line;
-	int postscale_crop_width_first_pixel;
-	int postscale_crop_width_last_pixel;
-
-	int dst_start_x;
-	int dst_end_x;
-	int dst_start_y;
-	int dst_end_y;
-
-	int bytes_per_pixel;
-	unsigned int source_address;
-	unsigned int destination_address;
-	unsigned int src_stride;
-	unsigned int dst_stride;
-	int rotate_270;
-	int horizontal_flip;
-	int vertical_flip;
-	int scale_output_width;
-	int scale_output_height;
-};
-
-struct msm_cpp_frame_info_t {
-	int32_t frame_id;
-	uint32_t inst_id;
-	uint32_t client_id;
-	enum msm_cpp_frame_type frame_type;
-	uint32_t num_strips;
-	struct msm_cpp_frame_strip_info *strip_info;
-};
-
-struct msm_ver_num_info {
-	uint32_t main;
-	uint32_t minor;
-	uint32_t rev;
-};
-
-#define VIDIOC_MSM_CPP_CFG \
-	_IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t)
-
-#define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t)
-
-#define VIDIOC_MSM_CPP_GET_INST_INFO \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t)
-
-#define V4L2_EVENT_CPP_FRAME_DONE  (V4L2_EVENT_PRIVATE_START + 0)
-
-/* Instance Handle - inst_handle
- * Data bundle containing the information about where
- * to get a buffer for a particular camera instance.
- * This is a bitmask containing the following data:
- * Buffer Handle Bitmask:
- *      ------------------------------------
- *      Bits    :  Purpose
- *      ------------------------------------
- *      31 - 24 :  Reserved.
- *      23      :  is Image mode valid?
- *      22 - 16 :  Image mode.
- *      15      :  is MCTL PP inst idx valid?
- *      14 - 8  :  MCTL PP inst idx.
- *      7       :  is Video inst idx valid?
- *      6 - 0   :  Video inst idx.
- */
-#define CLR_IMG_MODE(handle)	(handle &= 0xFF00FFFF)
-#define SET_IMG_MODE(handle, data)	\
-	(handle |= ((0x1 << 23) | ((data & 0x7F) << 16)))
-#define GET_IMG_MODE(handle)	\
-	((handle & 0x800000) ? ((handle & 0x7F0000) >> 16) : 0xFF)
-
-#define CLR_MCTLPP_INST_IDX(handle)	(handle &= 0xFFFF00FF)
-#define SET_MCTLPP_INST_IDX(handle, data)	\
-	(handle |= ((0x1 << 15) | ((data & 0x7F) << 8)))
-#define GET_MCTLPP_INST_IDX(handle)	\
-	((handle & 0x8000) ? ((handle & 0x7F00) >> 8) : 0xFF)
-
-#define CLR_VIDEO_INST_IDX(handle)	(handle &= 0xFFFFFF00)
-#define GET_VIDEO_INST_IDX(handle)	\
-	((handle & 0x80) ? (handle & 0x7F) : 0xFF)
-#define SET_VIDEO_INST_IDX(handle, data)	\
-	(handle |= (0x1 << 7) | (data & 0x7F))
-
-#endif /* __LINUX_MSM_CAMERA_H */
diff --git a/original/media/msm_gemini.h b/original/media/msm_gemini.h
deleted file mode 100644
index 0167335..0000000
--- a/original/media/msm_gemini.h
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifndef __LINUX_MSM_GEMINI_H
-#define __LINUX_MSM_GEMINI_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-#define MSM_GMN_IOCTL_MAGIC 'g'
-
-#define MSM_GMN_IOCTL_GET_HW_VERSION \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 1, struct msm_gemini_hw_cmd *)
-
-#define MSM_GMN_IOCTL_RESET \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 2, struct msm_gemini_ctrl_cmd *)
-
-#define MSM_GMN_IOCTL_STOP \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 3, struct msm_gemini_hw_cmds *)
-
-#define MSM_GMN_IOCTL_START \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 4, struct msm_gemini_hw_cmds *)
-
-#define MSM_GMN_IOCTL_INPUT_BUF_ENQUEUE \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 5, struct msm_gemini_buf *)
-
-#define MSM_GMN_IOCTL_INPUT_GET \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 6, struct msm_gemini_buf *)
-
-#define MSM_GMN_IOCTL_INPUT_GET_UNBLOCK \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 7, int)
-
-#define MSM_GMN_IOCTL_OUTPUT_BUF_ENQUEUE \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 8, struct msm_gemini_buf *)
-
-#define MSM_GMN_IOCTL_OUTPUT_GET \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 9, struct msm_gemini_buf *)
-
-#define MSM_GMN_IOCTL_OUTPUT_GET_UNBLOCK \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 10, int)
-
-#define MSM_GMN_IOCTL_EVT_GET \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 11, struct msm_gemini_ctrl_cmd *)
-
-#define MSM_GMN_IOCTL_EVT_GET_UNBLOCK \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 12, int)
-
-#define MSM_GMN_IOCTL_HW_CMD \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 13, struct msm_gemini_hw_cmd *)
-
-#define MSM_GMN_IOCTL_HW_CMDS \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 14, struct msm_gemini_hw_cmds *)
-
-#define MSM_GMN_IOCTL_TEST_DUMP_REGION \
-	_IOW(MSM_GMN_IOCTL_MAGIC, 15, unsigned long)
-
-#define MSM_GEMINI_MODE_REALTIME_ENCODE 0
-#define MSM_GEMINI_MODE_OFFLINE_ENCODE 1
-#define MSM_GEMINI_MODE_REALTIME_ROTATION 2
-#define MSM_GEMINI_MODE_OFFLINE_ROTATION 3
-struct msm_gemini_ctrl_cmd {
-	uint32_t type;
-	uint32_t len;
-	void     *value;
-};
-
-#define MSM_GEMINI_EVT_RESET 0
-#define MSM_GEMINI_EVT_FRAMEDONE	1
-#define MSM_GEMINI_EVT_ERR 2
-
-struct msm_gemini_buf {
-	uint32_t type;
-	int      fd;
-
-	void     *vaddr;
-
-	uint32_t y_off;
-	uint32_t y_len;
-	uint32_t framedone_len;
-
-	uint32_t cbcr_off;
-	uint32_t cbcr_len;
-
-	uint32_t num_of_mcu_rows;
-	uint32_t offset;
-};
-
-#define MSM_GEMINI_HW_CMD_TYPE_READ      0
-#define MSM_GEMINI_HW_CMD_TYPE_WRITE     1
-#define MSM_GEMINI_HW_CMD_TYPE_WRITE_OR  2
-#define MSM_GEMINI_HW_CMD_TYPE_UWAIT     3
-#define MSM_GEMINI_HW_CMD_TYPE_MWAIT     4
-#define MSM_GEMINI_HW_CMD_TYPE_MDELAY    5
-#define MSM_GEMINI_HW_CMD_TYPE_UDELAY    6
-struct msm_gemini_hw_cmd {
-
-	uint32_t type:4;
-
-	/* n microseconds of timeout for WAIT */
-	/* n microseconds of time for DELAY */
-	/* repeat n times for READ/WRITE */
-	/* max is 0xFFF, 4095 */
-	uint32_t n:12;
-	uint32_t offset:16;
-	uint32_t mask;
-	union {
-		uint32_t data;   /* for single READ/WRITE/WAIT, n = 1 */
-		uint32_t *pdata;   /* for multiple READ/WRITE/WAIT, n > 1 */
-	};
-};
-
-struct msm_gemini_hw_cmds {
-	uint32_t m; /* number of elements in the hw_cmd array */
-	struct msm_gemini_hw_cmd hw_cmd[1];
-};
-
-#endif /* __LINUX_MSM_GEMINI_H */
diff --git a/original/media/msm_gestures.h b/original/media/msm_gestures.h
deleted file mode 100644
index c9af034..0000000
--- a/original/media/msm_gestures.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-#ifndef __LINUX_MSM_GESTURES_H
-#define __LINUX_MSM_GESTURES_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#include <media/msm_camera.h>
-
-#define MSM_GES_IOCTL_CTRL_COMMAND \
-	_IOW('V', BASE_VIDIOC_PRIVATE + 20, struct v4l2_control)
-
-#define VIDIOC_MSM_GESTURE_EVT \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 21, struct v4l2_event)
-
-#define MSM_GES_GET_EVT_PAYLOAD \
-	_IOW('V', BASE_VIDIOC_PRIVATE + 22, struct msm_ges_evt)
-
-#define VIDIOC_MSM_GESTURE_CAM_EVT \
-	_IOWR('V', BASE_VIDIOC_PRIVATE + 23, int)
-
-#define MSM_GES_RESP_V4L2  MSM_CAM_RESP_MAX
-#define MSM_GES_RESP_MAX  (MSM_GES_RESP_V4L2 + 1)
-
-#define MSM_SVR_RESP_MAX  MSM_GES_RESP_MAX
-
-
-#define MSM_V4L2_GES_BASE                             100
-#define MSM_V4L2_GES_OPEN         (MSM_V4L2_GES_BASE + 0)
-#define MSM_V4L2_GES_CLOSE        (MSM_V4L2_GES_BASE + 1)
-#define MSM_V4L2_GES_CAM_OPEN     (MSM_V4L2_GES_BASE + 2)
-#define MSM_V4L2_GES_CAM_CLOSE    (MSM_V4L2_GES_BASE + 3)
-
-#define MSM_GES_APP_EVT_MIN     (V4L2_EVENT_PRIVATE_START + 0x14)
-#define MSM_GES_APP_NOTIFY_EVENT        (MSM_GES_APP_EVT_MIN + 0)
-#define MSM_GES_APP_NOTIFY_ERROR_EVENT  (MSM_GES_APP_EVT_MIN + 1)
-#define MSM_GES_APP_EVT_MAX             (MSM_GES_APP_EVT_MIN + 2)
-
-#define MSM_GESTURE_CID_CTRL_CMD V4L2_CID_BRIGHTNESS
-
-#define MAX_GES_EVENTS 25
-
-struct msm_ges_ctrl_cmd {
-	int type;
-	void *value;
-	int len;
-	int fd;
-	uint32_t cookie;
-};
-
-struct msm_ges_evt {
-	void *evt_data;
-	int evt_len;
-};
-
-#endif /*__LINUX_MSM_GESTURES_H*/
diff --git a/original/media/msm_isp.h b/original/media/msm_isp.h
deleted file mode 100644
index 9fa5932..0000000
--- a/original/media/msm_isp.h
+++ /dev/null
@@ -1,371 +0,0 @@
-/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-#ifndef __MSM_ISP_H__
-#define __MSM_ISP_H__
-
-#define BIT(nr)			(1UL << (nr))
-
-/* ISP message IDs */
-#define MSG_ID_RESET_ACK                0
-#define MSG_ID_START_ACK                1
-#define MSG_ID_STOP_ACK                 2
-#define MSG_ID_UPDATE_ACK               3
-#define MSG_ID_OUTPUT_P                 4
-#define MSG_ID_OUTPUT_T                 5
-#define MSG_ID_OUTPUT_S                 6
-#define MSG_ID_OUTPUT_V                 7
-#define MSG_ID_SNAPSHOT_DONE            8
-#define MSG_ID_STATS_AEC                9
-#define MSG_ID_STATS_AF                 10
-#define MSG_ID_STATS_AWB                11
-#define MSG_ID_STATS_RS                 12
-#define MSG_ID_STATS_CS                 13
-#define MSG_ID_STATS_IHIST              14
-#define MSG_ID_STATS_SKIN               15
-#define MSG_ID_EPOCH1                   16
-#define MSG_ID_EPOCH2                   17
-#define MSG_ID_SYNC_TIMER0_DONE         18
-#define MSG_ID_SYNC_TIMER1_DONE         19
-#define MSG_ID_SYNC_TIMER2_DONE         20
-#define MSG_ID_ASYNC_TIMER0_DONE        21
-#define MSG_ID_ASYNC_TIMER1_DONE        22
-#define MSG_ID_ASYNC_TIMER2_DONE        23
-#define MSG_ID_ASYNC_TIMER3_DONE        24
-#define MSG_ID_AE_OVERFLOW              25
-#define MSG_ID_AF_OVERFLOW              26
-#define MSG_ID_AWB_OVERFLOW             27
-#define MSG_ID_RS_OVERFLOW              28
-#define MSG_ID_CS_OVERFLOW              29
-#define MSG_ID_IHIST_OVERFLOW           30
-#define MSG_ID_SKIN_OVERFLOW            31
-#define MSG_ID_AXI_ERROR                32
-#define MSG_ID_CAMIF_OVERFLOW           33
-#define MSG_ID_VIOLATION                34
-#define MSG_ID_CAMIF_ERROR              35
-#define MSG_ID_BUS_OVERFLOW             36
-#define MSG_ID_SOF_ACK                  37
-#define MSG_ID_STOP_REC_ACK             38
-#define MSG_ID_STATS_AWB_AEC            39
-#define MSG_ID_OUTPUT_PRIMARY           40
-#define MSG_ID_OUTPUT_SECONDARY         41
-#define MSG_ID_STATS_COMPOSITE          42
-#define MSG_ID_OUTPUT_TERTIARY1         43
-#define MSG_ID_STOP_LS_ACK              44
-#define MSG_ID_OUTPUT_TERTIARY2         45
-#define MSG_ID_STATS_BG                 46
-#define MSG_ID_STATS_BF                 47
-#define MSG_ID_STATS_BHIST              48
-#define MSG_ID_RDI0_UPDATE_ACK          49
-#define MSG_ID_RDI1_UPDATE_ACK          50
-#define MSG_ID_RDI2_UPDATE_ACK          51
-
-/* ISP command IDs */
-#define VFE_CMD_DUMMY_0                                 0
-#define VFE_CMD_SET_CLK                                 1
-#define VFE_CMD_RESET                                   2
-#define VFE_CMD_START                                   3
-#define VFE_CMD_TEST_GEN_START                          4
-#define VFE_CMD_OPERATION_CFG                           5
-#define VFE_CMD_AXI_OUT_CFG                             6
-#define VFE_CMD_CAMIF_CFG                               7
-#define VFE_CMD_AXI_INPUT_CFG                           8
-#define VFE_CMD_BLACK_LEVEL_CFG                         9
-#define VFE_CMD_MESH_ROLL_OFF_CFG                       10
-#define VFE_CMD_DEMUX_CFG                               11
-#define VFE_CMD_FOV_CFG                                 12
-#define VFE_CMD_MAIN_SCALER_CFG                         13
-#define VFE_CMD_WB_CFG                                  14
-#define VFE_CMD_COLOR_COR_CFG                           15
-#define VFE_CMD_RGB_G_CFG                               16
-#define VFE_CMD_LA_CFG                                  17
-#define VFE_CMD_CHROMA_EN_CFG                           18
-#define VFE_CMD_CHROMA_SUP_CFG                          19
-#define VFE_CMD_MCE_CFG                                 20
-#define VFE_CMD_SK_ENHAN_CFG                            21
-#define VFE_CMD_ASF_CFG                                 22
-#define VFE_CMD_S2Y_CFG                                 23
-#define VFE_CMD_S2CbCr_CFG                              24
-#define VFE_CMD_CHROMA_SUBS_CFG                         25
-#define VFE_CMD_OUT_CLAMP_CFG                           26
-#define VFE_CMD_FRAME_SKIP_CFG                          27
-#define VFE_CMD_DUMMY_1                                 28
-#define VFE_CMD_DUMMY_2                                 29
-#define VFE_CMD_DUMMY_3                                 30
-#define VFE_CMD_UPDATE                                  31
-#define VFE_CMD_BL_LVL_UPDATE                           32
-#define VFE_CMD_DEMUX_UPDATE                            33
-#define VFE_CMD_FOV_UPDATE                              34
-#define VFE_CMD_MAIN_SCALER_UPDATE                      35
-#define VFE_CMD_WB_UPDATE                               36
-#define VFE_CMD_COLOR_COR_UPDATE                        37
-#define VFE_CMD_RGB_G_UPDATE                            38
-#define VFE_CMD_LA_UPDATE                               39
-#define VFE_CMD_CHROMA_EN_UPDATE                        40
-#define VFE_CMD_CHROMA_SUP_UPDATE                       41
-#define VFE_CMD_MCE_UPDATE                              42
-#define VFE_CMD_SK_ENHAN_UPDATE                         43
-#define VFE_CMD_S2CbCr_UPDATE                           44
-#define VFE_CMD_S2Y_UPDATE                              45
-#define VFE_CMD_ASF_UPDATE                              46
-#define VFE_CMD_FRAME_SKIP_UPDATE                       47
-#define VFE_CMD_CAMIF_FRAME_UPDATE                      48
-#define VFE_CMD_STATS_AF_UPDATE                         49
-#define VFE_CMD_STATS_AE_UPDATE                         50
-#define VFE_CMD_STATS_AWB_UPDATE                        51
-#define VFE_CMD_STATS_RS_UPDATE                         52
-#define VFE_CMD_STATS_CS_UPDATE                         53
-#define VFE_CMD_STATS_SKIN_UPDATE                       54
-#define VFE_CMD_STATS_IHIST_UPDATE                      55
-#define VFE_CMD_DUMMY_4                                 56
-#define VFE_CMD_EPOCH1_ACK                              57
-#define VFE_CMD_EPOCH2_ACK                              58
-#define VFE_CMD_START_RECORDING                         59
-#define VFE_CMD_STOP_RECORDING                          60
-#define VFE_CMD_DUMMY_5                                 61
-#define VFE_CMD_DUMMY_6                                 62
-#define VFE_CMD_CAPTURE                                 63
-#define VFE_CMD_DUMMY_7                                 64
-#define VFE_CMD_STOP                                    65
-#define VFE_CMD_GET_HW_VERSION                          66
-#define VFE_CMD_GET_FRAME_SKIP_COUNTS                   67
-#define VFE_CMD_OUTPUT1_BUFFER_ENQ                      68
-#define VFE_CMD_OUTPUT2_BUFFER_ENQ                      69
-#define VFE_CMD_OUTPUT3_BUFFER_ENQ                      70
-#define VFE_CMD_JPEG_OUT_BUF_ENQ                        71
-#define VFE_CMD_RAW_OUT_BUF_ENQ                         72
-#define VFE_CMD_RAW_IN_BUF_ENQ                          73
-#define VFE_CMD_STATS_AF_ENQ                            74
-#define VFE_CMD_STATS_AE_ENQ                            75
-#define VFE_CMD_STATS_AWB_ENQ                           76
-#define VFE_CMD_STATS_RS_ENQ                            77
-#define VFE_CMD_STATS_CS_ENQ                            78
-#define VFE_CMD_STATS_SKIN_ENQ                          79
-#define VFE_CMD_STATS_IHIST_ENQ                         80
-#define VFE_CMD_DUMMY_8                                 81
-#define VFE_CMD_JPEG_ENC_CFG                            82
-#define VFE_CMD_DUMMY_9                                 83
-#define VFE_CMD_STATS_AF_START                          84
-#define VFE_CMD_STATS_AF_STOP                           85
-#define VFE_CMD_STATS_AE_START                          86
-#define VFE_CMD_STATS_AE_STOP                           87
-#define VFE_CMD_STATS_AWB_START                         88
-#define VFE_CMD_STATS_AWB_STOP                          89
-#define VFE_CMD_STATS_RS_START                          90
-#define VFE_CMD_STATS_RS_STOP                           91
-#define VFE_CMD_STATS_CS_START                          92
-#define VFE_CMD_STATS_CS_STOP                           93
-#define VFE_CMD_STATS_SKIN_START                        94
-#define VFE_CMD_STATS_SKIN_STOP                         95
-#define VFE_CMD_STATS_IHIST_START                       96
-#define VFE_CMD_STATS_IHIST_STOP                        97
-#define VFE_CMD_DUMMY_10                                98
-#define VFE_CMD_SYNC_TIMER_SETTING                      99
-#define VFE_CMD_ASYNC_TIMER_SETTING                     100
-#define VFE_CMD_LIVESHOT                                101
-#define VFE_CMD_LA_SETUP                                102
-#define VFE_CMD_LINEARIZATION_CFG                       103
-#define VFE_CMD_DEMOSAICV3                              104
-#define VFE_CMD_DEMOSAICV3_ABCC_CFG                     105
-#define VFE_CMD_DEMOSAICV3_DBCC_CFG                     106
-#define VFE_CMD_DEMOSAICV3_DBPC_CFG                     107
-#define VFE_CMD_DEMOSAICV3_ABF_CFG                      108
-#define VFE_CMD_DEMOSAICV3_ABCC_UPDATE                  109
-#define VFE_CMD_DEMOSAICV3_DBCC_UPDATE                  110
-#define VFE_CMD_DEMOSAICV3_DBPC_UPDATE                  111
-#define VFE_CMD_XBAR_CFG                                112
-#define VFE_CMD_MODULE_CFG                              113
-#define VFE_CMD_ZSL                                     114
-#define VFE_CMD_LINEARIZATION_UPDATE                    115
-#define VFE_CMD_DEMOSAICV3_ABF_UPDATE                   116
-#define VFE_CMD_CLF_CFG                                 117
-#define VFE_CMD_CLF_LUMA_UPDATE                         118
-#define VFE_CMD_CLF_CHROMA_UPDATE                       119
-#define VFE_CMD_PCA_ROLL_OFF_CFG                        120
-#define VFE_CMD_PCA_ROLL_OFF_UPDATE                     121
-#define VFE_CMD_GET_REG_DUMP                            122
-#define VFE_CMD_GET_LINEARIZATON_TABLE                  123
-#define VFE_CMD_GET_MESH_ROLLOFF_TABLE                  124
-#define VFE_CMD_GET_PCA_ROLLOFF_TABLE                   125
-#define VFE_CMD_GET_RGB_G_TABLE                         126
-#define VFE_CMD_GET_LA_TABLE                            127
-#define VFE_CMD_DEMOSAICV3_UPDATE                       128
-#define VFE_CMD_ACTIVE_REGION_CFG                       129
-#define VFE_CMD_COLOR_PROCESSING_CONFIG                 130
-#define VFE_CMD_STATS_WB_AEC_CONFIG                     131
-#define VFE_CMD_STATS_WB_AEC_UPDATE                     132
-#define VFE_CMD_Y_GAMMA_CONFIG                          133
-#define VFE_CMD_SCALE_OUTPUT1_CONFIG                    134
-#define VFE_CMD_SCALE_OUTPUT2_CONFIG                    135
-#define VFE_CMD_CAPTURE_RAW                             136
-#define VFE_CMD_STOP_LIVESHOT                           137
-#define VFE_CMD_RECONFIG_VFE                            138
-#define VFE_CMD_STATS_REQBUF                            139
-#define VFE_CMD_STATS_ENQUEUEBUF                        140
-#define VFE_CMD_STATS_FLUSH_BUFQ                        141
-#define VFE_CMD_STATS_UNREGBUF                          142
-#define VFE_CMD_STATS_BG_START                          143
-#define VFE_CMD_STATS_BG_STOP                           144
-#define VFE_CMD_STATS_BF_START                          145
-#define VFE_CMD_STATS_BF_STOP                           146
-#define VFE_CMD_STATS_BHIST_START                       147
-#define VFE_CMD_STATS_BHIST_STOP                        148
-#define VFE_CMD_RESET_2                                 149
-#define VFE_CMD_FOV_ENC_CFG                             150
-#define VFE_CMD_FOV_VIEW_CFG                            151
-#define VFE_CMD_FOV_ENC_UPDATE                          152
-#define VFE_CMD_FOV_VIEW_UPDATE                         153
-#define VFE_CMD_SCALER_ENC_CFG                          154
-#define VFE_CMD_SCALER_VIEW_CFG                         155
-#define VFE_CMD_SCALER_ENC_UPDATE                       156
-#define VFE_CMD_SCALER_VIEW_UPDATE                      157
-#define VFE_CMD_COLORXFORM_ENC_CFG                      158
-#define VFE_CMD_COLORXFORM_VIEW_CFG                     159
-#define VFE_CMD_COLORXFORM_ENC_UPDATE                   160
-#define VFE_CMD_COLORXFORM_VIEW_UPDATE                  161
-#define VFE_CMD_TEST_GEN_CFG                            162
-
-struct msm_isp_cmd {
-	int32_t  id;
-	uint16_t length;
-	void     *value;
-};
-
-#define VPE_CMD_DUMMY_0                                 0
-#define VPE_CMD_INIT                                    1
-#define VPE_CMD_DEINIT                                  2
-#define VPE_CMD_ENABLE                                  3
-#define VPE_CMD_DISABLE                                 4
-#define VPE_CMD_RESET                                   5
-#define VPE_CMD_FLUSH                                   6
-#define VPE_CMD_OPERATION_MODE_CFG                      7
-#define VPE_CMD_INPUT_PLANE_CFG                         8
-#define VPE_CMD_OUTPUT_PLANE_CFG                        9
-#define VPE_CMD_INPUT_PLANE_UPDATE                      10
-#define VPE_CMD_SCALE_CFG_TYPE                          11
-#define VPE_CMD_ZOOM                                    13
-#define VPE_CMD_MAX                                     14
-
-#define MSM_PP_CMD_TYPE_NOT_USED        0  /* not used */
-#define MSM_PP_CMD_TYPE_VPE             1  /* VPE cmd */
-#define MSM_PP_CMD_TYPE_MCTL            2  /* MCTL cmd */
-
-#define MCTL_CMD_DUMMY_0                0  /* not used */
-#define MCTL_CMD_GET_FRAME_BUFFER       1  /* reserve a free frame buffer */
-#define MCTL_CMD_PUT_FRAME_BUFFER       2  /* return the free frame buffer */
-#define MCTL_CMD_DIVERT_FRAME_PP_PATH   3  /* divert frame for pp */
-
-/* event typese sending to MCTL PP module */
-#define MCTL_PP_EVENT_NOTUSED           0
-#define MCTL_PP_EVENT_CMD_ACK           1
-
-#define VPE_OPERATION_MODE_CFG_LEN      4
-#define VPE_INPUT_PLANE_CFG_LEN         24
-#define VPE_OUTPUT_PLANE_CFG_LEN        20
-#define VPE_INPUT_PLANE_UPDATE_LEN      12
-#define VPE_SCALER_CONFIG_LEN           260
-#define VPE_DIS_OFFSET_CFG_LEN          12
-
-
-#define CAPTURE_WIDTH          1280
-#define IMEM_Y_SIZE            (CAPTURE_WIDTH*16)
-#define IMEM_CBCR_SIZE         (CAPTURE_WIDTH*8)
-
-#define IMEM_Y_PING_OFFSET     0x2E000000
-#define IMEM_CBCR_PING_OFFSET  (IMEM_Y_PING_OFFSET + IMEM_Y_SIZE)
-
-#define IMEM_Y_PONG_OFFSET     (IMEM_CBCR_PING_OFFSET + IMEM_CBCR_SIZE)
-#define IMEM_CBCR_PONG_OFFSET  (IMEM_Y_PONG_OFFSET + IMEM_Y_SIZE)
-
-
-struct msm_vpe_op_mode_cfg {
-	uint8_t op_mode_cfg[VPE_OPERATION_MODE_CFG_LEN];
-};
-
-struct msm_vpe_input_plane_cfg {
-	uint8_t input_plane_cfg[VPE_INPUT_PLANE_CFG_LEN];
-};
-
-struct msm_vpe_output_plane_cfg {
-	uint8_t output_plane_cfg[VPE_OUTPUT_PLANE_CFG_LEN];
-};
-
-struct msm_vpe_input_plane_update_cfg {
-	uint8_t input_plane_update_cfg[VPE_INPUT_PLANE_UPDATE_LEN];
-};
-
-struct msm_vpe_scaler_cfg {
-	uint8_t scaler_cfg[VPE_SCALER_CONFIG_LEN];
-};
-
-struct msm_vpe_flush_frame_buffer {
-	uint32_t src_buf_handle;
-	uint32_t dest_buf_handle;
-	int path;
-};
-
-struct msm_mctl_pp_frame_buffer {
-	uint32_t buf_handle;
-	int path;
-};
-struct msm_mctl_pp_divert_pp {
-	int path;
-	int enable;
-};
-struct msm_vpe_clock_rate {
-	uint32_t rate;
-};
-struct msm_pp_crop {
-	uint32_t  src_x;
-	uint32_t  src_y;
-	uint32_t  src_w;
-	uint32_t  src_h;
-	uint32_t  dst_x;
-	uint32_t  dst_y;
-	uint32_t  dst_w;
-	uint32_t  dst_h;
-	uint8_t update_flag;
-};
-#define MSM_MCTL_PP_VPE_FRAME_ACK    (1<<0)
-#define MSM_MCTL_PP_VPE_FRAME_TO_APP (1<<1)
-
-struct msm_mctl_pp_frame_cmd {
-	uint32_t cookie;
-	uint8_t  vpe_output_action;
-	uint32_t src_buf_handle;
-	uint32_t dest_buf_handle;
-	struct msm_pp_crop crop;
-	int path;
-	/* TBD: 3D related */
-};
-
-#define VFE_OUTPUTS_MAIN_AND_PREVIEW    BIT(0)
-#define VFE_OUTPUTS_MAIN_AND_VIDEO      BIT(1)
-#define VFE_OUTPUTS_MAIN_AND_THUMB      BIT(2)
-#define VFE_OUTPUTS_THUMB_AND_MAIN      BIT(3)
-#define VFE_OUTPUTS_PREVIEW_AND_VIDEO   BIT(4)
-#define VFE_OUTPUTS_VIDEO_AND_PREVIEW   BIT(5)
-#define VFE_OUTPUTS_PREVIEW             BIT(6)
-#define VFE_OUTPUTS_VIDEO               BIT(7)
-#define VFE_OUTPUTS_RAW                 BIT(8)
-#define VFE_OUTPUTS_JPEG_AND_THUMB      BIT(9)
-#define VFE_OUTPUTS_THUMB_AND_JPEG      BIT(10)
-#define VFE_OUTPUTS_RDI0                BIT(11)
-#define VFE_OUTPUTS_RDI1                BIT(12)
-
-struct msm_frame_info {
-	uint32_t inst_handle;
-	uint32_t path;
-};
-
-#endif /*__MSM_ISP_H__*/
-
diff --git a/original/media/msm_mercury.h b/original/media/msm_mercury.h
deleted file mode 100644
index 1d14724..0000000
--- a/original/media/msm_mercury.h
+++ /dev/null
@@ -1,119 +0,0 @@
-#ifndef __LINUX_MSM_MERCURY_H
-#define __LINUX_MSM_MERCURY_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-#define MSM_MERCURY_HW_VERSION_REG  0x0004/* this offset does not exist in HW*/
-
-#define OUTPUT_H2V1  0
-#define OUTPUT_H2V2  1
-#define OUTPUT_BYTE  6
-
-#define MSM_MERCURY_MODE_REALTIME_ENCODE 0
-#define MSM_MERCURY_MODE_OFFLINE_ENCODE 1
-#define MSM_MERCURY_MODE_REALTIME_ROTATION 2
-#define MSM_MERCURY_MODE_OFFLINE_ROTATION 3
-
-#define MSM_MERCURY_EVT_RESET       1
-#define MSM_MERCURY_EVT_FRAMEDONE	2
-#define MSM_MERCURY_EVT_ERR         3
-#define MSM_MERCURY_EVT_UNBLOCK     4
-
-#define MSM_MERCURY_HW_CMD_TYPE_READ      0
-#define MSM_MERCURY_HW_CMD_TYPE_WRITE     1
-#define MSM_MERCURY_HW_CMD_TYPE_WRITE_OR  2
-#define MSM_MERCURY_HW_CMD_TYPE_UWAIT     3
-#define MSM_MERCURY_HW_CMD_TYPE_MWAIT     4
-#define MSM_MERCURY_HW_CMD_TYPE_MDELAY    5
-#define MSM_MERCURY_HW_CMD_TYPE_UDELAY    6
-
-#define MSM_MCR_IOCTL_MAGIC 'g'
-
-#define MSM_MCR_IOCTL_GET_HW_VERSION \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 1, struct msm_mercury_hw_cmd *)
-
-#define MSM_MCR_IOCTL_RESET \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 2, struct msm_mercury_ctrl_cmd *)
-
-#define MSM_MCR_IOCTL_STOP \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 3, struct msm_mercury_hw_cmds *)
-
-#define MSM_MCR_IOCTL_START \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 4, struct msm_mercury_hw_cmds *)
-
-#define MSM_MCR_IOCTL_INPUT_BUF_CFG \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 5, struct msm_mercury_buf *)
-
-#define MSM_MCR_IOCTL_INPUT_GET \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 6, struct msm_mercury_buf *)
-
-#define MSM_MCR_IOCTL_INPUT_GET_UNBLOCK \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 7, int)
-
-#define MSM_MCR_IOCTL_OUTPUT_BUF_CFG \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 8, struct msm_mercury_buf *)
-
-#define MSM_MCR_IOCTL_OUTPUT_GET \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 9, struct msm_mercury_buf *)
-
-#define MSM_MCR_IOCTL_OUTPUT_GET_UNBLOCK \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 10, int)
-
-#define MSM_MCR_IOCTL_EVT_GET \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 11, struct msm_mercury_ctrl_cmd *)
-
-#define MSM_MCR_IOCTL_EVT_GET_UNBLOCK \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 12, int)
-
-#define MSM_MCR_IOCTL_HW_CMD \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 13, struct msm_mercury_hw_cmd *)
-
-#define MSM_MCR_IOCTL_HW_CMDS \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 14, struct msm_mercury_hw_cmds *)
-
-#define MSM_MCR_IOCTL_TEST_DUMP_REGION \
-	_IOW(MSM_MCR_IOCTL_MAGIC, 15, unsigned long)
-
-struct msm_mercury_ctrl_cmd {
-	uint32_t type;
-	uint32_t len;
-	void     *value;
-};
-
-struct msm_mercury_buf {
-	uint32_t type;
-	int      fd;
-	void     *vaddr;
-	uint32_t y_off;
-	uint32_t y_len;
-	uint32_t framedone_len;
-	uint32_t cbcr_off;
-	uint32_t cbcr_len;
-	uint32_t num_of_mcu_rows;
-	uint32_t offset;
-};
-
-struct msm_mercury_hw_cmd {
-
-	uint32_t type:4;
-	/* n microseconds of timeout for WAIT */
-	/* n microseconds of time for DELAY */
-	/* repeat n times for READ/WRITE */
-	/* max is 0xFFF, 4095 */
-	uint32_t n:12;
-	uint32_t offset:16;
-	uint32_t mask;
-	union {
-		/* for single READ/WRITE/WAIT, n = 1 */
-		uint32_t data;
-		uint32_t *pdata;/* for multiple READ/WRITE/WAIT, n > 1 */
-	};
-};
-
-struct msm_mercury_hw_cmds {
-	uint32_t m;	/* number of elements in the hw_cmd array */
-	struct msm_mercury_hw_cmd hw_cmd[1];
-};
-
-#endif /* __LINUX_MSM_MERCURY_H */