mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Pulled mainline in order to get the UAPI infrastructure already merged before I pull in David Howells's UAPI trees for networking. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
8dd9117cc7
3117 changed files with 137897 additions and 50215 deletions
|
|
@ -382,6 +382,7 @@ header-y += utsname.h
|
|||
header-y += uuid.h
|
||||
header-y += uvcvideo.h
|
||||
header-y += v4l2-common.h
|
||||
header-y += v4l2-controls.h
|
||||
header-y += v4l2-dv-timings.h
|
||||
header-y += v4l2-mediabus.h
|
||||
header-y += v4l2-subdev.h
|
||||
|
|
|
|||
|
|
@ -86,6 +86,31 @@ static inline int atomic_dec_unless_positive(atomic_t *p)
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* atomic_dec_if_positive - decrement by 1 if old value positive
|
||||
* @v: pointer of type atomic_t
|
||||
*
|
||||
* The function returns the old value of *v minus 1, even if
|
||||
* the atomic variable, v, was not decremented.
|
||||
*/
|
||||
#ifndef atomic_dec_if_positive
|
||||
static inline int atomic_dec_if_positive(atomic_t *v)
|
||||
{
|
||||
int c, old, dec;
|
||||
c = atomic_read(v);
|
||||
for (;;) {
|
||||
dec = c - 1;
|
||||
if (unlikely(dec < 0))
|
||||
break;
|
||||
old = atomic_cmpxchg((v), c, dec);
|
||||
if (likely(old == c))
|
||||
break;
|
||||
c = old;
|
||||
}
|
||||
return dec;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ARCH_HAS_ATOMIC_OR
|
||||
static inline void atomic_or(int i, atomic_t *v)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ struct ceph_mon_client {
|
|||
int cur_mon; /* last monitor i contacted */
|
||||
unsigned long sub_sent, sub_renew_after;
|
||||
struct ceph_connection con;
|
||||
bool have_fsid;
|
||||
|
||||
/* pending generic requests */
|
||||
struct rb_root generic_request_tree;
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc,
|
|||
extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc,
|
||||
struct ceph_msg *msg);
|
||||
|
||||
extern void ceph_calc_raw_layout(struct ceph_osd_client *osdc,
|
||||
extern int ceph_calc_raw_layout(struct ceph_osd_client *osdc,
|
||||
struct ceph_file_layout *layout,
|
||||
u64 snapid,
|
||||
u64 off, u64 *plen, u64 *bno,
|
||||
|
|
|
|||
|
|
@ -109,9 +109,9 @@ extern struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
|
|||
extern void ceph_osdmap_destroy(struct ceph_osdmap *map);
|
||||
|
||||
/* calculate mapping of a file extent to an object */
|
||||
extern void ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
|
||||
u64 off, u64 *plen,
|
||||
u64 *bno, u64 *oxoff, u64 *oxlen);
|
||||
extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
|
||||
u64 off, u64 *plen,
|
||||
u64 *bno, u64 *oxoff, u64 *oxlen);
|
||||
|
||||
/* calculate mapping of object to a placement group */
|
||||
extern int ceph_calc_object_layout(struct ceph_object_layout *ol,
|
||||
|
|
|
|||
|
|
@ -22,8 +22,9 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
|
|||
extern int fragmentation_index(struct zone *zone, unsigned int order);
|
||||
extern unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *mask,
|
||||
bool sync, bool *contended);
|
||||
bool sync, bool *contended, struct page **page);
|
||||
extern int compact_pgdat(pg_data_t *pgdat, int order);
|
||||
extern void reset_isolation_suitable(pg_data_t *pgdat);
|
||||
extern unsigned long compaction_suitable(struct zone *zone, int order);
|
||||
|
||||
/* Do not skip compaction more than 64 times */
|
||||
|
|
@ -61,10 +62,20 @@ static inline bool compaction_deferred(struct zone *zone, int order)
|
|||
return zone->compact_considered < defer_limit;
|
||||
}
|
||||
|
||||
/* Returns true if restarting compaction after many failures */
|
||||
static inline bool compaction_restarting(struct zone *zone, int order)
|
||||
{
|
||||
if (order < zone->compact_order_failed)
|
||||
return false;
|
||||
|
||||
return zone->compact_defer_shift == COMPACT_MAX_DEFER_SHIFT &&
|
||||
zone->compact_considered >= 1UL << zone->compact_defer_shift;
|
||||
}
|
||||
|
||||
#else
|
||||
static inline unsigned long try_to_compact_pages(struct zonelist *zonelist,
|
||||
int order, gfp_t gfp_mask, nodemask_t *nodemask,
|
||||
bool sync, bool *contended)
|
||||
bool sync, bool *contended, struct page **page)
|
||||
{
|
||||
return COMPACT_CONTINUE;
|
||||
}
|
||||
|
|
@ -74,6 +85,10 @@ static inline int compact_pgdat(pg_data_t *pgdat, int order)
|
|||
return COMPACT_CONTINUE;
|
||||
}
|
||||
|
||||
static inline void reset_isolation_suitable(pg_data_t *pgdat)
|
||||
{
|
||||
}
|
||||
|
||||
static inline unsigned long compaction_suitable(struct zone *zone, int order)
|
||||
{
|
||||
return COMPACT_SKIPPED;
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ struct dma_device {
|
|||
struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)(
|
||||
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
|
||||
size_t period_len, enum dma_transfer_direction direction,
|
||||
void *context);
|
||||
unsigned long flags, void *context);
|
||||
struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)(
|
||||
struct dma_chan *chan, struct dma_interleaved_template *xt,
|
||||
unsigned long flags);
|
||||
|
|
@ -653,10 +653,11 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_rio_sg(
|
|||
|
||||
static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
|
||||
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
|
||||
size_t period_len, enum dma_transfer_direction dir)
|
||||
size_t period_len, enum dma_transfer_direction dir,
|
||||
unsigned long flags)
|
||||
{
|
||||
return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len,
|
||||
period_len, dir, NULL);
|
||||
period_len, dir, flags, NULL);
|
||||
}
|
||||
|
||||
static inline int dmaengine_terminate_all(struct dma_chan *chan)
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ typedef enum fe_caps {
|
|||
FE_CAN_8VSB = 0x200000,
|
||||
FE_CAN_16VSB = 0x400000,
|
||||
FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
|
||||
FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
|
||||
FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
|
||||
FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
|
||||
FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
|
||||
|
|
@ -121,16 +122,27 @@ typedef enum fe_sec_mini_cmd {
|
|||
} fe_sec_mini_cmd_t;
|
||||
|
||||
|
||||
/**
|
||||
* enum fe_status - enumerates the possible frontend status
|
||||
* @FE_HAS_SIGNAL: found something above the noise level
|
||||
* @FE_HAS_CARRIER: found a DVB signal
|
||||
* @FE_HAS_VITERBI: FEC is stable
|
||||
* @FE_HAS_SYNC: found sync bytes
|
||||
* @FE_HAS_LOCK: everything's working
|
||||
* @FE_TIMEDOUT: no lock within the last ~2 seconds
|
||||
* @FE_REINIT: frontend was reinitialized, application is recommended
|
||||
* to reset DiSEqC, tone and parameters
|
||||
*/
|
||||
|
||||
typedef enum fe_status {
|
||||
FE_HAS_SIGNAL = 0x01, /* found something above the noise level */
|
||||
FE_HAS_CARRIER = 0x02, /* found a DVB signal */
|
||||
FE_HAS_VITERBI = 0x04, /* FEC is stable */
|
||||
FE_HAS_SYNC = 0x08, /* found sync bytes */
|
||||
FE_HAS_LOCK = 0x10, /* everything's working... */
|
||||
FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */
|
||||
FE_REINIT = 0x40 /* frontend was reinitialized, */
|
||||
} fe_status_t; /* application is recommended to reset */
|
||||
/* DiSEqC, tone and parameters */
|
||||
FE_HAS_SIGNAL = 0x01,
|
||||
FE_HAS_CARRIER = 0x02,
|
||||
FE_HAS_VITERBI = 0x04,
|
||||
FE_HAS_SYNC = 0x08,
|
||||
FE_HAS_LOCK = 0x10,
|
||||
FE_TIMEDOUT = 0x20,
|
||||
FE_REINIT = 0x40,
|
||||
} fe_status_t;
|
||||
|
||||
typedef enum fe_spectral_inversion {
|
||||
INVERSION_OFF,
|
||||
|
|
@ -152,6 +164,7 @@ typedef enum fe_code_rate {
|
|||
FEC_AUTO,
|
||||
FEC_3_5,
|
||||
FEC_9_10,
|
||||
FEC_2_5,
|
||||
} fe_code_rate_t;
|
||||
|
||||
|
||||
|
|
@ -169,6 +182,7 @@ typedef enum fe_modulation {
|
|||
APSK_16,
|
||||
APSK_32,
|
||||
DQPSK,
|
||||
QAM_4_NR,
|
||||
} fe_modulation_t;
|
||||
|
||||
typedef enum fe_transmit_mode {
|
||||
|
|
@ -179,6 +193,8 @@ typedef enum fe_transmit_mode {
|
|||
TRANSMISSION_MODE_1K,
|
||||
TRANSMISSION_MODE_16K,
|
||||
TRANSMISSION_MODE_32K,
|
||||
TRANSMISSION_MODE_C1,
|
||||
TRANSMISSION_MODE_C3780,
|
||||
} fe_transmit_mode_t;
|
||||
|
||||
#if defined(__DVB_CORE__) || !defined (__KERNEL__)
|
||||
|
|
@ -202,6 +218,9 @@ typedef enum fe_guard_interval {
|
|||
GUARD_INTERVAL_1_128,
|
||||
GUARD_INTERVAL_19_128,
|
||||
GUARD_INTERVAL_19_256,
|
||||
GUARD_INTERVAL_PN420,
|
||||
GUARD_INTERVAL_PN595,
|
||||
GUARD_INTERVAL_PN945,
|
||||
} fe_guard_interval_t;
|
||||
|
||||
|
||||
|
|
@ -213,6 +232,12 @@ typedef enum fe_hierarchy {
|
|||
HIERARCHY_AUTO
|
||||
} fe_hierarchy_t;
|
||||
|
||||
enum fe_interleaving {
|
||||
INTERLEAVING_NONE,
|
||||
INTERLEAVING_AUTO,
|
||||
INTERLEAVING_240,
|
||||
INTERLEAVING_720,
|
||||
};
|
||||
|
||||
#if defined(__DVB_CORE__) || !defined (__KERNEL__)
|
||||
struct dvb_qpsk_parameters {
|
||||
|
|
@ -314,9 +339,9 @@ struct dvb_frontend_event {
|
|||
|
||||
#define DTV_ISDBT_LAYER_ENABLED 41
|
||||
|
||||
#define DTV_ISDBS_TS_ID 42
|
||||
|
||||
#define DTV_DVBT2_PLP_ID 43
|
||||
#define DTV_STREAM_ID 42
|
||||
#define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID
|
||||
#define DTV_DVBT2_PLP_ID_LEGACY 43
|
||||
|
||||
#define DTV_ENUM_DELSYS 44
|
||||
|
||||
|
|
@ -337,7 +362,10 @@ struct dvb_frontend_event {
|
|||
#define DTV_ATSCMH_SCCC_CODE_MODE_C 58
|
||||
#define DTV_ATSCMH_SCCC_CODE_MODE_D 59
|
||||
|
||||
#define DTV_MAX_COMMAND DTV_ATSCMH_SCCC_CODE_MODE_D
|
||||
#define DTV_INTERLEAVING 60
|
||||
#define DTV_LNA 61
|
||||
|
||||
#define DTV_MAX_COMMAND DTV_LNA
|
||||
|
||||
typedef enum fe_pilot {
|
||||
PILOT_ON,
|
||||
|
|
@ -366,7 +394,7 @@ typedef enum fe_delivery_system {
|
|||
SYS_ISDBC,
|
||||
SYS_ATSC,
|
||||
SYS_ATSCMH,
|
||||
SYS_DMBTH,
|
||||
SYS_DTMB,
|
||||
SYS_CMMB,
|
||||
SYS_DAB,
|
||||
SYS_DVBT2,
|
||||
|
|
@ -374,8 +402,9 @@ typedef enum fe_delivery_system {
|
|||
SYS_DVBC_ANNEX_C,
|
||||
} fe_delivery_system_t;
|
||||
|
||||
|
||||
/* backward compatibility */
|
||||
#define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A
|
||||
#define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB instead */
|
||||
|
||||
/* ATSC-MH */
|
||||
|
||||
|
|
@ -409,6 +438,8 @@ enum atscmh_rs_code_mode {
|
|||
ATSCMH_RSCODE_RES = 3,
|
||||
};
|
||||
|
||||
#define NO_STREAM_ID_FILTER (~0U)
|
||||
#define LNA_AUTO (~0U)
|
||||
|
||||
struct dtv_cmds_h {
|
||||
char *name; /* A display name for debugging purposes */
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
#define _DVBVERSION_H_
|
||||
|
||||
#define DVB_API_VERSION 5
|
||||
#define DVB_API_VERSION_MINOR 6
|
||||
#define DVB_API_VERSION_MINOR 8
|
||||
|
||||
#endif /*_DVBVERSION_H_*/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */
|
||||
#define FALLOC_FL_PUNCH_HOLE 0x02 /* de-allocates range */
|
||||
#define FALLOC_FL_NO_HIDE_STALE 0x04 /* reserved codepoint */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ struct inodes_stat_t {
|
|||
#include <linux/cache.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/radix-tree.h>
|
||||
#include <linux/prio_tree.h>
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pid.h>
|
||||
#include <linux/bug.h>
|
||||
|
|
@ -669,7 +669,7 @@ struct address_space {
|
|||
struct radix_tree_root page_tree; /* radix tree of all pages */
|
||||
spinlock_t tree_lock; /* and lock protecting it */
|
||||
unsigned int i_mmap_writable;/* count VM_SHARED mappings */
|
||||
struct prio_tree_root i_mmap; /* tree of private and shared mappings */
|
||||
struct rb_root i_mmap; /* tree of private and shared mappings */
|
||||
struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */
|
||||
struct mutex i_mmap_mutex; /* protect tree, count, list */
|
||||
/* Protected by tree_lock together with the radix tree */
|
||||
|
|
@ -741,7 +741,7 @@ int mapping_tagged(struct address_space *mapping, int tag);
|
|||
*/
|
||||
static inline int mapping_mapped(struct address_space *mapping)
|
||||
{
|
||||
return !prio_tree_empty(&mapping->i_mmap) ||
|
||||
return !RB_EMPTY_ROOT(&mapping->i_mmap) ||
|
||||
!list_empty(&mapping->i_mmap_nonlinear);
|
||||
}
|
||||
|
||||
|
|
@ -2552,6 +2552,8 @@ extern int sb_min_blocksize(struct super_block *, int);
|
|||
|
||||
extern int generic_file_mmap(struct file *, struct vm_area_struct *);
|
||||
extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
|
||||
extern int generic_file_remap_pages(struct vm_area_struct *, unsigned long addr,
|
||||
unsigned long size, pgoff_t pgoff);
|
||||
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
|
||||
int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
|
||||
extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
|
||||
|
|
|
|||
|
|
@ -30,12 +30,7 @@ struct vm_area_struct;
|
|||
#define ___GFP_HARDWALL 0x20000u
|
||||
#define ___GFP_THISNODE 0x40000u
|
||||
#define ___GFP_RECLAIMABLE 0x80000u
|
||||
#ifdef CONFIG_KMEMCHECK
|
||||
#define ___GFP_NOTRACK 0x200000u
|
||||
#else
|
||||
#define ___GFP_NOTRACK 0
|
||||
#endif
|
||||
#define ___GFP_NO_KSWAPD 0x400000u
|
||||
#define ___GFP_OTHER_NODE 0x800000u
|
||||
#define ___GFP_WRITE 0x1000000u
|
||||
|
||||
|
|
@ -90,7 +85,6 @@ struct vm_area_struct;
|
|||
#define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */
|
||||
#define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */
|
||||
|
||||
#define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD)
|
||||
#define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */
|
||||
#define __GFP_WRITE ((__force gfp_t)___GFP_WRITE) /* Allocator intends to dirty page */
|
||||
|
||||
|
|
@ -120,8 +114,7 @@ struct vm_area_struct;
|
|||
__GFP_MOVABLE)
|
||||
#define GFP_IOFS (__GFP_IO | __GFP_FS)
|
||||
#define GFP_TRANSHUGE (GFP_HIGHUSER_MOVABLE | __GFP_COMP | \
|
||||
__GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \
|
||||
__GFP_NO_KSWAPD)
|
||||
__GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN)
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
#define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY)
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ extern int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
|
|||
extern int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
unsigned long address, pmd_t *pmd,
|
||||
pmd_t orig_pmd);
|
||||
extern pgtable_t get_pmd_huge_pte(struct mm_struct *mm);
|
||||
extern struct page *follow_trans_huge_pmd(struct mm_struct *mm,
|
||||
extern struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
|
||||
unsigned long addr,
|
||||
pmd_t *pmd,
|
||||
unsigned int flags);
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@
|
|||
* @values: Array of bitmasks of GPIO settings (low/high) for each
|
||||
* position
|
||||
* @n_values: Number of multiplexer positions (busses to instantiate)
|
||||
* @classes: Optional I2C auto-detection classes
|
||||
* @gpio_chip: Optional GPIO chip name; if set, GPIO pin numbers are given
|
||||
* relative to the base GPIO number of that chip
|
||||
* @gpios: Array of GPIO numbers used to control MUX
|
||||
* @n_gpios: Number of GPIOs used to control MUX
|
||||
* @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
|
||||
|
|
@ -30,6 +33,8 @@ struct i2c_mux_gpio_platform_data {
|
|||
int base_nr;
|
||||
const unsigned *values;
|
||||
int n_values;
|
||||
const unsigned *classes;
|
||||
char *gpio_chip;
|
||||
const unsigned *gpios;
|
||||
int n_gpios;
|
||||
unsigned idle;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
struct i2c_adapter *i2c_add_mux_adapter(struct i2c_adapter *parent,
|
||||
struct device *mux_dev,
|
||||
void *mux_priv, u32 force_nr, u32 chan_id,
|
||||
unsigned int class,
|
||||
int (*select) (struct i2c_adapter *,
|
||||
void *mux_dev, u32 chan_id),
|
||||
int (*deselect) (struct i2c_adapter *,
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ extern s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client,
|
|||
* The driver.owner field should be set to the module owner of this driver.
|
||||
* The driver.name field should be set to the name of this driver.
|
||||
*
|
||||
* For automatic device detection, both @detect and @address_data must
|
||||
* For automatic device detection, both @detect and @address_list must
|
||||
* be defined. @class should also be set, otherwise only devices forced
|
||||
* with module parameters will be created. The detect function must
|
||||
* fill at least the name field of the i2c_board_info structure it is
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
struct pca954x_platform_mode {
|
||||
int adap_id;
|
||||
unsigned int deselect_on_exit:1;
|
||||
unsigned int class;
|
||||
};
|
||||
|
||||
/* Per mux/switch data, used with i2c_register_board_info */
|
||||
|
|
|
|||
|
|
@ -664,7 +664,7 @@ struct twl4030_codec_data {
|
|||
unsigned int check_defaults:1;
|
||||
unsigned int reset_registers:1;
|
||||
unsigned int hs_extmute:1;
|
||||
void (*set_hs_extmute)(int mute);
|
||||
int hs_extmute_gpio;
|
||||
};
|
||||
|
||||
struct twl4030_vibra_data {
|
||||
|
|
|
|||
27
include/linux/interval_tree.h
Normal file
27
include/linux/interval_tree.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef _LINUX_INTERVAL_TREE_H
|
||||
#define _LINUX_INTERVAL_TREE_H
|
||||
|
||||
#include <linux/rbtree.h>
|
||||
|
||||
struct interval_tree_node {
|
||||
struct rb_node rb;
|
||||
unsigned long start; /* Start of interval */
|
||||
unsigned long last; /* Last location _in_ interval */
|
||||
unsigned long __subtree_last;
|
||||
};
|
||||
|
||||
extern void
|
||||
interval_tree_insert(struct interval_tree_node *node, struct rb_root *root);
|
||||
|
||||
extern void
|
||||
interval_tree_remove(struct interval_tree_node *node, struct rb_root *root);
|
||||
|
||||
extern struct interval_tree_node *
|
||||
interval_tree_iter_first(struct rb_root *root,
|
||||
unsigned long start, unsigned long last);
|
||||
|
||||
extern struct interval_tree_node *
|
||||
interval_tree_iter_next(struct interval_tree_node *node,
|
||||
unsigned long start, unsigned long last);
|
||||
|
||||
#endif /* _LINUX_INTERVAL_TREE_H */
|
||||
191
include/linux/interval_tree_generic.h
Normal file
191
include/linux/interval_tree_generic.h
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
/*
|
||||
Interval Trees
|
||||
(C) 2012 Michel Lespinasse <walken@google.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
include/linux/interval_tree_generic.h
|
||||
*/
|
||||
|
||||
#include <linux/rbtree_augmented.h>
|
||||
|
||||
/*
|
||||
* Template for implementing interval trees
|
||||
*
|
||||
* ITSTRUCT: struct type of the interval tree nodes
|
||||
* ITRB: name of struct rb_node field within ITSTRUCT
|
||||
* ITTYPE: type of the interval endpoints
|
||||
* ITSUBTREE: name of ITTYPE field within ITSTRUCT holding last-in-subtree
|
||||
* ITSTART(n): start endpoint of ITSTRUCT node n
|
||||
* ITLAST(n): last endpoint of ITSTRUCT node n
|
||||
* ITSTATIC: 'static' or empty
|
||||
* ITPREFIX: prefix to use for the inline tree definitions
|
||||
*
|
||||
* Note - before using this, please consider if non-generic version
|
||||
* (interval_tree.h) would work for you...
|
||||
*/
|
||||
|
||||
#define INTERVAL_TREE_DEFINE(ITSTRUCT, ITRB, ITTYPE, ITSUBTREE, \
|
||||
ITSTART, ITLAST, ITSTATIC, ITPREFIX) \
|
||||
\
|
||||
/* Callbacks for augmented rbtree insert and remove */ \
|
||||
\
|
||||
static inline ITTYPE ITPREFIX ## _compute_subtree_last(ITSTRUCT *node) \
|
||||
{ \
|
||||
ITTYPE max = ITLAST(node), subtree_last; \
|
||||
if (node->ITRB.rb_left) { \
|
||||
subtree_last = rb_entry(node->ITRB.rb_left, \
|
||||
ITSTRUCT, ITRB)->ITSUBTREE; \
|
||||
if (max < subtree_last) \
|
||||
max = subtree_last; \
|
||||
} \
|
||||
if (node->ITRB.rb_right) { \
|
||||
subtree_last = rb_entry(node->ITRB.rb_right, \
|
||||
ITSTRUCT, ITRB)->ITSUBTREE; \
|
||||
if (max < subtree_last) \
|
||||
max = subtree_last; \
|
||||
} \
|
||||
return max; \
|
||||
} \
|
||||
\
|
||||
RB_DECLARE_CALLBACKS(static, ITPREFIX ## _augment, ITSTRUCT, ITRB, \
|
||||
ITTYPE, ITSUBTREE, ITPREFIX ## _compute_subtree_last) \
|
||||
\
|
||||
/* Insert / remove interval nodes from the tree */ \
|
||||
\
|
||||
ITSTATIC void ITPREFIX ## _insert(ITSTRUCT *node, struct rb_root *root) \
|
||||
{ \
|
||||
struct rb_node **link = &root->rb_node, *rb_parent = NULL; \
|
||||
ITTYPE start = ITSTART(node), last = ITLAST(node); \
|
||||
ITSTRUCT *parent; \
|
||||
\
|
||||
while (*link) { \
|
||||
rb_parent = *link; \
|
||||
parent = rb_entry(rb_parent, ITSTRUCT, ITRB); \
|
||||
if (parent->ITSUBTREE < last) \
|
||||
parent->ITSUBTREE = last; \
|
||||
if (start < ITSTART(parent)) \
|
||||
link = &parent->ITRB.rb_left; \
|
||||
else \
|
||||
link = &parent->ITRB.rb_right; \
|
||||
} \
|
||||
\
|
||||
node->ITSUBTREE = last; \
|
||||
rb_link_node(&node->ITRB, rb_parent, link); \
|
||||
rb_insert_augmented(&node->ITRB, root, &ITPREFIX ## _augment); \
|
||||
} \
|
||||
\
|
||||
ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node, struct rb_root *root) \
|
||||
{ \
|
||||
rb_erase_augmented(&node->ITRB, root, &ITPREFIX ## _augment); \
|
||||
} \
|
||||
\
|
||||
/* \
|
||||
* Iterate over intervals intersecting [start;last] \
|
||||
* \
|
||||
* Note that a node's interval intersects [start;last] iff: \
|
||||
* Cond1: ITSTART(node) <= last \
|
||||
* and \
|
||||
* Cond2: start <= ITLAST(node) \
|
||||
*/ \
|
||||
\
|
||||
static ITSTRUCT * \
|
||||
ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last) \
|
||||
{ \
|
||||
while (true) { \
|
||||
/* \
|
||||
* Loop invariant: start <= node->ITSUBTREE \
|
||||
* (Cond2 is satisfied by one of the subtree nodes) \
|
||||
*/ \
|
||||
if (node->ITRB.rb_left) { \
|
||||
ITSTRUCT *left = rb_entry(node->ITRB.rb_left, \
|
||||
ITSTRUCT, ITRB); \
|
||||
if (start <= left->ITSUBTREE) { \
|
||||
/* \
|
||||
* Some nodes in left subtree satisfy Cond2. \
|
||||
* Iterate to find the leftmost such node N. \
|
||||
* If it also satisfies Cond1, that's the \
|
||||
* match we are looking for. Otherwise, there \
|
||||
* is no matching interval as nodes to the \
|
||||
* right of N can't satisfy Cond1 either. \
|
||||
*/ \
|
||||
node = left; \
|
||||
continue; \
|
||||
} \
|
||||
} \
|
||||
if (ITSTART(node) <= last) { /* Cond1 */ \
|
||||
if (start <= ITLAST(node)) /* Cond2 */ \
|
||||
return node; /* node is leftmost match */ \
|
||||
if (node->ITRB.rb_right) { \
|
||||
node = rb_entry(node->ITRB.rb_right, \
|
||||
ITSTRUCT, ITRB); \
|
||||
if (start <= node->ITSUBTREE) \
|
||||
continue; \
|
||||
} \
|
||||
} \
|
||||
return NULL; /* No match */ \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
ITSTATIC ITSTRUCT * \
|
||||
ITPREFIX ## _iter_first(struct rb_root *root, ITTYPE start, ITTYPE last) \
|
||||
{ \
|
||||
ITSTRUCT *node; \
|
||||
\
|
||||
if (!root->rb_node) \
|
||||
return NULL; \
|
||||
node = rb_entry(root->rb_node, ITSTRUCT, ITRB); \
|
||||
if (node->ITSUBTREE < start) \
|
||||
return NULL; \
|
||||
return ITPREFIX ## _subtree_search(node, start, last); \
|
||||
} \
|
||||
\
|
||||
ITSTATIC ITSTRUCT * \
|
||||
ITPREFIX ## _iter_next(ITSTRUCT *node, ITTYPE start, ITTYPE last) \
|
||||
{ \
|
||||
struct rb_node *rb = node->ITRB.rb_right, *prev; \
|
||||
\
|
||||
while (true) { \
|
||||
/* \
|
||||
* Loop invariants: \
|
||||
* Cond1: ITSTART(node) <= last \
|
||||
* rb == node->ITRB.rb_right \
|
||||
* \
|
||||
* First, search right subtree if suitable \
|
||||
*/ \
|
||||
if (rb) { \
|
||||
ITSTRUCT *right = rb_entry(rb, ITSTRUCT, ITRB); \
|
||||
if (start <= right->ITSUBTREE) \
|
||||
return ITPREFIX ## _subtree_search(right, \
|
||||
start, last); \
|
||||
} \
|
||||
\
|
||||
/* Move up the tree until we come from a node's left child */ \
|
||||
do { \
|
||||
rb = rb_parent(&node->ITRB); \
|
||||
if (!rb) \
|
||||
return NULL; \
|
||||
prev = &node->ITRB; \
|
||||
node = rb_entry(rb, ITSTRUCT, ITRB); \
|
||||
rb = node->ITRB.rb_right; \
|
||||
} while (prev == rb); \
|
||||
\
|
||||
/* Check if the node intersects [start;last] */ \
|
||||
if (last < ITSTART(node)) /* !Cond1 */ \
|
||||
return NULL; \
|
||||
else if (start <= ITLAST(node)) /* Cond2 */ \
|
||||
return node; \
|
||||
} \
|
||||
}
|
||||
|
|
@ -70,8 +70,7 @@ void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn,
|
|||
* @p_end: ptr to ulong for end pfn of the range, can be %NULL
|
||||
* @p_nid: ptr to int for nid of the range, can be %NULL
|
||||
*
|
||||
* Walks over configured memory ranges. Available after early_node_map is
|
||||
* populated.
|
||||
* Walks over configured memory ranges.
|
||||
*/
|
||||
#define for_each_mem_pfn_range(i, nid, p_start, p_end, p_nid) \
|
||||
for (i = -1, __next_mem_pfn_range(&i, nid, p_start, p_end, p_nid); \
|
||||
|
|
|
|||
|
|
@ -84,14 +84,14 @@ extern struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *memcg);
|
|||
extern struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont);
|
||||
|
||||
static inline
|
||||
int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup)
|
||||
bool mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *memcg)
|
||||
{
|
||||
struct mem_cgroup *memcg;
|
||||
int match;
|
||||
struct mem_cgroup *task_memcg;
|
||||
bool match;
|
||||
|
||||
rcu_read_lock();
|
||||
memcg = mem_cgroup_from_task(rcu_dereference((mm)->owner));
|
||||
match = __mem_cgroup_same_or_subtree(cgroup, memcg);
|
||||
task_memcg = mem_cgroup_from_task(rcu_dereference(mm->owner));
|
||||
match = __mem_cgroup_same_or_subtree(memcg, task_memcg);
|
||||
rcu_read_unlock();
|
||||
return match;
|
||||
}
|
||||
|
|
@ -258,10 +258,10 @@ static inline struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline int mm_match_cgroup(struct mm_struct *mm,
|
||||
static inline bool mm_match_cgroup(struct mm_struct *mm,
|
||||
struct mem_cgroup *memcg)
|
||||
{
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline int task_in_mem_cgroup(struct task_struct *task,
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ struct page;
|
|||
struct zone;
|
||||
struct pglist_data;
|
||||
struct mem_section;
|
||||
struct memory_block;
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
|
||||
|
|
@ -233,6 +234,8 @@ static inline int is_mem_section_removable(unsigned long pfn,
|
|||
extern int mem_online_node(int nid);
|
||||
extern int add_memory(int nid, u64 start, u64 size);
|
||||
extern int arch_add_memory(int nid, u64 start, u64 size);
|
||||
extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages);
|
||||
extern int offline_memory_block(struct memory_block *mem);
|
||||
extern int remove_memory(u64 start, u64 size);
|
||||
extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
|
||||
int nr_pages);
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ struct sp_node {
|
|||
|
||||
struct shared_policy {
|
||||
struct rb_root root;
|
||||
spinlock_t lock;
|
||||
struct mutex mutex;
|
||||
};
|
||||
|
||||
void mpol_shared_policy_init(struct shared_policy *sp, struct mempolicy *mpol);
|
||||
|
|
@ -239,7 +239,7 @@ extern int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol,
|
|||
/* Check if a vma is migratable */
|
||||
static inline int vma_migratable(struct vm_area_struct *vma)
|
||||
{
|
||||
if (vma->vm_flags & (VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED))
|
||||
if (vma->vm_flags & (VM_IO | VM_HUGETLB | VM_PFNMAP))
|
||||
return 0;
|
||||
/*
|
||||
* Migration allocates pages in the highest zone. If we cannot
|
||||
|
|
|
|||
|
|
@ -39,6 +39,21 @@ enum {
|
|||
#define PM8606_DCM_BOOST (0x00)
|
||||
#define PM8606_PWM (0x01)
|
||||
|
||||
#define PM8607_MISC2 (0x42)
|
||||
|
||||
/* Power Up Log Register */
|
||||
#define PM8607_POWER_UP_LOG (0x3F)
|
||||
|
||||
/* Charger Control Registers */
|
||||
#define PM8607_CCNT (0x47)
|
||||
#define PM8607_CHG_CTRL1 (0x48)
|
||||
#define PM8607_CHG_CTRL2 (0x49)
|
||||
#define PM8607_CHG_CTRL3 (0x4A)
|
||||
#define PM8607_CHG_CTRL4 (0x4B)
|
||||
#define PM8607_CHG_CTRL5 (0x4C)
|
||||
#define PM8607_CHG_CTRL6 (0x4D)
|
||||
#define PM8607_CHG_CTRL7 (0x4E)
|
||||
|
||||
/* Backlight Registers */
|
||||
#define PM8606_WLED1A (0x02)
|
||||
#define PM8606_WLED1B (0x03)
|
||||
|
|
@ -189,6 +204,71 @@ enum {
|
|||
#define PM8607_PD_PREBIAS (0x56) /* prebias time */
|
||||
#define PM8607_GPADC_MISC1 (0x57)
|
||||
|
||||
/* bit definitions of MEAS_EN1*/
|
||||
#define PM8607_MEAS_EN1_VBAT (1 << 0)
|
||||
#define PM8607_MEAS_EN1_VCHG (1 << 1)
|
||||
#define PM8607_MEAS_EN1_VSYS (1 << 2)
|
||||
#define PM8607_MEAS_EN1_TINT (1 << 3)
|
||||
#define PM8607_MEAS_EN1_RFTMP (1 << 4)
|
||||
#define PM8607_MEAS_EN1_TBAT (1 << 5)
|
||||
#define PM8607_MEAS_EN1_GPADC2 (1 << 6)
|
||||
#define PM8607_MEAS_EN1_GPADC3 (1 << 7)
|
||||
|
||||
/* Battery Monitor Registers */
|
||||
#define PM8607_GP_BIAS2 (0x5A)
|
||||
#define PM8607_VBAT_LOWTH (0x5B)
|
||||
#define PM8607_VCHG_LOWTH (0x5C)
|
||||
#define PM8607_VSYS_LOWTH (0x5D)
|
||||
#define PM8607_TINT_LOWTH (0x5E)
|
||||
#define PM8607_GPADC0_LOWTH (0x5F)
|
||||
#define PM8607_GPADC1_LOWTH (0x60)
|
||||
#define PM8607_GPADC2_LOWTH (0x61)
|
||||
#define PM8607_GPADC3_LOWTH (0x62)
|
||||
#define PM8607_VBAT_HIGHTH (0x63)
|
||||
#define PM8607_VCHG_HIGHTH (0x64)
|
||||
#define PM8607_VSYS_HIGHTH (0x65)
|
||||
#define PM8607_TINT_HIGHTH (0x66)
|
||||
#define PM8607_GPADC0_HIGHTH (0x67)
|
||||
#define PM8607_GPADC1_HIGHTH (0x68)
|
||||
#define PM8607_GPADC2_HIGHTH (0x69)
|
||||
#define PM8607_GPADC3_HIGHTH (0x6A)
|
||||
#define PM8607_IBAT_MEAS1 (0x6B)
|
||||
#define PM8607_IBAT_MEAS2 (0x6C)
|
||||
#define PM8607_VBAT_MEAS1 (0x6D)
|
||||
#define PM8607_VBAT_MEAS2 (0x6E)
|
||||
#define PM8607_VCHG_MEAS1 (0x6F)
|
||||
#define PM8607_VCHG_MEAS2 (0x70)
|
||||
#define PM8607_VSYS_MEAS1 (0x71)
|
||||
#define PM8607_VSYS_MEAS2 (0x72)
|
||||
#define PM8607_TINT_MEAS1 (0x73)
|
||||
#define PM8607_TINT_MEAS2 (0x74)
|
||||
#define PM8607_GPADC0_MEAS1 (0x75)
|
||||
#define PM8607_GPADC0_MEAS2 (0x76)
|
||||
#define PM8607_GPADC1_MEAS1 (0x77)
|
||||
#define PM8607_GPADC1_MEAS2 (0x78)
|
||||
#define PM8607_GPADC2_MEAS1 (0x79)
|
||||
#define PM8607_GPADC2_MEAS2 (0x7A)
|
||||
#define PM8607_GPADC3_MEAS1 (0x7B)
|
||||
#define PM8607_GPADC3_MEAS2 (0x7C)
|
||||
#define PM8607_CCNT_MEAS1 (0x95)
|
||||
#define PM8607_CCNT_MEAS2 (0x96)
|
||||
#define PM8607_VBAT_AVG (0x97)
|
||||
#define PM8607_VCHG_AVG (0x98)
|
||||
#define PM8607_VSYS_AVG (0x99)
|
||||
#define PM8607_VBAT_MIN (0x9A)
|
||||
#define PM8607_VCHG_MIN (0x9B)
|
||||
#define PM8607_VSYS_MIN (0x9C)
|
||||
#define PM8607_VBAT_MAX (0x9D)
|
||||
#define PM8607_VCHG_MAX (0x9E)
|
||||
#define PM8607_VSYS_MAX (0x9F)
|
||||
|
||||
#define PM8607_GPADC_MISC2 (0x59)
|
||||
#define PM8607_GPADC0_GP_BIAS_A0 (1 << 0)
|
||||
#define PM8607_GPADC1_GP_BIAS_A1 (1 << 1)
|
||||
#define PM8607_GPADC2_GP_BIAS_A2 (1 << 2)
|
||||
#define PM8607_GPADC3_GP_BIAS_A3 (1 << 3)
|
||||
#define PM8607_GPADC2_GP_BIAS_OUT2 (1 << 6)
|
||||
|
||||
/* RTC Control Registers */
|
||||
#define PM8607_RTC1 (0xA0)
|
||||
#define PM8607_RTC_COUNTER1 (0xA1)
|
||||
|
|
@ -350,7 +430,8 @@ struct pm860x_touch_pdata {
|
|||
};
|
||||
|
||||
struct pm860x_power_pdata {
|
||||
unsigned fast_charge; /* charge current */
|
||||
int max_capacity;
|
||||
int resistor;
|
||||
};
|
||||
|
||||
struct pm860x_platform_data {
|
||||
|
|
@ -375,6 +456,7 @@ struct pm860x_platform_data {
|
|||
struct regulator_init_data *ldo12;
|
||||
struct regulator_init_data *ldo_vibrator;
|
||||
struct regulator_init_data *ldo14;
|
||||
struct charger_desc *chg_desc;
|
||||
|
||||
int companion_addr; /* I2C address of companion chip */
|
||||
int i2c_port; /* Controlled by GI2C or PI2C */
|
||||
|
|
|
|||
|
|
@ -164,6 +164,10 @@ struct wm8994_pdata {
|
|||
int num_micd_rates;
|
||||
struct wm8958_micd_rate *micd_rates;
|
||||
|
||||
/* Power up delays to add after microphone bias power up (ms) */
|
||||
int micb1_delay;
|
||||
int micb2_delay;
|
||||
|
||||
/* LINEOUT can be differential or single ended */
|
||||
unsigned int lineout1_diff:1;
|
||||
unsigned int lineout2_diff:1;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include <linux/list.h>
|
||||
#include <linux/mmzone.h>
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/prio_tree.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/debug_locks.h>
|
||||
#include <linux/mm_types.h>
|
||||
|
|
@ -21,6 +20,7 @@
|
|||
|
||||
struct mempolicy;
|
||||
struct anon_vma;
|
||||
struct anon_vma_chain;
|
||||
struct file_ra_state;
|
||||
struct user_struct;
|
||||
struct writeback_control;
|
||||
|
|
@ -70,6 +70,8 @@ extern unsigned int kobjsize(const void *objp);
|
|||
/*
|
||||
* vm_flags in vm_area_struct, see mm_types.h.
|
||||
*/
|
||||
#define VM_NONE 0x00000000
|
||||
|
||||
#define VM_READ 0x00000001 /* currently active flags */
|
||||
#define VM_WRITE 0x00000002
|
||||
#define VM_EXEC 0x00000004
|
||||
|
|
@ -82,16 +84,9 @@ extern unsigned int kobjsize(const void *objp);
|
|||
#define VM_MAYSHARE 0x00000080
|
||||
|
||||
#define VM_GROWSDOWN 0x00000100 /* general info on the segment */
|
||||
#if defined(CONFIG_STACK_GROWSUP) || defined(CONFIG_IA64)
|
||||
#define VM_GROWSUP 0x00000200
|
||||
#else
|
||||
#define VM_GROWSUP 0x00000000
|
||||
#define VM_NOHUGEPAGE 0x00000200 /* MADV_NOHUGEPAGE marked this vma */
|
||||
#endif
|
||||
#define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */
|
||||
#define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */
|
||||
|
||||
#define VM_EXECUTABLE 0x00001000
|
||||
#define VM_LOCKED 0x00002000
|
||||
#define VM_IO 0x00004000 /* Memory mapped I/O or similar */
|
||||
|
||||
|
|
@ -101,25 +96,34 @@ extern unsigned int kobjsize(const void *objp);
|
|||
|
||||
#define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */
|
||||
#define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */
|
||||
#define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */
|
||||
#define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */
|
||||
#define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */
|
||||
#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
|
||||
#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
|
||||
#ifndef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */
|
||||
#else
|
||||
#define VM_HUGEPAGE 0x01000000 /* MADV_HUGEPAGE marked this vma */
|
||||
#endif
|
||||
#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */
|
||||
#define VM_NODUMP 0x04000000 /* Do not include in the core dump */
|
||||
#define VM_ARCH_1 0x01000000 /* Architecture-specific flag */
|
||||
#define VM_DONTDUMP 0x04000000 /* Do not include in the core dump */
|
||||
|
||||
#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
|
||||
#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
|
||||
#define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */
|
||||
#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */
|
||||
#define VM_HUGEPAGE 0x20000000 /* MADV_HUGEPAGE marked this vma */
|
||||
#define VM_NOHUGEPAGE 0x40000000 /* MADV_NOHUGEPAGE marked this vma */
|
||||
#define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */
|
||||
|
||||
#if defined(CONFIG_X86)
|
||||
# define VM_PAT VM_ARCH_1 /* PAT reserves whole VMA at once (x86) */
|
||||
#elif defined(CONFIG_PPC)
|
||||
# define VM_SAO VM_ARCH_1 /* Strong Access Ordering (powerpc) */
|
||||
#elif defined(CONFIG_PARISC)
|
||||
# define VM_GROWSUP VM_ARCH_1
|
||||
#elif defined(CONFIG_IA64)
|
||||
# define VM_GROWSUP VM_ARCH_1
|
||||
#elif !defined(CONFIG_MMU)
|
||||
# define VM_MAPPED_COPY VM_ARCH_1 /* T if mapped copy of data (nommu mmap) */
|
||||
#endif
|
||||
|
||||
#ifndef VM_GROWSUP
|
||||
# define VM_GROWSUP VM_NONE
|
||||
#endif
|
||||
|
||||
/* Bits set in the VMA until the stack is in its final location */
|
||||
#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ)
|
||||
|
||||
|
|
@ -143,7 +147,7 @@ extern unsigned int kobjsize(const void *objp);
|
|||
* Special vmas that are non-mergable, non-mlock()able.
|
||||
* Note: mm/huge_memory.c VM_NO_THP depends on this definition.
|
||||
*/
|
||||
#define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP)
|
||||
#define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_PFNMAP)
|
||||
|
||||
/*
|
||||
* mapping from the currently active vm_flags protection bits (the
|
||||
|
|
@ -157,24 +161,7 @@ extern pgprot_t protection_map[16];
|
|||
#define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */
|
||||
#define FAULT_FLAG_RETRY_NOWAIT 0x10 /* Don't drop mmap_sem and wait when retrying */
|
||||
#define FAULT_FLAG_KILLABLE 0x20 /* The fault task is in SIGKILL killable region */
|
||||
|
||||
/*
|
||||
* This interface is used by x86 PAT code to identify a pfn mapping that is
|
||||
* linear over entire vma. This is to optimize PAT code that deals with
|
||||
* marking the physical region with a particular prot. This is not for generic
|
||||
* mm use. Note also that this check will not work if the pfn mapping is
|
||||
* linear for a vma starting at physical address 0. In which case PAT code
|
||||
* falls back to slow path of reserving physical range page by page.
|
||||
*/
|
||||
static inline int is_linear_pfn_mapping(struct vm_area_struct *vma)
|
||||
{
|
||||
return !!(vma->vm_flags & VM_PFN_AT_MMAP);
|
||||
}
|
||||
|
||||
static inline int is_pfn_mapping(struct vm_area_struct *vma)
|
||||
{
|
||||
return !!(vma->vm_flags & VM_PFNMAP);
|
||||
}
|
||||
#define FAULT_FLAG_TRIED 0x40 /* second try */
|
||||
|
||||
/*
|
||||
* vm_fault is filled by the the pagefault handler and passed to the vma's
|
||||
|
|
@ -182,8 +169,7 @@ static inline int is_pfn_mapping(struct vm_area_struct *vma)
|
|||
* of VM_FAULT_xxx flags that give details about how the fault was handled.
|
||||
*
|
||||
* pgoff should be used in favour of virtual_address, if possible. If pgoff
|
||||
* is used, one may set VM_CAN_NONLINEAR in the vma->vm_flags to get nonlinear
|
||||
* mapping support.
|
||||
* is used, one may implement ->remap_pages to get nonlinear mapping support.
|
||||
*/
|
||||
struct vm_fault {
|
||||
unsigned int flags; /* FAULT_FLAG_xxx flags */
|
||||
|
|
@ -241,6 +227,9 @@ struct vm_operations_struct {
|
|||
int (*migrate)(struct vm_area_struct *vma, const nodemask_t *from,
|
||||
const nodemask_t *to, unsigned long flags);
|
||||
#endif
|
||||
/* called by sys_remap_file_pages() to populate non-linear mapping */
|
||||
int (*remap_pages)(struct vm_area_struct *vma, unsigned long addr,
|
||||
unsigned long size, pgoff_t pgoff);
|
||||
};
|
||||
|
||||
struct mmu_gather;
|
||||
|
|
@ -249,6 +238,18 @@ struct inode;
|
|||
#define page_private(page) ((page)->private)
|
||||
#define set_page_private(page, v) ((page)->private = (v))
|
||||
|
||||
/* It's valid only if the page is free path or free_list */
|
||||
static inline void set_freepage_migratetype(struct page *page, int migratetype)
|
||||
{
|
||||
page->index = migratetype;
|
||||
}
|
||||
|
||||
/* It's valid only if the page is free path or free_list */
|
||||
static inline int get_freepage_migratetype(struct page *page)
|
||||
{
|
||||
return page->index;
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: take this include out, include page-flags.h in
|
||||
* files which need it (119 of them)
|
||||
|
|
@ -454,6 +455,7 @@ void put_pages_list(struct list_head *pages);
|
|||
|
||||
void split_page(struct page *page, unsigned int order);
|
||||
int split_free_page(struct page *page);
|
||||
int capture_free_page(struct page *page, int alloc_order, int migratetype);
|
||||
|
||||
/*
|
||||
* Compound pages have a destructor function. Provide a
|
||||
|
|
@ -1071,7 +1073,8 @@ vm_is_stack(struct task_struct *task, struct vm_area_struct *vma, int in_group);
|
|||
|
||||
extern unsigned long move_page_tables(struct vm_area_struct *vma,
|
||||
unsigned long old_addr, struct vm_area_struct *new_vma,
|
||||
unsigned long new_addr, unsigned long len);
|
||||
unsigned long new_addr, unsigned long len,
|
||||
bool need_rmap_locks);
|
||||
extern unsigned long do_mremap(unsigned long addr,
|
||||
unsigned long old_len, unsigned long new_len,
|
||||
unsigned long flags, unsigned long new_addr);
|
||||
|
|
@ -1366,24 +1369,45 @@ extern void zone_pcp_reset(struct zone *zone);
|
|||
extern atomic_long_t mmap_pages_allocated;
|
||||
extern int nommu_shrink_inode_mappings(struct inode *, size_t, size_t);
|
||||
|
||||
/* prio_tree.c */
|
||||
void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
|
||||
void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);
|
||||
void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *);
|
||||
struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma,
|
||||
struct prio_tree_iter *iter);
|
||||
/* interval_tree.c */
|
||||
void vma_interval_tree_insert(struct vm_area_struct *node,
|
||||
struct rb_root *root);
|
||||
void vma_interval_tree_insert_after(struct vm_area_struct *node,
|
||||
struct vm_area_struct *prev,
|
||||
struct rb_root *root);
|
||||
void vma_interval_tree_remove(struct vm_area_struct *node,
|
||||
struct rb_root *root);
|
||||
struct vm_area_struct *vma_interval_tree_iter_first(struct rb_root *root,
|
||||
unsigned long start, unsigned long last);
|
||||
struct vm_area_struct *vma_interval_tree_iter_next(struct vm_area_struct *node,
|
||||
unsigned long start, unsigned long last);
|
||||
|
||||
#define vma_prio_tree_foreach(vma, iter, root, begin, end) \
|
||||
for (prio_tree_iter_init(iter, root, begin, end), vma = NULL; \
|
||||
(vma = vma_prio_tree_next(vma, iter)); )
|
||||
#define vma_interval_tree_foreach(vma, root, start, last) \
|
||||
for (vma = vma_interval_tree_iter_first(root, start, last); \
|
||||
vma; vma = vma_interval_tree_iter_next(vma, start, last))
|
||||
|
||||
static inline void vma_nonlinear_insert(struct vm_area_struct *vma,
|
||||
struct list_head *list)
|
||||
{
|
||||
vma->shared.vm_set.parent = NULL;
|
||||
list_add_tail(&vma->shared.vm_set.list, list);
|
||||
list_add_tail(&vma->shared.nonlinear, list);
|
||||
}
|
||||
|
||||
void anon_vma_interval_tree_insert(struct anon_vma_chain *node,
|
||||
struct rb_root *root);
|
||||
void anon_vma_interval_tree_remove(struct anon_vma_chain *node,
|
||||
struct rb_root *root);
|
||||
struct anon_vma_chain *anon_vma_interval_tree_iter_first(
|
||||
struct rb_root *root, unsigned long start, unsigned long last);
|
||||
struct anon_vma_chain *anon_vma_interval_tree_iter_next(
|
||||
struct anon_vma_chain *node, unsigned long start, unsigned long last);
|
||||
#ifdef CONFIG_DEBUG_VM_RB
|
||||
void anon_vma_interval_tree_verify(struct anon_vma_chain *node);
|
||||
#endif
|
||||
|
||||
#define anon_vma_interval_tree_foreach(avc, root, start, last) \
|
||||
for (avc = anon_vma_interval_tree_iter_first(root, start, last); \
|
||||
avc; avc = anon_vma_interval_tree_iter_next(avc, start, last))
|
||||
|
||||
/* mmap.c */
|
||||
extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin);
|
||||
extern int vma_adjust(struct vm_area_struct *vma, unsigned long start,
|
||||
|
|
@ -1400,15 +1424,13 @@ extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
|
|||
struct rb_node **, struct rb_node *);
|
||||
extern void unlink_file_vma(struct vm_area_struct *);
|
||||
extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
|
||||
unsigned long addr, unsigned long len, pgoff_t pgoff);
|
||||
unsigned long addr, unsigned long len, pgoff_t pgoff,
|
||||
bool *need_rmap_locks);
|
||||
extern void exit_mmap(struct mm_struct *);
|
||||
|
||||
extern int mm_take_all_locks(struct mm_struct *mm);
|
||||
extern void mm_drop_all_locks(struct mm_struct *mm);
|
||||
|
||||
/* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */
|
||||
extern void added_exe_file_vma(struct mm_struct *mm);
|
||||
extern void removed_exe_file_vma(struct mm_struct *mm);
|
||||
extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file);
|
||||
extern struct file *get_mm_exe_file(struct mm_struct *mm);
|
||||
|
||||
|
|
@ -1662,5 +1684,9 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; }
|
|||
static inline bool page_is_guard(struct page *page) { return false; }
|
||||
#endif /* CONFIG_DEBUG_PAGEALLOC */
|
||||
|
||||
extern void reset_zone_present_pages(void);
|
||||
extern void fixup_zone_present_pages(int nid, unsigned long start_pfn,
|
||||
unsigned long end_pfn);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_MM_H */
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <linux/threads.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/prio_tree.h>
|
||||
#include <linux/rbtree.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/completion.h>
|
||||
|
|
@ -240,18 +239,15 @@ struct vm_area_struct {
|
|||
|
||||
/*
|
||||
* For areas with an address space and backing store,
|
||||
* linkage into the address_space->i_mmap prio tree, or
|
||||
* linkage to the list of like vmas hanging off its node, or
|
||||
* linkage into the address_space->i_mmap interval tree, or
|
||||
* linkage of vma in the address_space->i_mmap_nonlinear list.
|
||||
*/
|
||||
union {
|
||||
struct {
|
||||
struct list_head list;
|
||||
void *parent; /* aligns with prio_tree_node parent */
|
||||
struct vm_area_struct *head;
|
||||
} vm_set;
|
||||
|
||||
struct raw_prio_tree_node prio_tree_node;
|
||||
struct rb_node rb;
|
||||
unsigned long rb_subtree_last;
|
||||
} linear;
|
||||
struct list_head nonlinear;
|
||||
} shared;
|
||||
|
||||
/*
|
||||
|
|
@ -349,7 +345,6 @@ struct mm_struct {
|
|||
unsigned long shared_vm; /* Shared pages (files) */
|
||||
unsigned long exec_vm; /* VM_EXEC & ~VM_WRITE */
|
||||
unsigned long stack_vm; /* VM_GROWSUP/DOWN */
|
||||
unsigned long reserved_vm; /* VM_RESERVED|VM_IO pages */
|
||||
unsigned long def_flags;
|
||||
unsigned long nr_ptes; /* Page table pages */
|
||||
unsigned long start_code, end_code, start_data, end_data;
|
||||
|
|
@ -394,7 +389,6 @@ struct mm_struct {
|
|||
|
||||
/* store ref to file /proc/<pid>/exe symlink points to */
|
||||
struct file *exe_file;
|
||||
unsigned long num_exe_file_vmas;
|
||||
#ifdef CONFIG_MMU_NOTIFIER
|
||||
struct mmu_notifier_mm *mmu_notifier_mm;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ calc_vm_flag_bits(unsigned long flags)
|
|||
{
|
||||
return _calc_vm_trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN ) |
|
||||
_calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) |
|
||||
_calc_vm_trans(flags, MAP_EXECUTABLE, VM_EXECUTABLE) |
|
||||
_calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED );
|
||||
}
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/mm_types.h>
|
||||
#include <linux/srcu.h>
|
||||
|
||||
struct mmu_notifier;
|
||||
struct mmu_notifier_ops;
|
||||
|
|
@ -245,50 +246,6 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
|
|||
__mmu_notifier_mm_destroy(mm);
|
||||
}
|
||||
|
||||
/*
|
||||
* These two macros will sometime replace ptep_clear_flush.
|
||||
* ptep_clear_flush is implemented as macro itself, so this also is
|
||||
* implemented as a macro until ptep_clear_flush will converted to an
|
||||
* inline function, to diminish the risk of compilation failure. The
|
||||
* invalidate_page method over time can be moved outside the PT lock
|
||||
* and these two macros can be later removed.
|
||||
*/
|
||||
#define ptep_clear_flush_notify(__vma, __address, __ptep) \
|
||||
({ \
|
||||
pte_t __pte; \
|
||||
struct vm_area_struct *___vma = __vma; \
|
||||
unsigned long ___address = __address; \
|
||||
__pte = ptep_clear_flush(___vma, ___address, __ptep); \
|
||||
mmu_notifier_invalidate_page(___vma->vm_mm, ___address); \
|
||||
__pte; \
|
||||
})
|
||||
|
||||
#define pmdp_clear_flush_notify(__vma, __address, __pmdp) \
|
||||
({ \
|
||||
pmd_t __pmd; \
|
||||
struct vm_area_struct *___vma = __vma; \
|
||||
unsigned long ___address = __address; \
|
||||
VM_BUG_ON(__address & ~HPAGE_PMD_MASK); \
|
||||
mmu_notifier_invalidate_range_start(___vma->vm_mm, ___address, \
|
||||
(__address)+HPAGE_PMD_SIZE);\
|
||||
__pmd = pmdp_clear_flush(___vma, ___address, __pmdp); \
|
||||
mmu_notifier_invalidate_range_end(___vma->vm_mm, ___address, \
|
||||
(__address)+HPAGE_PMD_SIZE); \
|
||||
__pmd; \
|
||||
})
|
||||
|
||||
#define pmdp_splitting_flush_notify(__vma, __address, __pmdp) \
|
||||
({ \
|
||||
struct vm_area_struct *___vma = __vma; \
|
||||
unsigned long ___address = __address; \
|
||||
VM_BUG_ON(__address & ~HPAGE_PMD_MASK); \
|
||||
mmu_notifier_invalidate_range_start(___vma->vm_mm, ___address, \
|
||||
(__address)+HPAGE_PMD_SIZE);\
|
||||
pmdp_splitting_flush(___vma, ___address, __pmdp); \
|
||||
mmu_notifier_invalidate_range_end(___vma->vm_mm, ___address, \
|
||||
(__address)+HPAGE_PMD_SIZE); \
|
||||
})
|
||||
|
||||
#define ptep_clear_flush_young_notify(__vma, __address, __ptep) \
|
||||
({ \
|
||||
int __young; \
|
||||
|
|
@ -311,14 +268,24 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
|
|||
__young; \
|
||||
})
|
||||
|
||||
/*
|
||||
* set_pte_at_notify() sets the pte _after_ running the notifier.
|
||||
* This is safe to start by updating the secondary MMUs, because the primary MMU
|
||||
* pte invalidate must have already happened with a ptep_clear_flush() before
|
||||
* set_pte_at_notify() has been invoked. Updating the secondary MMUs first is
|
||||
* required when we change both the protection of the mapping from read-only to
|
||||
* read-write and the pfn (like during copy on write page faults). Otherwise the
|
||||
* old page would remain mapped readonly in the secondary MMUs after the new
|
||||
* page is already writable by some CPU through the primary MMU.
|
||||
*/
|
||||
#define set_pte_at_notify(__mm, __address, __ptep, __pte) \
|
||||
({ \
|
||||
struct mm_struct *___mm = __mm; \
|
||||
unsigned long ___address = __address; \
|
||||
pte_t ___pte = __pte; \
|
||||
\
|
||||
set_pte_at(___mm, ___address, __ptep, ___pte); \
|
||||
mmu_notifier_change_pte(___mm, ___address, ___pte); \
|
||||
set_pte_at(___mm, ___address, __ptep, ___pte); \
|
||||
})
|
||||
|
||||
#else /* CONFIG_MMU_NOTIFIER */
|
||||
|
|
@ -369,9 +336,6 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
|
|||
|
||||
#define ptep_clear_flush_young_notify ptep_clear_flush_young
|
||||
#define pmdp_clear_flush_young_notify pmdp_clear_flush_young
|
||||
#define ptep_clear_flush_notify ptep_clear_flush
|
||||
#define pmdp_clear_flush_notify pmdp_clear_flush
|
||||
#define pmdp_splitting_flush_notify pmdp_splitting_flush
|
||||
#define set_pte_at_notify set_pte_at
|
||||
|
||||
#endif /* CONFIG_MMU_NOTIFIER */
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ enum zone_stat_item {
|
|||
NUMA_OTHER, /* allocation from other node */
|
||||
#endif
|
||||
NR_ANON_TRANSPARENT_HUGEPAGES,
|
||||
NR_FREE_CMA_PAGES,
|
||||
NR_VM_ZONE_STAT_ITEMS };
|
||||
|
||||
/*
|
||||
|
|
@ -217,6 +218,8 @@ struct lruvec {
|
|||
#define ISOLATE_UNMAPPED ((__force isolate_mode_t)0x2)
|
||||
/* Isolate for asynchronous migration */
|
||||
#define ISOLATE_ASYNC_MIGRATE ((__force isolate_mode_t)0x4)
|
||||
/* Isolate unevictable pages */
|
||||
#define ISOLATE_UNEVICTABLE ((__force isolate_mode_t)0x8)
|
||||
|
||||
/* LRU Isolation modes. */
|
||||
typedef unsigned __bitwise__ isolate_mode_t;
|
||||
|
|
@ -369,8 +372,12 @@ struct zone {
|
|||
spinlock_t lock;
|
||||
int all_unreclaimable; /* All pages pinned */
|
||||
#if defined CONFIG_COMPACTION || defined CONFIG_CMA
|
||||
/* pfn where the last incremental compaction isolated free pages */
|
||||
/* Set to true when the PG_migrate_skip bits should be cleared */
|
||||
bool compact_blockskip_flush;
|
||||
|
||||
/* pfns where compaction scanners should start */
|
||||
unsigned long compact_cached_free_pfn;
|
||||
unsigned long compact_cached_migrate_pfn;
|
||||
#endif
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
/* see spanned/present_pages for more description */
|
||||
|
|
@ -704,6 +711,7 @@ typedef struct pglist_data {
|
|||
unsigned long node_spanned_pages; /* total size of physical page
|
||||
range, including holes */
|
||||
int node_id;
|
||||
nodemask_t reclaim_nodes; /* Nodes allowed to reclaim from */
|
||||
wait_queue_head_t kswapd_wait;
|
||||
wait_queue_head_t pfmemalloc_wait;
|
||||
struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#define OMAP3_ISP_USER_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
/*
|
||||
* Private IOCTLs
|
||||
|
|
@ -427,7 +428,7 @@ struct omap3isp_ccdc_update_config {
|
|||
#define OMAP3ISP_PREV_COLOR_CONV (1 << 8)
|
||||
#define OMAP3ISP_PREV_YC_LIMIT (1 << 9)
|
||||
#define OMAP3ISP_PREV_DEFECT_COR (1 << 10)
|
||||
#define OMAP3ISP_PREV_GAMMABYPASS (1 << 11)
|
||||
/* Bit 11 was OMAP3ISP_PREV_GAMMABYPASS, now merged with OMAP3ISP_PREV_GAMMA */
|
||||
#define OMAP3ISP_PREV_DRK_FRM_CAPTURE (1 << 12)
|
||||
#define OMAP3ISP_PREV_DRK_FRM_SUBTRACT (1 << 13)
|
||||
#define OMAP3ISP_PREV_LENS_SHADING (1 << 14)
|
||||
|
|
@ -436,6 +437,7 @@ struct omap3isp_ccdc_update_config {
|
|||
|
||||
#define OMAP3ISP_PREV_NF_TBL_SIZE 64
|
||||
#define OMAP3ISP_PREV_CFA_TBL_SIZE 576
|
||||
#define OMAP3ISP_PREV_CFA_BLK_SIZE (OMAP3ISP_PREV_CFA_TBL_SIZE / 4)
|
||||
#define OMAP3ISP_PREV_GAMMA_TBL_SIZE 1024
|
||||
#define OMAP3ISP_PREV_YENH_TBL_SIZE 128
|
||||
|
||||
|
|
@ -477,7 +479,7 @@ struct omap3isp_prev_cfa {
|
|||
enum omap3isp_cfa_fmt format;
|
||||
__u8 gradthrs_vert;
|
||||
__u8 gradthrs_horz;
|
||||
__u32 table[OMAP3ISP_PREV_CFA_TBL_SIZE];
|
||||
__u32 table[4][OMAP3ISP_PREV_CFA_BLK_SIZE];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,17 +1,6 @@
|
|||
#ifndef __INCLUDE_LINUX_OOM_H
|
||||
#define __INCLUDE_LINUX_OOM_H
|
||||
|
||||
/*
|
||||
* /proc/<pid>/oom_adj is deprecated, see
|
||||
* Documentation/feature-removal-schedule.txt.
|
||||
*
|
||||
* /proc/<pid>/oom_adj set to -17 protects from the oom-killer
|
||||
*/
|
||||
#define OOM_DISABLE (-17)
|
||||
/* inclusive */
|
||||
#define OOM_ADJUST_MIN (-16)
|
||||
#define OOM_ADJUST_MAX 15
|
||||
|
||||
/*
|
||||
* /proc/<pid>/oom_score_adj set to OOM_SCORE_ADJ_MIN disables oom killing for
|
||||
* pid.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count);
|
|||
void set_pageblock_migratetype(struct page *page, int migratetype);
|
||||
int move_freepages_block(struct zone *zone, struct page *page,
|
||||
int migratetype);
|
||||
int move_freepages(struct zone *zone,
|
||||
struct page *start_page, struct page *end_page,
|
||||
int migratetype);
|
||||
|
||||
/*
|
||||
* Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE.
|
||||
* If specified range includes migrate types other than MOVABLE or CMA,
|
||||
|
|
@ -37,6 +41,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn);
|
|||
*/
|
||||
int set_migratetype_isolate(struct page *page);
|
||||
void unset_migratetype_isolate(struct page *page, unsigned migratetype);
|
||||
|
||||
struct page *alloc_migrate_target(struct page *page, unsigned long private,
|
||||
int **resultp);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ enum pageblock_bits {
|
|||
PB_migrate,
|
||||
PB_migrate_end = PB_migrate + 3 - 1,
|
||||
/* 3 bits required for migrate types */
|
||||
#ifdef CONFIG_COMPACTION
|
||||
PB_migrate_skip,/* If set the block is skipped by compaction */
|
||||
#endif /* CONFIG_COMPACTION */
|
||||
NR_PAGEBLOCK_BITS
|
||||
};
|
||||
|
||||
|
|
@ -65,10 +68,22 @@ unsigned long get_pageblock_flags_group(struct page *page,
|
|||
void set_pageblock_flags_group(struct page *page, unsigned long flags,
|
||||
int start_bitidx, int end_bitidx);
|
||||
|
||||
#ifdef CONFIG_COMPACTION
|
||||
#define get_pageblock_skip(page) \
|
||||
get_pageblock_flags_group(page, PB_migrate_skip, \
|
||||
PB_migrate_skip + 1)
|
||||
#define clear_pageblock_skip(page) \
|
||||
set_pageblock_flags_group(page, 0, PB_migrate_skip, \
|
||||
PB_migrate_skip + 1)
|
||||
#define set_pageblock_skip(page) \
|
||||
set_pageblock_flags_group(page, 1, PB_migrate_skip, \
|
||||
PB_migrate_skip + 1)
|
||||
#endif /* CONFIG_COMPACTION */
|
||||
|
||||
#define get_pageblock_flags(page) \
|
||||
get_pageblock_flags_group(page, 0, NR_PAGEBLOCK_BITS-1)
|
||||
get_pageblock_flags_group(page, 0, PB_migrate_end)
|
||||
#define set_pageblock_flags(page, flags) \
|
||||
set_pageblock_flags_group(page, flags, \
|
||||
0, NR_PAGEBLOCK_BITS-1)
|
||||
0, PB_migrate_end)
|
||||
|
||||
#endif /* PAGEBLOCK_FLAGS_H */
|
||||
|
|
|
|||
|
|
@ -1427,6 +1427,7 @@
|
|||
#define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581
|
||||
#define PCI_DEVICE_ID_VIA_VX800 0x8353
|
||||
#define PCI_DEVICE_ID_VIA_VX855 0x8409
|
||||
#define PCI_DEVICE_ID_VIA_VX900 0x8410
|
||||
#define PCI_DEVICE_ID_VIA_8371_1 0x8391
|
||||
#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
|
||||
#define PCI_DEVICE_ID_VIA_838X_1 0xB188
|
||||
|
|
|
|||
11
include/linux/platform_data/asoc-mx27vis.h
Normal file
11
include/linux/platform_data/asoc-mx27vis.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef __PLATFORM_DATA_ASOC_MX27VIS_H
|
||||
#define __PLATFORM_DATA_ASOC_MX27VIS_H
|
||||
|
||||
struct snd_mx27vis_platform_data {
|
||||
int amp_gain0_gpio;
|
||||
int amp_gain1_gpio;
|
||||
int amp_mutel_gpio;
|
||||
int amp_muter_gpio;
|
||||
};
|
||||
|
||||
#endif /* __PLATFORM_DATA_ASOC_MX27VIS_H */
|
||||
|
|
@ -47,8 +47,6 @@ struct omap_mcbsp_platform_data {
|
|||
bool has_wakeup; /* Wakeup capability */
|
||||
bool has_ccr; /* Transceiver has configuration control registers */
|
||||
int (*enable_st_clock)(unsigned int, bool);
|
||||
int (*set_clk_src)(struct device *dev, struct clk *clk, const char *src);
|
||||
int (*mux_signal)(struct device *dev, const char *signal, const char *src);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
105
include/linux/platform_data/davinci_asp.h
Normal file
105
include/linux/platform_data/davinci_asp.h
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* TI DaVinci Audio Serial Port support
|
||||
*
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation version 2.
|
||||
*
|
||||
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
|
||||
* kind, whether express or implied; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __DAVINCI_ASP_H
|
||||
#define __DAVINCI_ASP_H
|
||||
|
||||
struct snd_platform_data {
|
||||
u32 tx_dma_offset;
|
||||
u32 rx_dma_offset;
|
||||
int asp_chan_q; /* event queue number for ASP channel */
|
||||
int ram_chan_q; /* event queue number for RAM channel */
|
||||
unsigned int codec_fmt;
|
||||
/*
|
||||
* Allowing this is more efficient and eliminates left and right swaps
|
||||
* caused by underruns, but will swap the left and right channels
|
||||
* when compared to previous behavior.
|
||||
*/
|
||||
unsigned enable_channel_combine:1;
|
||||
unsigned sram_size_playback;
|
||||
unsigned sram_size_capture;
|
||||
|
||||
/*
|
||||
* If McBSP peripheral gets the clock from an external pin,
|
||||
* there are three chooses, that are MCBSP_CLKX, MCBSP_CLKR
|
||||
* and MCBSP_CLKS.
|
||||
* Depending on different hardware connections it is possible
|
||||
* to use this setting to change the behaviour of McBSP
|
||||
* driver.
|
||||
*/
|
||||
int clk_input_pin;
|
||||
|
||||
/*
|
||||
* This flag works when both clock and FS are outputs for the cpu
|
||||
* and makes clock more accurate (FS is not symmetrical and the
|
||||
* clock is very fast.
|
||||
* The clock becoming faster is named
|
||||
* i2s continuous serial clock (I2S_SCK) and it is an externally
|
||||
* visible bit clock.
|
||||
*
|
||||
* first line : WordSelect
|
||||
* second line : ContinuousSerialClock
|
||||
* third line: SerialData
|
||||
*
|
||||
* SYMMETRICAL APPROACH:
|
||||
* _______________________ LEFT
|
||||
* _| RIGHT |______________________|
|
||||
* _ _ _ _ _ _ _ _
|
||||
* _| |_| |_ x16 _| |_| |_| |_| |_ x16 _| |_| |_
|
||||
* _ _ _ _ _ _ _ _
|
||||
* _/ \_/ \_ ... _/ \_/ \_/ \_/ \_ ... _/ \_/ \_
|
||||
* \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
|
||||
*
|
||||
* ACCURATE CLOCK APPROACH:
|
||||
* ______________ LEFT
|
||||
* _| RIGHT |_______________________________|
|
||||
* _ _ _ _ _ _ _ _ _
|
||||
* _| |_ x16 _| |_| |_ x16 _| |_| |_| |_| |_| |_| |
|
||||
* _ _ _ _ dummy cycles
|
||||
* _/ \_ ... _/ \_/ \_ ... _/ \__________________
|
||||
* \_/ \_/ \_/ \_/
|
||||
*
|
||||
*/
|
||||
bool i2s_accurate_sck;
|
||||
|
||||
/* McASP specific fields */
|
||||
int tdm_slots;
|
||||
u8 op_mode;
|
||||
u8 num_serializer;
|
||||
u8 *serial_dir;
|
||||
u8 version;
|
||||
u8 txnumevt;
|
||||
u8 rxnumevt;
|
||||
};
|
||||
|
||||
enum {
|
||||
MCASP_VERSION_1 = 0, /* DM646x */
|
||||
MCASP_VERSION_2, /* DA8xx/OMAPL1x */
|
||||
MCASP_VERSION_3, /* TI81xx/AM33xx */
|
||||
};
|
||||
|
||||
enum mcbsp_clk_input_pin {
|
||||
MCBSP_CLKR = 0, /* as in DM365 */
|
||||
MCBSP_CLKS,
|
||||
};
|
||||
|
||||
#define INACTIVE_MODE 0
|
||||
#define TX_MODE 1
|
||||
#define RX_MODE 2
|
||||
|
||||
#define DAVINCI_MCASP_IIS_MODE 0
|
||||
#define DAVINCI_MCASP_DIT_MODE 1
|
||||
|
||||
#endif
|
||||
|
|
@ -13,32 +13,32 @@
|
|||
#define _LP8727_H
|
||||
|
||||
enum lp8727_eoc_level {
|
||||
EOC_5P,
|
||||
EOC_10P,
|
||||
EOC_16P,
|
||||
EOC_20P,
|
||||
EOC_25P,
|
||||
EOC_33P,
|
||||
EOC_50P,
|
||||
LP8727_EOC_5P,
|
||||
LP8727_EOC_10P,
|
||||
LP8727_EOC_16P,
|
||||
LP8727_EOC_20P,
|
||||
LP8727_EOC_25P,
|
||||
LP8727_EOC_33P,
|
||||
LP8727_EOC_50P,
|
||||
};
|
||||
|
||||
enum lp8727_ichg {
|
||||
ICHG_90mA,
|
||||
ICHG_100mA,
|
||||
ICHG_400mA,
|
||||
ICHG_450mA,
|
||||
ICHG_500mA,
|
||||
ICHG_600mA,
|
||||
ICHG_700mA,
|
||||
ICHG_800mA,
|
||||
ICHG_900mA,
|
||||
ICHG_1000mA,
|
||||
LP8727_ICHG_90mA,
|
||||
LP8727_ICHG_100mA,
|
||||
LP8727_ICHG_400mA,
|
||||
LP8727_ICHG_450mA,
|
||||
LP8727_ICHG_500mA,
|
||||
LP8727_ICHG_600mA,
|
||||
LP8727_ICHG_700mA,
|
||||
LP8727_ICHG_800mA,
|
||||
LP8727_ICHG_900mA,
|
||||
LP8727_ICHG_1000mA,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct lp8727_chg_param
|
||||
* @eoc_level : end of charge level setting
|
||||
* @ichg : charging current
|
||||
* @ichg : charging current
|
||||
*/
|
||||
struct lp8727_chg_param {
|
||||
enum lp8727_eoc_level eoc_level;
|
||||
|
|
@ -47,19 +47,22 @@ struct lp8727_chg_param {
|
|||
|
||||
/**
|
||||
* struct lp8727_platform_data
|
||||
* @get_batt_present : check battery status - exists or not
|
||||
* @get_batt_level : get battery voltage (mV)
|
||||
* @get_batt_present : check battery status - exists or not
|
||||
* @get_batt_level : get battery voltage (mV)
|
||||
* @get_batt_capacity : get battery capacity (%)
|
||||
* @get_batt_temp : get battery temperature
|
||||
* @ac, @usb : charging parameters each charger type
|
||||
* @get_batt_temp : get battery temperature
|
||||
* @ac : charging parameters for AC type charger
|
||||
* @usb : charging parameters for USB type charger
|
||||
* @debounce_msec : interrupt debounce time
|
||||
*/
|
||||
struct lp8727_platform_data {
|
||||
u8 (*get_batt_present)(void);
|
||||
u16 (*get_batt_level)(void);
|
||||
u8 (*get_batt_capacity)(void);
|
||||
u8 (*get_batt_temp)(void);
|
||||
struct lp8727_chg_param ac;
|
||||
struct lp8727_chg_param usb;
|
||||
struct lp8727_chg_param *ac;
|
||||
struct lp8727_chg_param *usb;
|
||||
unsigned int debounce_msec;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
32
include/linux/platform_data/omap-twl4030.h
Normal file
32
include/linux/platform_data/omap-twl4030.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* omap-twl4030.h - ASoC machine driver for TI SoC based boards with twl4030
|
||||
* codec, header.
|
||||
*
|
||||
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
|
||||
* All rights reserved.
|
||||
*
|
||||
* Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _OMAP_TWL4030_H_
|
||||
#define _OMAP_TWL4030_H_
|
||||
|
||||
struct omap_tw4030_pdata {
|
||||
const char *card_name;
|
||||
};
|
||||
|
||||
#endif /* _OMAP_TWL4030_H_ */
|
||||
|
|
@ -40,7 +40,6 @@
|
|||
#define __PNFS_OSD_XDR_H__
|
||||
|
||||
#include <linux/nfs_fs.h>
|
||||
#include <linux/nfs_page.h>
|
||||
|
||||
/*
|
||||
* draft-ietf-nfsv4-minorversion-22
|
||||
|
|
|
|||
|
|
@ -109,24 +109,43 @@ struct charger_cable {
|
|||
* struct charger_regulator
|
||||
* @regulator_name: the name of regulator for using charger.
|
||||
* @consumer: the regulator consumer for the charger.
|
||||
* @externally_control:
|
||||
* Set if the charger-manager cannot control charger,
|
||||
* the charger will be maintained with disabled state.
|
||||
* @cables:
|
||||
* the array of charger cables to enable/disable charger
|
||||
* and set current limit according to constratint data of
|
||||
* struct charger_cable if only charger cable included
|
||||
* in the array of charger cables is attached/detached.
|
||||
* @num_cables: the number of charger cables.
|
||||
* @attr_g: Attribute group for the charger(regulator)
|
||||
* @attr_name: "name" sysfs entry
|
||||
* @attr_state: "state" sysfs entry
|
||||
* @attr_externally_control: "externally_control" sysfs entry
|
||||
* @attrs: Arrays pointing to attr_name/state/externally_control for attr_g
|
||||
*/
|
||||
struct charger_regulator {
|
||||
/* The name of regulator for charging */
|
||||
const char *regulator_name;
|
||||
struct regulator *consumer;
|
||||
|
||||
/* charger never on when system is on */
|
||||
int externally_control;
|
||||
|
||||
/*
|
||||
* Store constraint information related to current limit,
|
||||
* each cable have different condition for charging.
|
||||
*/
|
||||
struct charger_cable *cables;
|
||||
int num_cables;
|
||||
|
||||
struct attribute_group attr_g;
|
||||
struct device_attribute attr_name;
|
||||
struct device_attribute attr_state;
|
||||
struct device_attribute attr_externally_control;
|
||||
struct attribute *attrs[4];
|
||||
|
||||
struct charger_manager *cm;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -140,7 +159,11 @@ struct charger_regulator {
|
|||
* If it has dropped more than fullbatt_vchkdrop_uV after
|
||||
* fullbatt_vchkdrop_ms, CM will restart charging.
|
||||
* @fullbatt_uV: voltage in microvolt
|
||||
* If it is not being charged and VBATT >= fullbatt_uV,
|
||||
* If VBATT >= fullbatt_uV, it is assumed to be full.
|
||||
* @fullbatt_soc: state of Charge in %
|
||||
* If state of Charge >= fullbatt_soc, it is assumed to be full.
|
||||
* @fullbatt_full_capacity: full capacity measure
|
||||
* If full capacity of battery >= fullbatt_full_capacity,
|
||||
* it is assumed to be full.
|
||||
* @polling_interval_ms: interval in millisecond at which
|
||||
* charger manager will monitor battery health
|
||||
|
|
@ -148,7 +171,7 @@ struct charger_regulator {
|
|||
* Specify where information for existance of battery can be obtained
|
||||
* @psy_charger_stat: the names of power-supply for chargers
|
||||
* @num_charger_regulator: the number of entries in charger_regulators
|
||||
* @charger_regulators: array of regulator_bulk_data for chargers
|
||||
* @charger_regulators: array of charger regulators
|
||||
* @psy_fuel_gauge: the name of power-supply for fuel gauge
|
||||
* @temperature_out_of_range:
|
||||
* Determine whether the status is overheat or cold or normal.
|
||||
|
|
@ -158,6 +181,13 @@ struct charger_regulator {
|
|||
* @measure_battery_temp:
|
||||
* true: measure battery temperature
|
||||
* false: measure ambient temperature
|
||||
* @charging_max_duration_ms: Maximum possible duration for charging
|
||||
* If whole charging duration exceed 'charging_max_duration_ms',
|
||||
* cm stop charging.
|
||||
* @discharging_max_duration_ms:
|
||||
* Maximum possible duration for discharging with charger cable
|
||||
* after full-batt. If discharging duration exceed 'discharging
|
||||
* max_duration_ms', cm start charging.
|
||||
*/
|
||||
struct charger_desc {
|
||||
char *psy_name;
|
||||
|
|
@ -168,6 +198,8 @@ struct charger_desc {
|
|||
unsigned int fullbatt_vchkdrop_ms;
|
||||
unsigned int fullbatt_vchkdrop_uV;
|
||||
unsigned int fullbatt_uV;
|
||||
unsigned int fullbatt_soc;
|
||||
unsigned int fullbatt_full_capacity;
|
||||
|
||||
enum data_source battery_present;
|
||||
|
||||
|
|
@ -180,6 +212,9 @@ struct charger_desc {
|
|||
|
||||
int (*temperature_out_of_range)(int *mC);
|
||||
bool measure_battery_temp;
|
||||
|
||||
u64 charging_max_duration_ms;
|
||||
u64 discharging_max_duration_ms;
|
||||
};
|
||||
|
||||
#define PSY_NAME_MAX 30
|
||||
|
|
@ -194,8 +229,6 @@ struct charger_desc {
|
|||
* @charger_enabled: the state of charger
|
||||
* @fullbatt_vchk_jiffies_at:
|
||||
* jiffies at the time full battery check will occur.
|
||||
* @fullbatt_vchk_uV: voltage in microvolt
|
||||
* criteria for full battery
|
||||
* @fullbatt_vchk_work: work queue for full battery check
|
||||
* @emergency_stop:
|
||||
* When setting true, stop charging
|
||||
|
|
@ -206,6 +239,8 @@ struct charger_desc {
|
|||
* saved status of external power before entering suspend-to-RAM
|
||||
* @status_save_batt:
|
||||
* saved status of battery before entering suspend-to-RAM
|
||||
* @charging_start_time: saved start time of enabling charging
|
||||
* @charging_end_time: saved end time of disabling charging
|
||||
*/
|
||||
struct charger_manager {
|
||||
struct list_head entry;
|
||||
|
|
@ -218,7 +253,6 @@ struct charger_manager {
|
|||
bool charger_enabled;
|
||||
|
||||
unsigned long fullbatt_vchk_jiffies_at;
|
||||
unsigned int fullbatt_vchk_uV;
|
||||
struct delayed_work fullbatt_vchk_work;
|
||||
|
||||
int emergency_stop;
|
||||
|
|
@ -229,6 +263,9 @@ struct charger_manager {
|
|||
|
||||
bool status_save_ext_pwr_inserted;
|
||||
bool status_save_batt;
|
||||
|
||||
u64 charging_start_time;
|
||||
u64 charging_end_time;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_CHARGER_MANAGER
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ enum power_supply_property {
|
|||
POWER_SUPPLY_PROP_HEALTH,
|
||||
POWER_SUPPLY_PROP_PRESENT,
|
||||
POWER_SUPPLY_PROP_ONLINE,
|
||||
POWER_SUPPLY_PROP_AUTHENTIC,
|
||||
POWER_SUPPLY_PROP_TECHNOLOGY,
|
||||
POWER_SUPPLY_PROP_CYCLE_COUNT,
|
||||
POWER_SUPPLY_PROP_VOLTAGE_MAX,
|
||||
|
|
@ -110,7 +111,9 @@ enum power_supply_property {
|
|||
POWER_SUPPLY_PROP_CHARGE_AVG,
|
||||
POWER_SUPPLY_PROP_CHARGE_COUNTER,
|
||||
POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT,
|
||||
POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX,
|
||||
POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE,
|
||||
POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX,
|
||||
POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
|
||||
POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN,
|
||||
POWER_SUPPLY_PROP_ENERGY_FULL,
|
||||
|
|
@ -248,6 +251,7 @@ static inline bool power_supply_is_amp_property(enum power_supply_property psp)
|
|||
case POWER_SUPPLY_PROP_CHARGE_AVG:
|
||||
case POWER_SUPPLY_PROP_CHARGE_COUNTER:
|
||||
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT:
|
||||
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX:
|
||||
case POWER_SUPPLY_PROP_CURRENT_MAX:
|
||||
case POWER_SUPPLY_PROP_CURRENT_NOW:
|
||||
case POWER_SUPPLY_PROP_CURRENT_AVG:
|
||||
|
|
@ -276,6 +280,7 @@ static inline bool power_supply_is_watt_property(enum power_supply_property psp)
|
|||
case POWER_SUPPLY_PROP_VOLTAGE_AVG:
|
||||
case POWER_SUPPLY_PROP_VOLTAGE_OCV:
|
||||
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE:
|
||||
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX:
|
||||
case POWER_SUPPLY_PROP_POWER_NOW:
|
||||
return 1;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -1,120 +0,0 @@
|
|||
#ifndef _LINUX_PRIO_TREE_H
|
||||
#define _LINUX_PRIO_TREE_H
|
||||
|
||||
/*
|
||||
* K&R 2nd ed. A8.3 somewhat obliquely hints that initial sequences of struct
|
||||
* fields with identical types should end up at the same location. We'll use
|
||||
* this until we can scrap struct raw_prio_tree_node.
|
||||
*
|
||||
* Note: all this could be done more elegantly by using unnamed union/struct
|
||||
* fields. However, gcc 2.95.3 and apparently also gcc 3.0.4 don't support this
|
||||
* language extension.
|
||||
*/
|
||||
|
||||
struct raw_prio_tree_node {
|
||||
struct prio_tree_node *left;
|
||||
struct prio_tree_node *right;
|
||||
struct prio_tree_node *parent;
|
||||
};
|
||||
|
||||
struct prio_tree_node {
|
||||
struct prio_tree_node *left;
|
||||
struct prio_tree_node *right;
|
||||
struct prio_tree_node *parent;
|
||||
unsigned long start;
|
||||
unsigned long last; /* last location _in_ interval */
|
||||
};
|
||||
|
||||
struct prio_tree_root {
|
||||
struct prio_tree_node *prio_tree_node;
|
||||
unsigned short index_bits;
|
||||
unsigned short raw;
|
||||
/*
|
||||
* 0: nodes are of type struct prio_tree_node
|
||||
* 1: nodes are of type raw_prio_tree_node
|
||||
*/
|
||||
};
|
||||
|
||||
struct prio_tree_iter {
|
||||
struct prio_tree_node *cur;
|
||||
unsigned long mask;
|
||||
unsigned long value;
|
||||
int size_level;
|
||||
|
||||
struct prio_tree_root *root;
|
||||
pgoff_t r_index;
|
||||
pgoff_t h_index;
|
||||
};
|
||||
|
||||
static inline void prio_tree_iter_init(struct prio_tree_iter *iter,
|
||||
struct prio_tree_root *root, pgoff_t r_index, pgoff_t h_index)
|
||||
{
|
||||
iter->root = root;
|
||||
iter->r_index = r_index;
|
||||
iter->h_index = h_index;
|
||||
iter->cur = NULL;
|
||||
}
|
||||
|
||||
#define __INIT_PRIO_TREE_ROOT(ptr, _raw) \
|
||||
do { \
|
||||
(ptr)->prio_tree_node = NULL; \
|
||||
(ptr)->index_bits = 1; \
|
||||
(ptr)->raw = (_raw); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_PRIO_TREE_ROOT(ptr) __INIT_PRIO_TREE_ROOT(ptr, 0)
|
||||
#define INIT_RAW_PRIO_TREE_ROOT(ptr) __INIT_PRIO_TREE_ROOT(ptr, 1)
|
||||
|
||||
#define INIT_PRIO_TREE_NODE(ptr) \
|
||||
do { \
|
||||
(ptr)->left = (ptr)->right = (ptr)->parent = (ptr); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_PRIO_TREE_ITER(ptr) \
|
||||
do { \
|
||||
(ptr)->cur = NULL; \
|
||||
(ptr)->mask = 0UL; \
|
||||
(ptr)->value = 0UL; \
|
||||
(ptr)->size_level = 0; \
|
||||
} while (0)
|
||||
|
||||
#define prio_tree_entry(ptr, type, member) \
|
||||
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
|
||||
|
||||
static inline int prio_tree_empty(const struct prio_tree_root *root)
|
||||
{
|
||||
return root->prio_tree_node == NULL;
|
||||
}
|
||||
|
||||
static inline int prio_tree_root(const struct prio_tree_node *node)
|
||||
{
|
||||
return node->parent == node;
|
||||
}
|
||||
|
||||
static inline int prio_tree_left_empty(const struct prio_tree_node *node)
|
||||
{
|
||||
return node->left == node;
|
||||
}
|
||||
|
||||
static inline int prio_tree_right_empty(const struct prio_tree_node *node)
|
||||
{
|
||||
return node->right == node;
|
||||
}
|
||||
|
||||
|
||||
struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root,
|
||||
struct prio_tree_node *old, struct prio_tree_node *node);
|
||||
struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root,
|
||||
struct prio_tree_node *node);
|
||||
void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node);
|
||||
struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter);
|
||||
|
||||
#define raw_prio_tree_replace(root, old, node) \
|
||||
prio_tree_replace(root, (struct prio_tree_node *) (old), \
|
||||
(struct prio_tree_node *) (node))
|
||||
#define raw_prio_tree_insert(root, node) \
|
||||
prio_tree_insert(root, (struct prio_tree_node *) (node))
|
||||
#define raw_prio_tree_remove(root, node) \
|
||||
prio_tree_remove(root, (struct prio_tree_node *) (node))
|
||||
|
||||
#endif /* _LINUX_PRIO_TREE_H */
|
||||
|
|
@ -64,14 +64,6 @@ struct pstore_info {
|
|||
void *data;
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_PSTORE_FTRACE
|
||||
extern void pstore_ftrace_call(unsigned long ip, unsigned long parent_ip);
|
||||
#else
|
||||
static inline void pstore_ftrace_call(unsigned long ip, unsigned long parent_ip)
|
||||
{ }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSTORE
|
||||
extern int pstore_register(struct pstore_info *);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -23,72 +23,7 @@
|
|||
I know it's not the cleaner way, but in C (not in C++) to get
|
||||
performances and genericity...
|
||||
|
||||
Some example of insert and search follows here. The search is a plain
|
||||
normal search over an ordered tree. The insert instead must be implemented
|
||||
in two steps: First, the code must insert the element in order as a red leaf
|
||||
in the tree, and then the support library function rb_insert_color() must
|
||||
be called. Such function will do the not trivial work to rebalance the
|
||||
rbtree, if necessary.
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
static inline struct page * rb_search_page_cache(struct inode * inode,
|
||||
unsigned long offset)
|
||||
{
|
||||
struct rb_node * n = inode->i_rb_page_cache.rb_node;
|
||||
struct page * page;
|
||||
|
||||
while (n)
|
||||
{
|
||||
page = rb_entry(n, struct page, rb_page_cache);
|
||||
|
||||
if (offset < page->offset)
|
||||
n = n->rb_left;
|
||||
else if (offset > page->offset)
|
||||
n = n->rb_right;
|
||||
else
|
||||
return page;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct page * __rb_insert_page_cache(struct inode * inode,
|
||||
unsigned long offset,
|
||||
struct rb_node * node)
|
||||
{
|
||||
struct rb_node ** p = &inode->i_rb_page_cache.rb_node;
|
||||
struct rb_node * parent = NULL;
|
||||
struct page * page;
|
||||
|
||||
while (*p)
|
||||
{
|
||||
parent = *p;
|
||||
page = rb_entry(parent, struct page, rb_page_cache);
|
||||
|
||||
if (offset < page->offset)
|
||||
p = &(*p)->rb_left;
|
||||
else if (offset > page->offset)
|
||||
p = &(*p)->rb_right;
|
||||
else
|
||||
return page;
|
||||
}
|
||||
|
||||
rb_link_node(node, parent, p);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct page * rb_insert_page_cache(struct inode * inode,
|
||||
unsigned long offset,
|
||||
struct rb_node * node)
|
||||
{
|
||||
struct page * ret;
|
||||
if ((ret = __rb_insert_page_cache(inode, offset, node)))
|
||||
goto out;
|
||||
rb_insert_color(node, &inode->i_rb_page_cache);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
-----------------------------------------------------------------------
|
||||
See Documentation/rbtree.txt for documentation and samples.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_RBTREE_H
|
||||
|
|
@ -97,63 +32,35 @@ static inline struct page * rb_insert_page_cache(struct inode * inode,
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/stddef.h>
|
||||
|
||||
struct rb_node
|
||||
{
|
||||
unsigned long rb_parent_color;
|
||||
#define RB_RED 0
|
||||
#define RB_BLACK 1
|
||||
struct rb_node {
|
||||
unsigned long __rb_parent_color;
|
||||
struct rb_node *rb_right;
|
||||
struct rb_node *rb_left;
|
||||
} __attribute__((aligned(sizeof(long))));
|
||||
/* The alignment might seem pointless, but allegedly CRIS needs it */
|
||||
|
||||
struct rb_root
|
||||
{
|
||||
struct rb_root {
|
||||
struct rb_node *rb_node;
|
||||
};
|
||||
|
||||
|
||||
#define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
|
||||
#define rb_color(r) ((r)->rb_parent_color & 1)
|
||||
#define rb_is_red(r) (!rb_color(r))
|
||||
#define rb_is_black(r) rb_color(r)
|
||||
#define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0)
|
||||
#define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0)
|
||||
|
||||
static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
|
||||
{
|
||||
rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
|
||||
}
|
||||
static inline void rb_set_color(struct rb_node *rb, int color)
|
||||
{
|
||||
rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
|
||||
}
|
||||
#define rb_parent(r) ((struct rb_node *)((r)->__rb_parent_color & ~3))
|
||||
|
||||
#define RB_ROOT (struct rb_root) { NULL, }
|
||||
#define rb_entry(ptr, type, member) container_of(ptr, type, member)
|
||||
|
||||
#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
|
||||
#define RB_EMPTY_NODE(node) (rb_parent(node) == node)
|
||||
#define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
|
||||
#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
|
||||
|
||||
/* 'empty' nodes are nodes that are known not to be inserted in an rbree */
|
||||
#define RB_EMPTY_NODE(node) \
|
||||
((node)->__rb_parent_color == (unsigned long)(node))
|
||||
#define RB_CLEAR_NODE(node) \
|
||||
((node)->__rb_parent_color = (unsigned long)(node))
|
||||
|
||||
static inline void rb_init_node(struct rb_node *rb)
|
||||
{
|
||||
rb->rb_parent_color = 0;
|
||||
rb->rb_right = NULL;
|
||||
rb->rb_left = NULL;
|
||||
RB_CLEAR_NODE(rb);
|
||||
}
|
||||
|
||||
extern void rb_insert_color(struct rb_node *, struct rb_root *);
|
||||
extern void rb_erase(struct rb_node *, struct rb_root *);
|
||||
|
||||
typedef void (*rb_augment_f)(struct rb_node *node, void *data);
|
||||
|
||||
extern void rb_augment_insert(struct rb_node *node,
|
||||
rb_augment_f func, void *data);
|
||||
extern struct rb_node *rb_augment_erase_begin(struct rb_node *node);
|
||||
extern void rb_augment_erase_end(struct rb_node *node,
|
||||
rb_augment_f func, void *data);
|
||||
|
||||
/* Find logical next and previous nodes in a tree */
|
||||
extern struct rb_node *rb_next(const struct rb_node *);
|
||||
|
|
@ -168,7 +75,7 @@ extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
|
|||
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
|
||||
struct rb_node ** rb_link)
|
||||
{
|
||||
node->rb_parent_color = (unsigned long )parent;
|
||||
node->__rb_parent_color = (unsigned long)parent;
|
||||
node->rb_left = node->rb_right = NULL;
|
||||
|
||||
*rb_link = node;
|
||||
|
|
|
|||
223
include/linux/rbtree_augmented.h
Normal file
223
include/linux/rbtree_augmented.h
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
/*
|
||||
Red Black Trees
|
||||
(C) 1999 Andrea Arcangeli <andrea@suse.de>
|
||||
(C) 2002 David Woodhouse <dwmw2@infradead.org>
|
||||
(C) 2012 Michel Lespinasse <walken@google.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
linux/include/linux/rbtree_augmented.h
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_RBTREE_AUGMENTED_H
|
||||
#define _LINUX_RBTREE_AUGMENTED_H
|
||||
|
||||
#include <linux/rbtree.h>
|
||||
|
||||
/*
|
||||
* Please note - only struct rb_augment_callbacks and the prototypes for
|
||||
* rb_insert_augmented() and rb_erase_augmented() are intended to be public.
|
||||
* The rest are implementation details you are not expected to depend on.
|
||||
*
|
||||
* See Documentation/rbtree.txt for documentation and samples.
|
||||
*/
|
||||
|
||||
struct rb_augment_callbacks {
|
||||
void (*propagate)(struct rb_node *node, struct rb_node *stop);
|
||||
void (*copy)(struct rb_node *old, struct rb_node *new);
|
||||
void (*rotate)(struct rb_node *old, struct rb_node *new);
|
||||
};
|
||||
|
||||
extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root,
|
||||
void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
|
||||
static inline void
|
||||
rb_insert_augmented(struct rb_node *node, struct rb_root *root,
|
||||
const struct rb_augment_callbacks *augment)
|
||||
{
|
||||
__rb_insert_augmented(node, root, augment->rotate);
|
||||
}
|
||||
|
||||
#define RB_DECLARE_CALLBACKS(rbstatic, rbname, rbstruct, rbfield, \
|
||||
rbtype, rbaugmented, rbcompute) \
|
||||
static inline void \
|
||||
rbname ## _propagate(struct rb_node *rb, struct rb_node *stop) \
|
||||
{ \
|
||||
while (rb != stop) { \
|
||||
rbstruct *node = rb_entry(rb, rbstruct, rbfield); \
|
||||
rbtype augmented = rbcompute(node); \
|
||||
if (node->rbaugmented == augmented) \
|
||||
break; \
|
||||
node->rbaugmented = augmented; \
|
||||
rb = rb_parent(&node->rbfield); \
|
||||
} \
|
||||
} \
|
||||
static inline void \
|
||||
rbname ## _copy(struct rb_node *rb_old, struct rb_node *rb_new) \
|
||||
{ \
|
||||
rbstruct *old = rb_entry(rb_old, rbstruct, rbfield); \
|
||||
rbstruct *new = rb_entry(rb_new, rbstruct, rbfield); \
|
||||
new->rbaugmented = old->rbaugmented; \
|
||||
} \
|
||||
static void \
|
||||
rbname ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new) \
|
||||
{ \
|
||||
rbstruct *old = rb_entry(rb_old, rbstruct, rbfield); \
|
||||
rbstruct *new = rb_entry(rb_new, rbstruct, rbfield); \
|
||||
new->rbaugmented = old->rbaugmented; \
|
||||
old->rbaugmented = rbcompute(old); \
|
||||
} \
|
||||
rbstatic const struct rb_augment_callbacks rbname = { \
|
||||
rbname ## _propagate, rbname ## _copy, rbname ## _rotate \
|
||||
};
|
||||
|
||||
|
||||
#define RB_RED 0
|
||||
#define RB_BLACK 1
|
||||
|
||||
#define __rb_parent(pc) ((struct rb_node *)(pc & ~3))
|
||||
|
||||
#define __rb_color(pc) ((pc) & 1)
|
||||
#define __rb_is_black(pc) __rb_color(pc)
|
||||
#define __rb_is_red(pc) (!__rb_color(pc))
|
||||
#define rb_color(rb) __rb_color((rb)->__rb_parent_color)
|
||||
#define rb_is_red(rb) __rb_is_red((rb)->__rb_parent_color)
|
||||
#define rb_is_black(rb) __rb_is_black((rb)->__rb_parent_color)
|
||||
|
||||
static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
|
||||
{
|
||||
rb->__rb_parent_color = rb_color(rb) | (unsigned long)p;
|
||||
}
|
||||
|
||||
static inline void rb_set_parent_color(struct rb_node *rb,
|
||||
struct rb_node *p, int color)
|
||||
{
|
||||
rb->__rb_parent_color = (unsigned long)p | color;
|
||||
}
|
||||
|
||||
static inline void
|
||||
__rb_change_child(struct rb_node *old, struct rb_node *new,
|
||||
struct rb_node *parent, struct rb_root *root)
|
||||
{
|
||||
if (parent) {
|
||||
if (parent->rb_left == old)
|
||||
parent->rb_left = new;
|
||||
else
|
||||
parent->rb_right = new;
|
||||
} else
|
||||
root->rb_node = new;
|
||||
}
|
||||
|
||||
extern void __rb_erase_color(struct rb_node *parent, struct rb_root *root,
|
||||
void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
|
||||
|
||||
static __always_inline void
|
||||
rb_erase_augmented(struct rb_node *node, struct rb_root *root,
|
||||
const struct rb_augment_callbacks *augment)
|
||||
{
|
||||
struct rb_node *child = node->rb_right, *tmp = node->rb_left;
|
||||
struct rb_node *parent, *rebalance;
|
||||
unsigned long pc;
|
||||
|
||||
if (!tmp) {
|
||||
/*
|
||||
* Case 1: node to erase has no more than 1 child (easy!)
|
||||
*
|
||||
* Note that if there is one child it must be red due to 5)
|
||||
* and node must be black due to 4). We adjust colors locally
|
||||
* so as to bypass __rb_erase_color() later on.
|
||||
*/
|
||||
pc = node->__rb_parent_color;
|
||||
parent = __rb_parent(pc);
|
||||
__rb_change_child(node, child, parent, root);
|
||||
if (child) {
|
||||
child->__rb_parent_color = pc;
|
||||
rebalance = NULL;
|
||||
} else
|
||||
rebalance = __rb_is_black(pc) ? parent : NULL;
|
||||
tmp = parent;
|
||||
} else if (!child) {
|
||||
/* Still case 1, but this time the child is node->rb_left */
|
||||
tmp->__rb_parent_color = pc = node->__rb_parent_color;
|
||||
parent = __rb_parent(pc);
|
||||
__rb_change_child(node, tmp, parent, root);
|
||||
rebalance = NULL;
|
||||
tmp = parent;
|
||||
} else {
|
||||
struct rb_node *successor = child, *child2;
|
||||
tmp = child->rb_left;
|
||||
if (!tmp) {
|
||||
/*
|
||||
* Case 2: node's successor is its right child
|
||||
*
|
||||
* (n) (s)
|
||||
* / \ / \
|
||||
* (x) (s) -> (x) (c)
|
||||
* \
|
||||
* (c)
|
||||
*/
|
||||
parent = successor;
|
||||
child2 = successor->rb_right;
|
||||
augment->copy(node, successor);
|
||||
} else {
|
||||
/*
|
||||
* Case 3: node's successor is leftmost under
|
||||
* node's right child subtree
|
||||
*
|
||||
* (n) (s)
|
||||
* / \ / \
|
||||
* (x) (y) -> (x) (y)
|
||||
* / /
|
||||
* (p) (p)
|
||||
* / /
|
||||
* (s) (c)
|
||||
* \
|
||||
* (c)
|
||||
*/
|
||||
do {
|
||||
parent = successor;
|
||||
successor = tmp;
|
||||
tmp = tmp->rb_left;
|
||||
} while (tmp);
|
||||
parent->rb_left = child2 = successor->rb_right;
|
||||
successor->rb_right = child;
|
||||
rb_set_parent(child, successor);
|
||||
augment->copy(node, successor);
|
||||
augment->propagate(parent, successor);
|
||||
}
|
||||
|
||||
successor->rb_left = tmp = node->rb_left;
|
||||
rb_set_parent(tmp, successor);
|
||||
|
||||
pc = node->__rb_parent_color;
|
||||
tmp = __rb_parent(pc);
|
||||
__rb_change_child(node, successor, tmp, root);
|
||||
if (child2) {
|
||||
successor->__rb_parent_color = pc;
|
||||
rb_set_parent_color(child2, parent, RB_BLACK);
|
||||
rebalance = NULL;
|
||||
} else {
|
||||
unsigned long pc2 = successor->__rb_parent_color;
|
||||
successor->__rb_parent_color = pc;
|
||||
rebalance = __rb_is_black(pc2) ? parent : NULL;
|
||||
}
|
||||
tmp = successor;
|
||||
}
|
||||
|
||||
augment->propagate(tmp, NULL);
|
||||
if (rebalance)
|
||||
__rb_erase_color(rebalance, root, augment->rotate);
|
||||
}
|
||||
|
||||
#endif /* _LINUX_RBTREE_AUGMENTED_H */
|
||||
|
|
@ -37,14 +37,14 @@ struct anon_vma {
|
|||
atomic_t refcount;
|
||||
|
||||
/*
|
||||
* NOTE: the LSB of the head.next is set by
|
||||
* NOTE: the LSB of the rb_root.rb_node is set by
|
||||
* mm_take_all_locks() _after_ taking the above lock. So the
|
||||
* head must only be read/written after taking the above lock
|
||||
* rb_root must only be read/written after taking the above lock
|
||||
* to be sure to see a valid next pointer. The LSB bit itself
|
||||
* is serialized by a system wide lock only visible to
|
||||
* mm_take_all_locks() (mm_all_locks_mutex).
|
||||
*/
|
||||
struct list_head head; /* Chain of private "related" vmas */
|
||||
struct rb_root rb_root; /* Interval tree of private "related" vmas */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -57,14 +57,29 @@ struct anon_vma {
|
|||
* with a VMA, or the VMAs associated with an anon_vma.
|
||||
* The "same_vma" list contains the anon_vma_chains linking
|
||||
* all the anon_vmas associated with this VMA.
|
||||
* The "same_anon_vma" list contains the anon_vma_chains
|
||||
* The "rb" field indexes on an interval tree the anon_vma_chains
|
||||
* which link all the VMAs associated with this anon_vma.
|
||||
*/
|
||||
struct anon_vma_chain {
|
||||
struct vm_area_struct *vma;
|
||||
struct anon_vma *anon_vma;
|
||||
struct list_head same_vma; /* locked by mmap_sem & page_table_lock */
|
||||
struct list_head same_anon_vma; /* locked by anon_vma->mutex */
|
||||
struct rb_node rb; /* locked by anon_vma->mutex */
|
||||
unsigned long rb_subtree_last;
|
||||
#ifdef CONFIG_DEBUG_VM_RB
|
||||
unsigned long cached_vma_start, cached_vma_last;
|
||||
#endif
|
||||
};
|
||||
|
||||
enum ttu_flags {
|
||||
TTU_UNMAP = 0, /* unmap mode */
|
||||
TTU_MIGRATION = 1, /* migration mode */
|
||||
TTU_MUNLOCK = 2, /* munlock mode */
|
||||
TTU_ACTION_MASK = 0xff,
|
||||
|
||||
TTU_IGNORE_MLOCK = (1 << 8), /* ignore mlock */
|
||||
TTU_IGNORE_ACCESS = (1 << 9), /* don't age */
|
||||
TTU_IGNORE_HWPOISON = (1 << 10),/* corrupted page is recoverable */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
|
@ -120,7 +135,6 @@ void anon_vma_init(void); /* create anon_vma_cachep */
|
|||
int anon_vma_prepare(struct vm_area_struct *);
|
||||
void unlink_anon_vmas(struct vm_area_struct *);
|
||||
int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *);
|
||||
void anon_vma_moveto_tail(struct vm_area_struct *);
|
||||
int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *);
|
||||
|
||||
static inline void anon_vma_merge(struct vm_area_struct *vma,
|
||||
|
|
@ -161,16 +175,6 @@ int page_referenced(struct page *, int is_locked,
|
|||
int page_referenced_one(struct page *, struct vm_area_struct *,
|
||||
unsigned long address, unsigned int *mapcount, unsigned long *vm_flags);
|
||||
|
||||
enum ttu_flags {
|
||||
TTU_UNMAP = 0, /* unmap mode */
|
||||
TTU_MIGRATION = 1, /* migration mode */
|
||||
TTU_MUNLOCK = 2, /* munlock mode */
|
||||
TTU_ACTION_MASK = 0xff,
|
||||
|
||||
TTU_IGNORE_MLOCK = (1 << 8), /* ignore mlock */
|
||||
TTU_IGNORE_ACCESS = (1 << 9), /* don't age */
|
||||
TTU_IGNORE_HWPOISON = (1 << 10),/* corrupted page is recoverable */
|
||||
};
|
||||
#define TTU_ACTION(x) ((x) & TTU_ACTION_MASK)
|
||||
|
||||
int try_to_unmap(struct page *, enum ttu_flags flags);
|
||||
|
|
|
|||
|
|
@ -671,7 +671,6 @@ struct signal_struct {
|
|||
struct rw_semaphore group_rwsem;
|
||||
#endif
|
||||
|
||||
int oom_adj; /* OOM kill score adjustment (bit shift) */
|
||||
int oom_score_adj; /* OOM kill score adjustment */
|
||||
int oom_score_adj_min; /* OOM kill score adjustment minimum value.
|
||||
* Only settable by CAP_SYS_RESOURCE. */
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
|
|||
}
|
||||
#endif
|
||||
|
||||
extern int page_evictable(struct page *page, struct vm_area_struct *vma);
|
||||
extern int page_evictable(struct page *page);
|
||||
extern void check_move_unevictable_pages(struct page **, int nr_pages);
|
||||
|
||||
extern unsigned long scan_unevictable_pages;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head)
|
|||
|
||||
static inline void timerqueue_init(struct timerqueue_node *node)
|
||||
{
|
||||
rb_init_node(&node->node);
|
||||
RB_CLEAR_NODE(&node->node);
|
||||
}
|
||||
|
||||
static inline void timerqueue_init_head(struct timerqueue_head *head)
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@
|
|||
/* Backward compatibility target definitions --- to be removed. */
|
||||
#define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP
|
||||
#define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE
|
||||
#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL \
|
||||
V4L2_SEL_TGT_CROP
|
||||
#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL \
|
||||
V4L2_SEL_TGT_COMPOSE
|
||||
#define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP
|
||||
#define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE
|
||||
#define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS
|
||||
#define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS
|
||||
|
||||
/* Selection flags */
|
||||
#define V4L2_SEL_FLAG_GE (1 << 0)
|
||||
|
|
|
|||
761
include/linux/v4l2-controls.h
Normal file
761
include/linux/v4l2-controls.h
Normal file
|
|
@ -0,0 +1,761 @@
|
|||
/*
|
||||
* Video for Linux Two controls header file
|
||||
*
|
||||
* Copyright (C) 1999-2012 the contributors
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Alternatively you can redistribute this file under the terms of the
|
||||
* BSD license as stated below:
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. 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.
|
||||
* 3. The names of its contributors may not 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 AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE 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.
|
||||
*
|
||||
* The contents of this header was split off from videodev2.h. All control
|
||||
* definitions should be added to this header, which is included by
|
||||
* videodev2.h.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_V4L2_CONTROLS_H
|
||||
#define __LINUX_V4L2_CONTROLS_H
|
||||
|
||||
/* Control classes */
|
||||
#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
|
||||
#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
|
||||
#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */
|
||||
#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */
|
||||
#define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */
|
||||
#define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */
|
||||
#define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */
|
||||
#define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */
|
||||
#define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */
|
||||
|
||||
/* User-class control IDs */
|
||||
|
||||
#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
|
||||
#define V4L2_CID_USER_BASE V4L2_CID_BASE
|
||||
#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1)
|
||||
#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
|
||||
#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
|
||||
#define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
|
||||
#define V4L2_CID_HUE (V4L2_CID_BASE+3)
|
||||
#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
|
||||
#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
|
||||
#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
|
||||
#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
|
||||
#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
|
||||
#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
|
||||
#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */
|
||||
#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
|
||||
#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
|
||||
#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
|
||||
#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
|
||||
#define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
|
||||
#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */
|
||||
#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
|
||||
#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
|
||||
#define V4L2_CID_GAIN (V4L2_CID_BASE+19)
|
||||
#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
|
||||
#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
|
||||
|
||||
/* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
|
||||
#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
|
||||
#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
|
||||
|
||||
#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
|
||||
enum v4l2_power_line_frequency {
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3,
|
||||
};
|
||||
#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25)
|
||||
#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
|
||||
#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
|
||||
#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
|
||||
#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
|
||||
#define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30)
|
||||
#define V4L2_CID_COLORFX (V4L2_CID_BASE+31)
|
||||
enum v4l2_colorfx {
|
||||
V4L2_COLORFX_NONE = 0,
|
||||
V4L2_COLORFX_BW = 1,
|
||||
V4L2_COLORFX_SEPIA = 2,
|
||||
V4L2_COLORFX_NEGATIVE = 3,
|
||||
V4L2_COLORFX_EMBOSS = 4,
|
||||
V4L2_COLORFX_SKETCH = 5,
|
||||
V4L2_COLORFX_SKY_BLUE = 6,
|
||||
V4L2_COLORFX_GRASS_GREEN = 7,
|
||||
V4L2_COLORFX_SKIN_WHITEN = 8,
|
||||
V4L2_COLORFX_VIVID = 9,
|
||||
V4L2_COLORFX_AQUA = 10,
|
||||
V4L2_COLORFX_ART_FREEZE = 11,
|
||||
V4L2_COLORFX_SILHOUETTE = 12,
|
||||
V4L2_COLORFX_SOLARIZATION = 13,
|
||||
V4L2_COLORFX_ANTIQUE = 14,
|
||||
V4L2_COLORFX_SET_CBCR = 15,
|
||||
};
|
||||
#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
|
||||
#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
|
||||
|
||||
#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
|
||||
#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
|
||||
|
||||
#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36)
|
||||
|
||||
#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37)
|
||||
#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38)
|
||||
|
||||
#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39)
|
||||
#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40)
|
||||
|
||||
#define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41)
|
||||
#define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42)
|
||||
|
||||
/* last CID + 1 */
|
||||
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+43)
|
||||
|
||||
|
||||
/* MPEG-class control IDs */
|
||||
|
||||
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
|
||||
#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1)
|
||||
|
||||
/* MPEG streams, specific to multiplexed streams */
|
||||
#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0)
|
||||
enum v4l2_mpeg_stream_type {
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
|
||||
};
|
||||
#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1)
|
||||
#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2)
|
||||
#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3)
|
||||
#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4)
|
||||
#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5)
|
||||
#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6)
|
||||
#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7)
|
||||
enum v4l2_mpeg_stream_vbi_fmt {
|
||||
V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */
|
||||
V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */
|
||||
};
|
||||
|
||||
/* MPEG audio controls specific to multiplexed streams */
|
||||
#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100)
|
||||
enum v4l2_mpeg_audio_sampling_freq {
|
||||
V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
|
||||
V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
|
||||
V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101)
|
||||
enum v4l2_mpeg_audio_encoding {
|
||||
V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
|
||||
V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
|
||||
V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
|
||||
V4L2_MPEG_AUDIO_ENCODING_AAC = 3,
|
||||
V4L2_MPEG_AUDIO_ENCODING_AC3 = 4,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102)
|
||||
enum v4l2_mpeg_audio_l1_bitrate {
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103)
|
||||
enum v4l2_mpeg_audio_l2_bitrate {
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104)
|
||||
enum v4l2_mpeg_audio_l3_bitrate {
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105)
|
||||
enum v4l2_mpeg_audio_mode {
|
||||
V4L2_MPEG_AUDIO_MODE_STEREO = 0,
|
||||
V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
|
||||
V4L2_MPEG_AUDIO_MODE_DUAL = 2,
|
||||
V4L2_MPEG_AUDIO_MODE_MONO = 3,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106)
|
||||
enum v4l2_mpeg_audio_mode_extension {
|
||||
V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0,
|
||||
V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1,
|
||||
V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
|
||||
V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107)
|
||||
enum v4l2_mpeg_audio_emphasis {
|
||||
V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0,
|
||||
V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
|
||||
V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108)
|
||||
enum v4l2_mpeg_audio_crc {
|
||||
V4L2_MPEG_AUDIO_CRC_NONE = 0,
|
||||
V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109)
|
||||
#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110)
|
||||
#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111)
|
||||
enum v4l2_mpeg_audio_ac3_bitrate {
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_MPEG_BASE+112)
|
||||
enum v4l2_mpeg_audio_dec_playback {
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113)
|
||||
|
||||
/* MPEG video controls specific to multiplexed streams */
|
||||
#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
|
||||
enum v4l2_mpeg_video_encoding {
|
||||
V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
|
||||
V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1,
|
||||
V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201)
|
||||
enum v4l2_mpeg_video_aspect {
|
||||
V4L2_MPEG_VIDEO_ASPECT_1x1 = 0,
|
||||
V4L2_MPEG_VIDEO_ASPECT_4x3 = 1,
|
||||
V4L2_MPEG_VIDEO_ASPECT_16x9 = 2,
|
||||
V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202)
|
||||
#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203)
|
||||
#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204)
|
||||
#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205)
|
||||
#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206)
|
||||
enum v4l2_mpeg_video_bitrate_mode {
|
||||
V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
|
||||
V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
|
||||
#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
|
||||
#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
|
||||
#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210)
|
||||
#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211)
|
||||
#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_MPEG_BASE+212)
|
||||
#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_MPEG_BASE+213)
|
||||
#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_MPEG_BASE+214)
|
||||
#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_MPEG_BASE+215)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_MPEG_BASE+216)
|
||||
enum v4l2_mpeg_video_header_mode {
|
||||
V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0,
|
||||
V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1,
|
||||
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217)
|
||||
#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218)
|
||||
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219)
|
||||
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220)
|
||||
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221)
|
||||
enum v4l2_mpeg_video_multi_slice_mode {
|
||||
V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0,
|
||||
V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1,
|
||||
V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222)
|
||||
#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223)
|
||||
#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224)
|
||||
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302)
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_MPEG_BASE+303)
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_MPEG_BASE+304)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_MPEG_BASE+350)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_MPEG_BASE+351)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_MPEG_BASE+352)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_MPEG_BASE+353)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_MPEG_BASE+354)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_MPEG_BASE+355)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_MPEG_BASE+356)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_MPEG_BASE+357)
|
||||
enum v4l2_mpeg_video_h264_entropy_mode {
|
||||
V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0,
|
||||
V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_MPEG_BASE+358)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_MPEG_BASE+359)
|
||||
enum v4l2_mpeg_video_h264_level {
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_MPEG_BASE+360)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_MPEG_BASE+361)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE+362)
|
||||
enum v4l2_mpeg_video_h264_loop_filter_mode {
|
||||
V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0,
|
||||
V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1,
|
||||
V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_MPEG_BASE+363)
|
||||
enum v4l2_mpeg_video_h264_profile {
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_MPEG_BASE+364)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_MPEG_BASE+365)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_MPEG_BASE+366)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_MPEG_BASE+367)
|
||||
enum v4l2_mpeg_video_h264_vui_sar_idc {
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_MPEG_BASE+403)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_MPEG_BASE+404)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_MPEG_BASE+405)
|
||||
enum v4l2_mpeg_video_mpeg4_level {
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_MPEG_BASE+406)
|
||||
enum v4l2_mpeg_video_mpeg4_profile {
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0,
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1,
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2,
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3,
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407)
|
||||
|
||||
/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0)
|
||||
enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
|
||||
V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2)
|
||||
enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2,
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3,
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3)
|
||||
enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
|
||||
V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4)
|
||||
enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
|
||||
V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6)
|
||||
enum v4l2_mpeg_cx2341x_video_median_filter_type {
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1,
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2,
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
|
||||
#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11)
|
||||
|
||||
/* MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100)
|
||||
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_MPEG_MFC51_BASE+0)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_MPEG_MFC51_BASE+1)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_MFC51_BASE+2)
|
||||
enum v4l2_mpeg_mfc51_video_frame_skip_mode {
|
||||
V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0,
|
||||
V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1,
|
||||
V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_MPEG_MFC51_BASE+3)
|
||||
enum v4l2_mpeg_mfc51_video_force_frame_type {
|
||||
V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0,
|
||||
V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1,
|
||||
V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_MPEG_MFC51_BASE+4)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_MPEG_MFC51_BASE+5)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_MPEG_MFC51_BASE+6)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_MPEG_MFC51_BASE+7)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_MPEG_MFC51_BASE+50)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_MPEG_MFC51_BASE+51)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_MPEG_MFC51_BASE+52)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54)
|
||||
|
||||
|
||||
/* Camera class control IDs */
|
||||
|
||||
#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
|
||||
#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1)
|
||||
|
||||
#define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1)
|
||||
enum v4l2_exposure_auto_type {
|
||||
V4L2_EXPOSURE_AUTO = 0,
|
||||
V4L2_EXPOSURE_MANUAL = 1,
|
||||
V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
|
||||
V4L2_EXPOSURE_APERTURE_PRIORITY = 3
|
||||
};
|
||||
#define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2)
|
||||
#define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3)
|
||||
|
||||
#define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4)
|
||||
#define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5)
|
||||
#define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6)
|
||||
#define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7)
|
||||
|
||||
#define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8)
|
||||
#define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9)
|
||||
|
||||
#define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10)
|
||||
#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11)
|
||||
#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12)
|
||||
|
||||
#define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13)
|
||||
#define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14)
|
||||
#define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15)
|
||||
|
||||
#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
|
||||
|
||||
#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
|
||||
#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
|
||||
|
||||
#define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE+19)
|
||||
|
||||
#define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (V4L2_CID_CAMERA_CLASS_BASE+20)
|
||||
enum v4l2_auto_n_preset_white_balance {
|
||||
V4L2_WHITE_BALANCE_MANUAL = 0,
|
||||
V4L2_WHITE_BALANCE_AUTO = 1,
|
||||
V4L2_WHITE_BALANCE_INCANDESCENT = 2,
|
||||
V4L2_WHITE_BALANCE_FLUORESCENT = 3,
|
||||
V4L2_WHITE_BALANCE_FLUORESCENT_H = 4,
|
||||
V4L2_WHITE_BALANCE_HORIZON = 5,
|
||||
V4L2_WHITE_BALANCE_DAYLIGHT = 6,
|
||||
V4L2_WHITE_BALANCE_FLASH = 7,
|
||||
V4L2_WHITE_BALANCE_CLOUDY = 8,
|
||||
V4L2_WHITE_BALANCE_SHADE = 9,
|
||||
};
|
||||
|
||||
#define V4L2_CID_WIDE_DYNAMIC_RANGE (V4L2_CID_CAMERA_CLASS_BASE+21)
|
||||
#define V4L2_CID_IMAGE_STABILIZATION (V4L2_CID_CAMERA_CLASS_BASE+22)
|
||||
|
||||
#define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE+23)
|
||||
#define V4L2_CID_ISO_SENSITIVITY_AUTO (V4L2_CID_CAMERA_CLASS_BASE+24)
|
||||
enum v4l2_iso_sensitivity_auto_type {
|
||||
V4L2_ISO_SENSITIVITY_MANUAL = 0,
|
||||
V4L2_ISO_SENSITIVITY_AUTO = 1,
|
||||
};
|
||||
|
||||
#define V4L2_CID_EXPOSURE_METERING (V4L2_CID_CAMERA_CLASS_BASE+25)
|
||||
enum v4l2_exposure_metering {
|
||||
V4L2_EXPOSURE_METERING_AVERAGE = 0,
|
||||
V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1,
|
||||
V4L2_EXPOSURE_METERING_SPOT = 2,
|
||||
};
|
||||
|
||||
#define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26)
|
||||
enum v4l2_scene_mode {
|
||||
V4L2_SCENE_MODE_NONE = 0,
|
||||
V4L2_SCENE_MODE_BACKLIGHT = 1,
|
||||
V4L2_SCENE_MODE_BEACH_SNOW = 2,
|
||||
V4L2_SCENE_MODE_CANDLE_LIGHT = 3,
|
||||
V4L2_SCENE_MODE_DAWN_DUSK = 4,
|
||||
V4L2_SCENE_MODE_FALL_COLORS = 5,
|
||||
V4L2_SCENE_MODE_FIREWORKS = 6,
|
||||
V4L2_SCENE_MODE_LANDSCAPE = 7,
|
||||
V4L2_SCENE_MODE_NIGHT = 8,
|
||||
V4L2_SCENE_MODE_PARTY_INDOOR = 9,
|
||||
V4L2_SCENE_MODE_PORTRAIT = 10,
|
||||
V4L2_SCENE_MODE_SPORTS = 11,
|
||||
V4L2_SCENE_MODE_SUNSET = 12,
|
||||
V4L2_SCENE_MODE_TEXT = 13,
|
||||
};
|
||||
|
||||
#define V4L2_CID_3A_LOCK (V4L2_CID_CAMERA_CLASS_BASE+27)
|
||||
#define V4L2_LOCK_EXPOSURE (1 << 0)
|
||||
#define V4L2_LOCK_WHITE_BALANCE (1 << 1)
|
||||
#define V4L2_LOCK_FOCUS (1 << 2)
|
||||
|
||||
#define V4L2_CID_AUTO_FOCUS_START (V4L2_CID_CAMERA_CLASS_BASE+28)
|
||||
#define V4L2_CID_AUTO_FOCUS_STOP (V4L2_CID_CAMERA_CLASS_BASE+29)
|
||||
#define V4L2_CID_AUTO_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE+30)
|
||||
#define V4L2_AUTO_FOCUS_STATUS_IDLE (0 << 0)
|
||||
#define V4L2_AUTO_FOCUS_STATUS_BUSY (1 << 0)
|
||||
#define V4L2_AUTO_FOCUS_STATUS_REACHED (1 << 1)
|
||||
#define V4L2_AUTO_FOCUS_STATUS_FAILED (1 << 2)
|
||||
|
||||
#define V4L2_CID_AUTO_FOCUS_RANGE (V4L2_CID_CAMERA_CLASS_BASE+31)
|
||||
enum v4l2_auto_focus_range {
|
||||
V4L2_AUTO_FOCUS_RANGE_AUTO = 0,
|
||||
V4L2_AUTO_FOCUS_RANGE_NORMAL = 1,
|
||||
V4L2_AUTO_FOCUS_RANGE_MACRO = 2,
|
||||
V4L2_AUTO_FOCUS_RANGE_INFINITY = 3,
|
||||
};
|
||||
|
||||
|
||||
/* FM Modulator class control IDs */
|
||||
|
||||
#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
|
||||
#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
|
||||
|
||||
#define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1)
|
||||
#define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2)
|
||||
#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3)
|
||||
#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5)
|
||||
#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6)
|
||||
|
||||
#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64)
|
||||
#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65)
|
||||
#define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66)
|
||||
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80)
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81)
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82)
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84)
|
||||
|
||||
#define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96)
|
||||
#define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97)
|
||||
#define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98)
|
||||
|
||||
#define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112)
|
||||
enum v4l2_preemphasis {
|
||||
V4L2_PREEMPHASIS_DISABLED = 0,
|
||||
V4L2_PREEMPHASIS_50_uS = 1,
|
||||
V4L2_PREEMPHASIS_75_uS = 2,
|
||||
};
|
||||
#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113)
|
||||
#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114)
|
||||
|
||||
|
||||
/* Flash and privacy (indicator) light controls */
|
||||
|
||||
#define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900)
|
||||
#define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1)
|
||||
|
||||
#define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1)
|
||||
enum v4l2_flash_led_mode {
|
||||
V4L2_FLASH_LED_MODE_NONE,
|
||||
V4L2_FLASH_LED_MODE_FLASH,
|
||||
V4L2_FLASH_LED_MODE_TORCH,
|
||||
};
|
||||
|
||||
#define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2)
|
||||
enum v4l2_flash_strobe_source {
|
||||
V4L2_FLASH_STROBE_SOURCE_SOFTWARE,
|
||||
V4L2_FLASH_STROBE_SOURCE_EXTERNAL,
|
||||
};
|
||||
|
||||
#define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3)
|
||||
#define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4)
|
||||
#define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5)
|
||||
|
||||
#define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6)
|
||||
#define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7)
|
||||
#define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8)
|
||||
#define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9)
|
||||
|
||||
#define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10)
|
||||
#define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0)
|
||||
#define V4L2_FLASH_FAULT_TIMEOUT (1 << 1)
|
||||
#define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2)
|
||||
#define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3)
|
||||
#define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4)
|
||||
#define V4L2_FLASH_FAULT_INDICATOR (1 << 5)
|
||||
|
||||
#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
|
||||
#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
|
||||
|
||||
|
||||
/* JPEG-class control IDs */
|
||||
|
||||
#define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900)
|
||||
#define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1)
|
||||
|
||||
#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1)
|
||||
enum v4l2_jpeg_chroma_subsampling {
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5,
|
||||
};
|
||||
#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2)
|
||||
#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3)
|
||||
|
||||
#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
|
||||
|
||||
/* Image source controls */
|
||||
#define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900)
|
||||
#define V4L2_CID_IMAGE_SOURCE_CLASS (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1)
|
||||
|
||||
#define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1)
|
||||
#define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2)
|
||||
#define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3)
|
||||
|
||||
|
||||
/* Image processing controls */
|
||||
|
||||
#define V4L2_CID_IMAGE_PROC_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_PROC | 0x900)
|
||||
#define V4L2_CID_IMAGE_PROC_CLASS (V4L2_CTRL_CLASS_IMAGE_PROC | 1)
|
||||
|
||||
#define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1)
|
||||
#define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2)
|
||||
|
||||
#endif
|
||||
|
|
@ -148,6 +148,14 @@ struct v4l2_subdev_selection {
|
|||
__u32 reserved[8];
|
||||
};
|
||||
|
||||
struct v4l2_subdev_edid {
|
||||
__u32 pad;
|
||||
__u32 start_block;
|
||||
__u32 blocks;
|
||||
__u32 reserved[5];
|
||||
__u8 __user *edid;
|
||||
};
|
||||
|
||||
#define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format)
|
||||
#define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format)
|
||||
#define VIDIOC_SUBDEV_G_FRAME_INTERVAL \
|
||||
|
|
@ -166,5 +174,7 @@ struct v4l2_subdev_selection {
|
|||
_IOWR('V', 61, struct v4l2_subdev_selection)
|
||||
#define VIDIOC_SUBDEV_S_SELECTION \
|
||||
_IOWR('V', 62, struct v4l2_subdev_selection)
|
||||
#define VIDIOC_SUBDEV_G_EDID _IOWR('V', 40, struct v4l2_subdev_edid)
|
||||
#define VIDIOC_SUBDEV_S_EDID _IOWR('V', 41, struct v4l2_subdev_edid)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Video for Linux Two header file
|
||||
*
|
||||
* Copyright (C) 1999-2007 the contributors
|
||||
* Copyright (C) 1999-2012 the contributors
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -65,6 +65,7 @@
|
|||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/v4l2-common.h>
|
||||
#include <linux/v4l2-controls.h>
|
||||
|
||||
/*
|
||||
* Common stuff for both V4L1 and V4L2
|
||||
|
|
@ -161,6 +162,7 @@ enum v4l2_buf_type {
|
|||
#endif
|
||||
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
|
||||
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
|
||||
/* Deprecated, do not use */
|
||||
V4L2_BUF_TYPE_PRIVATE = 0x80,
|
||||
};
|
||||
|
||||
|
|
@ -368,6 +370,7 @@ struct v4l2_pix_format {
|
|||
|
||||
/* three non contiguous planes - Y, Cb, Cr */
|
||||
#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
|
||||
#define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */
|
||||
|
||||
/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
|
||||
#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
|
||||
|
|
@ -1188,7 +1191,8 @@ struct v4l2_input {
|
|||
|
||||
/* capabilities flags */
|
||||
#define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
|
||||
#define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
|
||||
#define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
|
||||
#define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */
|
||||
#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */
|
||||
|
||||
/*
|
||||
|
|
@ -1211,7 +1215,8 @@ struct v4l2_output {
|
|||
|
||||
/* capabilities flags */
|
||||
#define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
|
||||
#define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
|
||||
#define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
|
||||
#define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */
|
||||
#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */
|
||||
|
||||
/*
|
||||
|
|
@ -1241,16 +1246,6 @@ struct v4l2_ext_controls {
|
|||
struct v4l2_ext_control *controls;
|
||||
};
|
||||
|
||||
/* Values for ctrl_class field */
|
||||
#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
|
||||
#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
|
||||
#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */
|
||||
#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */
|
||||
#define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */
|
||||
#define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */
|
||||
#define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */
|
||||
#define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */
|
||||
|
||||
#define V4L2_CTRL_ID_MASK (0x0fffffff)
|
||||
#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
|
||||
#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
|
||||
|
|
@ -1306,692 +1301,31 @@ struct v4l2_querymenu {
|
|||
|
||||
/* User-class control IDs defined by V4L2 */
|
||||
#define V4L2_CID_MAX_CTRLS 1024
|
||||
#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
|
||||
#define V4L2_CID_USER_BASE V4L2_CID_BASE
|
||||
/* IDs reserved for driver specific controls */
|
||||
#define V4L2_CID_PRIVATE_BASE 0x08000000
|
||||
|
||||
#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1)
|
||||
#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
|
||||
#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
|
||||
#define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
|
||||
#define V4L2_CID_HUE (V4L2_CID_BASE+3)
|
||||
#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
|
||||
#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
|
||||
#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
|
||||
#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
|
||||
#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
|
||||
#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
|
||||
#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */
|
||||
#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
|
||||
#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
|
||||
#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
|
||||
#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
|
||||
#define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
|
||||
#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */
|
||||
#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
|
||||
#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
|
||||
#define V4L2_CID_GAIN (V4L2_CID_BASE+19)
|
||||
#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
|
||||
#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
|
||||
|
||||
/* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
|
||||
#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
|
||||
#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
|
||||
/* DV-class control IDs defined by V4L2 */
|
||||
#define V4L2_CID_DV_CLASS_BASE (V4L2_CTRL_CLASS_DV | 0x900)
|
||||
#define V4L2_CID_DV_CLASS (V4L2_CTRL_CLASS_DV | 1)
|
||||
|
||||
#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
|
||||
enum v4l2_power_line_frequency {
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2,
|
||||
V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3,
|
||||
#define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1)
|
||||
#define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2)
|
||||
#define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3)
|
||||
#define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4)
|
||||
enum v4l2_dv_tx_mode {
|
||||
V4L2_DV_TX_MODE_DVI_D = 0,
|
||||
V4L2_DV_TX_MODE_HDMI = 1,
|
||||
};
|
||||
#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25)
|
||||
#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
|
||||
#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
|
||||
#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
|
||||
#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
|
||||
#define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30)
|
||||
#define V4L2_CID_COLORFX (V4L2_CID_BASE+31)
|
||||
enum v4l2_colorfx {
|
||||
V4L2_COLORFX_NONE = 0,
|
||||
V4L2_COLORFX_BW = 1,
|
||||
V4L2_COLORFX_SEPIA = 2,
|
||||
V4L2_COLORFX_NEGATIVE = 3,
|
||||
V4L2_COLORFX_EMBOSS = 4,
|
||||
V4L2_COLORFX_SKETCH = 5,
|
||||
V4L2_COLORFX_SKY_BLUE = 6,
|
||||
V4L2_COLORFX_GRASS_GREEN = 7,
|
||||
V4L2_COLORFX_SKIN_WHITEN = 8,
|
||||
V4L2_COLORFX_VIVID = 9,
|
||||
V4L2_COLORFX_AQUA = 10,
|
||||
V4L2_COLORFX_ART_FREEZE = 11,
|
||||
V4L2_COLORFX_SILHOUETTE = 12,
|
||||
V4L2_COLORFX_SOLARIZATION = 13,
|
||||
V4L2_COLORFX_ANTIQUE = 14,
|
||||
V4L2_COLORFX_SET_CBCR = 15,
|
||||
};
|
||||
#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
|
||||
#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
|
||||
|
||||
#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
|
||||
#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
|
||||
|
||||
#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36)
|
||||
|
||||
#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37)
|
||||
#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38)
|
||||
|
||||
#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39)
|
||||
#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40)
|
||||
|
||||
#define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41)
|
||||
#define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42)
|
||||
|
||||
/* last CID + 1 */
|
||||
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+43)
|
||||
|
||||
/* MPEG-class control IDs defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
|
||||
#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1)
|
||||
|
||||
/* MPEG streams, specific to multiplexed streams */
|
||||
#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0)
|
||||
enum v4l2_mpeg_stream_type {
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */
|
||||
V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
|
||||
};
|
||||
#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1)
|
||||
#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2)
|
||||
#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3)
|
||||
#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4)
|
||||
#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5)
|
||||
#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6)
|
||||
#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7)
|
||||
enum v4l2_mpeg_stream_vbi_fmt {
|
||||
V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */
|
||||
V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */
|
||||
#define V4L2_CID_DV_TX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 5)
|
||||
enum v4l2_dv_rgb_range {
|
||||
V4L2_DV_RGB_RANGE_AUTO = 0,
|
||||
V4L2_DV_RGB_RANGE_LIMITED = 1,
|
||||
V4L2_DV_RGB_RANGE_FULL = 2,
|
||||
};
|
||||
|
||||
/* MPEG audio controls specific to multiplexed streams */
|
||||
#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100)
|
||||
enum v4l2_mpeg_audio_sampling_freq {
|
||||
V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
|
||||
V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
|
||||
V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101)
|
||||
enum v4l2_mpeg_audio_encoding {
|
||||
V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
|
||||
V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
|
||||
V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
|
||||
V4L2_MPEG_AUDIO_ENCODING_AAC = 3,
|
||||
V4L2_MPEG_AUDIO_ENCODING_AC3 = 4,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102)
|
||||
enum v4l2_mpeg_audio_l1_bitrate {
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
|
||||
V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103)
|
||||
enum v4l2_mpeg_audio_l2_bitrate {
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
|
||||
V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104)
|
||||
enum v4l2_mpeg_audio_l3_bitrate {
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
|
||||
V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105)
|
||||
enum v4l2_mpeg_audio_mode {
|
||||
V4L2_MPEG_AUDIO_MODE_STEREO = 0,
|
||||
V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
|
||||
V4L2_MPEG_AUDIO_MODE_DUAL = 2,
|
||||
V4L2_MPEG_AUDIO_MODE_MONO = 3,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106)
|
||||
enum v4l2_mpeg_audio_mode_extension {
|
||||
V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0,
|
||||
V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1,
|
||||
V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
|
||||
V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107)
|
||||
enum v4l2_mpeg_audio_emphasis {
|
||||
V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0,
|
||||
V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
|
||||
V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108)
|
||||
enum v4l2_mpeg_audio_crc {
|
||||
V4L2_MPEG_AUDIO_CRC_NONE = 0,
|
||||
V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109)
|
||||
#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110)
|
||||
#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111)
|
||||
enum v4l2_mpeg_audio_ac3_bitrate {
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17,
|
||||
V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_MPEG_BASE+112)
|
||||
enum v4l2_mpeg_audio_dec_playback {
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4,
|
||||
V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5,
|
||||
};
|
||||
#define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113)
|
||||
|
||||
/* MPEG video controls specific to multiplexed streams */
|
||||
#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
|
||||
enum v4l2_mpeg_video_encoding {
|
||||
V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
|
||||
V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1,
|
||||
V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201)
|
||||
enum v4l2_mpeg_video_aspect {
|
||||
V4L2_MPEG_VIDEO_ASPECT_1x1 = 0,
|
||||
V4L2_MPEG_VIDEO_ASPECT_4x3 = 1,
|
||||
V4L2_MPEG_VIDEO_ASPECT_16x9 = 2,
|
||||
V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202)
|
||||
#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203)
|
||||
#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204)
|
||||
#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205)
|
||||
#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206)
|
||||
enum v4l2_mpeg_video_bitrate_mode {
|
||||
V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
|
||||
V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
|
||||
#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
|
||||
#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
|
||||
#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210)
|
||||
#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211)
|
||||
#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_MPEG_BASE+212)
|
||||
#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_MPEG_BASE+213)
|
||||
#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_MPEG_BASE+214)
|
||||
#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_MPEG_BASE+215)
|
||||
#define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_MPEG_BASE+216)
|
||||
enum v4l2_mpeg_video_header_mode {
|
||||
V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0,
|
||||
V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1,
|
||||
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217)
|
||||
#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218)
|
||||
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219)
|
||||
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220)
|
||||
#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221)
|
||||
enum v4l2_mpeg_video_multi_slice_mode {
|
||||
V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0,
|
||||
V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1,
|
||||
V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222)
|
||||
#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223)
|
||||
#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224)
|
||||
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302)
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_MPEG_BASE+303)
|
||||
#define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_MPEG_BASE+304)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_MPEG_BASE+350)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_MPEG_BASE+351)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_MPEG_BASE+352)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_MPEG_BASE+353)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_MPEG_BASE+354)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_MPEG_BASE+355)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_MPEG_BASE+356)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_MPEG_BASE+357)
|
||||
enum v4l2_mpeg_video_h264_entropy_mode {
|
||||
V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0,
|
||||
V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_MPEG_BASE+358)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_MPEG_BASE+359)
|
||||
enum v4l2_mpeg_video_h264_level {
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14,
|
||||
V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_MPEG_BASE+360)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_MPEG_BASE+361)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE+362)
|
||||
enum v4l2_mpeg_video_h264_loop_filter_mode {
|
||||
V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0,
|
||||
V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1,
|
||||
V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_MPEG_BASE+363)
|
||||
enum v4l2_mpeg_video_h264_profile {
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15,
|
||||
V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_MPEG_BASE+364)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_MPEG_BASE+365)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_MPEG_BASE+366)
|
||||
#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_MPEG_BASE+367)
|
||||
enum v4l2_mpeg_video_h264_vui_sar_idc {
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16,
|
||||
V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_MPEG_BASE+403)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_MPEG_BASE+404)
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_MPEG_BASE+405)
|
||||
enum v4l2_mpeg_video_mpeg4_level {
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6,
|
||||
V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_MPEG_BASE+406)
|
||||
enum v4l2_mpeg_video_mpeg4_profile {
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0,
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1,
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2,
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3,
|
||||
V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4,
|
||||
};
|
||||
#define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407)
|
||||
|
||||
/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0)
|
||||
enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
|
||||
V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2)
|
||||
enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2,
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3,
|
||||
V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3)
|
||||
enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
|
||||
V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4)
|
||||
enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
|
||||
V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6)
|
||||
enum v4l2_mpeg_cx2341x_video_median_filter_type {
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0,
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1,
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2,
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
|
||||
V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4,
|
||||
};
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
|
||||
#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
|
||||
#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11)
|
||||
|
||||
/* MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100)
|
||||
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_MPEG_MFC51_BASE+0)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_MPEG_MFC51_BASE+1)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_MFC51_BASE+2)
|
||||
enum v4l2_mpeg_mfc51_video_frame_skip_mode {
|
||||
V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0,
|
||||
V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1,
|
||||
V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_MPEG_MFC51_BASE+3)
|
||||
enum v4l2_mpeg_mfc51_video_force_frame_type {
|
||||
V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0,
|
||||
V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1,
|
||||
V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2,
|
||||
};
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_MPEG_MFC51_BASE+4)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_MPEG_MFC51_BASE+5)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_MPEG_MFC51_BASE+6)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_MPEG_MFC51_BASE+7)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_MPEG_MFC51_BASE+50)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_MPEG_MFC51_BASE+51)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_MPEG_MFC51_BASE+52)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53)
|
||||
#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54)
|
||||
|
||||
/* Camera class control IDs */
|
||||
#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
|
||||
#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1)
|
||||
|
||||
#define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1)
|
||||
enum v4l2_exposure_auto_type {
|
||||
V4L2_EXPOSURE_AUTO = 0,
|
||||
V4L2_EXPOSURE_MANUAL = 1,
|
||||
V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
|
||||
V4L2_EXPOSURE_APERTURE_PRIORITY = 3
|
||||
};
|
||||
#define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2)
|
||||
#define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3)
|
||||
|
||||
#define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4)
|
||||
#define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5)
|
||||
#define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6)
|
||||
#define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7)
|
||||
|
||||
#define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8)
|
||||
#define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9)
|
||||
|
||||
#define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10)
|
||||
#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11)
|
||||
#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12)
|
||||
|
||||
#define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13)
|
||||
#define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14)
|
||||
#define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15)
|
||||
|
||||
#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
|
||||
|
||||
#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
|
||||
#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
|
||||
|
||||
#define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE+19)
|
||||
|
||||
#define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (V4L2_CID_CAMERA_CLASS_BASE+20)
|
||||
enum v4l2_auto_n_preset_white_balance {
|
||||
V4L2_WHITE_BALANCE_MANUAL = 0,
|
||||
V4L2_WHITE_BALANCE_AUTO = 1,
|
||||
V4L2_WHITE_BALANCE_INCANDESCENT = 2,
|
||||
V4L2_WHITE_BALANCE_FLUORESCENT = 3,
|
||||
V4L2_WHITE_BALANCE_FLUORESCENT_H = 4,
|
||||
V4L2_WHITE_BALANCE_HORIZON = 5,
|
||||
V4L2_WHITE_BALANCE_DAYLIGHT = 6,
|
||||
V4L2_WHITE_BALANCE_FLASH = 7,
|
||||
V4L2_WHITE_BALANCE_CLOUDY = 8,
|
||||
V4L2_WHITE_BALANCE_SHADE = 9,
|
||||
};
|
||||
|
||||
#define V4L2_CID_WIDE_DYNAMIC_RANGE (V4L2_CID_CAMERA_CLASS_BASE+21)
|
||||
#define V4L2_CID_IMAGE_STABILIZATION (V4L2_CID_CAMERA_CLASS_BASE+22)
|
||||
|
||||
#define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE+23)
|
||||
#define V4L2_CID_ISO_SENSITIVITY_AUTO (V4L2_CID_CAMERA_CLASS_BASE+24)
|
||||
enum v4l2_iso_sensitivity_auto_type {
|
||||
V4L2_ISO_SENSITIVITY_MANUAL = 0,
|
||||
V4L2_ISO_SENSITIVITY_AUTO = 1,
|
||||
};
|
||||
|
||||
#define V4L2_CID_EXPOSURE_METERING (V4L2_CID_CAMERA_CLASS_BASE+25)
|
||||
enum v4l2_exposure_metering {
|
||||
V4L2_EXPOSURE_METERING_AVERAGE = 0,
|
||||
V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1,
|
||||
V4L2_EXPOSURE_METERING_SPOT = 2,
|
||||
};
|
||||
|
||||
#define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26)
|
||||
enum v4l2_scene_mode {
|
||||
V4L2_SCENE_MODE_NONE = 0,
|
||||
V4L2_SCENE_MODE_BACKLIGHT = 1,
|
||||
V4L2_SCENE_MODE_BEACH_SNOW = 2,
|
||||
V4L2_SCENE_MODE_CANDLE_LIGHT = 3,
|
||||
V4L2_SCENE_MODE_DAWN_DUSK = 4,
|
||||
V4L2_SCENE_MODE_FALL_COLORS = 5,
|
||||
V4L2_SCENE_MODE_FIREWORKS = 6,
|
||||
V4L2_SCENE_MODE_LANDSCAPE = 7,
|
||||
V4L2_SCENE_MODE_NIGHT = 8,
|
||||
V4L2_SCENE_MODE_PARTY_INDOOR = 9,
|
||||
V4L2_SCENE_MODE_PORTRAIT = 10,
|
||||
V4L2_SCENE_MODE_SPORTS = 11,
|
||||
V4L2_SCENE_MODE_SUNSET = 12,
|
||||
V4L2_SCENE_MODE_TEXT = 13,
|
||||
};
|
||||
|
||||
#define V4L2_CID_3A_LOCK (V4L2_CID_CAMERA_CLASS_BASE+27)
|
||||
#define V4L2_LOCK_EXPOSURE (1 << 0)
|
||||
#define V4L2_LOCK_WHITE_BALANCE (1 << 1)
|
||||
#define V4L2_LOCK_FOCUS (1 << 2)
|
||||
|
||||
#define V4L2_CID_AUTO_FOCUS_START (V4L2_CID_CAMERA_CLASS_BASE+28)
|
||||
#define V4L2_CID_AUTO_FOCUS_STOP (V4L2_CID_CAMERA_CLASS_BASE+29)
|
||||
#define V4L2_CID_AUTO_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE+30)
|
||||
#define V4L2_AUTO_FOCUS_STATUS_IDLE (0 << 0)
|
||||
#define V4L2_AUTO_FOCUS_STATUS_BUSY (1 << 0)
|
||||
#define V4L2_AUTO_FOCUS_STATUS_REACHED (1 << 1)
|
||||
#define V4L2_AUTO_FOCUS_STATUS_FAILED (1 << 2)
|
||||
|
||||
#define V4L2_CID_AUTO_FOCUS_RANGE (V4L2_CID_CAMERA_CLASS_BASE+31)
|
||||
enum v4l2_auto_focus_range {
|
||||
V4L2_AUTO_FOCUS_RANGE_AUTO = 0,
|
||||
V4L2_AUTO_FOCUS_RANGE_NORMAL = 1,
|
||||
V4L2_AUTO_FOCUS_RANGE_MACRO = 2,
|
||||
V4L2_AUTO_FOCUS_RANGE_INFINITY = 3,
|
||||
};
|
||||
|
||||
/* FM Modulator class control IDs */
|
||||
#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
|
||||
#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
|
||||
|
||||
#define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1)
|
||||
#define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2)
|
||||
#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3)
|
||||
#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5)
|
||||
#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6)
|
||||
|
||||
#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64)
|
||||
#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65)
|
||||
#define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66)
|
||||
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80)
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81)
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82)
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
|
||||
#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84)
|
||||
|
||||
#define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96)
|
||||
#define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97)
|
||||
#define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98)
|
||||
|
||||
#define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112)
|
||||
enum v4l2_preemphasis {
|
||||
V4L2_PREEMPHASIS_DISABLED = 0,
|
||||
V4L2_PREEMPHASIS_50_uS = 1,
|
||||
V4L2_PREEMPHASIS_75_uS = 2,
|
||||
};
|
||||
#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113)
|
||||
#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114)
|
||||
|
||||
/* Flash and privacy (indicator) light controls */
|
||||
#define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900)
|
||||
#define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1)
|
||||
|
||||
#define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1)
|
||||
enum v4l2_flash_led_mode {
|
||||
V4L2_FLASH_LED_MODE_NONE,
|
||||
V4L2_FLASH_LED_MODE_FLASH,
|
||||
V4L2_FLASH_LED_MODE_TORCH,
|
||||
};
|
||||
|
||||
#define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2)
|
||||
enum v4l2_flash_strobe_source {
|
||||
V4L2_FLASH_STROBE_SOURCE_SOFTWARE,
|
||||
V4L2_FLASH_STROBE_SOURCE_EXTERNAL,
|
||||
};
|
||||
|
||||
#define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3)
|
||||
#define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4)
|
||||
#define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5)
|
||||
|
||||
#define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6)
|
||||
#define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7)
|
||||
#define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8)
|
||||
#define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9)
|
||||
|
||||
#define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10)
|
||||
#define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0)
|
||||
#define V4L2_FLASH_FAULT_TIMEOUT (1 << 1)
|
||||
#define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2)
|
||||
#define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3)
|
||||
#define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4)
|
||||
#define V4L2_FLASH_FAULT_INDICATOR (1 << 5)
|
||||
|
||||
#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
|
||||
#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
|
||||
|
||||
/* JPEG-class control IDs defined by V4L2 */
|
||||
#define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900)
|
||||
#define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1)
|
||||
|
||||
#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1)
|
||||
enum v4l2_jpeg_chroma_subsampling {
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4,
|
||||
V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5,
|
||||
};
|
||||
#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2)
|
||||
#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3)
|
||||
|
||||
#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
|
||||
#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
|
||||
|
||||
/* Image source controls */
|
||||
#define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900)
|
||||
#define V4L2_CID_IMAGE_SOURCE_CLASS (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1)
|
||||
|
||||
#define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1)
|
||||
#define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2)
|
||||
#define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3)
|
||||
|
||||
/* Image processing controls */
|
||||
#define V4L2_CID_IMAGE_PROC_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_PROC | 0x900)
|
||||
#define V4L2_CID_IMAGE_PROC_CLASS (V4L2_CTRL_CLASS_IMAGE_PROC | 1)
|
||||
|
||||
#define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1)
|
||||
#define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2)
|
||||
#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
|
||||
#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)
|
||||
|
||||
/*
|
||||
* T U N I N G
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ void *virtqueue_detach_unused_buf(struct virtqueue *vq);
|
|||
|
||||
unsigned int virtqueue_get_vring_size(struct virtqueue *vq);
|
||||
|
||||
int virtqueue_get_queue_index(struct virtqueue *vq);
|
||||
|
||||
/**
|
||||
* virtio_device - representation of a device using virtio
|
||||
* @index: unique position on the virtio bus
|
||||
|
|
|
|||
|
|
@ -84,7 +84,9 @@
|
|||
* nvqs: the number of virtqueues to find
|
||||
* vqs: on success, includes new virtqueues
|
||||
* callbacks: array of callbacks, for each virtqueue
|
||||
* include a NULL entry for vqs that do not need a callback
|
||||
* names: array of virtqueue names (mainly for debugging)
|
||||
* include a NULL entry for vqs unused by driver
|
||||
* Returns 0 on success or error status
|
||||
* @del_vqs: free virtqueues found by find_vqs().
|
||||
* @get_features: get the array of feature bits for this device.
|
||||
|
|
@ -98,6 +100,7 @@
|
|||
* vdev: the virtio_device
|
||||
* This returns a pointer to the bus name a la pci_name from which
|
||||
* the caller can then copy.
|
||||
* @set_vq_affinity: set the affinity for a virtqueue.
|
||||
*/
|
||||
typedef void vq_callback_t(struct virtqueue *);
|
||||
struct virtio_config_ops {
|
||||
|
|
@ -116,6 +119,7 @@ struct virtio_config_ops {
|
|||
u32 (*get_features)(struct virtio_device *vdev);
|
||||
void (*finalize_features)(struct virtio_device *vdev);
|
||||
const char *(*bus_name)(struct virtio_device *vdev);
|
||||
int (*set_vq_affinity)(struct virtqueue *vq, int cpu);
|
||||
};
|
||||
|
||||
/* If driver didn't advertise the feature, it will never appear. */
|
||||
|
|
@ -190,5 +194,24 @@ const char *virtio_bus_name(struct virtio_device *vdev)
|
|||
return vdev->config->bus_name(vdev);
|
||||
}
|
||||
|
||||
/**
|
||||
* virtqueue_set_affinity - setting affinity for a virtqueue
|
||||
* @vq: the virtqueue
|
||||
* @cpu: the cpu no.
|
||||
*
|
||||
* Pay attention the function are best-effort: the affinity hint may not be set
|
||||
* due to config support, irq type and sharing.
|
||||
*
|
||||
*/
|
||||
static inline
|
||||
int virtqueue_set_affinity(struct virtqueue *vq, int cpu)
|
||||
{
|
||||
struct virtio_device *vdev = vq->vdev;
|
||||
if (vdev->config->set_vq_affinity)
|
||||
return vdev->config->set_vq_affinity(vq, cpu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_VIRTIO_CONFIG_H */
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@ static inline int vring_need_event(__u16 event_idx, __u16 new_idx, __u16 old)
|
|||
struct virtio_device;
|
||||
struct virtqueue;
|
||||
|
||||
struct virtqueue *vring_new_virtqueue(unsigned int num,
|
||||
struct virtqueue *vring_new_virtqueue(unsigned int index,
|
||||
unsigned int num,
|
||||
unsigned int vring_align,
|
||||
struct virtio_device *vdev,
|
||||
bool weak_barriers,
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
|
|||
UNEVICTABLE_PGMUNLOCKED,
|
||||
UNEVICTABLE_PGCLEARED, /* on COW, page truncate */
|
||||
UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */
|
||||
UNEVICTABLE_MLOCKFREED,
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
THP_FAULT_ALLOC,
|
||||
THP_FAULT_FALLBACK,
|
||||
|
|
|
|||
|
|
@ -198,6 +198,8 @@ extern void __dec_zone_state(struct zone *, enum zone_stat_item);
|
|||
void refresh_cpu_vm_stats(int);
|
||||
void refresh_zone_stat_thresholds(void);
|
||||
|
||||
void drain_zonestat(struct zone *zone, struct per_cpu_pageset *);
|
||||
|
||||
int calculate_pressure_threshold(struct zone *zone);
|
||||
int calculate_normal_threshold(struct zone *zone);
|
||||
void set_pgdat_percpu_threshold(pg_data_t *pgdat,
|
||||
|
|
@ -251,8 +253,18 @@ static inline void __dec_zone_page_state(struct page *page,
|
|||
static inline void refresh_cpu_vm_stats(int cpu) { }
|
||||
static inline void refresh_zone_stat_thresholds(void) { }
|
||||
|
||||
static inline void drain_zonestat(struct zone *zone,
|
||||
struct per_cpu_pageset *pset) { }
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
static inline void __mod_zone_freepage_state(struct zone *zone, int nr_pages,
|
||||
int migratetype)
|
||||
{
|
||||
__mod_zone_page_state(zone, NR_FREE_PAGES, nr_pages);
|
||||
if (is_migrate_cma(migratetype))
|
||||
__mod_zone_page_state(zone, NR_FREE_CMA_PAGES, nr_pages);
|
||||
}
|
||||
|
||||
extern const char * const vmstat_text[];
|
||||
|
||||
#endif /* _LINUX_VMSTAT_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue