Generated files from "arm64-generic-codesearch" build 8748711831765763553, revision b1a382c63bf423272d23134d81159e0528b33d2e
diff --git a/chroot/opt/android-master/amd64/usr/include/asm-generic/swab.h b/chroot/opt/android-master/amd64/usr/include/asm-generic/swab.h
new file mode 100644
index 0000000..b6119db
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/asm-generic/swab.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_SWAB_H
+#define _ASM_GENERIC_SWAB_H
+#include <asm/bitsperlong.h>
+#if __BITS_PER_LONG == 32
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define __SWAB_64_THRU_32__
+#endif
+#endif
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/asm/byteorder.h b/chroot/opt/android-master/amd64/usr/include/asm/byteorder.h
new file mode 100644
index 0000000..db3ddff
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/asm/byteorder.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_BYTEORDER_H
+#define _ASM_X86_BYTEORDER_H
+#include <linux/byteorder/little_endian.h>
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/asm/swab.h b/chroot/opt/android-master/amd64/usr/include/asm/swab.h
new file mode 100644
index 0000000..24fd5e3
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/asm/swab.h
@@ -0,0 +1,28 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_X86_SWAB_H
+#define _ASM_X86_SWAB_H
+#include <linux/types.h>
+#include <linux/compiler.h>
+#define __arch_swab32 __arch_swab32
+#ifdef __i386__
+#else
+#endif
+#define __arch_swab64 __arch_swab64
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/cutils/compiler.h b/chroot/opt/android-master/amd64/usr/include/cutils/compiler.h
deleted file mode 100644
index 70f884a..0000000
--- a/chroot/opt/android-master/amd64/usr/include/cutils/compiler.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_CUTILS_COMPILER_H
-#define ANDROID_CUTILS_COMPILER_H
-
-/*
- * helps the compiler's optimizer predicting branches
- */
-
-#ifdef __cplusplus
-# define CC_LIKELY( exp ) (__builtin_expect( !!(exp), true ))
-# define CC_UNLIKELY( exp ) (__builtin_expect( !!(exp), false ))
-#else
-# define CC_LIKELY( exp ) (__builtin_expect( !!(exp), 1 ))
-# define CC_UNLIKELY( exp ) (__builtin_expect( !!(exp), 0 ))
-#endif
-
-/**
- * exports marked symbols
- *
- * if used on a C++ class declaration, this macro must be inserted
- * after the "class" keyword. For instance:
- *
- * template <typename TYPE>
- * class ANDROID_API Singleton { }
- */
-
-#define ANDROID_API __attribute__((visibility("default")))
-
-#endif // ANDROID_CUTILS_COMPILER_H
diff --git a/chroot/opt/android-master/amd64/usr/include/cutils/native_handle.h b/chroot/opt/android-master/amd64/usr/include/cutils/native_handle.h
deleted file mode 100644
index 4f07456..0000000
--- a/chroot/opt/android-master/amd64/usr/include/cutils/native_handle.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef NATIVE_HANDLE_H_
-#define NATIVE_HANDLE_H_
-
-#include <stdalign.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NATIVE_HANDLE_MAX_FDS 1024
-#define NATIVE_HANDLE_MAX_INTS 1024
-
-/* Declare a char array for use with native_handle_init */
-#define NATIVE_HANDLE_DECLARE_STORAGE(name, maxFds, maxInts) \
- alignas(native_handle_t) char (name)[ \
- sizeof(native_handle_t) + sizeof(int) * ((maxFds) + (maxInts))]
-
-typedef struct native_handle
-{
- int version; /* sizeof(native_handle_t) */
- int numFds; /* number of file-descriptors at &data[0] */
- int numInts; /* number of ints at &data[numFds] */
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wzero-length-array"
-#endif
- int data[0]; /* numFds + numInts ints */
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-} native_handle_t;
-
-typedef const native_handle_t* buffer_handle_t;
-
-/*
- * native_handle_close
- *
- * closes the file descriptors contained in this native_handle_t
- *
- * return 0 on success, or a negative error code on failure
- *
- */
-int native_handle_close(const native_handle_t* h);
-
-/*
- * native_handle_init
- *
- * Initializes a native_handle_t from storage. storage must be declared with
- * NATIVE_HANDLE_DECLARE_STORAGE. numFds and numInts must not respectively
- * exceed maxFds and maxInts used to declare the storage.
- */
-native_handle_t* native_handle_init(char* storage, int numFds, int numInts);
-
-/*
- * native_handle_create
- *
- * creates a native_handle_t and initializes it. must be destroyed with
- * native_handle_delete(). Note that numFds must be <= NATIVE_HANDLE_MAX_FDS,
- * numInts must be <= NATIVE_HANDLE_MAX_INTS, and both must be >= 0.
- *
- */
-native_handle_t* native_handle_create(int numFds, int numInts);
-
-/*
- * native_handle_clone
- *
- * creates a native_handle_t and initializes it from another native_handle_t.
- * Must be destroyed with native_handle_delete().
- *
- */
-native_handle_t* native_handle_clone(const native_handle_t* handle);
-
-/*
- * native_handle_delete
- *
- * frees a native_handle_t allocated with native_handle_create().
- * This ONLY frees the memory allocated for the native_handle_t, but doesn't
- * close the file descriptors; which can be achieved with native_handle_close().
- *
- * return 0 on success, or a negative error code on failure
- *
- */
-int native_handle_delete(native_handle_t* h);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* NATIVE_HANDLE_H_ */
diff --git a/chroot/opt/android-master/amd64/usr/include/drm/drm_fourcc.h b/chroot/opt/android-master/amd64/usr/include/drm/drm_fourcc.h
deleted file mode 100644
index a316269..0000000
--- a/chroot/opt/android-master/amd64/usr/include/drm/drm_fourcc.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- *** This header was automatically generated from a Linux kernel header
- *** of the same name, to make information necessary for userspace to
- *** call into the kernel available to libc. It contains only constants,
- *** structures, and macros generated from the original header, and thus,
- *** contains no copyrightable information.
- ***
- *** To edit the content of this header, modify the corresponding
- *** source file (e.g. under external/kernel-headers/original/) then
- *** run bionic/libc/kernel/tools/update_all.py
- ***
- *** Any manual change here will be lost the next time this script will
- *** be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef DRM_FOURCC_H
-#define DRM_FOURCC_H
-#include "drm.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-#define fourcc_code(a,b,c,d) ((__u32) (a) | ((__u32) (b) << 8) | ((__u32) (c) << 16) | ((__u32) (d) << 24))
-#define DRM_FORMAT_BIG_ENDIAN (1U << 31)
-#define DRM_FORMAT_INVALID 0
-#define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ')
-#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ')
-#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ')
-#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8')
-#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8')
-#define DRM_FORMAT_RG1616 fourcc_code('R', 'G', '3', '2')
-#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2')
-#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8')
-#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8')
-#define DRM_FORMAT_XRGB4444 fourcc_code('X', 'R', '1', '2')
-#define DRM_FORMAT_XBGR4444 fourcc_code('X', 'B', '1', '2')
-#define DRM_FORMAT_RGBX4444 fourcc_code('R', 'X', '1', '2')
-#define DRM_FORMAT_BGRX4444 fourcc_code('B', 'X', '1', '2')
-#define DRM_FORMAT_ARGB4444 fourcc_code('A', 'R', '1', '2')
-#define DRM_FORMAT_ABGR4444 fourcc_code('A', 'B', '1', '2')
-#define DRM_FORMAT_RGBA4444 fourcc_code('R', 'A', '1', '2')
-#define DRM_FORMAT_BGRA4444 fourcc_code('B', 'A', '1', '2')
-#define DRM_FORMAT_XRGB1555 fourcc_code('X', 'R', '1', '5')
-#define DRM_FORMAT_XBGR1555 fourcc_code('X', 'B', '1', '5')
-#define DRM_FORMAT_RGBX5551 fourcc_code('R', 'X', '1', '5')
-#define DRM_FORMAT_BGRX5551 fourcc_code('B', 'X', '1', '5')
-#define DRM_FORMAT_ARGB1555 fourcc_code('A', 'R', '1', '5')
-#define DRM_FORMAT_ABGR1555 fourcc_code('A', 'B', '1', '5')
-#define DRM_FORMAT_RGBA5551 fourcc_code('R', 'A', '1', '5')
-#define DRM_FORMAT_BGRA5551 fourcc_code('B', 'A', '1', '5')
-#define DRM_FORMAT_RGB565 fourcc_code('R', 'G', '1', '6')
-#define DRM_FORMAT_BGR565 fourcc_code('B', 'G', '1', '6')
-#define DRM_FORMAT_RGB888 fourcc_code('R', 'G', '2', '4')
-#define DRM_FORMAT_BGR888 fourcc_code('B', 'G', '2', '4')
-#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4')
-#define DRM_FORMAT_XBGR8888 fourcc_code('X', 'B', '2', '4')
-#define DRM_FORMAT_RGBX8888 fourcc_code('R', 'X', '2', '4')
-#define DRM_FORMAT_BGRX8888 fourcc_code('B', 'X', '2', '4')
-#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4')
-#define DRM_FORMAT_ABGR8888 fourcc_code('A', 'B', '2', '4')
-#define DRM_FORMAT_RGBA8888 fourcc_code('R', 'A', '2', '4')
-#define DRM_FORMAT_BGRA8888 fourcc_code('B', 'A', '2', '4')
-#define DRM_FORMAT_XRGB2101010 fourcc_code('X', 'R', '3', '0')
-#define DRM_FORMAT_XBGR2101010 fourcc_code('X', 'B', '3', '0')
-#define DRM_FORMAT_RGBX1010102 fourcc_code('R', 'X', '3', '0')
-#define DRM_FORMAT_BGRX1010102 fourcc_code('B', 'X', '3', '0')
-#define DRM_FORMAT_ARGB2101010 fourcc_code('A', 'R', '3', '0')
-#define DRM_FORMAT_ABGR2101010 fourcc_code('A', 'B', '3', '0')
-#define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0')
-#define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0')
-#define DRM_FORMAT_XRGB16161616F fourcc_code('X', 'R', '4', 'H')
-#define DRM_FORMAT_XBGR16161616F fourcc_code('X', 'B', '4', 'H')
-#define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H')
-#define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H')
-#define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V')
-#define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U')
-#define DRM_FORMAT_UYVY fourcc_code('U', 'Y', 'V', 'Y')
-#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y')
-#define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V')
-#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V')
-#define DRM_FORMAT_VUY888 fourcc_code('V', 'U', '2', '4')
-#define DRM_FORMAT_VUY101010 fourcc_code('V', 'U', '3', '0')
-#define DRM_FORMAT_Y210 fourcc_code('Y', '2', '1', '0')
-#define DRM_FORMAT_Y212 fourcc_code('Y', '2', '1', '2')
-#define DRM_FORMAT_Y216 fourcc_code('Y', '2', '1', '6')
-#define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0')
-#define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2')
-#define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6')
-#define DRM_FORMAT_XVYU2101010 fourcc_code('X', 'V', '3', '0')
-#define DRM_FORMAT_XVYU12_16161616 fourcc_code('X', 'V', '3', '6')
-#define DRM_FORMAT_XVYU16161616 fourcc_code('X', 'V', '4', '8')
-#define DRM_FORMAT_Y0L0 fourcc_code('Y', '0', 'L', '0')
-#define DRM_FORMAT_X0L0 fourcc_code('X', '0', 'L', '0')
-#define DRM_FORMAT_Y0L2 fourcc_code('Y', '0', 'L', '2')
-#define DRM_FORMAT_X0L2 fourcc_code('X', '0', 'L', '2')
-#define DRM_FORMAT_YUV420_8BIT fourcc_code('Y', 'U', '0', '8')
-#define DRM_FORMAT_YUV420_10BIT fourcc_code('Y', 'U', '1', '0')
-#define DRM_FORMAT_XRGB8888_A8 fourcc_code('X', 'R', 'A', '8')
-#define DRM_FORMAT_XBGR8888_A8 fourcc_code('X', 'B', 'A', '8')
-#define DRM_FORMAT_RGBX8888_A8 fourcc_code('R', 'X', 'A', '8')
-#define DRM_FORMAT_BGRX8888_A8 fourcc_code('B', 'X', 'A', '8')
-#define DRM_FORMAT_RGB888_A8 fourcc_code('R', '8', 'A', '8')
-#define DRM_FORMAT_BGR888_A8 fourcc_code('B', '8', 'A', '8')
-#define DRM_FORMAT_RGB565_A8 fourcc_code('R', '5', 'A', '8')
-#define DRM_FORMAT_BGR565_A8 fourcc_code('B', '5', 'A', '8')
-#define DRM_FORMAT_NV12 fourcc_code('N', 'V', '1', '2')
-#define DRM_FORMAT_NV21 fourcc_code('N', 'V', '2', '1')
-#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6')
-#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1')
-#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4')
-#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2')
-#define DRM_FORMAT_P210 fourcc_code('P', '2', '1', '0')
-#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0')
-#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2')
-#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6')
-#define DRM_FORMAT_YUV410 fourcc_code('Y', 'U', 'V', '9')
-#define DRM_FORMAT_YVU410 fourcc_code('Y', 'V', 'U', '9')
-#define DRM_FORMAT_YUV411 fourcc_code('Y', 'U', '1', '1')
-#define DRM_FORMAT_YVU411 fourcc_code('Y', 'V', '1', '1')
-#define DRM_FORMAT_YUV420 fourcc_code('Y', 'U', '1', '2')
-#define DRM_FORMAT_YVU420 fourcc_code('Y', 'V', '1', '2')
-#define DRM_FORMAT_YUV422 fourcc_code('Y', 'U', '1', '6')
-#define DRM_FORMAT_YVU422 fourcc_code('Y', 'V', '1', '6')
-#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4')
-#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4')
-#define DRM_FORMAT_MOD_NONE 0
-#define DRM_FORMAT_MOD_VENDOR_NONE 0
-#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01
-#define DRM_FORMAT_MOD_VENDOR_AMD 0x02
-#define DRM_FORMAT_MOD_VENDOR_NVIDIA 0x03
-#define DRM_FORMAT_MOD_VENDOR_SAMSUNG 0x04
-#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05
-#define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06
-#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07
-#define DRM_FORMAT_MOD_VENDOR_ARM 0x08
-#define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09
-#define DRM_FORMAT_RESERVED ((1ULL << 56) - 1)
-#define fourcc_mod_code(vendor,val) ((((__u64) DRM_FORMAT_MOD_VENDOR_ ##vendor) << 56) | ((val) & 0x00ffffffffffffffULL))
-#define DRM_FORMAT_MOD_INVALID fourcc_mod_code(NONE, DRM_FORMAT_RESERVED)
-#define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0)
-#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1)
-#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2)
-#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3)
-#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4)
-#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5)
-#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)
-#define DRM_FORMAT_MOD_SAMSUNG_16_16_TILE fourcc_mod_code(SAMSUNG, 2)
-#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1)
-#define DRM_FORMAT_MOD_QCOM_DX fourcc_mod_code(QCOM, 0x2)
-#define DRM_FORMAT_MOD_QCOM_TIGHT fourcc_mod_code(QCOM, 0x4)
-#define DRM_FORMAT_MOD_QCOM_TILE fourcc_mod_code(QCOM, 0x8)
-#define DRM_FORMAT_MOD_VIVANTE_TILED fourcc_mod_code(VIVANTE, 1)
-#define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED fourcc_mod_code(VIVANTE, 2)
-#define DRM_FORMAT_MOD_VIVANTE_SPLIT_TILED fourcc_mod_code(VIVANTE, 3)
-#define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4)
-#define DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED fourcc_mod_code(NVIDIA, 1)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) fourcc_mod_code(NVIDIA, 0x10 | ((v) & 0xf))
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB fourcc_mod_code(NVIDIA, 0x10)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB fourcc_mod_code(NVIDIA, 0x11)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB fourcc_mod_code(NVIDIA, 0x12)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB fourcc_mod_code(NVIDIA, 0x13)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB fourcc_mod_code(NVIDIA, 0x14)
-#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB fourcc_mod_code(NVIDIA, 0x15)
-#define __fourcc_mod_broadcom_param_shift 8
-#define __fourcc_mod_broadcom_param_bits 48
-#define fourcc_mod_broadcom_code(val,params) fourcc_mod_code(BROADCOM, ((((__u64) params) << __fourcc_mod_broadcom_param_shift) | val))
-#define fourcc_mod_broadcom_param(m) ((int) (((m) >> __fourcc_mod_broadcom_param_shift) & ((1ULL << __fourcc_mod_broadcom_param_bits) - 1)))
-#define fourcc_mod_broadcom_mod(m) ((m) & ~(((1ULL << __fourcc_mod_broadcom_param_bits) - 1) << __fourcc_mod_broadcom_param_shift))
-#define DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED fourcc_mod_code(BROADCOM, 1)
-#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) fourcc_mod_broadcom_code(2, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(v) fourcc_mod_broadcom_code(3, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(v) fourcc_mod_broadcom_code(4, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(v) fourcc_mod_broadcom_code(5, v)
-#define DRM_FORMAT_MOD_BROADCOM_SAND32 DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND64 DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND128 DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_SAND256 DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(0)
-#define DRM_FORMAT_MOD_BROADCOM_UIF fourcc_mod_code(BROADCOM, 6)
-#define DRM_FORMAT_MOD_ARM_CODE(__type,__val) fourcc_mod_code(ARM, ((__u64) (__type) << 52) | ((__val) & 0x000fffffffffffffULL))
-#define DRM_FORMAT_MOD_ARM_TYPE_AFBC 0x00
-#define DRM_FORMAT_MOD_ARM_TYPE_MISC 0x01
-#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFBC, __afbc_mode)
-#define AFBC_FORMAT_MOD_BLOCK_SIZE_MASK 0xf
-#define AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 (1ULL)
-#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 (2ULL)
-#define AFBC_FORMAT_MOD_BLOCK_SIZE_64x4 (3ULL)
-#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8_64x4 (4ULL)
-#define AFBC_FORMAT_MOD_YTR (1ULL << 4)
-#define AFBC_FORMAT_MOD_SPLIT (1ULL << 5)
-#define AFBC_FORMAT_MOD_SPARSE (1ULL << 6)
-#define AFBC_FORMAT_MOD_CBR (1ULL << 7)
-#define AFBC_FORMAT_MOD_TILED (1ULL << 8)
-#define AFBC_FORMAT_MOD_SC (1ULL << 9)
-#define AFBC_FORMAT_MOD_DB (1ULL << 10)
-#define AFBC_FORMAT_MOD_BCH (1ULL << 11)
-#define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL)
-#define DRM_FORMAT_MOD_ALLWINNER_TILED fourcc_mod_code(ALLWINNER, 1)
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/ftw.h b/chroot/opt/android-master/amd64/usr/include/ftw.h
new file mode 100644
index 0000000..a289643
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/ftw.h
@@ -0,0 +1,64 @@
+/* $NetBSD: ftw.h,v 1.1 2005/12/30 23:07:33 agc Exp $ */
+
+/* From OpenBSD: ftw.h,v 1.1 2003/07/21 21:13:18 millert Exp */
+
+/*
+ * Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Sponsored in part by the Defense Advanced Research Projects
+ * Agency (DARPA) and Air Force Research Laboratory, Air Force
+ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
+ */
+
+#ifndef _FTW_H
+#define _FTW_H
+
+#include <sys/cdefs.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+/*
+ * Valid flags for the 3rd argument to the function that is passed as the
+ * second argument to ftw(3) and nftw(3). Say it three times fast!
+ */
+#define FTW_F 0 /* File. */
+#define FTW_D 1 /* Directory. */
+#define FTW_DNR 2 /* Directory without read permission. */
+#define FTW_DP 3 /* Directory with subdirectories visited. */
+#define FTW_NS 4 /* Unknown type; stat() failed. */
+#define FTW_SL 5 /* Symbolic link. */
+#define FTW_SLN 6 /* Sym link that names a nonexistent file. */
+
+/*
+ * Flags for use as the 4th argument to nftw(3). These may be ORed together.
+ */
+#define FTW_PHYS 0x01 /* Physical walk, don't follow sym links. */
+#define FTW_MOUNT 0x02 /* The walk does not cross a mount point. */
+#define FTW_DEPTH 0x04 /* Subdirs visited before the dir itself. */
+#define FTW_CHDIR 0x08 /* Change to a directory before reading it. */
+
+struct FTW {
+ int base;
+ int level;
+};
+
+__BEGIN_DECLS
+int ftw(const char* __dir_path, int (*__callback)(const char*, const struct stat*, int), int __max_fd_count) __INTRODUCED_IN(17);
+int nftw(const char* __dir_path, int (*__callback)(const char*, const struct stat*, int, struct FTW*), int __max_fd_count, int __flags) __INTRODUCED_IN(17);
+int ftw64(const char* __dir_path, int (*__callback)(const char*, const struct stat64*, int), int __max_fd_count) __RENAME_STAT64(ftw, 17, 21);
+int nftw64(const char* __dir_path, int (*__callback)(const char*, const struct stat64*, int, struct FTW*), int __max_fd_count, int __flags) __RENAME_STAT64(nftw, 17, 21);
+__END_DECLS
+
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/hardware/camera.h b/chroot/opt/android-master/amd64/usr/include/hardware/camera.h
deleted file mode 100644
index b1f18ff..0000000
--- a/chroot/opt/android-master/amd64/usr/include/hardware/camera.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Copyright (C) 2010-2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_INCLUDE_CAMERA_H
-#define ANDROID_INCLUDE_CAMERA_H
-
-#include "camera_common.h"
-
-/**
- * Camera device HAL, initial version [ CAMERA_DEVICE_API_VERSION_1_0 ]
- *
- * DEPRECATED. New devices should use Camera HAL v3.2 or newer.
- *
- * Supports the android.hardware.Camera API, and the android.hardware.camera2
- * API in legacy mode only.
- *
- * Camera devices that support this version of the HAL must return a value in
- * the range HARDWARE_DEVICE_API_VERSION(0,0)-(1,FF) in
- * camera_device_t.common.version. CAMERA_DEVICE_API_VERSION_1_0 is the
- * recommended value.
- *
- * Camera modules that implement version 2.0 or higher of camera_module_t must
- * also return the value of camera_device_t.common.version in
- * camera_info_t.device_version.
- *
- * See camera_common.h for more details.
- */
-
-__BEGIN_DECLS
-
-struct camera_memory;
-typedef void (*camera_release_memory)(struct camera_memory *mem);
-
-typedef struct camera_memory {
- void *data;
- size_t size;
- void *handle;
- camera_release_memory release;
-} camera_memory_t;
-
-typedef camera_memory_t* (*camera_request_memory)(int fd, size_t buf_size, unsigned int num_bufs,
- void *user);
-
-typedef void (*camera_notify_callback)(int32_t msg_type,
- int32_t ext1,
- int32_t ext2,
- void *user);
-
-typedef void (*camera_data_callback)(int32_t msg_type,
- const camera_memory_t *data, unsigned int index,
- camera_frame_metadata_t *metadata, void *user);
-
-typedef void (*camera_data_timestamp_callback)(int64_t timestamp,
- int32_t msg_type,
- const camera_memory_t *data, unsigned int index,
- void *user);
-
-#define HAL_CAMERA_PREVIEW_WINDOW_TAG 0xcafed00d
-
-typedef struct preview_stream_ops {
- int (*dequeue_buffer)(struct preview_stream_ops* w,
- buffer_handle_t** buffer, int *stride);
- int (*enqueue_buffer)(struct preview_stream_ops* w,
- buffer_handle_t* buffer);
- int (*cancel_buffer)(struct preview_stream_ops* w,
- buffer_handle_t* buffer);
- int (*set_buffer_count)(struct preview_stream_ops* w, int count);
- int (*set_buffers_geometry)(struct preview_stream_ops* pw,
- int w, int h, int format);
- int (*set_crop)(struct preview_stream_ops *w,
- int left, int top, int right, int bottom);
- int (*set_usage)(struct preview_stream_ops* w, int usage);
- int (*set_swap_interval)(struct preview_stream_ops *w, int interval);
- int (*get_min_undequeued_buffer_count)(const struct preview_stream_ops *w,
- int *count);
- int (*lock_buffer)(struct preview_stream_ops* w,
- buffer_handle_t* buffer);
- // Timestamps are measured in nanoseconds, and must be comparable
- // and monotonically increasing between two frames in the same
- // preview stream. They do not need to be comparable between
- // consecutive or parallel preview streams, cameras, or app runs.
- int (*set_timestamp)(struct preview_stream_ops *w, int64_t timestamp);
-} preview_stream_ops_t;
-
-struct camera_device;
-typedef struct camera_device_ops {
- /** Set the ANativeWindow to which preview frames are sent */
- int (*set_preview_window)(struct camera_device *,
- struct preview_stream_ops *window);
-
- /** Set the notification and data callbacks */
- void (*set_callbacks)(struct camera_device *,
- camera_notify_callback notify_cb,
- camera_data_callback data_cb,
- camera_data_timestamp_callback data_cb_timestamp,
- camera_request_memory get_memory,
- void *user);
-
- /**
- * The following three functions all take a msg_type, which is a bitmask of
- * the messages defined in include/ui/Camera.h
- */
-
- /**
- * Enable a message, or set of messages.
- */
- void (*enable_msg_type)(struct camera_device *, int32_t msg_type);
-
- /**
- * Disable a message, or a set of messages.
- *
- * Once received a call to disableMsgType(CAMERA_MSG_VIDEO_FRAME), camera
- * HAL should not rely on its client to call releaseRecordingFrame() to
- * release video recording frames sent out by the cameral HAL before and
- * after the disableMsgType(CAMERA_MSG_VIDEO_FRAME) call. Camera HAL
- * clients must not modify/access any video recording frame after calling
- * disableMsgType(CAMERA_MSG_VIDEO_FRAME).
- */
- void (*disable_msg_type)(struct camera_device *, int32_t msg_type);
-
- /**
- * Query whether a message, or a set of messages, is enabled. Note that
- * this is operates as an AND, if any of the messages queried are off, this
- * will return false.
- */
- int (*msg_type_enabled)(struct camera_device *, int32_t msg_type);
-
- /**
- * Start preview mode.
- */
- int (*start_preview)(struct camera_device *);
-
- /**
- * Stop a previously started preview.
- */
- void (*stop_preview)(struct camera_device *);
-
- /**
- * Returns true if preview is enabled.
- */
- int (*preview_enabled)(struct camera_device *);
-
- /**
- * Request the camera HAL to store meta data or real YUV data in the video
- * buffers sent out via CAMERA_MSG_VIDEO_FRAME for a recording session. If
- * it is not called, the default camera HAL behavior is to store real YUV
- * data in the video buffers.
- *
- * This method should be called before startRecording() in order to be
- * effective.
- *
- * If meta data is stored in the video buffers, it is up to the receiver of
- * the video buffers to interpret the contents and to find the actual frame
- * data with the help of the meta data in the buffer. How this is done is
- * outside of the scope of this method.
- *
- * Some camera HALs may not support storing meta data in the video buffers,
- * but all camera HALs should support storing real YUV data in the video
- * buffers. If the camera HAL does not support storing the meta data in the
- * video buffers when it is requested to do do, INVALID_OPERATION must be
- * returned. It is very useful for the camera HAL to pass meta data rather
- * than the actual frame data directly to the video encoder, since the
- * amount of the uncompressed frame data can be very large if video size is
- * large.
- *
- * @param enable if true to instruct the camera HAL to store
- * meta data in the video buffers; false to instruct
- * the camera HAL to store real YUV data in the video
- * buffers.
- *
- * @return OK on success.
- */
- int (*store_meta_data_in_buffers)(struct camera_device *, int enable);
-
- /**
- * Start record mode. When a record image is available, a
- * CAMERA_MSG_VIDEO_FRAME message is sent with the corresponding
- * frame. Every record frame must be released by a camera HAL client via
- * releaseRecordingFrame() before the client calls
- * disableMsgType(CAMERA_MSG_VIDEO_FRAME). After the client calls
- * disableMsgType(CAMERA_MSG_VIDEO_FRAME), it is the camera HAL's
- * responsibility to manage the life-cycle of the video recording frames,
- * and the client must not modify/access any video recording frames.
- */
- int (*start_recording)(struct camera_device *);
-
- /**
- * Stop a previously started recording.
- */
- void (*stop_recording)(struct camera_device *);
-
- /**
- * Returns true if recording is enabled.
- */
- int (*recording_enabled)(struct camera_device *);
-
- /**
- * Release a record frame previously returned by CAMERA_MSG_VIDEO_FRAME.
- *
- * It is camera HAL client's responsibility to release video recording
- * frames sent out by the camera HAL before the camera HAL receives a call
- * to disableMsgType(CAMERA_MSG_VIDEO_FRAME). After it receives the call to
- * disableMsgType(CAMERA_MSG_VIDEO_FRAME), it is the camera HAL's
- * responsibility to manage the life-cycle of the video recording frames.
- */
- void (*release_recording_frame)(struct camera_device *,
- const void *opaque);
-
- /**
- * Start auto focus, the notification callback routine is called with
- * CAMERA_MSG_FOCUS once when focusing is complete. autoFocus() will be
- * called again if another auto focus is needed.
- */
- int (*auto_focus)(struct camera_device *);
-
- /**
- * Cancels auto-focus function. If the auto-focus is still in progress,
- * this function will cancel it. Whether the auto-focus is in progress or
- * not, this function will return the focus position to the default. If
- * the camera does not support auto-focus, this is a no-op.
- */
- int (*cancel_auto_focus)(struct camera_device *);
-
- /**
- * Take a picture.
- */
- int (*take_picture)(struct camera_device *);
-
- /**
- * Cancel a picture that was started with takePicture. Calling this method
- * when no picture is being taken is a no-op.
- */
- int (*cancel_picture)(struct camera_device *);
-
- /**
- * Set the camera parameters. This returns BAD_VALUE if any parameter is
- * invalid or not supported.
- */
- int (*set_parameters)(struct camera_device *, const char *parms);
-
- /** Retrieve the camera parameters. The buffer returned by the camera HAL
- must be returned back to it with put_parameters, if put_parameters
- is not NULL.
- */
- char *(*get_parameters)(struct camera_device *);
-
- /** The camera HAL uses its own memory to pass us the parameters when we
- call get_parameters. Use this function to return the memory back to
- the camera HAL, if put_parameters is not NULL. If put_parameters
- is NULL, then you have to use free() to release the memory.
- */
- void (*put_parameters)(struct camera_device *, char *);
-
- /**
- * Send command to camera driver.
- */
- int (*send_command)(struct camera_device *,
- int32_t cmd, int32_t arg1, int32_t arg2);
-
- /**
- * Release the hardware resources owned by this object. Note that this is
- * *not* done in the destructor.
- */
- void (*release)(struct camera_device *);
-
- /**
- * Dump state of the camera hardware
- */
- int (*dump)(struct camera_device *, int fd);
-} camera_device_ops_t;
-
-typedef struct camera_device {
- /**
- * camera_device.common.version must be in the range
- * HARDWARE_DEVICE_API_VERSION(0,0)-(1,FF). CAMERA_DEVICE_API_VERSION_1_0 is
- * recommended.
- */
- hw_device_t common;
- camera_device_ops_t *ops;
- void *priv;
-} camera_device_t;
-
-__END_DECLS
-
-#endif /* #ifdef ANDROID_INCLUDE_CAMERA_H */
diff --git a/chroot/opt/android-master/amd64/usr/include/hardware/camera3.h b/chroot/opt/android-master/amd64/usr/include/hardware/camera3.h
deleted file mode 100644
index 7fb86df..0000000
--- a/chroot/opt/android-master/amd64/usr/include/hardware/camera3.h
+++ /dev/null
@@ -1,3564 +0,0 @@
-/*
- * Copyright (C) 2013-2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_INCLUDE_CAMERA3_H
-#define ANDROID_INCLUDE_CAMERA3_H
-
-#include <system/camera_metadata.h>
-#include "camera_common.h"
-
-/**
- * Camera device HAL 3.6[ CAMERA_DEVICE_API_VERSION_3_6 ]
- *
- * This is the current recommended version of the camera device HAL.
- *
- * Supports the android.hardware.Camera API, and as of v3.2, the
- * android.hardware.camera2 API as LIMITED or above hardware level.
- *
- * Camera devices that support this version of the HAL must return
- * CAMERA_DEVICE_API_VERSION_3_6 in camera_device_t.common.version and in
- * camera_info_t.device_version (from camera_module_t.get_camera_info).
- *
- * CAMERA_DEVICE_API_VERSION_3_3 and above:
- * Camera modules that may contain version 3.3 or above devices must
- * implement at least version 2.2 of the camera module interface (as defined
- * by camera_module_t.common.module_api_version).
- *
- * CAMERA_DEVICE_API_VERSION_3_2:
- * Camera modules that may contain version 3.2 devices must implement at
- * least version 2.2 of the camera module interface (as defined by
- * camera_module_t.common.module_api_version).
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- * Camera modules that may contain version 3.1 (or 3.0) devices must
- * implement at least version 2.0 of the camera module interface
- * (as defined by camera_module_t.common.module_api_version).
- *
- * See camera_common.h for more versioning details.
- *
- * Documentation index:
- * S1. Version history
- * S2. Startup and operation sequencing
- * S3. Operational modes
- * S4. 3A modes and state machines
- * S5. Cropping
- * S6. Error management
- * S7. Key Performance Indicator (KPI) glossary
- * S8. Sample Use Cases
- * S9. Notes on Controls and Metadata
- * S10. Reprocessing flow and controls
- */
-
-/**
- * S1. Version history:
- *
- * 1.0: Initial Android camera HAL (Android 4.0) [camera.h]:
- *
- * - Converted from C++ CameraHardwareInterface abstraction layer.
- *
- * - Supports android.hardware.Camera API.
- *
- * 2.0: Initial release of expanded-capability HAL (Android 4.2) [camera2.h]:
- *
- * - Sufficient for implementing existing android.hardware.Camera API.
- *
- * - Allows for ZSL queue in camera service layer
- *
- * - Not tested for any new features such manual capture control, Bayer RAW
- * capture, reprocessing of RAW data.
- *
- * 3.0: First revision of expanded-capability HAL:
- *
- * - Major version change since the ABI is completely different. No change to
- * the required hardware capabilities or operational model from 2.0.
- *
- * - Reworked input request and stream queue interfaces: Framework calls into
- * HAL with next request and stream buffers already dequeued. Sync framework
- * support is included, necessary for efficient implementations.
- *
- * - Moved triggers into requests, most notifications into results.
- *
- * - Consolidated all callbacks into framework into one structure, and all
- * setup methods into a single initialize() call.
- *
- * - Made stream configuration into a single call to simplify stream
- * management. Bidirectional streams replace STREAM_FROM_STREAM construct.
- *
- * - Limited mode semantics for older/limited hardware devices.
- *
- * 3.1: Minor revision of expanded-capability HAL:
- *
- * - configure_streams passes consumer usage flags to the HAL.
- *
- * - flush call to drop all in-flight requests/buffers as fast as possible.
- *
- * 3.2: Minor revision of expanded-capability HAL:
- *
- * - Deprecates get_metadata_vendor_tag_ops. Please use get_vendor_tag_ops
- * in camera_common.h instead.
- *
- * - register_stream_buffers deprecated. All gralloc buffers provided
- * by framework to HAL in process_capture_request may be new at any time.
- *
- * - add partial result support. process_capture_result may be called
- * multiple times with a subset of the available result before the full
- * result is available.
- *
- * - add manual template to camera3_request_template. The applications may
- * use this template to control the capture settings directly.
- *
- * - Rework the bidirectional and input stream specifications.
- *
- * - change the input buffer return path. The buffer is returned in
- * process_capture_result instead of process_capture_request.
- *
- * 3.3: Minor revision of expanded-capability HAL:
- *
- * - OPAQUE and YUV reprocessing API updates.
- *
- * - Basic support for depth output buffers.
- *
- * - Addition of data_space field to camera3_stream_t.
- *
- * - Addition of rotation field to camera3_stream_t.
- *
- * - Addition of camera3 stream configuration operation mode to camera3_stream_configuration_t
- *
- * 3.4: Minor additions to supported metadata and changes to data_space support
- *
- * - Add ANDROID_SENSOR_OPAQUE_RAW_SIZE static metadata as mandatory if
- * RAW_OPAQUE format is supported.
- *
- * - Add ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE static metadata as
- * mandatory if any RAW format is supported
- *
- * - Switch camera3_stream_t data_space field to a more flexible definition,
- * using the version 0 definition of dataspace encoding.
- *
- * - General metadata additions which are available to use for HALv3.2 or
- * newer:
- * - ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3
- * - ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST
- * - ANDROID_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE
- * - ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL
- * - ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL
- * - ANDROID_SENSOR_OPAQUE_RAW_SIZE
- * - ANDROID_SENSOR_OPTICAL_BLACK_REGIONS
- *
- * 3.5: Minor revisions to support session parameters and logical multi camera:
- *
- * - Add ANDROID_REQUEST_AVAILABLE_SESSION_KEYS static metadata, which is
- * optional for implementations that want to support session parameters. If support is
- * needed, then Hal should populate the list with all available capture request keys
- * that can cause severe processing delays when modified by client. Typical examples
- * include parameters that require time-consuming HW re-configuration or internal camera
- * pipeline update.
- *
- * - Add a session parameter field to camera3_stream_configuration which can be populated
- * by clients with initial values for the keys found in ANDROID_REQUEST_AVAILABLE_SESSION_KEYS.
- *
- * - Metadata additions for logical multi camera capability:
- * - ANDROID_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
- * - ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS
- * - ANDROID_LOGICAL_MULTI_CAMERA_SYNC_TYPE
- *
- * - Add physical camera id field in camera3_stream, so that for a logical
- * multi camera, the application has the option to specify which physical camera
- * a particular stream is configured on.
- *
- * - Add physical camera id and settings field in camera3_capture_request, so that
- * for a logical multi camera, the application has the option to specify individual
- * settings for a particular physical device.
- *
- * 3.6: Minor revisions to support HAL buffer management APIs:
- *
- * - Add ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION static metadata, which allows HAL to
- * opt in to the new buffer management APIs described below.
- *
- * - Add request_stream_buffers() and return_stream_buffers() to camera3_callback_ops_t for HAL to
- * request and return output buffers from camera service.
- *
- * - Add signal_stream_flush() to camera3_device_ops_t for camera service to notify HAL an
- * upcoming configure_streams() call requires HAL to return buffers of certain streams.
- *
- * - Add CAMERA3_JPEG_APP_SEGMENTS_BLOB_ID to support BLOB with only JPEG apps
- * segments and thumbnail (without main image bitstream). Camera framework
- * uses such stream togerther with a HAL YUV_420_888/IMPLEMENTATION_DEFINED
- * stream to encode HEIC (ISO/IEC 23008-12) image.
- *
- * - Add is_reconfiguration_required() to camera3_device_ops_t to enable HAL to skip or
- * trigger stream reconfiguration depending on new session parameter values.
- *
- */
-
-/**
- * S2. Startup and general expected operation sequence:
- *
- * 1. Framework calls camera_module_t->common.open(), which returns a
- * hardware_device_t structure.
- *
- * 2. Framework inspects the hardware_device_t->version field, and instantiates
- * the appropriate handler for that version of the camera hardware device. In
- * case the version is CAMERA_DEVICE_API_VERSION_3_0, the device is cast to
- * a camera3_device_t.
- *
- * 3. Framework calls camera3_device_t->ops->initialize() with the framework
- * callback function pointers. This will only be called this one time after
- * open(), before any other functions in the ops structure are called.
- *
- * 4. The framework calls camera3_device_t->ops->configure_streams() with a list
- * of input/output streams to the HAL device.
- *
- * 5. <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * The framework allocates gralloc buffers and calls
- * camera3_device_t->ops->register_stream_buffers() for at least one of the
- * output streams listed in configure_streams. The same stream is registered
- * only once.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * camera3_device_t->ops->register_stream_buffers() is not called and must
- * be NULL.
- *
- * 6. The framework requests default settings for some number of use cases with
- * calls to camera3_device_t->ops->construct_default_request_settings(). This
- * may occur any time after step 3.
- *
- * 7. The framework constructs and sends the first capture request to the HAL,
- * with settings based on one of the sets of default settings, and with at
- * least one output stream, which has been registered earlier by the
- * framework. This is sent to the HAL with
- * camera3_device_t->ops->process_capture_request(). The HAL must block the
- * return of this call until it is ready for the next request to be sent.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * The buffer_handle_t provided in the camera3_stream_buffer_t array
- * in the camera3_capture_request_t may be new and never-before-seen
- * by the HAL on any given new request.
- *
- * 8. The framework continues to submit requests, and call
- * construct_default_request_settings to get default settings buffers for
- * other use cases.
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * The framework may call register_stream_buffers() at this time for
- * not-yet-registered streams.
- *
- * 9. When the capture of a request begins (sensor starts exposing for the
- * capture) or processing a reprocess request begins, the HAL
- * calls camera3_callback_ops_t->notify() with the SHUTTER event, including
- * the frame number and the timestamp for start of exposure. For a reprocess
- * request, the timestamp must be the start of exposure of the input image
- * which can be looked up with android.sensor.timestamp from
- * camera3_capture_request_t.settings when process_capture_request() is
- * called.
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * This notify call must be made before the first call to
- * process_capture_result() for that frame number.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * The camera3_callback_ops_t->notify() call with the SHUTTER event should
- * be made as early as possible since the framework will be unable to
- * deliver gralloc buffers to the application layer (for that frame) until
- * it has a valid timestamp for the start of exposure (or the input image's
- * start of exposure for a reprocess request).
- *
- * Both partial metadata results and the gralloc buffers may be sent to the
- * framework at any time before or after the SHUTTER event.
- *
- * 10. After some pipeline delay, the HAL begins to return completed captures to
- * the framework with camera3_callback_ops_t->process_capture_result(). These
- * are returned in the same order as the requests were submitted. Multiple
- * requests can be in flight at once, depending on the pipeline depth of the
- * camera HAL device.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * Once a buffer is returned by process_capture_result as part of the
- * camera3_stream_buffer_t array, and the fence specified by release_fence
- * has been signaled (this is a no-op for -1 fences), the ownership of that
- * buffer is considered to be transferred back to the framework. After that,
- * the HAL must no longer retain that particular buffer, and the
- * framework may clean up the memory for it immediately.
- *
- * process_capture_result may be called multiple times for a single frame,
- * each time with a new disjoint piece of metadata and/or set of gralloc
- * buffers. The framework will accumulate these partial metadata results
- * into one result.
- *
- * In particular, it is legal for a process_capture_result to be called
- * simultaneously for both a frame N and a frame N+1 as long as the
- * above rule holds for gralloc buffers (both input and output).
- *
- * 11. After some time, the framework may stop submitting new requests, wait for
- * the existing captures to complete (all buffers filled, all results
- * returned), and then call configure_streams() again. This resets the camera
- * hardware and pipeline for a new set of input/output streams. Some streams
- * may be reused from the previous configuration; if these streams' buffers
- * had already been registered with the HAL, they will not be registered
- * again. The framework then continues from step 7, if at least one
- * registered output stream remains (otherwise, step 5 is required first).
- *
- * 12. Alternatively, the framework may call camera3_device_t->common->close()
- * to end the camera session. This may be called at any time when no other
- * calls from the framework are active, although the call may block until all
- * in-flight captures have completed (all results returned, all buffers
- * filled). After the close call returns, no more calls to the
- * camera3_callback_ops_t functions are allowed from the HAL. Once the
- * close() call is underway, the framework may not call any other HAL device
- * functions.
- *
- * 13. In case of an error or other asynchronous event, the HAL must call
- * camera3_callback_ops_t->notify() with the appropriate error/event
- * message. After returning from a fatal device-wide error notification, the
- * HAL should act as if close() had been called on it. However, the HAL must
- * either cancel or complete all outstanding captures before calling
- * notify(), so that once notify() is called with a fatal error, the
- * framework will not receive further callbacks from the device. Methods
- * besides close() should return -ENODEV or NULL after the notify() method
- * returns from a fatal error message.
- */
-
-/**
- * S3. Operational modes:
- *
- * The camera 3 HAL device can implement one of two possible operational modes;
- * limited and full. Full support is expected from new higher-end
- * devices. Limited mode has hardware requirements roughly in line with those
- * for a camera HAL device v1 implementation, and is expected from older or
- * inexpensive devices. Full is a strict superset of limited, and they share the
- * same essential operational flow, as documented above.
- *
- * The HAL must indicate its level of support with the
- * android.info.supportedHardwareLevel static metadata entry, with 0 indicating
- * limited mode, and 1 indicating full mode support.
- *
- * Roughly speaking, limited-mode devices do not allow for application control
- * of capture settings (3A control only), high-rate capture of high-resolution
- * images, raw sensor readout, or support for YUV output streams above maximum
- * recording resolution (JPEG only for large images).
- *
- * ** Details of limited mode behavior:
- *
- * - Limited-mode devices do not need to implement accurate synchronization
- * between capture request settings and the actual image data
- * captured. Instead, changes to settings may take effect some time in the
- * future, and possibly not for the same output frame for each settings
- * entry. Rapid changes in settings may result in some settings never being
- * used for a capture. However, captures that include high-resolution output
- * buffers ( > 1080p ) have to use the settings as specified (but see below
- * for processing rate).
- *
- * - Limited-mode devices do not need to support most of the
- * settings/result/static info metadata. Specifically, only the following settings
- * are expected to be consumed or produced by a limited-mode HAL device:
- *
- * android.control.aeAntibandingMode (controls and dynamic)
- * android.control.aeExposureCompensation (controls and dynamic)
- * android.control.aeLock (controls and dynamic)
- * android.control.aeMode (controls and dynamic)
- * android.control.aeRegions (controls and dynamic)
- * android.control.aeTargetFpsRange (controls and dynamic)
- * android.control.aePrecaptureTrigger (controls and dynamic)
- * android.control.afMode (controls and dynamic)
- * android.control.afRegions (controls and dynamic)
- * android.control.awbLock (controls and dynamic)
- * android.control.awbMode (controls and dynamic)
- * android.control.awbRegions (controls and dynamic)
- * android.control.captureIntent (controls and dynamic)
- * android.control.effectMode (controls and dynamic)
- * android.control.mode (controls and dynamic)
- * android.control.sceneMode (controls and dynamic)
- * android.control.videoStabilizationMode (controls and dynamic)
- * android.control.aeAvailableAntibandingModes (static)
- * android.control.aeAvailableModes (static)
- * android.control.aeAvailableTargetFpsRanges (static)
- * android.control.aeCompensationRange (static)
- * android.control.aeCompensationStep (static)
- * android.control.afAvailableModes (static)
- * android.control.availableEffects (static)
- * android.control.availableSceneModes (static)
- * android.control.availableVideoStabilizationModes (static)
- * android.control.awbAvailableModes (static)
- * android.control.maxRegions (static)
- * android.control.sceneModeOverrides (static)
- * android.control.aeState (dynamic)
- * android.control.afState (dynamic)
- * android.control.awbState (dynamic)
- *
- * android.flash.mode (controls and dynamic)
- * android.flash.info.available (static)
- *
- * android.info.supportedHardwareLevel (static)
- *
- * android.jpeg.gpsCoordinates (controls and dynamic)
- * android.jpeg.gpsProcessingMethod (controls and dynamic)
- * android.jpeg.gpsTimestamp (controls and dynamic)
- * android.jpeg.orientation (controls and dynamic)
- * android.jpeg.quality (controls and dynamic)
- * android.jpeg.thumbnailQuality (controls and dynamic)
- * android.jpeg.thumbnailSize (controls and dynamic)
- * android.jpeg.availableThumbnailSizes (static)
- * android.jpeg.maxSize (static)
- *
- * android.lens.info.minimumFocusDistance (static)
- *
- * android.request.id (controls and dynamic)
- *
- * android.scaler.cropRegion (controls and dynamic)
- * android.scaler.availableStreamConfigurations (static)
- * android.scaler.availableMinFrameDurations (static)
- * android.scaler.availableStallDurations (static)
- * android.scaler.availableMaxDigitalZoom (static)
- * android.scaler.maxDigitalZoom (static)
- * android.scaler.croppingType (static)
- *
- * android.sensor.orientation (static)
- * android.sensor.timestamp (dynamic)
- *
- * android.statistics.faceDetectMode (controls and dynamic)
- * android.statistics.info.availableFaceDetectModes (static)
- * android.statistics.faceIds (dynamic)
- * android.statistics.faceLandmarks (dynamic)
- * android.statistics.faceRectangles (dynamic)
- * android.statistics.faceScores (dynamic)
- *
- * android.sync.frameNumber (dynamic)
- * android.sync.maxLatency (static)
- *
- * - Captures in limited mode that include high-resolution (> 1080p) output
- * buffers may block in process_capture_request() until all the output buffers
- * have been filled. A full-mode HAL device must process sequences of
- * high-resolution requests at the rate indicated in the static metadata for
- * that pixel format. The HAL must still call process_capture_result() to
- * provide the output; the framework must simply be prepared for
- * process_capture_request() to block until after process_capture_result() for
- * that request completes for high-resolution captures for limited-mode
- * devices.
- *
- * - Full-mode devices must support below additional capabilities:
- * - 30fps at maximum resolution is preferred, more than 20fps is required.
- * - Per frame control (android.sync.maxLatency == PER_FRAME_CONTROL).
- * - Sensor manual control metadata. See MANUAL_SENSOR defined in
- * android.request.availableCapabilities.
- * - Post-processing manual control metadata. See MANUAL_POST_PROCESSING defined
- * in android.request.availableCapabilities.
- *
- */
-
-/**
- * S4. 3A modes and state machines:
- *
- * While the actual 3A algorithms are up to the HAL implementation, a high-level
- * state machine description is defined by the HAL interface, to allow the HAL
- * device and the framework to communicate about the current state of 3A, and to
- * trigger 3A events.
- *
- * When the device is opened, all the individual 3A states must be
- * STATE_INACTIVE. Stream configuration does not reset 3A. For example, locked
- * focus must be maintained across the configure() call.
- *
- * Triggering a 3A action involves simply setting the relevant trigger entry in
- * the settings for the next request to indicate start of trigger. For example,
- * the trigger for starting an autofocus scan is setting the entry
- * ANDROID_CONTROL_AF_TRIGGER to ANDROID_CONTROL_AF_TRIGGER_START for one
- * request, and cancelling an autofocus scan is triggered by setting
- * ANDROID_CONTROL_AF_TRIGGER to ANDROID_CONTRL_AF_TRIGGER_CANCEL. Otherwise,
- * the entry will not exist, or be set to ANDROID_CONTROL_AF_TRIGGER_IDLE. Each
- * request with a trigger entry set to a non-IDLE value will be treated as an
- * independent triggering event.
- *
- * At the top level, 3A is controlled by the ANDROID_CONTROL_MODE setting, which
- * selects between no 3A (ANDROID_CONTROL_MODE_OFF), normal AUTO mode
- * (ANDROID_CONTROL_MODE_AUTO), and using the scene mode setting
- * (ANDROID_CONTROL_USE_SCENE_MODE).
- *
- * - In OFF mode, each of the individual AE/AF/AWB modes are effectively OFF,
- * and none of the capture controls may be overridden by the 3A routines.
- *
- * - In AUTO mode, Auto-focus, auto-exposure, and auto-whitebalance all run
- * their own independent algorithms, and have their own mode, state, and
- * trigger metadata entries, as listed in the next section.
- *
- * - In USE_SCENE_MODE, the value of the ANDROID_CONTROL_SCENE_MODE entry must
- * be used to determine the behavior of 3A routines. In SCENE_MODEs other than
- * FACE_PRIORITY, the HAL must override the values of
- * ANDROId_CONTROL_AE/AWB/AF_MODE to be the mode it prefers for the selected
- * SCENE_MODE. For example, the HAL may prefer SCENE_MODE_NIGHT to use
- * CONTINUOUS_FOCUS AF mode. Any user selection of AE/AWB/AF_MODE when scene
- * must be ignored for these scene modes.
- *
- * - For SCENE_MODE_FACE_PRIORITY, the AE/AWB/AF_MODE controls work as in
- * ANDROID_CONTROL_MODE_AUTO, but the 3A routines must bias toward metering
- * and focusing on any detected faces in the scene.
- *
- * S4.1. Auto-focus settings and result entries:
- *
- * Main metadata entries:
- *
- * ANDROID_CONTROL_AF_MODE: Control for selecting the current autofocus
- * mode. Set by the framework in the request settings.
- *
- * AF_MODE_OFF: AF is disabled; the framework/app directly controls lens
- * position.
- *
- * AF_MODE_AUTO: Single-sweep autofocus. No lens movement unless AF is
- * triggered.
- *
- * AF_MODE_MACRO: Single-sweep up-close autofocus. No lens movement unless
- * AF is triggered.
- *
- * AF_MODE_CONTINUOUS_VIDEO: Smooth continuous focusing, for recording
- * video. Triggering immediately locks focus in current
- * position. Canceling resumes cotinuous focusing.
- *
- * AF_MODE_CONTINUOUS_PICTURE: Fast continuous focusing, for
- * zero-shutter-lag still capture. Triggering locks focus once currently
- * active sweep concludes. Canceling resumes continuous focusing.
- *
- * AF_MODE_EDOF: Advanced extended depth of field focusing. There is no
- * autofocus scan, so triggering one or canceling one has no effect.
- * Images are focused automatically by the HAL.
- *
- * ANDROID_CONTROL_AF_STATE: Dynamic metadata describing the current AF
- * algorithm state, reported by the HAL in the result metadata.
- *
- * AF_STATE_INACTIVE: No focusing has been done, or algorithm was
- * reset. Lens is not moving. Always the state for MODE_OFF or MODE_EDOF.
- * When the device is opened, it must start in this state.
- *
- * AF_STATE_PASSIVE_SCAN: A continuous focus algorithm is currently scanning
- * for good focus. The lens is moving.
- *
- * AF_STATE_PASSIVE_FOCUSED: A continuous focus algorithm believes it is
- * well focused. The lens is not moving. The HAL may spontaneously leave
- * this state.
- *
- * AF_STATE_PASSIVE_UNFOCUSED: A continuous focus algorithm believes it is
- * not well focused. The lens is not moving. The HAL may spontaneously
- * leave this state.
- *
- * AF_STATE_ACTIVE_SCAN: A scan triggered by the user is underway.
- *
- * AF_STATE_FOCUSED_LOCKED: The AF algorithm believes it is focused. The
- * lens is not moving.
- *
- * AF_STATE_NOT_FOCUSED_LOCKED: The AF algorithm has been unable to
- * focus. The lens is not moving.
- *
- * ANDROID_CONTROL_AF_TRIGGER: Control for starting an autofocus scan, the
- * meaning of which is mode- and state- dependent. Set by the framework in
- * the request settings.
- *
- * AF_TRIGGER_IDLE: No current trigger.
- *
- * AF_TRIGGER_START: Trigger start of AF scan. Effect is mode and state
- * dependent.
- *
- * AF_TRIGGER_CANCEL: Cancel current AF scan if any, and reset algorithm to
- * default.
- *
- * Additional metadata entries:
- *
- * ANDROID_CONTROL_AF_REGIONS: Control for selecting the regions of the FOV
- * that should be used to determine good focus. This applies to all AF
- * modes that scan for focus. Set by the framework in the request
- * settings.
- *
- * S4.2. Auto-exposure settings and result entries:
- *
- * Main metadata entries:
- *
- * ANDROID_CONTROL_AE_MODE: Control for selecting the current auto-exposure
- * mode. Set by the framework in the request settings.
- *
- * AE_MODE_OFF: Autoexposure is disabled; the user controls exposure, gain,
- * frame duration, and flash.
- *
- * AE_MODE_ON: Standard autoexposure, with flash control disabled. User may
- * set flash to fire or to torch mode.
- *
- * AE_MODE_ON_AUTO_FLASH: Standard autoexposure, with flash on at HAL's
- * discretion for precapture and still capture. User control of flash
- * disabled.
- *
- * AE_MODE_ON_ALWAYS_FLASH: Standard autoexposure, with flash always fired
- * for capture, and at HAL's discretion for precapture.. User control of
- * flash disabled.
- *
- * AE_MODE_ON_AUTO_FLASH_REDEYE: Standard autoexposure, with flash on at
- * HAL's discretion for precapture and still capture. Use a flash burst
- * at end of precapture sequence to reduce redeye in the final
- * picture. User control of flash disabled.
- *
- * ANDROID_CONTROL_AE_STATE: Dynamic metadata describing the current AE
- * algorithm state, reported by the HAL in the result metadata.
- *
- * AE_STATE_INACTIVE: Initial AE state after mode switch. When the device is
- * opened, it must start in this state.
- *
- * AE_STATE_SEARCHING: AE is not converged to a good value, and is adjusting
- * exposure parameters.
- *
- * AE_STATE_CONVERGED: AE has found good exposure values for the current
- * scene, and the exposure parameters are not changing. HAL may
- * spontaneously leave this state to search for better solution.
- *
- * AE_STATE_LOCKED: AE has been locked with the AE_LOCK control. Exposure
- * values are not changing.
- *
- * AE_STATE_FLASH_REQUIRED: The HAL has converged exposure, but believes
- * flash is required for a sufficiently bright picture. Used for
- * determining if a zero-shutter-lag frame can be used.
- *
- * AE_STATE_PRECAPTURE: The HAL is in the middle of a precapture
- * sequence. Depending on AE mode, this mode may involve firing the
- * flash for metering, or a burst of flash pulses for redeye reduction.
- *
- * ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER: Control for starting a metering
- * sequence before capturing a high-quality image. Set by the framework in
- * the request settings.
- *
- * PRECAPTURE_TRIGGER_IDLE: No current trigger.
- *
- * PRECAPTURE_TRIGGER_START: Start a precapture sequence. The HAL should
- * use the subsequent requests to measure good exposure/white balance
- * for an upcoming high-resolution capture.
- *
- * Additional metadata entries:
- *
- * ANDROID_CONTROL_AE_LOCK: Control for locking AE controls to their current
- * values
- *
- * ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION: Control for adjusting AE
- * algorithm target brightness point.
- *
- * ANDROID_CONTROL_AE_TARGET_FPS_RANGE: Control for selecting the target frame
- * rate range for the AE algorithm. The AE routine cannot change the frame
- * rate to be outside these bounds.
- *
- * ANDROID_CONTROL_AE_REGIONS: Control for selecting the regions of the FOV
- * that should be used to determine good exposure levels. This applies to
- * all AE modes besides OFF.
- *
- * S4.3. Auto-whitebalance settings and result entries:
- *
- * Main metadata entries:
- *
- * ANDROID_CONTROL_AWB_MODE: Control for selecting the current white-balance
- * mode.
- *
- * AWB_MODE_OFF: Auto-whitebalance is disabled. User controls color matrix.
- *
- * AWB_MODE_AUTO: Automatic white balance is enabled; 3A controls color
- * transform, possibly using more complex transforms than a simple
- * matrix.
- *
- * AWB_MODE_INCANDESCENT: Fixed white balance settings good for indoor
- * incandescent (tungsten) lighting, roughly 2700K.
- *
- * AWB_MODE_FLUORESCENT: Fixed white balance settings good for fluorescent
- * lighting, roughly 5000K.
- *
- * AWB_MODE_WARM_FLUORESCENT: Fixed white balance settings good for
- * fluorescent lighting, roughly 3000K.
- *
- * AWB_MODE_DAYLIGHT: Fixed white balance settings good for daylight,
- * roughly 5500K.
- *
- * AWB_MODE_CLOUDY_DAYLIGHT: Fixed white balance settings good for clouded
- * daylight, roughly 6500K.
- *
- * AWB_MODE_TWILIGHT: Fixed white balance settings good for
- * near-sunset/sunrise, roughly 15000K.
- *
- * AWB_MODE_SHADE: Fixed white balance settings good for areas indirectly
- * lit by the sun, roughly 7500K.
- *
- * ANDROID_CONTROL_AWB_STATE: Dynamic metadata describing the current AWB
- * algorithm state, reported by the HAL in the result metadata.
- *
- * AWB_STATE_INACTIVE: Initial AWB state after mode switch. When the device
- * is opened, it must start in this state.
- *
- * AWB_STATE_SEARCHING: AWB is not converged to a good value, and is
- * changing color adjustment parameters.
- *
- * AWB_STATE_CONVERGED: AWB has found good color adjustment values for the
- * current scene, and the parameters are not changing. HAL may
- * spontaneously leave this state to search for better solution.
- *
- * AWB_STATE_LOCKED: AWB has been locked with the AWB_LOCK control. Color
- * adjustment values are not changing.
- *
- * Additional metadata entries:
- *
- * ANDROID_CONTROL_AWB_LOCK: Control for locking AWB color adjustments to
- * their current values.
- *
- * ANDROID_CONTROL_AWB_REGIONS: Control for selecting the regions of the FOV
- * that should be used to determine good color balance. This applies only
- * to auto-WB mode.
- *
- * S4.4. General state machine transition notes
- *
- * Switching between AF, AE, or AWB modes always resets the algorithm's state
- * to INACTIVE. Similarly, switching between CONTROL_MODE or
- * CONTROL_SCENE_MODE if CONTROL_MODE == USE_SCENE_MODE resets all the
- * algorithm states to INACTIVE.
- *
- * The tables below are per-mode.
- *
- * S4.5. AF state machines
- *
- * when enabling AF or changing AF mode
- *| state | trans. cause | new state | notes |
- *+--------------------+---------------+--------------------+------------------+
- *| Any | AF mode change| INACTIVE | |
- *+--------------------+---------------+--------------------+------------------+
- *
- * mode = AF_MODE_OFF or AF_MODE_EDOF
- *| state | trans. cause | new state | notes |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | | INACTIVE | Never changes |
- *+--------------------+---------------+--------------------+------------------+
- *
- * mode = AF_MODE_AUTO or AF_MODE_MACRO
- *| state | trans. cause | new state | notes |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | AF_TRIGGER | ACTIVE_SCAN | Start AF sweep |
- *| | | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| ACTIVE_SCAN | AF sweep done | FOCUSED_LOCKED | If AF successful |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| ACTIVE_SCAN | AF sweep done | NOT_FOCUSED_LOCKED | If AF successful |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| ACTIVE_SCAN | AF_CANCEL | INACTIVE | Cancel/reset AF |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF |
- *+--------------------+---------------+--------------------+------------------+
- *| FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep |
- *| | | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF |
- *+--------------------+---------------+--------------------+------------------+
- *| NOT_FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep |
- *| | | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| All states | mode change | INACTIVE | |
- *+--------------------+---------------+--------------------+------------------+
- *
- * mode = AF_MODE_CONTINUOUS_VIDEO
- *| state | trans. cause | new state | notes |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | HAL initiates | PASSIVE_SCAN | Start AF scan |
- *| | new scan | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | HAL completes | PASSIVE_FOCUSED | End AF scan |
- *| | current scan | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | HAL fails | PASSIVE_UNFOCUSED | End AF scan |
- *| | current scan | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. |
- *| | | | if focus is good |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. |
- *| | | | if focus is bad |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens |
- *| | | | position |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_FOCUSED | HAL initiates | PASSIVE_SCAN | Start AF scan |
- *| | new scan | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_UNFOCUSED | HAL initiates | PASSIVE_SCAN | Start AF scan |
- *| | new scan | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect |
- *+--------------------+---------------+--------------------+------------------+
- *| FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
- *+--------------------+---------------+--------------------+------------------+
- *| NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect |
- *+--------------------+---------------+--------------------+------------------+
- *| NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
- *+--------------------+---------------+--------------------+------------------+
- *
- * mode = AF_MODE_CONTINUOUS_PICTURE
- *| state | trans. cause | new state | notes |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | HAL initiates | PASSIVE_SCAN | Start AF scan |
- *| | new scan | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | HAL completes | PASSIVE_FOCUSED | End AF scan |
- *| | current scan | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | HAL fails | PASSIVE_UNFOCUSED | End AF scan |
- *| | current scan | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Eventual trans. |
- *| | | | once focus good |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Eventual trans. |
- *| | | | if cannot focus |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens |
- *| | | | position |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_FOCUSED | HAL initiates | PASSIVE_SCAN | Start AF scan |
- *| | new scan | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_UNFOCUSED | HAL initiates | PASSIVE_SCAN | Start AF scan |
- *| | new scan | | Lens now moving |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. |
- *| | | | Lens now locked |
- *+--------------------+---------------+--------------------+------------------+
- *| FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect |
- *+--------------------+---------------+--------------------+------------------+
- *| FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
- *+--------------------+---------------+--------------------+------------------+
- *| NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect |
- *+--------------------+---------------+--------------------+------------------+
- *| NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
- *+--------------------+---------------+--------------------+------------------+
- *
- * S4.6. AE and AWB state machines
- *
- * The AE and AWB state machines are mostly identical. AE has additional
- * FLASH_REQUIRED and PRECAPTURE states. So rows below that refer to those two
- * states should be ignored for the AWB state machine.
- *
- * when enabling AE/AWB or changing AE/AWB mode
- *| state | trans. cause | new state | notes |
- *+--------------------+---------------+--------------------+------------------+
- *| Any | mode change | INACTIVE | |
- *+--------------------+---------------+--------------------+------------------+
- *
- * mode = AE_MODE_OFF / AWB mode not AUTO
- *| state | trans. cause | new state | notes |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | | INACTIVE | AE/AWB disabled |
- *+--------------------+---------------+--------------------+------------------+
- *
- * mode = AE_MODE_ON_* / AWB_MODE_AUTO
- *| state | trans. cause | new state | notes |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | HAL initiates | SEARCHING | |
- *| | AE/AWB scan | | |
- *+--------------------+---------------+--------------------+------------------+
- *| INACTIVE | AE/AWB_LOCK | LOCKED | values locked |
- *| | on | | |
- *+--------------------+---------------+--------------------+------------------+
- *| SEARCHING | HAL finishes | CONVERGED | good values, not |
- *| | AE/AWB scan | | changing |
- *+--------------------+---------------+--------------------+------------------+
- *| SEARCHING | HAL finishes | FLASH_REQUIRED | converged but too|
- *| | AE scan | | dark w/o flash |
- *+--------------------+---------------+--------------------+------------------+
- *| SEARCHING | AE/AWB_LOCK | LOCKED | values locked |
- *| | on | | |
- *+--------------------+---------------+--------------------+------------------+
- *| CONVERGED | HAL initiates | SEARCHING | values locked |
- *| | AE/AWB scan | | |
- *+--------------------+---------------+--------------------+------------------+
- *| CONVERGED | AE/AWB_LOCK | LOCKED | values locked |
- *| | on | | |
- *+--------------------+---------------+--------------------+------------------+
- *| FLASH_REQUIRED | HAL initiates | SEARCHING | values locked |
- *| | AE/AWB scan | | |
- *+--------------------+---------------+--------------------+------------------+
- *| FLASH_REQUIRED | AE/AWB_LOCK | LOCKED | values locked |
- *| | on | | |
- *+--------------------+---------------+--------------------+------------------+
- *| LOCKED | AE/AWB_LOCK | SEARCHING | values not good |
- *| | off | | after unlock |
- *+--------------------+---------------+--------------------+------------------+
- *| LOCKED | AE/AWB_LOCK | CONVERGED | values good |
- *| | off | | after unlock |
- *+--------------------+---------------+--------------------+------------------+
- *| LOCKED | AE_LOCK | FLASH_REQUIRED | exposure good, |
- *| | off | | but too dark |
- *+--------------------+---------------+--------------------+------------------+
- *| All AE states | PRECAPTURE_ | PRECAPTURE | Start precapture |
- *| | START | | sequence |
- *+--------------------+---------------+--------------------+------------------+
- *| PRECAPTURE | Sequence done.| CONVERGED | Ready for high- |
- *| | AE_LOCK off | | quality capture |
- *+--------------------+---------------+--------------------+------------------+
- *| PRECAPTURE | Sequence done.| LOCKED | Ready for high- |
- *| | AE_LOCK on | | quality capture |
- *+--------------------+---------------+--------------------+------------------+
- *
- */
-
-/**
- * S5. Cropping:
- *
- * Cropping of the full pixel array (for digital zoom and other use cases where
- * a smaller FOV is desirable) is communicated through the
- * ANDROID_SCALER_CROP_REGION setting. This is a per-request setting, and can
- * change on a per-request basis, which is critical for implementing smooth
- * digital zoom.
- *
- * The region is defined as a rectangle (x, y, width, height), with (x, y)
- * describing the top-left corner of the rectangle. The rectangle is defined on
- * the coordinate system of the sensor active pixel array, with (0,0) being the
- * top-left pixel of the active pixel array. Therefore, the width and height
- * cannot be larger than the dimensions reported in the
- * ANDROID_SENSOR_ACTIVE_PIXEL_ARRAY static info field. The minimum allowed
- * width and height are reported by the HAL through the
- * ANDROID_SCALER_MAX_DIGITAL_ZOOM static info field, which describes the
- * maximum supported zoom factor. Therefore, the minimum crop region width and
- * height are:
- *
- * {width, height} =
- * { floor(ANDROID_SENSOR_ACTIVE_PIXEL_ARRAY[0] /
- * ANDROID_SCALER_MAX_DIGITAL_ZOOM),
- * floor(ANDROID_SENSOR_ACTIVE_PIXEL_ARRAY[1] /
- * ANDROID_SCALER_MAX_DIGITAL_ZOOM) }
- *
- * If the crop region needs to fulfill specific requirements (for example, it
- * needs to start on even coordinates, and its width/height needs to be even),
- * the HAL must do the necessary rounding and write out the final crop region
- * used in the output result metadata. Similarly, if the HAL implements video
- * stabilization, it must adjust the result crop region to describe the region
- * actually included in the output after video stabilization is applied. In
- * general, a camera-using application must be able to determine the field of
- * view it is receiving based on the crop region, the dimensions of the image
- * sensor, and the lens focal length.
- *
- * It is assumed that the cropping is applied after raw to other color space
- * conversion. Raw streams (RAW16 and RAW_OPAQUE) don't have this conversion stage,
- * and are not croppable. Therefore, the crop region must be ignored by the HAL
- * for raw streams.
- *
- * Since the crop region applies to all non-raw streams, which may have different aspect
- * ratios than the crop region, the exact sensor region used for each stream may
- * be smaller than the crop region. Specifically, each stream should maintain
- * square pixels and its aspect ratio by minimally further cropping the defined
- * crop region. If the stream's aspect ratio is wider than the crop region, the
- * stream should be further cropped vertically, and if the stream's aspect ratio
- * is narrower than the crop region, the stream should be further cropped
- * horizontally.
- *
- * In all cases, the stream crop must be centered within the full crop region,
- * and each stream is only either cropped horizontally or vertical relative to
- * the full crop region, never both.
- *
- * For example, if two streams are defined, a 640x480 stream (4:3 aspect), and a
- * 1280x720 stream (16:9 aspect), below demonstrates the expected output regions
- * for each stream for a few sample crop regions, on a hypothetical 3 MP (2000 x
- * 1500 pixel array) sensor.
- *
- * Crop region: (500, 375, 1000, 750) (4:3 aspect ratio)
- *
- * 640x480 stream crop: (500, 375, 1000, 750) (equal to crop region)
- * 1280x720 stream crop: (500, 469, 1000, 562) (marked with =)
- *
- * 0 1000 2000
- * +---------+---------+---------+----------+
- * | Active pixel array |
- * | |
- * | |
- * + +-------------------+ + 375
- * | | | |
- * | O===================O |
- * | I 1280x720 stream I |
- * + I I + 750
- * | I I |
- * | O===================O |
- * | | | |
- * + +-------------------+ + 1125
- * | Crop region, 640x480 stream |
- * | |
- * | |
- * +---------+---------+---------+----------+ 1500
- *
- * Crop region: (500, 375, 1333, 750) (16:9 aspect ratio)
- *
- * 640x480 stream crop: (666, 375, 1000, 750) (marked with =)
- * 1280x720 stream crop: (500, 375, 1333, 750) (equal to crop region)
- *
- * 0 1000 2000
- * +---------+---------+---------+----------+
- * | Active pixel array |
- * | |
- * | |
- * + +---O==================O---+ + 375
- * | | I 640x480 stream I | |
- * | | I I | |
- * | | I I | |
- * + | I I | + 750
- * | | I I | |
- * | | I I | |
- * | | I I | |
- * + +---O==================O---+ + 1125
- * | Crop region, 1280x720 stream |
- * | |
- * | |
- * +---------+---------+---------+----------+ 1500
- *
- * Crop region: (500, 375, 750, 750) (1:1 aspect ratio)
- *
- * 640x480 stream crop: (500, 469, 750, 562) (marked with =)
- * 1280x720 stream crop: (500, 543, 750, 414) (marged with #)
- *
- * 0 1000 2000
- * +---------+---------+---------+----------+
- * | Active pixel array |
- * | |
- * | |
- * + +--------------+ + 375
- * | O==============O |
- * | ################ |
- * | # # |
- * + # # + 750
- * | # # |
- * | ################ 1280x720 |
- * | O==============O 640x480 |
- * + +--------------+ + 1125
- * | Crop region |
- * | |
- * | |
- * +---------+---------+---------+----------+ 1500
- *
- * And a final example, a 1024x1024 square aspect ratio stream instead of the
- * 480p stream:
- *
- * Crop region: (500, 375, 1000, 750) (4:3 aspect ratio)
- *
- * 1024x1024 stream crop: (625, 375, 750, 750) (marked with #)
- * 1280x720 stream crop: (500, 469, 1000, 562) (marked with =)
- *
- * 0 1000 2000
- * +---------+---------+---------+----------+
- * | Active pixel array |
- * | |
- * | 1024x1024 stream |
- * + +--###############--+ + 375
- * | | # # | |
- * | O===================O |
- * | I 1280x720 stream I |
- * + I I + 750
- * | I I |
- * | O===================O |
- * | | # # | |
- * + +--###############--+ + 1125
- * | Crop region |
- * | |
- * | |
- * +---------+---------+---------+----------+ 1500
- *
- */
-
-/**
- * S6. Error management:
- *
- * Camera HAL device ops functions that have a return value will all return
- * -ENODEV / NULL in case of a serious error. This means the device cannot
- * continue operation, and must be closed by the framework. Once this error is
- * returned by some method, or if notify() is called with ERROR_DEVICE, only
- * the close() method can be called successfully. All other methods will return
- * -ENODEV / NULL.
- *
- * If a device op is called in the wrong sequence, for example if the framework
- * calls configure_streams() is called before initialize(), the device must
- * return -ENOSYS from the call, and do nothing.
- *
- * Transient errors in image capture must be reported through notify() as follows:
- *
- * - The failure of an entire capture to occur must be reported by the HAL by
- * calling notify() with ERROR_REQUEST. Individual errors for the result
- * metadata or the output buffers must not be reported in this case.
- *
- * - If the metadata for a capture cannot be produced, but some image buffers
- * were filled, the HAL must call notify() with ERROR_RESULT.
- *
- * - If an output image buffer could not be filled, but either the metadata was
- * produced or some other buffers were filled, the HAL must call notify() with
- * ERROR_BUFFER for each failed buffer.
- *
- * In each of these transient failure cases, the HAL must still call
- * process_capture_result, with valid output and input (if an input buffer was
- * submitted) buffer_handle_t. If the result metadata could not be produced, it
- * should be NULL. If some buffers could not be filled, they must be returned with
- * process_capture_result in the error state, their release fences must be set to
- * the acquire fences passed by the framework, or -1 if they have been waited on by
- * the HAL already.
- *
- * Invalid input arguments result in -EINVAL from the appropriate methods. In
- * that case, the framework must act as if that call had never been made.
- *
- */
-
-/**
- * S7. Key Performance Indicator (KPI) glossary:
- *
- * This includes some critical definitions that are used by KPI metrics.
- *
- * Pipeline Latency:
- * For a given capture request, the duration from the framework calling
- * process_capture_request to the HAL sending capture result and all buffers
- * back by process_capture_result call. To make the Pipeline Latency measure
- * independent of frame rate, it is measured by frame count.
- *
- * For example, when frame rate is 30 (fps), the frame duration (time interval
- * between adjacent frame capture time) is 33 (ms).
- * If it takes 5 frames for framework to get the result and buffers back for
- * a given request, then the Pipeline Latency is 5 (frames), instead of
- * 5 x 33 = 165 (ms).
- *
- * The Pipeline Latency is determined by android.request.pipelineDepth and
- * android.request.pipelineMaxDepth, see their definitions for more details.
- *
- */
-
-/**
- * S8. Sample Use Cases:
- *
- * This includes some typical use case examples the camera HAL may support.
- *
- * S8.1 Zero Shutter Lag (ZSL) with CAMERA3_STREAM_BIDIRECTIONAL stream.
- *
- * For this use case, the bidirectional stream will be used by the framework as follows:
- *
- * 1. The framework includes a buffer from this stream as output buffer in a
- * request as normal.
- *
- * 2. Once the HAL device returns a filled output buffer to the framework,
- * the framework may do one of two things with the filled buffer:
- *
- * 2. a. The framework uses the filled data, and returns the now-used buffer
- * to the stream queue for reuse. This behavior exactly matches the
- * OUTPUT type of stream.
- *
- * 2. b. The framework wants to reprocess the filled data, and uses the
- * buffer as an input buffer for a request. Once the HAL device has
- * used the reprocessing buffer, it then returns it to the
- * framework. The framework then returns the now-used buffer to the
- * stream queue for reuse.
- *
- * 3. The HAL device will be given the buffer again as an output buffer for
- * a request at some future point.
- *
- * For ZSL use case, the pixel format for bidirectional stream will be
- * HAL_PIXEL_FORMAT_RAW_OPAQUE or HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED if it
- * is listed in android.scaler.availableInputOutputFormatsMap. When
- * HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is used, the gralloc
- * usage flags for the consumer endpoint will be set to GRALLOC_USAGE_HW_CAMERA_ZSL.
- * A configuration stream list that has BIDIRECTIONAL stream used as input, will
- * usually also have a distinct OUTPUT stream to get the reprocessing data. For example,
- * for the ZSL use case, the stream list might be configured with the following:
- *
- * - A HAL_PIXEL_FORMAT_RAW_OPAQUE bidirectional stream is used
- * as input.
- * - And a HAL_PIXEL_FORMAT_BLOB (JPEG) output stream.
- *
- * S8.2 ZSL (OPAQUE) reprocessing with CAMERA3_STREAM_INPUT stream.
- *
- * CAMERA_DEVICE_API_VERSION_3_3:
- * When OPAQUE_REPROCESSING capability is supported by the camera device, the INPUT stream
- * can be used for application/framework implemented use case like Zero Shutter Lag (ZSL).
- * This kind of stream will be used by the framework as follows:
- *
- * 1. Application/framework configures an opaque (RAW or YUV based) format output stream that is
- * used to produce the ZSL output buffers. The stream pixel format will be
- * HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED.
- *
- * 2. Application/framework configures an opaque format input stream that is used to
- * send the reprocessing ZSL buffers to the HAL. The stream pixel format will
- * also be HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED.
- *
- * 3. Application/framework configures a YUV/JPEG output stream that is used to receive the
- * reprocessed data. The stream pixel format will be YCbCr_420/HAL_PIXEL_FORMAT_BLOB.
- *
- * 4. Application/framework picks a ZSL buffer from the ZSL output stream when a ZSL capture is
- * issued by the application, and sends the data back as an input buffer in a
- * reprocessing request, then sends to the HAL for reprocessing.
- *
- * 5. The HAL sends back the output YUV/JPEG result to framework.
- *
- * The HAL can select the actual opaque buffer format and configure the ISP pipeline
- * appropriately based on the HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED format and
- * the gralloc usage flag GRALLOC_USAGE_HW_CAMERA_ZSL.
-
- * S8.3 YUV reprocessing with CAMERA3_STREAM_INPUT stream.
- *
- * When YUV reprocessing is supported by the HAL, the INPUT stream
- * can be used for the YUV reprocessing use cases like lucky-shot and image fusion.
- * This kind of stream will be used by the framework as follows:
- *
- * 1. Application/framework configures an YCbCr_420 format output stream that is
- * used to produce the output buffers.
- *
- * 2. Application/framework configures an YCbCr_420 format input stream that is used to
- * send the reprocessing YUV buffers to the HAL.
- *
- * 3. Application/framework configures a YUV/JPEG output stream that is used to receive the
- * reprocessed data. The stream pixel format will be YCbCr_420/HAL_PIXEL_FORMAT_BLOB.
- *
- * 4. Application/framework processes the output buffers (could be as simple as picking
- * an output buffer directly) from the output stream when a capture is issued, and sends
- * the data back as an input buffer in a reprocessing request, then sends to the HAL
- * for reprocessing.
- *
- * 5. The HAL sends back the output YUV/JPEG result to framework.
- *
- */
-
-/**
- * S9. Notes on Controls and Metadata
- *
- * This section contains notes about the interpretation and usage of various metadata tags.
- *
- * S9.1 HIGH_QUALITY and FAST modes.
- *
- * Many camera post-processing blocks may be listed as having HIGH_QUALITY,
- * FAST, and OFF operating modes. These blocks will typically also have an
- * 'available modes' tag representing which of these operating modes are
- * available on a given device. The general policy regarding implementing
- * these modes is as follows:
- *
- * 1. Operating mode controls of hardware blocks that cannot be disabled
- * must not list OFF in their corresponding 'available modes' tags.
- *
- * 2. OFF will always be included in their corresponding 'available modes'
- * tag if it is possible to disable that hardware block.
- *
- * 3. FAST must always be included in the 'available modes' tags for all
- * post-processing blocks supported on the device. If a post-processing
- * block also has a slower and higher quality operating mode that does
- * not meet the framerate requirements for FAST mode, HIGH_QUALITY should
- * be included in the 'available modes' tag to represent this operating
- * mode.
- */
-
-/**
- * S10. Reprocessing flow and controls
- *
- * This section describes the OPAQUE and YUV reprocessing flow and controls. OPAQUE reprocessing
- * uses an opaque format that is not directly application-visible, and the application can
- * only select some of the output buffers and send back to HAL for reprocessing, while YUV
- * reprocessing gives the application opportunity to process the buffers before reprocessing.
- *
- * S8 gives the stream configurations for the typical reprocessing uses cases,
- * this section specifies the buffer flow and controls in more details.
- *
- * S10.1 OPAQUE (typically for ZSL use case) reprocessing flow and controls
- *
- * For OPAQUE reprocessing (e.g. ZSL) use case, after the application creates the specific
- * output and input streams, runtime buffer flow and controls are specified as below:
- *
- * 1. Application starts output streaming by sending repeating requests for output
- * opaque buffers and preview. The buffers are held by an application
- * maintained circular buffer. The requests are based on CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG
- * capture template, which should have all necessary settings that guarantee output
- * frame rate is not slowed down relative to sensor output frame rate.
- *
- * 2. When a capture is issued, the application selects one output buffer based
- * on application buffer selection logic, e.g. good AE and AF statistics etc.
- * Application then creates an reprocess request based on the capture result associated
- * with this selected buffer. The selected output buffer is now added to this reprocess
- * request as an input buffer, the output buffer of this reprocess request should be
- * either JPEG output buffer or YUV output buffer, or both, depending on the application
- * choice.
- *
- * 3. Application then alters the reprocess settings to get best image quality. The HAL must
- * support and only support below controls if the HAL support OPAQUE_REPROCESSING capability:
- * - android.jpeg.* (if JPEG buffer is included as one of the output)
- * - android.noiseReduction.mode (change to HIGH_QUALITY if it is supported)
- * - android.edge.mode (change to HIGH_QUALITY if it is supported)
- * All other controls must be ignored by the HAL.
- * 4. HAL processed the input buffer and return the output buffers in the capture results
- * as normal.
- *
- * S10.2 YUV reprocessing flow and controls
- *
- * The YUV reprocessing buffer flow is similar as OPAQUE reprocessing, with below difference:
- *
- * 1. Application may want to have finer granularity control of the intermediate YUV images
- * (before reprocessing). For example, application may choose
- * - android.noiseReduction.mode == MINIMAL
- * to make sure the no YUV domain noise reduction has applied to the output YUV buffers,
- * then it can do its own advanced noise reduction on them. For OPAQUE reprocessing case, this
- * doesn't matter, as long as the final reprocessed image has the best quality.
- * 2. Application may modify the YUV output buffer data. For example, for image fusion use
- * case, where multiple output images are merged together to improve the signal-to-noise
- * ratio (SNR). The input buffer may be generated from multiple buffers by the application.
- * To avoid excessive amount of noise reduction and insufficient amount of edge enhancement
- * being applied to the input buffer, the application can hint the HAL how much effective
- * exposure time improvement has been done by the application, then the HAL can adjust the
- * noise reduction and edge enhancement parameters to get best reprocessed image quality.
- * Below tag can be used for this purpose:
- * - android.reprocess.effectiveExposureFactor
- * The value would be exposure time increase factor applied to the original output image,
- * for example, if there are N image merged, the exposure time increase factor would be up
- * to sqrt(N). See this tag spec for more details.
- *
- * S10.3 Reprocessing pipeline characteristics
- *
- * Reprocessing pipeline has below different characteristics comparing with normal output
- * pipeline:
- *
- * 1. The reprocessing result can be returned ahead of the pending normal output results. But
- * the FIFO ordering must be maintained for all reprocessing results. For example, there are
- * below requests (A stands for output requests, B stands for reprocessing requests)
- * being processed by the HAL:
- * A1, A2, A3, A4, B1, A5, B2, A6...
- * result of B1 can be returned before A1-A4, but result of B2 must be returned after B1.
- * 2. Single input rule: For a given reprocessing request, all output buffers must be from the
- * input buffer, rather than sensor output. For example, if a reprocess request include both
- * JPEG and preview buffers, all output buffers must be produced from the input buffer
- * included by the reprocessing request, rather than sensor. The HAL must not output preview
- * buffers from sensor, while output JPEG buffer from the input buffer.
- * 3. Input buffer will be from camera output directly (ZSL case) or indirectly(image fusion
- * case). For the case where buffer is modified, the size will remain same. The HAL can
- * notify CAMERA3_MSG_ERROR_REQUEST if buffer from unknown source is sent.
- * 4. Result as reprocessing request: The HAL can expect that a reprocessing request is a copy
- * of one of the output results with minor allowed setting changes. The HAL can notify
- * CAMERA3_MSG_ERROR_REQUEST if a request from unknown source is issued.
- * 5. Output buffers may not be used as inputs across the configure stream boundary, This is
- * because an opaque stream like the ZSL output stream may have different actual image size
- * inside of the ZSL buffer to save power and bandwidth for smaller resolution JPEG capture.
- * The HAL may notify CAMERA3_MSG_ERROR_REQUEST if this case occurs.
- * 6. HAL Reprocess requests error reporting during flush should follow the same rule specified
- * by flush() method.
- *
- */
-
-__BEGIN_DECLS
-
-struct camera3_device;
-
-/**********************************************************************
- *
- * Camera3 stream and stream buffer definitions.
- *
- * These structs and enums define the handles and contents of the input and
- * output streams connecting the HAL to various framework and application buffer
- * consumers. Each stream is backed by a gralloc buffer queue.
- *
- */
-
-/**
- * camera3_stream_type_t:
- *
- * The type of the camera stream, which defines whether the camera HAL device is
- * the producer or the consumer for that stream, and how the buffers of the
- * stream relate to the other streams.
- */
-typedef enum camera3_stream_type {
- /**
- * This stream is an output stream; the camera HAL device will be
- * responsible for filling buffers from this stream with newly captured or
- * reprocessed image data.
- */
- CAMERA3_STREAM_OUTPUT = 0,
-
- /**
- * This stream is an input stream; the camera HAL device will be responsible
- * for reading buffers from this stream and sending them through the camera
- * processing pipeline, as if the buffer was a newly captured image from the
- * imager.
- *
- * The pixel format for input stream can be any format reported by
- * android.scaler.availableInputOutputFormatsMap. The pixel format of the
- * output stream that is used to produce the reprocessing data may be any
- * format reported by android.scaler.availableStreamConfigurations. The
- * supported input/output stream combinations depends the camera device
- * capabilities, see android.scaler.availableInputOutputFormatsMap for
- * stream map details.
- *
- * This kind of stream is generally used to reprocess data into higher
- * quality images (that otherwise would cause a frame rate performance
- * loss), or to do off-line reprocessing.
- *
- * CAMERA_DEVICE_API_VERSION_3_3:
- * The typical use cases are OPAQUE (typically ZSL) and YUV reprocessing,
- * see S8.2, S8.3 and S10 for more details.
- */
- CAMERA3_STREAM_INPUT = 1,
-
- /**
- * This stream can be used for input and output. Typically, the stream is
- * used as an output stream, but occasionally one already-filled buffer may
- * be sent back to the HAL device for reprocessing.
- *
- * This kind of stream is meant generally for Zero Shutter Lag (ZSL)
- * features, where copying the captured image from the output buffer to the
- * reprocessing input buffer would be expensive. See S8.1 for more details.
- *
- * Note that the HAL will always be reprocessing data it produced.
- *
- */
- CAMERA3_STREAM_BIDIRECTIONAL = 2,
-
- /**
- * Total number of framework-defined stream types
- */
- CAMERA3_NUM_STREAM_TYPES
-
-} camera3_stream_type_t;
-
-/**
- * camera3_stream_rotation_t:
- *
- * The required counterclockwise rotation of camera stream.
- */
-typedef enum camera3_stream_rotation {
- /* No rotation */
- CAMERA3_STREAM_ROTATION_0 = 0,
-
- /* Rotate by 90 degree counterclockwise */
- CAMERA3_STREAM_ROTATION_90 = 1,
-
- /* Rotate by 180 degree counterclockwise */
- CAMERA3_STREAM_ROTATION_180 = 2,
-
- /* Rotate by 270 degree counterclockwise */
- CAMERA3_STREAM_ROTATION_270 = 3
-} camera3_stream_rotation_t;
-
-/**
- * camera3_stream_configuration_mode_t:
- *
- * This defines the general operation mode for the HAL (for a given stream configuration), where
- * modes besides NORMAL have different semantics, and usually limit the generality of the API in
- * exchange for higher performance in some particular area.
- */
-typedef enum camera3_stream_configuration_mode {
- /**
- * Normal stream configuration operation mode. This is the default camera operation mode,
- * where all semantics of HAL APIs and metadata controls apply.
- */
- CAMERA3_STREAM_CONFIGURATION_NORMAL_MODE = 0,
-
- /**
- * Special constrained high speed operation mode for devices that can not support high
- * speed output in NORMAL mode. All streams in this configuration are operating at high speed
- * mode and have different characteristics and limitations to achieve high speed output.
- * The NORMAL mode can still be used for high speed output if the HAL can support high speed
- * output while satisfying all the semantics of HAL APIs and metadata controls. It is
- * recommended for the HAL to support high speed output in NORMAL mode (by advertising the high
- * speed FPS ranges in android.control.aeAvailableTargetFpsRanges) if possible.
- *
- * This mode has below limitations/requirements:
- *
- * 1. The HAL must support up to 2 streams with sizes reported by
- * android.control.availableHighSpeedVideoConfigurations.
- * 2. In this mode, the HAL is expected to output up to 120fps or higher. This mode must
- * support the targeted FPS range and size configurations reported by
- * android.control.availableHighSpeedVideoConfigurations.
- * 3. The HAL must support HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED output stream format.
- * 4. To achieve efficient high speed streaming, the HAL may have to aggregate
- * multiple frames together and send to camera device for processing where the request
- * controls are same for all the frames in this batch (batch mode). The HAL must support
- * max batch size and the max batch size requirements defined by
- * android.control.availableHighSpeedVideoConfigurations.
- * 5. In this mode, the HAL must override aeMode, awbMode, and afMode to ON, ON, and
- * CONTINUOUS_VIDEO, respectively. All post-processing block mode controls must be
- * overridden to be FAST. Therefore, no manual control of capture and post-processing
- * parameters is possible. All other controls operate the same as when
- * android.control.mode == AUTO. This means that all other android.control.* fields
- * must continue to work, such as
- *
- * android.control.aeTargetFpsRange
- * android.control.aeExposureCompensation
- * android.control.aeLock
- * android.control.awbLock
- * android.control.effectMode
- * android.control.aeRegions
- * android.control.afRegions
- * android.control.awbRegions
- * android.control.afTrigger
- * android.control.aePrecaptureTrigger
- *
- * Outside of android.control.*, the following controls must work:
- *
- * android.flash.mode (TORCH mode only, automatic flash for still capture will not work
- * since aeMode is ON)
- * android.lens.opticalStabilizationMode (if it is supported)
- * android.scaler.cropRegion
- * android.statistics.faceDetectMode (if it is supported)
- * 6. To reduce the amount of data passed across process boundaries at
- * high frame rate, within one batch, camera framework only propagates
- * the last shutter notify and the last capture results (including partial
- * results and final result) to the app. The shutter notifies and capture
- * results for the other requests in the batch are derived by
- * the camera framework. As a result, the HAL can return empty metadata
- * except for the last result in the batch.
- *
- * For more details about high speed stream requirements, see
- * android.control.availableHighSpeedVideoConfigurations and CONSTRAINED_HIGH_SPEED_VIDEO
- * capability defined in android.request.availableCapabilities.
- *
- * This mode only needs to be supported by HALs that include CONSTRAINED_HIGH_SPEED_VIDEO in
- * the android.request.availableCapabilities static metadata.
- */
- CAMERA3_STREAM_CONFIGURATION_CONSTRAINED_HIGH_SPEED_MODE = 1,
-
- /**
- * First value for vendor-defined stream configuration modes.
- */
- CAMERA3_VENDOR_STREAM_CONFIGURATION_MODE_START = 0x8000
-} camera3_stream_configuration_mode_t;
-
-/**
- * camera3_stream_t:
- *
- * A handle to a single camera input or output stream. A stream is defined by
- * the framework by its buffer resolution and format, and additionally by the
- * HAL with the gralloc usage flags and the maximum in-flight buffer count.
- *
- * The stream structures are owned by the framework, but pointers to a
- * camera3_stream passed into the HAL by configure_streams() are valid until the
- * end of the first subsequent configure_streams() call that _does not_ include
- * that camera3_stream as an argument, or until the end of the close() call.
- *
- * All camera3_stream framework-controlled members are immutable once the
- * camera3_stream is passed into configure_streams(). The HAL may only change
- * the HAL-controlled parameters during a configure_streams() call, except for
- * the contents of the private pointer.
- *
- * If a configure_streams() call returns a non-fatal error, all active streams
- * remain valid as if configure_streams() had not been called.
- *
- * The endpoint of the stream is not visible to the camera HAL device.
- * In DEVICE_API_VERSION_3_1, this was changed to share consumer usage flags
- * on streams where the camera is a producer (OUTPUT and BIDIRECTIONAL stream
- * types) see the usage field below.
- */
-typedef struct camera3_stream {
-
- /*****
- * Set by framework before configure_streams()
- */
-
- /**
- * The type of the stream, one of the camera3_stream_type_t values.
- */
- int stream_type;
-
- /**
- * The width in pixels of the buffers in this stream
- */
- uint32_t width;
-
- /**
- * The height in pixels of the buffers in this stream
- */
- uint32_t height;
-
- /**
- * The pixel format for the buffers in this stream. Format is a value from
- * the HAL_PIXEL_FORMAT_* list in system/core/include/system/graphics.h, or
- * from device-specific headers.
- *
- * If HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is used, then the platform
- * gralloc module will select a format based on the usage flags provided by
- * the camera device and the other endpoint of the stream.
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * The camera HAL device must inspect the buffers handed to it in the
- * subsequent register_stream_buffers() call to obtain the
- * implementation-specific format details, if necessary.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * register_stream_buffers() won't be called by the framework, so the HAL
- * should configure the ISP and sensor pipeline based purely on the sizes,
- * usage flags, and formats for the configured streams.
- */
- int format;
-
- /*****
- * Set by HAL during configure_streams().
- */
-
- /**
- * The gralloc usage flags for this stream, as needed by the HAL. The usage
- * flags are defined in gralloc.h (GRALLOC_USAGE_*), or in device-specific
- * headers.
- *
- * For output streams, these are the HAL's producer usage flags. For input
- * streams, these are the HAL's consumer usage flags. The usage flags from
- * the producer and the consumer will be combined together and then passed
- * to the platform gralloc HAL module for allocating the gralloc buffers for
- * each stream.
- *
- * Version information:
- *
- * == CAMERA_DEVICE_API_VERSION_3_0:
- *
- * No initial value guaranteed when passed via configure_streams().
- * HAL may not use this field as input, and must write over this field
- * with its usage flags.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * For stream_type OUTPUT and BIDIRECTIONAL, when passed via
- * configure_streams(), the initial value of this is the consumer's
- * usage flags. The HAL may use these consumer flags to decide stream
- * configuration.
- * For stream_type INPUT, when passed via configure_streams(), the initial
- * value of this is 0.
- * For all streams passed via configure_streams(), the HAL must write
- * over this field with its usage flags.
- *
- * From Android O, the usage flag for an output stream may be bitwise
- * combination of usage flags for multiple consumers, for the purpose of
- * sharing one camera stream between those consumers. The HAL must fail
- * configure_streams call with -EINVAL if the combined flags cannot be
- * supported due to imcompatible buffer format, dataSpace, or other hardware
- * limitations.
- */
- uint32_t usage;
-
- /**
- * The maximum number of buffers the HAL device may need to have dequeued at
- * the same time. The HAL device may not have more buffers in-flight from
- * this stream than this value.
- */
- uint32_t max_buffers;
-
- /**
- * A handle to HAL-private information for the stream. Will not be inspected
- * by the framework code.
- */
- void *priv;
-
- /**
- * A field that describes the contents of the buffer. The format and buffer
- * dimensions define the memory layout and structure of the stream buffers,
- * while dataSpace defines the meaning of the data within the buffer.
- *
- * For most formats, dataSpace defines the color space of the image data.
- * In addition, for some formats, dataSpace indicates whether image- or
- * depth-based data is requested. See system/core/include/system/graphics.h
- * for details of formats and valid dataSpace values for each format.
- *
- * Version information:
- *
- * < CAMERA_DEVICE_API_VERSION_3_3:
- *
- * Not defined and should not be accessed. dataSpace should be assumed to
- * be HAL_DATASPACE_UNKNOWN, and the appropriate color space, etc, should
- * be determined from the usage flags and the format.
- *
- * = CAMERA_DEVICE_API_VERSION_3_3:
- *
- * Always set by the camera service. HAL must use this dataSpace to
- * configure the stream to the correct colorspace, or to select between
- * color and depth outputs if supported. The dataspace values are the
- * legacy definitions in graphics.h
- *
- * >= CAMERA_DEVICE_API_VERSION_3_4:
- *
- * Always set by the camera service. HAL must use this dataSpace to
- * configure the stream to the correct colorspace, or to select between
- * color and depth outputs if supported. The dataspace values are set
- * using the V0 dataspace definitions in graphics.h
- */
- android_dataspace_t data_space;
-
- /**
- * The required output rotation of the stream, one of
- * the camera3_stream_rotation_t values. This must be inspected by HAL along
- * with stream width and height. For example, if the rotation is 90 degree
- * and the stream width and height is 720 and 1280 respectively, camera service
- * will supply buffers of size 720x1280, and HAL should capture a 1280x720 image
- * and rotate the image by 90 degree counterclockwise. The rotation field is
- * no-op when the stream type is input. Camera HAL must ignore the rotation
- * field for an input stream.
- *
- * <= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * Not defined and must not be accessed. HAL must not apply any rotation
- * on output images.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_3:
- *
- * Always set by camera service. HAL must inspect this field during stream
- * configuration and returns -EINVAL if HAL cannot perform such rotation.
- * HAL must always support CAMERA3_STREAM_ROTATION_0, so a
- * configure_streams() call must not fail for unsupported rotation if
- * rotation field of all streams is CAMERA3_STREAM_ROTATION_0.
- *
- */
- int rotation;
-
- /**
- * The physical camera id this stream belongs to.
- *
- * <= CAMERA_DEVICE_API_VERISON_3_4:
- *
- * Not defined and must not be accessed.
- *
- * >= CAMERA_DEVICE_API_VERISON_3_5:
- *
- * Always set by camera service. If the camera device is not a logical
- * multi camera, or if the camera is a logical multi camera but the stream
- * is not a physical output stream, this field will point to a 0-length
- * string.
- *
- * A logical multi camera is a camera device backed by multiple physical
- * cameras that are also exposed to the application. And for a logical
- * multi camera, a physical output stream is an output stream specifically
- * requested on an underlying physical camera.
- *
- * For an input stream, this field is guaranteed to be a 0-length string.
- */
- const char* physical_camera_id;
-
- /* reserved for future use */
- void *reserved[6];
-
-} camera3_stream_t;
-
-/**
- * camera3_stream_configuration_t:
- *
- * A structure of stream definitions, used by configure_streams(). This
- * structure defines all the output streams and the reprocessing input
- * stream for the current camera use case.
- */
-typedef struct camera3_stream_configuration {
- /**
- * The total number of streams requested by the framework. This includes
- * both input and output streams. The number of streams will be at least 1,
- * and there will be at least one output-capable stream.
- */
- uint32_t num_streams;
-
- /**
- * An array of camera stream pointers, defining the input/output
- * configuration for the camera HAL device.
- *
- * At most one input-capable stream may be defined (INPUT or BIDIRECTIONAL)
- * in a single configuration.
- *
- * At least one output-capable stream must be defined (OUTPUT or
- * BIDIRECTIONAL).
- */
- camera3_stream_t **streams;
-
- /**
- * >= CAMERA_DEVICE_API_VERSION_3_3:
- *
- * The operation mode of streams in this configuration, one of the value
- * defined in camera3_stream_configuration_mode_t. The HAL can use this
- * mode as an indicator to set the stream property (e.g.,
- * camera3_stream->max_buffers) appropriately. For example, if the
- * configuration is
- * CAMERA3_STREAM_CONFIGURATION_CONSTRAINED_HIGH_SPEED_MODE, the HAL may
- * want to set aside more buffers for batch mode operation (see
- * android.control.availableHighSpeedVideoConfigurations for batch mode
- * definition).
- *
- */
- uint32_t operation_mode;
-
- /**
- * >= CAMERA_DEVICE_API_VERSION_3_5:
- *
- * The session metadata buffer contains the initial values of
- * ANDROID_REQUEST_AVAILABLE_SESSION_KEYS. This field is optional
- * and camera clients can choose to ignore it, in which case it will
- * be set to NULL. If parameters are present, then Hal should examine
- * the parameter values and configure its internal camera pipeline
- * accordingly.
- */
- const camera_metadata_t *session_parameters;
-} camera3_stream_configuration_t;
-
-/**
- * camera3_buffer_status_t:
- *
- * The current status of a single stream buffer.
- */
-typedef enum camera3_buffer_status {
- /**
- * The buffer is in a normal state, and can be used after waiting on its
- * sync fence.
- */
- CAMERA3_BUFFER_STATUS_OK = 0,
-
- /**
- * The buffer does not contain valid data, and the data in it should not be
- * used. The sync fence must still be waited on before reusing the buffer.
- */
- CAMERA3_BUFFER_STATUS_ERROR = 1
-
-} camera3_buffer_status_t;
-
-/**
- * camera3_stream_buffer_t:
- *
- * A single buffer from a camera3 stream. It includes a handle to its parent
- * stream, the handle to the gralloc buffer itself, and sync fences
- *
- * The buffer does not specify whether it is to be used for input or output;
- * that is determined by its parent stream type and how the buffer is passed to
- * the HAL device.
- */
-typedef struct camera3_stream_buffer {
- /**
- * The handle of the stream this buffer is associated with
- */
- camera3_stream_t *stream;
-
- /**
- * The native handle to the buffer
- */
- buffer_handle_t *buffer;
-
- /**
- * Current state of the buffer, one of the camera3_buffer_status_t
- * values. The framework will not pass buffers to the HAL that are in an
- * error state. In case a buffer could not be filled by the HAL, it must
- * have its status set to CAMERA3_BUFFER_STATUS_ERROR when returned to the
- * framework with process_capture_result().
- */
- int status;
-
- /**
- * The acquire sync fence for this buffer. The HAL must wait on this fence
- * fd before attempting to read from or write to this buffer.
- *
- * The framework may be set to -1 to indicate that no waiting is necessary
- * for this buffer.
- *
- * When the HAL returns an output buffer to the framework with
- * process_capture_result(), the acquire_fence must be set to -1. If the HAL
- * never waits on the acquire_fence due to an error in filling a buffer,
- * when calling process_capture_result() the HAL must set the release_fence
- * of the buffer to be the acquire_fence passed to it by the framework. This
- * will allow the framework to wait on the fence before reusing the buffer.
- *
- * For input buffers, the HAL must not change the acquire_fence field during
- * the process_capture_request() call.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * When the HAL returns an input buffer to the framework with
- * process_capture_result(), the acquire_fence must be set to -1. If the HAL
- * never waits on input buffer acquire fence due to an error, the sync
- * fences should be handled similarly to the way they are handled for output
- * buffers.
- */
- int acquire_fence;
-
- /**
- * The release sync fence for this buffer. The HAL must set this fence when
- * returning buffers to the framework, or write -1 to indicate that no
- * waiting is required for this buffer.
- *
- * For the output buffers, the fences must be set in the output_buffers
- * array passed to process_capture_result().
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * For the input buffer, the release fence must be set by the
- * process_capture_request() call.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * For the input buffer, the fences must be set in the input_buffer
- * passed to process_capture_result().
- *
- * After signaling the release_fence for this buffer, the HAL
- * should not make any further attempts to access this buffer as the
- * ownership has been fully transferred back to the framework.
- *
- * If a fence of -1 was specified then the ownership of this buffer
- * is transferred back immediately upon the call of process_capture_result.
- */
- int release_fence;
-
-} camera3_stream_buffer_t;
-
-/**
- * camera3_stream_buffer_set_t:
- *
- * The complete set of gralloc buffers for a stream. This structure is given to
- * register_stream_buffers() to allow the camera HAL device to register/map/etc
- * newly allocated stream buffers.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * Deprecated (and not used). In particular,
- * register_stream_buffers is also deprecated and will never be invoked.
- *
- */
-typedef struct camera3_stream_buffer_set {
- /**
- * The stream handle for the stream these buffers belong to
- */
- camera3_stream_t *stream;
-
- /**
- * The number of buffers in this stream. It is guaranteed to be at least
- * stream->max_buffers.
- */
- uint32_t num_buffers;
-
- /**
- * The array of gralloc buffer handles for this stream. If the stream format
- * is set to HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, the camera HAL device
- * should inspect the passed-in buffers to determine any platform-private
- * pixel format information.
- */
- buffer_handle_t **buffers;
-
-} camera3_stream_buffer_set_t;
-
-/**
- * camera3_jpeg_blob:
- *
- * Transport header for compressed JPEG or JPEG_APP_SEGMENTS buffers in output streams.
- *
- * To capture JPEG or JPEG_APP_SEGMENTS images, a stream is created using the pixel format
- * HAL_PIXEL_FORMAT_BLOB. The buffer size for the stream is calculated by the
- * framework, based on the static metadata field android.jpeg.maxSize for JPEG,
- * and android.jpeg.maxAppsSegments for JPEG_APP_SEGMENTS.
- *
- * Since compressed JPEG/JPEG_APP_SEGMENTS images are of variable size, the HAL needs to
- * include the final size of the image using this structure inside the output
- * stream buffer. The JPEG blob ID field must be set to CAMERA3_JPEG_BLOB_ID for
- * JPEG and CAMERA3_JPEG_APP_SEGMENTS_BLOB_ID for APP segments.
- *
- * Transport header should be at the end of the output stream buffer. That
- * means the jpeg_blob_id must start at byte[buffer_size -
- * sizeof(camera3_jpeg_blob)], where the buffer_size is the size of gralloc buffer.
- * The blob data itself starts at the beginning of the buffer and should be
- * jpeg_size bytes long. HAL using this transport header for JPEG must account for
- * it in android.jpeg.maxSize. For JPEG APP segments, camera framework makes
- * sure that the output stream buffer is large enough for the transport header.
- */
-typedef struct camera3_jpeg_blob {
- uint16_t jpeg_blob_id;
- uint32_t jpeg_size;
-} camera3_jpeg_blob_t;
-
-enum {
- CAMERA3_JPEG_BLOB_ID = 0x00FF,
- CAMERA3_JPEG_APP_SEGMENTS_BLOB_ID = 0x0100,
-};
-
-/**********************************************************************
- *
- * Message definitions for the HAL notify() callback.
- *
- * These definitions are used for the HAL notify callback, to signal
- * asynchronous events from the HAL device to the Android framework.
- *
- */
-
-/**
- * camera3_msg_type:
- *
- * Indicates the type of message sent, which specifies which member of the
- * message union is valid.
- *
- */
-typedef enum camera3_msg_type {
- /**
- * An error has occurred. camera3_notify_msg.message.error contains the
- * error information.
- */
- CAMERA3_MSG_ERROR = 1,
-
- /**
- * The exposure of a given request or processing a reprocess request has
- * begun. camera3_notify_msg.message.shutter contains the information
- * the capture.
- */
- CAMERA3_MSG_SHUTTER = 2,
-
- /**
- * Number of framework message types
- */
- CAMERA3_NUM_MESSAGES
-
-} camera3_msg_type_t;
-
-/**
- * Defined error codes for CAMERA_MSG_ERROR
- */
-typedef enum camera3_error_msg_code {
- /**
- * A serious failure occured. No further frames or buffer streams will
- * be produced by the device. Device should be treated as closed. The
- * client must reopen the device to use it again. The frame_number field
- * is unused.
- */
- CAMERA3_MSG_ERROR_DEVICE = 1,
-
- /**
- * An error has occurred in processing a request. No output (metadata or
- * buffers) will be produced for this request. The frame_number field
- * specifies which request has been dropped. Subsequent requests are
- * unaffected, and the device remains operational.
- */
- CAMERA3_MSG_ERROR_REQUEST = 2,
-
- /**
- * An error has occurred in producing an output result metadata buffer
- * for a request, but output stream buffers for it will still be
- * available. Subsequent requests are unaffected, and the device remains
- * operational. The frame_number field specifies the request for which
- * result metadata won't be available.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_6:
- *
- * In case the result metadata is absent for a logical camera device, then the
- * error_stream pointer must be set to NULL.
- * If the result metadata cannot be produced for a physical camera device, then
- * error_stream must contain a pointer to a respective stream associated with
- * that physical device.
- */
- CAMERA3_MSG_ERROR_RESULT = 3,
-
- /**
- * An error has occurred in placing an output buffer into a stream for a
- * request. The frame metadata and other buffers may still be
- * available. Subsequent requests are unaffected, and the device remains
- * operational. The frame_number field specifies the request for which the
- * buffer was dropped, and error_stream contains a pointer to the stream
- * that dropped the frame.
- */
- CAMERA3_MSG_ERROR_BUFFER = 4,
-
- /**
- * Number of error types
- */
- CAMERA3_MSG_NUM_ERRORS
-
-} camera3_error_msg_code_t;
-
-/**
- * camera3_error_msg_t:
- *
- * Message contents for CAMERA3_MSG_ERROR
- */
-typedef struct camera3_error_msg {
- /**
- * Frame number of the request the error applies to. 0 if the frame number
- * isn't applicable to the error.
- */
- uint32_t frame_number;
-
- /**
- * Pointer to the stream that had a failure. NULL if the stream isn't
- * applicable to the error.
- */
- camera3_stream_t *error_stream;
-
- /**
- * The code for this error; one of the CAMERA_MSG_ERROR enum values.
- */
- int error_code;
-
-} camera3_error_msg_t;
-
-/**
- * camera3_shutter_msg_t:
- *
- * Message contents for CAMERA3_MSG_SHUTTER
- */
-typedef struct camera3_shutter_msg {
- /**
- * Frame number of the request that has begun exposure or reprocessing.
- */
- uint32_t frame_number;
-
- /**
- * Timestamp for the start of capture. For a reprocess request, this must
- * be input image's start of capture. This must match the capture result
- * metadata's sensor exposure start timestamp.
- */
- uint64_t timestamp;
-
-} camera3_shutter_msg_t;
-
-/**
- * camera3_notify_msg_t:
- *
- * The message structure sent to camera3_callback_ops_t.notify()
- */
-typedef struct camera3_notify_msg {
-
- /**
- * The message type. One of camera3_notify_msg_type, or a private extension.
- */
- int type;
-
- union {
- /**
- * Error message contents. Valid if type is CAMERA3_MSG_ERROR
- */
- camera3_error_msg_t error;
-
- /**
- * Shutter message contents. Valid if type is CAMERA3_MSG_SHUTTER
- */
- camera3_shutter_msg_t shutter;
-
- /**
- * Generic message contents. Used to ensure a minimum size for custom
- * message types.
- */
- uint8_t generic[32];
- } message;
-
-} camera3_notify_msg_t;
-
-
-/**********************************************************************
- *
- * Types definition for request_stream_buffers() callback.
- *
- */
-
-/**
- * camera3_buffer_request_status_t:
- *
- * The overall buffer request status returned by request_stream_buffers()
- */
-typedef enum camera3_buffer_request_status {
- /**
- * request_stream_buffers() call succeeded and all requested buffers are
- * returned.
- */
- CAMERA3_BUF_REQ_OK = 0,
-
- /**
- * request_stream_buffers() call failed for some streams.
- * Check per stream status for each returned camera3_stream_buffer_ret_t.
- */
- CAMERA3_BUF_REQ_FAILED_PARTIAL = 1,
-
- /**
- * request_stream_buffers() call failed for all streams and no buffers are
- * returned at all. Camera service is about to or is performing
- * configure_streams() call. HAL must wait until next configure_streams()
- * call is finished before requesting buffers again.
- */
- CAMERA3_BUF_REQ_FAILED_CONFIGURING = 2,
-
- /**
- * request_stream_buffers() call failed for all streams and no buffers are
- * returned at all. Failure due to bad camera3_buffer_request input, eg:
- * unknown stream or repeated stream in the list of buffer requests.
- */
- CAMERA3_BUF_REQ_FAILED_ILLEGAL_ARGUMENTS = 3,
-
- /**
- * request_stream_buffers() call failed for all streams and no buffers are
- * returned at all. This can happen for unknown reasons or a combination
- * of different failure reasons per stream. For the latter case, caller can
- * check per stream failure reason returned in camera3_stream_buffer_ret.
- */
- CAMERA3_BUF_REQ_FAILED_UNKNOWN = 4,
-
- /**
- * Number of buffer request status
- */
- CAMERA3_BUF_REQ_NUM_STATUS
-
-} camera3_buffer_request_status_t;
-
-/**
- * camera3_stream_buffer_req_status_t:
- *
- * The per stream buffer request status returned by request_stream_buffers()
- */
-typedef enum camera3_stream_buffer_req_status {
- /**
- * Get buffer succeeds and all requested buffers are returned.
- */
- CAMERA3_PS_BUF_REQ_OK = 0,
-
- /**
- * Get buffer failed due to timeout waiting for an available buffer. This is
- * likely due to the client application holding too many buffers, or the
- * system is under memory pressure.
- * This is not a fatal error. HAL can try to request buffer for this stream
- * later. If HAL cannot get a buffer for certain capture request in time
- * due to this error, HAL can send an ERROR_REQUEST to camera service and
- * drop processing that request.
- */
- CAMERA3_PS_BUF_REQ_NO_BUFFER_AVAILABLE = 1,
-
- /**
- * Get buffer failed due to HAL has reached its maxBuffer count. This is not
- * a fatal error. HAL can try to request buffer for this stream again after
- * it returns at least one buffer of that stream to camera service.
- */
- CAMERA3_PS_BUF_REQ_MAX_BUFFER_EXCEEDED = 2,
-
- /**
- * Get buffer failed due to the stream is disconnected by client
- * application, has been removed, or not recognized by camera service.
- * This means application is no longer interested in this stream.
- * Requesting buffer for this stream will never succeed after this error is
- * returned. HAL must safely return all buffers of this stream after
- * getting this error. If HAL gets another capture request later targeting
- * a disconnected stream, HAL must send an ERROR_REQUEST to camera service
- * and drop processing that request.
- */
- CAMERA3_PS_BUF_REQ_STREAM_DISCONNECTED = 3,
-
- /**
- * Get buffer failed for unknown reason. This is a fatal error and HAL must
- * send ERROR_DEVICE to camera service and be ready to be closed.
- */
- CAMERA3_PS_BUF_REQ_UNKNOWN_ERROR = 4,
-
- /**
- * Number of buffer request status
- */
- CAMERA3_PS_BUF_REQ_NUM_STATUS
-} camera3_stream_buffer_req_status_t;
-
-typedef struct camera3_buffer_request {
- /**
- * The stream HAL wants to request buffer from
- */
- camera3_stream_t *stream;
-
- /**
- * The number of buffers HAL requested
- */
- uint32_t num_buffers_requested;
-} camera3_buffer_request_t;
-
-typedef struct camera3_stream_buffer_ret {
- /**
- * The stream HAL wants to request buffer from
- */
- camera3_stream_t *stream;
-
- /**
- * The status of buffer request of this stream
- */
- camera3_stream_buffer_req_status_t status;
-
- /**
- * Number of output buffers returned. Must be 0 when above status is not
- * CAMERA3_PS_BUF_REQ_OK; otherwise the value must be equal to
- * num_buffers_requested in the corresponding camera3_buffer_request_t
- */
- uint32_t num_output_buffers;
-
- /**
- * The returned output buffers for the stream.
- * Caller of request_stream_buffers() should supply this with enough memory
- * (num_buffers_requested * sizeof(camera3_stream_buffer_t))
- */
- camera3_stream_buffer_t *output_buffers;
-} camera3_stream_buffer_ret_t;
-
-
-/**********************************************************************
- *
- * Capture request/result definitions for the HAL process_capture_request()
- * method, and the process_capture_result() callback.
- *
- */
-
-/**
- * camera3_request_template_t:
- *
- * Available template types for
- * camera3_device_ops.construct_default_request_settings()
- */
-typedef enum camera3_request_template {
- /**
- * Standard camera preview operation with 3A on auto.
- */
- CAMERA3_TEMPLATE_PREVIEW = 1,
-
- /**
- * Standard camera high-quality still capture with 3A and flash on auto.
- */
- CAMERA3_TEMPLATE_STILL_CAPTURE = 2,
-
- /**
- * Standard video recording plus preview with 3A on auto, torch off.
- */
- CAMERA3_TEMPLATE_VIDEO_RECORD = 3,
-
- /**
- * High-quality still capture while recording video. Application will
- * include preview, video record, and full-resolution YUV or JPEG streams in
- * request. Must not cause stuttering on video stream. 3A on auto.
- */
- CAMERA3_TEMPLATE_VIDEO_SNAPSHOT = 4,
-
- /**
- * Zero-shutter-lag mode. Application will request preview and
- * full-resolution data for each frame, and reprocess it to JPEG when a
- * still image is requested by user. Settings should provide highest-quality
- * full-resolution images without compromising preview frame rate. 3A on
- * auto.
- */
- CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG = 5,
-
- /**
- * A basic template for direct application control of capture
- * parameters. All automatic control is disabled (auto-exposure, auto-white
- * balance, auto-focus), and post-processing parameters are set to preview
- * quality. The manual capture parameters (exposure, sensitivity, etc.)
- * are set to reasonable defaults, but should be overridden by the
- * application depending on the intended use case.
- */
- CAMERA3_TEMPLATE_MANUAL = 6,
-
- /* Total number of templates */
- CAMERA3_TEMPLATE_COUNT,
-
- /**
- * First value for vendor-defined request templates
- */
- CAMERA3_VENDOR_TEMPLATE_START = 0x40000000
-
-} camera3_request_template_t;
-
-/**
- * camera3_capture_request_t:
- *
- * A single request for image capture/buffer reprocessing, sent to the Camera
- * HAL device by the framework in process_capture_request().
- *
- * The request contains the settings to be used for this capture, and the set of
- * output buffers to write the resulting image data in. It may optionally
- * contain an input buffer, in which case the request is for reprocessing that
- * input buffer instead of capturing a new image with the camera sensor. The
- * capture is identified by the frame_number.
- *
- * In response, the camera HAL device must send a camera3_capture_result
- * structure asynchronously to the framework, using the process_capture_result()
- * callback.
- */
-typedef struct camera3_capture_request {
- /**
- * The frame number is an incrementing integer set by the framework to
- * uniquely identify this capture. It needs to be returned in the result
- * call, and is also used to identify the request in asynchronous
- * notifications sent to camera3_callback_ops_t.notify().
- */
- uint32_t frame_number;
-
- /**
- * The settings buffer contains the capture and processing parameters for
- * the request. As a special case, a NULL settings buffer indicates that the
- * settings are identical to the most-recently submitted capture request. A
- * NULL buffer cannot be used as the first submitted request after a
- * configure_streams() call.
- */
- const camera_metadata_t *settings;
-
- /**
- * The input stream buffer to use for this request, if any.
- *
- * If input_buffer is NULL, then the request is for a new capture from the
- * imager. If input_buffer is valid, the request is for reprocessing the
- * image contained in input_buffer.
- *
- * In the latter case, the HAL must set the release_fence of the
- * input_buffer to a valid sync fence, or to -1 if the HAL does not support
- * sync, before process_capture_request() returns.
- *
- * The HAL is required to wait on the acquire sync fence of the input buffer
- * before accessing it.
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * Any input buffer included here will have been registered with the HAL
- * through register_stream_buffers() before its inclusion in a request.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * The buffers will not have been pre-registered with the HAL.
- * Subsequent requests may reuse buffers, or provide entirely new buffers.
- */
- camera3_stream_buffer_t *input_buffer;
-
- /**
- * The number of output buffers for this capture request. Must be at least
- * 1.
- */
- uint32_t num_output_buffers;
-
- /**
- * An array of num_output_buffers stream buffers, to be filled with image
- * data from this capture/reprocess. The HAL must wait on the acquire fences
- * of each stream buffer before writing to them.
- *
- * The HAL takes ownership of the actual buffer_handle_t entries in
- * output_buffers; the framework does not access them until they are
- * returned in a camera3_capture_result_t.
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * All the buffers included here will have been registered with the HAL
- * through register_stream_buffers() before their inclusion in a request.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * Any or all of the buffers included here may be brand new in this
- * request (having never before seen by the HAL).
- */
- const camera3_stream_buffer_t *output_buffers;
-
- /**
- * <= CAMERA_DEVICE_API_VERISON_3_4:
- *
- * Not defined and must not be accessed.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_5:
- * The number of physical camera settings to be applied. If 'num_physcam_settings'
- * equals 0 or a physical device is not included, then Hal must decide the
- * specific physical device settings based on the default 'settings'.
- */
- uint32_t num_physcam_settings;
-
- /**
- * <= CAMERA_DEVICE_API_VERISON_3_4:
- *
- * Not defined and must not be accessed.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_5:
- * The physical camera ids. The array will contain 'num_physcam_settings'
- * camera id strings for all physical devices that have specific settings.
- * In case some id is invalid, the process capture request must fail and return
- * -EINVAL.
- */
- const char **physcam_id;
-
- /**
- * <= CAMERA_DEVICE_API_VERISON_3_4:
- *
- * Not defined and must not be accessed.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_5:
- * The capture settings for the physical cameras. The array will contain
- * 'num_physcam_settings' settings for invididual physical devices. In
- * case the settings at some particular index are empty, the process capture
- * request must fail and return -EINVAL.
- */
- const camera_metadata_t **physcam_settings;
-
-} camera3_capture_request_t;
-
-/**
- * camera3_capture_result_t:
- *
- * The result of a single capture/reprocess by the camera HAL device. This is
- * sent to the framework asynchronously with process_capture_result(), in
- * response to a single capture request sent to the HAL with
- * process_capture_request(). Multiple process_capture_result() calls may be
- * performed by the HAL for each request.
- *
- * Each call, all with the same frame
- * number, may contain some subset of the output buffers, and/or the result
- * metadata. The metadata may only be provided once for a given frame number;
- * all other calls must set the result metadata to NULL.
- *
- * The result structure contains the output metadata from this capture, and the
- * set of output buffers that have been/will be filled for this capture. Each
- * output buffer may come with a release sync fence that the framework will wait
- * on before reading, in case the buffer has not yet been filled by the HAL.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * The metadata may be provided multiple times for a single frame number. The
- * framework will accumulate together the final result set by combining each
- * partial result together into the total result set.
- *
- * If an input buffer is given in a request, the HAL must return it in one of
- * the process_capture_result calls, and the call may be to just return the input
- * buffer, without metadata and output buffers; the sync fences must be handled
- * the same way they are done for output buffers.
- *
- *
- * Performance considerations:
- *
- * Applications will also receive these partial results immediately, so sending
- * partial results is a highly recommended performance optimization to avoid
- * the total pipeline latency before sending the results for what is known very
- * early on in the pipeline.
- *
- * A typical use case might be calculating the AF state halfway through the
- * pipeline; by sending the state back to the framework immediately, we get a
- * 50% performance increase and perceived responsiveness of the auto-focus.
- *
- */
-typedef struct camera3_capture_result {
- /**
- * The frame number is an incrementing integer set by the framework in the
- * submitted request to uniquely identify this capture. It is also used to
- * identify the request in asynchronous notifications sent to
- * camera3_callback_ops_t.notify().
- */
- uint32_t frame_number;
-
- /**
- * The result metadata for this capture. This contains information about the
- * final capture parameters, the state of the capture and post-processing
- * hardware, the state of the 3A algorithms, if enabled, and the output of
- * any enabled statistics units.
- *
- * Only one call to process_capture_result() with a given frame_number may
- * include the result metadata. All other calls for the same frame_number
- * must set this to NULL.
- *
- * If there was an error producing the result metadata, result must be an
- * empty metadata buffer, and notify() must be called with ERROR_RESULT.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * Multiple calls to process_capture_result() with a given frame_number
- * may include the result metadata.
- *
- * Partial metadata submitted should not include any metadata key returned
- * in a previous partial result for a given frame. Each new partial result
- * for that frame must also set a distinct partial_result value.
- *
- * If notify has been called with ERROR_RESULT, all further partial
- * results for that frame are ignored by the framework.
- */
- const camera_metadata_t *result;
-
- /**
- * The number of output buffers returned in this result structure. Must be
- * less than or equal to the matching capture request's count. If this is
- * less than the buffer count in the capture request, at least one more call
- * to process_capture_result with the same frame_number must be made, to
- * return the remaining output buffers to the framework. This may only be
- * zero if the structure includes valid result metadata or an input buffer
- * is returned in this result.
- */
- uint32_t num_output_buffers;
-
- /**
- * The handles for the output stream buffers for this capture. They may not
- * yet be filled at the time the HAL calls process_capture_result(); the
- * framework will wait on the release sync fences provided by the HAL before
- * reading the buffers.
- *
- * The HAL must set the stream buffer's release sync fence to a valid sync
- * fd, or to -1 if the buffer has already been filled.
- *
- * If the HAL encounters an error while processing the buffer, and the
- * buffer is not filled, the buffer's status field must be set to
- * CAMERA3_BUFFER_STATUS_ERROR. If the HAL did not wait on the acquire fence
- * before encountering the error, the acquire fence should be copied into
- * the release fence, to allow the framework to wait on the fence before
- * reusing the buffer.
- *
- * The acquire fence must be set to -1 for all output buffers. If
- * num_output_buffers is zero, this may be NULL. In that case, at least one
- * more process_capture_result call must be made by the HAL to provide the
- * output buffers.
- *
- * When process_capture_result is called with a new buffer for a frame,
- * all previous frames' buffers for that corresponding stream must have been
- * already delivered (the fences need not have yet been signaled).
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * Gralloc buffers for a frame may be sent to framework before the
- * corresponding SHUTTER-notify.
- *
- * Performance considerations:
- *
- * Buffers delivered to the framework will not be dispatched to the
- * application layer until a start of exposure timestamp has been received
- * via a SHUTTER notify() call. It is highly recommended to
- * dispatch that call as early as possible.
- */
- const camera3_stream_buffer_t *output_buffers;
-
- /**
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * The handle for the input stream buffer for this capture. It may not
- * yet be consumed at the time the HAL calls process_capture_result(); the
- * framework will wait on the release sync fences provided by the HAL before
- * reusing the buffer.
- *
- * The HAL should handle the sync fences the same way they are done for
- * output_buffers.
- *
- * Only one input buffer is allowed to be sent per request. Similarly to
- * output buffers, the ordering of returned input buffers must be
- * maintained by the HAL.
- *
- * Performance considerations:
- *
- * The input buffer should be returned as early as possible. If the HAL
- * supports sync fences, it can call process_capture_result to hand it back
- * with sync fences being set appropriately. If the sync fences are not
- * supported, the buffer can only be returned when it is consumed, which
- * may take long time; the HAL may choose to copy this input buffer to make
- * the buffer return sooner.
- */
- const camera3_stream_buffer_t *input_buffer;
-
- /**
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * In order to take advantage of partial results, the HAL must set the
- * static metadata android.request.partialResultCount to the number of
- * partial results it will send for each frame.
- *
- * Each new capture result with a partial result must set
- * this field (partial_result) to a distinct inclusive value between
- * 1 and android.request.partialResultCount.
- *
- * HALs not wishing to take advantage of this feature must not
- * set an android.request.partialResultCount or partial_result to a value
- * other than 1.
- *
- * This value must be set to 0 when a capture result contains buffers only
- * and no metadata.
- */
- uint32_t partial_result;
-
- /**
- * >= CAMERA_DEVICE_API_VERSION_3_5:
- *
- * Specifies the number of physical camera metadata this capture result
- * contains. It must be equal to the number of physical cameras being
- * requested from.
- *
- * If the current camera device is not a logical multi-camera, or the
- * corresponding capture_request doesn't request on any physical camera,
- * this field must be 0.
- */
- uint32_t num_physcam_metadata;
-
- /**
- * >= CAMERA_DEVICE_API_VERSION_3_5:
- *
- * An array of strings containing the physical camera ids for the returned
- * physical camera metadata. The length of the array is
- * num_physcam_metadata.
- */
- const char **physcam_ids;
-
- /**
- * >= CAMERA_DEVICE_API_VERSION_3_5:
- *
- * The array of physical camera metadata for the physical cameras being
- * requested upon. This array should have a 1-to-1 mapping with the
- * physcam_ids. The length of the array is num_physcam_metadata.
- */
- const camera_metadata_t **physcam_metadata;
-
-} camera3_capture_result_t;
-
-/**********************************************************************
- *
- * Callback methods for the HAL to call into the framework.
- *
- * These methods are used to return metadata and image buffers for a completed
- * or failed captures, and to notify the framework of asynchronous events such
- * as errors.
- *
- * The framework will not call back into the HAL from within these callbacks,
- * and these calls will not block for extended periods.
- *
- */
-typedef struct camera3_callback_ops {
-
- /**
- * process_capture_result:
- *
- * Send results from a completed capture to the framework.
- * process_capture_result() may be invoked multiple times by the HAL in
- * response to a single capture request. This allows, for example, the
- * metadata and low-resolution buffers to be returned in one call, and
- * post-processed JPEG buffers in a later call, once it is available. Each
- * call must include the frame number of the request it is returning
- * metadata or buffers for.
- *
- * A component (buffer or metadata) of the complete result may only be
- * included in one process_capture_result call. A buffer for each stream,
- * and the result metadata, must be returned by the HAL for each request in
- * one of the process_capture_result calls, even in case of errors producing
- * some of the output. A call to process_capture_result() with neither
- * output buffers or result metadata is not allowed.
- *
- * The order of returning metadata and buffers for a single result does not
- * matter, but buffers for a given stream must be returned in FIFO order. So
- * the buffer for request 5 for stream A must always be returned before the
- * buffer for request 6 for stream A. This also applies to the result
- * metadata; the metadata for request 5 must be returned before the metadata
- * for request 6.
- *
- * However, different streams are independent of each other, so it is
- * acceptable and expected that the buffer for request 5 for stream A may be
- * returned after the buffer for request 6 for stream B is. And it is
- * acceptable that the result metadata for request 6 for stream B is
- * returned before the buffer for request 5 for stream A is.
- *
- * The HAL retains ownership of result structure, which only needs to be
- * valid to access during this call. The framework will copy whatever it
- * needs before this call returns.
- *
- * The output buffers do not need to be filled yet; the framework will wait
- * on the stream buffer release sync fence before reading the buffer
- * data. Therefore, this method should be called by the HAL as soon as
- * possible, even if some or all of the output buffers are still in
- * being filled. The HAL must include valid release sync fences into each
- * output_buffers stream buffer entry, or -1 if that stream buffer is
- * already filled.
- *
- * If the result buffer cannot be constructed for a request, the HAL should
- * return an empty metadata buffer, but still provide the output buffers and
- * their sync fences. In addition, notify() must be called with an
- * ERROR_RESULT message.
- *
- * If an output buffer cannot be filled, its status field must be set to
- * STATUS_ERROR. In addition, notify() must be called with a ERROR_BUFFER
- * message.
- *
- * If the entire capture has failed, then this method still needs to be
- * called to return the output buffers to the framework. All the buffer
- * statuses should be STATUS_ERROR, and the result metadata should be an
- * empty buffer. In addition, notify() must be called with a ERROR_REQUEST
- * message. In this case, individual ERROR_RESULT/ERROR_BUFFER messages
- * should not be sent.
- *
- * Performance requirements:
- *
- * This is a non-blocking call. The framework will return this call in 5ms.
- *
- * The pipeline latency (see S7 for definition) should be less than or equal to
- * 4 frame intervals, and must be less than or equal to 8 frame intervals.
- *
- */
- void (*process_capture_result)(const struct camera3_callback_ops *,
- const camera3_capture_result_t *result);
-
- /**
- * notify:
- *
- * Asynchronous notification callback from the HAL, fired for various
- * reasons. Only for information independent of frame capture, or that
- * require specific timing. The ownership of the message structure remains
- * with the HAL, and the msg only needs to be valid for the duration of this
- * call.
- *
- * Multiple threads may call notify() simultaneously.
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * The notification for the start of exposure for a given request must be
- * sent by the HAL before the first call to process_capture_result() for
- * that request is made.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * Buffers delivered to the framework will not be dispatched to the
- * application layer until a start of exposure timestamp (or input image's
- * start of exposure timestamp for a reprocess request) has been received
- * via a SHUTTER notify() call. It is highly recommended to dispatch this
- * call as early as possible.
- *
- * ------------------------------------------------------------------------
- * Performance requirements:
- *
- * This is a non-blocking call. The framework will return this call in 5ms.
- */
- void (*notify)(const struct camera3_callback_ops *,
- const camera3_notify_msg_t *msg);
-
- /**
- * request_stream_buffers:
- *
- * <= CAMERA_DEVICE_API_VERISON_3_5:
- *
- * DO NOT USE: not defined and must be NULL.
- *
- * >= CAMERA_DEVICE_API_VERISON_3_6:
- *
- * Synchronous callback for HAL to ask for output buffer from camera service.
- *
- * This call may be serialized in camera service so it is strongly
- * recommended to only call this method from one thread.
- *
- * When camera device advertises
- * (android.info.supportedBufferManagementVersion ==
- * ANDROID_INFO_SUPPORTED_BUFFER_MANAGEMENT_VERSION_HIDL_DEVICE_3_5), HAL
- * can use this method to request buffers from camera service.
- *
- * Caller is responsible for allocating enough memory for returned_buf_reqs
- * argument (num_buffer_reqs * sizeof(camera3_stream_buffer_ret_t)) bytes
- * and also the memory for the output_buffers field in each
- * camera3_stream_buffer_ret_t
- * (num_buffers_requested * sizeof(camera3_stream_buffer_t)) bytes
- *
- * Performance requirements:
- * This is a blocking call that takes more time with more buffers requested.
- * HAL should not request large amount of buffers on a latency critical code
- * path. It is highly recommended to use a dedicated thread to perform
- * all requestStreamBuffer calls, and adjust the thread priority and/or
- * timing of making the call in order for buffers to arrive before HAL is
- * ready to fill the buffer.
- */
- camera3_buffer_request_status_t (*request_stream_buffers)(
- const struct camera3_callback_ops *,
- uint32_t num_buffer_reqs,
- const camera3_buffer_request_t *buffer_reqs,
- /*out*/uint32_t *num_returned_buf_reqs,
- /*out*/camera3_stream_buffer_ret_t *returned_buf_reqs);
-
- /**
- * return_stream_buffers:
- *
- * <= CAMERA_DEVICE_API_VERISON_3_5:
- *
- * DO NOT USE: not defined and must be NULL.
- *
- * >= CAMERA_DEVICE_API_VERISON_3_6:
- *
- * Synchronous callback for HAL to return output buffers to camera service.
- *
- * If this method is called during a configure_streams() call, it will be
- * blocked until camera service finishes the ongoing configure_streams() call.
- */
- void (*return_stream_buffers)(
- const struct camera3_callback_ops *,
- uint32_t num_buffers,
- const camera3_stream_buffer_t* const* buffers);
-
-} camera3_callback_ops_t;
-
-/**********************************************************************
- *
- * Camera device operations
- *
- */
-typedef struct camera3_device_ops {
-
- /**
- * initialize:
- *
- * One-time initialization to pass framework callback function pointers to
- * the HAL. Will be called once after a successful open() call, before any
- * other functions are called on the camera3_device_ops structure.
- *
- * Performance requirements:
- *
- * This should be a non-blocking call. The HAL should return from this call
- * in 5ms, and must return from this call in 10ms.
- *
- * Return values:
- *
- * 0: On successful initialization
- *
- * -ENODEV: If initialization fails. Only close() can be called successfully
- * by the framework after this.
- */
- int (*initialize)(const struct camera3_device *,
- const camera3_callback_ops_t *callback_ops);
-
- /**********************************************************************
- * Stream management
- */
-
- /**
- * configure_streams:
- *
- * CAMERA_DEVICE_API_VERSION_3_0 only:
- *
- * Reset the HAL camera device processing pipeline and set up new input and
- * output streams. This call replaces any existing stream configuration with
- * the streams defined in the stream_list. This method will be called at
- * least once after initialize() before a request is submitted with
- * process_capture_request().
- *
- * The stream_list must contain at least one output-capable stream, and may
- * not contain more than one input-capable stream.
- *
- * The stream_list may contain streams that are also in the currently-active
- * set of streams (from the previous call to configure_stream()). These
- * streams will already have valid values for usage, max_buffers, and the
- * private pointer.
- *
- * If such a stream has already had its buffers registered,
- * register_stream_buffers() will not be called again for the stream, and
- * buffers from the stream can be immediately included in input requests.
- *
- * If the HAL needs to change the stream configuration for an existing
- * stream due to the new configuration, it may rewrite the values of usage
- * and/or max_buffers during the configure call.
- *
- * The framework will detect such a change, and will then reallocate the
- * stream buffers, and call register_stream_buffers() again before using
- * buffers from that stream in a request.
- *
- * If a currently-active stream is not included in stream_list, the HAL may
- * safely remove any references to that stream. It will not be reused in a
- * later configure() call by the framework, and all the gralloc buffers for
- * it will be freed after the configure_streams() call returns.
- *
- * The stream_list structure is owned by the framework, and may not be
- * accessed once this call completes. The address of an individual
- * camera3_stream_t structure will remain valid for access by the HAL until
- * the end of the first configure_stream() call which no longer includes
- * that camera3_stream_t in the stream_list argument. The HAL may not change
- * values in the stream structure outside of the private pointer, except for
- * the usage and max_buffers members during the configure_streams() call
- * itself.
- *
- * If the stream is new, the usage, max_buffer, and private pointer fields
- * of the stream structure will all be set to 0. The HAL device must set
- * these fields before the configure_streams() call returns. These fields
- * are then used by the framework and the platform gralloc module to
- * allocate the gralloc buffers for each stream.
- *
- * Before such a new stream can have its buffers included in a capture
- * request, the framework will call register_stream_buffers() with that
- * stream. However, the framework is not required to register buffers for
- * _all_ streams before submitting a request. This allows for quick startup
- * of (for example) a preview stream, with allocation for other streams
- * happening later or concurrently.
- *
- * ------------------------------------------------------------------------
- * CAMERA_DEVICE_API_VERSION_3_1 only:
- *
- * Reset the HAL camera device processing pipeline and set up new input and
- * output streams. This call replaces any existing stream configuration with
- * the streams defined in the stream_list. This method will be called at
- * least once after initialize() before a request is submitted with
- * process_capture_request().
- *
- * The stream_list must contain at least one output-capable stream, and may
- * not contain more than one input-capable stream.
- *
- * The stream_list may contain streams that are also in the currently-active
- * set of streams (from the previous call to configure_stream()). These
- * streams will already have valid values for usage, max_buffers, and the
- * private pointer.
- *
- * If such a stream has already had its buffers registered,
- * register_stream_buffers() will not be called again for the stream, and
- * buffers from the stream can be immediately included in input requests.
- *
- * If the HAL needs to change the stream configuration for an existing
- * stream due to the new configuration, it may rewrite the values of usage
- * and/or max_buffers during the configure call.
- *
- * The framework will detect such a change, and will then reallocate the
- * stream buffers, and call register_stream_buffers() again before using
- * buffers from that stream in a request.
- *
- * If a currently-active stream is not included in stream_list, the HAL may
- * safely remove any references to that stream. It will not be reused in a
- * later configure() call by the framework, and all the gralloc buffers for
- * it will be freed after the configure_streams() call returns.
- *
- * The stream_list structure is owned by the framework, and may not be
- * accessed once this call completes. The address of an individual
- * camera3_stream_t structure will remain valid for access by the HAL until
- * the end of the first configure_stream() call which no longer includes
- * that camera3_stream_t in the stream_list argument. The HAL may not change
- * values in the stream structure outside of the private pointer, except for
- * the usage and max_buffers members during the configure_streams() call
- * itself.
- *
- * If the stream is new, max_buffer, and private pointer fields of the
- * stream structure will all be set to 0. The usage will be set to the
- * consumer usage flags. The HAL device must set these fields before the
- * configure_streams() call returns. These fields are then used by the
- * framework and the platform gralloc module to allocate the gralloc
- * buffers for each stream.
- *
- * Before such a new stream can have its buffers included in a capture
- * request, the framework will call register_stream_buffers() with that
- * stream. However, the framework is not required to register buffers for
- * _all_ streams before submitting a request. This allows for quick startup
- * of (for example) a preview stream, with allocation for other streams
- * happening later or concurrently.
- *
- * ------------------------------------------------------------------------
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * Reset the HAL camera device processing pipeline and set up new input and
- * output streams. This call replaces any existing stream configuration with
- * the streams defined in the stream_list. This method will be called at
- * least once after initialize() before a request is submitted with
- * process_capture_request().
- *
- * The stream_list must contain at least one output-capable stream, and may
- * not contain more than one input-capable stream.
- *
- * The stream_list may contain streams that are also in the currently-active
- * set of streams (from the previous call to configure_stream()). These
- * streams will already have valid values for usage, max_buffers, and the
- * private pointer.
- *
- * If the HAL needs to change the stream configuration for an existing
- * stream due to the new configuration, it may rewrite the values of usage
- * and/or max_buffers during the configure call.
- *
- * The framework will detect such a change, and may then reallocate the
- * stream buffers before using buffers from that stream in a request.
- *
- * If a currently-active stream is not included in stream_list, the HAL may
- * safely remove any references to that stream. It will not be reused in a
- * later configure() call by the framework, and all the gralloc buffers for
- * it will be freed after the configure_streams() call returns.
- *
- * The stream_list structure is owned by the framework, and may not be
- * accessed once this call completes. The address of an individual
- * camera3_stream_t structure will remain valid for access by the HAL until
- * the end of the first configure_stream() call which no longer includes
- * that camera3_stream_t in the stream_list argument. The HAL may not change
- * values in the stream structure outside of the private pointer, except for
- * the usage and max_buffers members during the configure_streams() call
- * itself.
- *
- * If the stream is new, max_buffer, and private pointer fields of the
- * stream structure will all be set to 0. The usage will be set to the
- * consumer usage flags. The HAL device must set these fields before the
- * configure_streams() call returns. These fields are then used by the
- * framework and the platform gralloc module to allocate the gralloc
- * buffers for each stream.
- *
- * Newly allocated buffers may be included in a capture request at any time
- * by the framework. Once a gralloc buffer is returned to the framework
- * with process_capture_result (and its respective release_fence has been
- * signaled) the framework may free or reuse it at any time.
- *
- * ------------------------------------------------------------------------
- *
- * Preconditions:
- *
- * The framework will only call this method when no captures are being
- * processed. That is, all results have been returned to the framework, and
- * all in-flight input and output buffers have been returned and their
- * release sync fences have been signaled by the HAL. The framework will not
- * submit new requests for capture while the configure_streams() call is
- * underway.
- *
- * Postconditions:
- *
- * The HAL device must configure itself to provide maximum possible output
- * frame rate given the sizes and formats of the output streams, as
- * documented in the camera device's static metadata.
- *
- * Performance requirements:
- *
- * This call is expected to be heavyweight and possibly take several hundred
- * milliseconds to complete, since it may require resetting and
- * reconfiguring the image sensor and the camera processing pipeline.
- * Nevertheless, the HAL device should attempt to minimize the
- * reconfiguration delay to minimize the user-visible pauses during
- * application operational mode changes (such as switching from still
- * capture to video recording).
- *
- * The HAL should return from this call in 500ms, and must return from this
- * call in 1000ms.
- *
- * Return values:
- *
- * 0: On successful stream configuration
- *
- * -EINVAL: If the requested stream configuration is invalid. Some examples
- * of invalid stream configurations include:
- *
- * - Including more than 1 input-capable stream (INPUT or
- * BIDIRECTIONAL)
- *
- * - Not including any output-capable streams (OUTPUT or
- * BIDIRECTIONAL)
- *
- * - Including streams with unsupported formats, or an unsupported
- * size for that format.
- *
- * - Including too many output streams of a certain format.
- *
- * - Unsupported rotation configuration (only applies to
- * devices with version >= CAMERA_DEVICE_API_VERSION_3_3)
- *
- * - Stream sizes/formats don't satisfy the
- * camera3_stream_configuration_t->operation_mode requirements for non-NORMAL mode,
- * or the requested operation_mode is not supported by the HAL.
- * (only applies to devices with version >= CAMERA_DEVICE_API_VERSION_3_3)
- *
- * Note that the framework submitting an invalid stream
- * configuration is not normal operation, since stream
- * configurations are checked before configure. An invalid
- * configuration means that a bug exists in the framework code, or
- * there is a mismatch between the HAL's static metadata and the
- * requirements on streams.
- *
- * -ENODEV: If there has been a fatal error and the device is no longer
- * operational. Only close() can be called successfully by the
- * framework after this error is returned.
- */
- int (*configure_streams)(const struct camera3_device *,
- camera3_stream_configuration_t *stream_list);
-
- /**
- * register_stream_buffers:
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * DEPRECATED. This will not be called and must be set to NULL.
- *
- * <= CAMERA_DEVICE_API_VERSION_3_1:
- *
- * Register buffers for a given stream with the HAL device. This method is
- * called by the framework after a new stream is defined by
- * configure_streams, and before buffers from that stream are included in a
- * capture request. If the same stream is listed in a subsequent
- * configure_streams() call, register_stream_buffers will _not_ be called
- * again for that stream.
- *
- * The framework does not need to register buffers for all configured
- * streams before it submits the first capture request. This allows quick
- * startup for preview (or similar use cases) while other streams are still
- * being allocated.
- *
- * This method is intended to allow the HAL device to map or otherwise
- * prepare the buffers for later use. The buffers passed in will already be
- * locked for use. At the end of the call, all the buffers must be ready to
- * be returned to the stream. The buffer_set argument is only valid for the
- * duration of this call.
- *
- * If the stream format was set to HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
- * the camera HAL should inspect the passed-in buffers here to determine any
- * platform-private pixel format information.
- *
- * Performance requirements:
- *
- * This should be a non-blocking call. The HAL should return from this call
- * in 1ms, and must return from this call in 5ms.
- *
- * Return values:
- *
- * 0: On successful registration of the new stream buffers
- *
- * -EINVAL: If the stream_buffer_set does not refer to a valid active
- * stream, or if the buffers array is invalid.
- *
- * -ENOMEM: If there was a failure in registering the buffers. The framework
- * must consider all the stream buffers to be unregistered, and can
- * try to register again later.
- *
- * -ENODEV: If there is a fatal error, and the device is no longer
- * operational. Only close() can be called successfully by the
- * framework after this error is returned.
- */
- int (*register_stream_buffers)(const struct camera3_device *,
- const camera3_stream_buffer_set_t *buffer_set);
-
- /**********************************************************************
- * Request creation and submission
- */
-
- /**
- * construct_default_request_settings:
- *
- * Create capture settings for standard camera use cases.
- *
- * The device must return a settings buffer that is configured to meet the
- * requested use case, which must be one of the CAMERA3_TEMPLATE_*
- * enums. All request control fields must be included.
- *
- * The HAL retains ownership of this structure, but the pointer to the
- * structure must be valid until the device is closed. The framework and the
- * HAL may not modify the buffer once it is returned by this call. The same
- * buffer may be returned for subsequent calls for the same template, or for
- * other templates.
- *
- * Performance requirements:
- *
- * This should be a non-blocking call. The HAL should return from this call
- * in 1ms, and must return from this call in 5ms.
- *
- * Return values:
- *
- * Valid metadata: On successful creation of a default settings
- * buffer.
- *
- * NULL: In case of a fatal error. After this is returned, only
- * the close() method can be called successfully by the
- * framework.
- */
- const camera_metadata_t* (*construct_default_request_settings)(
- const struct camera3_device *,
- int type);
-
- /**
- * process_capture_request:
- *
- * Send a new capture request to the HAL. The HAL should not return from
- * this call until it is ready to accept the next request to process. Only
- * one call to process_capture_request() will be made at a time by the
- * framework, and the calls will all be from the same thread. The next call
- * to process_capture_request() will be made as soon as a new request and
- * its associated buffers are available. In a normal preview scenario, this
- * means the function will be called again by the framework almost
- * instantly.
- *
- * The actual request processing is asynchronous, with the results of
- * capture being returned by the HAL through the process_capture_result()
- * call. This call requires the result metadata to be available, but output
- * buffers may simply provide sync fences to wait on. Multiple requests are
- * expected to be in flight at once, to maintain full output frame rate.
- *
- * The framework retains ownership of the request structure. It is only
- * guaranteed to be valid during this call. The HAL device must make copies
- * of the information it needs to retain for the capture processing. The HAL
- * is responsible for waiting on and closing the buffers' fences and
- * returning the buffer handles to the framework.
- *
- * The HAL must write the file descriptor for the input buffer's release
- * sync fence into input_buffer->release_fence, if input_buffer is not
- * NULL. If the HAL returns -1 for the input buffer release sync fence, the
- * framework is free to immediately reuse the input buffer. Otherwise, the
- * framework will wait on the sync fence before refilling and reusing the
- * input buffer.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- *
- * The input/output buffers provided by the framework in each request
- * may be brand new (having never before seen by the HAL).
- *
- * ------------------------------------------------------------------------
- * Performance considerations:
- *
- * Handling a new buffer should be extremely lightweight and there should be
- * no frame rate degradation or frame jitter introduced.
- *
- * This call must return fast enough to ensure that the requested frame
- * rate can be sustained, especially for streaming cases (post-processing
- * quality settings set to FAST). The HAL should return this call in 1
- * frame interval, and must return from this call in 4 frame intervals.
- *
- * Return values:
- *
- * 0: On a successful start to processing the capture request
- *
- * -EINVAL: If the input is malformed (the settings are NULL when not
- * allowed, invalid physical camera settings,
- * there are 0 output buffers, etc) and capture processing
- * cannot start. Failures during request processing should be
- * handled by calling camera3_callback_ops_t.notify(). In case of
- * this error, the framework will retain responsibility for the
- * stream buffers' fences and the buffer handles; the HAL should
- * not close the fences or return these buffers with
- * process_capture_result.
- *
- * -ENODEV: If the camera device has encountered a serious error. After this
- * error is returned, only the close() method can be successfully
- * called by the framework.
- *
- */
- int (*process_capture_request)(const struct camera3_device *,
- camera3_capture_request_t *request);
-
- /**********************************************************************
- * Miscellaneous methods
- */
-
- /**
- * get_metadata_vendor_tag_ops:
- *
- * Get methods to query for vendor extension metadata tag information. The
- * HAL should fill in all the vendor tag operation methods, or leave ops
- * unchanged if no vendor tags are defined.
- *
- * The definition of vendor_tag_query_ops_t can be found in
- * system/media/camera/include/system/camera_metadata.h.
- *
- * >= CAMERA_DEVICE_API_VERSION_3_2:
- * DEPRECATED. This function has been deprecated and should be set to
- * NULL by the HAL. Please implement get_vendor_tag_ops in camera_common.h
- * instead.
- */
- void (*get_metadata_vendor_tag_ops)(const struct camera3_device*,
- vendor_tag_query_ops_t* ops);
-
- /**
- * dump:
- *
- * Print out debugging state for the camera device. This will be called by
- * the framework when the camera service is asked for a debug dump, which
- * happens when using the dumpsys tool, or when capturing a bugreport.
- *
- * The passed-in file descriptor can be used to write debugging text using
- * dprintf() or write(). The text should be in ASCII encoding only.
- *
- * Performance requirements:
- *
- * This must be a non-blocking call. The HAL should return from this call
- * in 1ms, must return from this call in 10ms. This call must avoid
- * deadlocks, as it may be called at any point during camera operation.
- * Any synchronization primitives used (such as mutex locks or semaphores)
- * should be acquired with a timeout.
- */
- void (*dump)(const struct camera3_device *, int fd);
-
- /**
- * flush:
- *
- * Flush all currently in-process captures and all buffers in the pipeline
- * on the given device. The framework will use this to dump all state as
- * quickly as possible in order to prepare for a configure_streams() call.
- *
- * No buffers are required to be successfully returned, so every buffer
- * held at the time of flush() (whether successfully filled or not) may be
- * returned with CAMERA3_BUFFER_STATUS_ERROR. Note the HAL is still allowed
- * to return valid (CAMERA3_BUFFER_STATUS_OK) buffers during this call,
- * provided they are successfully filled.
- *
- * All requests currently in the HAL are expected to be returned as soon as
- * possible. Not-in-process requests should return errors immediately. Any
- * interruptible hardware blocks should be stopped, and any uninterruptible
- * blocks should be waited on.
- *
- * flush() may be called concurrently to process_capture_request(), with the expectation that
- * process_capture_request will return quickly and the request submitted in that
- * process_capture_request call is treated like all other in-flight requests. Due to
- * concurrency issues, it is possible that from the HAL's point of view, a
- * process_capture_request() call may be started after flush has been invoked but has not
- * returned yet. If such a call happens before flush() returns, the HAL should treat the new
- * capture request like other in-flight pending requests (see #4 below).
- *
- * More specifically, the HAL must follow below requirements for various cases:
- *
- * 1. For captures that are too late for the HAL to cancel/stop, and will be
- * completed normally by the HAL; i.e. the HAL can send shutter/notify and
- * process_capture_result and buffers as normal.
- *
- * 2. For pending requests that have not done any processing, the HAL must call notify
- * CAMERA3_MSG_ERROR_REQUEST, and return all the output buffers with
- * process_capture_result in the error state (CAMERA3_BUFFER_STATUS_ERROR).
- * The HAL must not place the release fence into an error state, instead,
- * the release fences must be set to the acquire fences passed by the framework,
- * or -1 if they have been waited on by the HAL already. This is also the path
- * to follow for any captures for which the HAL already called notify() with
- * CAMERA3_MSG_SHUTTER but won't be producing any metadata/valid buffers for.
- * After CAMERA3_MSG_ERROR_REQUEST, for a given frame, only process_capture_results with
- * buffers in CAMERA3_BUFFER_STATUS_ERROR are allowed. No further notifys or
- * process_capture_result with non-null metadata is allowed.
- *
- * 3. For partially completed pending requests that will not have all the output
- * buffers or perhaps missing metadata, the HAL should follow below:
- *
- * 3.1. Call notify with CAMERA3_MSG_ERROR_RESULT if some of the expected result
- * metadata (i.e. one or more partial metadata) won't be available for the capture.
- *
- * 3.2. Call notify with CAMERA3_MSG_ERROR_BUFFER for every buffer that won't
- * be produced for the capture.
- *
- * 3.3 Call notify with CAMERA3_MSG_SHUTTER with the capture timestamp before
- * any buffers/metadata are returned with process_capture_result.
- *
- * 3.4 For captures that will produce some results, the HAL must not call
- * CAMERA3_MSG_ERROR_REQUEST, since that indicates complete failure.
- *
- * 3.5. Valid buffers/metadata should be passed to the framework as normal.
- *
- * 3.6. Failed buffers should be returned to the framework as described for case 2.
- * But failed buffers do not have to follow the strict ordering valid buffers do,
- * and may be out-of-order with respect to valid buffers. For example, if buffers
- * A, B, C, D, E are sent, D and E are failed, then A, E, B, D, C is an acceptable
- * return order.
- *
- * 3.7. For fully-missing metadata, calling CAMERA3_MSG_ERROR_RESULT is sufficient, no
- * need to call process_capture_result with NULL metadata or equivalent.
- *
- * 4. If a flush() is invoked while a process_capture_request() invocation is active, that
- * process call should return as soon as possible. In addition, if a process_capture_request()
- * call is made after flush() has been invoked but before flush() has returned, the
- * capture request provided by the late process_capture_request call should be treated like
- * a pending request in case #2 above.
- *
- * flush() should only return when there are no more outstanding buffers or
- * requests left in the HAL. The framework may call configure_streams (as
- * the HAL state is now quiesced) or may issue new requests.
- *
- * Note that it's sufficient to only support fully-succeeded and fully-failed result cases.
- * However, it is highly desirable to support the partial failure cases as well, as it
- * could help improve the flush call overall performance.
- *
- * Performance requirements:
- *
- * The HAL should return from this call in 100ms, and must return from this
- * call in 1000ms. And this call must not be blocked longer than pipeline
- * latency (see S7 for definition).
- *
- * Version information:
- *
- * only available if device version >= CAMERA_DEVICE_API_VERSION_3_1.
- *
- * Return values:
- *
- * 0: On a successful flush of the camera HAL.
- *
- * -EINVAL: If the input is malformed (the device is not valid).
- *
- * -ENODEV: If the camera device has encountered a serious error. After this
- * error is returned, only the close() method can be successfully
- * called by the framework.
- */
- int (*flush)(const struct camera3_device *);
-
- /**
- * signal_stream_flush:
- *
- * <= CAMERA_DEVICE_API_VERISON_3_5:
- *
- * Not defined and must be NULL
- *
- * >= CAMERA_DEVICE_API_VERISON_3_6:
- *
- * Signaling HAL camera service is about to perform configure_streams() call
- * and HAL must return all buffers of designated streams. HAL must finish
- * inflight requests normally and return all buffers belonging to the
- * designated streams through process_capture_result() or
- * return_stream_buffers() API in a timely manner, or camera service will run
- * into a fatal error.
- *
- * Note that this call serves as an optional hint and camera service may
- * skip calling this if all buffers are already returned.
- *
- */
- void (*signal_stream_flush)(const struct camera3_device*,
- uint32_t num_streams,
- const camera3_stream_t* const* streams);
-
- /**
- * is_reconfiguration_required:
- *
- * <= CAMERA_DEVICE_API_VERISON_3_5:
- *
- * Not defined and must be NULL
- *
- * >= CAMERA_DEVICE_API_VERISON_3_6:
- *
- * Check whether complete stream reconfiguration is required for possible new session
- * parameter values.
- *
- * This method must be called by the camera framework in case the client changes
- * the value of any advertised session parameters. Depending on the specific values
- * the HAL can decide whether a complete stream reconfiguration is required. In case
- * the HAL returns -ENVAL, the camera framework must skip the internal reconfiguration.
- * In case Hal returns 0, the framework must reconfigure the streams and pass the
- * new session parameter values accordingly.
- * This call may be done by the framework some time before the request with new parameters
- * is submitted to the HAL, and the request may be cancelled before it ever gets submitted.
- * Therefore, the HAL must not use this query as an indication to change its behavior in any
- * way.
- * ------------------------------------------------------------------------
- *
- * Preconditions:
- *
- * The framework can call this method at any time after active
- * session configuration. There must be no impact on the performance of
- * pending camera requests in any way. In particular there must not be
- * any glitches or delays during normal camera streaming.
- *
- * Performance requirements:
- * HW and SW camera settings must not be changed and there must not be
- * a user-visible impact on camera performance.
- *
- * @param oldSessionParams The currently applied session parameters.
- * @param newSessionParams The new session parameters set by client.
- *
- * @return Status Status code for the operation, one of:
- * 0: In case the stream reconfiguration is required
- *
- * -EINVAL: In case the stream reconfiguration is not required.
- *
- * -ENOSYS: In case the camera device does not support the
- * reconfiguration query.
- */
- int (*is_reconfiguration_required)(const struct camera3_device*,
- const camera_metadata_t* old_session_params,
- const camera_metadata_t* new_session_params);
-
- /* reserved for future use */
- void *reserved[6];
-} camera3_device_ops_t;
-
-/**********************************************************************
- *
- * Camera device definition
- *
- */
-typedef struct camera3_device {
- /**
- * common.version must equal CAMERA_DEVICE_API_VERSION_3_0 to identify this
- * device as implementing version 3.0 of the camera device HAL.
- *
- * Performance requirements:
- *
- * Camera open (common.module->common.methods->open) should return in 200ms, and must return
- * in 500ms.
- * Camera close (common.close) should return in 200ms, and must return in 500ms.
- *
- */
- hw_device_t common;
- camera3_device_ops_t *ops;
- void *priv;
-} camera3_device_t;
-
-__END_DECLS
-
-#endif /* #ifdef ANDROID_INCLUDE_CAMERA3_H */
diff --git a/chroot/opt/android-master/amd64/usr/include/hardware/camera_common.h b/chroot/opt/android-master/amd64/usr/include/hardware/camera_common.h
deleted file mode 100644
index 16651a9..0000000
--- a/chroot/opt/android-master/amd64/usr/include/hardware/camera_common.h
+++ /dev/null
@@ -1,1218 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// FIXME: add well-defined names for cameras
-
-#ifndef ANDROID_INCLUDE_CAMERA_COMMON_H
-#define ANDROID_INCLUDE_CAMERA_COMMON_H
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <cutils/native_handle.h>
-#include <system/camera.h>
-#include <system/camera_vendor_tags.h>
-#include <hardware/hardware.h>
-#include <hardware/gralloc.h>
-
-__BEGIN_DECLS
-
-/**
- * The id of this module
- */
-#define CAMERA_HARDWARE_MODULE_ID "camera"
-
-/**
- * Module versioning information for the Camera hardware module, based on
- * camera_module_t.common.module_api_version. The two most significant hex
- * digits represent the major version, and the two least significant represent
- * the minor version.
- *
- *******************************************************************************
- * Versions: 0.X - 1.X [CAMERA_MODULE_API_VERSION_1_0]
- *
- * Camera modules that report these version numbers implement the initial
- * camera module HAL interface. All camera devices openable through this
- * module support only version 1 of the camera device HAL. The device_version
- * and static_camera_characteristics fields of camera_info are not valid. Only
- * the android.hardware.Camera API can be supported by this module and its
- * devices.
- *
- *******************************************************************************
- * Version: 2.0 [CAMERA_MODULE_API_VERSION_2_0]
- *
- * Camera modules that report this version number implement the second version
- * of the camera module HAL interface. Camera devices openable through this
- * module may support either version 1.0 or version 2.0 of the camera device
- * HAL interface. The device_version field of camera_info is always valid; the
- * static_camera_characteristics field of camera_info is valid if the
- * device_version field is 2.0 or higher.
- *
- *******************************************************************************
- * Version: 2.1 [CAMERA_MODULE_API_VERSION_2_1]
- *
- * This camera module version adds support for asynchronous callbacks to the
- * framework from the camera HAL module, which is used to notify the framework
- * about changes to the camera module state. Modules that provide a valid
- * set_callbacks() method must report at least this version number.
- *
- *******************************************************************************
- * Version: 2.2 [CAMERA_MODULE_API_VERSION_2_2]
- *
- * This camera module version adds vendor tag support from the module, and
- * deprecates the old vendor_tag_query_ops that were previously only
- * accessible with a device open.
- *
- *******************************************************************************
- * Version: 2.3 [CAMERA_MODULE_API_VERSION_2_3]
- *
- * This camera module version adds open legacy camera HAL device support.
- * Framework can use it to open the camera device as lower device HAL version
- * HAL device if the same device can support multiple device API versions.
- * The standard hardware module open call (common.methods->open) continues
- * to open the camera device with the latest supported version, which is
- * also the version listed in camera_info_t.device_version.
- *
- *******************************************************************************
- * Version: 2.4 [CAMERA_MODULE_API_VERSION_2_4]
- *
- * This camera module version adds below API changes:
- *
- * 1. Torch mode support. The framework can use it to turn on torch mode for
- * any camera device that has a flash unit, without opening a camera device. The
- * camera device has a higher priority accessing the flash unit than the camera
- * module; opening a camera device will turn off the torch if it had been enabled
- * through the module interface. When there are any resource conflicts, such as
- * open() is called to open a camera device, the camera HAL module must notify the
- * framework through the torch mode status callback that the torch mode has been
- * turned off.
- *
- * 2. External camera (e.g. USB hot-plug camera) support. The API updates specify that
- * the camera static info is only available when camera is connected and ready to
- * use for external hot-plug cameras. Calls to get static info will be invalid
- * calls when camera status is not CAMERA_DEVICE_STATUS_PRESENT. The frameworks
- * will only count on device status change callbacks to manage the available external
- * camera list.
- *
- * 3. Camera arbitration hints. This module version adds support for explicitly
- * indicating the number of camera devices that can be simultaneously opened and used.
- * To specify valid combinations of devices, the resource_cost and conflicting_devices
- * fields should always be set in the camera_info structure returned by the
- * get_camera_info call.
- *
- * 4. Module initialization method. This will be called by the camera service
- * right after the HAL module is loaded, to allow for one-time initialization
- * of the HAL. It is called before any other module methods are invoked.
- *
- *******************************************************************************
- * Version: 2.5 [CAMERA_MODULE_API_VERSION_2_5]
- *
- * This camera module version adds below API changes:
- *
- * 1. Support to query characteristics of a non-standalone physical camera, which can
- * only be accessed as part of a logical camera. It also adds camera stream combination
- * query.
- *
- * 2. Ability to query whether a particular camera stream combination is
- * supported by the camera device.
- *
- * 3. Device state change notification. This module version also supports
- * notification about the overall device state change, such as
- * folding/unfolding, or covering/uncovering of shutter.
- */
-
-/**
- * Predefined macros for currently-defined version numbers
- */
-
-/**
- * All module versions <= HARDWARE_MODULE_API_VERSION(1, 0xFF) must be treated
- * as CAMERA_MODULE_API_VERSION_1_0
- */
-#define CAMERA_MODULE_API_VERSION_1_0 HARDWARE_MODULE_API_VERSION(1, 0)
-#define CAMERA_MODULE_API_VERSION_2_0 HARDWARE_MODULE_API_VERSION(2, 0)
-#define CAMERA_MODULE_API_VERSION_2_1 HARDWARE_MODULE_API_VERSION(2, 1)
-#define CAMERA_MODULE_API_VERSION_2_2 HARDWARE_MODULE_API_VERSION(2, 2)
-#define CAMERA_MODULE_API_VERSION_2_3 HARDWARE_MODULE_API_VERSION(2, 3)
-#define CAMERA_MODULE_API_VERSION_2_4 HARDWARE_MODULE_API_VERSION(2, 4)
-#define CAMERA_MODULE_API_VERSION_2_5 HARDWARE_MODULE_API_VERSION(2, 5)
-
-#define CAMERA_MODULE_API_VERSION_CURRENT CAMERA_MODULE_API_VERSION_2_5
-
-/**
- * All device versions <= HARDWARE_DEVICE_API_VERSION(1, 0xFF) must be treated
- * as CAMERA_DEVICE_API_VERSION_1_0
- */
-#define CAMERA_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION(1, 0) // DEPRECATED
-#define CAMERA_DEVICE_API_VERSION_2_0 HARDWARE_DEVICE_API_VERSION(2, 0) // NO LONGER SUPPORTED
-#define CAMERA_DEVICE_API_VERSION_2_1 HARDWARE_DEVICE_API_VERSION(2, 1) // NO LONGER SUPPORTED
-#define CAMERA_DEVICE_API_VERSION_3_0 HARDWARE_DEVICE_API_VERSION(3, 0) // NO LONGER SUPPORTED
-#define CAMERA_DEVICE_API_VERSION_3_1 HARDWARE_DEVICE_API_VERSION(3, 1) // NO LONGER SUPPORTED
-#define CAMERA_DEVICE_API_VERSION_3_2 HARDWARE_DEVICE_API_VERSION(3, 2)
-#define CAMERA_DEVICE_API_VERSION_3_3 HARDWARE_DEVICE_API_VERSION(3, 3)
-#define CAMERA_DEVICE_API_VERSION_3_4 HARDWARE_DEVICE_API_VERSION(3, 4)
-#define CAMERA_DEVICE_API_VERSION_3_5 HARDWARE_DEVICE_API_VERSION(3, 5)
-#define CAMERA_DEVICE_API_VERSION_3_6 HARDWARE_DEVICE_API_VERSION(3, 6)
-
-// Device version 3.5 is current, older HAL camera device versions are not
-// recommended for new devices.
-#define CAMERA_DEVICE_API_VERSION_CURRENT CAMERA_DEVICE_API_VERSION_3_5
-
-/**
- * Defined in /system/media/camera/include/system/camera_metadata.h
- */
-typedef struct camera_metadata camera_metadata_t;
-
-typedef struct camera_info {
- /**
- * The direction that the camera faces to. See system/core/include/system/camera.h
- * for camera facing definitions.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * It should be CAMERA_FACING_BACK or CAMERA_FACING_FRONT.
- *
- * CAMERA_MODULE_API_VERSION_2_4 or higher:
- *
- * It should be CAMERA_FACING_BACK, CAMERA_FACING_FRONT or
- * CAMERA_FACING_EXTERNAL.
- */
- int facing;
-
- /**
- * The orientation of the camera image. The value is the angle that the
- * camera image needs to be rotated clockwise so it shows correctly on the
- * display in its natural orientation. It should be 0, 90, 180, or 270.
- *
- * For example, suppose a device has a naturally tall screen. The
- * back-facing camera sensor is mounted in landscape. You are looking at the
- * screen. If the top side of the camera sensor is aligned with the right
- * edge of the screen in natural orientation, the value should be 90. If the
- * top side of a front-facing camera sensor is aligned with the right of the
- * screen, the value should be 270.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * Valid in all camera_module versions.
- *
- * CAMERA_MODULE_API_VERSION_2_4 or higher:
- *
- * Valid if camera facing is CAMERA_FACING_BACK or CAMERA_FACING_FRONT,
- * not valid if camera facing is CAMERA_FACING_EXTERNAL.
- */
- int orientation;
-
- /**
- * The value of camera_device_t.common.version.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_0:
- *
- * Not valid. Can be assumed to be CAMERA_DEVICE_API_VERSION_1_0. Do
- * not read this field.
- *
- * CAMERA_MODULE_API_VERSION_2_0 or higher:
- *
- * Always valid
- *
- */
- uint32_t device_version;
-
- /**
- * The camera's fixed characteristics, which include all static camera metadata
- * specified in system/media/camera/docs/docs.html. This should be a sorted metadata
- * buffer, and may not be modified or freed by the caller. The pointer should remain
- * valid for the lifetime of the camera module, and values in it may not
- * change after it is returned by get_camera_info().
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_0:
- *
- * Not valid. Extra characteristics are not available. Do not read this
- * field.
- *
- * CAMERA_MODULE_API_VERSION_2_0 or higher:
- *
- * Valid if device_version >= CAMERA_DEVICE_API_VERSION_2_0. Do not read
- * otherwise.
- *
- */
- const camera_metadata_t *static_camera_characteristics;
-
- /**
- * The total resource "cost" of using this camera, represented as an integer
- * value in the range [0, 100] where 100 represents total usage of the shared
- * resource that is the limiting bottleneck of the camera subsystem. This may
- * be a very rough estimate, and is used as a hint to the camera service to
- * determine when to disallow multiple applications from simultaneously
- * opening different cameras advertised by the camera service.
- *
- * The camera service must be able to simultaneously open and use any
- * combination of camera devices exposed by the HAL where the sum of
- * the resource costs of these cameras is <= 100. For determining cost,
- * each camera device must be assumed to be configured and operating at
- * the maximally resource-consuming framerate and stream size settings
- * available in the configuration settings exposed for that device through
- * the camera metadata.
- *
- * The camera service may still attempt to simultaneously open combinations
- * of camera devices with a total resource cost > 100. This may succeed or
- * fail. If this succeeds, combinations of configurations that are not
- * supported due to resource constraints from having multiple open devices
- * should fail during the configure calls. If the total resource cost is
- * <= 100, open and configure should never fail for any stream configuration
- * settings or other device capabilities that would normally succeed for a
- * device when it is the only open camera device.
- *
- * This field will be used to determine whether background applications are
- * allowed to use this camera device while other applications are using other
- * camera devices. Note: multiple applications will never be allowed by the
- * camera service to simultaneously open the same camera device.
- *
- * Example use cases:
- *
- * Ex. 1: Camera Device 0 = Back Camera
- * Camera Device 1 = Front Camera
- * - Using both camera devices causes a large framerate slowdown due to
- * limited ISP bandwidth.
- *
- * Configuration:
- *
- * Camera Device 0 - resource_cost = 51
- * conflicting_devices = null
- * Camera Device 1 - resource_cost = 51
- * conflicting_devices = null
- *
- * Result:
- *
- * Since the sum of the resource costs is > 100, if a higher-priority
- * application has either device open, no lower-priority applications will be
- * allowed by the camera service to open either device. If a lower-priority
- * application is using a device that a higher-priority subsequently attempts
- * to open, the lower-priority application will be forced to disconnect the
- * the device.
- *
- * If the highest-priority application chooses, it may still attempt to open
- * both devices (since these devices are not listed as conflicting in the
- * conflicting_devices fields), but usage of these devices may fail in the
- * open or configure calls.
- *
- * Ex. 2: Camera Device 0 = Left Back Camera
- * Camera Device 1 = Right Back Camera
- * Camera Device 2 = Combined stereo camera using both right and left
- * back camera sensors used by devices 0, and 1
- * Camera Device 3 = Front Camera
- * - Due to do hardware constraints, up to two cameras may be open at once. The
- * combined stereo camera may never be used at the same time as either of the
- * two back camera devices (device 0, 1), and typically requires too much
- * bandwidth to use at the same time as the front camera (device 3).
- *
- * Configuration:
- *
- * Camera Device 0 - resource_cost = 50
- * conflicting_devices = { 2 }
- * Camera Device 1 - resource_cost = 50
- * conflicting_devices = { 2 }
- * Camera Device 2 - resource_cost = 100
- * conflicting_devices = { 0, 1 }
- * Camera Device 3 - resource_cost = 50
- * conflicting_devices = null
- *
- * Result:
- *
- * Based on the conflicting_devices fields, the camera service guarantees that
- * the following sets of open devices will never be allowed: { 1, 2 }, { 0, 2 }.
- *
- * Based on the resource_cost fields, if a high-priority foreground application
- * is using camera device 0, a background application would be allowed to open
- * camera device 1 or 3 (but would be forced to disconnect it again if the
- * foreground application opened another device).
- *
- * The highest priority application may still attempt to simultaneously open
- * devices 0, 2, and 3, but the HAL may fail in open or configure calls for
- * this combination.
- *
- * Ex. 3: Camera Device 0 = Back Camera
- * Camera Device 1 = Front Camera
- * Camera Device 2 = Low-power Front Camera that uses the same
- * sensor as device 1, but only exposes image stream
- * resolutions that can be used in low-power mode
- * - Using both front cameras (device 1, 2) at the same time is impossible due
- * a shared physical sensor. Using the back and "high-power" front camera
- * (device 1) may be impossible for some stream configurations due to hardware
- * limitations, but the "low-power" front camera option may always be used as
- * it has special dedicated hardware.
- *
- * Configuration:
- *
- * Camera Device 0 - resource_cost = 100
- * conflicting_devices = null
- * Camera Device 1 - resource_cost = 100
- * conflicting_devices = { 2 }
- * Camera Device 2 - resource_cost = 0
- * conflicting_devices = { 1 }
- * Result:
- *
- * Based on the conflicting_devices fields, the camera service guarantees that
- * the following sets of open devices will never be allowed: { 1, 2 }.
- *
- * Based on the resource_cost fields, only the highest priority application
- * may attempt to open both device 0 and 1 at the same time. If a higher-priority
- * application is not using device 1 or 2, a low-priority background application
- * may open device 2 (but will be forced to disconnect it if a higher-priority
- * application subsequently opens device 1 or 2).
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * Not valid. Can be assumed to be 100. Do not read this field.
- *
- * CAMERA_MODULE_API_VERSION_2_4 or higher:
- *
- * Always valid.
- */
- int resource_cost;
-
- /**
- * An array of camera device IDs represented as NULL-terminated strings
- * indicating other devices that cannot be simultaneously opened while this
- * camera device is in use.
- *
- * This field is intended to be used to indicate that this camera device
- * is a composite of several other camera devices, or otherwise has
- * hardware dependencies that prohibit simultaneous usage. If there are no
- * dependencies, a NULL may be returned in this field to indicate this.
- *
- * The camera service will never simultaneously open any of the devices
- * in this list while this camera device is open.
- *
- * The strings pointed to in this field will not be cleaned up by the camera
- * service, and must remain while this device is plugged in.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * Not valid. Can be assumed to be NULL. Do not read this field.
- *
- * CAMERA_MODULE_API_VERSION_2_4 or higher:
- *
- * Always valid.
- */
- char** conflicting_devices;
-
- /**
- * The length of the array given in the conflicting_devices field.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * Not valid. Can be assumed to be 0. Do not read this field.
- *
- * CAMERA_MODULE_API_VERSION_2_4 or higher:
- *
- * Always valid.
- */
- size_t conflicting_devices_length;
-
-} camera_info_t;
-
-/**
- * camera_device_status_t:
- *
- * The current status of the camera device, as provided by the HAL through the
- * camera_module_callbacks.camera_device_status_change() call.
- *
- * At module load time, the framework will assume all camera devices are in the
- * CAMERA_DEVICE_STATUS_PRESENT state. The HAL should invoke
- * camera_module_callbacks::camera_device_status_change to inform the framework
- * of any initially NOT_PRESENT devices.
- *
- * Allowed transitions:
- * PRESENT -> NOT_PRESENT
- * NOT_PRESENT -> ENUMERATING
- * NOT_PRESENT -> PRESENT
- * ENUMERATING -> PRESENT
- * ENUMERATING -> NOT_PRESENT
- */
-typedef enum camera_device_status {
- /**
- * The camera device is not currently connected, and opening it will return
- * failure.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * Calls to get_camera_info must still succeed, and provide the same information
- * it would if the camera were connected.
- *
- * CAMERA_MODULE_API_VERSION_2_4:
- *
- * The camera device at this status must return -EINVAL for get_camera_info call,
- * as the device is not connected.
- */
- CAMERA_DEVICE_STATUS_NOT_PRESENT = 0,
-
- /**
- * The camera device is connected, and opening it will succeed.
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * The information returned by get_camera_info cannot change due to this status
- * change. By default, the framework will assume all devices are in this state.
- *
- * CAMERA_MODULE_API_VERSION_2_4:
- *
- * The information returned by get_camera_info will become valid after a device's
- * status changes to this. By default, the framework will assume all devices are in
- * this state.
- */
- CAMERA_DEVICE_STATUS_PRESENT = 1,
-
- /**
- * The camera device is connected, but it is undergoing an enumeration and
- * so opening the device will return -EBUSY.
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * Calls to get_camera_info must still succeed, as if the camera was in the
- * PRESENT status.
- *
- * CAMERA_MODULE_API_VERSION_2_4:
- *
- * The camera device at this status must return -EINVAL for get_camera_info for call,
- * as the device is not ready.
- */
- CAMERA_DEVICE_STATUS_ENUMERATING = 2,
-
-} camera_device_status_t;
-
-/**
- * torch_mode_status_t:
- *
- * The current status of the torch mode, as provided by the HAL through the
- * camera_module_callbacks.torch_mode_status_change() call.
- *
- * The torch mode status of a camera device is applicable only when the camera
- * device is present. The framework will not call set_torch_mode() to turn on
- * torch mode of a camera device if the camera device is not present. At module
- * load time, the framework will assume torch modes are in the
- * TORCH_MODE_STATUS_AVAILABLE_OFF state if the camera device is present and
- * android.flash.info.available is reported as true via get_camera_info() call.
- *
- * The behaviors of the camera HAL module that the framework expects in the
- * following situations when a camera device's status changes:
- * 1. A previously-disconnected camera device becomes connected.
- * After camera_module_callbacks::camera_device_status_change() is invoked
- * to inform the framework that the camera device is present, the framework
- * will assume the camera device's torch mode is in
- * TORCH_MODE_STATUS_AVAILABLE_OFF state. The camera HAL module does not need
- * to invoke camera_module_callbacks::torch_mode_status_change() unless the
- * flash unit is unavailable to use by set_torch_mode().
- *
- * 2. A previously-connected camera becomes disconnected.
- * After camera_module_callbacks::camera_device_status_change() is invoked
- * to inform the framework that the camera device is not present, the
- * framework will not call set_torch_mode() for the disconnected camera
- * device until its flash unit becomes available again. The camera HAL
- * module does not need to invoke
- * camera_module_callbacks::torch_mode_status_change() separately to inform
- * that the flash unit has become unavailable.
- *
- * 3. open() is called to open a camera device.
- * The camera HAL module must invoke
- * camera_module_callbacks::torch_mode_status_change() for all flash units
- * that have entered TORCH_MODE_STATUS_NOT_AVAILABLE state and can not be
- * turned on by calling set_torch_mode() anymore due to this open() call.
- * open() must not trigger TORCH_MODE_STATUS_AVAILABLE_OFF before
- * TORCH_MODE_STATUS_NOT_AVAILABLE for all flash units that have become
- * unavailable.
- *
- * 4. close() is called to close a camera device.
- * The camera HAL module must invoke
- * camera_module_callbacks::torch_mode_status_change() for all flash units
- * that have entered TORCH_MODE_STATUS_AVAILABLE_OFF state and can be turned
- * on by calling set_torch_mode() again because of enough resources freed
- * up by this close() call.
- *
- * Note that the framework calling set_torch_mode() successfully must trigger
- * TORCH_MODE_STATUS_AVAILABLE_OFF or TORCH_MODE_STATUS_AVAILABLE_ON callback
- * for the given camera device. Additionally it must trigger
- * TORCH_MODE_STATUS_AVAILABLE_OFF callbacks for other previously-on torch
- * modes if HAL cannot keep multiple torch modes on simultaneously.
- */
-typedef enum torch_mode_status {
-
- /**
- * The flash unit is no longer available and the torch mode can not be
- * turned on by calling set_torch_mode(). If the torch mode is on, it
- * will be turned off by HAL before HAL calls torch_mode_status_change().
- */
- TORCH_MODE_STATUS_NOT_AVAILABLE = 0,
-
- /**
- * A torch mode has become off and available to be turned on via
- * set_torch_mode(). This may happen in the following
- * cases:
- * 1. After the resources to turn on the torch mode have become available.
- * 2. After set_torch_mode() is called to turn off the torch mode.
- * 3. After the framework turned on the torch mode of some other camera
- * device and HAL had to turn off the torch modes of any camera devices
- * that were previously on.
- */
- TORCH_MODE_STATUS_AVAILABLE_OFF = 1,
-
- /**
- * A torch mode has become on and available to be turned off via
- * set_torch_mode(). This can happen only after set_torch_mode() is called
- * to turn on the torch mode.
- */
- TORCH_MODE_STATUS_AVAILABLE_ON = 2,
-
-} torch_mode_status_t;
-
-/**
- * Callback functions for the camera HAL module to use to inform the framework
- * of changes to the camera subsystem.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * Each callback is called only by HAL modules implementing the indicated
- * version or higher of the HAL module API interface.
- *
- * CAMERA_MODULE_API_VERSION_2_1:
- * camera_device_status_change()
- *
- * CAMERA_MODULE_API_VERSION_2_4:
- * torch_mode_status_change()
-
- */
-typedef struct camera_module_callbacks {
-
- /**
- * camera_device_status_change:
- *
- * Callback to the framework to indicate that the state of a specific camera
- * device has changed. At module load time, the framework will assume all
- * camera devices are in the CAMERA_DEVICE_STATUS_PRESENT state. The HAL
- * must call this method to inform the framework of any initially
- * NOT_PRESENT devices.
- *
- * This callback is added for CAMERA_MODULE_API_VERSION_2_1.
- *
- * camera_module_callbacks: The instance of camera_module_callbacks_t passed
- * to the module with set_callbacks.
- *
- * camera_id: The ID of the camera device that has a new status.
- *
- * new_status: The new status code, one of the camera_device_status_t enums,
- * or a platform-specific status.
- *
- */
- void (*camera_device_status_change)(const struct camera_module_callbacks*,
- int camera_id,
- int new_status);
-
- /**
- * torch_mode_status_change:
- *
- * Callback to the framework to indicate that the state of the torch mode
- * of the flash unit associated with a specific camera device has changed.
- * At module load time, the framework will assume the torch modes are in
- * the TORCH_MODE_STATUS_AVAILABLE_OFF state if android.flash.info.available
- * is reported as true via get_camera_info() call.
- *
- * This callback is added for CAMERA_MODULE_API_VERSION_2_4.
- *
- * camera_module_callbacks: The instance of camera_module_callbacks_t
- * passed to the module with set_callbacks.
- *
- * camera_id: The ID of camera device whose flash unit has a new torch mode
- * status.
- *
- * new_status: The new status code, one of the torch_mode_status_t enums.
- */
- void (*torch_mode_status_change)(const struct camera_module_callbacks*,
- const char* camera_id,
- int new_status);
-
-
-} camera_module_callbacks_t;
-
-/**
- * camera_stream_t:
- *
- * A handle to a single camera input or output stream. A stream is defined by
- * the framework by its buffer resolution and format and gralloc usage flags.
- *
- * The stream structures are owned by the framework and pointers to a
- * camera_stream passed into the HAL by is_stream_combination_supported() are
- * only valid within the scope of the call.
- *
- * All camera_stream members are immutable.
- */
-typedef struct camera_stream {
- /**
- * The type of the stream, one of the camera3_stream_type_t values.
- */
- int stream_type;
-
- /**
- * The width in pixels of the buffers in this stream
- */
- uint32_t width;
-
- /**
- * The height in pixels of the buffers in this stream
- */
- uint32_t height;
-
- /**
- * The pixel format for the buffers in this stream. Format is a value from
- * the HAL_PIXEL_FORMAT_* list in system/core/include/system/graphics.h, or
- * from device-specific headers.
- *
- * If HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is used, then the platform
- * gralloc module will select a format based on the usage flags provided by
- * the camera device and the other endpoint of the stream.
- *
- */
- int format;
-
- /**
- * The gralloc usage flags for this stream, as needed by the HAL. The usage
- * flags are defined in gralloc.h (GRALLOC_USAGE_*), or in device-specific
- * headers.
- *
- * For output streams, these are the HAL's producer usage flags. For input
- * streams, these are the HAL's consumer usage flags. The usage flags from
- * the producer and the consumer will be combined together and then passed
- * to the platform gralloc HAL module for allocating the gralloc buffers for
- * each stream.
- *
- * The usage flag for an output stream may be bitwise
- * combination of usage flags for multiple consumers, for the purpose of
- * sharing one camera stream between those consumers. The HAL must fail
- * the stream combination query call with -EINVAL if the combined flags cannot be
- * supported due to imcompatible buffer format, dataSpace, or other hardware
- * limitations.
- */
- uint32_t usage;
-
- /**
- * A field that describes the contents of the buffer. The format and buffer
- * dimensions define the memory layout and structure of the stream buffers,
- * while dataSpace defines the meaning of the data within the buffer.
- *
- * For most formats, dataSpace defines the color space of the image data.
- * In addition, for some formats, dataSpace indicates whether image- or
- * depth-based data is requested. See system/core/include/system/graphics.h
- * for details of formats and valid dataSpace values for each format.
- *
- * Always set by the camera service. The dataspace values are set
- * using the V0 dataspace definitions in graphics.h
- */
- android_dataspace_t data_space;
-
- /**
- * The required output rotation of the stream, one of
- * the camera3_stream_rotation_t values. This must be inspected by HAL along
- * with stream width and height. For example, if the rotation is 90 degree
- * and the stream width and height is 720 and 1280 respectively, camera service
- * will supply buffers of size 720x1280, and HAL should capture a 1280x720 image
- * and rotate the image by 90 degree counterclockwise. The rotation field is
- * no-op when the stream type is input. Camera HAL must ignore the rotation
- * field for an input stream.
- *
- * Always set by camera service. HAL must inspect this field during stream
- * combination query and return -EINVAL if it cannot perform such rotation.
- * HAL must always support CAMERA3_STREAM_ROTATION_0, so a
- * is_stream_combination_supported() call must not fail for unsupported rotation if
- * rotation field of all streams is CAMERA3_STREAM_ROTATION_0.
- *
- */
- int rotation;
-
- /**
- * The physical camera id this stream belongs to.
- * Always set by camera service. If the camera device is not a logical
- * multi camera, or if the camera is a logical multi camera but the stream
- * is not a physical output stream, this field will point to a 0-length
- * string.
- *
- * A logical multi camera is a camera device backed by multiple physical
- * cameras that are also exposed to the application. And for a logical
- * multi camera, a physical output stream is an output stream specifically
- * requested on an underlying physical camera.
- *
- * For an input stream, this field is guaranteed to be a 0-length string.
- */
- const char* physical_camera_id;
-
-} camera_stream_t;
-
-/**
- * camera_stream_combination_t:
- *
- * A structure of stream definitions, used by is_stream_combination_supported(). This
- * structure defines all the input & output streams for specific camera use case.
- */
-typedef struct camera_stream_combination {
- /**
- * The total number of streams by the framework. This includes
- * both input and output streams. The number of streams will be at least 1,
- * and there will be at least one output-capable stream.
- */
- uint32_t num_streams;
-
- /**
- * An array of camera streams, defining the input/output
- * stream combination for the camera HAL device.
- *
- * At most one input-capable stream may be defined.
- *
- * At least one output-capable stream must be defined.
- */
- camera_stream_t *streams;
-
- /**
- * The operation mode of streams in this stream combination, one of the value
- * defined in camera3_stream_configuration_mode_t.
- *
- */
- uint32_t operation_mode;
-
-} camera_stream_combination_t;
-
-/**
- * device_state_t:
- *
- * Possible physical states of the overall device, for use with
- * notify_device_state_change.
- */
-typedef enum device_state {
- /**
- * The device is in its normal physical configuration. This is the default if the
- * device does not support multiple different states.
- */
- NORMAL = 0,
-
- /**
- * Camera device(s) facing backward are covered.
- */
- BACK_COVERED = 1 << 0,
-
- /**
- * Camera device(s) facing foward are covered.
- */
- FRONT_COVERED = 1 << 1,
-
- /**
- * The device is folded. If not set, the device is unfolded or does not
- * support folding.
- *
- * The exact point when this status change happens during the folding
- * operation is device-specific.
- */
- FOLDED = 1 << 2,
-
- /**
- * First vendor-specific device state. All bits above and including this one
- * are for vendor state values. Values below this one must only be used
- * for framework-defined states.
- */
- VENDOR_STATE_START = 1LL << 32
-
-} device_state_t;
-
-typedef struct camera_module {
- /**
- * Common methods of the camera module. This *must* be the first member of
- * camera_module as users of this structure will cast a hw_module_t to
- * camera_module pointer in contexts where it's known the hw_module_t
- * references a camera_module.
- *
- * The return values for common.methods->open for camera_module are:
- *
- * 0: On a successful open of the camera device.
- *
- * -ENODEV: The camera device cannot be opened due to an internal
- * error.
- *
- * -EINVAL: The input arguments are invalid, i.e. the id is invalid,
- * and/or the module is invalid.
- *
- * -EBUSY: The camera device was already opened for this camera id
- * (by using this method or open_legacy),
- * regardless of the device HAL version it was opened as.
- *
- * -EUSERS: The maximal number of camera devices that can be
- * opened concurrently were opened already, either by
- * this method or the open_legacy method.
- *
- * All other return values from common.methods->open will be treated as
- * -ENODEV.
- */
- hw_module_t common;
-
- /**
- * get_number_of_cameras:
- *
- * Returns the number of camera devices accessible through the camera
- * module. The camera devices are numbered 0 through N-1, where N is the
- * value returned by this call. The name of the camera device for open() is
- * simply the number converted to a string. That is, "0" for camera ID 0,
- * "1" for camera ID 1.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_2_3 or lower:
- *
- * The value here must be static, and cannot change after the first call
- * to this method.
- *
- * CAMERA_MODULE_API_VERSION_2_4 or higher:
- *
- * The value here must be static, and must count only built-in cameras,
- * which have CAMERA_FACING_BACK or CAMERA_FACING_FRONT camera facing values
- * (camera_info.facing). The HAL must not include the external cameras
- * (camera_info.facing == CAMERA_FACING_EXTERNAL) into the return value
- * of this call. Frameworks will use camera_device_status_change callback
- * to manage number of external cameras.
- */
- int (*get_number_of_cameras)(void);
-
- /**
- * get_camera_info:
- *
- * Return the static camera information for a given camera device. This
- * information may not change for a camera device.
- *
- * Return values:
- *
- * 0: On a successful operation
- *
- * -ENODEV: The information cannot be provided due to an internal
- * error.
- *
- * -EINVAL: The input arguments are invalid, i.e. the id is invalid,
- * and/or the module is invalid.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_2_4 or higher:
- *
- * When a camera is disconnected, its camera id becomes invalid. Calling this
- * this method with this invalid camera id will get -EINVAL and NULL camera
- * static metadata (camera_info.static_camera_characteristics).
- */
- int (*get_camera_info)(int camera_id, struct camera_info *info);
-
- /**
- * set_callbacks:
- *
- * Provide callback function pointers to the HAL module to inform framework
- * of asynchronous camera module events. The framework will call this
- * function once after initial camera HAL module load, after the
- * get_number_of_cameras() method is called for the first time, and before
- * any other calls to the module.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_0, CAMERA_MODULE_API_VERSION_2_0:
- *
- * Not provided by HAL module. Framework may not call this function.
- *
- * CAMERA_MODULE_API_VERSION_2_1:
- *
- * Valid to be called by the framework.
- *
- * Return values:
- *
- * 0: On a successful operation
- *
- * -ENODEV: The operation cannot be completed due to an internal
- * error.
- *
- * -EINVAL: The input arguments are invalid, i.e. the callbacks are
- * null
- */
- int (*set_callbacks)(const camera_module_callbacks_t *callbacks);
-
- /**
- * get_vendor_tag_ops:
- *
- * Get methods to query for vendor extension metadata tag information. The
- * HAL should fill in all the vendor tag operation methods, or leave ops
- * unchanged if no vendor tags are defined.
- *
- * The vendor_tag_ops structure used here is defined in:
- * system/media/camera/include/system/vendor_tags.h
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_x/2_0/2_1:
- * Not provided by HAL module. Framework may not call this function.
- *
- * CAMERA_MODULE_API_VERSION_2_2:
- * Valid to be called by the framework.
- */
- void (*get_vendor_tag_ops)(vendor_tag_ops_t* ops);
-
- /**
- * open_legacy:
- *
- * Open a specific legacy camera HAL device if multiple device HAL API
- * versions are supported by this camera HAL module. For example, if the
- * camera module supports both CAMERA_DEVICE_API_VERSION_1_0 and
- * CAMERA_DEVICE_API_VERSION_3_2 device API for the same camera id,
- * framework can call this function to open the camera device as
- * CAMERA_DEVICE_API_VERSION_1_0 device.
- *
- * This is an optional method. A Camera HAL module does not need to support
- * more than one device HAL version per device, and such modules may return
- * -ENOSYS for all calls to this method. For all older HAL device API
- * versions that are not supported, it may return -EOPNOTSUPP. When above
- * cases occur, The normal open() method (common.methods->open) will be
- * used by the framework instead.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_x/2_0/2_1/2_2:
- * Not provided by HAL module. Framework will not call this function.
- *
- * CAMERA_MODULE_API_VERSION_2_3:
- * Valid to be called by the framework.
- *
- * Return values:
- *
- * 0: On a successful open of the camera device.
- *
- * -ENOSYS This method is not supported.
- *
- * -EOPNOTSUPP: The requested HAL version is not supported by this method.
- *
- * -EINVAL: The input arguments are invalid, i.e. the id is invalid,
- * and/or the module is invalid.
- *
- * -EBUSY: The camera device was already opened for this camera id
- * (by using this method or common.methods->open method),
- * regardless of the device HAL version it was opened as.
- *
- * -EUSERS: The maximal number of camera devices that can be
- * opened concurrently were opened already, either by
- * this method or common.methods->open method.
- */
- int (*open_legacy)(const struct hw_module_t* module, const char* id,
- uint32_t halVersion, struct hw_device_t** device);
-
- /**
- * set_torch_mode:
- *
- * Turn on or off the torch mode of the flash unit associated with a given
- * camera ID. If the operation is successful, HAL must notify the framework
- * torch state by invoking
- * camera_module_callbacks.torch_mode_status_change() with the new state.
- *
- * The camera device has a higher priority accessing the flash unit. When
- * there are any resource conflicts, such as open() is called to open a
- * camera device, HAL module must notify the framework through
- * camera_module_callbacks.torch_mode_status_change() that the
- * torch mode has been turned off and the torch mode state has become
- * TORCH_MODE_STATUS_NOT_AVAILABLE. When resources to turn on torch mode
- * become available again, HAL module must notify the framework through
- * camera_module_callbacks.torch_mode_status_change() that the torch mode
- * state has become TORCH_MODE_STATUS_AVAILABLE_OFF for set_torch_mode() to
- * be called.
- *
- * When the framework calls set_torch_mode() to turn on the torch mode of a
- * flash unit, if HAL cannot keep multiple torch modes on simultaneously,
- * HAL should turn off the torch mode that was turned on by
- * a previous set_torch_mode() call and notify the framework that the torch
- * mode state of that flash unit has become TORCH_MODE_STATUS_AVAILABLE_OFF.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_x/2_0/2_1/2_2/2_3:
- * Not provided by HAL module. Framework will not call this function.
- *
- * CAMERA_MODULE_API_VERSION_2_4:
- * Valid to be called by the framework.
- *
- * Return values:
- *
- * 0: On a successful operation.
- *
- * -ENOSYS: The camera device does not support this operation. It is
- * returned if and only if android.flash.info.available is
- * false.
- *
- * -EBUSY: The camera device is already in use.
- *
- * -EUSERS: The resources needed to turn on the torch mode are not
- * available, typically because other camera devices are
- * holding the resources to make using the flash unit not
- * possible.
- *
- * -EINVAL: camera_id is invalid.
- *
- */
- int (*set_torch_mode)(const char* camera_id, bool enabled);
-
- /**
- * init:
- *
- * This method is called by the camera service before any other methods
- * are invoked, right after the camera HAL library has been successfully
- * loaded. It may be left as NULL by the HAL module, if no initialization
- * in needed.
- *
- * It can be used by HAL implementations to perform initialization and
- * other one-time operations.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_x/2_0/2_1/2_2/2_3:
- * Not provided by HAL module. Framework will not call this function.
- *
- * CAMERA_MODULE_API_VERSION_2_4:
- * If not NULL, will always be called by the framework once after the HAL
- * module is loaded, before any other HAL module method is called.
- *
- * Return values:
- *
- * 0: On a successful operation.
- *
- * -ENODEV: Initialization cannot be completed due to an internal
- * error. The HAL must be assumed to be in a nonfunctional
- * state.
- *
- */
- int (*init)();
-
- /**
- * get_physical_camera_info:
- *
- * Return the static metadata for a physical camera as a part of a logical
- * camera device. This function is only called for those physical camera
- * ID(s) that are not exposed independently. In other words, camera_id will
- * be greater or equal to the return value of get_number_of_cameras().
- *
- * Return values:
- *
- * 0: On a successful operation
- *
- * -ENODEV: The information cannot be provided due to an internal
- * error.
- *
- * -EINVAL: The input arguments are invalid, i.e. the id is invalid,
- * and/or the module is invalid.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_x/2_0/2_1/2_2/2_3/2_4:
- * Not provided by HAL module. Framework will not call this function.
- *
- * CAMERA_MODULE_API_VERSION_2_5 or higher:
- * If any of the camera devices accessible through this camera module is
- * a logical multi-camera, and at least one of the physical cameras isn't
- * a stand-alone camera device, this function will be called by the camera
- * framework. Calling this function with invalid physical_camera_id will
- * get -EINVAL, and NULL static_metadata.
- */
- int (*get_physical_camera_info)(int physical_camera_id,
- camera_metadata_t **static_metadata);
-
- /**
- * is_stream_combination_supported:
- *
- * Check for device support of specific camera stream combination.
- *
- * Return values:
- *
- * 0: In case the stream combination is supported.
- *
- * -EINVAL: In case the stream combination is not supported.
- *
- * -ENOSYS: In case stream combination query is not supported.
- *
- * Version information (based on camera_module_t.common.module_api_version):
- *
- * CAMERA_MODULE_API_VERSION_1_x/2_0/2_1/2_2/2_3/2_4:
- * Not provided by HAL module. Framework will not call this function.
- *
- * CAMERA_MODULE_API_VERSION_2_5 or higher:
- * Valid to be called by the framework.
- */
- int (*is_stream_combination_supported)(int camera_id,
- const camera_stream_combination_t *streams);
-
- /**
- * notify_device_state_change:
- *
- * Notify the camera module that the state of the overall device has
- * changed in some way that the HAL may want to know about.
- *
- * For example, a physical shutter may have been uncovered or covered,
- * or a camera may have been covered or uncovered by an add-on keyboard
- * or other accessory.
- *
- * The state is a bitfield of potential states, and some physical configurations
- * could plausibly correspond to multiple different combinations of state bits.
- * The HAL must ignore any state bits it is not actively using to determine
- * the appropriate camera configuration.
- *
- * For example, on some devices the FOLDED state could mean that
- * backward-facing cameras are covered by the fold, so FOLDED by itself implies
- * BACK_COVERED. But other devices may support folding but not cover any cameras
- * when folded, so for those FOLDED would not imply any of the other flags.
- * Since these relationships are very device-specific, it is difficult to specify
- * a comprehensive policy. But as a recommendation, it is suggested that if a flag
- * necessarily implies other flags are set as well, then those flags should be set.
- * So even though FOLDED would be enough to infer BACK_COVERED on some devices, the
- * BACK_COVERED flag should also be set for clarity.
- *
- * This method may be invoked by the HAL client at any time. It must not
- * cause any active camera device sessions to be closed, but may dynamically
- * change which physical camera a logical multi-camera is using for its
- * active and future output.
- *
- * The method must be invoked by the HAL client at least once before the
- * client calls ICameraDevice::open on any camera device interfaces listed
- * by this provider, to establish the initial device state.
- *
- * Note that the deviceState is 64-bit bitmask, with system defined states in
- * lower 32-bit and vendor defined states in upper 32-bit.
- */
- void (*notify_device_state_change)(uint64_t deviceState);
-
- /* reserved for future use */
- void* reserved[2];
-} camera_module_t;
-
-__END_DECLS
-
-#endif /* ANDROID_INCLUDE_CAMERA_COMMON_H */
diff --git a/chroot/opt/android-master/amd64/usr/include/hardware/gralloc.h b/chroot/opt/android-master/amd64/usr/include/hardware/gralloc.h
deleted file mode 100644
index 10a153c0..0000000
--- a/chroot/opt/android-master/amd64/usr/include/hardware/gralloc.h
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-#ifndef ANDROID_GRALLOC_INTERFACE_H
-#define ANDROID_GRALLOC_INTERFACE_H
-
-#include <system/graphics.h>
-#include <hardware/hardware.h>
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <cutils/native_handle.h>
-
-#include <hardware/hardware.h>
-#include <hardware/fb.h>
-
-__BEGIN_DECLS
-
-/**
- * Module versioning information for the Gralloc hardware module, based on
- * gralloc_module_t.common.module_api_version.
- *
- * Version History:
- *
- * GRALLOC_MODULE_API_VERSION_0_1:
- * Initial Gralloc hardware module API.
- *
- * GRALLOC_MODULE_API_VERSION_0_2:
- * Add support for flexible YCbCr format with (*lock_ycbcr)() method.
- *
- * GRALLOC_MODULE_API_VERSION_0_3:
- * Add support for fence passing to/from lock/unlock.
- */
-
-#define GRALLOC_MODULE_API_VERSION_0_1 HARDWARE_MODULE_API_VERSION(0, 1)
-#define GRALLOC_MODULE_API_VERSION_0_2 HARDWARE_MODULE_API_VERSION(0, 2)
-#define GRALLOC_MODULE_API_VERSION_0_3 HARDWARE_MODULE_API_VERSION(0, 3)
-
-#define GRALLOC_DEVICE_API_VERSION_0_1 HARDWARE_DEVICE_API_VERSION(0, 1)
-
-/**
- * The id of this module
- */
-#define GRALLOC_HARDWARE_MODULE_ID "gralloc"
-
-/**
- * Name of the graphics device to open
- */
-
-#define GRALLOC_HARDWARE_GPU0 "gpu0"
-
-enum {
- /* buffer is never read in software */
- GRALLOC_USAGE_SW_READ_NEVER = 0x00000000U,
- /* buffer is rarely read in software */
- GRALLOC_USAGE_SW_READ_RARELY = 0x00000002U,
- /* buffer is often read in software */
- GRALLOC_USAGE_SW_READ_OFTEN = 0x00000003U,
- /* mask for the software read values */
- GRALLOC_USAGE_SW_READ_MASK = 0x0000000FU,
-
- /* buffer is never written in software */
- GRALLOC_USAGE_SW_WRITE_NEVER = 0x00000000U,
- /* buffer is rarely written in software */
- GRALLOC_USAGE_SW_WRITE_RARELY = 0x00000020U,
- /* buffer is often written in software */
- GRALLOC_USAGE_SW_WRITE_OFTEN = 0x00000030U,
- /* mask for the software write values */
- GRALLOC_USAGE_SW_WRITE_MASK = 0x000000F0U,
-
- /* buffer will be used as an OpenGL ES texture */
- GRALLOC_USAGE_HW_TEXTURE = 0x00000100U,
- /* buffer will be used as an OpenGL ES render target */
- GRALLOC_USAGE_HW_RENDER = 0x00000200U,
- /* buffer will be used by the 2D hardware blitter */
- GRALLOC_USAGE_HW_2D = 0x00000400U,
- /* buffer will be used by the HWComposer HAL module */
- GRALLOC_USAGE_HW_COMPOSER = 0x00000800U,
- /* buffer will be used with the framebuffer device */
- GRALLOC_USAGE_HW_FB = 0x00001000U,
-
- /* buffer should be displayed full-screen on an external display when
- * possible */
- GRALLOC_USAGE_EXTERNAL_DISP = 0x00002000U,
-
- /* Must have a hardware-protected path to external display sink for
- * this buffer. If a hardware-protected path is not available, then
- * either don't composite only this buffer (preferred) to the
- * external sink, or (less desirable) do not route the entire
- * composition to the external sink. */
- GRALLOC_USAGE_PROTECTED = 0x00004000U,
-
- /* buffer may be used as a cursor */
- GRALLOC_USAGE_CURSOR = 0x00008000U,
-
- /* buffer will be used with the HW video encoder */
- GRALLOC_USAGE_HW_VIDEO_ENCODER = 0x00010000U,
- /* buffer will be written by the HW camera pipeline */
- GRALLOC_USAGE_HW_CAMERA_WRITE = 0x00020000U,
- /* buffer will be read by the HW camera pipeline */
- GRALLOC_USAGE_HW_CAMERA_READ = 0x00040000U,
- /* buffer will be used as part of zero-shutter-lag queue */
- GRALLOC_USAGE_HW_CAMERA_ZSL = 0x00060000U,
- /* mask for the camera access values */
- GRALLOC_USAGE_HW_CAMERA_MASK = 0x00060000U,
- /* mask for the software usage bit-mask */
- GRALLOC_USAGE_HW_MASK = 0x00071F00U,
-
- /* buffer will be used as a RenderScript Allocation */
- GRALLOC_USAGE_RENDERSCRIPT = 0x00100000U,
-
- /* Set by the consumer to indicate to the producer that they may attach a
- * buffer that they did not detach from the BufferQueue. Will be filtered
- * out by GRALLOC_USAGE_ALLOC_MASK, so gralloc modules will not need to
- * handle this flag. */
- GRALLOC_USAGE_FOREIGN_BUFFERS = 0x00200000U,
-
- /* buffer will be used as input to HW HEIC image encoder */
- GRALLOC_USAGE_HW_IMAGE_ENCODER = 0x08000000U,
-
- /* Mask of all flags which could be passed to a gralloc module for buffer
- * allocation. Any flags not in this mask do not need to be handled by
- * gralloc modules. */
- GRALLOC_USAGE_ALLOC_MASK = ~(GRALLOC_USAGE_FOREIGN_BUFFERS),
-
- /* implementation-specific private usage flags */
- GRALLOC_USAGE_PRIVATE_0 = 0x10000000U,
- GRALLOC_USAGE_PRIVATE_1 = 0x20000000U,
- GRALLOC_USAGE_PRIVATE_2 = 0x40000000U,
- GRALLOC_USAGE_PRIVATE_3 = 0x80000000U,
- GRALLOC_USAGE_PRIVATE_MASK = 0xF0000000U,
-};
-
-/*****************************************************************************/
-
-/**
- * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM
- * and the fields of this data structure must begin with hw_module_t
- * followed by module specific information.
- */
-typedef struct gralloc_module_t {
- struct hw_module_t common;
-
- /*
- * (*registerBuffer)() must be called before a buffer_handle_t that has not
- * been created with (*alloc_device_t::alloc)() can be used.
- *
- * This is intended to be used with buffer_handle_t's that have been
- * received in this process through IPC.
- *
- * This function checks that the handle is indeed a valid one and prepares
- * it for use with (*lock)() and (*unlock)().
- *
- * It is not necessary to call (*registerBuffer)() on a handle created
- * with (*alloc_device_t::alloc)().
- *
- * returns an error if this buffer_handle_t is not valid.
- */
- int (*registerBuffer)(struct gralloc_module_t const* module,
- buffer_handle_t handle);
-
- /*
- * (*unregisterBuffer)() is called once this handle is no longer needed in
- * this process. After this call, it is an error to call (*lock)(),
- * (*unlock)(), or (*registerBuffer)().
- *
- * This function doesn't close or free the handle itself; this is done
- * by other means, usually through libcutils's native_handle_close() and
- * native_handle_free().
- *
- * It is an error to call (*unregisterBuffer)() on a buffer that wasn't
- * explicitly registered first.
- */
- int (*unregisterBuffer)(struct gralloc_module_t const* module,
- buffer_handle_t handle);
-
- /*
- * The (*lock)() method is called before a buffer is accessed for the
- * specified usage. This call may block, for instance if the h/w needs
- * to finish rendering or if CPU caches need to be synchronized.
- *
- * The caller promises to modify only pixels in the area specified
- * by (l,t,w,h).
- *
- * The content of the buffer outside of the specified area is NOT modified
- * by this call.
- *
- * If usage specifies GRALLOC_USAGE_SW_*, vaddr is filled with the address
- * of the buffer in virtual memory.
- *
- * Note calling (*lock)() on HAL_PIXEL_FORMAT_YCbCr_*_888 buffers will fail
- * and return -EINVAL. These buffers must be locked with (*lock_ycbcr)()
- * instead.
- *
- * THREADING CONSIDERATIONS:
- *
- * It is legal for several different threads to lock a buffer from
- * read access, none of the threads are blocked.
- *
- * However, locking a buffer simultaneously for write or read/write is
- * undefined, but:
- * - shall not result in termination of the process
- * - shall not block the caller
- * It is acceptable to return an error or to leave the buffer's content
- * into an indeterminate state.
- *
- * If the buffer was created with a usage mask incompatible with the
- * requested usage flags here, -EINVAL is returned.
- *
- */
-
- int (*lock)(struct gralloc_module_t const* module,
- buffer_handle_t handle, int usage,
- int l, int t, int w, int h,
- void** vaddr);
-
-
- /*
- * The (*unlock)() method must be called after all changes to the buffer
- * are completed.
- */
-
- int (*unlock)(struct gralloc_module_t const* module,
- buffer_handle_t handle);
-
-
- /* reserved for future use */
- int (*perform)(struct gralloc_module_t const* module,
- int operation, ... );
-
- /*
- * The (*lock_ycbcr)() method is like the (*lock)() method, with the
- * difference that it fills a struct ycbcr with a description of the buffer
- * layout, and zeroes out the reserved fields.
- *
- * If the buffer format is not compatible with a flexible YUV format (e.g.
- * the buffer layout cannot be represented with the ycbcr struct), it
- * will return -EINVAL.
- *
- * This method must work on buffers with HAL_PIXEL_FORMAT_YCbCr_*_888
- * if supported by the device, as well as with any other format that is
- * requested by the multimedia codecs when they are configured with a
- * flexible-YUV-compatible color-format with android native buffers.
- *
- * Note that this method may also be called on buffers of other formats,
- * including non-YUV formats.
- *
- * Added in GRALLOC_MODULE_API_VERSION_0_2.
- */
-
- int (*lock_ycbcr)(struct gralloc_module_t const* module,
- buffer_handle_t handle, int usage,
- int l, int t, int w, int h,
- struct android_ycbcr *ycbcr);
-
- /*
- * The (*lockAsync)() method is like the (*lock)() method except
- * that the buffer's sync fence object is passed into the lock
- * call instead of requiring the caller to wait for completion.
- *
- * The gralloc implementation takes ownership of the fenceFd and
- * is responsible for closing it when no longer needed.
- *
- * Added in GRALLOC_MODULE_API_VERSION_0_3.
- */
- int (*lockAsync)(struct gralloc_module_t const* module,
- buffer_handle_t handle, int usage,
- int l, int t, int w, int h,
- void** vaddr, int fenceFd);
-
- /*
- * The (*unlockAsync)() method is like the (*unlock)() method
- * except that a buffer sync fence object is returned from the
- * lock call, representing the completion of any pending work
- * performed by the gralloc implementation.
- *
- * The caller takes ownership of the fenceFd and is responsible
- * for closing it when no longer needed.
- *
- * Added in GRALLOC_MODULE_API_VERSION_0_3.
- */
- int (*unlockAsync)(struct gralloc_module_t const* module,
- buffer_handle_t handle, int* fenceFd);
-
- /*
- * The (*lockAsync_ycbcr)() method is like the (*lock_ycbcr)()
- * method except that the buffer's sync fence object is passed
- * into the lock call instead of requiring the caller to wait for
- * completion.
- *
- * The gralloc implementation takes ownership of the fenceFd and
- * is responsible for closing it when no longer needed.
- *
- * Added in GRALLOC_MODULE_API_VERSION_0_3.
- */
- int (*lockAsync_ycbcr)(struct gralloc_module_t const* module,
- buffer_handle_t handle, int usage,
- int l, int t, int w, int h,
- struct android_ycbcr *ycbcr, int fenceFd);
-
- /* getTransportSize(..., outNumFds, outNumInts)
- * This function is mandatory on devices running IMapper2.1 or higher.
- *
- * Get the transport size of a buffer. An imported buffer handle is a raw
- * buffer handle with the process-local runtime data appended. This
- * function, for example, allows a caller to omit the process-local
- * runtime data at the tail when serializing the imported buffer handle.
- *
- * Note that a client might or might not omit the process-local runtime
- * data when sending an imported buffer handle. The mapper must support
- * both cases on the receiving end.
- */
- int32_t (*getTransportSize)(
- struct gralloc_module_t const* module, buffer_handle_t handle, uint32_t *outNumFds,
- uint32_t *outNumInts);
-
- /* validateBufferSize(..., w, h, format, usage, stride)
- * This function is mandatory on devices running IMapper2.1 or higher.
- *
- * Validate that the buffer can be safely accessed by a caller who assumes
- * the specified width, height, format, usage, and stride. This must at least validate
- * that the buffer size is large enough. Validating the buffer against
- * individual buffer attributes is optional.
- */
- int32_t (*validateBufferSize)(
- struct gralloc_module_t const* device, buffer_handle_t handle,
- uint32_t w, uint32_t h, int32_t format, int usage,
- uint32_t stride);
-
- /* reserved for future use */
- void* reserved_proc[1];
-
-} gralloc_module_t;
-
-/*****************************************************************************/
-
-/**
- * Every device data structure must begin with hw_device_t
- * followed by module specific public methods and attributes.
- */
-
-typedef struct alloc_device_t {
- struct hw_device_t common;
-
- /*
- * (*alloc)() Allocates a buffer in graphic memory with the requested
- * parameters and returns a buffer_handle_t and the stride in pixels to
- * allow the implementation to satisfy hardware constraints on the width
- * of a pixmap (eg: it may have to be multiple of 8 pixels).
- * The CALLER TAKES OWNERSHIP of the buffer_handle_t.
- *
- * If format is HAL_PIXEL_FORMAT_YCbCr_420_888, the returned stride must be
- * 0, since the actual strides are available from the android_ycbcr
- * structure.
- *
- * Returns 0 on success or -errno on error.
- */
-
- int (*alloc)(struct alloc_device_t* dev,
- int w, int h, int format, int usage,
- buffer_handle_t* handle, int* stride);
-
- /*
- * (*free)() Frees a previously allocated buffer.
- * Behavior is undefined if the buffer is still mapped in any process,
- * but shall not result in termination of the program or security breaches
- * (allowing a process to get access to another process' buffers).
- * THIS FUNCTION TAKES OWNERSHIP of the buffer_handle_t which becomes
- * invalid after the call.
- *
- * Returns 0 on success or -errno on error.
- */
- int (*free)(struct alloc_device_t* dev,
- buffer_handle_t handle);
-
- /* This hook is OPTIONAL.
- *
- * If non NULL it will be caused by SurfaceFlinger on dumpsys
- */
- void (*dump)(struct alloc_device_t *dev, char *buff, int buff_len);
-
- void* reserved_proc[7];
-} alloc_device_t;
-
-
-/** convenience API for opening and closing a supported device */
-
-static inline int gralloc_open(const struct hw_module_t* module,
- struct alloc_device_t** device) {
- return module->methods->open(module,
- GRALLOC_HARDWARE_GPU0, TO_HW_DEVICE_T_OPEN(device));
-}
-
-static inline int gralloc_close(struct alloc_device_t* device) {
- return device->common.close(&device->common);
-}
-
-/**
- * map_usage_to_memtrack should be called after allocating a gralloc buffer.
- *
- * @param usage - it is the flag used when alloc function is called.
- *
- * This function maps the gralloc usage flags to appropriate memtrack bucket.
- * GrallocHAL implementers and users should make an additional ION_IOCTL_TAG
- * call using the memtrack tag returned by this function. This will help the
- * in-kernel memtack to categorize the memory allocated by different processes
- * according to their usage.
- *
- */
-static inline const char* map_usage_to_memtrack(uint32_t usage) {
- usage &= GRALLOC_USAGE_ALLOC_MASK;
-
- if ((usage & GRALLOC_USAGE_HW_CAMERA_WRITE) != 0) {
- return "camera";
- } else if ((usage & GRALLOC_USAGE_HW_VIDEO_ENCODER) != 0 ||
- (usage & GRALLOC_USAGE_EXTERNAL_DISP) != 0) {
- return "video";
- } else if ((usage & GRALLOC_USAGE_HW_RENDER) != 0 ||
- (usage & GRALLOC_USAGE_HW_TEXTURE) != 0) {
- return "gl";
- } else if ((usage & GRALLOC_USAGE_HW_CAMERA_READ) != 0) {
- return "camera";
- } else if ((usage & GRALLOC_USAGE_SW_READ_MASK) != 0 ||
- (usage & GRALLOC_USAGE_SW_WRITE_MASK) != 0) {
- return "cpu";
- }
- return "graphics";
-}
-
-__END_DECLS
-
-#endif // ANDROID_GRALLOC_INTERFACE_H
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/byteorder/little_endian.h b/chroot/opt/android-master/amd64/usr/include/linux/byteorder/little_endian.h
new file mode 100644
index 0000000..ea00092
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/byteorder/little_endian.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_BYTEORDER_LITTLE_ENDIAN_H
+#define _UAPI_LINUX_BYTEORDER_LITTLE_ENDIAN_H
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __LITTLE_ENDIAN_BITFIELD
+#define __LITTLE_ENDIAN_BITFIELD
+#endif
+#include <linux/types.h>
+#include <linux/swab.h>
+#define __constant_htonl(x) ((__force __be32) ___constant_swab32((x)))
+#define __constant_ntohl(x) ___constant_swab32((__force __be32) (x))
+#define __constant_htons(x) ((__force __be16) ___constant_swab16((x)))
+#define __constant_ntohs(x) ___constant_swab16((__force __be16) (x))
+#define __constant_cpu_to_le64(x) ((__force __le64) (__u64) (x))
+#define __constant_le64_to_cpu(x) ((__force __u64) (__le64) (x))
+#define __constant_cpu_to_le32(x) ((__force __le32) (__u32) (x))
+#define __constant_le32_to_cpu(x) ((__force __u32) (__le32) (x))
+#define __constant_cpu_to_le16(x) ((__force __le16) (__u16) (x))
+#define __constant_le16_to_cpu(x) ((__force __u16) (__le16) (x))
+#define __constant_cpu_to_be64(x) ((__force __be64) ___constant_swab64((x)))
+#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64) (__be64) (x))
+#define __constant_cpu_to_be32(x) ((__force __be32) ___constant_swab32((x)))
+#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32) (__be32) (x))
+#define __constant_cpu_to_be16(x) ((__force __be16) ___constant_swab16((x)))
+#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16) (__be16) (x))
+#define __cpu_to_le64(x) ((__force __le64) (__u64) (x))
+#define __le64_to_cpu(x) ((__force __u64) (__le64) (x))
+#define __cpu_to_le32(x) ((__force __le32) (__u32) (x))
+#define __le32_to_cpu(x) ((__force __u32) (__le32) (x))
+#define __cpu_to_le16(x) ((__force __le16) (__u16) (x))
+#define __le16_to_cpu(x) ((__force __u16) (__le16) (x))
+#define __cpu_to_be64(x) ((__force __be64) __swab64((x)))
+#define __be64_to_cpu(x) __swab64((__force __u64) (__be64) (x))
+#define __cpu_to_be32(x) ((__force __be32) __swab32((x)))
+#define __be32_to_cpu(x) __swab32((__force __u32) (__be32) (x))
+#define __cpu_to_be16(x) ((__force __be16) __swab16((x)))
+#define __be16_to_cpu(x) __swab16((__force __u16) (__be16) (x))
+#define __cpu_to_le64s(x) do { (void) (x); } while(0)
+#define __le64_to_cpus(x) do { (void) (x); } while(0)
+#define __cpu_to_le32s(x) do { (void) (x); } while(0)
+#define __le32_to_cpus(x) do { (void) (x); } while(0)
+#define __cpu_to_le16s(x) do { (void) (x); } while(0)
+#define __le16_to_cpus(x) do { (void) (x); } while(0)
+#define __cpu_to_be64s(x) __swab64s((x))
+#define __be64_to_cpus(x) __swab64s((x))
+#define __cpu_to_be32s(x) __swab32s((x))
+#define __be32_to_cpus(x) __swab32s((x))
+#define __cpu_to_be16s(x) __swab16s((x))
+#define __be16_to_cpus(x) __swab16s((x))
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/compiler.h b/chroot/opt/android-master/amd64/usr/include/linux/compiler.h
deleted file mode 100644
index 8e89655..0000000
--- a/chroot/opt/android-master/amd64/usr/include/linux/compiler.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _UAPI_LINUX_COMPILER_H
-#define _UAPI_LINUX_COMPILER_H
-
-/*
- * This file is not currently in the Linux kernel tree.
- * Upstream uapi headers refer to <linux/compiler.h> but there is
- * no such uapi file. We've sent this upstream, and are optimistically
- * adding it to bionic in the meantime. This should be replaced by
- * a scrubbed header from external/kernel-headers when possible.
- *
- * An alternative to this file is to check in a symbolic link to the
- * non-uapi <linux/compiler.h>. That's fine for building bionic too.
- */
-
-#define __user
-#define __force
-
-#endif /* _UAPI_LINUX_COMPILER_H */
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/ethtool.h b/chroot/opt/android-master/amd64/usr/include/linux/ethtool.h
new file mode 100644
index 0000000..cc951d1
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/ethtool.h
@@ -0,0 +1,804 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_ETHTOOL_H
+#define _UAPI_LINUX_ETHTOOL_H
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/if_ether.h>
+#include <limits.h>
+struct ethtool_cmd {
+ __u32 cmd;
+ __u32 supported;
+ __u32 advertising;
+ __u16 speed;
+ __u8 duplex;
+ __u8 port;
+ __u8 phy_address;
+ __u8 transceiver;
+ __u8 autoneg;
+ __u8 mdio_support;
+ __u32 maxtxpkt;
+ __u32 maxrxpkt;
+ __u16 speed_hi;
+ __u8 eth_tp_mdix;
+ __u8 eth_tp_mdix_ctrl;
+ __u32 lp_advertising;
+ __u32 reserved[2];
+};
+#define ETH_MDIO_SUPPORTS_C22 1
+#define ETH_MDIO_SUPPORTS_C45 2
+#define ETHTOOL_FWVERS_LEN 32
+#define ETHTOOL_BUSINFO_LEN 32
+#define ETHTOOL_EROMVERS_LEN 32
+struct ethtool_drvinfo {
+ __u32 cmd;
+ char driver[32];
+ char version[32];
+ char fw_version[ETHTOOL_FWVERS_LEN];
+ char bus_info[ETHTOOL_BUSINFO_LEN];
+ char erom_version[ETHTOOL_EROMVERS_LEN];
+ char reserved2[12];
+ __u32 n_priv_flags;
+ __u32 n_stats;
+ __u32 testinfo_len;
+ __u32 eedump_len;
+ __u32 regdump_len;
+};
+#define SOPASS_MAX 6
+struct ethtool_wolinfo {
+ __u32 cmd;
+ __u32 supported;
+ __u32 wolopts;
+ __u8 sopass[SOPASS_MAX];
+};
+struct ethtool_value {
+ __u32 cmd;
+ __u32 data;
+};
+#define PFC_STORM_PREVENTION_AUTO 0xffff
+#define PFC_STORM_PREVENTION_DISABLE 0
+enum tunable_id {
+ ETHTOOL_ID_UNSPEC,
+ ETHTOOL_RX_COPYBREAK,
+ ETHTOOL_TX_COPYBREAK,
+ ETHTOOL_PFC_PREVENTION_TOUT,
+ __ETHTOOL_TUNABLE_COUNT,
+};
+enum tunable_type_id {
+ ETHTOOL_TUNABLE_UNSPEC,
+ ETHTOOL_TUNABLE_U8,
+ ETHTOOL_TUNABLE_U16,
+ ETHTOOL_TUNABLE_U32,
+ ETHTOOL_TUNABLE_U64,
+ ETHTOOL_TUNABLE_STRING,
+ ETHTOOL_TUNABLE_S8,
+ ETHTOOL_TUNABLE_S16,
+ ETHTOOL_TUNABLE_S32,
+ ETHTOOL_TUNABLE_S64,
+};
+struct ethtool_tunable {
+ __u32 cmd;
+ __u32 id;
+ __u32 type_id;
+ __u32 len;
+ void * data[0];
+};
+#define DOWNSHIFT_DEV_DEFAULT_COUNT 0xff
+#define DOWNSHIFT_DEV_DISABLE 0
+#define ETHTOOL_PHY_FAST_LINK_DOWN_ON 0
+#define ETHTOOL_PHY_FAST_LINK_DOWN_OFF 0xff
+#define ETHTOOL_PHY_EDPD_DFLT_TX_MSECS 0xffff
+#define ETHTOOL_PHY_EDPD_NO_TX 0xfffe
+#define ETHTOOL_PHY_EDPD_DISABLE 0
+enum phy_tunable_id {
+ ETHTOOL_PHY_ID_UNSPEC,
+ ETHTOOL_PHY_DOWNSHIFT,
+ ETHTOOL_PHY_FAST_LINK_DOWN,
+ ETHTOOL_PHY_EDPD,
+ __ETHTOOL_PHY_TUNABLE_COUNT,
+};
+struct ethtool_regs {
+ __u32 cmd;
+ __u32 version;
+ __u32 len;
+ __u8 data[0];
+};
+struct ethtool_eeprom {
+ __u32 cmd;
+ __u32 magic;
+ __u32 offset;
+ __u32 len;
+ __u8 data[0];
+};
+struct ethtool_eee {
+ __u32 cmd;
+ __u32 supported;
+ __u32 advertised;
+ __u32 lp_advertised;
+ __u32 eee_active;
+ __u32 eee_enabled;
+ __u32 tx_lpi_enabled;
+ __u32 tx_lpi_timer;
+ __u32 reserved[2];
+};
+struct ethtool_modinfo {
+ __u32 cmd;
+ __u32 type;
+ __u32 eeprom_len;
+ __u32 reserved[8];
+};
+struct ethtool_coalesce {
+ __u32 cmd;
+ __u32 rx_coalesce_usecs;
+ __u32 rx_max_coalesced_frames;
+ __u32 rx_coalesce_usecs_irq;
+ __u32 rx_max_coalesced_frames_irq;
+ __u32 tx_coalesce_usecs;
+ __u32 tx_max_coalesced_frames;
+ __u32 tx_coalesce_usecs_irq;
+ __u32 tx_max_coalesced_frames_irq;
+ __u32 stats_block_coalesce_usecs;
+ __u32 use_adaptive_rx_coalesce;
+ __u32 use_adaptive_tx_coalesce;
+ __u32 pkt_rate_low;
+ __u32 rx_coalesce_usecs_low;
+ __u32 rx_max_coalesced_frames_low;
+ __u32 tx_coalesce_usecs_low;
+ __u32 tx_max_coalesced_frames_low;
+ __u32 pkt_rate_high;
+ __u32 rx_coalesce_usecs_high;
+ __u32 rx_max_coalesced_frames_high;
+ __u32 tx_coalesce_usecs_high;
+ __u32 tx_max_coalesced_frames_high;
+ __u32 rate_sample_interval;
+};
+struct ethtool_ringparam {
+ __u32 cmd;
+ __u32 rx_max_pending;
+ __u32 rx_mini_max_pending;
+ __u32 rx_jumbo_max_pending;
+ __u32 tx_max_pending;
+ __u32 rx_pending;
+ __u32 rx_mini_pending;
+ __u32 rx_jumbo_pending;
+ __u32 tx_pending;
+};
+struct ethtool_channels {
+ __u32 cmd;
+ __u32 max_rx;
+ __u32 max_tx;
+ __u32 max_other;
+ __u32 max_combined;
+ __u32 rx_count;
+ __u32 tx_count;
+ __u32 other_count;
+ __u32 combined_count;
+};
+struct ethtool_pauseparam {
+ __u32 cmd;
+ __u32 autoneg;
+ __u32 rx_pause;
+ __u32 tx_pause;
+};
+#define ETH_GSTRING_LEN 32
+enum ethtool_stringset {
+ ETH_SS_TEST = 0,
+ ETH_SS_STATS,
+ ETH_SS_PRIV_FLAGS,
+ ETH_SS_NTUPLE_FILTERS,
+ ETH_SS_FEATURES,
+ ETH_SS_RSS_HASH_FUNCS,
+ ETH_SS_TUNABLES,
+ ETH_SS_PHY_STATS,
+ ETH_SS_PHY_TUNABLES,
+};
+struct ethtool_gstrings {
+ __u32 cmd;
+ __u32 string_set;
+ __u32 len;
+ __u8 data[0];
+};
+struct ethtool_sset_info {
+ __u32 cmd;
+ __u32 reserved;
+ __u64 sset_mask;
+ __u32 data[0];
+};
+enum ethtool_test_flags {
+ ETH_TEST_FL_OFFLINE = (1 << 0),
+ ETH_TEST_FL_FAILED = (1 << 1),
+ ETH_TEST_FL_EXTERNAL_LB = (1 << 2),
+ ETH_TEST_FL_EXTERNAL_LB_DONE = (1 << 3),
+};
+struct ethtool_test {
+ __u32 cmd;
+ __u32 flags;
+ __u32 reserved;
+ __u32 len;
+ __u64 data[0];
+};
+struct ethtool_stats {
+ __u32 cmd;
+ __u32 n_stats;
+ __u64 data[0];
+};
+struct ethtool_perm_addr {
+ __u32 cmd;
+ __u32 size;
+ __u8 data[0];
+};
+enum ethtool_flags {
+ ETH_FLAG_TXVLAN = (1 << 7),
+ ETH_FLAG_RXVLAN = (1 << 8),
+ ETH_FLAG_LRO = (1 << 15),
+ ETH_FLAG_NTUPLE = (1 << 27),
+ ETH_FLAG_RXHASH = (1 << 28),
+};
+struct ethtool_tcpip4_spec {
+ __be32 ip4src;
+ __be32 ip4dst;
+ __be16 psrc;
+ __be16 pdst;
+ __u8 tos;
+};
+struct ethtool_ah_espip4_spec {
+ __be32 ip4src;
+ __be32 ip4dst;
+ __be32 spi;
+ __u8 tos;
+};
+#define ETH_RX_NFC_IP4 1
+struct ethtool_usrip4_spec {
+ __be32 ip4src;
+ __be32 ip4dst;
+ __be32 l4_4_bytes;
+ __u8 tos;
+ __u8 ip_ver;
+ __u8 proto;
+};
+struct ethtool_tcpip6_spec {
+ __be32 ip6src[4];
+ __be32 ip6dst[4];
+ __be16 psrc;
+ __be16 pdst;
+ __u8 tclass;
+};
+struct ethtool_ah_espip6_spec {
+ __be32 ip6src[4];
+ __be32 ip6dst[4];
+ __be32 spi;
+ __u8 tclass;
+};
+struct ethtool_usrip6_spec {
+ __be32 ip6src[4];
+ __be32 ip6dst[4];
+ __be32 l4_4_bytes;
+ __u8 tclass;
+ __u8 l4_proto;
+};
+union ethtool_flow_union {
+ struct ethtool_tcpip4_spec tcp_ip4_spec;
+ struct ethtool_tcpip4_spec udp_ip4_spec;
+ struct ethtool_tcpip4_spec sctp_ip4_spec;
+ struct ethtool_ah_espip4_spec ah_ip4_spec;
+ struct ethtool_ah_espip4_spec esp_ip4_spec;
+ struct ethtool_usrip4_spec usr_ip4_spec;
+ struct ethtool_tcpip6_spec tcp_ip6_spec;
+ struct ethtool_tcpip6_spec udp_ip6_spec;
+ struct ethtool_tcpip6_spec sctp_ip6_spec;
+ struct ethtool_ah_espip6_spec ah_ip6_spec;
+ struct ethtool_ah_espip6_spec esp_ip6_spec;
+ struct ethtool_usrip6_spec usr_ip6_spec;
+ struct ethhdr ether_spec;
+ __u8 hdata[52];
+};
+struct ethtool_flow_ext {
+ __u8 padding[2];
+ unsigned char h_dest[ETH_ALEN];
+ __be16 vlan_etype;
+ __be16 vlan_tci;
+ __be32 data[2];
+};
+struct ethtool_rx_flow_spec {
+ __u32 flow_type;
+ union ethtool_flow_union h_u;
+ struct ethtool_flow_ext h_ext;
+ union ethtool_flow_union m_u;
+ struct ethtool_flow_ext m_ext;
+ __u64 ring_cookie;
+ __u32 location;
+};
+#define ETHTOOL_RX_FLOW_SPEC_RING 0x00000000FFFFFFFFLL
+#define ETHTOOL_RX_FLOW_SPEC_RING_VF 0x000000FF00000000LL
+#define ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF 32
+struct ethtool_rxnfc {
+ __u32 cmd;
+ __u32 flow_type;
+ __u64 data;
+ struct ethtool_rx_flow_spec fs;
+ union {
+ __u32 rule_cnt;
+ __u32 rss_context;
+ };
+ __u32 rule_locs[0];
+};
+struct ethtool_rxfh_indir {
+ __u32 cmd;
+ __u32 size;
+ __u32 ring_index[0];
+};
+struct ethtool_rxfh {
+ __u32 cmd;
+ __u32 rss_context;
+ __u32 indir_size;
+ __u32 key_size;
+ __u8 hfunc;
+ __u8 rsvd8[3];
+ __u32 rsvd32;
+ __u32 rss_config[0];
+};
+#define ETH_RXFH_CONTEXT_ALLOC 0xffffffff
+#define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff
+struct ethtool_rx_ntuple_flow_spec {
+ __u32 flow_type;
+ union {
+ struct ethtool_tcpip4_spec tcp_ip4_spec;
+ struct ethtool_tcpip4_spec udp_ip4_spec;
+ struct ethtool_tcpip4_spec sctp_ip4_spec;
+ struct ethtool_ah_espip4_spec ah_ip4_spec;
+ struct ethtool_ah_espip4_spec esp_ip4_spec;
+ struct ethtool_usrip4_spec usr_ip4_spec;
+ struct ethhdr ether_spec;
+ __u8 hdata[72];
+ } h_u, m_u;
+ __u16 vlan_tag;
+ __u16 vlan_tag_mask;
+ __u64 data;
+ __u64 data_mask;
+ __s32 action;
+#define ETHTOOL_RXNTUPLE_ACTION_DROP (- 1)
+#define ETHTOOL_RXNTUPLE_ACTION_CLEAR (- 2)
+};
+struct ethtool_rx_ntuple {
+ __u32 cmd;
+ struct ethtool_rx_ntuple_flow_spec fs;
+};
+#define ETHTOOL_FLASH_MAX_FILENAME 128
+enum ethtool_flash_op_type {
+ ETHTOOL_FLASH_ALL_REGIONS = 0,
+};
+struct ethtool_flash {
+ __u32 cmd;
+ __u32 region;
+ char data[ETHTOOL_FLASH_MAX_FILENAME];
+};
+struct ethtool_dump {
+ __u32 cmd;
+ __u32 version;
+ __u32 flag;
+ __u32 len;
+ __u8 data[0];
+};
+#define ETH_FW_DUMP_DISABLE 0
+struct ethtool_get_features_block {
+ __u32 available;
+ __u32 requested;
+ __u32 active;
+ __u32 never_changed;
+};
+struct ethtool_gfeatures {
+ __u32 cmd;
+ __u32 size;
+ struct ethtool_get_features_block features[0];
+};
+struct ethtool_set_features_block {
+ __u32 valid;
+ __u32 requested;
+};
+struct ethtool_sfeatures {
+ __u32 cmd;
+ __u32 size;
+ struct ethtool_set_features_block features[0];
+};
+struct ethtool_ts_info {
+ __u32 cmd;
+ __u32 so_timestamping;
+ __s32 phc_index;
+ __u32 tx_types;
+ __u32 tx_reserved[3];
+ __u32 rx_filters;
+ __u32 rx_reserved[3];
+};
+enum ethtool_sfeatures_retval_bits {
+ ETHTOOL_F_UNSUPPORTED__BIT,
+ ETHTOOL_F_WISH__BIT,
+ ETHTOOL_F_COMPAT__BIT,
+};
+#define ETHTOOL_F_UNSUPPORTED (1 << ETHTOOL_F_UNSUPPORTED__BIT)
+#define ETHTOOL_F_WISH (1 << ETHTOOL_F_WISH__BIT)
+#define ETHTOOL_F_COMPAT (1 << ETHTOOL_F_COMPAT__BIT)
+#define MAX_NUM_QUEUE 4096
+struct ethtool_per_queue_op {
+ __u32 cmd;
+ __u32 sub_command;
+ __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)];
+ char data[];
+};
+struct ethtool_fecparam {
+ __u32 cmd;
+ __u32 active_fec;
+ __u32 fec;
+ __u32 reserved;
+};
+enum ethtool_fec_config_bits {
+ ETHTOOL_FEC_NONE_BIT,
+ ETHTOOL_FEC_AUTO_BIT,
+ ETHTOOL_FEC_OFF_BIT,
+ ETHTOOL_FEC_RS_BIT,
+ ETHTOOL_FEC_BASER_BIT,
+};
+#define ETHTOOL_FEC_NONE (1 << ETHTOOL_FEC_NONE_BIT)
+#define ETHTOOL_FEC_AUTO (1 << ETHTOOL_FEC_AUTO_BIT)
+#define ETHTOOL_FEC_OFF (1 << ETHTOOL_FEC_OFF_BIT)
+#define ETHTOOL_FEC_RS (1 << ETHTOOL_FEC_RS_BIT)
+#define ETHTOOL_FEC_BASER (1 << ETHTOOL_FEC_BASER_BIT)
+#define ETHTOOL_GSET 0x00000001
+#define ETHTOOL_SSET 0x00000002
+#define ETHTOOL_GDRVINFO 0x00000003
+#define ETHTOOL_GREGS 0x00000004
+#define ETHTOOL_GWOL 0x00000005
+#define ETHTOOL_SWOL 0x00000006
+#define ETHTOOL_GMSGLVL 0x00000007
+#define ETHTOOL_SMSGLVL 0x00000008
+#define ETHTOOL_NWAY_RST 0x00000009
+#define ETHTOOL_GLINK 0x0000000a
+#define ETHTOOL_GEEPROM 0x0000000b
+#define ETHTOOL_SEEPROM 0x0000000c
+#define ETHTOOL_GCOALESCE 0x0000000e
+#define ETHTOOL_SCOALESCE 0x0000000f
+#define ETHTOOL_GRINGPARAM 0x00000010
+#define ETHTOOL_SRINGPARAM 0x00000011
+#define ETHTOOL_GPAUSEPARAM 0x00000012
+#define ETHTOOL_SPAUSEPARAM 0x00000013
+#define ETHTOOL_GRXCSUM 0x00000014
+#define ETHTOOL_SRXCSUM 0x00000015
+#define ETHTOOL_GTXCSUM 0x00000016
+#define ETHTOOL_STXCSUM 0x00000017
+#define ETHTOOL_GSG 0x00000018
+#define ETHTOOL_SSG 0x00000019
+#define ETHTOOL_TEST 0x0000001a
+#define ETHTOOL_GSTRINGS 0x0000001b
+#define ETHTOOL_PHYS_ID 0x0000001c
+#define ETHTOOL_GSTATS 0x0000001d
+#define ETHTOOL_GTSO 0x0000001e
+#define ETHTOOL_STSO 0x0000001f
+#define ETHTOOL_GPERMADDR 0x00000020
+#define ETHTOOL_GUFO 0x00000021
+#define ETHTOOL_SUFO 0x00000022
+#define ETHTOOL_GGSO 0x00000023
+#define ETHTOOL_SGSO 0x00000024
+#define ETHTOOL_GFLAGS 0x00000025
+#define ETHTOOL_SFLAGS 0x00000026
+#define ETHTOOL_GPFLAGS 0x00000027
+#define ETHTOOL_SPFLAGS 0x00000028
+#define ETHTOOL_GRXFH 0x00000029
+#define ETHTOOL_SRXFH 0x0000002a
+#define ETHTOOL_GGRO 0x0000002b
+#define ETHTOOL_SGRO 0x0000002c
+#define ETHTOOL_GRXRINGS 0x0000002d
+#define ETHTOOL_GRXCLSRLCNT 0x0000002e
+#define ETHTOOL_GRXCLSRULE 0x0000002f
+#define ETHTOOL_GRXCLSRLALL 0x00000030
+#define ETHTOOL_SRXCLSRLDEL 0x00000031
+#define ETHTOOL_SRXCLSRLINS 0x00000032
+#define ETHTOOL_FLASHDEV 0x00000033
+#define ETHTOOL_RESET 0x00000034
+#define ETHTOOL_SRXNTUPLE 0x00000035
+#define ETHTOOL_GRXNTUPLE 0x00000036
+#define ETHTOOL_GSSET_INFO 0x00000037
+#define ETHTOOL_GRXFHINDIR 0x00000038
+#define ETHTOOL_SRXFHINDIR 0x00000039
+#define ETHTOOL_GFEATURES 0x0000003a
+#define ETHTOOL_SFEATURES 0x0000003b
+#define ETHTOOL_GCHANNELS 0x0000003c
+#define ETHTOOL_SCHANNELS 0x0000003d
+#define ETHTOOL_SET_DUMP 0x0000003e
+#define ETHTOOL_GET_DUMP_FLAG 0x0000003f
+#define ETHTOOL_GET_DUMP_DATA 0x00000040
+#define ETHTOOL_GET_TS_INFO 0x00000041
+#define ETHTOOL_GMODULEINFO 0x00000042
+#define ETHTOOL_GMODULEEEPROM 0x00000043
+#define ETHTOOL_GEEE 0x00000044
+#define ETHTOOL_SEEE 0x00000045
+#define ETHTOOL_GRSSH 0x00000046
+#define ETHTOOL_SRSSH 0x00000047
+#define ETHTOOL_GTUNABLE 0x00000048
+#define ETHTOOL_STUNABLE 0x00000049
+#define ETHTOOL_GPHYSTATS 0x0000004a
+#define ETHTOOL_PERQUEUE 0x0000004b
+#define ETHTOOL_GLINKSETTINGS 0x0000004c
+#define ETHTOOL_SLINKSETTINGS 0x0000004d
+#define ETHTOOL_PHY_GTUNABLE 0x0000004e
+#define ETHTOOL_PHY_STUNABLE 0x0000004f
+#define ETHTOOL_GFECPARAM 0x00000050
+#define ETHTOOL_SFECPARAM 0x00000051
+#define SPARC_ETH_GSET ETHTOOL_GSET
+#define SPARC_ETH_SSET ETHTOOL_SSET
+enum ethtool_link_mode_bit_indices {
+ ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0,
+ ETHTOOL_LINK_MODE_10baseT_Full_BIT = 1,
+ ETHTOOL_LINK_MODE_100baseT_Half_BIT = 2,
+ ETHTOOL_LINK_MODE_100baseT_Full_BIT = 3,
+ ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 4,
+ ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 5,
+ ETHTOOL_LINK_MODE_Autoneg_BIT = 6,
+ ETHTOOL_LINK_MODE_TP_BIT = 7,
+ ETHTOOL_LINK_MODE_AUI_BIT = 8,
+ ETHTOOL_LINK_MODE_MII_BIT = 9,
+ ETHTOOL_LINK_MODE_FIBRE_BIT = 10,
+ ETHTOOL_LINK_MODE_BNC_BIT = 11,
+ ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 12,
+ ETHTOOL_LINK_MODE_Pause_BIT = 13,
+ ETHTOOL_LINK_MODE_Asym_Pause_BIT = 14,
+ ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 15,
+ ETHTOOL_LINK_MODE_Backplane_BIT = 16,
+ ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 17,
+ ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 18,
+ ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 19,
+ ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 20,
+ ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 21,
+ ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 22,
+ ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 23,
+ ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 24,
+ ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 25,
+ ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 26,
+ ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 27,
+ ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 28,
+ ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 29,
+ ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 30,
+ ETHTOOL_LINK_MODE_25000baseCR_Full_BIT = 31,
+ ETHTOOL_LINK_MODE_25000baseKR_Full_BIT = 32,
+ ETHTOOL_LINK_MODE_25000baseSR_Full_BIT = 33,
+ ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT = 34,
+ ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT = 35,
+ ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT = 36,
+ ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 37,
+ ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 38,
+ ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 39,
+ ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 40,
+ ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 41,
+ ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 42,
+ ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 43,
+ ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44,
+ ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45,
+ ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 46,
+ ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47,
+ ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48,
+ ETHTOOL_LINK_MODE_FEC_NONE_BIT = 49,
+ ETHTOOL_LINK_MODE_FEC_RS_BIT = 50,
+ ETHTOOL_LINK_MODE_FEC_BASER_BIT = 51,
+ ETHTOOL_LINK_MODE_50000baseKR_Full_BIT = 52,
+ ETHTOOL_LINK_MODE_50000baseSR_Full_BIT = 53,
+ ETHTOOL_LINK_MODE_50000baseCR_Full_BIT = 54,
+ ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT = 55,
+ ETHTOOL_LINK_MODE_50000baseDR_Full_BIT = 56,
+ ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT = 57,
+ ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT = 58,
+ ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT = 59,
+ ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT = 60,
+ ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT = 61,
+ ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT = 62,
+ ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT = 63,
+ ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 64,
+ ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 65,
+ ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 66,
+ ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 67,
+ ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 68,
+ ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT = 69,
+ ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT = 70,
+ ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 71,
+ ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 72,
+ ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 73,
+ __ETHTOOL_LINK_MODE_MASK_NBITS
+};
+#define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) (1UL << (ETHTOOL_LINK_MODE_ ##base_name ##_BIT))
+#define SUPPORTED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)
+#define SUPPORTED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)
+#define SUPPORTED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)
+#define SUPPORTED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)
+#define SUPPORTED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)
+#define SUPPORTED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)
+#define SUPPORTED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)
+#define SUPPORTED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP)
+#define SUPPORTED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)
+#define SUPPORTED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII)
+#define SUPPORTED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)
+#define SUPPORTED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC)
+#define SUPPORTED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full)
+#define SUPPORTED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause)
+#define SUPPORTED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause)
+#define SUPPORTED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full)
+#define SUPPORTED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane)
+#define SUPPORTED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full)
+#define SUPPORTED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full)
+#define SUPPORTED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full)
+#define SUPPORTED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC)
+#define SUPPORTED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full)
+#define SUPPORTED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full)
+#define SUPPORTED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full)
+#define SUPPORTED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full)
+#define SUPPORTED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full)
+#define SUPPORTED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full)
+#define SUPPORTED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full)
+#define SUPPORTED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full)
+#define SUPPORTED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full)
+#define SUPPORTED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full)
+#define ADVERTISED_10baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Half)
+#define ADVERTISED_10baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10baseT_Full)
+#define ADVERTISED_100baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Half)
+#define ADVERTISED_100baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(100baseT_Full)
+#define ADVERTISED_1000baseT_Half __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Half)
+#define ADVERTISED_1000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseT_Full)
+#define ADVERTISED_Autoneg __ETHTOOL_LINK_MODE_LEGACY_MASK(Autoneg)
+#define ADVERTISED_TP __ETHTOOL_LINK_MODE_LEGACY_MASK(TP)
+#define ADVERTISED_AUI __ETHTOOL_LINK_MODE_LEGACY_MASK(AUI)
+#define ADVERTISED_MII __ETHTOOL_LINK_MODE_LEGACY_MASK(MII)
+#define ADVERTISED_FIBRE __ETHTOOL_LINK_MODE_LEGACY_MASK(FIBRE)
+#define ADVERTISED_BNC __ETHTOOL_LINK_MODE_LEGACY_MASK(BNC)
+#define ADVERTISED_10000baseT_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseT_Full)
+#define ADVERTISED_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Pause)
+#define ADVERTISED_Asym_Pause __ETHTOOL_LINK_MODE_LEGACY_MASK(Asym_Pause)
+#define ADVERTISED_2500baseX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(2500baseX_Full)
+#define ADVERTISED_Backplane __ETHTOOL_LINK_MODE_LEGACY_MASK(Backplane)
+#define ADVERTISED_1000baseKX_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(1000baseKX_Full)
+#define ADVERTISED_10000baseKX4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKX4_Full)
+#define ADVERTISED_10000baseKR_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseKR_Full)
+#define ADVERTISED_10000baseR_FEC __ETHTOOL_LINK_MODE_LEGACY_MASK(10000baseR_FEC)
+#define ADVERTISED_20000baseMLD2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseMLD2_Full)
+#define ADVERTISED_20000baseKR2_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(20000baseKR2_Full)
+#define ADVERTISED_40000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseKR4_Full)
+#define ADVERTISED_40000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseCR4_Full)
+#define ADVERTISED_40000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseSR4_Full)
+#define ADVERTISED_40000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(40000baseLR4_Full)
+#define ADVERTISED_56000baseKR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseKR4_Full)
+#define ADVERTISED_56000baseCR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseCR4_Full)
+#define ADVERTISED_56000baseSR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseSR4_Full)
+#define ADVERTISED_56000baseLR4_Full __ETHTOOL_LINK_MODE_LEGACY_MASK(56000baseLR4_Full)
+#define SPEED_10 10
+#define SPEED_100 100
+#define SPEED_1000 1000
+#define SPEED_2500 2500
+#define SPEED_5000 5000
+#define SPEED_10000 10000
+#define SPEED_14000 14000
+#define SPEED_20000 20000
+#define SPEED_25000 25000
+#define SPEED_40000 40000
+#define SPEED_50000 50000
+#define SPEED_56000 56000
+#define SPEED_100000 100000
+#define SPEED_200000 200000
+#define SPEED_400000 400000
+#define SPEED_UNKNOWN - 1
+#define DUPLEX_HALF 0x00
+#define DUPLEX_FULL 0x01
+#define DUPLEX_UNKNOWN 0xff
+#define PORT_TP 0x00
+#define PORT_AUI 0x01
+#define PORT_MII 0x02
+#define PORT_FIBRE 0x03
+#define PORT_BNC 0x04
+#define PORT_DA 0x05
+#define PORT_NONE 0xef
+#define PORT_OTHER 0xff
+#define XCVR_INTERNAL 0x00
+#define XCVR_EXTERNAL 0x01
+#define XCVR_DUMMY1 0x02
+#define XCVR_DUMMY2 0x03
+#define XCVR_DUMMY3 0x04
+#define AUTONEG_DISABLE 0x00
+#define AUTONEG_ENABLE 0x01
+#define ETH_TP_MDI_INVALID 0x00
+#define ETH_TP_MDI 0x01
+#define ETH_TP_MDI_X 0x02
+#define ETH_TP_MDI_AUTO 0x03
+#define WAKE_PHY (1 << 0)
+#define WAKE_UCAST (1 << 1)
+#define WAKE_MCAST (1 << 2)
+#define WAKE_BCAST (1 << 3)
+#define WAKE_ARP (1 << 4)
+#define WAKE_MAGIC (1 << 5)
+#define WAKE_MAGICSECURE (1 << 6)
+#define WAKE_FILTER (1 << 7)
+#define TCP_V4_FLOW 0x01
+#define UDP_V4_FLOW 0x02
+#define SCTP_V4_FLOW 0x03
+#define AH_ESP_V4_FLOW 0x04
+#define TCP_V6_FLOW 0x05
+#define UDP_V6_FLOW 0x06
+#define SCTP_V6_FLOW 0x07
+#define AH_ESP_V6_FLOW 0x08
+#define AH_V4_FLOW 0x09
+#define ESP_V4_FLOW 0x0a
+#define AH_V6_FLOW 0x0b
+#define ESP_V6_FLOW 0x0c
+#define IPV4_USER_FLOW 0x0d
+#define IP_USER_FLOW IPV4_USER_FLOW
+#define IPV6_USER_FLOW 0x0e
+#define IPV4_FLOW 0x10
+#define IPV6_FLOW 0x11
+#define ETHER_FLOW 0x12
+#define FLOW_EXT 0x80000000
+#define FLOW_MAC_EXT 0x40000000
+#define FLOW_RSS 0x20000000
+#define RXH_L2DA (1 << 1)
+#define RXH_VLAN (1 << 2)
+#define RXH_L3_PROTO (1 << 3)
+#define RXH_IP_SRC (1 << 4)
+#define RXH_IP_DST (1 << 5)
+#define RXH_L4_B_0_1 (1 << 6)
+#define RXH_L4_B_2_3 (1 << 7)
+#define RXH_DISCARD (1 << 31)
+#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
+#define RX_CLS_FLOW_WAKE 0xfffffffffffffffeULL
+#define RX_CLS_LOC_SPECIAL 0x80000000
+#define RX_CLS_LOC_ANY 0xffffffff
+#define RX_CLS_LOC_FIRST 0xfffffffe
+#define RX_CLS_LOC_LAST 0xfffffffd
+#define ETH_MODULE_SFF_8079 0x1
+#define ETH_MODULE_SFF_8079_LEN 256
+#define ETH_MODULE_SFF_8472 0x2
+#define ETH_MODULE_SFF_8472_LEN 512
+#define ETH_MODULE_SFF_8636 0x3
+#define ETH_MODULE_SFF_8636_LEN 256
+#define ETH_MODULE_SFF_8436 0x4
+#define ETH_MODULE_SFF_8436_LEN 256
+#define ETH_MODULE_SFF_8636_MAX_LEN 640
+#define ETH_MODULE_SFF_8436_MAX_LEN 640
+enum ethtool_reset_flags {
+ ETH_RESET_MGMT = 1 << 0,
+ ETH_RESET_IRQ = 1 << 1,
+ ETH_RESET_DMA = 1 << 2,
+ ETH_RESET_FILTER = 1 << 3,
+ ETH_RESET_OFFLOAD = 1 << 4,
+ ETH_RESET_MAC = 1 << 5,
+ ETH_RESET_PHY = 1 << 6,
+ ETH_RESET_RAM = 1 << 7,
+ ETH_RESET_AP = 1 << 8,
+ ETH_RESET_DEDICATED = 0x0000ffff,
+ ETH_RESET_ALL = 0xffffffff,
+};
+#define ETH_RESET_SHARED_SHIFT 16
+struct ethtool_link_settings {
+ __u32 cmd;
+ __u32 speed;
+ __u8 duplex;
+ __u8 port;
+ __u8 phy_address;
+ __u8 autoneg;
+ __u8 mdio_support;
+ __u8 eth_tp_mdix;
+ __u8 eth_tp_mdix_ctrl;
+ __s8 link_mode_masks_nwords;
+ __u8 transceiver;
+ __u8 reserved1[3];
+ __u32 reserved[7];
+ __u32 link_mode_masks[0];
+};
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/genetlink.h b/chroot/opt/android-master/amd64/usr/include/linux/genetlink.h
new file mode 100644
index 0000000..a6e3760
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/genetlink.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI__LINUX_GENERIC_NETLINK_H
+#define _UAPI__LINUX_GENERIC_NETLINK_H
+#include <linux/types.h>
+#include <linux/netlink.h>
+#define GENL_NAMSIZ 16
+#define GENL_MIN_ID NLMSG_MIN_TYPE
+#define GENL_MAX_ID 1023
+struct genlmsghdr {
+ __u8 cmd;
+ __u8 version;
+ __u16 reserved;
+};
+#define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
+#define GENL_ADMIN_PERM 0x01
+#define GENL_CMD_CAP_DO 0x02
+#define GENL_CMD_CAP_DUMP 0x04
+#define GENL_CMD_CAP_HASPOL 0x08
+#define GENL_UNS_ADMIN_PERM 0x10
+#define GENL_ID_CTRL NLMSG_MIN_TYPE
+#define GENL_ID_VFS_DQUOT (NLMSG_MIN_TYPE + 1)
+#define GENL_ID_PMCRAID (NLMSG_MIN_TYPE + 2)
+#define GENL_START_ALLOC (NLMSG_MIN_TYPE + 3)
+enum {
+ CTRL_CMD_UNSPEC,
+ CTRL_CMD_NEWFAMILY,
+ CTRL_CMD_DELFAMILY,
+ CTRL_CMD_GETFAMILY,
+ CTRL_CMD_NEWOPS,
+ CTRL_CMD_DELOPS,
+ CTRL_CMD_GETOPS,
+ CTRL_CMD_NEWMCAST_GRP,
+ CTRL_CMD_DELMCAST_GRP,
+ CTRL_CMD_GETMCAST_GRP,
+ __CTRL_CMD_MAX,
+};
+#define CTRL_CMD_MAX (__CTRL_CMD_MAX - 1)
+enum {
+ CTRL_ATTR_UNSPEC,
+ CTRL_ATTR_FAMILY_ID,
+ CTRL_ATTR_FAMILY_NAME,
+ CTRL_ATTR_VERSION,
+ CTRL_ATTR_HDRSIZE,
+ CTRL_ATTR_MAXATTR,
+ CTRL_ATTR_OPS,
+ CTRL_ATTR_MCAST_GROUPS,
+ __CTRL_ATTR_MAX,
+};
+#define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1)
+enum {
+ CTRL_ATTR_OP_UNSPEC,
+ CTRL_ATTR_OP_ID,
+ CTRL_ATTR_OP_FLAGS,
+ __CTRL_ATTR_OP_MAX,
+};
+#define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)
+enum {
+ CTRL_ATTR_MCAST_GRP_UNSPEC,
+ CTRL_ATTR_MCAST_GRP_NAME,
+ CTRL_ATTR_MCAST_GRP_ID,
+ __CTRL_ATTR_MCAST_GRP_MAX,
+};
+#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/hidraw.h b/chroot/opt/android-master/amd64/usr/include/linux/hidraw.h
new file mode 100644
index 0000000..3ce49e1
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/hidraw.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_HIDRAW_H
+#define _UAPI_HIDRAW_H
+#include <linux/hid.h>
+#include <linux/types.h>
+struct hidraw_report_descriptor {
+ __u32 size;
+ __u8 value[HID_MAX_DESCRIPTOR_SIZE];
+};
+struct hidraw_devinfo {
+ __u32 bustype;
+ __s16 vendor;
+ __s16 product;
+};
+#define HIDIOCGRDESCSIZE _IOR('H', 0x01, int)
+#define HIDIOCGRDESC _IOR('H', 0x02, struct hidraw_report_descriptor)
+#define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo)
+#define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len)
+#define HIDIOCGRAWPHYS(len) _IOC(_IOC_READ, 'H', 0x05, len)
+#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE | _IOC_READ, 'H', 0x06, len)
+#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE | _IOC_READ, 'H', 0x07, len)
+#define HIDRAW_FIRST_MINOR 0
+#define HIDRAW_MAX_DEVICES 64
+#define HIDRAW_BUFFER_SIZE 64
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/i2c-dev.h b/chroot/opt/android-master/amd64/usr/include/linux/i2c-dev.h
new file mode 100644
index 0000000..07fdda2
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/i2c-dev.h
@@ -0,0 +1,44 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_I2C_DEV_H
+#define _UAPI_LINUX_I2C_DEV_H
+#include <linux/types.h>
+#include <linux/compiler.h>
+#define I2C_RETRIES 0x0701
+#define I2C_TIMEOUT 0x0702
+#define I2C_SLAVE 0x0703
+#define I2C_SLAVE_FORCE 0x0706
+#define I2C_TENBIT 0x0704
+#define I2C_FUNCS 0x0705
+#define I2C_RDWR 0x0707
+#define I2C_PEC 0x0708
+#define I2C_SMBUS 0x0720
+struct i2c_smbus_ioctl_data {
+ __u8 read_write;
+ __u8 command;
+ __u32 size;
+ union i2c_smbus_data __user * data;
+};
+struct i2c_rdwr_ioctl_data {
+ struct i2c_msg __user * msgs;
+ __u32 nmsgs;
+};
+#define I2C_RDWR_IOCTL_MAX_MSGS 42
+#define I2C_RDRW_IOCTL_MAX_MSGS I2C_RDWR_IOCTL_MAX_MSGS
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/i2c.h b/chroot/opt/android-master/amd64/usr/include/linux/i2c.h
new file mode 100644
index 0000000..dc1e96a
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/i2c.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_I2C_H
+#define _UAPI_LINUX_I2C_H
+#include <linux/types.h>
+struct i2c_msg {
+ __u16 addr;
+ __u16 flags;
+#define I2C_M_RD 0x0001
+#define I2C_M_TEN 0x0010
+#define I2C_M_DMA_SAFE 0x0200
+#define I2C_M_RECV_LEN 0x0400
+#define I2C_M_NO_RD_ACK 0x0800
+#define I2C_M_IGNORE_NAK 0x1000
+#define I2C_M_REV_DIR_ADDR 0x2000
+#define I2C_M_NOSTART 0x4000
+#define I2C_M_STOP 0x8000
+ __u16 len;
+ __u8 * buf;
+};
+#define I2C_FUNC_I2C 0x00000001
+#define I2C_FUNC_10BIT_ADDR 0x00000002
+#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004
+#define I2C_FUNC_SMBUS_PEC 0x00000008
+#define I2C_FUNC_NOSTART 0x00000010
+#define I2C_FUNC_SLAVE 0x00000020
+#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000
+#define I2C_FUNC_SMBUS_QUICK 0x00010000
+#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
+#define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000
+#define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000
+#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000
+#define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000
+#define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000
+#define I2C_FUNC_SMBUS_PROC_CALL 0x00800000
+#define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000
+#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
+#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000
+#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000
+#define I2C_FUNC_SMBUS_HOST_NOTIFY 0x10000000
+#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | I2C_FUNC_SMBUS_WRITE_BYTE)
+#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
+#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA)
+#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
+#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
+#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_PROC_CALL | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_PEC)
+#define I2C_SMBUS_BLOCK_MAX 32
+union i2c_smbus_data {
+ __u8 byte;
+ __u16 word;
+ __u8 block[I2C_SMBUS_BLOCK_MAX + 2];
+};
+#define I2C_SMBUS_READ 1
+#define I2C_SMBUS_WRITE 0
+#define I2C_SMBUS_QUICK 0
+#define I2C_SMBUS_BYTE 1
+#define I2C_SMBUS_BYTE_DATA 2
+#define I2C_SMBUS_WORD_DATA 3
+#define I2C_SMBUS_PROC_CALL 4
+#define I2C_SMBUS_BLOCK_DATA 5
+#define I2C_SMBUS_I2C_BLOCK_BROKEN 6
+#define I2C_SMBUS_BLOCK_PROC_CALL 7
+#define I2C_SMBUS_I2C_BLOCK_DATA 8
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/if_arp.h b/chroot/opt/android-master/amd64/usr/include/linux/if_arp.h
new file mode 100644
index 0000000..eda888f
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/if_arp.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_IF_ARP_H
+#define _UAPI_LINUX_IF_ARP_H
+#include <linux/netdevice.h>
+#define ARPHRD_NETROM 0
+#define ARPHRD_ETHER 1
+#define ARPHRD_EETHER 2
+#define ARPHRD_AX25 3
+#define ARPHRD_PRONET 4
+#define ARPHRD_CHAOS 5
+#define ARPHRD_IEEE802 6
+#define ARPHRD_ARCNET 7
+#define ARPHRD_APPLETLK 8
+#define ARPHRD_DLCI 15
+#define ARPHRD_ATM 19
+#define ARPHRD_METRICOM 23
+#define ARPHRD_IEEE1394 24
+#define ARPHRD_EUI64 27
+#define ARPHRD_INFINIBAND 32
+#define ARPHRD_SLIP 256
+#define ARPHRD_CSLIP 257
+#define ARPHRD_SLIP6 258
+#define ARPHRD_CSLIP6 259
+#define ARPHRD_RSRVD 260
+#define ARPHRD_ADAPT 264
+#define ARPHRD_ROSE 270
+#define ARPHRD_X25 271
+#define ARPHRD_HWX25 272
+#define ARPHRD_CAN 280
+#define ARPHRD_PPP 512
+#define ARPHRD_CISCO 513
+#define ARPHRD_HDLC ARPHRD_CISCO
+#define ARPHRD_LAPB 516
+#define ARPHRD_DDCMP 517
+#define ARPHRD_RAWHDLC 518
+#define ARPHRD_RAWIP 519
+#define ARPHRD_TUNNEL 768
+#define ARPHRD_TUNNEL6 769
+#define ARPHRD_FRAD 770
+#define ARPHRD_SKIP 771
+#define ARPHRD_LOOPBACK 772
+#define ARPHRD_LOCALTLK 773
+#define ARPHRD_FDDI 774
+#define ARPHRD_BIF 775
+#define ARPHRD_SIT 776
+#define ARPHRD_IPDDP 777
+#define ARPHRD_IPGRE 778
+#define ARPHRD_PIMREG 779
+#define ARPHRD_HIPPI 780
+#define ARPHRD_ASH 781
+#define ARPHRD_ECONET 782
+#define ARPHRD_IRDA 783
+#define ARPHRD_FCPP 784
+#define ARPHRD_FCAL 785
+#define ARPHRD_FCPL 786
+#define ARPHRD_FCFABRIC 787
+#define ARPHRD_IEEE802_TR 800
+#define ARPHRD_IEEE80211 801
+#define ARPHRD_IEEE80211_PRISM 802
+#define ARPHRD_IEEE80211_RADIOTAP 803
+#define ARPHRD_IEEE802154 804
+#define ARPHRD_IEEE802154_MONITOR 805
+#define ARPHRD_PHONET 820
+#define ARPHRD_PHONET_PIPE 821
+#define ARPHRD_CAIF 822
+#define ARPHRD_IP6GRE 823
+#define ARPHRD_NETLINK 824
+#define ARPHRD_6LOWPAN 825
+#define ARPHRD_VSOCKMON 826
+#define ARPHRD_VOID 0xFFFF
+#define ARPHRD_NONE 0xFFFE
+#define ARPOP_REQUEST 1
+#define ARPOP_REPLY 2
+#define ARPOP_RREQUEST 3
+#define ARPOP_RREPLY 4
+#define ARPOP_InREQUEST 8
+#define ARPOP_InREPLY 9
+#define ARPOP_NAK 10
+struct arpreq {
+ struct sockaddr arp_pa;
+ struct sockaddr arp_ha;
+ int arp_flags;
+ struct sockaddr arp_netmask;
+ char arp_dev[IFNAMSIZ];
+};
+struct arpreq_old {
+ struct sockaddr arp_pa;
+ struct sockaddr arp_ha;
+ int arp_flags;
+ struct sockaddr arp_netmask;
+};
+#define ATF_COM 0x02
+#define ATF_PERM 0x04
+#define ATF_PUBL 0x08
+#define ATF_USETRAILERS 0x10
+#define ATF_NETMASK 0x20
+#define ATF_DONTPUB 0x40
+struct arphdr {
+ __be16 ar_hrd;
+ __be16 ar_pro;
+ unsigned char ar_hln;
+ unsigned char ar_pln;
+ __be16 ar_op;
+};
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/if_tun.h b/chroot/opt/android-master/amd64/usr/include/linux/if_tun.h
new file mode 100644
index 0000000..d1a8f9e
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/if_tun.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI__IF_TUN_H
+#define _UAPI__IF_TUN_H
+#include <linux/types.h>
+#include <linux/if_ether.h>
+#include <linux/filter.h>
+#define TUN_READQ_SIZE 500
+#define TUN_TUN_DEV IFF_TUN
+#define TUN_TAP_DEV IFF_TAP
+#define TUN_TYPE_MASK 0x000f
+#define TUNSETNOCSUM _IOW('T', 200, int)
+#define TUNSETDEBUG _IOW('T', 201, int)
+#define TUNSETIFF _IOW('T', 202, int)
+#define TUNSETPERSIST _IOW('T', 203, int)
+#define TUNSETOWNER _IOW('T', 204, int)
+#define TUNSETLINK _IOW('T', 205, int)
+#define TUNSETGROUP _IOW('T', 206, int)
+#define TUNGETFEATURES _IOR('T', 207, unsigned int)
+#define TUNSETOFFLOAD _IOW('T', 208, unsigned int)
+#define TUNSETTXFILTER _IOW('T', 209, unsigned int)
+#define TUNGETIFF _IOR('T', 210, unsigned int)
+#define TUNGETSNDBUF _IOR('T', 211, int)
+#define TUNSETSNDBUF _IOW('T', 212, int)
+#define TUNATTACHFILTER _IOW('T', 213, struct sock_fprog)
+#define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog)
+#define TUNGETVNETHDRSZ _IOR('T', 215, int)
+#define TUNSETVNETHDRSZ _IOW('T', 216, int)
+#define TUNSETQUEUE _IOW('T', 217, int)
+#define TUNSETIFINDEX _IOW('T', 218, unsigned int)
+#define TUNGETFILTER _IOR('T', 219, struct sock_fprog)
+#define TUNSETVNETLE _IOW('T', 220, int)
+#define TUNGETVNETLE _IOR('T', 221, int)
+#define TUNSETVNETBE _IOW('T', 222, int)
+#define TUNGETVNETBE _IOR('T', 223, int)
+#define TUNSETSTEERINGEBPF _IOR('T', 224, int)
+#define TUNSETFILTEREBPF _IOR('T', 225, int)
+#define TUNSETCARRIER _IOW('T', 226, int)
+#define TUNGETDEVNETNS _IO('T', 227)
+#define IFF_TUN 0x0001
+#define IFF_TAP 0x0002
+#define IFF_NAPI 0x0010
+#define IFF_NAPI_FRAGS 0x0020
+#define IFF_NO_PI 0x1000
+#define IFF_ONE_QUEUE 0x2000
+#define IFF_VNET_HDR 0x4000
+#define IFF_TUN_EXCL 0x8000
+#define IFF_MULTI_QUEUE 0x0100
+#define IFF_ATTACH_QUEUE 0x0200
+#define IFF_DETACH_QUEUE 0x0400
+#define IFF_PERSIST 0x0800
+#define IFF_NOFILTER 0x1000
+#define TUN_TX_TIMESTAMP 1
+#define TUN_F_CSUM 0x01
+#define TUN_F_TSO4 0x02
+#define TUN_F_TSO6 0x04
+#define TUN_F_TSO_ECN 0x08
+#define TUN_F_UFO 0x10
+#define TUN_PKT_STRIP 0x0001
+struct tun_pi {
+ __u16 flags;
+ __be16 proto;
+};
+#define TUN_FLT_ALLMULTI 0x0001
+struct tun_filter {
+ __u16 flags;
+ __u16 count;
+ __u8 addr[0][ETH_ALEN];
+};
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/inet_diag.h b/chroot/opt/android-master/amd64/usr/include/linux/inet_diag.h
new file mode 100644
index 0000000..5df55ef
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/inet_diag.h
@@ -0,0 +1,168 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_INET_DIAG_H_
+#define _UAPI_INET_DIAG_H_
+#include <linux/types.h>
+#define TCPDIAG_GETSOCK 18
+#define DCCPDIAG_GETSOCK 19
+#define INET_DIAG_GETSOCK_MAX 24
+struct inet_diag_sockid {
+ __be16 idiag_sport;
+ __be16 idiag_dport;
+ __be32 idiag_src[4];
+ __be32 idiag_dst[4];
+ __u32 idiag_if;
+ __u32 idiag_cookie[2];
+#define INET_DIAG_NOCOOKIE (~0U)
+};
+struct inet_diag_req {
+ __u8 idiag_family;
+ __u8 idiag_src_len;
+ __u8 idiag_dst_len;
+ __u8 idiag_ext;
+ struct inet_diag_sockid id;
+ __u32 idiag_states;
+ __u32 idiag_dbs;
+};
+struct inet_diag_req_v2 {
+ __u8 sdiag_family;
+ __u8 sdiag_protocol;
+ __u8 idiag_ext;
+ __u8 pad;
+ __u32 idiag_states;
+ struct inet_diag_sockid id;
+};
+struct inet_diag_req_raw {
+ __u8 sdiag_family;
+ __u8 sdiag_protocol;
+ __u8 idiag_ext;
+ __u8 sdiag_raw_protocol;
+ __u32 idiag_states;
+ struct inet_diag_sockid id;
+};
+enum {
+ INET_DIAG_REQ_NONE,
+ INET_DIAG_REQ_BYTECODE,
+};
+#define INET_DIAG_REQ_MAX INET_DIAG_REQ_BYTECODE
+struct inet_diag_bc_op {
+ unsigned char code;
+ unsigned char yes;
+ unsigned short no;
+};
+enum {
+ INET_DIAG_BC_NOP,
+ INET_DIAG_BC_JMP,
+ INET_DIAG_BC_S_GE,
+ INET_DIAG_BC_S_LE,
+ INET_DIAG_BC_D_GE,
+ INET_DIAG_BC_D_LE,
+ INET_DIAG_BC_AUTO,
+ INET_DIAG_BC_S_COND,
+ INET_DIAG_BC_D_COND,
+ INET_DIAG_BC_DEV_COND,
+ INET_DIAG_BC_MARK_COND,
+ INET_DIAG_BC_S_EQ,
+ INET_DIAG_BC_D_EQ,
+};
+struct inet_diag_hostcond {
+ __u8 family;
+ __u8 prefix_len;
+ int port;
+ __be32 addr[0];
+};
+struct inet_diag_markcond {
+ __u32 mark;
+ __u32 mask;
+};
+struct inet_diag_msg {
+ __u8 idiag_family;
+ __u8 idiag_state;
+ __u8 idiag_timer;
+ __u8 idiag_retrans;
+ struct inet_diag_sockid id;
+ __u32 idiag_expires;
+ __u32 idiag_rqueue;
+ __u32 idiag_wqueue;
+ __u32 idiag_uid;
+ __u32 idiag_inode;
+};
+enum {
+ INET_DIAG_NONE,
+ INET_DIAG_MEMINFO,
+ INET_DIAG_INFO,
+ INET_DIAG_VEGASINFO,
+ INET_DIAG_CONG,
+ INET_DIAG_TOS,
+ INET_DIAG_TCLASS,
+ INET_DIAG_SKMEMINFO,
+ INET_DIAG_SHUTDOWN,
+ INET_DIAG_DCTCPINFO,
+ INET_DIAG_PROTOCOL,
+ INET_DIAG_SKV6ONLY,
+ INET_DIAG_LOCALS,
+ INET_DIAG_PEERS,
+ INET_DIAG_PAD,
+ INET_DIAG_MARK,
+ INET_DIAG_BBRINFO,
+ INET_DIAG_CLASS_ID,
+ INET_DIAG_MD5SIG,
+ INET_DIAG_ULP_INFO,
+ __INET_DIAG_MAX,
+};
+#define INET_DIAG_MAX (__INET_DIAG_MAX - 1)
+enum {
+ INET_ULP_INFO_UNSPEC,
+ INET_ULP_INFO_NAME,
+ INET_ULP_INFO_TLS,
+ __INET_ULP_INFO_MAX,
+};
+#define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1)
+struct inet_diag_meminfo {
+ __u32 idiag_rmem;
+ __u32 idiag_wmem;
+ __u32 idiag_fmem;
+ __u32 idiag_tmem;
+};
+struct tcpvegas_info {
+ __u32 tcpv_enabled;
+ __u32 tcpv_rttcnt;
+ __u32 tcpv_rtt;
+ __u32 tcpv_minrtt;
+};
+struct tcp_dctcp_info {
+ __u16 dctcp_enabled;
+ __u16 dctcp_ce_state;
+ __u32 dctcp_alpha;
+ __u32 dctcp_ab_ecn;
+ __u32 dctcp_ab_tot;
+};
+struct tcp_bbr_info {
+ __u32 bbr_bw_lo;
+ __u32 bbr_bw_hi;
+ __u32 bbr_min_rtt;
+ __u32 bbr_pacing_gain;
+ __u32 bbr_cwnd_gain;
+};
+union tcp_cc_info {
+ struct tcpvegas_info vegas;
+ struct tcp_dctcp_info dctcp;
+ struct tcp_bbr_info bbr;
+};
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/major.h b/chroot/opt/android-master/amd64/usr/include/linux/major.h
new file mode 100644
index 0000000..7768d7b
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/major.h
@@ -0,0 +1,162 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _LINUX_MAJOR_H
+#define _LINUX_MAJOR_H
+#define UNNAMED_MAJOR 0
+#define MEM_MAJOR 1
+#define RAMDISK_MAJOR 1
+#define FLOPPY_MAJOR 2
+#define PTY_MASTER_MAJOR 2
+#define IDE0_MAJOR 3
+#define HD_MAJOR IDE0_MAJOR
+#define PTY_SLAVE_MAJOR 3
+#define TTY_MAJOR 4
+#define TTYAUX_MAJOR 5
+#define LP_MAJOR 6
+#define VCS_MAJOR 7
+#define LOOP_MAJOR 7
+#define SCSI_DISK0_MAJOR 8
+#define SCSI_TAPE_MAJOR 9
+#define MD_MAJOR 9
+#define MISC_MAJOR 10
+#define SCSI_CDROM_MAJOR 11
+#define MUX_MAJOR 11
+#define XT_DISK_MAJOR 13
+#define INPUT_MAJOR 13
+#define SOUND_MAJOR 14
+#define CDU31A_CDROM_MAJOR 15
+#define JOYSTICK_MAJOR 15
+#define GOLDSTAR_CDROM_MAJOR 16
+#define OPTICS_CDROM_MAJOR 17
+#define SANYO_CDROM_MAJOR 18
+#define CYCLADES_MAJOR 19
+#define CYCLADESAUX_MAJOR 20
+#define MITSUMI_X_CDROM_MAJOR 20
+#define MFM_ACORN_MAJOR 21
+#define SCSI_GENERIC_MAJOR 21
+#define IDE1_MAJOR 22
+#define DIGICU_MAJOR 22
+#define DIGI_MAJOR 23
+#define MITSUMI_CDROM_MAJOR 23
+#define CDU535_CDROM_MAJOR 24
+#define STL_SERIALMAJOR 24
+#define MATSUSHITA_CDROM_MAJOR 25
+#define STL_CALLOUTMAJOR 25
+#define MATSUSHITA_CDROM2_MAJOR 26
+#define QIC117_TAPE_MAJOR 27
+#define MATSUSHITA_CDROM3_MAJOR 27
+#define MATSUSHITA_CDROM4_MAJOR 28
+#define STL_SIOMEMMAJOR 28
+#define ACSI_MAJOR 28
+#define AZTECH_CDROM_MAJOR 29
+#define FB_MAJOR 29
+#define MTD_BLOCK_MAJOR 31
+#define CM206_CDROM_MAJOR 32
+#define IDE2_MAJOR 33
+#define IDE3_MAJOR 34
+#define Z8530_MAJOR 34
+#define XPRAM_MAJOR 35
+#define NETLINK_MAJOR 36
+#define PS2ESDI_MAJOR 36
+#define IDETAPE_MAJOR 37
+#define Z2RAM_MAJOR 37
+#define APBLOCK_MAJOR 38
+#define DDV_MAJOR 39
+#define NBD_MAJOR 43
+#define RISCOM8_NORMAL_MAJOR 48
+#define DAC960_MAJOR 48
+#define RISCOM8_CALLOUT_MAJOR 49
+#define MKISS_MAJOR 55
+#define DSP56K_MAJOR 55
+#define IDE4_MAJOR 56
+#define IDE5_MAJOR 57
+#define SCSI_DISK1_MAJOR 65
+#define SCSI_DISK2_MAJOR 66
+#define SCSI_DISK3_MAJOR 67
+#define SCSI_DISK4_MAJOR 68
+#define SCSI_DISK5_MAJOR 69
+#define SCSI_DISK6_MAJOR 70
+#define SCSI_DISK7_MAJOR 71
+#define COMPAQ_SMART2_MAJOR 72
+#define COMPAQ_SMART2_MAJOR1 73
+#define COMPAQ_SMART2_MAJOR2 74
+#define COMPAQ_SMART2_MAJOR3 75
+#define COMPAQ_SMART2_MAJOR4 76
+#define COMPAQ_SMART2_MAJOR5 77
+#define COMPAQ_SMART2_MAJOR6 78
+#define COMPAQ_SMART2_MAJOR7 79
+#define SPECIALIX_NORMAL_MAJOR 75
+#define SPECIALIX_CALLOUT_MAJOR 76
+#define AURORA_MAJOR 79
+#define I2O_MAJOR 80
+#define SHMIQ_MAJOR 85
+#define SCSI_CHANGER_MAJOR 86
+#define IDE6_MAJOR 88
+#define IDE7_MAJOR 89
+#define IDE8_MAJOR 90
+#define MTD_CHAR_MAJOR 90
+#define IDE9_MAJOR 91
+#define DASD_MAJOR 94
+#define MDISK_MAJOR 95
+#define UBD_MAJOR 98
+#define PP_MAJOR 99
+#define JSFD_MAJOR 99
+#define PHONE_MAJOR 100
+#define COMPAQ_CISS_MAJOR 104
+#define COMPAQ_CISS_MAJOR1 105
+#define COMPAQ_CISS_MAJOR2 106
+#define COMPAQ_CISS_MAJOR3 107
+#define COMPAQ_CISS_MAJOR4 108
+#define COMPAQ_CISS_MAJOR5 109
+#define COMPAQ_CISS_MAJOR6 110
+#define COMPAQ_CISS_MAJOR7 111
+#define VIODASD_MAJOR 112
+#define VIOCD_MAJOR 113
+#define ATARAID_MAJOR 114
+#define SCSI_DISK8_MAJOR 128
+#define SCSI_DISK9_MAJOR 129
+#define SCSI_DISK10_MAJOR 130
+#define SCSI_DISK11_MAJOR 131
+#define SCSI_DISK12_MAJOR 132
+#define SCSI_DISK13_MAJOR 133
+#define SCSI_DISK14_MAJOR 134
+#define SCSI_DISK15_MAJOR 135
+#define UNIX98_PTY_MASTER_MAJOR 128
+#define UNIX98_PTY_MAJOR_COUNT 8
+#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR + UNIX98_PTY_MAJOR_COUNT)
+#define DRBD_MAJOR 147
+#define RTF_MAJOR 150
+#define RAW_MAJOR 162
+#define USB_ACM_MAJOR 166
+#define USB_ACM_AUX_MAJOR 167
+#define USB_CHAR_MAJOR 180
+#define MMC_BLOCK_MAJOR 179
+#define VXVM_MAJOR 199
+#define VXSPEC_MAJOR 200
+#define VXDMP_MAJOR 201
+#define XENVBD_MAJOR 202
+#define MSR_MAJOR 202
+#define CPUID_MAJOR 203
+#define OSST_MAJOR 206
+#define IBM_TTY3270_MAJOR 227
+#define IBM_FS3270_MAJOR 228
+#define VIOTAPE_MAJOR 230
+#define BLOCK_EXT_MAJOR 259
+#define SCSI_OSD_MAJOR 260
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/msg.h b/chroot/opt/android-master/amd64/usr/include/linux/msg.h
new file mode 100644
index 0000000..bb32b93
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/msg.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_MSG_H
+#define _UAPI_LINUX_MSG_H
+#include <linux/ipc.h>
+#define MSG_STAT 11
+#define MSG_INFO 12
+#define MSG_STAT_ANY 13
+#define MSG_NOERROR 010000
+#define MSG_EXCEPT 020000
+#define MSG_COPY 040000
+struct __kernel_legacy_msqid_ds {
+ struct __kernel_legacy_ipc_perm msg_perm;
+ struct msg * msg_first;
+ struct msg * msg_last;
+ __kernel_old_time_t msg_stime;
+ __kernel_old_time_t msg_rtime;
+ __kernel_old_time_t msg_ctime;
+ unsigned long msg_lcbytes;
+ unsigned long msg_lqbytes;
+ unsigned short msg_cbytes;
+ unsigned short msg_qnum;
+ unsigned short msg_qbytes;
+ __kernel_ipc_pid_t msg_lspid;
+ __kernel_ipc_pid_t msg_lrpid;
+};
+#include <asm/msgbuf.h>
+struct msgbuf {
+ __kernel_long_t mtype;
+ char mtext[1];
+};
+struct msginfo {
+ int msgpool;
+ int msgmap;
+ int msgmax;
+ int msgmnb;
+ int msgmni;
+ int msgssz;
+ int msgtql;
+ unsigned short msgseg;
+};
+#define MSGMNI 32000
+#define MSGMAX 8192
+#define MSGMNB 16384
+#define MSGPOOL (MSGMNI * MSGMNB / 1024)
+#define MSGTQL MSGMNB
+#define MSGMAP MSGMNB
+#define MSGSSZ 16
+#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ)
+#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/netfilter/nfnetlink.h b/chroot/opt/android-master/amd64/usr/include/linux/netfilter/nfnetlink.h
new file mode 100644
index 0000000..9145552
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/netfilter/nfnetlink.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_NFNETLINK_H
+#define _UAPI_NFNETLINK_H
+#include <linux/types.h>
+#include <linux/netfilter/nfnetlink_compat.h>
+enum nfnetlink_groups {
+ NFNLGRP_NONE,
+#define NFNLGRP_NONE NFNLGRP_NONE
+ NFNLGRP_CONNTRACK_NEW,
+#define NFNLGRP_CONNTRACK_NEW NFNLGRP_CONNTRACK_NEW
+ NFNLGRP_CONNTRACK_UPDATE,
+#define NFNLGRP_CONNTRACK_UPDATE NFNLGRP_CONNTRACK_UPDATE
+ NFNLGRP_CONNTRACK_DESTROY,
+#define NFNLGRP_CONNTRACK_DESTROY NFNLGRP_CONNTRACK_DESTROY
+ NFNLGRP_CONNTRACK_EXP_NEW,
+#define NFNLGRP_CONNTRACK_EXP_NEW NFNLGRP_CONNTRACK_EXP_NEW
+ NFNLGRP_CONNTRACK_EXP_UPDATE,
+#define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE
+ NFNLGRP_CONNTRACK_EXP_DESTROY,
+#define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY
+ NFNLGRP_NFTABLES,
+#define NFNLGRP_NFTABLES NFNLGRP_NFTABLES
+ NFNLGRP_ACCT_QUOTA,
+#define NFNLGRP_ACCT_QUOTA NFNLGRP_ACCT_QUOTA
+ NFNLGRP_NFTRACE,
+#define NFNLGRP_NFTRACE NFNLGRP_NFTRACE
+ __NFNLGRP_MAX,
+};
+#define NFNLGRP_MAX (__NFNLGRP_MAX - 1)
+struct nfgenmsg {
+ __u8 nfgen_family;
+ __u8 version;
+ __be16 res_id;
+};
+#define NFNETLINK_V0 0
+#define NFNL_SUBSYS_ID(x) ((x & 0xff00) >> 8)
+#define NFNL_MSG_TYPE(x) (x & 0x00ff)
+#define NFNL_SUBSYS_NONE 0
+#define NFNL_SUBSYS_CTNETLINK 1
+#define NFNL_SUBSYS_CTNETLINK_EXP 2
+#define NFNL_SUBSYS_QUEUE 3
+#define NFNL_SUBSYS_ULOG 4
+#define NFNL_SUBSYS_OSF 5
+#define NFNL_SUBSYS_IPSET 6
+#define NFNL_SUBSYS_ACCT 7
+#define NFNL_SUBSYS_CTNETLINK_TIMEOUT 8
+#define NFNL_SUBSYS_CTHELPER 9
+#define NFNL_SUBSYS_NFTABLES 10
+#define NFNL_SUBSYS_NFT_COMPAT 11
+#define NFNL_SUBSYS_COUNT 12
+#define NFNL_MSG_BATCH_BEGIN NLMSG_MIN_TYPE
+#define NFNL_MSG_BATCH_END NLMSG_MIN_TYPE + 1
+enum nfnl_batch_attributes {
+ NFNL_BATCH_UNSPEC,
+ NFNL_BATCH_GENID,
+ __NFNL_BATCH_MAX
+};
+#define NFNL_BATCH_MAX (__NFNL_BATCH_MAX - 1)
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/netfilter/nfnetlink_compat.h b/chroot/opt/android-master/amd64/usr/include/linux/netfilter/nfnetlink_compat.h
new file mode 100644
index 0000000..07110bf
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/netfilter/nfnetlink_compat.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _NFNETLINK_COMPAT_H
+#define _NFNETLINK_COMPAT_H
+#include <linux/types.h>
+#define NF_NETLINK_CONNTRACK_NEW 0x00000001
+#define NF_NETLINK_CONNTRACK_UPDATE 0x00000002
+#define NF_NETLINK_CONNTRACK_DESTROY 0x00000004
+#define NF_NETLINK_CONNTRACK_EXP_NEW 0x00000008
+#define NF_NETLINK_CONNTRACK_EXP_UPDATE 0x00000010
+#define NF_NETLINK_CONNTRACK_EXP_DESTROY 0x00000020
+struct nfattr {
+ __u16 nfa_len;
+ __u16 nfa_type;
+};
+#define NFNL_NFA_NEST 0x8000
+#define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff)
+#define NFA_ALIGNTO 4
+#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1))
+#define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) && (nfa)->nfa_len <= (len))
+#define NFA_NEXT(nfa,attrlen) ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), (struct nfattr *) (((char *) (nfa)) + NFA_ALIGN((nfa)->nfa_len)))
+#define NFA_LENGTH(len) (NFA_ALIGN(sizeof(struct nfattr)) + (len))
+#define NFA_SPACE(len) NFA_ALIGN(NFA_LENGTH(len))
+#define NFA_DATA(nfa) ((void *) (((char *) (nfa)) + NFA_LENGTH(0)))
+#define NFA_PAYLOAD(nfa) ((int) ((nfa)->nfa_len) - NFA_LENGTH(0))
+#define NFA_NEST(skb,type) \
+({ struct nfattr * __start = (struct nfattr *) skb_tail_pointer(skb); NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); __start; })
+#define NFA_NEST_END(skb,start) \
+({ (start)->nfa_len = skb_tail_pointer(skb) - (unsigned char *) (start); (skb)->len; })
+#define NFA_NEST_CANCEL(skb,start) \
+({ if(start) skb_trim(skb, (unsigned char *) (start) - (skb)->data); - 1; })
+#define NFM_NFA(n) ((struct nfattr *) (((char *) (n)) + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
+#define NFM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/nl80211.h b/chroot/opt/android-master/amd64/usr/include/linux/nl80211.h
new file mode 100644
index 0000000..9292571
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/nl80211.h
@@ -0,0 +1,1658 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_NL80211_H
+#define __LINUX_NL80211_H
+#include <linux/types.h>
+#define NL80211_GENL_NAME "nl80211"
+#define NL80211_MULTICAST_GROUP_CONFIG "config"
+#define NL80211_MULTICAST_GROUP_SCAN "scan"
+#define NL80211_MULTICAST_GROUP_REG "regulatory"
+#define NL80211_MULTICAST_GROUP_MLME "mlme"
+#define NL80211_MULTICAST_GROUP_VENDOR "vendor"
+#define NL80211_MULTICAST_GROUP_NAN "nan"
+#define NL80211_MULTICAST_GROUP_TESTMODE "testmode"
+#define NL80211_EDMG_BW_CONFIG_MIN 4
+#define NL80211_EDMG_BW_CONFIG_MAX 15
+#define NL80211_EDMG_CHANNELS_MIN 1
+#define NL80211_EDMG_CHANNELS_MAX 0x3c
+enum nl80211_commands {
+ NL80211_CMD_UNSPEC,
+ NL80211_CMD_GET_WIPHY,
+ NL80211_CMD_SET_WIPHY,
+ NL80211_CMD_NEW_WIPHY,
+ NL80211_CMD_DEL_WIPHY,
+ NL80211_CMD_GET_INTERFACE,
+ NL80211_CMD_SET_INTERFACE,
+ NL80211_CMD_NEW_INTERFACE,
+ NL80211_CMD_DEL_INTERFACE,
+ NL80211_CMD_GET_KEY,
+ NL80211_CMD_SET_KEY,
+ NL80211_CMD_NEW_KEY,
+ NL80211_CMD_DEL_KEY,
+ NL80211_CMD_GET_BEACON,
+ NL80211_CMD_SET_BEACON,
+ NL80211_CMD_START_AP,
+ NL80211_CMD_NEW_BEACON = NL80211_CMD_START_AP,
+ NL80211_CMD_STOP_AP,
+ NL80211_CMD_DEL_BEACON = NL80211_CMD_STOP_AP,
+ NL80211_CMD_GET_STATION,
+ NL80211_CMD_SET_STATION,
+ NL80211_CMD_NEW_STATION,
+ NL80211_CMD_DEL_STATION,
+ NL80211_CMD_GET_MPATH,
+ NL80211_CMD_SET_MPATH,
+ NL80211_CMD_NEW_MPATH,
+ NL80211_CMD_DEL_MPATH,
+ NL80211_CMD_SET_BSS,
+ NL80211_CMD_SET_REG,
+ NL80211_CMD_REQ_SET_REG,
+ NL80211_CMD_GET_MESH_CONFIG,
+ NL80211_CMD_SET_MESH_CONFIG,
+ NL80211_CMD_SET_MGMT_EXTRA_IE,
+ NL80211_CMD_GET_REG,
+ NL80211_CMD_GET_SCAN,
+ NL80211_CMD_TRIGGER_SCAN,
+ NL80211_CMD_NEW_SCAN_RESULTS,
+ NL80211_CMD_SCAN_ABORTED,
+ NL80211_CMD_REG_CHANGE,
+ NL80211_CMD_AUTHENTICATE,
+ NL80211_CMD_ASSOCIATE,
+ NL80211_CMD_DEAUTHENTICATE,
+ NL80211_CMD_DISASSOCIATE,
+ NL80211_CMD_MICHAEL_MIC_FAILURE,
+ NL80211_CMD_REG_BEACON_HINT,
+ NL80211_CMD_JOIN_IBSS,
+ NL80211_CMD_LEAVE_IBSS,
+ NL80211_CMD_TESTMODE,
+ NL80211_CMD_CONNECT,
+ NL80211_CMD_ROAM,
+ NL80211_CMD_DISCONNECT,
+ NL80211_CMD_SET_WIPHY_NETNS,
+ NL80211_CMD_GET_SURVEY,
+ NL80211_CMD_NEW_SURVEY_RESULTS,
+ NL80211_CMD_SET_PMKSA,
+ NL80211_CMD_DEL_PMKSA,
+ NL80211_CMD_FLUSH_PMKSA,
+ NL80211_CMD_REMAIN_ON_CHANNEL,
+ NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL,
+ NL80211_CMD_SET_TX_BITRATE_MASK,
+ NL80211_CMD_REGISTER_FRAME,
+ NL80211_CMD_REGISTER_ACTION = NL80211_CMD_REGISTER_FRAME,
+ NL80211_CMD_FRAME,
+ NL80211_CMD_ACTION = NL80211_CMD_FRAME,
+ NL80211_CMD_FRAME_TX_STATUS,
+ NL80211_CMD_ACTION_TX_STATUS = NL80211_CMD_FRAME_TX_STATUS,
+ NL80211_CMD_SET_POWER_SAVE,
+ NL80211_CMD_GET_POWER_SAVE,
+ NL80211_CMD_SET_CQM,
+ NL80211_CMD_NOTIFY_CQM,
+ NL80211_CMD_SET_CHANNEL,
+ NL80211_CMD_SET_WDS_PEER,
+ NL80211_CMD_FRAME_WAIT_CANCEL,
+ NL80211_CMD_JOIN_MESH,
+ NL80211_CMD_LEAVE_MESH,
+ NL80211_CMD_UNPROT_DEAUTHENTICATE,
+ NL80211_CMD_UNPROT_DISASSOCIATE,
+ NL80211_CMD_NEW_PEER_CANDIDATE,
+ NL80211_CMD_GET_WOWLAN,
+ NL80211_CMD_SET_WOWLAN,
+ NL80211_CMD_START_SCHED_SCAN,
+ NL80211_CMD_STOP_SCHED_SCAN,
+ NL80211_CMD_SCHED_SCAN_RESULTS,
+ NL80211_CMD_SCHED_SCAN_STOPPED,
+ NL80211_CMD_SET_REKEY_OFFLOAD,
+ NL80211_CMD_PMKSA_CANDIDATE,
+ NL80211_CMD_TDLS_OPER,
+ NL80211_CMD_TDLS_MGMT,
+ NL80211_CMD_UNEXPECTED_FRAME,
+ NL80211_CMD_PROBE_CLIENT,
+ NL80211_CMD_REGISTER_BEACONS,
+ NL80211_CMD_UNEXPECTED_4ADDR_FRAME,
+ NL80211_CMD_SET_NOACK_MAP,
+ NL80211_CMD_CH_SWITCH_NOTIFY,
+ NL80211_CMD_START_P2P_DEVICE,
+ NL80211_CMD_STOP_P2P_DEVICE,
+ NL80211_CMD_CONN_FAILED,
+ NL80211_CMD_SET_MCAST_RATE,
+ NL80211_CMD_SET_MAC_ACL,
+ NL80211_CMD_RADAR_DETECT,
+ NL80211_CMD_GET_PROTOCOL_FEATURES,
+ NL80211_CMD_UPDATE_FT_IES,
+ NL80211_CMD_FT_EVENT,
+ NL80211_CMD_CRIT_PROTOCOL_START,
+ NL80211_CMD_CRIT_PROTOCOL_STOP,
+ NL80211_CMD_GET_COALESCE,
+ NL80211_CMD_SET_COALESCE,
+ NL80211_CMD_CHANNEL_SWITCH,
+ NL80211_CMD_VENDOR,
+ NL80211_CMD_SET_QOS_MAP,
+ NL80211_CMD_ADD_TX_TS,
+ NL80211_CMD_DEL_TX_TS,
+ NL80211_CMD_GET_MPP,
+ NL80211_CMD_JOIN_OCB,
+ NL80211_CMD_LEAVE_OCB,
+ NL80211_CMD_CH_SWITCH_STARTED_NOTIFY,
+ NL80211_CMD_TDLS_CHANNEL_SWITCH,
+ NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH,
+ NL80211_CMD_WIPHY_REG_CHANGE,
+ NL80211_CMD_ABORT_SCAN,
+ NL80211_CMD_START_NAN,
+ NL80211_CMD_STOP_NAN,
+ NL80211_CMD_ADD_NAN_FUNCTION,
+ NL80211_CMD_DEL_NAN_FUNCTION,
+ NL80211_CMD_CHANGE_NAN_CONFIG,
+ NL80211_CMD_NAN_MATCH,
+ NL80211_CMD_SET_MULTICAST_TO_UNICAST,
+ NL80211_CMD_UPDATE_CONNECT_PARAMS,
+ NL80211_CMD_SET_PMK,
+ NL80211_CMD_DEL_PMK,
+ NL80211_CMD_PORT_AUTHORIZED,
+ NL80211_CMD_RELOAD_REGDB,
+ NL80211_CMD_EXTERNAL_AUTH,
+ NL80211_CMD_STA_OPMODE_CHANGED,
+ NL80211_CMD_CONTROL_PORT_FRAME,
+ NL80211_CMD_GET_FTM_RESPONDER_STATS,
+ NL80211_CMD_PEER_MEASUREMENT_START,
+ NL80211_CMD_PEER_MEASUREMENT_RESULT,
+ NL80211_CMD_PEER_MEASUREMENT_COMPLETE,
+ NL80211_CMD_NOTIFY_RADAR,
+ NL80211_CMD_UPDATE_OWE_INFO,
+ NL80211_CMD_PROBE_MESH_LINK,
+ __NL80211_CMD_AFTER_LAST,
+ NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1
+};
+#define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS
+#define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE
+#define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE
+#define NL80211_CMD_AUTHENTICATE NL80211_CMD_AUTHENTICATE
+#define NL80211_CMD_ASSOCIATE NL80211_CMD_ASSOCIATE
+#define NL80211_CMD_DEAUTHENTICATE NL80211_CMD_DEAUTHENTICATE
+#define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE
+#define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT
+#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
+#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
+#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG
+#define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE
+enum nl80211_attrs {
+ NL80211_ATTR_UNSPEC,
+ NL80211_ATTR_WIPHY,
+ NL80211_ATTR_WIPHY_NAME,
+ NL80211_ATTR_IFINDEX,
+ NL80211_ATTR_IFNAME,
+ NL80211_ATTR_IFTYPE,
+ NL80211_ATTR_MAC,
+ NL80211_ATTR_KEY_DATA,
+ NL80211_ATTR_KEY_IDX,
+ NL80211_ATTR_KEY_CIPHER,
+ NL80211_ATTR_KEY_SEQ,
+ NL80211_ATTR_KEY_DEFAULT,
+ NL80211_ATTR_BEACON_INTERVAL,
+ NL80211_ATTR_DTIM_PERIOD,
+ NL80211_ATTR_BEACON_HEAD,
+ NL80211_ATTR_BEACON_TAIL,
+ NL80211_ATTR_STA_AID,
+ NL80211_ATTR_STA_FLAGS,
+ NL80211_ATTR_STA_LISTEN_INTERVAL,
+ NL80211_ATTR_STA_SUPPORTED_RATES,
+ NL80211_ATTR_STA_VLAN,
+ NL80211_ATTR_STA_INFO,
+ NL80211_ATTR_WIPHY_BANDS,
+ NL80211_ATTR_MNTR_FLAGS,
+ NL80211_ATTR_MESH_ID,
+ NL80211_ATTR_STA_PLINK_ACTION,
+ NL80211_ATTR_MPATH_NEXT_HOP,
+ NL80211_ATTR_MPATH_INFO,
+ NL80211_ATTR_BSS_CTS_PROT,
+ NL80211_ATTR_BSS_SHORT_PREAMBLE,
+ NL80211_ATTR_BSS_SHORT_SLOT_TIME,
+ NL80211_ATTR_HT_CAPABILITY,
+ NL80211_ATTR_SUPPORTED_IFTYPES,
+ NL80211_ATTR_REG_ALPHA2,
+ NL80211_ATTR_REG_RULES,
+ NL80211_ATTR_MESH_CONFIG,
+ NL80211_ATTR_BSS_BASIC_RATES,
+ NL80211_ATTR_WIPHY_TXQ_PARAMS,
+ NL80211_ATTR_WIPHY_FREQ,
+ NL80211_ATTR_WIPHY_CHANNEL_TYPE,
+ NL80211_ATTR_KEY_DEFAULT_MGMT,
+ NL80211_ATTR_MGMT_SUBTYPE,
+ NL80211_ATTR_IE,
+ NL80211_ATTR_MAX_NUM_SCAN_SSIDS,
+ NL80211_ATTR_SCAN_FREQUENCIES,
+ NL80211_ATTR_SCAN_SSIDS,
+ NL80211_ATTR_GENERATION,
+ NL80211_ATTR_BSS,
+ NL80211_ATTR_REG_INITIATOR,
+ NL80211_ATTR_REG_TYPE,
+ NL80211_ATTR_SUPPORTED_COMMANDS,
+ NL80211_ATTR_FRAME,
+ NL80211_ATTR_SSID,
+ NL80211_ATTR_AUTH_TYPE,
+ NL80211_ATTR_REASON_CODE,
+ NL80211_ATTR_KEY_TYPE,
+ NL80211_ATTR_MAX_SCAN_IE_LEN,
+ NL80211_ATTR_CIPHER_SUITES,
+ NL80211_ATTR_FREQ_BEFORE,
+ NL80211_ATTR_FREQ_AFTER,
+ NL80211_ATTR_FREQ_FIXED,
+ NL80211_ATTR_WIPHY_RETRY_SHORT,
+ NL80211_ATTR_WIPHY_RETRY_LONG,
+ NL80211_ATTR_WIPHY_FRAG_THRESHOLD,
+ NL80211_ATTR_WIPHY_RTS_THRESHOLD,
+ NL80211_ATTR_TIMED_OUT,
+ NL80211_ATTR_USE_MFP,
+ NL80211_ATTR_STA_FLAGS2,
+ NL80211_ATTR_CONTROL_PORT,
+ NL80211_ATTR_TESTDATA,
+ NL80211_ATTR_PRIVACY,
+ NL80211_ATTR_DISCONNECTED_BY_AP,
+ NL80211_ATTR_STATUS_CODE,
+ NL80211_ATTR_CIPHER_SUITES_PAIRWISE,
+ NL80211_ATTR_CIPHER_SUITE_GROUP,
+ NL80211_ATTR_WPA_VERSIONS,
+ NL80211_ATTR_AKM_SUITES,
+ NL80211_ATTR_REQ_IE,
+ NL80211_ATTR_RESP_IE,
+ NL80211_ATTR_PREV_BSSID,
+ NL80211_ATTR_KEY,
+ NL80211_ATTR_KEYS,
+ NL80211_ATTR_PID,
+ NL80211_ATTR_4ADDR,
+ NL80211_ATTR_SURVEY_INFO,
+ NL80211_ATTR_PMKID,
+ NL80211_ATTR_MAX_NUM_PMKIDS,
+ NL80211_ATTR_DURATION,
+ NL80211_ATTR_COOKIE,
+ NL80211_ATTR_WIPHY_COVERAGE_CLASS,
+ NL80211_ATTR_TX_RATES,
+ NL80211_ATTR_FRAME_MATCH,
+ NL80211_ATTR_ACK,
+ NL80211_ATTR_PS_STATE,
+ NL80211_ATTR_CQM,
+ NL80211_ATTR_LOCAL_STATE_CHANGE,
+ NL80211_ATTR_AP_ISOLATE,
+ NL80211_ATTR_WIPHY_TX_POWER_SETTING,
+ NL80211_ATTR_WIPHY_TX_POWER_LEVEL,
+ NL80211_ATTR_TX_FRAME_TYPES,
+ NL80211_ATTR_RX_FRAME_TYPES,
+ NL80211_ATTR_FRAME_TYPE,
+ NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
+ NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
+ NL80211_ATTR_SUPPORT_IBSS_RSN,
+ NL80211_ATTR_WIPHY_ANTENNA_TX,
+ NL80211_ATTR_WIPHY_ANTENNA_RX,
+ NL80211_ATTR_MCAST_RATE,
+ NL80211_ATTR_OFFCHANNEL_TX_OK,
+ NL80211_ATTR_BSS_HT_OPMODE,
+ NL80211_ATTR_KEY_DEFAULT_TYPES,
+ NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION,
+ NL80211_ATTR_MESH_SETUP,
+ NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX,
+ NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX,
+ NL80211_ATTR_SUPPORT_MESH_AUTH,
+ NL80211_ATTR_STA_PLINK_STATE,
+ NL80211_ATTR_WOWLAN_TRIGGERS,
+ NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED,
+ NL80211_ATTR_SCHED_SCAN_INTERVAL,
+ NL80211_ATTR_INTERFACE_COMBINATIONS,
+ NL80211_ATTR_SOFTWARE_IFTYPES,
+ NL80211_ATTR_REKEY_DATA,
+ NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS,
+ NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN,
+ NL80211_ATTR_SCAN_SUPP_RATES,
+ NL80211_ATTR_HIDDEN_SSID,
+ NL80211_ATTR_IE_PROBE_RESP,
+ NL80211_ATTR_IE_ASSOC_RESP,
+ NL80211_ATTR_STA_WME,
+ NL80211_ATTR_SUPPORT_AP_UAPSD,
+ NL80211_ATTR_ROAM_SUPPORT,
+ NL80211_ATTR_SCHED_SCAN_MATCH,
+ NL80211_ATTR_MAX_MATCH_SETS,
+ NL80211_ATTR_PMKSA_CANDIDATE,
+ NL80211_ATTR_TX_NO_CCK_RATE,
+ NL80211_ATTR_TDLS_ACTION,
+ NL80211_ATTR_TDLS_DIALOG_TOKEN,
+ NL80211_ATTR_TDLS_OPERATION,
+ NL80211_ATTR_TDLS_SUPPORT,
+ NL80211_ATTR_TDLS_EXTERNAL_SETUP,
+ NL80211_ATTR_DEVICE_AP_SME,
+ NL80211_ATTR_DONT_WAIT_FOR_ACK,
+ NL80211_ATTR_FEATURE_FLAGS,
+ NL80211_ATTR_PROBE_RESP_OFFLOAD,
+ NL80211_ATTR_PROBE_RESP,
+ NL80211_ATTR_DFS_REGION,
+ NL80211_ATTR_DISABLE_HT,
+ NL80211_ATTR_HT_CAPABILITY_MASK,
+ NL80211_ATTR_NOACK_MAP,
+ NL80211_ATTR_INACTIVITY_TIMEOUT,
+ NL80211_ATTR_RX_SIGNAL_DBM,
+ NL80211_ATTR_BG_SCAN_PERIOD,
+ NL80211_ATTR_WDEV,
+ NL80211_ATTR_USER_REG_HINT_TYPE,
+ NL80211_ATTR_CONN_FAILED_REASON,
+ NL80211_ATTR_AUTH_DATA,
+ NL80211_ATTR_VHT_CAPABILITY,
+ NL80211_ATTR_SCAN_FLAGS,
+ NL80211_ATTR_CHANNEL_WIDTH,
+ NL80211_ATTR_CENTER_FREQ1,
+ NL80211_ATTR_CENTER_FREQ2,
+ NL80211_ATTR_P2P_CTWINDOW,
+ NL80211_ATTR_P2P_OPPPS,
+ NL80211_ATTR_LOCAL_MESH_POWER_MODE,
+ NL80211_ATTR_ACL_POLICY,
+ NL80211_ATTR_MAC_ADDRS,
+ NL80211_ATTR_MAC_ACL_MAX,
+ NL80211_ATTR_RADAR_EVENT,
+ NL80211_ATTR_EXT_CAPA,
+ NL80211_ATTR_EXT_CAPA_MASK,
+ NL80211_ATTR_STA_CAPABILITY,
+ NL80211_ATTR_STA_EXT_CAPABILITY,
+ NL80211_ATTR_PROTOCOL_FEATURES,
+ NL80211_ATTR_SPLIT_WIPHY_DUMP,
+ NL80211_ATTR_DISABLE_VHT,
+ NL80211_ATTR_VHT_CAPABILITY_MASK,
+ NL80211_ATTR_MDID,
+ NL80211_ATTR_IE_RIC,
+ NL80211_ATTR_CRIT_PROT_ID,
+ NL80211_ATTR_MAX_CRIT_PROT_DURATION,
+ NL80211_ATTR_PEER_AID,
+ NL80211_ATTR_COALESCE_RULE,
+ NL80211_ATTR_CH_SWITCH_COUNT,
+ NL80211_ATTR_CH_SWITCH_BLOCK_TX,
+ NL80211_ATTR_CSA_IES,
+ NL80211_ATTR_CSA_C_OFF_BEACON,
+ NL80211_ATTR_CSA_C_OFF_PRESP,
+ NL80211_ATTR_RXMGMT_FLAGS,
+ NL80211_ATTR_STA_SUPPORTED_CHANNELS,
+ NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES,
+ NL80211_ATTR_HANDLE_DFS,
+ NL80211_ATTR_SUPPORT_5_MHZ,
+ NL80211_ATTR_SUPPORT_10_MHZ,
+ NL80211_ATTR_OPMODE_NOTIF,
+ NL80211_ATTR_VENDOR_ID,
+ NL80211_ATTR_VENDOR_SUBCMD,
+ NL80211_ATTR_VENDOR_DATA,
+ NL80211_ATTR_VENDOR_EVENTS,
+ NL80211_ATTR_QOS_MAP,
+ NL80211_ATTR_MAC_HINT,
+ NL80211_ATTR_WIPHY_FREQ_HINT,
+ NL80211_ATTR_MAX_AP_ASSOC_STA,
+ NL80211_ATTR_TDLS_PEER_CAPABILITY,
+ NL80211_ATTR_SOCKET_OWNER,
+ NL80211_ATTR_CSA_C_OFFSETS_TX,
+ NL80211_ATTR_MAX_CSA_COUNTERS,
+ NL80211_ATTR_TDLS_INITIATOR,
+ NL80211_ATTR_USE_RRM,
+ NL80211_ATTR_WIPHY_DYN_ACK,
+ NL80211_ATTR_TSID,
+ NL80211_ATTR_USER_PRIO,
+ NL80211_ATTR_ADMITTED_TIME,
+ NL80211_ATTR_SMPS_MODE,
+ NL80211_ATTR_OPER_CLASS,
+ NL80211_ATTR_MAC_MASK,
+ NL80211_ATTR_WIPHY_SELF_MANAGED_REG,
+ NL80211_ATTR_EXT_FEATURES,
+ NL80211_ATTR_SURVEY_RADIO_STATS,
+ NL80211_ATTR_NETNS_FD,
+ NL80211_ATTR_SCHED_SCAN_DELAY,
+ NL80211_ATTR_REG_INDOOR,
+ NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS,
+ NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL,
+ NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS,
+ NL80211_ATTR_SCHED_SCAN_PLANS,
+ NL80211_ATTR_PBSS,
+ NL80211_ATTR_BSS_SELECT,
+ NL80211_ATTR_STA_SUPPORT_P2P_PS,
+ NL80211_ATTR_PAD,
+ NL80211_ATTR_IFTYPE_EXT_CAPA,
+ NL80211_ATTR_MU_MIMO_GROUP_DATA,
+ NL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR,
+ NL80211_ATTR_SCAN_START_TIME_TSF,
+ NL80211_ATTR_SCAN_START_TIME_TSF_BSSID,
+ NL80211_ATTR_MEASUREMENT_DURATION,
+ NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY,
+ NL80211_ATTR_MESH_PEER_AID,
+ NL80211_ATTR_NAN_MASTER_PREF,
+ NL80211_ATTR_BANDS,
+ NL80211_ATTR_NAN_FUNC,
+ NL80211_ATTR_NAN_MATCH,
+ NL80211_ATTR_FILS_KEK,
+ NL80211_ATTR_FILS_NONCES,
+ NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED,
+ NL80211_ATTR_BSSID,
+ NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI,
+ NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST,
+ NL80211_ATTR_TIMEOUT_REASON,
+ NL80211_ATTR_FILS_ERP_USERNAME,
+ NL80211_ATTR_FILS_ERP_REALM,
+ NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM,
+ NL80211_ATTR_FILS_ERP_RRK,
+ NL80211_ATTR_FILS_CACHE_ID,
+ NL80211_ATTR_PMK,
+ NL80211_ATTR_SCHED_SCAN_MULTI,
+ NL80211_ATTR_SCHED_SCAN_MAX_REQS,
+ NL80211_ATTR_WANT_1X_4WAY_HS,
+ NL80211_ATTR_PMKR0_NAME,
+ NL80211_ATTR_PORT_AUTHORIZED,
+ NL80211_ATTR_EXTERNAL_AUTH_ACTION,
+ NL80211_ATTR_EXTERNAL_AUTH_SUPPORT,
+ NL80211_ATTR_NSS,
+ NL80211_ATTR_ACK_SIGNAL,
+ NL80211_ATTR_CONTROL_PORT_OVER_NL80211,
+ NL80211_ATTR_TXQ_STATS,
+ NL80211_ATTR_TXQ_LIMIT,
+ NL80211_ATTR_TXQ_MEMORY_LIMIT,
+ NL80211_ATTR_TXQ_QUANTUM,
+ NL80211_ATTR_HE_CAPABILITY,
+ NL80211_ATTR_FTM_RESPONDER,
+ NL80211_ATTR_FTM_RESPONDER_STATS,
+ NL80211_ATTR_TIMEOUT,
+ NL80211_ATTR_PEER_MEASUREMENTS,
+ NL80211_ATTR_AIRTIME_WEIGHT,
+ NL80211_ATTR_STA_TX_POWER_SETTING,
+ NL80211_ATTR_STA_TX_POWER,
+ NL80211_ATTR_SAE_PASSWORD,
+ NL80211_ATTR_TWT_RESPONDER,
+ NL80211_ATTR_HE_OBSS_PD,
+ NL80211_ATTR_WIPHY_EDMG_CHANNELS,
+ NL80211_ATTR_WIPHY_EDMG_BW_CONFIG,
+ NL80211_ATTR_VLAN_ID,
+ __NL80211_ATTR_AFTER_LAST,
+ NUM_NL80211_ATTR = __NL80211_ATTR_AFTER_LAST,
+ NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
+};
+#define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION
+#define NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
+#define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
+#define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
+#define NL80211_CMD_CONNECT NL80211_CMD_CONNECT
+#define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY
+#define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES
+#define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS
+#define NL80211_ATTR_WIPHY_FREQ NL80211_ATTR_WIPHY_FREQ
+#define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE
+#define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE
+#define NL80211_ATTR_IE NL80211_ATTR_IE
+#define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR
+#define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE
+#define NL80211_ATTR_FRAME NL80211_ATTR_FRAME
+#define NL80211_ATTR_SSID NL80211_ATTR_SSID
+#define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE
+#define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE
+#define NL80211_ATTR_CIPHER_SUITES_PAIRWISE NL80211_ATTR_CIPHER_SUITES_PAIRWISE
+#define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP
+#define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS
+#define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES
+#define NL80211_ATTR_KEY NL80211_ATTR_KEY
+#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS
+#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
+#define NL80211_WIPHY_NAME_MAXLEN 64
+#define NL80211_MAX_SUPP_RATES 32
+#define NL80211_MAX_SUPP_HT_RATES 77
+#define NL80211_MAX_SUPP_REG_RULES 128
+#define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0
+#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
+#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
+#define NL80211_HT_CAPABILITY_LEN 26
+#define NL80211_VHT_CAPABILITY_LEN 12
+#define NL80211_HE_MIN_CAPABILITY_LEN 16
+#define NL80211_HE_MAX_CAPABILITY_LEN 54
+#define NL80211_MAX_NR_CIPHER_SUITES 5
+#define NL80211_MAX_NR_AKM_SUITES 2
+#define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10
+#define NL80211_SCAN_RSSI_THOLD_OFF - 300
+#define NL80211_CQM_TXE_MAX_INTVL 1800
+enum nl80211_iftype {
+ NL80211_IFTYPE_UNSPECIFIED,
+ NL80211_IFTYPE_ADHOC,
+ NL80211_IFTYPE_STATION,
+ NL80211_IFTYPE_AP,
+ NL80211_IFTYPE_AP_VLAN,
+ NL80211_IFTYPE_WDS,
+ NL80211_IFTYPE_MONITOR,
+ NL80211_IFTYPE_MESH_POINT,
+ NL80211_IFTYPE_P2P_CLIENT,
+ NL80211_IFTYPE_P2P_GO,
+ NL80211_IFTYPE_P2P_DEVICE,
+ NL80211_IFTYPE_OCB,
+ NL80211_IFTYPE_NAN,
+ NUM_NL80211_IFTYPES,
+ NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
+};
+enum nl80211_sta_flags {
+ __NL80211_STA_FLAG_INVALID,
+ NL80211_STA_FLAG_AUTHORIZED,
+ NL80211_STA_FLAG_SHORT_PREAMBLE,
+ NL80211_STA_FLAG_WME,
+ NL80211_STA_FLAG_MFP,
+ NL80211_STA_FLAG_AUTHENTICATED,
+ NL80211_STA_FLAG_TDLS_PEER,
+ NL80211_STA_FLAG_ASSOCIATED,
+ __NL80211_STA_FLAG_AFTER_LAST,
+ NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1
+};
+enum nl80211_sta_p2p_ps_status {
+ NL80211_P2P_PS_UNSUPPORTED = 0,
+ NL80211_P2P_PS_SUPPORTED,
+ NUM_NL80211_P2P_PS_STATUS,
+};
+#define NL80211_STA_FLAG_MAX_OLD_API NL80211_STA_FLAG_TDLS_PEER
+struct nl80211_sta_flag_update {
+ __u32 mask;
+ __u32 set;
+} __attribute__((packed));
+enum nl80211_he_gi {
+ NL80211_RATE_INFO_HE_GI_0_8,
+ NL80211_RATE_INFO_HE_GI_1_6,
+ NL80211_RATE_INFO_HE_GI_3_2,
+};
+enum nl80211_he_ru_alloc {
+ NL80211_RATE_INFO_HE_RU_ALLOC_26,
+ NL80211_RATE_INFO_HE_RU_ALLOC_52,
+ NL80211_RATE_INFO_HE_RU_ALLOC_106,
+ NL80211_RATE_INFO_HE_RU_ALLOC_242,
+ NL80211_RATE_INFO_HE_RU_ALLOC_484,
+ NL80211_RATE_INFO_HE_RU_ALLOC_996,
+ NL80211_RATE_INFO_HE_RU_ALLOC_2x996,
+};
+enum nl80211_rate_info {
+ __NL80211_RATE_INFO_INVALID,
+ NL80211_RATE_INFO_BITRATE,
+ NL80211_RATE_INFO_MCS,
+ NL80211_RATE_INFO_40_MHZ_WIDTH,
+ NL80211_RATE_INFO_SHORT_GI,
+ NL80211_RATE_INFO_BITRATE32,
+ NL80211_RATE_INFO_VHT_MCS,
+ NL80211_RATE_INFO_VHT_NSS,
+ NL80211_RATE_INFO_80_MHZ_WIDTH,
+ NL80211_RATE_INFO_80P80_MHZ_WIDTH,
+ NL80211_RATE_INFO_160_MHZ_WIDTH,
+ NL80211_RATE_INFO_10_MHZ_WIDTH,
+ NL80211_RATE_INFO_5_MHZ_WIDTH,
+ NL80211_RATE_INFO_HE_MCS,
+ NL80211_RATE_INFO_HE_NSS,
+ NL80211_RATE_INFO_HE_GI,
+ NL80211_RATE_INFO_HE_DCM,
+ NL80211_RATE_INFO_HE_RU_ALLOC,
+ __NL80211_RATE_INFO_AFTER_LAST,
+ NL80211_RATE_INFO_MAX = __NL80211_RATE_INFO_AFTER_LAST - 1
+};
+enum nl80211_sta_bss_param {
+ __NL80211_STA_BSS_PARAM_INVALID,
+ NL80211_STA_BSS_PARAM_CTS_PROT,
+ NL80211_STA_BSS_PARAM_SHORT_PREAMBLE,
+ NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME,
+ NL80211_STA_BSS_PARAM_DTIM_PERIOD,
+ NL80211_STA_BSS_PARAM_BEACON_INTERVAL,
+ __NL80211_STA_BSS_PARAM_AFTER_LAST,
+ NL80211_STA_BSS_PARAM_MAX = __NL80211_STA_BSS_PARAM_AFTER_LAST - 1
+};
+enum nl80211_sta_info {
+ __NL80211_STA_INFO_INVALID,
+ NL80211_STA_INFO_INACTIVE_TIME,
+ NL80211_STA_INFO_RX_BYTES,
+ NL80211_STA_INFO_TX_BYTES,
+ NL80211_STA_INFO_LLID,
+ NL80211_STA_INFO_PLID,
+ NL80211_STA_INFO_PLINK_STATE,
+ NL80211_STA_INFO_SIGNAL,
+ NL80211_STA_INFO_TX_BITRATE,
+ NL80211_STA_INFO_RX_PACKETS,
+ NL80211_STA_INFO_TX_PACKETS,
+ NL80211_STA_INFO_TX_RETRIES,
+ NL80211_STA_INFO_TX_FAILED,
+ NL80211_STA_INFO_SIGNAL_AVG,
+ NL80211_STA_INFO_RX_BITRATE,
+ NL80211_STA_INFO_BSS_PARAM,
+ NL80211_STA_INFO_CONNECTED_TIME,
+ NL80211_STA_INFO_STA_FLAGS,
+ NL80211_STA_INFO_BEACON_LOSS,
+ NL80211_STA_INFO_T_OFFSET,
+ NL80211_STA_INFO_LOCAL_PM,
+ NL80211_STA_INFO_PEER_PM,
+ NL80211_STA_INFO_NONPEER_PM,
+ NL80211_STA_INFO_RX_BYTES64,
+ NL80211_STA_INFO_TX_BYTES64,
+ NL80211_STA_INFO_CHAIN_SIGNAL,
+ NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
+ NL80211_STA_INFO_EXPECTED_THROUGHPUT,
+ NL80211_STA_INFO_RX_DROP_MISC,
+ NL80211_STA_INFO_BEACON_RX,
+ NL80211_STA_INFO_BEACON_SIGNAL_AVG,
+ NL80211_STA_INFO_TID_STATS,
+ NL80211_STA_INFO_RX_DURATION,
+ NL80211_STA_INFO_PAD,
+ NL80211_STA_INFO_ACK_SIGNAL,
+ NL80211_STA_INFO_ACK_SIGNAL_AVG,
+ NL80211_STA_INFO_RX_MPDUS,
+ NL80211_STA_INFO_FCS_ERROR_COUNT,
+ NL80211_STA_INFO_CONNECTED_TO_GATE,
+ NL80211_STA_INFO_TX_DURATION,
+ NL80211_STA_INFO_AIRTIME_WEIGHT,
+ NL80211_STA_INFO_AIRTIME_LINK_METRIC,
+ NL80211_STA_INFO_ASSOC_AT_BOOTTIME,
+ __NL80211_STA_INFO_AFTER_LAST,
+ NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1
+};
+#define NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG NL80211_STA_INFO_ACK_SIGNAL_AVG
+enum nl80211_tid_stats {
+ __NL80211_TID_STATS_INVALID,
+ NL80211_TID_STATS_RX_MSDU,
+ NL80211_TID_STATS_TX_MSDU,
+ NL80211_TID_STATS_TX_MSDU_RETRIES,
+ NL80211_TID_STATS_TX_MSDU_FAILED,
+ NL80211_TID_STATS_PAD,
+ NL80211_TID_STATS_TXQ_STATS,
+ NUM_NL80211_TID_STATS,
+ NL80211_TID_STATS_MAX = NUM_NL80211_TID_STATS - 1
+};
+enum nl80211_txq_stats {
+ __NL80211_TXQ_STATS_INVALID,
+ NL80211_TXQ_STATS_BACKLOG_BYTES,
+ NL80211_TXQ_STATS_BACKLOG_PACKETS,
+ NL80211_TXQ_STATS_FLOWS,
+ NL80211_TXQ_STATS_DROPS,
+ NL80211_TXQ_STATS_ECN_MARKS,
+ NL80211_TXQ_STATS_OVERLIMIT,
+ NL80211_TXQ_STATS_OVERMEMORY,
+ NL80211_TXQ_STATS_COLLISIONS,
+ NL80211_TXQ_STATS_TX_BYTES,
+ NL80211_TXQ_STATS_TX_PACKETS,
+ NL80211_TXQ_STATS_MAX_FLOWS,
+ NUM_NL80211_TXQ_STATS,
+ NL80211_TXQ_STATS_MAX = NUM_NL80211_TXQ_STATS - 1
+};
+enum nl80211_mpath_flags {
+ NL80211_MPATH_FLAG_ACTIVE = 1 << 0,
+ NL80211_MPATH_FLAG_RESOLVING = 1 << 1,
+ NL80211_MPATH_FLAG_SN_VALID = 1 << 2,
+ NL80211_MPATH_FLAG_FIXED = 1 << 3,
+ NL80211_MPATH_FLAG_RESOLVED = 1 << 4,
+};
+enum nl80211_mpath_info {
+ __NL80211_MPATH_INFO_INVALID,
+ NL80211_MPATH_INFO_FRAME_QLEN,
+ NL80211_MPATH_INFO_SN,
+ NL80211_MPATH_INFO_METRIC,
+ NL80211_MPATH_INFO_EXPTIME,
+ NL80211_MPATH_INFO_FLAGS,
+ NL80211_MPATH_INFO_DISCOVERY_TIMEOUT,
+ NL80211_MPATH_INFO_DISCOVERY_RETRIES,
+ NL80211_MPATH_INFO_HOP_COUNT,
+ NL80211_MPATH_INFO_PATH_CHANGE,
+ __NL80211_MPATH_INFO_AFTER_LAST,
+ NL80211_MPATH_INFO_MAX = __NL80211_MPATH_INFO_AFTER_LAST - 1
+};
+enum nl80211_band_iftype_attr {
+ __NL80211_BAND_IFTYPE_ATTR_INVALID,
+ NL80211_BAND_IFTYPE_ATTR_IFTYPES,
+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC,
+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
+ __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
+ NL80211_BAND_IFTYPE_ATTR_MAX = __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST - 1
+};
+enum nl80211_band_attr {
+ __NL80211_BAND_ATTR_INVALID,
+ NL80211_BAND_ATTR_FREQS,
+ NL80211_BAND_ATTR_RATES,
+ NL80211_BAND_ATTR_HT_MCS_SET,
+ NL80211_BAND_ATTR_HT_CAPA,
+ NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
+ NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
+ NL80211_BAND_ATTR_VHT_MCS_SET,
+ NL80211_BAND_ATTR_VHT_CAPA,
+ NL80211_BAND_ATTR_IFTYPE_DATA,
+ NL80211_BAND_ATTR_EDMG_CHANNELS,
+ NL80211_BAND_ATTR_EDMG_BW_CONFIG,
+ __NL80211_BAND_ATTR_AFTER_LAST,
+ NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
+};
+#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
+enum nl80211_wmm_rule {
+ __NL80211_WMMR_INVALID,
+ NL80211_WMMR_CW_MIN,
+ NL80211_WMMR_CW_MAX,
+ NL80211_WMMR_AIFSN,
+ NL80211_WMMR_TXOP,
+ __NL80211_WMMR_LAST,
+ NL80211_WMMR_MAX = __NL80211_WMMR_LAST - 1
+};
+enum nl80211_frequency_attr {
+ __NL80211_FREQUENCY_ATTR_INVALID,
+ NL80211_FREQUENCY_ATTR_FREQ,
+ NL80211_FREQUENCY_ATTR_DISABLED,
+ NL80211_FREQUENCY_ATTR_NO_IR,
+ __NL80211_FREQUENCY_ATTR_NO_IBSS,
+ NL80211_FREQUENCY_ATTR_RADAR,
+ NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
+ NL80211_FREQUENCY_ATTR_DFS_STATE,
+ NL80211_FREQUENCY_ATTR_DFS_TIME,
+ NL80211_FREQUENCY_ATTR_NO_HT40_MINUS,
+ NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
+ NL80211_FREQUENCY_ATTR_NO_80MHZ,
+ NL80211_FREQUENCY_ATTR_NO_160MHZ,
+ NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
+ NL80211_FREQUENCY_ATTR_INDOOR_ONLY,
+ NL80211_FREQUENCY_ATTR_IR_CONCURRENT,
+ NL80211_FREQUENCY_ATTR_NO_20MHZ,
+ NL80211_FREQUENCY_ATTR_NO_10MHZ,
+ NL80211_FREQUENCY_ATTR_WMM,
+ __NL80211_FREQUENCY_ATTR_AFTER_LAST,
+ NL80211_FREQUENCY_ATTR_MAX = __NL80211_FREQUENCY_ATTR_AFTER_LAST - 1
+};
+#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER
+#define NL80211_FREQUENCY_ATTR_PASSIVE_SCAN NL80211_FREQUENCY_ATTR_NO_IR
+#define NL80211_FREQUENCY_ATTR_NO_IBSS NL80211_FREQUENCY_ATTR_NO_IR
+#define NL80211_FREQUENCY_ATTR_NO_IR NL80211_FREQUENCY_ATTR_NO_IR
+#define NL80211_FREQUENCY_ATTR_GO_CONCURRENT NL80211_FREQUENCY_ATTR_IR_CONCURRENT
+enum nl80211_bitrate_attr {
+ __NL80211_BITRATE_ATTR_INVALID,
+ NL80211_BITRATE_ATTR_RATE,
+ NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE,
+ __NL80211_BITRATE_ATTR_AFTER_LAST,
+ NL80211_BITRATE_ATTR_MAX = __NL80211_BITRATE_ATTR_AFTER_LAST - 1
+};
+enum nl80211_reg_initiator {
+ NL80211_REGDOM_SET_BY_CORE,
+ NL80211_REGDOM_SET_BY_USER,
+ NL80211_REGDOM_SET_BY_DRIVER,
+ NL80211_REGDOM_SET_BY_COUNTRY_IE,
+};
+enum nl80211_reg_type {
+ NL80211_REGDOM_TYPE_COUNTRY,
+ NL80211_REGDOM_TYPE_WORLD,
+ NL80211_REGDOM_TYPE_CUSTOM_WORLD,
+ NL80211_REGDOM_TYPE_INTERSECTION,
+};
+enum nl80211_reg_rule_attr {
+ __NL80211_REG_RULE_ATTR_INVALID,
+ NL80211_ATTR_REG_RULE_FLAGS,
+ NL80211_ATTR_FREQ_RANGE_START,
+ NL80211_ATTR_FREQ_RANGE_END,
+ NL80211_ATTR_FREQ_RANGE_MAX_BW,
+ NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN,
+ NL80211_ATTR_POWER_RULE_MAX_EIRP,
+ NL80211_ATTR_DFS_CAC_TIME,
+ __NL80211_REG_RULE_ATTR_AFTER_LAST,
+ NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1
+};
+enum nl80211_sched_scan_match_attr {
+ __NL80211_SCHED_SCAN_MATCH_ATTR_INVALID,
+ NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
+ NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,
+ NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI,
+ NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST,
+ NL80211_SCHED_SCAN_MATCH_ATTR_BSSID,
+ NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI,
+ __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
+ NL80211_SCHED_SCAN_MATCH_ATTR_MAX = __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1
+};
+#define NL80211_ATTR_SCHED_SCAN_MATCH_SSID NL80211_SCHED_SCAN_MATCH_ATTR_SSID
+enum nl80211_reg_rule_flags {
+ NL80211_RRF_NO_OFDM = 1 << 0,
+ NL80211_RRF_NO_CCK = 1 << 1,
+ NL80211_RRF_NO_INDOOR = 1 << 2,
+ NL80211_RRF_NO_OUTDOOR = 1 << 3,
+ NL80211_RRF_DFS = 1 << 4,
+ NL80211_RRF_PTP_ONLY = 1 << 5,
+ NL80211_RRF_PTMP_ONLY = 1 << 6,
+ NL80211_RRF_NO_IR = 1 << 7,
+ __NL80211_RRF_NO_IBSS = 1 << 8,
+ NL80211_RRF_AUTO_BW = 1 << 11,
+ NL80211_RRF_IR_CONCURRENT = 1 << 12,
+ NL80211_RRF_NO_HT40MINUS = 1 << 13,
+ NL80211_RRF_NO_HT40PLUS = 1 << 14,
+ NL80211_RRF_NO_80MHZ = 1 << 15,
+ NL80211_RRF_NO_160MHZ = 1 << 16,
+};
+#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
+#define NL80211_RRF_NO_IBSS NL80211_RRF_NO_IR
+#define NL80211_RRF_NO_IR NL80211_RRF_NO_IR
+#define NL80211_RRF_NO_HT40 (NL80211_RRF_NO_HT40MINUS | NL80211_RRF_NO_HT40PLUS)
+#define NL80211_RRF_GO_CONCURRENT NL80211_RRF_IR_CONCURRENT
+#define NL80211_RRF_NO_IR_ALL (NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS)
+enum nl80211_dfs_regions {
+ NL80211_DFS_UNSET = 0,
+ NL80211_DFS_FCC = 1,
+ NL80211_DFS_ETSI = 2,
+ NL80211_DFS_JP = 3,
+};
+enum nl80211_user_reg_hint_type {
+ NL80211_USER_REG_HINT_USER = 0,
+ NL80211_USER_REG_HINT_CELL_BASE = 1,
+ NL80211_USER_REG_HINT_INDOOR = 2,
+};
+enum nl80211_survey_info {
+ __NL80211_SURVEY_INFO_INVALID,
+ NL80211_SURVEY_INFO_FREQUENCY,
+ NL80211_SURVEY_INFO_NOISE,
+ NL80211_SURVEY_INFO_IN_USE,
+ NL80211_SURVEY_INFO_TIME,
+ NL80211_SURVEY_INFO_TIME_BUSY,
+ NL80211_SURVEY_INFO_TIME_EXT_BUSY,
+ NL80211_SURVEY_INFO_TIME_RX,
+ NL80211_SURVEY_INFO_TIME_TX,
+ NL80211_SURVEY_INFO_TIME_SCAN,
+ NL80211_SURVEY_INFO_PAD,
+ NL80211_SURVEY_INFO_TIME_BSS_RX,
+ __NL80211_SURVEY_INFO_AFTER_LAST,
+ NL80211_SURVEY_INFO_MAX = __NL80211_SURVEY_INFO_AFTER_LAST - 1
+};
+#define NL80211_SURVEY_INFO_CHANNEL_TIME NL80211_SURVEY_INFO_TIME
+#define NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY NL80211_SURVEY_INFO_TIME_BUSY
+#define NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY NL80211_SURVEY_INFO_TIME_EXT_BUSY
+#define NL80211_SURVEY_INFO_CHANNEL_TIME_RX NL80211_SURVEY_INFO_TIME_RX
+#define NL80211_SURVEY_INFO_CHANNEL_TIME_TX NL80211_SURVEY_INFO_TIME_TX
+enum nl80211_mntr_flags {
+ __NL80211_MNTR_FLAG_INVALID,
+ NL80211_MNTR_FLAG_FCSFAIL,
+ NL80211_MNTR_FLAG_PLCPFAIL,
+ NL80211_MNTR_FLAG_CONTROL,
+ NL80211_MNTR_FLAG_OTHER_BSS,
+ NL80211_MNTR_FLAG_COOK_FRAMES,
+ NL80211_MNTR_FLAG_ACTIVE,
+ __NL80211_MNTR_FLAG_AFTER_LAST,
+ NL80211_MNTR_FLAG_MAX = __NL80211_MNTR_FLAG_AFTER_LAST - 1
+};
+enum nl80211_mesh_power_mode {
+ NL80211_MESH_POWER_UNKNOWN,
+ NL80211_MESH_POWER_ACTIVE,
+ NL80211_MESH_POWER_LIGHT_SLEEP,
+ NL80211_MESH_POWER_DEEP_SLEEP,
+ __NL80211_MESH_POWER_AFTER_LAST,
+ NL80211_MESH_POWER_MAX = __NL80211_MESH_POWER_AFTER_LAST - 1
+};
+enum nl80211_meshconf_params {
+ __NL80211_MESHCONF_INVALID,
+ NL80211_MESHCONF_RETRY_TIMEOUT,
+ NL80211_MESHCONF_CONFIRM_TIMEOUT,
+ NL80211_MESHCONF_HOLDING_TIMEOUT,
+ NL80211_MESHCONF_MAX_PEER_LINKS,
+ NL80211_MESHCONF_MAX_RETRIES,
+ NL80211_MESHCONF_TTL,
+ NL80211_MESHCONF_AUTO_OPEN_PLINKS,
+ NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES,
+ NL80211_MESHCONF_PATH_REFRESH_TIME,
+ NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
+ NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
+ NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
+ NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
+ NL80211_MESHCONF_HWMP_ROOTMODE,
+ NL80211_MESHCONF_ELEMENT_TTL,
+ NL80211_MESHCONF_HWMP_RANN_INTERVAL,
+ NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
+ NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
+ NL80211_MESHCONF_FORWARDING,
+ NL80211_MESHCONF_RSSI_THRESHOLD,
+ NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR,
+ NL80211_MESHCONF_HT_OPMODE,
+ NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
+ NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
+ NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
+ NL80211_MESHCONF_POWER_MODE,
+ NL80211_MESHCONF_AWAKE_WINDOW,
+ NL80211_MESHCONF_PLINK_TIMEOUT,
+ NL80211_MESHCONF_CONNECTED_TO_GATE,
+ __NL80211_MESHCONF_ATTR_AFTER_LAST,
+ NL80211_MESHCONF_ATTR_MAX = __NL80211_MESHCONF_ATTR_AFTER_LAST - 1
+};
+enum nl80211_mesh_setup_params {
+ __NL80211_MESH_SETUP_INVALID,
+ NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL,
+ NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC,
+ NL80211_MESH_SETUP_IE,
+ NL80211_MESH_SETUP_USERSPACE_AUTH,
+ NL80211_MESH_SETUP_USERSPACE_AMPE,
+ NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
+ NL80211_MESH_SETUP_USERSPACE_MPM,
+ NL80211_MESH_SETUP_AUTH_PROTOCOL,
+ __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
+ NL80211_MESH_SETUP_ATTR_MAX = __NL80211_MESH_SETUP_ATTR_AFTER_LAST - 1
+};
+enum nl80211_txq_attr {
+ __NL80211_TXQ_ATTR_INVALID,
+ NL80211_TXQ_ATTR_AC,
+ NL80211_TXQ_ATTR_TXOP,
+ NL80211_TXQ_ATTR_CWMIN,
+ NL80211_TXQ_ATTR_CWMAX,
+ NL80211_TXQ_ATTR_AIFS,
+ __NL80211_TXQ_ATTR_AFTER_LAST,
+ NL80211_TXQ_ATTR_MAX = __NL80211_TXQ_ATTR_AFTER_LAST - 1
+};
+enum nl80211_ac {
+ NL80211_AC_VO,
+ NL80211_AC_VI,
+ NL80211_AC_BE,
+ NL80211_AC_BK,
+ NL80211_NUM_ACS
+};
+#define NL80211_TXQ_ATTR_QUEUE NL80211_TXQ_ATTR_AC
+#define NL80211_TXQ_Q_VO NL80211_AC_VO
+#define NL80211_TXQ_Q_VI NL80211_AC_VI
+#define NL80211_TXQ_Q_BE NL80211_AC_BE
+#define NL80211_TXQ_Q_BK NL80211_AC_BK
+enum nl80211_channel_type {
+ NL80211_CHAN_NO_HT,
+ NL80211_CHAN_HT20,
+ NL80211_CHAN_HT40MINUS,
+ NL80211_CHAN_HT40PLUS
+};
+enum nl80211_key_mode {
+ NL80211_KEY_RX_TX,
+ NL80211_KEY_NO_TX,
+ NL80211_KEY_SET_TX
+};
+enum nl80211_chan_width {
+ NL80211_CHAN_WIDTH_20_NOHT,
+ NL80211_CHAN_WIDTH_20,
+ NL80211_CHAN_WIDTH_40,
+ NL80211_CHAN_WIDTH_80,
+ NL80211_CHAN_WIDTH_80P80,
+ NL80211_CHAN_WIDTH_160,
+ NL80211_CHAN_WIDTH_5,
+ NL80211_CHAN_WIDTH_10,
+};
+enum nl80211_bss_scan_width {
+ NL80211_BSS_CHAN_WIDTH_20,
+ NL80211_BSS_CHAN_WIDTH_10,
+ NL80211_BSS_CHAN_WIDTH_5,
+};
+enum nl80211_bss {
+ __NL80211_BSS_INVALID,
+ NL80211_BSS_BSSID,
+ NL80211_BSS_FREQUENCY,
+ NL80211_BSS_TSF,
+ NL80211_BSS_BEACON_INTERVAL,
+ NL80211_BSS_CAPABILITY,
+ NL80211_BSS_INFORMATION_ELEMENTS,
+ NL80211_BSS_SIGNAL_MBM,
+ NL80211_BSS_SIGNAL_UNSPEC,
+ NL80211_BSS_STATUS,
+ NL80211_BSS_SEEN_MS_AGO,
+ NL80211_BSS_BEACON_IES,
+ NL80211_BSS_CHAN_WIDTH,
+ NL80211_BSS_BEACON_TSF,
+ NL80211_BSS_PRESP_DATA,
+ NL80211_BSS_LAST_SEEN_BOOTTIME,
+ NL80211_BSS_PAD,
+ NL80211_BSS_PARENT_TSF,
+ NL80211_BSS_PARENT_BSSID,
+ NL80211_BSS_CHAIN_SIGNAL,
+ __NL80211_BSS_AFTER_LAST,
+ NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1
+};
+enum nl80211_bss_status {
+ NL80211_BSS_STATUS_AUTHENTICATED,
+ NL80211_BSS_STATUS_ASSOCIATED,
+ NL80211_BSS_STATUS_IBSS_JOINED,
+};
+enum nl80211_auth_type {
+ NL80211_AUTHTYPE_OPEN_SYSTEM,
+ NL80211_AUTHTYPE_SHARED_KEY,
+ NL80211_AUTHTYPE_FT,
+ NL80211_AUTHTYPE_NETWORK_EAP,
+ NL80211_AUTHTYPE_SAE,
+ NL80211_AUTHTYPE_FILS_SK,
+ NL80211_AUTHTYPE_FILS_SK_PFS,
+ NL80211_AUTHTYPE_FILS_PK,
+ __NL80211_AUTHTYPE_NUM,
+ NL80211_AUTHTYPE_MAX = __NL80211_AUTHTYPE_NUM - 1,
+ NL80211_AUTHTYPE_AUTOMATIC
+};
+enum nl80211_key_type {
+ NL80211_KEYTYPE_GROUP,
+ NL80211_KEYTYPE_PAIRWISE,
+ NL80211_KEYTYPE_PEERKEY,
+ NUM_NL80211_KEYTYPES
+};
+enum nl80211_mfp {
+ NL80211_MFP_NO,
+ NL80211_MFP_REQUIRED,
+ NL80211_MFP_OPTIONAL,
+};
+enum nl80211_wpa_versions {
+ NL80211_WPA_VERSION_1 = 1 << 0,
+ NL80211_WPA_VERSION_2 = 1 << 1,
+ NL80211_WPA_VERSION_3 = 1 << 2,
+};
+enum nl80211_key_default_types {
+ __NL80211_KEY_DEFAULT_TYPE_INVALID,
+ NL80211_KEY_DEFAULT_TYPE_UNICAST,
+ NL80211_KEY_DEFAULT_TYPE_MULTICAST,
+ NUM_NL80211_KEY_DEFAULT_TYPES
+};
+enum nl80211_key_attributes {
+ __NL80211_KEY_INVALID,
+ NL80211_KEY_DATA,
+ NL80211_KEY_IDX,
+ NL80211_KEY_CIPHER,
+ NL80211_KEY_SEQ,
+ NL80211_KEY_DEFAULT,
+ NL80211_KEY_DEFAULT_MGMT,
+ NL80211_KEY_TYPE,
+ NL80211_KEY_DEFAULT_TYPES,
+ NL80211_KEY_MODE,
+ __NL80211_KEY_AFTER_LAST,
+ NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1
+};
+enum nl80211_tx_rate_attributes {
+ __NL80211_TXRATE_INVALID,
+ NL80211_TXRATE_LEGACY,
+ NL80211_TXRATE_HT,
+ NL80211_TXRATE_VHT,
+ NL80211_TXRATE_GI,
+ __NL80211_TXRATE_AFTER_LAST,
+ NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1
+};
+#define NL80211_TXRATE_MCS NL80211_TXRATE_HT
+#define NL80211_VHT_NSS_MAX 8
+struct nl80211_txrate_vht {
+ __u16 mcs[NL80211_VHT_NSS_MAX];
+};
+enum nl80211_txrate_gi {
+ NL80211_TXRATE_DEFAULT_GI,
+ NL80211_TXRATE_FORCE_SGI,
+ NL80211_TXRATE_FORCE_LGI,
+};
+enum nl80211_band {
+ NL80211_BAND_2GHZ,
+ NL80211_BAND_5GHZ,
+ NL80211_BAND_60GHZ,
+ NL80211_BAND_6GHZ,
+ NUM_NL80211_BANDS,
+};
+enum nl80211_ps_state {
+ NL80211_PS_DISABLED,
+ NL80211_PS_ENABLED,
+};
+enum nl80211_attr_cqm {
+ __NL80211_ATTR_CQM_INVALID,
+ NL80211_ATTR_CQM_RSSI_THOLD,
+ NL80211_ATTR_CQM_RSSI_HYST,
+ NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT,
+ NL80211_ATTR_CQM_PKT_LOSS_EVENT,
+ NL80211_ATTR_CQM_TXE_RATE,
+ NL80211_ATTR_CQM_TXE_PKTS,
+ NL80211_ATTR_CQM_TXE_INTVL,
+ NL80211_ATTR_CQM_BEACON_LOSS_EVENT,
+ NL80211_ATTR_CQM_RSSI_LEVEL,
+ __NL80211_ATTR_CQM_AFTER_LAST,
+ NL80211_ATTR_CQM_MAX = __NL80211_ATTR_CQM_AFTER_LAST - 1
+};
+enum nl80211_cqm_rssi_threshold_event {
+ NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
+ NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
+ NL80211_CQM_RSSI_BEACON_LOSS_EVENT,
+};
+enum nl80211_tx_power_setting {
+ NL80211_TX_POWER_AUTOMATIC,
+ NL80211_TX_POWER_LIMITED,
+ NL80211_TX_POWER_FIXED,
+};
+enum nl80211_packet_pattern_attr {
+ __NL80211_PKTPAT_INVALID,
+ NL80211_PKTPAT_MASK,
+ NL80211_PKTPAT_PATTERN,
+ NL80211_PKTPAT_OFFSET,
+ NUM_NL80211_PKTPAT,
+ MAX_NL80211_PKTPAT = NUM_NL80211_PKTPAT - 1,
+};
+struct nl80211_pattern_support {
+ __u32 max_patterns;
+ __u32 min_pattern_len;
+ __u32 max_pattern_len;
+ __u32 max_pkt_offset;
+} __attribute__((packed));
+#define __NL80211_WOWLAN_PKTPAT_INVALID __NL80211_PKTPAT_INVALID
+#define NL80211_WOWLAN_PKTPAT_MASK NL80211_PKTPAT_MASK
+#define NL80211_WOWLAN_PKTPAT_PATTERN NL80211_PKTPAT_PATTERN
+#define NL80211_WOWLAN_PKTPAT_OFFSET NL80211_PKTPAT_OFFSET
+#define NUM_NL80211_WOWLAN_PKTPAT NUM_NL80211_PKTPAT
+#define MAX_NL80211_WOWLAN_PKTPAT MAX_NL80211_PKTPAT
+#define nl80211_wowlan_pattern_support nl80211_pattern_support
+enum nl80211_wowlan_triggers {
+ __NL80211_WOWLAN_TRIG_INVALID,
+ NL80211_WOWLAN_TRIG_ANY,
+ NL80211_WOWLAN_TRIG_DISCONNECT,
+ NL80211_WOWLAN_TRIG_MAGIC_PKT,
+ NL80211_WOWLAN_TRIG_PKT_PATTERN,
+ NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED,
+ NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE,
+ NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST,
+ NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE,
+ NL80211_WOWLAN_TRIG_RFKILL_RELEASE,
+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211,
+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN,
+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023,
+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN,
+ NL80211_WOWLAN_TRIG_TCP_CONNECTION,
+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH,
+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST,
+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS,
+ NL80211_WOWLAN_TRIG_NET_DETECT,
+ NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS,
+ NUM_NL80211_WOWLAN_TRIG,
+ MAX_NL80211_WOWLAN_TRIG = NUM_NL80211_WOWLAN_TRIG - 1
+};
+struct nl80211_wowlan_tcp_data_seq {
+ __u32 start, offset, len;
+};
+struct nl80211_wowlan_tcp_data_token {
+ __u32 offset, len;
+ __u8 token_stream[];
+};
+struct nl80211_wowlan_tcp_data_token_feature {
+ __u32 min_len, max_len, bufsize;
+};
+enum nl80211_wowlan_tcp_attrs {
+ __NL80211_WOWLAN_TCP_INVALID,
+ NL80211_WOWLAN_TCP_SRC_IPV4,
+ NL80211_WOWLAN_TCP_DST_IPV4,
+ NL80211_WOWLAN_TCP_DST_MAC,
+ NL80211_WOWLAN_TCP_SRC_PORT,
+ NL80211_WOWLAN_TCP_DST_PORT,
+ NL80211_WOWLAN_TCP_DATA_PAYLOAD,
+ NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ,
+ NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN,
+ NL80211_WOWLAN_TCP_DATA_INTERVAL,
+ NL80211_WOWLAN_TCP_WAKE_PAYLOAD,
+ NL80211_WOWLAN_TCP_WAKE_MASK,
+ NUM_NL80211_WOWLAN_TCP,
+ MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1
+};
+struct nl80211_coalesce_rule_support {
+ __u32 max_rules;
+ struct nl80211_pattern_support pat;
+ __u32 max_delay;
+} __attribute__((packed));
+enum nl80211_attr_coalesce_rule {
+ __NL80211_COALESCE_RULE_INVALID,
+ NL80211_ATTR_COALESCE_RULE_DELAY,
+ NL80211_ATTR_COALESCE_RULE_CONDITION,
+ NL80211_ATTR_COALESCE_RULE_PKT_PATTERN,
+ NUM_NL80211_ATTR_COALESCE_RULE,
+ NL80211_ATTR_COALESCE_RULE_MAX = NUM_NL80211_ATTR_COALESCE_RULE - 1
+};
+enum nl80211_coalesce_condition {
+ NL80211_COALESCE_CONDITION_MATCH,
+ NL80211_COALESCE_CONDITION_NO_MATCH
+};
+enum nl80211_iface_limit_attrs {
+ NL80211_IFACE_LIMIT_UNSPEC,
+ NL80211_IFACE_LIMIT_MAX,
+ NL80211_IFACE_LIMIT_TYPES,
+ NUM_NL80211_IFACE_LIMIT,
+ MAX_NL80211_IFACE_LIMIT = NUM_NL80211_IFACE_LIMIT - 1
+};
+enum nl80211_if_combination_attrs {
+ NL80211_IFACE_COMB_UNSPEC,
+ NL80211_IFACE_COMB_LIMITS,
+ NL80211_IFACE_COMB_MAXNUM,
+ NL80211_IFACE_COMB_STA_AP_BI_MATCH,
+ NL80211_IFACE_COMB_NUM_CHANNELS,
+ NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
+ NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
+ NL80211_IFACE_COMB_BI_MIN_GCD,
+ NUM_NL80211_IFACE_COMB,
+ MAX_NL80211_IFACE_COMB = NUM_NL80211_IFACE_COMB - 1
+};
+enum nl80211_plink_state {
+ NL80211_PLINK_LISTEN,
+ NL80211_PLINK_OPN_SNT,
+ NL80211_PLINK_OPN_RCVD,
+ NL80211_PLINK_CNF_RCVD,
+ NL80211_PLINK_ESTAB,
+ NL80211_PLINK_HOLDING,
+ NL80211_PLINK_BLOCKED,
+ NUM_NL80211_PLINK_STATES,
+ MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1
+};
+enum plink_actions {
+ NL80211_PLINK_ACTION_NO_ACTION,
+ NL80211_PLINK_ACTION_OPEN,
+ NL80211_PLINK_ACTION_BLOCK,
+ NUM_NL80211_PLINK_ACTIONS,
+};
+#define NL80211_KCK_LEN 16
+#define NL80211_KEK_LEN 16
+#define NL80211_REPLAY_CTR_LEN 8
+enum nl80211_rekey_data {
+ __NL80211_REKEY_DATA_INVALID,
+ NL80211_REKEY_DATA_KEK,
+ NL80211_REKEY_DATA_KCK,
+ NL80211_REKEY_DATA_REPLAY_CTR,
+ NUM_NL80211_REKEY_DATA,
+ MAX_NL80211_REKEY_DATA = NUM_NL80211_REKEY_DATA - 1
+};
+enum nl80211_hidden_ssid {
+ NL80211_HIDDEN_SSID_NOT_IN_USE,
+ NL80211_HIDDEN_SSID_ZERO_LEN,
+ NL80211_HIDDEN_SSID_ZERO_CONTENTS
+};
+enum nl80211_sta_wme_attr {
+ __NL80211_STA_WME_INVALID,
+ NL80211_STA_WME_UAPSD_QUEUES,
+ NL80211_STA_WME_MAX_SP,
+ __NL80211_STA_WME_AFTER_LAST,
+ NL80211_STA_WME_MAX = __NL80211_STA_WME_AFTER_LAST - 1
+};
+enum nl80211_pmksa_candidate_attr {
+ __NL80211_PMKSA_CANDIDATE_INVALID,
+ NL80211_PMKSA_CANDIDATE_INDEX,
+ NL80211_PMKSA_CANDIDATE_BSSID,
+ NL80211_PMKSA_CANDIDATE_PREAUTH,
+ NUM_NL80211_PMKSA_CANDIDATE,
+ MAX_NL80211_PMKSA_CANDIDATE = NUM_NL80211_PMKSA_CANDIDATE - 1
+};
+enum nl80211_tdls_operation {
+ NL80211_TDLS_DISCOVERY_REQ,
+ NL80211_TDLS_SETUP,
+ NL80211_TDLS_TEARDOWN,
+ NL80211_TDLS_ENABLE_LINK,
+ NL80211_TDLS_DISABLE_LINK,
+};
+enum nl80211_feature_flags {
+ NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
+ NL80211_FEATURE_HT_IBSS = 1 << 1,
+ NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2,
+ NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3,
+ NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 1 << 4,
+ NL80211_FEATURE_SAE = 1 << 5,
+ NL80211_FEATURE_LOW_PRIORITY_SCAN = 1 << 6,
+ NL80211_FEATURE_SCAN_FLUSH = 1 << 7,
+ NL80211_FEATURE_AP_SCAN = 1 << 8,
+ NL80211_FEATURE_VIF_TXPOWER = 1 << 9,
+ NL80211_FEATURE_NEED_OBSS_SCAN = 1 << 10,
+ NL80211_FEATURE_P2P_GO_CTWIN = 1 << 11,
+ NL80211_FEATURE_P2P_GO_OPPPS = 1 << 12,
+ NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
+ NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
+ NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
+ NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17,
+ NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE = 1 << 18,
+ NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES = 1 << 19,
+ NL80211_FEATURE_WFA_TPC_IE_IN_PROBES = 1 << 20,
+ NL80211_FEATURE_QUIET = 1 << 21,
+ NL80211_FEATURE_TX_POWER_INSERTION = 1 << 22,
+ NL80211_FEATURE_ACKTO_ESTIMATION = 1 << 23,
+ NL80211_FEATURE_STATIC_SMPS = 1 << 24,
+ NL80211_FEATURE_DYNAMIC_SMPS = 1 << 25,
+ NL80211_FEATURE_SUPPORTS_WMM_ADMISSION = 1 << 26,
+ NL80211_FEATURE_MAC_ON_CREATE = 1 << 27,
+ NL80211_FEATURE_TDLS_CHANNEL_SWITCH = 1 << 28,
+ NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR = 1 << 29,
+ NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR = 1 << 30,
+ NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1U << 31,
+};
+enum nl80211_ext_feature_index {
+ NL80211_EXT_FEATURE_VHT_IBSS,
+ NL80211_EXT_FEATURE_RRM,
+ NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER,
+ NL80211_EXT_FEATURE_SCAN_START_TIME,
+ NL80211_EXT_FEATURE_BSS_PARENT_TSF,
+ NL80211_EXT_FEATURE_SET_SCAN_DWELL,
+ NL80211_EXT_FEATURE_BEACON_RATE_LEGACY,
+ NL80211_EXT_FEATURE_BEACON_RATE_HT,
+ NL80211_EXT_FEATURE_BEACON_RATE_VHT,
+ NL80211_EXT_FEATURE_FILS_STA,
+ NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA,
+ NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED,
+ NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI,
+ NL80211_EXT_FEATURE_CQM_RSSI_LIST,
+ NL80211_EXT_FEATURE_FILS_SK_OFFLOAD,
+ NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK,
+ NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X,
+ NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME,
+ NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP,
+ NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE,
+ NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION,
+ NL80211_EXT_FEATURE_MFP_OPTIONAL,
+ NL80211_EXT_FEATURE_LOW_SPAN_SCAN,
+ NL80211_EXT_FEATURE_LOW_POWER_SCAN,
+ NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN,
+ NL80211_EXT_FEATURE_DFS_OFFLOAD,
+ NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211,
+ NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT,
+ NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT,
+ NL80211_EXT_FEATURE_TXQS,
+ NL80211_EXT_FEATURE_SCAN_RANDOM_SN,
+ NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT,
+ NL80211_EXT_FEATURE_CAN_REPLACE_PTK0,
+ NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER,
+ NL80211_EXT_FEATURE_AIRTIME_FAIRNESS,
+ NL80211_EXT_FEATURE_AP_PMKSA_CACHING,
+ NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD,
+ NL80211_EXT_FEATURE_EXT_KEY_ID,
+ NL80211_EXT_FEATURE_STA_TX_PWR,
+ NL80211_EXT_FEATURE_SAE_OFFLOAD,
+ NL80211_EXT_FEATURE_VLAN_OFFLOAD,
+ NL80211_EXT_FEATURE_AQL,
+ NUM_NL80211_EXT_FEATURES,
+ MAX_NL80211_EXT_FEATURES = NUM_NL80211_EXT_FEATURES - 1
+};
+enum nl80211_probe_resp_offload_support_attr {
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS = 1 << 0,
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 = 1 << 1,
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P = 1 << 2,
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U = 1 << 3,
+};
+enum nl80211_connect_failed_reason {
+ NL80211_CONN_FAIL_MAX_CLIENTS,
+ NL80211_CONN_FAIL_BLOCKED_CLIENT,
+};
+enum nl80211_timeout_reason {
+ NL80211_TIMEOUT_UNSPECIFIED,
+ NL80211_TIMEOUT_SCAN,
+ NL80211_TIMEOUT_AUTH,
+ NL80211_TIMEOUT_ASSOC,
+};
+enum nl80211_scan_flags {
+ NL80211_SCAN_FLAG_LOW_PRIORITY = 1 << 0,
+ NL80211_SCAN_FLAG_FLUSH = 1 << 1,
+ NL80211_SCAN_FLAG_AP = 1 << 2,
+ NL80211_SCAN_FLAG_RANDOM_ADDR = 1 << 3,
+ NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME = 1 << 4,
+ NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 1 << 5,
+ NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 1 << 6,
+ NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 1 << 7,
+ NL80211_SCAN_FLAG_LOW_SPAN = 1 << 8,
+ NL80211_SCAN_FLAG_LOW_POWER = 1 << 9,
+ NL80211_SCAN_FLAG_HIGH_ACCURACY = 1 << 10,
+ NL80211_SCAN_FLAG_RANDOM_SN = 1 << 11,
+ NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 1 << 12,
+};
+enum nl80211_acl_policy {
+ NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED,
+ NL80211_ACL_POLICY_DENY_UNLESS_LISTED,
+};
+enum nl80211_smps_mode {
+ NL80211_SMPS_OFF,
+ NL80211_SMPS_STATIC,
+ NL80211_SMPS_DYNAMIC,
+ __NL80211_SMPS_AFTER_LAST,
+ NL80211_SMPS_MAX = __NL80211_SMPS_AFTER_LAST - 1
+};
+enum nl80211_radar_event {
+ NL80211_RADAR_DETECTED,
+ NL80211_RADAR_CAC_FINISHED,
+ NL80211_RADAR_CAC_ABORTED,
+ NL80211_RADAR_NOP_FINISHED,
+ NL80211_RADAR_PRE_CAC_EXPIRED,
+ NL80211_RADAR_CAC_STARTED,
+};
+enum nl80211_dfs_state {
+ NL80211_DFS_USABLE,
+ NL80211_DFS_UNAVAILABLE,
+ NL80211_DFS_AVAILABLE,
+};
+enum nl80211_protocol_features {
+ NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 1 << 0,
+};
+enum nl80211_crit_proto_id {
+ NL80211_CRIT_PROTO_UNSPEC,
+ NL80211_CRIT_PROTO_DHCP,
+ NL80211_CRIT_PROTO_EAPOL,
+ NL80211_CRIT_PROTO_APIPA,
+ NUM_NL80211_CRIT_PROTO
+};
+#define NL80211_CRIT_PROTO_MAX_DURATION 5000
+enum nl80211_rxmgmt_flags {
+ NL80211_RXMGMT_FLAG_ANSWERED = 1 << 0,
+ NL80211_RXMGMT_FLAG_EXTERNAL_AUTH = 1 << 1,
+};
+#define NL80211_VENDOR_ID_IS_LINUX 0x80000000
+struct nl80211_vendor_cmd_info {
+ __u32 vendor_id;
+ __u32 subcmd;
+};
+enum nl80211_tdls_peer_capability {
+ NL80211_TDLS_PEER_HT = 1 << 0,
+ NL80211_TDLS_PEER_VHT = 1 << 1,
+ NL80211_TDLS_PEER_WMM = 1 << 2,
+};
+enum nl80211_sched_scan_plan {
+ __NL80211_SCHED_SCAN_PLAN_INVALID,
+ NL80211_SCHED_SCAN_PLAN_INTERVAL,
+ NL80211_SCHED_SCAN_PLAN_ITERATIONS,
+ __NL80211_SCHED_SCAN_PLAN_AFTER_LAST,
+ NL80211_SCHED_SCAN_PLAN_MAX = __NL80211_SCHED_SCAN_PLAN_AFTER_LAST - 1
+};
+struct nl80211_bss_select_rssi_adjust {
+ __u8 band;
+ __s8 delta;
+} __attribute__((packed));
+enum nl80211_bss_select_attr {
+ __NL80211_BSS_SELECT_ATTR_INVALID,
+ NL80211_BSS_SELECT_ATTR_RSSI,
+ NL80211_BSS_SELECT_ATTR_BAND_PREF,
+ NL80211_BSS_SELECT_ATTR_RSSI_ADJUST,
+ __NL80211_BSS_SELECT_ATTR_AFTER_LAST,
+ NL80211_BSS_SELECT_ATTR_MAX = __NL80211_BSS_SELECT_ATTR_AFTER_LAST - 1
+};
+enum nl80211_nan_function_type {
+ NL80211_NAN_FUNC_PUBLISH,
+ NL80211_NAN_FUNC_SUBSCRIBE,
+ NL80211_NAN_FUNC_FOLLOW_UP,
+ __NL80211_NAN_FUNC_TYPE_AFTER_LAST,
+ NL80211_NAN_FUNC_MAX_TYPE = __NL80211_NAN_FUNC_TYPE_AFTER_LAST - 1,
+};
+enum nl80211_nan_publish_type {
+ NL80211_NAN_SOLICITED_PUBLISH = 1 << 0,
+ NL80211_NAN_UNSOLICITED_PUBLISH = 1 << 1,
+};
+enum nl80211_nan_func_term_reason {
+ NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST,
+ NL80211_NAN_FUNC_TERM_REASON_TTL_EXPIRED,
+ NL80211_NAN_FUNC_TERM_REASON_ERROR,
+};
+#define NL80211_NAN_FUNC_SERVICE_ID_LEN 6
+#define NL80211_NAN_FUNC_SERVICE_SPEC_INFO_MAX_LEN 0xff
+#define NL80211_NAN_FUNC_SRF_MAX_LEN 0xff
+enum nl80211_nan_func_attributes {
+ __NL80211_NAN_FUNC_INVALID,
+ NL80211_NAN_FUNC_TYPE,
+ NL80211_NAN_FUNC_SERVICE_ID,
+ NL80211_NAN_FUNC_PUBLISH_TYPE,
+ NL80211_NAN_FUNC_PUBLISH_BCAST,
+ NL80211_NAN_FUNC_SUBSCRIBE_ACTIVE,
+ NL80211_NAN_FUNC_FOLLOW_UP_ID,
+ NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID,
+ NL80211_NAN_FUNC_FOLLOW_UP_DEST,
+ NL80211_NAN_FUNC_CLOSE_RANGE,
+ NL80211_NAN_FUNC_TTL,
+ NL80211_NAN_FUNC_SERVICE_INFO,
+ NL80211_NAN_FUNC_SRF,
+ NL80211_NAN_FUNC_RX_MATCH_FILTER,
+ NL80211_NAN_FUNC_TX_MATCH_FILTER,
+ NL80211_NAN_FUNC_INSTANCE_ID,
+ NL80211_NAN_FUNC_TERM_REASON,
+ NUM_NL80211_NAN_FUNC_ATTR,
+ NL80211_NAN_FUNC_ATTR_MAX = NUM_NL80211_NAN_FUNC_ATTR - 1
+};
+enum nl80211_nan_srf_attributes {
+ __NL80211_NAN_SRF_INVALID,
+ NL80211_NAN_SRF_INCLUDE,
+ NL80211_NAN_SRF_BF,
+ NL80211_NAN_SRF_BF_IDX,
+ NL80211_NAN_SRF_MAC_ADDRS,
+ NUM_NL80211_NAN_SRF_ATTR,
+ NL80211_NAN_SRF_ATTR_MAX = NUM_NL80211_NAN_SRF_ATTR - 1,
+};
+enum nl80211_nan_match_attributes {
+ __NL80211_NAN_MATCH_INVALID,
+ NL80211_NAN_MATCH_FUNC_LOCAL,
+ NL80211_NAN_MATCH_FUNC_PEER,
+ NUM_NL80211_NAN_MATCH_ATTR,
+ NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1
+};
+enum nl80211_external_auth_action {
+ NL80211_EXTERNAL_AUTH_START,
+ NL80211_EXTERNAL_AUTH_ABORT,
+};
+enum nl80211_ftm_responder_attributes {
+ __NL80211_FTM_RESP_ATTR_INVALID,
+ NL80211_FTM_RESP_ATTR_ENABLED,
+ NL80211_FTM_RESP_ATTR_LCI,
+ NL80211_FTM_RESP_ATTR_CIVICLOC,
+ __NL80211_FTM_RESP_ATTR_LAST,
+ NL80211_FTM_RESP_ATTR_MAX = __NL80211_FTM_RESP_ATTR_LAST - 1,
+};
+enum nl80211_ftm_responder_stats {
+ __NL80211_FTM_STATS_INVALID,
+ NL80211_FTM_STATS_SUCCESS_NUM,
+ NL80211_FTM_STATS_PARTIAL_NUM,
+ NL80211_FTM_STATS_FAILED_NUM,
+ NL80211_FTM_STATS_ASAP_NUM,
+ NL80211_FTM_STATS_NON_ASAP_NUM,
+ NL80211_FTM_STATS_TOTAL_DURATION_MSEC,
+ NL80211_FTM_STATS_UNKNOWN_TRIGGERS_NUM,
+ NL80211_FTM_STATS_RESCHEDULE_REQUESTS_NUM,
+ NL80211_FTM_STATS_OUT_OF_WINDOW_TRIGGERS_NUM,
+ NL80211_FTM_STATS_PAD,
+ __NL80211_FTM_STATS_AFTER_LAST,
+ NL80211_FTM_STATS_MAX = __NL80211_FTM_STATS_AFTER_LAST - 1
+};
+enum nl80211_preamble {
+ NL80211_PREAMBLE_LEGACY,
+ NL80211_PREAMBLE_HT,
+ NL80211_PREAMBLE_VHT,
+ NL80211_PREAMBLE_DMG,
+};
+enum nl80211_peer_measurement_type {
+ NL80211_PMSR_TYPE_INVALID,
+ NL80211_PMSR_TYPE_FTM,
+ NUM_NL80211_PMSR_TYPES,
+ NL80211_PMSR_TYPE_MAX = NUM_NL80211_PMSR_TYPES - 1
+};
+enum nl80211_peer_measurement_status {
+ NL80211_PMSR_STATUS_SUCCESS,
+ NL80211_PMSR_STATUS_REFUSED,
+ NL80211_PMSR_STATUS_TIMEOUT,
+ NL80211_PMSR_STATUS_FAILURE,
+};
+enum nl80211_peer_measurement_req {
+ __NL80211_PMSR_REQ_ATTR_INVALID,
+ NL80211_PMSR_REQ_ATTR_DATA,
+ NL80211_PMSR_REQ_ATTR_GET_AP_TSF,
+ NUM_NL80211_PMSR_REQ_ATTRS,
+ NL80211_PMSR_REQ_ATTR_MAX = NUM_NL80211_PMSR_REQ_ATTRS - 1
+};
+enum nl80211_peer_measurement_resp {
+ __NL80211_PMSR_RESP_ATTR_INVALID,
+ NL80211_PMSR_RESP_ATTR_DATA,
+ NL80211_PMSR_RESP_ATTR_STATUS,
+ NL80211_PMSR_RESP_ATTR_HOST_TIME,
+ NL80211_PMSR_RESP_ATTR_AP_TSF,
+ NL80211_PMSR_RESP_ATTR_FINAL,
+ NL80211_PMSR_RESP_ATTR_PAD,
+ NUM_NL80211_PMSR_RESP_ATTRS,
+ NL80211_PMSR_RESP_ATTR_MAX = NUM_NL80211_PMSR_RESP_ATTRS - 1
+};
+enum nl80211_peer_measurement_peer_attrs {
+ __NL80211_PMSR_PEER_ATTR_INVALID,
+ NL80211_PMSR_PEER_ATTR_ADDR,
+ NL80211_PMSR_PEER_ATTR_CHAN,
+ NL80211_PMSR_PEER_ATTR_REQ,
+ NL80211_PMSR_PEER_ATTR_RESP,
+ NUM_NL80211_PMSR_PEER_ATTRS,
+ NL80211_PMSR_PEER_ATTR_MAX = NUM_NL80211_PMSR_PEER_ATTRS - 1,
+};
+enum nl80211_peer_measurement_attrs {
+ __NL80211_PMSR_ATTR_INVALID,
+ NL80211_PMSR_ATTR_MAX_PEERS,
+ NL80211_PMSR_ATTR_REPORT_AP_TSF,
+ NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR,
+ NL80211_PMSR_ATTR_TYPE_CAPA,
+ NL80211_PMSR_ATTR_PEERS,
+ NUM_NL80211_PMSR_ATTR,
+ NL80211_PMSR_ATTR_MAX = NUM_NL80211_PMSR_ATTR - 1
+};
+enum nl80211_peer_measurement_ftm_capa {
+ __NL80211_PMSR_FTM_CAPA_ATTR_INVALID,
+ NL80211_PMSR_FTM_CAPA_ATTR_ASAP,
+ NL80211_PMSR_FTM_CAPA_ATTR_NON_ASAP,
+ NL80211_PMSR_FTM_CAPA_ATTR_REQ_LCI,
+ NL80211_PMSR_FTM_CAPA_ATTR_REQ_CIVICLOC,
+ NL80211_PMSR_FTM_CAPA_ATTR_PREAMBLES,
+ NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS,
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT,
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST,
+ NUM_NL80211_PMSR_FTM_CAPA_ATTR,
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX = NUM_NL80211_PMSR_FTM_CAPA_ATTR - 1
+};
+enum nl80211_peer_measurement_ftm_req {
+ __NL80211_PMSR_FTM_REQ_ATTR_INVALID,
+ NL80211_PMSR_FTM_REQ_ATTR_ASAP,
+ NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE,
+ NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP,
+ NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD,
+ NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION,
+ NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST,
+ NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES,
+ NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI,
+ NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
+ NUM_NL80211_PMSR_FTM_REQ_ATTR,
+ NL80211_PMSR_FTM_REQ_ATTR_MAX = NUM_NL80211_PMSR_FTM_REQ_ATTR - 1
+};
+enum nl80211_peer_measurement_ftm_failure_reasons {
+ NL80211_PMSR_FTM_FAILURE_UNSPECIFIED,
+ NL80211_PMSR_FTM_FAILURE_NO_RESPONSE,
+ NL80211_PMSR_FTM_FAILURE_REJECTED,
+ NL80211_PMSR_FTM_FAILURE_WRONG_CHANNEL,
+ NL80211_PMSR_FTM_FAILURE_PEER_NOT_CAPABLE,
+ NL80211_PMSR_FTM_FAILURE_INVALID_TIMESTAMP,
+ NL80211_PMSR_FTM_FAILURE_PEER_BUSY,
+ NL80211_PMSR_FTM_FAILURE_BAD_CHANGED_PARAMS,
+};
+enum nl80211_peer_measurement_ftm_resp {
+ __NL80211_PMSR_FTM_RESP_ATTR_INVALID,
+ NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON,
+ NL80211_PMSR_FTM_RESP_ATTR_BURST_INDEX,
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS,
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES,
+ NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME,
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP,
+ NL80211_PMSR_FTM_RESP_ATTR_BURST_DURATION,
+ NL80211_PMSR_FTM_RESP_ATTR_FTMS_PER_BURST,
+ NL80211_PMSR_FTM_RESP_ATTR_RSSI_AVG,
+ NL80211_PMSR_FTM_RESP_ATTR_RSSI_SPREAD,
+ NL80211_PMSR_FTM_RESP_ATTR_TX_RATE,
+ NL80211_PMSR_FTM_RESP_ATTR_RX_RATE,
+ NL80211_PMSR_FTM_RESP_ATTR_RTT_AVG,
+ NL80211_PMSR_FTM_RESP_ATTR_RTT_VARIANCE,
+ NL80211_PMSR_FTM_RESP_ATTR_RTT_SPREAD,
+ NL80211_PMSR_FTM_RESP_ATTR_DIST_AVG,
+ NL80211_PMSR_FTM_RESP_ATTR_DIST_VARIANCE,
+ NL80211_PMSR_FTM_RESP_ATTR_DIST_SPREAD,
+ NL80211_PMSR_FTM_RESP_ATTR_LCI,
+ NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC,
+ NL80211_PMSR_FTM_RESP_ATTR_PAD,
+ NUM_NL80211_PMSR_FTM_RESP_ATTR,
+ NL80211_PMSR_FTM_RESP_ATTR_MAX = NUM_NL80211_PMSR_FTM_RESP_ATTR - 1
+};
+enum nl80211_obss_pd_attributes {
+ __NL80211_HE_OBSS_PD_ATTR_INVALID,
+ NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET,
+ NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET,
+ __NL80211_HE_OBSS_PD_ATTR_LAST,
+ NL80211_HE_OBSS_PD_ATTR_MAX = __NL80211_HE_OBSS_PD_ATTR_LAST - 1,
+};
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/ppp_defs.h b/chroot/opt/android-master/amd64/usr/include/linux/ppp_defs.h
new file mode 100644
index 0000000..84c23d9
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/ppp_defs.h
@@ -0,0 +1,119 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <linux/types.h>
+#ifndef _UAPI_PPP_DEFS_H_
+#define _UAPI_PPP_DEFS_H_
+#define PPP_HDRLEN 4
+#define PPP_FCSLEN 2
+#define PPP_MRU 1500
+#define PPP_ADDRESS(p) (((__u8 *) (p))[0])
+#define PPP_CONTROL(p) (((__u8 *) (p))[1])
+#define PPP_PROTOCOL(p) ((((__u8 *) (p))[2] << 8) + ((__u8 *) (p))[3])
+#define PPP_ALLSTATIONS 0xff
+#define PPP_UI 0x03
+#define PPP_FLAG 0x7e
+#define PPP_ESCAPE 0x7d
+#define PPP_TRANS 0x20
+#define PPP_IP 0x21
+#define PPP_AT 0x29
+#define PPP_IPX 0x2b
+#define PPP_VJC_COMP 0x2d
+#define PPP_VJC_UNCOMP 0x2f
+#define PPP_MP 0x3d
+#define PPP_IPV6 0x57
+#define PPP_COMPFRAG 0xfb
+#define PPP_COMP 0xfd
+#define PPP_MPLS_UC 0x0281
+#define PPP_MPLS_MC 0x0283
+#define PPP_IPCP 0x8021
+#define PPP_ATCP 0x8029
+#define PPP_IPXCP 0x802b
+#define PPP_IPV6CP 0x8057
+#define PPP_CCPFRAG 0x80fb
+#define PPP_CCP 0x80fd
+#define PPP_MPLSCP 0x80fd
+#define PPP_LCP 0xc021
+#define PPP_PAP 0xc023
+#define PPP_LQR 0xc025
+#define PPP_CHAP 0xc223
+#define PPP_CBCP 0xc029
+#define PPP_INITFCS 0xffff
+#define PPP_GOODFCS 0xf0b8
+typedef __u32 ext_accm[8];
+enum NPmode {
+ NPMODE_PASS,
+ NPMODE_DROP,
+ NPMODE_ERROR,
+ NPMODE_QUEUE
+};
+struct pppstat {
+ __u32 ppp_discards;
+ __u32 ppp_ibytes;
+ __u32 ppp_ioctects;
+ __u32 ppp_ipackets;
+ __u32 ppp_ierrors;
+ __u32 ppp_ilqrs;
+ __u32 ppp_obytes;
+ __u32 ppp_ooctects;
+ __u32 ppp_opackets;
+ __u32 ppp_oerrors;
+ __u32 ppp_olqrs;
+};
+struct vjstat {
+ __u32 vjs_packets;
+ __u32 vjs_compressed;
+ __u32 vjs_searches;
+ __u32 vjs_misses;
+ __u32 vjs_uncompressedin;
+ __u32 vjs_compressedin;
+ __u32 vjs_errorin;
+ __u32 vjs_tossed;
+};
+struct compstat {
+ __u32 unc_bytes;
+ __u32 unc_packets;
+ __u32 comp_bytes;
+ __u32 comp_packets;
+ __u32 inc_bytes;
+ __u32 inc_packets;
+ __u32 in_count;
+ __u32 bytes_out;
+ double ratio;
+};
+struct ppp_stats {
+ struct pppstat p;
+ struct vjstat vj;
+};
+struct ppp_comp_stats {
+ struct compstat c;
+ struct compstat d;
+};
+struct ppp_idle {
+ __kernel_old_time_t xmit_idle;
+ __kernel_old_time_t recv_idle;
+};
+struct ppp_idle32 {
+ __s32 xmit_idle;
+ __s32 recv_idle;
+};
+struct ppp_idle64 {
+ __s64 xmit_idle;
+ __s64 recv_idle;
+};
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/swab.h b/chroot/opt/android-master/amd64/usr/include/linux/swab.h
new file mode 100644
index 0000000..da949db
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/swab.h
@@ -0,0 +1,128 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_SWAB_H
+#define _UAPI_LINUX_SWAB_H
+#include <linux/types.h>
+#include <linux/compiler.h>
+#include <asm/swab.h>
+#define ___constant_swab16(x) ((__u16) ((((__u16) (x) & (__u16) 0x00ffU) << 8) | (((__u16) (x) & (__u16) 0xff00U) >> 8)))
+#define ___constant_swab32(x) ((__u32) ((((__u32) (x) & (__u32) 0x000000ffUL) << 24) | (((__u32) (x) & (__u32) 0x0000ff00UL) << 8) | (((__u32) (x) & (__u32) 0x00ff0000UL) >> 8) | (((__u32) (x) & (__u32) 0xff000000UL) >> 24)))
+#define ___constant_swab64(x) ((__u64) ((((__u64) (x) & (__u64) 0x00000000000000ffULL) << 56) | (((__u64) (x) & (__u64) 0x000000000000ff00ULL) << 40) | (((__u64) (x) & (__u64) 0x0000000000ff0000ULL) << 24) | (((__u64) (x) & (__u64) 0x00000000ff000000ULL) << 8) | (((__u64) (x) & (__u64) 0x000000ff00000000ULL) >> 8) | (((__u64) (x) & (__u64) 0x0000ff0000000000ULL) >> 24) | (((__u64) (x) & (__u64) 0x00ff000000000000ULL) >> 40) | (((__u64) (x) & (__u64) 0xff00000000000000ULL) >> 56)))
+#define ___constant_swahw32(x) ((__u32) ((((__u32) (x) & (__u32) 0x0000ffffUL) << 16) | (((__u32) (x) & (__u32) 0xffff0000UL) >> 16)))
+#define ___constant_swahb32(x) ((__u32) ((((__u32) (x) & (__u32) 0x00ff00ffUL) << 8) | (((__u32) (x) & (__u32) 0xff00ff00UL) >> 8)))
+#ifdef __arch_swab16
+#else
+#endif
+#ifdef __arch_swab32
+#else
+#endif
+#ifdef __arch_swab64
+#elif defined(__SWAB_64_THRU_32__)
+#else
+#endif
+static inline __attribute__((__const__)) __u32 __fswahw32(__u32 val) {
+#ifdef __arch_swahw32
+ return __arch_swahw32(val);
+#else
+ return ___constant_swahw32(val);
+#endif
+}
+static inline __attribute__((__const__)) __u32 __fswahb32(__u32 val) {
+#ifdef __arch_swahb32
+ return __arch_swahb32(val);
+#else
+ return ___constant_swahb32(val);
+#endif
+}
+#define __swab16(x) (__u16) __builtin_bswap16((__u16) (x))
+#define __swab32(x) (__u32) __builtin_bswap32((__u32) (x))
+#define __swab64(x) (__u64) __builtin_bswap64((__u64) (x))
+#define __swahw32(x) (__builtin_constant_p((__u32) (x)) ? ___constant_swahw32(x) : __fswahw32(x))
+#define __swahb32(x) (__builtin_constant_p((__u32) (x)) ? ___constant_swahb32(x) : __fswahb32(x))
+static __always_inline __u16 __swab16p(const __u16 * p) {
+#ifdef __arch_swab16p
+ return __arch_swab16p(p);
+#else
+ return __swab16(* p);
+#endif
+}
+static __always_inline __u32 __swab32p(const __u32 * p) {
+#ifdef __arch_swab32p
+ return __arch_swab32p(p);
+#else
+ return __swab32(* p);
+#endif
+}
+static __always_inline __u64 __swab64p(const __u64 * p) {
+#ifdef __arch_swab64p
+ return __arch_swab64p(p);
+#else
+ return __swab64(* p);
+#endif
+}
+static inline __u32 __swahw32p(const __u32 * p) {
+#ifdef __arch_swahw32p
+ return __arch_swahw32p(p);
+#else
+ return __swahw32(* p);
+#endif
+}
+static inline __u32 __swahb32p(const __u32 * p) {
+#ifdef __arch_swahb32p
+ return __arch_swahb32p(p);
+#else
+ return __swahb32(* p);
+#endif
+}
+static inline void __swab16s(__u16 * p) {
+#ifdef __arch_swab16s
+ __arch_swab16s(p);
+#else
+ * p = __swab16p(p);
+#endif
+}
+static __always_inline void __swab32s(__u32 * p) {
+#ifdef __arch_swab32s
+ __arch_swab32s(p);
+#else
+ * p = __swab32p(p);
+#endif
+}
+static __always_inline void __swab64s(__u64 * p) {
+#ifdef __arch_swab64s
+ __arch_swab64s(p);
+#else
+ * p = __swab64p(p);
+#endif
+}
+static inline void __swahw32s(__u32 * p) {
+#ifdef __arch_swahw32s
+ __arch_swahw32s(p);
+#else
+ * p = __swahw32p(p);
+#endif
+}
+static inline void __swahb32s(__u32 * p) {
+#ifdef __arch_swahb32s
+ __arch_swahb32s(p);
+#else
+ * p = __swahb32p(p);
+#endif
+}
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/timerfd.h b/chroot/opt/android-master/amd64/usr/include/linux/timerfd.h
new file mode 100644
index 0000000..eaa415a
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/timerfd.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_TIMERFD_H
+#define _UAPI_LINUX_TIMERFD_H
+#include <linux/types.h>
+#include <linux/fcntl.h>
+#include <linux/ioctl.h>
+#define TFD_TIMER_ABSTIME (1 << 0)
+#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
+#define TFD_CLOEXEC O_CLOEXEC
+#define TFD_NONBLOCK O_NONBLOCK
+#define TFD_IOC_SET_TICKS _IOW('T', 0, __u64)
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/usb/ch11.h b/chroot/opt/android-master/amd64/usr/include/linux/usb/ch11.h
new file mode 100644
index 0000000..55387fe
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/usb/ch11.h
@@ -0,0 +1,179 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_CH11_H
+#define __LINUX_CH11_H
+#include <linux/types.h>
+#define USB_MAXCHILDREN 31
+#define USB_SS_MAXPORTS 15
+#define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)
+#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
+#define HUB_PORT_STATUS 0
+#define HUB_PORT_PD_STATUS 1
+#define HUB_EXT_PORT_STATUS 2
+#define HUB_CLEAR_TT_BUFFER 8
+#define HUB_RESET_TT 9
+#define HUB_GET_TT_STATE 10
+#define HUB_STOP_TT 11
+#define HUB_SET_DEPTH 12
+#define HUB_GET_PORT_ERR_COUNT 13
+#define C_HUB_LOCAL_POWER 0
+#define C_HUB_OVER_CURRENT 1
+#define USB_PORT_FEAT_CONNECTION 0
+#define USB_PORT_FEAT_ENABLE 1
+#define USB_PORT_FEAT_SUSPEND 2
+#define USB_PORT_FEAT_OVER_CURRENT 3
+#define USB_PORT_FEAT_RESET 4
+#define USB_PORT_FEAT_L1 5
+#define USB_PORT_FEAT_POWER 8
+#define USB_PORT_FEAT_LOWSPEED 9
+#define USB_PORT_FEAT_C_CONNECTION 16
+#define USB_PORT_FEAT_C_ENABLE 17
+#define USB_PORT_FEAT_C_SUSPEND 18
+#define USB_PORT_FEAT_C_OVER_CURRENT 19
+#define USB_PORT_FEAT_C_RESET 20
+#define USB_PORT_FEAT_TEST 21
+#define USB_PORT_FEAT_INDICATOR 22
+#define USB_PORT_FEAT_C_PORT_L1 23
+#define USB_PORT_FEAT_LINK_STATE 5
+#define USB_PORT_FEAT_U1_TIMEOUT 23
+#define USB_PORT_FEAT_U2_TIMEOUT 24
+#define USB_PORT_FEAT_C_PORT_LINK_STATE 25
+#define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26
+#define USB_PORT_FEAT_REMOTE_WAKE_MASK 27
+#define USB_PORT_FEAT_BH_PORT_RESET 28
+#define USB_PORT_FEAT_C_BH_PORT_RESET 29
+#define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30
+#define USB_PORT_LPM_TIMEOUT(p) (((p) & 0xff) << 8)
+#define USB_PORT_FEAT_REMOTE_WAKE_CONNECT (1 << 8)
+#define USB_PORT_FEAT_REMOTE_WAKE_DISCONNECT (1 << 9)
+#define USB_PORT_FEAT_REMOTE_WAKE_OVER_CURRENT (1 << 10)
+struct usb_port_status {
+ __le16 wPortStatus;
+ __le16 wPortChange;
+ __le32 dwExtPortStatus;
+} __attribute__((packed));
+#define USB_PORT_STAT_CONNECTION 0x0001
+#define USB_PORT_STAT_ENABLE 0x0002
+#define USB_PORT_STAT_SUSPEND 0x0004
+#define USB_PORT_STAT_OVERCURRENT 0x0008
+#define USB_PORT_STAT_RESET 0x0010
+#define USB_PORT_STAT_L1 0x0020
+#define USB_PORT_STAT_POWER 0x0100
+#define USB_PORT_STAT_LOW_SPEED 0x0200
+#define USB_PORT_STAT_HIGH_SPEED 0x0400
+#define USB_PORT_STAT_TEST 0x0800
+#define USB_PORT_STAT_INDICATOR 0x1000
+#define USB_PORT_STAT_LINK_STATE 0x01e0
+#define USB_SS_PORT_STAT_POWER 0x0200
+#define USB_SS_PORT_STAT_SPEED 0x1c00
+#define USB_PORT_STAT_SPEED_5GBPS 0x0000
+#define USB_SS_PORT_STAT_MASK (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE | USB_PORT_STAT_OVERCURRENT | USB_PORT_STAT_RESET)
+#define USB_SS_PORT_LS_U0 0x0000
+#define USB_SS_PORT_LS_U1 0x0020
+#define USB_SS_PORT_LS_U2 0x0040
+#define USB_SS_PORT_LS_U3 0x0060
+#define USB_SS_PORT_LS_SS_DISABLED 0x0080
+#define USB_SS_PORT_LS_RX_DETECT 0x00a0
+#define USB_SS_PORT_LS_SS_INACTIVE 0x00c0
+#define USB_SS_PORT_LS_POLLING 0x00e0
+#define USB_SS_PORT_LS_RECOVERY 0x0100
+#define USB_SS_PORT_LS_HOT_RESET 0x0120
+#define USB_SS_PORT_LS_COMP_MOD 0x0140
+#define USB_SS_PORT_LS_LOOPBACK 0x0160
+#define USB_PORT_STAT_C_CONNECTION 0x0001
+#define USB_PORT_STAT_C_ENABLE 0x0002
+#define USB_PORT_STAT_C_SUSPEND 0x0004
+#define USB_PORT_STAT_C_OVERCURRENT 0x0008
+#define USB_PORT_STAT_C_RESET 0x0010
+#define USB_PORT_STAT_C_L1 0x0020
+#define USB_PORT_STAT_C_BH_RESET 0x0020
+#define USB_PORT_STAT_C_LINK_STATE 0x0040
+#define USB_PORT_STAT_C_CONFIG_ERROR 0x0080
+#define USB_EXT_PORT_STAT_RX_SPEED_ID 0x0000000f
+#define USB_EXT_PORT_STAT_TX_SPEED_ID 0x000000f0
+#define USB_EXT_PORT_STAT_RX_LANES 0x00000f00
+#define USB_EXT_PORT_STAT_TX_LANES 0x0000f000
+#define USB_EXT_PORT_RX_LANES(p) (((p) & USB_EXT_PORT_STAT_RX_LANES) >> 8)
+#define USB_EXT_PORT_TX_LANES(p) (((p) & USB_EXT_PORT_STAT_TX_LANES) >> 12)
+#define HUB_CHAR_LPSM 0x0003
+#define HUB_CHAR_COMMON_LPSM 0x0000
+#define HUB_CHAR_INDV_PORT_LPSM 0x0001
+#define HUB_CHAR_NO_LPSM 0x0002
+#define HUB_CHAR_COMPOUND 0x0004
+#define HUB_CHAR_OCPM 0x0018
+#define HUB_CHAR_COMMON_OCPM 0x0000
+#define HUB_CHAR_INDV_PORT_OCPM 0x0008
+#define HUB_CHAR_NO_OCPM 0x0010
+#define HUB_CHAR_TTTT 0x0060
+#define HUB_CHAR_PORTIND 0x0080
+struct usb_hub_status {
+ __le16 wHubStatus;
+ __le16 wHubChange;
+} __attribute__((packed));
+#define HUB_STATUS_LOCAL_POWER 0x0001
+#define HUB_STATUS_OVERCURRENT 0x0002
+#define HUB_CHANGE_LOCAL_POWER 0x0001
+#define HUB_CHANGE_OVERCURRENT 0x0002
+#define USB_DT_HUB (USB_TYPE_CLASS | 0x09)
+#define USB_DT_SS_HUB (USB_TYPE_CLASS | 0x0a)
+#define USB_DT_HUB_NONVAR_SIZE 7
+#define USB_DT_SS_HUB_SIZE 12
+#define USB_HUB_PR_FS 0
+#define USB_HUB_PR_HS_NO_TT 0
+#define USB_HUB_PR_HS_SINGLE_TT 1
+#define USB_HUB_PR_HS_MULTI_TT 2
+#define USB_HUB_PR_SS 3
+struct usb_hub_descriptor {
+ __u8 bDescLength;
+ __u8 bDescriptorType;
+ __u8 bNbrPorts;
+ __le16 wHubCharacteristics;
+ __u8 bPwrOn2PwrGood;
+ __u8 bHubContrCurrent;
+ union {
+ struct {
+ __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8];
+ __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8];
+ } __attribute__((packed)) hs;
+ struct {
+ __u8 bHubHdrDecLat;
+ __le16 wHubDelay;
+ __le16 DeviceRemovable;
+ } __attribute__((packed)) ss;
+ } u;
+} __attribute__((packed));
+#define HUB_LED_AUTO 0
+#define HUB_LED_AMBER 1
+#define HUB_LED_GREEN 2
+#define HUB_LED_OFF 3
+enum hub_led_mode {
+ INDICATOR_AUTO = 0,
+ INDICATOR_CYCLE,
+ INDICATOR_GREEN_BLINK,
+ INDICATOR_GREEN_BLINK_OFF,
+ INDICATOR_AMBER_BLINK,
+ INDICATOR_AMBER_BLINK_OFF,
+ INDICATOR_ALT_BLINK,
+ INDICATOR_ALT_BLINK_OFF
+} __attribute__((packed));
+#define HUB_TTTT_8_BITS 0x00
+#define HUB_TTTT_16_BITS 0x20
+#define HUB_TTTT_24_BITS 0x40
+#define HUB_TTTT_32_BITS 0x60
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/usb/ch9.h b/chroot/opt/android-master/amd64/usr/include/linux/usb/ch9.h
new file mode 100644
index 0000000..2d69abd
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/usb/ch9.h
@@ -0,0 +1,581 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI__LINUX_USB_CH9_H
+#define _UAPI__LINUX_USB_CH9_H
+#include <linux/types.h>
+#include <asm/byteorder.h>
+#define USB_DIR_OUT 0
+#define USB_DIR_IN 0x80
+#define USB_TYPE_MASK (0x03 << 5)
+#define USB_TYPE_STANDARD (0x00 << 5)
+#define USB_TYPE_CLASS (0x01 << 5)
+#define USB_TYPE_VENDOR (0x02 << 5)
+#define USB_TYPE_RESERVED (0x03 << 5)
+#define USB_RECIP_MASK 0x1f
+#define USB_RECIP_DEVICE 0x00
+#define USB_RECIP_INTERFACE 0x01
+#define USB_RECIP_ENDPOINT 0x02
+#define USB_RECIP_OTHER 0x03
+#define USB_RECIP_PORT 0x04
+#define USB_RECIP_RPIPE 0x05
+#define USB_REQ_GET_STATUS 0x00
+#define USB_REQ_CLEAR_FEATURE 0x01
+#define USB_REQ_SET_FEATURE 0x03
+#define USB_REQ_SET_ADDRESS 0x05
+#define USB_REQ_GET_DESCRIPTOR 0x06
+#define USB_REQ_SET_DESCRIPTOR 0x07
+#define USB_REQ_GET_CONFIGURATION 0x08
+#define USB_REQ_SET_CONFIGURATION 0x09
+#define USB_REQ_GET_INTERFACE 0x0A
+#define USB_REQ_SET_INTERFACE 0x0B
+#define USB_REQ_SYNCH_FRAME 0x0C
+#define USB_REQ_SET_SEL 0x30
+#define USB_REQ_SET_ISOCH_DELAY 0x31
+#define USB_REQ_SET_ENCRYPTION 0x0D
+#define USB_REQ_GET_ENCRYPTION 0x0E
+#define USB_REQ_RPIPE_ABORT 0x0E
+#define USB_REQ_SET_HANDSHAKE 0x0F
+#define USB_REQ_RPIPE_RESET 0x0F
+#define USB_REQ_GET_HANDSHAKE 0x10
+#define USB_REQ_SET_CONNECTION 0x11
+#define USB_REQ_SET_SECURITY_DATA 0x12
+#define USB_REQ_GET_SECURITY_DATA 0x13
+#define USB_REQ_SET_WUSB_DATA 0x14
+#define USB_REQ_LOOPBACK_DATA_WRITE 0x15
+#define USB_REQ_LOOPBACK_DATA_READ 0x16
+#define USB_REQ_SET_INTERFACE_DS 0x17
+#define USB_REQ_GET_PARTNER_PDO 20
+#define USB_REQ_GET_BATTERY_STATUS 21
+#define USB_REQ_SET_PDO 22
+#define USB_REQ_GET_VDM 23
+#define USB_REQ_SEND_VDM 24
+#define USB_DEVICE_SELF_POWERED 0
+#define USB_DEVICE_REMOTE_WAKEUP 1
+#define USB_DEVICE_TEST_MODE 2
+#define USB_DEVICE_BATTERY 2
+#define USB_DEVICE_B_HNP_ENABLE 3
+#define USB_DEVICE_WUSB_DEVICE 3
+#define USB_DEVICE_A_HNP_SUPPORT 4
+#define USB_DEVICE_A_ALT_HNP_SUPPORT 5
+#define USB_DEVICE_DEBUG_MODE 6
+#define TEST_J 1
+#define TEST_K 2
+#define TEST_SE0_NAK 3
+#define TEST_PACKET 4
+#define TEST_FORCE_EN 5
+#define USB_STATUS_TYPE_STANDARD 0
+#define USB_STATUS_TYPE_PTM 1
+#define USB_DEVICE_U1_ENABLE 48
+#define USB_DEVICE_U2_ENABLE 49
+#define USB_DEVICE_LTM_ENABLE 50
+#define USB_INTRF_FUNC_SUSPEND 0
+#define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00
+#define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0))
+#define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1))
+#define USB_INTRF_STAT_FUNC_RW_CAP 1
+#define USB_INTRF_STAT_FUNC_RW 2
+#define USB_ENDPOINT_HALT 0
+#define USB_DEV_STAT_U1_ENABLED 2
+#define USB_DEV_STAT_U2_ENABLED 3
+#define USB_DEV_STAT_LTM_ENABLED 4
+#define USB_DEVICE_BATTERY_WAKE_MASK 40
+#define USB_DEVICE_OS_IS_PD_AWARE 41
+#define USB_DEVICE_POLICY_MODE 42
+#define USB_PORT_PR_SWAP 43
+#define USB_PORT_GOTO_MIN 44
+#define USB_PORT_RETURN_POWER 45
+#define USB_PORT_ACCEPT_PD_REQUEST 46
+#define USB_PORT_REJECT_PD_REQUEST 47
+#define USB_PORT_PORT_PD_RESET 48
+#define USB_PORT_C_PORT_PD_CHANGE 49
+#define USB_PORT_CABLE_PD_RESET 50
+#define USB_DEVICE_CHARGING_POLICY 54
+struct usb_ctrlrequest {
+ __u8 bRequestType;
+ __u8 bRequest;
+ __le16 wValue;
+ __le16 wIndex;
+ __le16 wLength;
+} __attribute__((packed));
+#define USB_DT_DEVICE 0x01
+#define USB_DT_CONFIG 0x02
+#define USB_DT_STRING 0x03
+#define USB_DT_INTERFACE 0x04
+#define USB_DT_ENDPOINT 0x05
+#define USB_DT_DEVICE_QUALIFIER 0x06
+#define USB_DT_OTHER_SPEED_CONFIG 0x07
+#define USB_DT_INTERFACE_POWER 0x08
+#define USB_DT_OTG 0x09
+#define USB_DT_DEBUG 0x0a
+#define USB_DT_INTERFACE_ASSOCIATION 0x0b
+#define USB_DT_SECURITY 0x0c
+#define USB_DT_KEY 0x0d
+#define USB_DT_ENCRYPTION_TYPE 0x0e
+#define USB_DT_BOS 0x0f
+#define USB_DT_DEVICE_CAPABILITY 0x10
+#define USB_DT_WIRELESS_ENDPOINT_COMP 0x11
+#define USB_DT_WIRE_ADAPTER 0x21
+#define USB_DT_RPIPE 0x22
+#define USB_DT_CS_RADIO_CONTROL 0x23
+#define USB_DT_PIPE_USAGE 0x24
+#define USB_DT_SS_ENDPOINT_COMP 0x30
+#define USB_DT_SSP_ISOC_ENDPOINT_COMP 0x31
+#define USB_DT_CS_DEVICE (USB_TYPE_CLASS | USB_DT_DEVICE)
+#define USB_DT_CS_CONFIG (USB_TYPE_CLASS | USB_DT_CONFIG)
+#define USB_DT_CS_STRING (USB_TYPE_CLASS | USB_DT_STRING)
+#define USB_DT_CS_INTERFACE (USB_TYPE_CLASS | USB_DT_INTERFACE)
+#define USB_DT_CS_ENDPOINT (USB_TYPE_CLASS | USB_DT_ENDPOINT)
+struct usb_descriptor_header {
+ __u8 bLength;
+ __u8 bDescriptorType;
+} __attribute__((packed));
+struct usb_device_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __le16 bcdUSB;
+ __u8 bDeviceClass;
+ __u8 bDeviceSubClass;
+ __u8 bDeviceProtocol;
+ __u8 bMaxPacketSize0;
+ __le16 idVendor;
+ __le16 idProduct;
+ __le16 bcdDevice;
+ __u8 iManufacturer;
+ __u8 iProduct;
+ __u8 iSerialNumber;
+ __u8 bNumConfigurations;
+} __attribute__((packed));
+#define USB_DT_DEVICE_SIZE 18
+#define USB_CLASS_PER_INTERFACE 0
+#define USB_CLASS_AUDIO 1
+#define USB_CLASS_COMM 2
+#define USB_CLASS_HID 3
+#define USB_CLASS_PHYSICAL 5
+#define USB_CLASS_STILL_IMAGE 6
+#define USB_CLASS_PRINTER 7
+#define USB_CLASS_MASS_STORAGE 8
+#define USB_CLASS_HUB 9
+#define USB_CLASS_CDC_DATA 0x0a
+#define USB_CLASS_CSCID 0x0b
+#define USB_CLASS_CONTENT_SEC 0x0d
+#define USB_CLASS_VIDEO 0x0e
+#define USB_CLASS_WIRELESS_CONTROLLER 0xe0
+#define USB_CLASS_MISC 0xef
+#define USB_CLASS_APP_SPEC 0xfe
+#define USB_CLASS_VENDOR_SPEC 0xff
+#define USB_SUBCLASS_VENDOR_SPEC 0xff
+struct usb_config_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __le16 wTotalLength;
+ __u8 bNumInterfaces;
+ __u8 bConfigurationValue;
+ __u8 iConfiguration;
+ __u8 bmAttributes;
+ __u8 bMaxPower;
+} __attribute__((packed));
+#define USB_DT_CONFIG_SIZE 9
+#define USB_CONFIG_ATT_ONE (1 << 7)
+#define USB_CONFIG_ATT_SELFPOWER (1 << 6)
+#define USB_CONFIG_ATT_WAKEUP (1 << 5)
+#define USB_CONFIG_ATT_BATTERY (1 << 4)
+struct usb_string_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __le16 wData[1];
+} __attribute__((packed));
+struct usb_interface_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bInterfaceNumber;
+ __u8 bAlternateSetting;
+ __u8 bNumEndpoints;
+ __u8 bInterfaceClass;
+ __u8 bInterfaceSubClass;
+ __u8 bInterfaceProtocol;
+ __u8 iInterface;
+} __attribute__((packed));
+#define USB_DT_INTERFACE_SIZE 9
+struct usb_endpoint_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bEndpointAddress;
+ __u8 bmAttributes;
+ __le16 wMaxPacketSize;
+ __u8 bInterval;
+ __u8 bRefresh;
+ __u8 bSynchAddress;
+} __attribute__((packed));
+#define USB_DT_ENDPOINT_SIZE 7
+#define USB_DT_ENDPOINT_AUDIO_SIZE 9
+#define USB_ENDPOINT_NUMBER_MASK 0x0f
+#define USB_ENDPOINT_DIR_MASK 0x80
+#define USB_ENDPOINT_XFERTYPE_MASK 0x03
+#define USB_ENDPOINT_XFER_CONTROL 0
+#define USB_ENDPOINT_XFER_ISOC 1
+#define USB_ENDPOINT_XFER_BULK 2
+#define USB_ENDPOINT_XFER_INT 3
+#define USB_ENDPOINT_MAX_ADJUSTABLE 0x80
+#define USB_ENDPOINT_MAXP_MASK 0x07ff
+#define USB_EP_MAXP_MULT_SHIFT 11
+#define USB_EP_MAXP_MULT_MASK (3 << USB_EP_MAXP_MULT_SHIFT)
+#define USB_EP_MAXP_MULT(m) (((m) & USB_EP_MAXP_MULT_MASK) >> USB_EP_MAXP_MULT_SHIFT)
+#define USB_ENDPOINT_INTRTYPE 0x30
+#define USB_ENDPOINT_INTR_PERIODIC (0 << 4)
+#define USB_ENDPOINT_INTR_NOTIFICATION (1 << 4)
+#define USB_ENDPOINT_SYNCTYPE 0x0c
+#define USB_ENDPOINT_SYNC_NONE (0 << 2)
+#define USB_ENDPOINT_SYNC_ASYNC (1 << 2)
+#define USB_ENDPOINT_SYNC_ADAPTIVE (2 << 2)
+#define USB_ENDPOINT_SYNC_SYNC (3 << 2)
+#define USB_ENDPOINT_USAGE_MASK 0x30
+#define USB_ENDPOINT_USAGE_DATA 0x00
+#define USB_ENDPOINT_USAGE_FEEDBACK 0x10
+#define USB_ENDPOINT_USAGE_IMPLICIT_FB 0x20
+struct usb_ssp_isoc_ep_comp_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __le16 wReseved;
+ __le32 dwBytesPerInterval;
+} __attribute__((packed));
+#define USB_DT_SSP_ISOC_EP_COMP_SIZE 8
+struct usb_ss_ep_comp_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bMaxBurst;
+ __u8 bmAttributes;
+ __le16 wBytesPerInterval;
+} __attribute__((packed));
+#define USB_DT_SS_EP_COMP_SIZE 6
+#define USB_SS_MULT(p) (1 + ((p) & 0x3))
+#define USB_SS_SSP_ISOC_COMP(p) ((p) & (1 << 7))
+struct usb_qualifier_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __le16 bcdUSB;
+ __u8 bDeviceClass;
+ __u8 bDeviceSubClass;
+ __u8 bDeviceProtocol;
+ __u8 bMaxPacketSize0;
+ __u8 bNumConfigurations;
+ __u8 bRESERVED;
+} __attribute__((packed));
+struct usb_otg_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bmAttributes;
+} __attribute__((packed));
+struct usb_otg20_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bmAttributes;
+ __le16 bcdOTG;
+} __attribute__((packed));
+#define USB_OTG_SRP (1 << 0)
+#define USB_OTG_HNP (1 << 1)
+#define USB_OTG_ADP (1 << 2)
+#define OTG_STS_SELECTOR 0xF000
+struct usb_debug_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDebugInEndpoint;
+ __u8 bDebugOutEndpoint;
+} __attribute__((packed));
+struct usb_interface_assoc_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bFirstInterface;
+ __u8 bInterfaceCount;
+ __u8 bFunctionClass;
+ __u8 bFunctionSubClass;
+ __u8 bFunctionProtocol;
+ __u8 iFunction;
+} __attribute__((packed));
+#define USB_DT_INTERFACE_ASSOCIATION_SIZE 8
+struct usb_security_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __le16 wTotalLength;
+ __u8 bNumEncryptionTypes;
+} __attribute__((packed));
+struct usb_key_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 tTKID[3];
+ __u8 bReserved;
+ __u8 bKeyData[0];
+} __attribute__((packed));
+struct usb_encryption_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bEncryptionType;
+#define USB_ENC_TYPE_UNSECURE 0
+#define USB_ENC_TYPE_WIRED 1
+#define USB_ENC_TYPE_CCM_1 2
+#define USB_ENC_TYPE_RSA_1 3
+ __u8 bEncryptionValue;
+ __u8 bAuthKeyIndex;
+} __attribute__((packed));
+struct usb_bos_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __le16 wTotalLength;
+ __u8 bNumDeviceCaps;
+} __attribute__((packed));
+#define USB_DT_BOS_SIZE 5
+struct usb_dev_cap_header {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+} __attribute__((packed));
+#define USB_CAP_TYPE_WIRELESS_USB 1
+struct usb_wireless_cap_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __u8 bmAttributes;
+#define USB_WIRELESS_P2P_DRD (1 << 1)
+#define USB_WIRELESS_BEACON_MASK (3 << 2)
+#define USB_WIRELESS_BEACON_SELF (1 << 2)
+#define USB_WIRELESS_BEACON_DIRECTED (2 << 2)
+#define USB_WIRELESS_BEACON_NONE (3 << 2)
+ __le16 wPHYRates;
+#define USB_WIRELESS_PHY_53 (1 << 0)
+#define USB_WIRELESS_PHY_80 (1 << 1)
+#define USB_WIRELESS_PHY_107 (1 << 2)
+#define USB_WIRELESS_PHY_160 (1 << 3)
+#define USB_WIRELESS_PHY_200 (1 << 4)
+#define USB_WIRELESS_PHY_320 (1 << 5)
+#define USB_WIRELESS_PHY_400 (1 << 6)
+#define USB_WIRELESS_PHY_480 (1 << 7)
+ __u8 bmTFITXPowerInfo;
+ __u8 bmFFITXPowerInfo;
+ __le16 bmBandGroup;
+ __u8 bReserved;
+} __attribute__((packed));
+#define USB_DT_USB_WIRELESS_CAP_SIZE 11
+#define USB_CAP_TYPE_EXT 2
+struct usb_ext_cap_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __le32 bmAttributes;
+#define USB_LPM_SUPPORT (1 << 1)
+#define USB_BESL_SUPPORT (1 << 2)
+#define USB_BESL_BASELINE_VALID (1 << 3)
+#define USB_BESL_DEEP_VALID (1 << 4)
+#define USB_SET_BESL_BASELINE(p) (((p) & 0xf) << 8)
+#define USB_SET_BESL_DEEP(p) (((p) & 0xf) << 12)
+#define USB_GET_BESL_BASELINE(p) (((p) & (0xf << 8)) >> 8)
+#define USB_GET_BESL_DEEP(p) (((p) & (0xf << 12)) >> 12)
+} __attribute__((packed));
+#define USB_DT_USB_EXT_CAP_SIZE 7
+#define USB_SS_CAP_TYPE 3
+struct usb_ss_cap_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __u8 bmAttributes;
+#define USB_LTM_SUPPORT (1 << 1)
+ __le16 wSpeedSupported;
+#define USB_LOW_SPEED_OPERATION (1)
+#define USB_FULL_SPEED_OPERATION (1 << 1)
+#define USB_HIGH_SPEED_OPERATION (1 << 2)
+#define USB_5GBPS_OPERATION (1 << 3)
+ __u8 bFunctionalitySupport;
+ __u8 bU1devExitLat;
+ __le16 bU2DevExitLat;
+} __attribute__((packed));
+#define USB_DT_USB_SS_CAP_SIZE 10
+#define CONTAINER_ID_TYPE 4
+struct usb_ss_container_id_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __u8 bReserved;
+ __u8 ContainerID[16];
+} __attribute__((packed));
+#define USB_DT_USB_SS_CONTN_ID_SIZE 20
+#define USB_SSP_CAP_TYPE 0xa
+struct usb_ssp_cap_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __u8 bReserved;
+ __le32 bmAttributes;
+#define USB_SSP_SUBLINK_SPEED_ATTRIBS (0x1f << 0)
+#define USB_SSP_SUBLINK_SPEED_IDS (0xf << 5)
+ __le16 wFunctionalitySupport;
+#define USB_SSP_MIN_SUBLINK_SPEED_ATTRIBUTE_ID (0xf)
+#define USB_SSP_MIN_RX_LANE_COUNT (0xf << 8)
+#define USB_SSP_MIN_TX_LANE_COUNT (0xf << 12)
+ __le16 wReserved;
+ __le32 bmSublinkSpeedAttr[1];
+#define USB_SSP_SUBLINK_SPEED_SSID (0xf)
+#define USB_SSP_SUBLINK_SPEED_LSE (0x3 << 4)
+#define USB_SSP_SUBLINK_SPEED_ST (0x3 << 6)
+#define USB_SSP_SUBLINK_SPEED_RSVD (0x3f << 8)
+#define USB_SSP_SUBLINK_SPEED_LP (0x3 << 14)
+#define USB_SSP_SUBLINK_SPEED_LSM (0xff << 16)
+} __attribute__((packed));
+#define USB_PD_POWER_DELIVERY_CAPABILITY 0x06
+#define USB_PD_BATTERY_INFO_CAPABILITY 0x07
+#define USB_PD_PD_CONSUMER_PORT_CAPABILITY 0x08
+#define USB_PD_PD_PROVIDER_PORT_CAPABILITY 0x09
+struct usb_pd_cap_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __u8 bReserved;
+ __le32 bmAttributes;
+#define USB_PD_CAP_BATTERY_CHARGING (1 << 1)
+#define USB_PD_CAP_USB_PD (1 << 2)
+#define USB_PD_CAP_PROVIDER (1 << 3)
+#define USB_PD_CAP_CONSUMER (1 << 4)
+#define USB_PD_CAP_CHARGING_POLICY (1 << 5)
+#define USB_PD_CAP_TYPE_C_CURRENT (1 << 6)
+#define USB_PD_CAP_PWR_AC (1 << 8)
+#define USB_PD_CAP_PWR_BAT (1 << 9)
+#define USB_PD_CAP_PWR_USE_V_BUS (1 << 14)
+ __le16 bmProviderPorts;
+ __le16 bmConsumerPorts;
+ __le16 bcdBCVersion;
+ __le16 bcdPDVersion;
+ __le16 bcdUSBTypeCVersion;
+} __attribute__((packed));
+struct usb_pd_cap_battery_info_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __u8 iBattery;
+ __u8 iSerial;
+ __u8 iManufacturer;
+ __u8 bBatteryId;
+ __u8 bReserved;
+ __le32 dwChargedThreshold;
+ __le32 dwWeakThreshold;
+ __le32 dwBatteryDesignCapacity;
+ __le32 dwBatteryLastFullchargeCapacity;
+} __attribute__((packed));
+struct usb_pd_cap_consumer_port_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __u8 bReserved;
+ __u8 bmCapabilities;
+#define USB_PD_CAP_CONSUMER_BC (1 << 0)
+#define USB_PD_CAP_CONSUMER_PD (1 << 1)
+#define USB_PD_CAP_CONSUMER_TYPE_C (1 << 2)
+ __le16 wMinVoltage;
+ __le16 wMaxVoltage;
+ __u16 wReserved;
+ __le32 dwMaxOperatingPower;
+ __le32 dwMaxPeakPower;
+ __le32 dwMaxPeakPowerTime;
+#define USB_PD_CAP_CONSUMER_UNKNOWN_PEAK_POWER_TIME 0xffff
+} __attribute__((packed));
+struct usb_pd_cap_provider_port_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+ __u8 bReserved1;
+ __u8 bmCapabilities;
+#define USB_PD_CAP_PROVIDER_BC (1 << 0)
+#define USB_PD_CAP_PROVIDER_PD (1 << 1)
+#define USB_PD_CAP_PROVIDER_TYPE_C (1 << 2)
+ __u8 bNumOfPDObjects;
+ __u8 bReserved2;
+ __le32 wPowerDataObject[];
+} __attribute__((packed));
+#define USB_PTM_CAP_TYPE 0xb
+struct usb_ptm_cap_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bDevCapabilityType;
+} __attribute__((packed));
+#define USB_DT_USB_PTM_ID_SIZE 3
+#define USB_DT_USB_SSP_CAP_SIZE(ssac) (12 + (ssac + 1) * 4)
+struct usb_wireless_ep_comp_descriptor {
+ __u8 bLength;
+ __u8 bDescriptorType;
+ __u8 bMaxBurst;
+ __u8 bMaxSequence;
+ __le16 wMaxStreamDelay;
+ __le16 wOverTheAirPacketSize;
+ __u8 bOverTheAirInterval;
+ __u8 bmCompAttributes;
+#define USB_ENDPOINT_SWITCH_MASK 0x03
+#define USB_ENDPOINT_SWITCH_NO 0
+#define USB_ENDPOINT_SWITCH_SWITCH 1
+#define USB_ENDPOINT_SWITCH_SCALE 2
+} __attribute__((packed));
+struct usb_handshake {
+ __u8 bMessageNumber;
+ __u8 bStatus;
+ __u8 tTKID[3];
+ __u8 bReserved;
+ __u8 CDID[16];
+ __u8 nonce[16];
+ __u8 MIC[8];
+} __attribute__((packed));
+struct usb_connection_context {
+ __u8 CHID[16];
+ __u8 CDID[16];
+ __u8 CK[16];
+} __attribute__((packed));
+enum usb_device_speed {
+ USB_SPEED_UNKNOWN = 0,
+ USB_SPEED_LOW,
+ USB_SPEED_FULL,
+ USB_SPEED_HIGH,
+ USB_SPEED_WIRELESS,
+ USB_SPEED_SUPER,
+ USB_SPEED_SUPER_PLUS,
+};
+enum usb_device_state {
+ USB_STATE_NOTATTACHED = 0,
+ USB_STATE_ATTACHED,
+ USB_STATE_POWERED,
+ USB_STATE_RECONNECTING,
+ USB_STATE_UNAUTHENTICATED,
+ USB_STATE_DEFAULT,
+ USB_STATE_ADDRESS,
+ USB_STATE_CONFIGURED,
+ USB_STATE_SUSPENDED
+};
+enum usb3_link_state {
+ USB3_LPM_U0 = 0,
+ USB3_LPM_U1,
+ USB3_LPM_U2,
+ USB3_LPM_U3
+};
+#define USB3_LPM_DISABLED 0x0
+#define USB3_LPM_U1_MAX_TIMEOUT 0x7F
+#define USB3_LPM_U2_MAX_TIMEOUT 0xFE
+#define USB3_LPM_DEVICE_INITIATED 0xFF
+struct usb_set_sel_req {
+ __u8 u1_sel;
+ __u8 u1_pel;
+ __le16 u2_sel;
+ __le16 u2_pel;
+} __attribute__((packed));
+#define USB3_LPM_MAX_U1_SEL_PEL 0xFF
+#define USB3_LPM_MAX_U2_SEL_PEL 0xFFFF
+#define USB_SELF_POWER_VBUS_MAX_DRAW 100
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/usbdevice_fs.h b/chroot/opt/android-master/amd64/usr/include/linux/usbdevice_fs.h
new file mode 100644
index 0000000..7936ad9
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/linux/usbdevice_fs.h
@@ -0,0 +1,165 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_USBDEVICE_FS_H
+#define _UAPI_LINUX_USBDEVICE_FS_H
+#include <linux/types.h>
+#include <linux/magic.h>
+struct usbdevfs_ctrltransfer {
+ __u8 bRequestType;
+ __u8 bRequest;
+ __u16 wValue;
+ __u16 wIndex;
+ __u16 wLength;
+ __u32 timeout;
+ void __user * data;
+};
+struct usbdevfs_bulktransfer {
+ unsigned int ep;
+ unsigned int len;
+ unsigned int timeout;
+ void __user * data;
+};
+struct usbdevfs_setinterface {
+ unsigned int interface;
+ unsigned int altsetting;
+};
+struct usbdevfs_disconnectsignal {
+ unsigned int signr;
+ void __user * context;
+};
+#define USBDEVFS_MAXDRIVERNAME 255
+struct usbdevfs_getdriver {
+ unsigned int interface;
+ char driver[USBDEVFS_MAXDRIVERNAME + 1];
+};
+struct usbdevfs_connectinfo {
+ unsigned int devnum;
+ unsigned char slow;
+};
+struct usbdevfs_conninfo_ex {
+ __u32 size;
+ __u32 busnum;
+ __u32 devnum;
+ __u32 speed;
+ __u8 num_ports;
+ __u8 ports[7];
+};
+#define USBDEVFS_URB_SHORT_NOT_OK 0x01
+#define USBDEVFS_URB_ISO_ASAP 0x02
+#define USBDEVFS_URB_BULK_CONTINUATION 0x04
+#define USBDEVFS_URB_NO_FSBR 0x20
+#define USBDEVFS_URB_ZERO_PACKET 0x40
+#define USBDEVFS_URB_NO_INTERRUPT 0x80
+#define USBDEVFS_URB_TYPE_ISO 0
+#define USBDEVFS_URB_TYPE_INTERRUPT 1
+#define USBDEVFS_URB_TYPE_CONTROL 2
+#define USBDEVFS_URB_TYPE_BULK 3
+struct usbdevfs_iso_packet_desc {
+ unsigned int length;
+ unsigned int actual_length;
+ unsigned int status;
+};
+struct usbdevfs_urb {
+ unsigned char type;
+ unsigned char endpoint;
+ int status;
+ unsigned int flags;
+ void __user * buffer;
+ int buffer_length;
+ int actual_length;
+ int start_frame;
+ union {
+ int number_of_packets;
+ unsigned int stream_id;
+ };
+ int error_count;
+ unsigned int signr;
+ void __user * usercontext;
+ struct usbdevfs_iso_packet_desc iso_frame_desc[0];
+};
+struct usbdevfs_ioctl {
+ int ifno;
+ int ioctl_code;
+ void __user * data;
+};
+struct usbdevfs_hub_portinfo {
+ char nports;
+ char port[127];
+};
+#define USBDEVFS_CAP_ZERO_PACKET 0x01
+#define USBDEVFS_CAP_BULK_CONTINUATION 0x02
+#define USBDEVFS_CAP_NO_PACKET_SIZE_LIM 0x04
+#define USBDEVFS_CAP_BULK_SCATTER_GATHER 0x08
+#define USBDEVFS_CAP_REAP_AFTER_DISCONNECT 0x10
+#define USBDEVFS_CAP_MMAP 0x20
+#define USBDEVFS_CAP_DROP_PRIVILEGES 0x40
+#define USBDEVFS_CAP_CONNINFO_EX 0x80
+#define USBDEVFS_CAP_SUSPEND 0x100
+#define USBDEVFS_DISCONNECT_CLAIM_IF_DRIVER 0x01
+#define USBDEVFS_DISCONNECT_CLAIM_EXCEPT_DRIVER 0x02
+struct usbdevfs_disconnect_claim {
+ unsigned int interface;
+ unsigned int flags;
+ char driver[USBDEVFS_MAXDRIVERNAME + 1];
+};
+struct usbdevfs_streams {
+ unsigned int num_streams;
+ unsigned int num_eps;
+ unsigned char eps[0];
+};
+#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
+#define USBDEVFS_CONTROL32 _IOWR('U', 0, struct usbdevfs_ctrltransfer32)
+#define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer)
+#define USBDEVFS_BULK32 _IOWR('U', 2, struct usbdevfs_bulktransfer32)
+#define USBDEVFS_RESETEP _IOR('U', 3, unsigned int)
+#define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface)
+#define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int)
+#define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver)
+#define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb)
+#define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32)
+#define USBDEVFS_DISCARDURB _IO('U', 11)
+#define USBDEVFS_REAPURB _IOW('U', 12, void *)
+#define USBDEVFS_REAPURB32 _IOW('U', 12, __u32)
+#define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *)
+#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32)
+#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
+#define USBDEVFS_DISCSIGNAL32 _IOR('U', 14, struct usbdevfs_disconnectsignal32)
+#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
+#define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
+#define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo)
+#define USBDEVFS_IOCTL _IOWR('U', 18, struct usbdevfs_ioctl)
+#define USBDEVFS_IOCTL32 _IOWR('U', 18, struct usbdevfs_ioctl32)
+#define USBDEVFS_HUB_PORTINFO _IOR('U', 19, struct usbdevfs_hub_portinfo)
+#define USBDEVFS_RESET _IO('U', 20)
+#define USBDEVFS_CLEAR_HALT _IOR('U', 21, unsigned int)
+#define USBDEVFS_DISCONNECT _IO('U', 22)
+#define USBDEVFS_CONNECT _IO('U', 23)
+#define USBDEVFS_CLAIM_PORT _IOR('U', 24, unsigned int)
+#define USBDEVFS_RELEASE_PORT _IOR('U', 25, unsigned int)
+#define USBDEVFS_GET_CAPABILITIES _IOR('U', 26, __u32)
+#define USBDEVFS_DISCONNECT_CLAIM _IOR('U', 27, struct usbdevfs_disconnect_claim)
+#define USBDEVFS_ALLOC_STREAMS _IOR('U', 28, struct usbdevfs_streams)
+#define USBDEVFS_FREE_STREAMS _IOR('U', 29, struct usbdevfs_streams)
+#define USBDEVFS_DROP_PRIVILEGES _IOW('U', 30, __u32)
+#define USBDEVFS_GET_SPEED _IO('U', 31)
+#define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len)
+#define USBDEVFS_FORBID_SUSPEND _IO('U', 33)
+#define USBDEVFS_ALLOW_SUSPEND _IO('U', 34)
+#define USBDEVFS_WAIT_FOR_RESUME _IO('U', 35)
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/linux/uvcvideo.h b/chroot/opt/android-master/amd64/usr/include/linux/uvcvideo.h
deleted file mode 100644
index 719147a..0000000
--- a/chroot/opt/android-master/amd64/usr/include/linux/uvcvideo.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
- ****************************************************************************
- ***
- *** This header was automatically generated from a Linux kernel header
- *** of the same name, to make information necessary for userspace to
- *** call into the kernel available to libc. It contains only constants,
- *** structures, and macros generated from the original header, and thus,
- *** contains no copyrightable information.
- ***
- *** To edit the content of this header, modify the corresponding
- *** source file (e.g. under external/kernel-headers/original/) then
- *** run bionic/libc/kernel/tools/update_all.py
- ***
- *** Any manual change here will be lost the next time this script will
- *** be run. You've been warned!
- ***
- ****************************************************************************
- ****************************************************************************/
-#ifndef __LINUX_UVCVIDEO_H_
-#define __LINUX_UVCVIDEO_H_
-#include <linux/ioctl.h>
-#include <linux/types.h>
-#define UVC_CTRL_DATA_TYPE_RAW 0
-#define UVC_CTRL_DATA_TYPE_SIGNED 1
-#define UVC_CTRL_DATA_TYPE_UNSIGNED 2
-#define UVC_CTRL_DATA_TYPE_BOOLEAN 3
-#define UVC_CTRL_DATA_TYPE_ENUM 4
-#define UVC_CTRL_DATA_TYPE_BITMASK 5
-#define UVC_CTRL_FLAG_SET_CUR (1 << 0)
-#define UVC_CTRL_FLAG_GET_CUR (1 << 1)
-#define UVC_CTRL_FLAG_GET_MIN (1 << 2)
-#define UVC_CTRL_FLAG_GET_MAX (1 << 3)
-#define UVC_CTRL_FLAG_GET_RES (1 << 4)
-#define UVC_CTRL_FLAG_GET_DEF (1 << 5)
-#define UVC_CTRL_FLAG_RESTORE (1 << 6)
-#define UVC_CTRL_FLAG_AUTO_UPDATE (1 << 7)
-#define UVC_CTRL_FLAG_ASYNCHRONOUS (1 << 8)
-#define UVC_CTRL_FLAG_GET_RANGE (UVC_CTRL_FLAG_GET_CUR | UVC_CTRL_FLAG_GET_MIN | UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | UVC_CTRL_FLAG_GET_DEF)
-struct uvc_menu_info {
- __u32 value;
- __u8 name[32];
-};
-struct uvc_xu_control_mapping {
- __u32 id;
- __u8 name[32];
- __u8 entity[16];
- __u8 selector;
- __u8 size;
- __u8 offset;
- __u32 v4l2_type;
- __u32 data_type;
- struct uvc_menu_info __user * menu_info;
- __u32 menu_count;
- __u32 reserved[4];
-};
-struct uvc_xu_control_query {
- __u8 unit;
- __u8 selector;
- __u8 query;
- __u16 size;
- __u8 __user * data;
-};
-#define UVCIOC_CTRL_MAP _IOWR('u', 0x20, struct uvc_xu_control_mapping)
-#define UVCIOC_CTRL_QUERY _IOWR('u', 0x21, struct uvc_xu_control_query)
-struct uvc_meta_buf {
- __u64 ns;
- __u16 sof;
- __u8 length;
- __u8 flags;
- __u8 buf[];
-} __packed;
-#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/malloc.h b/chroot/opt/android-master/amd64/usr/include/malloc.h
deleted file mode 100644
index ba0af3c..0000000
--- a/chroot/opt/android-master/amd64/usr/include/malloc.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-/**
- * @file malloc.h
- * @brief Heap memory allocation.
- *
- * [Debugging Native Memory Use](https://source.android.com/devices/tech/debug/native-memory)
- * is the canonical source for documentation on Android's heap debugging
- * features.
- */
-
-#include <sys/cdefs.h>
-#include <stddef.h>
-#include <stdio.h>
-
-__BEGIN_DECLS
-
-#define __BIONIC_ALLOC_SIZE(...) __attribute__((__alloc_size__(__VA_ARGS__)))
-
-/**
- * [malloc(3)](http://man7.org/linux/man-pages/man3/malloc.3.html) allocates
- * memory on the heap.
- *
- * Returns a pointer to the allocated memory on success and returns a null
- * pointer and sets `errno` on failure.
- */
-void* malloc(size_t __byte_count) __mallocfunc __BIONIC_ALLOC_SIZE(1) __wur;
-
-/**
- * [calloc(3)](http://man7.org/linux/man-pages/man3/calloc.3.html) allocates
- * and clears memory on the heap.
- *
- * Returns a pointer to the allocated memory on success and returns a null
- * pointer and sets `errno` on failure.
- */
-void* calloc(size_t __item_count, size_t __item_size) __mallocfunc __BIONIC_ALLOC_SIZE(1,2) __wur;
-
-/**
- * [realloc(3)](http://man7.org/linux/man-pages/man3/realloc.3.html) resizes
- * allocated memory on the heap.
- *
- * Returns a pointer (which may be different from `__ptr`) to the resized
- * memory on success and returns a null pointer and sets `errno` on failure.
- */
-void* realloc(void* __ptr, size_t __byte_count) __BIONIC_ALLOC_SIZE(2) __wur;
-
-/**
- * [reallocarray(3)](http://man7.org/linux/man-pages/man3/realloc.3.html) resizes
- * allocated memory on the heap.
- *
- * Equivalent to `realloc(__ptr, __item_count * __item_size)` but fails if the
- * multiplication overflows.
- *
- * Returns a pointer (which may be different from `__ptr`) to the resized
- * memory on success and returns a null pointer and sets `errno` on failure.
- */
-void* reallocarray(void* __ptr, size_t __item_count, size_t __item_size) __BIONIC_ALLOC_SIZE(2, 3) __wur __INTRODUCED_IN(29);
-
-/**
- * [free(3)](http://man7.org/linux/man-pages/man3/free.3.html) deallocates
- * memory on the heap.
- */
-void free(void* __ptr);
-
-/**
- * [memalign(3)](http://man7.org/linux/man-pages/man3/memalign.3.html) allocates
- * memory on the heap with the required alignment.
- *
- * Returns a pointer to the allocated memory on success and returns a null
- * pointer and sets `errno` on failure.
- *
- * See also posix_memalign().
- */
-void* memalign(size_t __alignment, size_t __byte_count) __mallocfunc __BIONIC_ALLOC_SIZE(2) __wur;
-
-/**
- * [malloc_usable_size(3)](http://man7.org/linux/man-pages/man3/malloc_usable_size.3.html)
- * returns the actual size of the given heap block.
- *
- * Available since API level 17.
- */
-size_t malloc_usable_size(const void* __ptr) __INTRODUCED_IN(17);
-
-#ifndef STRUCT_MALLINFO_DECLARED
-#define STRUCT_MALLINFO_DECLARED 1
-struct mallinfo {
- /** Total number of non-mmapped bytes currently allocated from OS. */
- size_t arena;
- /** Number of free chunks. */
- size_t ordblks;
- /** (Unused.) */
- size_t smblks;
- /** (Unused.) */
- size_t hblks;
- /** Total number of bytes in mmapped regions. */
- size_t hblkhd;
- /** Maximum total allocated space; greater than total if trimming has occurred. */
- size_t usmblks;
- /** (Unused.) */
- size_t fsmblks;
- /** Total allocated space (normal or mmapped.) */
- size_t uordblks;
- /** Total free space. */
- size_t fordblks;
- /** Upper bound on number of bytes releasable by a trim operation. */
- size_t keepcost;
-};
-#endif
-
-/**
- * [mallinfo(3)](http://man7.org/linux/man-pages/man3/mallinfo.3.html) returns
- * information about the current state of the heap. Note that mallinfo() is
- * inherently unreliable and consider using malloc_info() instead.
- */
-struct mallinfo mallinfo(void);
-
-/**
- * [malloc_info(3)](http://man7.org/linux/man-pages/man3/malloc_info.3.html)
- * writes information about the current state of the heap to the given stream.
- *
- * The XML structure for malloc_info() is as follows:
- * ```
- * <malloc version="jemalloc-1">
- * <heap nr="INT">
- * <allocated-large>INT</allocated-large>
- * <allocated-huge>INT</allocated-huge>
- * <allocated-bins>INT</allocated-bins>
- * <bins-total>INT</bins-total>
- * <bin nr="INT">
- * <allocated>INT</allocated>
- * <nmalloc>INT</nmalloc>
- * <ndalloc>INT</ndalloc>
- * </bin>
- * <!-- more bins -->
- * </heap>
- * <!-- more heaps -->
- * </malloc>
- * ```
- *
- * Available since API level 23.
- */
-int malloc_info(int __must_be_zero, FILE* __fp) __INTRODUCED_IN(23);
-
-/**
- * mallopt() option to set the decay time. Valid values are 0 and 1.
- *
- * Available since API level 27.
- */
-#define M_DECAY_TIME (-100)
-/**
- * mallopt() option to immediately purge any memory not in use. This
- * will release the memory back to the kernel. The value is ignored.
- *
- * Available since API level 28.
- */
-#define M_PURGE (-101)
-
-/**
- * [mallopt(3)](http://man7.org/linux/man-pages/man3/mallopt.3.html) modifies
- * heap behavior. Values of `__option` are the `M_` constants from this header.
- *
- * Returns 1 on success, 0 on error.
- *
- * Available since API level 26.
- */
-int mallopt(int __option, int __value) __INTRODUCED_IN(26);
-
-/**
- * [__malloc_hook(3)](http://man7.org/linux/man-pages/man3/__malloc_hook.3.html)
- * is called to implement malloc(). By default this points to the system's
- * implementation.
- *
- * Available since API level 28.
- *
- * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
- */
-extern void* (*volatile __malloc_hook)(size_t __byte_count, const void* __caller) __INTRODUCED_IN(28);
-
-/**
- * [__realloc_hook(3)](http://man7.org/linux/man-pages/man3/__realloc_hook.3.html)
- * is called to implement realloc(). By default this points to the system's
- * implementation.
- *
- * Available since API level 28.
- *
- * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
- */
-extern void* (*volatile __realloc_hook)(void* __ptr, size_t __byte_count, const void* __caller) __INTRODUCED_IN(28);
-
-/**
- * [__free_hook(3)](http://man7.org/linux/man-pages/man3/__free_hook.3.html)
- * is called to implement free(). By default this points to the system's
- * implementation.
- *
- * Available since API level 28.
- *
- * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
- */
-extern void (*volatile __free_hook)(void* __ptr, const void* __caller) __INTRODUCED_IN(28);
-
-/**
- * [__memalign_hook(3)](http://man7.org/linux/man-pages/man3/__memalign_hook.3.html)
- * is called to implement memalign(). By default this points to the system's
- * implementation.
- *
- * Available since API level 28.
- *
- * See also: [extra documentation](https://android.googlesource.com/platform/bionic/+/master/libc/malloc_hooks/README.md)
- */
-extern void* (*volatile __memalign_hook)(size_t __alignment, size_t __byte_count, const void* __caller) __INTRODUCED_IN(28);
-
-__END_DECLS
diff --git a/chroot/opt/android-master/amd64/usr/include/mtd/ubi-user.h b/chroot/opt/android-master/amd64/usr/include/mtd/ubi-user.h
new file mode 100644
index 0000000..866fbd2
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/mtd/ubi-user.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __UBI_USER_H__
+#define __UBI_USER_H__
+#include <linux/types.h>
+#define UBI_VOL_NUM_AUTO (- 1)
+#define UBI_DEV_NUM_AUTO (- 1)
+#define UBI_MAX_VOLUME_NAME 127
+#define UBI_IOC_MAGIC 'o'
+#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req)
+#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32)
+#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req)
+#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req)
+#define UBI_IOCRPEB _IOW(UBI_IOC_MAGIC, 4, __s32)
+#define UBI_IOCSPEB _IOW(UBI_IOC_MAGIC, 5, __s32)
+#define UBI_CTRL_IOC_MAGIC 'o'
+#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req)
+#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32)
+#define UBI_VOL_IOC_MAGIC 'O'
+#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64)
+#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32)
+#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32)
+#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req)
+#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32)
+#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32)
+#define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_vol_prop_req)
+#define UBI_IOCVOLCRBLK _IOW(UBI_VOL_IOC_MAGIC, 7, struct ubi_blkcreate_req)
+#define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8)
+#define MAX_UBI_MTD_NAME_LEN 127
+#define UBI_MAX_RNVOL 32
+enum {
+ UBI_DYNAMIC_VOLUME = 3,
+ UBI_STATIC_VOLUME = 4,
+};
+enum {
+ UBI_VOL_PROP_DIRECT_WRITE = 1,
+};
+struct ubi_attach_req {
+ __s32 ubi_num;
+ __s32 mtd_num;
+ __s32 vid_hdr_offset;
+ __s16 max_beb_per1024;
+ __s8 padding[10];
+};
+enum {
+ UBI_VOL_SKIP_CRC_CHECK_FLG = 0x1,
+};
+#define UBI_VOL_VALID_FLGS (UBI_VOL_SKIP_CRC_CHECK_FLG)
+struct ubi_mkvol_req {
+ __s32 vol_id;
+ __s32 alignment;
+ __s64 bytes;
+ __s8 vol_type;
+ __u8 flags;
+ __s16 name_len;
+ __s8 padding2[4];
+ char name[UBI_MAX_VOLUME_NAME + 1];
+} __packed;
+struct ubi_rsvol_req {
+ __s64 bytes;
+ __s32 vol_id;
+} __packed;
+struct ubi_rnvol_req {
+ __s32 count;
+ __s8 padding1[12];
+ struct {
+ __s32 vol_id;
+ __s16 name_len;
+ __s8 padding2[2];
+ char name[UBI_MAX_VOLUME_NAME + 1];
+ } ents[UBI_MAX_RNVOL];
+} __packed;
+struct ubi_leb_change_req {
+ __s32 lnum;
+ __s32 bytes;
+ __s8 dtype;
+ __s8 padding[7];
+} __packed;
+struct ubi_map_req {
+ __s32 lnum;
+ __s8 dtype;
+ __s8 padding[3];
+} __packed;
+struct ubi_set_vol_prop_req {
+ __u8 property;
+ __u8 padding[7];
+ __u64 value;
+} __packed;
+struct ubi_blkcreate_req {
+ __s8 padding[128];
+} __packed;
+#endif
diff --git a/chroot/opt/android-master/amd64/usr/include/net/if_arp.h b/chroot/opt/android-master/amd64/usr/include/net/if_arp.h
new file mode 100644
index 0000000..5eae82c
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/net/if_arp.h
@@ -0,0 +1,2 @@
+#include <sys/socket.h>
+#include <linux/if_arp.h>
diff --git a/chroot/opt/android-master/amd64/usr/include/netinet/ether.h b/chroot/opt/android-master/amd64/usr/include/netinet/ether.h
new file mode 100644
index 0000000..480063d
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/netinet/ether.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 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.
+ */
+
+#pragma once
+
+/**
+ * @file netinet/ether.h
+ * @brief Ethernet (MAC) addresses.
+ */
+
+#include <sys/cdefs.h>
+#include <netinet/if_ether.h>
+
+__BEGIN_DECLS
+
+/**
+ * [ether_ntoa(3)](http://man7.org/linux/man-pages/man3/ether_ntoa.3.html) returns a string
+ * representation of the given Ethernet address.
+ *
+ * Returns a pointer to a static buffer.
+ */
+char* ether_ntoa(const struct ether_addr* __addr);
+
+/**
+ * [ether_ntoa_r(3)](http://man7.org/linux/man-pages/man3/ether_ntoa_r.3.html) returns a string
+ * representation of the given Ethernet address.
+ *
+ * Returns a pointer to the given buffer.
+ */
+char* ether_ntoa_r(const struct ether_addr* __addr, char* __buf);
+
+/**
+ * [ether_aton(3)](http://man7.org/linux/man-pages/man3/ether_aton.3.html) returns an `ether_addr`
+ * corresponding to the given Ethernet address string.
+ *
+ * Returns a pointer to a static buffer, or NULL if the given string isn't a valid MAC address.
+ */
+struct ether_addr* ether_aton(const char* __ascii);
+
+/**
+ * [ether_aton_r(3)](http://man7.org/linux/man-pages/man3/ether_aton_r.3.html) returns an
+ * `ether_addr` corresponding to the given Ethernet address string.
+ *
+ * Returns a pointer to the given buffer, or NULL if the given string isn't a valid MAC address.
+ */
+struct ether_addr* ether_aton_r(const char* __ascii, struct ether_addr* __addr);
+
+__END_DECLS
diff --git a/chroot/opt/android-master/amd64/usr/include/netinet/ip_icmp.h b/chroot/opt/android-master/amd64/usr/include/netinet/ip_icmp.h
new file mode 100644
index 0000000..d6f89bc
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/netinet/ip_icmp.h
@@ -0,0 +1,216 @@
+/* $OpenBSD: ip_icmp.h,v 1.21 2005/07/31 03:30:55 pascoe Exp $ */
+/* $NetBSD: ip_icmp.h,v 1.10 1996/02/13 23:42:28 christos Exp $ */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * 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. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+ *
+ * @(#)ip_icmp.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _NETINET_IP_ICMP_H_
+#define _NETINET_IP_ICMP_H_
+
+#include <sys/cdefs.h>
+
+#include <linux/icmp.h>
+#include <netinet/ip.h>
+
+__BEGIN_DECLS
+
+/*
+ * Interface Control Message Protocol Definitions.
+ * Per RFC 792, September 1981.
+ * RFC 950, August 1985. (Address Mask Request / Reply)
+ * RFC 1256, September 1991. (Router Advertisement and Solicitation)
+ * RFC 1108, November 1991. (Param Problem, Missing Req. Option)
+ * RFC 1393, January 1993. (Traceroute)
+ * RFC 1475, June 1993. (Datagram Conversion Error)
+ * RFC 1812, June 1995. (adm prohib, host precedence, precedence cutoff)
+ * RFC 2002, October 1996. (Mobility changes to Router Advertisement)
+ */
+
+/*
+ * ICMP Router Advertisement data
+ */
+struct icmp_ra_addr {
+ uint32_t ira_addr;
+ uint32_t ira_preference;
+};
+
+/*
+ * Structure of an icmp header.
+ */
+struct icmp {
+ uint8_t icmp_type; /* type of message, see below */
+ uint8_t icmp_code; /* type sub code */
+ uint16_t icmp_cksum; /* ones complement cksum of struct */
+ union {
+ uint8_t ih_pptr; /* ICMP_PARAMPROB */
+ struct in_addr ih_gwaddr; /* ICMP_REDIRECT */
+ struct ih_idseq {
+ uint16_t icd_id;
+ uint16_t icd_seq;
+ } ih_idseq;
+ int32_t ih_void;
+
+ /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
+ struct ih_pmtu {
+ uint16_t ipm_void;
+ uint16_t ipm_nextmtu;
+ } ih_pmtu;
+
+ struct ih_rtradv {
+ uint8_t irt_num_addrs;
+ uint8_t irt_wpa;
+ uint16_t irt_lifetime;
+ } ih_rtradv;
+ } icmp_hun;
+#define icmp_pptr icmp_hun.ih_pptr
+#define icmp_gwaddr icmp_hun.ih_gwaddr
+#define icmp_id icmp_hun.ih_idseq.icd_id
+#define icmp_seq icmp_hun.ih_idseq.icd_seq
+#define icmp_void icmp_hun.ih_void
+#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
+#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
+#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
+#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
+#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
+ union {
+ struct id_ts {
+ uint32_t its_otime;
+ uint32_t its_rtime;
+ uint32_t its_ttime;
+ } id_ts;
+ struct id_ip {
+ struct ip idi_ip;
+ /* options and then 64 bits of data */
+ } id_ip;
+ uint32_t id_mask;
+ int8_t id_data[1];
+ } icmp_dun;
+#define icmp_otime icmp_dun.id_ts.its_otime
+#define icmp_rtime icmp_dun.id_ts.its_rtime
+#define icmp_ttime icmp_dun.id_ts.its_ttime
+#define icmp_ip icmp_dun.id_ip.idi_ip
+#define icmp_mask icmp_dun.id_mask
+#define icmp_data icmp_dun.id_data
+};
+
+/*
+ * For IPv6 transition related ICMP errors.
+ */
+#define ICMP_V6ADVLENMIN (8 + sizeof(struct ip) + 40)
+#define ICMP_V6ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 40)
+
+/*
+ * Lower bounds on packet lengths for various types.
+ * For the error advice packets must first insure that the
+ * packet is large enough to contain the returned ip header.
+ * Only then can we do the check to see if 64 bits of packet
+ * data have been returned, since we need to check the returned
+ * ip header length.
+ */
+#define ICMP_MINLEN 8 /* abs minimum */
+#define ICMP_TSLEN (8 + 3 * sizeof (n_time)) /* timestamp */
+#define ICMP_MASKLEN 12 /* address mask */
+#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8) /* min */
+#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
+ /* N.B.: must separately check that ip_hl >= 5 */
+
+/*
+ * Definition of type and code field values.
+ * http://www.iana.org/assignments/icmp-parameters
+ */
+#define ICMP_ECHOREPLY 0 /* echo reply */
+#define ICMP_UNREACH 3 /* dest unreachable, codes: */
+#define ICMP_UNREACH_NET 0 /* bad net */
+#define ICMP_UNREACH_HOST 1 /* bad host */
+#define ICMP_UNREACH_PROTOCOL 2 /* bad protocol */
+#define ICMP_UNREACH_PORT 3 /* bad port */
+#define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */
+#define ICMP_UNREACH_SRCFAIL 5 /* src route failed */
+#define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */
+#define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */
+#define ICMP_UNREACH_ISOLATED 8 /* src host isolated */
+#define ICMP_UNREACH_NET_PROHIB 9 /* for crypto devs */
+#define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */
+#define ICMP_UNREACH_TOSNET 11 /* bad tos for net */
+#define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */
+#define ICMP_UNREACH_FILTER_PROHIB 13 /* prohibited access */
+#define ICMP_UNREACH_HOST_PRECEDENCE 14 /* precedence violat'n*/
+#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 /* precedence cutoff */
+#define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */
+#define ICMP_REDIRECT 5 /* shorter route, codes: */
+#define ICMP_REDIRECT_NET 0 /* for network */
+#define ICMP_REDIRECT_HOST 1 /* for host */
+#define ICMP_REDIRECT_TOSNET 2 /* for tos and net */
+#define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */
+#define ICMP_ALTHOSTADDR 6 /* alternate host address */
+#define ICMP_ECHO 8 /* echo service */
+#define ICMP_ROUTERADVERT 9 /* router advertisement */
+#define ICMP_ROUTERADVERT_NORMAL 0 /* normal advertisement */
+#define ICMP_ROUTERADVERT_NOROUTE_COMMON 16 /* selective routing */
+#define ICMP_ROUTERSOLICIT 10 /* router solicitation */
+#define ICMP_TIMXCEED 11 /* time exceeded, code: */
+#define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */
+#define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */
+#define ICMP_PARAMPROB 12 /* ip header bad */
+#define ICMP_PARAMPROB_ERRATPTR 0 /* req. opt. absent */
+#define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */
+#define ICMP_PARAMPROB_LENGTH 2 /* bad length */
+#define ICMP_TSTAMP 13 /* timestamp request */
+#define ICMP_TSTAMPREPLY 14 /* timestamp reply */
+#define ICMP_IREQ 15 /* information request */
+#define ICMP_IREQREPLY 16 /* information reply */
+#define ICMP_MASKREQ 17 /* address mask request */
+#define ICMP_MASKREPLY 18 /* address mask reply */
+#define ICMP_TRACEROUTE 30 /* traceroute */
+#define ICMP_DATACONVERR 31 /* data conversion error */
+#define ICMP_MOBILE_REDIRECT 32 /* mobile host redirect */
+#define ICMP_IPV6_WHEREAREYOU 33 /* IPv6 where-are-you */
+#define ICMP_IPV6_IAMHERE 34 /* IPv6 i-am-here */
+#define ICMP_MOBILE_REGREQUEST 35 /* mobile registration req */
+#define ICMP_MOBILE_REGREPLY 36 /* mobile registration reply */
+#define ICMP_SKIP 39 /* SKIP */
+#define ICMP_PHOTURIS 40 /* Photuris */
+#define ICMP_PHOTURIS_UNKNOWN_INDEX 1 /* unknown sec index */
+#define ICMP_PHOTURIS_AUTH_FAILED 2 /* auth failed */
+#define ICMP_PHOTURIS_DECRYPT_FAILED 3 /* decrypt failed */
+
+#define ICMP_MAXTYPE 40
+
+#define ICMP_INFOTYPE(type) \
+ ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
+ (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
+ (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
+ (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
+ (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
+
+__END_DECLS
+
+#endif /* _NETINET_IP_ICMP_H_ */
diff --git a/chroot/opt/android-master/amd64/usr/include/sys/msg.h b/chroot/opt/android-master/amd64/usr/include/sys/msg.h
new file mode 100644
index 0000000..e19452c
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/sys/msg.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 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.
+ */
+
+#pragma once
+
+/**
+ * @file sys/msg.h
+ * @brief System V message queues. Not useful on Android because it's disallowed by SELinux.
+ */
+
+#include <sys/cdefs.h>
+#include <sys/ipc.h>
+
+#include <linux/msg.h>
+
+#define msqid_ds msqid64_ds
+
+__BEGIN_DECLS
+
+typedef __kernel_ulong_t msgqnum_t;
+typedef __kernel_ulong_t msglen_t;
+
+/** Not useful on Android; disallowed by SELinux. */
+int msgctl(int __msg_id, int __cmd, struct msqid_ds* __buf) __INTRODUCED_IN(26);
+/** Not useful on Android; disallowed by SELinux. */
+int msgget(key_t __key, int __flags) __INTRODUCED_IN(26);
+/** Not useful on Android; disallowed by SELinux. */
+ssize_t msgrcv(int __msg_id, void* __msgbuf_ptr, size_t __size, long __type, int __flags) __INTRODUCED_IN(26);
+/** Not useful on Android; disallowed by SELinux. */
+int msgsnd(int __msg_id, const void* __msgbuf_ptr, size_t __size, int __flags) __INTRODUCED_IN(26);
+
+__END_DECLS
diff --git a/chroot/opt/android-master/amd64/usr/include/sys/timerfd.h b/chroot/opt/android-master/amd64/usr/include/sys/timerfd.h
new file mode 100644
index 0000000..b89941b
--- /dev/null
+++ b/chroot/opt/android-master/amd64/usr/include/sys/timerfd.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 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.
+ */
+
+#pragma once
+
+/**
+ * @file sys/timerfd.h
+ * @brief Timer file descriptors.
+ */
+
+#include <fcntl.h> /* For O_CLOEXEC and O_NONBLOCK. */
+#include <time.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+__BEGIN_DECLS
+
+/** The timerfd_create() flag for a close-on-exec file descriptor. */
+#define TFD_CLOEXEC O_CLOEXEC
+/** The timerfd_create() flag for a non-blocking file descriptor. */
+#define TFD_NONBLOCK O_NONBLOCK
+
+/**
+ * [timerfd_create(2)](http://man7.org/linux/man-pages/man2/timerfd_create.2.html) creates a
+ * timer file descriptor.
+ *
+ * Returns the new file descriptor on success, and returns -1 and sets `errno` on failure.
+ *
+ * Available since API level 19.
+ */
+int timerfd_create(clockid_t __clock, int __flags) __INTRODUCED_IN(19);
+
+/** The timerfd_settime() flag to use absolute rather than relative times. */
+#define TFD_TIMER_ABSTIME (1 << 0)
+/** The timerfd_settime() flag to cancel an absolute timer if the realtime clock changes. */
+#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
+
+/**
+ * [timerfd_settime(2)](http://man7.org/linux/man-pages/man2/timerfd_settime.2.html) starts or
+ * stops a timer.
+ *
+ * Returns 0 on success, and returns -1 and sets `errno` on failure.
+ *
+ * Available since API level 19.
+ */
+int timerfd_settime(int __fd, int __flags, const struct itimerspec* __new_value, struct itimerspec* __old_value) __INTRODUCED_IN(19);
+
+/**
+ * [timerfd_gettime(2)](http://man7.org/linux/man-pages/man2/timerfd_gettime.2.html) queries the
+ * current timer settings.
+ *
+ * Returns 0 on success, and returns -1 and sets `errno` on failure.
+ *
+ * Available since API level 19.
+ */
+int timerfd_gettime(int __fd, struct itimerspec* __current_value) __INTRODUCED_IN(19);
+
+__END_DECLS
diff --git a/chroot/opt/android-master/amd64/usr/include/system/camera.h b/chroot/opt/android-master/amd64/usr/include/system/camera.h
deleted file mode 100644
index 2ca90c3..0000000
--- a/chroot/opt/android-master/amd64/usr/include/system/camera.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H
-#define SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <cutils/native_handle.h>
-#include <hardware/hardware.h>
-#include <hardware/gralloc.h>
-
-__BEGIN_DECLS
-
-/**
- * A set of bit masks for specifying how the received preview frames are
- * handled before the previewCallback() call.
- *
- * The least significant 3 bits of an "int" value are used for this purpose:
- *
- * ..... 0 0 0
- * ^ ^ ^
- * | | |---------> determine whether the callback is enabled or not
- * | |-----------> determine whether the callback is one-shot or not
- * |-------------> determine whether the frame is copied out or not
- *
- * WARNING: When a frame is sent directly without copying, it is the frame
- * receiver's responsiblity to make sure that the frame data won't get
- * corrupted by subsequent preview frames filled by the camera. This flag is
- * recommended only when copying out data brings significant performance price
- * and the handling/processing of the received frame data is always faster than
- * the preview frame rate so that data corruption won't occur.
- *
- * For instance,
- * 1. 0x00 disables the callback. In this case, copy out and one shot bits
- * are ignored.
- * 2. 0x01 enables a callback without copying out the received frames. A
- * typical use case is the Camcorder application to avoid making costly
- * frame copies.
- * 3. 0x05 is enabling a callback with frame copied out repeatedly. A typical
- * use case is the Camera application.
- * 4. 0x07 is enabling a callback with frame copied out only once. A typical
- * use case is the Barcode scanner application.
- */
-
-enum {
- CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK = 0x01,
- CAMERA_FRAME_CALLBACK_FLAG_ONE_SHOT_MASK = 0x02,
- CAMERA_FRAME_CALLBACK_FLAG_COPY_OUT_MASK = 0x04,
- /** Typical use cases */
- CAMERA_FRAME_CALLBACK_FLAG_NOOP = 0x00,
- CAMERA_FRAME_CALLBACK_FLAG_CAMCORDER = 0x01,
- CAMERA_FRAME_CALLBACK_FLAG_CAMERA = 0x05,
- CAMERA_FRAME_CALLBACK_FLAG_BARCODE_SCANNER = 0x07
-};
-
-/** msgType in notifyCallback and dataCallback functions */
-enum {
- CAMERA_MSG_ERROR = 0x0001, // notifyCallback
- CAMERA_MSG_SHUTTER = 0x0002, // notifyCallback
- CAMERA_MSG_FOCUS = 0x0004, // notifyCallback
- CAMERA_MSG_ZOOM = 0x0008, // notifyCallback
- CAMERA_MSG_PREVIEW_FRAME = 0x0010, // dataCallback
- CAMERA_MSG_VIDEO_FRAME = 0x0020, // data_timestamp_callback
- CAMERA_MSG_POSTVIEW_FRAME = 0x0040, // dataCallback
- CAMERA_MSG_RAW_IMAGE = 0x0080, // dataCallback
- CAMERA_MSG_COMPRESSED_IMAGE = 0x0100, // dataCallback
- CAMERA_MSG_RAW_IMAGE_NOTIFY = 0x0200, // dataCallback
- // Preview frame metadata. This can be combined with
- // CAMERA_MSG_PREVIEW_FRAME in dataCallback. For example, the apps can
- // request FRAME and METADATA. Or the apps can request only FRAME or only
- // METADATA.
- CAMERA_MSG_PREVIEW_METADATA = 0x0400, // dataCallback
- // Notify on autofocus start and stop. This is useful in continuous
- // autofocus - FOCUS_MODE_CONTINUOUS_VIDEO and FOCUS_MODE_CONTINUOUS_PICTURE.
- CAMERA_MSG_FOCUS_MOVE = 0x0800, // notifyCallback
- CAMERA_MSG_ALL_MSGS = 0xFFFF
-};
-
-/** cmdType in sendCommand functions */
-enum {
- CAMERA_CMD_START_SMOOTH_ZOOM = 1,
- CAMERA_CMD_STOP_SMOOTH_ZOOM = 2,
-
- /**
- * Set the clockwise rotation of preview display (setPreviewDisplay) in
- * degrees. This affects the preview frames and the picture displayed after
- * snapshot. This method is useful for portrait mode applications. Note
- * that preview display of front-facing cameras is flipped horizontally
- * before the rotation, that is, the image is reflected along the central
- * vertical axis of the camera sensor. So the users can see themselves as
- * looking into a mirror.
- *
- * This does not affect the order of byte array of
- * CAMERA_MSG_PREVIEW_FRAME, CAMERA_MSG_VIDEO_FRAME,
- * CAMERA_MSG_POSTVIEW_FRAME, CAMERA_MSG_RAW_IMAGE, or
- * CAMERA_MSG_COMPRESSED_IMAGE. This is allowed to be set during preview
- * since API level 14.
- */
- CAMERA_CMD_SET_DISPLAY_ORIENTATION = 3,
-
- /**
- * cmdType to disable/enable shutter sound. In sendCommand passing arg1 =
- * 0 will disable, while passing arg1 = 1 will enable the shutter sound.
- */
- CAMERA_CMD_ENABLE_SHUTTER_SOUND = 4,
-
- /* cmdType to play recording sound */
- CAMERA_CMD_PLAY_RECORDING_SOUND = 5,
-
- /**
- * Start the face detection. This should be called after preview is started.
- * The camera will notify the listener of CAMERA_MSG_FACE and the detected
- * faces in the preview frame. The detected faces may be the same as the
- * previous ones. Apps should call CAMERA_CMD_STOP_FACE_DETECTION to stop
- * the face detection. This method is supported if CameraParameters
- * KEY_MAX_NUM_HW_DETECTED_FACES or KEY_MAX_NUM_SW_DETECTED_FACES is
- * bigger than 0. Hardware and software face detection should not be running
- * at the same time. If the face detection has started, apps should not send
- * this again.
- *
- * In hardware face detection mode, CameraParameters KEY_WHITE_BALANCE,
- * KEY_FOCUS_AREAS and KEY_METERING_AREAS have no effect.
- *
- * arg1 is the face detection type. It can be CAMERA_FACE_DETECTION_HW or
- * CAMERA_FACE_DETECTION_SW. If the type of face detection requested is not
- * supported, the HAL must return BAD_VALUE.
- */
- CAMERA_CMD_START_FACE_DETECTION = 6,
-
- /**
- * Stop the face detection.
- */
- CAMERA_CMD_STOP_FACE_DETECTION = 7,
-
- /**
- * Enable/disable focus move callback (CAMERA_MSG_FOCUS_MOVE). Passing
- * arg1 = 0 will disable, while passing arg1 = 1 will enable the callback.
- */
- CAMERA_CMD_ENABLE_FOCUS_MOVE_MSG = 8,
-
- /**
- * Ping camera service to see if camera hardware is released.
- *
- * When any camera method returns error, the client can use ping command
- * to see if the camera has been taken away by other clients. If the result
- * is OK, it means the camera hardware is not released. If the result
- * is not OK, the camera has been released and the existing client
- * can silently finish itself or show a dialog.
- */
- CAMERA_CMD_PING = 9,
-
- /**
- * Configure the number of video buffers used for recording. The intended
- * video buffer count for recording is passed as arg1, which must be
- * greater than 0. This command must be sent before recording is started.
- * This command returns INVALID_OPERATION error if it is sent after video
- * recording is started, or the command is not supported at all. This
- * command also returns a BAD_VALUE error if the intended video buffer
- * count is non-positive or too big to be realized.
- */
- CAMERA_CMD_SET_VIDEO_BUFFER_COUNT = 10,
-
- /**
- * Configure an explicit format to use for video recording metadata mode.
- * This can be used to switch the format from the
- * default IMPLEMENTATION_DEFINED gralloc format to some other
- * device-supported format, and the default dataspace from the BT_709 color
- * space to some other device-supported dataspace. arg1 is the HAL pixel
- * format, and arg2 is the HAL dataSpace. This command returns
- * INVALID_OPERATION error if it is sent after video recording is started,
- * or the command is not supported at all.
- *
- * If the gralloc format is set to a format other than
- * IMPLEMENTATION_DEFINED, then HALv3 devices will use gralloc usage flags
- * of SW_READ_OFTEN.
- */
- CAMERA_CMD_SET_VIDEO_FORMAT = 11
-};
-
-/** camera fatal errors */
-enum {
- CAMERA_ERROR_UNKNOWN = 1,
- /**
- * Camera was released because another client has connected to the camera.
- * The original client should call Camera::disconnect immediately after
- * getting this notification. Otherwise, the camera will be released by
- * camera service in a short time. The client should not call any method
- * (except disconnect and sending CAMERA_CMD_PING) after getting this.
- */
- CAMERA_ERROR_RELEASED = 2,
-
- /**
- * Camera was released because device policy change or the client application
- * is going to background. The client should call Camera::disconnect
- * immediately after getting this notification. Otherwise, the camera will be
- * released by camera service in a short time. The client should not call any
- * method (except disconnect and sending CAMERA_CMD_PING) after getting this.
- */
- CAMERA_ERROR_DISABLED = 3,
- CAMERA_ERROR_SERVER_DIED = 100
-};
-
-enum {
- /** The facing of the camera is opposite to that of the screen. */
- CAMERA_FACING_BACK = 0,
- /** The facing of the camera is the same as that of the screen. */
- CAMERA_FACING_FRONT = 1,
- /**
- * The facing of the camera is not fixed relative to the screen.
- * The cameras with this facing are external cameras, e.g. USB cameras.
- */
- CAMERA_FACING_EXTERNAL = 2
-};
-
-enum {
- /** Hardware face detection. It does not use much CPU. */
- CAMERA_FACE_DETECTION_HW = 0,
- /**
- * Software face detection. It uses some CPU. Applications must use
- * Camera.setPreviewTexture for preview in this mode.
- */
- CAMERA_FACE_DETECTION_SW = 1
-};
-
-/**
- * The information of a face from camera face detection.
- */
-typedef struct camera_face {
- /**
- * Bounds of the face [left, top, right, bottom]. (-1000, -1000) represents
- * the top-left of the camera field of view, and (1000, 1000) represents the
- * bottom-right of the field of view. The width and height cannot be 0 or
- * negative. This is supported by both hardware and software face detection.
- *
- * The direction is relative to the sensor orientation, that is, what the
- * sensor sees. The direction is not affected by the rotation or mirroring
- * of CAMERA_CMD_SET_DISPLAY_ORIENTATION.
- */
- int32_t rect[4];
-
- /**
- * The confidence level of the face. The range is 1 to 100. 100 is the
- * highest confidence. This is supported by both hardware and software
- * face detection.
- */
- int32_t score;
-
- /**
- * An unique id per face while the face is visible to the tracker. If
- * the face leaves the field-of-view and comes back, it will get a new
- * id. If the value is 0, id is not supported.
- */
- int32_t id;
-
- /**
- * The coordinates of the center of the left eye. The range is -1000 to
- * 1000. -2000, -2000 if this is not supported.
- */
- int32_t left_eye[2];
-
- /**
- * The coordinates of the center of the right eye. The range is -1000 to
- * 1000. -2000, -2000 if this is not supported.
- */
- int32_t right_eye[2];
-
- /**
- * The coordinates of the center of the mouth. The range is -1000 to 1000.
- * -2000, -2000 if this is not supported.
- */
- int32_t mouth[2];
-
-} camera_face_t;
-
-/**
- * The metadata of the frame data.
- */
-typedef struct camera_frame_metadata {
- /**
- * The number of detected faces in the frame.
- */
- int32_t number_of_faces;
-
- /**
- * An array of the detected faces. The length is number_of_faces.
- */
- camera_face_t *faces;
-} camera_frame_metadata_t;
-
-__END_DECLS
-
-#endif /* SYSTEM_CORE_INCLUDE_ANDROID_CAMERA_H */
diff --git a/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.0.h b/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.0.h
deleted file mode 100644
index 44913cc..0000000
--- a/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.0.h
+++ /dev/null
@@ -1,140 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-// Source: android.hardware.graphics.common@1.0
-// Location: hardware/interfaces/graphics/common/1.0/
-
-#ifndef HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_0_EXPORTED_CONSTANTS_H_
-#define HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_0_EXPORTED_CONSTANTS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- HAL_PIXEL_FORMAT_RGBA_8888 = 1,
- HAL_PIXEL_FORMAT_RGBX_8888 = 2,
- HAL_PIXEL_FORMAT_RGB_888 = 3,
- HAL_PIXEL_FORMAT_RGB_565 = 4,
- HAL_PIXEL_FORMAT_BGRA_8888 = 5,
- HAL_PIXEL_FORMAT_YCBCR_422_SP = 16,
- HAL_PIXEL_FORMAT_YCRCB_420_SP = 17,
- HAL_PIXEL_FORMAT_YCBCR_422_I = 20,
- HAL_PIXEL_FORMAT_RGBA_FP16 = 22,
- HAL_PIXEL_FORMAT_RAW16 = 32,
- HAL_PIXEL_FORMAT_BLOB = 33,
- HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED = 34,
- HAL_PIXEL_FORMAT_YCBCR_420_888 = 35,
- HAL_PIXEL_FORMAT_RAW_OPAQUE = 36,
- HAL_PIXEL_FORMAT_RAW10 = 37,
- HAL_PIXEL_FORMAT_RAW12 = 38,
- HAL_PIXEL_FORMAT_RGBA_1010102 = 43,
- HAL_PIXEL_FORMAT_Y8 = 538982489,
- HAL_PIXEL_FORMAT_Y16 = 540422489,
- HAL_PIXEL_FORMAT_YV12 = 842094169,
-} android_pixel_format_t;
-
-typedef enum {
- HAL_TRANSFORM_FLIP_H = 1, // (1 << 0)
- HAL_TRANSFORM_FLIP_V = 2, // (1 << 1)
- HAL_TRANSFORM_ROT_90 = 4, // (1 << 2)
- HAL_TRANSFORM_ROT_180 = 3, // (FLIP_H | FLIP_V)
- HAL_TRANSFORM_ROT_270 = 7, // ((FLIP_H | FLIP_V) | ROT_90)
-} android_transform_t;
-
-typedef enum {
- HAL_DATASPACE_UNKNOWN = 0,
- HAL_DATASPACE_ARBITRARY = 1,
- HAL_DATASPACE_STANDARD_SHIFT = 16,
- HAL_DATASPACE_STANDARD_MASK = 4128768, // (63 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_UNSPECIFIED = 0, // (0 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_BT709 = 65536, // (1 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_BT601_625 = 131072, // (2 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_BT601_625_UNADJUSTED = 196608, // (3 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_BT601_525 = 262144, // (4 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_BT601_525_UNADJUSTED = 327680, // (5 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_BT2020 = 393216, // (6 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_BT2020_CONSTANT_LUMINANCE = 458752, // (7 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_BT470M = 524288, // (8 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_FILM = 589824, // (9 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_DCI_P3 = 655360, // (10 << STANDARD_SHIFT)
- HAL_DATASPACE_STANDARD_ADOBE_RGB = 720896, // (11 << STANDARD_SHIFT)
- HAL_DATASPACE_TRANSFER_SHIFT = 22,
- HAL_DATASPACE_TRANSFER_MASK = 130023424, // (31 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_UNSPECIFIED = 0, // (0 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_LINEAR = 4194304, // (1 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_SRGB = 8388608, // (2 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_SMPTE_170M = 12582912, // (3 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_GAMMA2_2 = 16777216, // (4 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_GAMMA2_6 = 20971520, // (5 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_GAMMA2_8 = 25165824, // (6 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_ST2084 = 29360128, // (7 << TRANSFER_SHIFT)
- HAL_DATASPACE_TRANSFER_HLG = 33554432, // (8 << TRANSFER_SHIFT)
- HAL_DATASPACE_RANGE_SHIFT = 27,
- HAL_DATASPACE_RANGE_MASK = 939524096, // (7 << RANGE_SHIFT)
- HAL_DATASPACE_RANGE_UNSPECIFIED = 0, // (0 << RANGE_SHIFT)
- HAL_DATASPACE_RANGE_FULL = 134217728, // (1 << RANGE_SHIFT)
- HAL_DATASPACE_RANGE_LIMITED = 268435456, // (2 << RANGE_SHIFT)
- HAL_DATASPACE_RANGE_EXTENDED = 402653184, // (3 << RANGE_SHIFT)
- HAL_DATASPACE_SRGB_LINEAR = 512,
- HAL_DATASPACE_V0_SRGB_LINEAR = 138477568, // ((STANDARD_BT709 | TRANSFER_LINEAR) | RANGE_FULL)
- HAL_DATASPACE_V0_SCRGB_LINEAR =
- 406913024, // ((STANDARD_BT709 | TRANSFER_LINEAR) | RANGE_EXTENDED)
- HAL_DATASPACE_SRGB = 513,
- HAL_DATASPACE_V0_SRGB = 142671872, // ((STANDARD_BT709 | TRANSFER_SRGB) | RANGE_FULL)
- HAL_DATASPACE_V0_SCRGB = 411107328, // ((STANDARD_BT709 | TRANSFER_SRGB) | RANGE_EXTENDED)
- HAL_DATASPACE_JFIF = 257,
- HAL_DATASPACE_V0_JFIF = 146931712, // ((STANDARD_BT601_625 | TRANSFER_SMPTE_170M) | RANGE_FULL)
- HAL_DATASPACE_BT601_625 = 258,
- HAL_DATASPACE_V0_BT601_625 =
- 281149440, // ((STANDARD_BT601_625 | TRANSFER_SMPTE_170M) | RANGE_LIMITED)
- HAL_DATASPACE_BT601_525 = 259,
- HAL_DATASPACE_V0_BT601_525 =
- 281280512, // ((STANDARD_BT601_525 | TRANSFER_SMPTE_170M) | RANGE_LIMITED)
- HAL_DATASPACE_BT709 = 260,
- HAL_DATASPACE_V0_BT709 = 281083904, // ((STANDARD_BT709 | TRANSFER_SMPTE_170M) | RANGE_LIMITED)
- HAL_DATASPACE_DCI_P3_LINEAR = 139067392, // ((STANDARD_DCI_P3 | TRANSFER_LINEAR) | RANGE_FULL)
- HAL_DATASPACE_DCI_P3 = 155844608, // ((STANDARD_DCI_P3 | TRANSFER_GAMMA2_6) | RANGE_FULL)
- HAL_DATASPACE_DISPLAY_P3_LINEAR =
- 139067392, // ((STANDARD_DCI_P3 | TRANSFER_LINEAR) | RANGE_FULL)
- HAL_DATASPACE_DISPLAY_P3 = 143261696, // ((STANDARD_DCI_P3 | TRANSFER_SRGB) | RANGE_FULL)
- HAL_DATASPACE_ADOBE_RGB = 151715840, // ((STANDARD_ADOBE_RGB | TRANSFER_GAMMA2_2) | RANGE_FULL)
- HAL_DATASPACE_BT2020_LINEAR = 138805248, // ((STANDARD_BT2020 | TRANSFER_LINEAR) | RANGE_FULL)
- HAL_DATASPACE_BT2020 = 147193856, // ((STANDARD_BT2020 | TRANSFER_SMPTE_170M) | RANGE_FULL)
- HAL_DATASPACE_BT2020_PQ = 163971072, // ((STANDARD_BT2020 | TRANSFER_ST2084) | RANGE_FULL)
- HAL_DATASPACE_DEPTH = 4096,
- HAL_DATASPACE_SENSOR = 4097,
-} android_dataspace_t;
-
-typedef enum {
- HAL_COLOR_MODE_NATIVE = 0,
- HAL_COLOR_MODE_STANDARD_BT601_625 = 1,
- HAL_COLOR_MODE_STANDARD_BT601_625_UNADJUSTED = 2,
- HAL_COLOR_MODE_STANDARD_BT601_525 = 3,
- HAL_COLOR_MODE_STANDARD_BT601_525_UNADJUSTED = 4,
- HAL_COLOR_MODE_STANDARD_BT709 = 5,
- HAL_COLOR_MODE_DCI_P3 = 6,
- HAL_COLOR_MODE_SRGB = 7,
- HAL_COLOR_MODE_ADOBE_RGB = 8,
- HAL_COLOR_MODE_DISPLAY_P3 = 9,
-} android_color_mode_t;
-
-typedef enum {
- HAL_COLOR_TRANSFORM_IDENTITY = 0,
- HAL_COLOR_TRANSFORM_ARBITRARY_MATRIX = 1,
- HAL_COLOR_TRANSFORM_VALUE_INVERSE = 2,
- HAL_COLOR_TRANSFORM_GRAYSCALE = 3,
- HAL_COLOR_TRANSFORM_CORRECT_PROTANOPIA = 4,
- HAL_COLOR_TRANSFORM_CORRECT_DEUTERANOPIA = 5,
- HAL_COLOR_TRANSFORM_CORRECT_TRITANOPIA = 6,
-} android_color_transform_t;
-
-typedef enum {
- HAL_HDR_DOLBY_VISION = 1,
- HAL_HDR_HDR10 = 2,
- HAL_HDR_HLG = 3,
-} android_hdr_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_0_EXPORTED_CONSTANTS_H_
diff --git a/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.1.h b/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.1.h
deleted file mode 100644
index f95b9ba..0000000
--- a/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.1.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-// Source: android.hardware.graphics.common@1.1
-// Location: hardware/interfaces/graphics/common/1.1/
-
-#ifndef HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_1_EXPORTED_CONSTANTS_H_
-#define HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_1_EXPORTED_CONSTANTS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- HAL_PIXEL_FORMAT_DEPTH_16 = 48,
- HAL_PIXEL_FORMAT_DEPTH_24 = 49,
- HAL_PIXEL_FORMAT_DEPTH_24_STENCIL_8 = 50,
- HAL_PIXEL_FORMAT_DEPTH_32F = 51,
- HAL_PIXEL_FORMAT_DEPTH_32F_STENCIL_8 = 52,
- HAL_PIXEL_FORMAT_STENCIL_8 = 53,
- HAL_PIXEL_FORMAT_YCBCR_P010 = 54,
-} android_pixel_format_v1_1_t;
-
-typedef enum {
- HAL_DATASPACE_BT2020_ITU =
- 281411584, // ((STANDARD_BT2020 | TRANSFER_SMPTE_170M) | RANGE_LIMITED)
- HAL_DATASPACE_BT2020_ITU_PQ =
- 298188800, // ((STANDARD_BT2020 | TRANSFER_ST2084) | RANGE_LIMITED)
- HAL_DATASPACE_BT2020_ITU_HLG = 302383104, // ((STANDARD_BT2020 | TRANSFER_HLG) | RANGE_LIMITED)
- HAL_DATASPACE_BT2020_HLG = 168165376, // ((STANDARD_BT2020 | TRANSFER_HLG) | RANGE_FULL)
-} android_dataspace_v1_1_t;
-
-typedef enum {
- HAL_COLOR_MODE_BT2020 = 10,
- HAL_COLOR_MODE_BT2100_PQ = 11,
- HAL_COLOR_MODE_BT2100_HLG = 12,
-} android_color_mode_v1_1_t;
-
-typedef enum {
- HAL_RENDER_INTENT_COLORIMETRIC = 0,
- HAL_RENDER_INTENT_ENHANCE = 1,
- HAL_RENDER_INTENT_TONE_MAP_COLORIMETRIC = 2,
- HAL_RENDER_INTENT_TONE_MAP_ENHANCE = 3,
-} android_render_intent_v1_1_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_1_EXPORTED_CONSTANTS_H_
diff --git a/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.2.h b/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.2.h
deleted file mode 100644
index 2194f5e..0000000
--- a/chroot/opt/android-master/amd64/usr/include/system/graphics-base-v1.2.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-// Source: android.hardware.graphics.common@1.2
-// Location: hardware/interfaces/graphics/common/1.2/
-
-#ifndef HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_2_EXPORTED_CONSTANTS_H_
-#define HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_2_EXPORTED_CONSTANTS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- HAL_HDR_HDR10_PLUS = 4,
-} android_hdr_v1_2_t;
-
-typedef enum {
- HAL_DATASPACE_DISPLAY_BT2020 = 142999552 /* ((STANDARD_BT2020 | TRANSFER_SRGB) | RANGE_FULL) */,
- HAL_DATASPACE_DYNAMIC_DEPTH = 4098 /* 0x1002 */,
- HAL_DATASPACE_JPEG_APP_SEGMENTS = 4099 /* 0x1003 */,
- HAL_DATASPACE_HEIF = 4100 /* 0x1004 */,
-} android_dataspace_v1_2_t;
-
-typedef enum {
- HAL_PIXEL_FORMAT_HSV_888 = 55 /* 0x37 */,
-} android_pixel_format_v1_2_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // HIDL_GENERATED_ANDROID_HARDWARE_GRAPHICS_COMMON_V1_2_EXPORTED_CONSTANTS_H_
diff --git a/chroot/opt/android-master/amd64/usr/include/system/graphics-base.h b/chroot/opt/android-master/amd64/usr/include/system/graphics-base.h
deleted file mode 100644
index 92ee077..0000000
--- a/chroot/opt/android-master/amd64/usr/include/system/graphics-base.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef SYSTEM_CORE_GRAPHICS_BASE_H_
-#define SYSTEM_CORE_GRAPHICS_BASE_H_
-
-#include "graphics-base-v1.0.h"
-#include "graphics-base-v1.1.h"
-#include "graphics-base-v1.2.h"
-
-#endif // SYSTEM_CORE_GRAPHICS_BASE_H_
diff --git a/chroot/opt/android-master/amd64/usr/include/system/graphics-sw.h b/chroot/opt/android-master/amd64/usr/include/system/graphics-sw.h
deleted file mode 100644
index 9e1a88e..0000000
--- a/chroot/opt/android-master/amd64/usr/include/system/graphics-sw.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef SYSTEM_CORE_GRAPHICS_SW_H_
-#define SYSTEM_CORE_GRAPHICS_SW_H_
-
-/* Software formats not in the HAL definitions. */
-typedef enum {
- HAL_PIXEL_FORMAT_YCBCR_422_888 = 39, // 0x27
- HAL_PIXEL_FORMAT_YCBCR_444_888 = 40, // 0x28
- HAL_PIXEL_FORMAT_FLEX_RGB_888 = 41, // 0x29
- HAL_PIXEL_FORMAT_FLEX_RGBA_8888 = 42, // 0x2A
-} android_pixel_format_sw_t;
-
-/* for compatibility */
-#define HAL_PIXEL_FORMAT_YCbCr_422_888 HAL_PIXEL_FORMAT_YCBCR_422_888
-#define HAL_PIXEL_FORMAT_YCbCr_444_888 HAL_PIXEL_FORMAT_YCBCR_444_888
-
-#endif // SYSTEM_CORE_GRAPHICS_SW_H_
diff --git a/chroot/opt/android-master/amd64/usr/include/system/graphics.h b/chroot/opt/android-master/amd64/usr/include/system/graphics.h
deleted file mode 100644
index 1b6060a..0000000
--- a/chroot/opt/android-master/amd64/usr/include/system/graphics.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SYSTEM_CORE_INCLUDE_ANDROID_GRAPHICS_H
-#define SYSTEM_CORE_INCLUDE_ANDROID_GRAPHICS_H
-
-#include <stddef.h>
-#include <stdint.h>
-
-/*
- * Some of the enums are now defined in HIDL in hardware/interfaces and are
- * generated.
- */
-#include "graphics-base.h"
-#include "graphics-sw.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* for compatibility */
-#define HAL_PIXEL_FORMAT_YCbCr_420_888 HAL_PIXEL_FORMAT_YCBCR_420_888
-#define HAL_PIXEL_FORMAT_YCbCr_422_SP HAL_PIXEL_FORMAT_YCBCR_422_SP
-#define HAL_PIXEL_FORMAT_YCrCb_420_SP HAL_PIXEL_FORMAT_YCRCB_420_SP
-#define HAL_PIXEL_FORMAT_YCbCr_422_I HAL_PIXEL_FORMAT_YCBCR_422_I
-typedef android_pixel_format_t android_pixel_format;
-typedef android_transform_t android_transform;
-typedef android_dataspace_t android_dataspace;
-typedef android_color_mode_t android_color_mode;
-typedef android_color_transform_t android_color_transform;
-typedef android_hdr_t android_hdr;
-
-/*
- * If the HAL needs to create service threads to handle graphics related
- * tasks, these threads need to run at HAL_PRIORITY_URGENT_DISPLAY priority
- * if they can block the main rendering thread in any way.
- *
- * the priority of the current thread can be set with:
- *
- * #include <sys/resource.h>
- * setpriority(PRIO_PROCESS, 0, HAL_PRIORITY_URGENT_DISPLAY);
- *
- */
-
-#define HAL_PRIORITY_URGENT_DISPLAY (-8)
-
-/*
- * Structure for describing YCbCr formats for consumption by applications.
- * This is used with HAL_PIXEL_FORMAT_YCbCr_*_888.
- *
- * Buffer chroma subsampling is defined in the format.
- * e.g. HAL_PIXEL_FORMAT_YCbCr_420_888 has subsampling 4:2:0.
- *
- * Buffers must have a 8 bit depth.
- *
- * y, cb, and cr point to the first byte of their respective planes.
- *
- * Stride describes the distance in bytes from the first value of one row of
- * the image to the first value of the next row. It includes the width of the
- * image plus padding.
- * ystride is the stride of the luma plane.
- * cstride is the stride of the chroma planes.
- *
- * chroma_step is the distance in bytes from one chroma pixel value to the
- * next. This is 2 bytes for semiplanar (because chroma values are interleaved
- * and each chroma value is one byte) and 1 for planar.
- */
-
-struct android_ycbcr {
- void *y;
- void *cb;
- void *cr;
- size_t ystride;
- size_t cstride;
- size_t chroma_step;
-
- /** reserved for future use, set to 0 by gralloc's (*lock_ycbcr)() */
- uint32_t reserved[8];
-};
-
-/*
- * Structures for describing flexible YUVA/RGBA formats for consumption by
- * applications. Such flexible formats contain a plane for each component (e.g.
- * red, green, blue), where each plane is laid out in a grid-like pattern
- * occupying unique byte addresses and with consistent byte offsets between
- * neighboring pixels.
- *
- * The android_flex_layout structure is used with any pixel format that can be
- * represented by it, such as:
- * - HAL_PIXEL_FORMAT_YCbCr_*_888
- * - HAL_PIXEL_FORMAT_FLEX_RGB*_888
- * - HAL_PIXEL_FORMAT_RGB[AX]_888[8],BGRA_8888,RGB_888
- * - HAL_PIXEL_FORMAT_YV12,Y8,Y16,YCbCr_422_SP/I,YCrCb_420_SP
- * - even implementation defined formats that can be represented by
- * the structures
- *
- * Vertical increment (aka. row increment or stride) describes the distance in
- * bytes from the first pixel of one row to the first pixel of the next row
- * (below) for the component plane. This can be negative.
- *
- * Horizontal increment (aka. column or pixel increment) describes the distance
- * in bytes from one pixel to the next pixel (to the right) on the same row for
- * the component plane. This can be negative.
- *
- * Each plane can be subsampled either vertically or horizontally by
- * a power-of-two factor.
- *
- * The bit-depth of each component can be arbitrary, as long as the pixels are
- * laid out on whole bytes, in native byte-order, using the most significant
- * bits of each unit.
- */
-
-typedef enum android_flex_component {
- /* luma */
- FLEX_COMPONENT_Y = 1 << 0,
- /* chroma blue */
- FLEX_COMPONENT_Cb = 1 << 1,
- /* chroma red */
- FLEX_COMPONENT_Cr = 1 << 2,
-
- /* red */
- FLEX_COMPONENT_R = 1 << 10,
- /* green */
- FLEX_COMPONENT_G = 1 << 11,
- /* blue */
- FLEX_COMPONENT_B = 1 << 12,
-
- /* alpha */
- FLEX_COMPONENT_A = 1 << 30,
-} android_flex_component_t;
-
-typedef struct android_flex_plane {
- /* pointer to the first byte of the top-left pixel of the plane. */
- uint8_t *top_left;
-
- android_flex_component_t component;
-
- /* bits allocated for the component in each pixel. Must be a positive
- multiple of 8. */
- int32_t bits_per_component;
- /* number of the most significant bits used in the format for this
- component. Must be between 1 and bits_per_component, inclusive. */
- int32_t bits_used;
-
- /* horizontal increment */
- int32_t h_increment;
- /* vertical increment */
- int32_t v_increment;
- /* horizontal subsampling. Must be a positive power of 2. */
- int32_t h_subsampling;
- /* vertical subsampling. Must be a positive power of 2. */
- int32_t v_subsampling;
-} android_flex_plane_t;
-
-typedef enum android_flex_format {
- /* not a flexible format */
- FLEX_FORMAT_INVALID = 0x0,
- FLEX_FORMAT_Y = FLEX_COMPONENT_Y,
- FLEX_FORMAT_YCbCr = FLEX_COMPONENT_Y | FLEX_COMPONENT_Cb | FLEX_COMPONENT_Cr,
- FLEX_FORMAT_YCbCrA = FLEX_FORMAT_YCbCr | FLEX_COMPONENT_A,
- FLEX_FORMAT_RGB = FLEX_COMPONENT_R | FLEX_COMPONENT_G | FLEX_COMPONENT_B,
- FLEX_FORMAT_RGBA = FLEX_FORMAT_RGB | FLEX_COMPONENT_A,
-} android_flex_format_t;
-
-typedef struct android_flex_layout {
- /* the kind of flexible format */
- android_flex_format_t format;
-
- /* number of planes; 0 for FLEX_FORMAT_INVALID */
- uint32_t num_planes;
- /* a plane for each component; ordered in increasing component value order.
- E.g. FLEX_FORMAT_RGBA maps 0 -> R, 1 -> G, etc.
- Can be NULL for FLEX_FORMAT_INVALID */
- android_flex_plane_t *planes;
-} android_flex_layout_t;
-
-/**
- * Structure used to define depth point clouds for format HAL_PIXEL_FORMAT_BLOB
- * with dataSpace value of HAL_DATASPACE_DEPTH.
- * When locking a native buffer of the above format and dataSpace value,
- * the vaddr pointer can be cast to this structure.
- *
- * A variable-length list of (x,y,z, confidence) 3D points, as floats. (x, y,
- * z) represents a measured point's position, with the coordinate system defined
- * by the data source. Confidence represents the estimated likelihood that this
- * measurement is correct. It is between 0.f and 1.f, inclusive, with 1.f ==
- * 100% confidence.
- *
- * num_points is the number of points in the list
- *
- * xyz_points is the flexible array of floating-point values.
- * It contains (num_points) * 4 floats.
- *
- * For example:
- * android_depth_points d = get_depth_buffer();
- * struct {
- * float x; float y; float z; float confidence;
- * } firstPoint, lastPoint;
- *
- * firstPoint.x = d.xyzc_points[0];
- * firstPoint.y = d.xyzc_points[1];
- * firstPoint.z = d.xyzc_points[2];
- * firstPoint.confidence = d.xyzc_points[3];
- * lastPoint.x = d.xyzc_points[(d.num_points - 1) * 4 + 0];
- * lastPoint.y = d.xyzc_points[(d.num_points - 1) * 4 + 1];
- * lastPoint.z = d.xyzc_points[(d.num_points - 1) * 4 + 2];
- * lastPoint.confidence = d.xyzc_points[(d.num_points - 1) * 4 + 3];
- */
-
-struct android_depth_points {
- uint32_t num_points;
-
- /** reserved for future use, set to 0 by gralloc's (*lock)() */
- uint32_t reserved[8];
-
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wc99-extensions"
-#endif
- float xyzc_points[];
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#endif
-};
-
-/**
- * These structures are used to define the reference display's
- * capabilities for HDR content. Display engine can use this
- * to better tone map content to user's display.
- * Color is defined in CIE XYZ coordinates
- */
-struct android_xy_color {
- float x;
- float y;
-};
-
-struct android_smpte2086_metadata {
- struct android_xy_color displayPrimaryRed;
- struct android_xy_color displayPrimaryGreen;
- struct android_xy_color displayPrimaryBlue;
- struct android_xy_color whitePoint;
- float maxLuminance;
- float minLuminance;
-};
-
-struct android_cta861_3_metadata {
- float maxContentLightLevel;
- float maxFrameAverageLightLevel;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* SYSTEM_CORE_INCLUDE_ANDROID_GRAPHICS_H */
diff --git a/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/cpython/object.h b/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/cpython/object.h
new file mode 100644
index 0000000..5a0ac4a
--- /dev/null
+++ b/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/cpython/object.h
@@ -0,0 +1,470 @@
+#ifndef Py_CPYTHON_OBJECT_H
+# error "this header file must not be included directly"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/********************* String Literals ****************************************/
+/* This structure helps managing static strings. The basic usage goes like this:
+ Instead of doing
+
+ r = PyObject_CallMethod(o, "foo", "args", ...);
+
+ do
+
+ _Py_IDENTIFIER(foo);
+ ...
+ r = _PyObject_CallMethodId(o, &PyId_foo, "args", ...);
+
+ PyId_foo is a static variable, either on block level or file level. On first
+ usage, the string "foo" is interned, and the structures are linked. On interpreter
+ shutdown, all strings are released (through _PyUnicode_ClearStaticStrings).
+
+ Alternatively, _Py_static_string allows choosing the variable name.
+ _PyUnicode_FromId returns a borrowed reference to the interned string.
+ _PyObject_{Get,Set,Has}AttrId are __getattr__ versions using _Py_Identifier*.
+*/
+typedef struct _Py_Identifier {
+ struct _Py_Identifier *next;
+ const char* string;
+ PyObject *object;
+} _Py_Identifier;
+
+#define _Py_static_string_init(value) { .next = NULL, .string = value, .object = NULL }
+#define _Py_static_string(varname, value) static _Py_Identifier varname = _Py_static_string_init(value)
+#define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname)
+
+/* buffer interface */
+typedef struct bufferinfo {
+ void *buf;
+ PyObject *obj; /* owned reference */
+ Py_ssize_t len;
+ Py_ssize_t itemsize; /* This is Py_ssize_t so it can be
+ pointed to by strides in simple case.*/
+ int readonly;
+ int ndim;
+ char *format;
+ Py_ssize_t *shape;
+ Py_ssize_t *strides;
+ Py_ssize_t *suboffsets;
+ void *internal;
+} Py_buffer;
+
+typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
+typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
+
+typedef PyObject *(*vectorcallfunc)(PyObject *callable, PyObject *const *args,
+ size_t nargsf, PyObject *kwnames);
+
+/* Maximum number of dimensions */
+#define PyBUF_MAX_NDIM 64
+
+/* Flags for getting buffers */
+#define PyBUF_SIMPLE 0
+#define PyBUF_WRITABLE 0x0001
+/* we used to include an E, backwards compatible alias */
+#define PyBUF_WRITEABLE PyBUF_WRITABLE
+#define PyBUF_FORMAT 0x0004
+#define PyBUF_ND 0x0008
+#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
+#define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
+#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
+#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
+#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
+
+#define PyBUF_CONTIG (PyBUF_ND | PyBUF_WRITABLE)
+#define PyBUF_CONTIG_RO (PyBUF_ND)
+
+#define PyBUF_STRIDED (PyBUF_STRIDES | PyBUF_WRITABLE)
+#define PyBUF_STRIDED_RO (PyBUF_STRIDES)
+
+#define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_WRITABLE | PyBUF_FORMAT)
+#define PyBUF_RECORDS_RO (PyBUF_STRIDES | PyBUF_FORMAT)
+
+#define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_WRITABLE | PyBUF_FORMAT)
+#define PyBUF_FULL_RO (PyBUF_INDIRECT | PyBUF_FORMAT)
+
+
+#define PyBUF_READ 0x100
+#define PyBUF_WRITE 0x200
+/* End buffer interface */
+
+
+typedef struct {
+ /* Number implementations must check *both*
+ arguments for proper type and implement the necessary conversions
+ in the slot functions themselves. */
+
+ binaryfunc nb_add;
+ binaryfunc nb_subtract;
+ binaryfunc nb_multiply;
+ binaryfunc nb_remainder;
+ binaryfunc nb_divmod;
+ ternaryfunc nb_power;
+ unaryfunc nb_negative;
+ unaryfunc nb_positive;
+ unaryfunc nb_absolute;
+ inquiry nb_bool;
+ unaryfunc nb_invert;
+ binaryfunc nb_lshift;
+ binaryfunc nb_rshift;
+ binaryfunc nb_and;
+ binaryfunc nb_xor;
+ binaryfunc nb_or;
+ unaryfunc nb_int;
+ void *nb_reserved; /* the slot formerly known as nb_long */
+ unaryfunc nb_float;
+
+ binaryfunc nb_inplace_add;
+ binaryfunc nb_inplace_subtract;
+ binaryfunc nb_inplace_multiply;
+ binaryfunc nb_inplace_remainder;
+ ternaryfunc nb_inplace_power;
+ binaryfunc nb_inplace_lshift;
+ binaryfunc nb_inplace_rshift;
+ binaryfunc nb_inplace_and;
+ binaryfunc nb_inplace_xor;
+ binaryfunc nb_inplace_or;
+
+ binaryfunc nb_floor_divide;
+ binaryfunc nb_true_divide;
+ binaryfunc nb_inplace_floor_divide;
+ binaryfunc nb_inplace_true_divide;
+
+ unaryfunc nb_index;
+
+ binaryfunc nb_matrix_multiply;
+ binaryfunc nb_inplace_matrix_multiply;
+} PyNumberMethods;
+
+typedef struct {
+ lenfunc sq_length;
+ binaryfunc sq_concat;
+ ssizeargfunc sq_repeat;
+ ssizeargfunc sq_item;
+ void *was_sq_slice;
+ ssizeobjargproc sq_ass_item;
+ void *was_sq_ass_slice;
+ objobjproc sq_contains;
+
+ binaryfunc sq_inplace_concat;
+ ssizeargfunc sq_inplace_repeat;
+} PySequenceMethods;
+
+typedef struct {
+ lenfunc mp_length;
+ binaryfunc mp_subscript;
+ objobjargproc mp_ass_subscript;
+} PyMappingMethods;
+
+typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+} PyAsyncMethods;
+
+typedef struct {
+ getbufferproc bf_getbuffer;
+ releasebufferproc bf_releasebuffer;
+} PyBufferProcs;
+
+/* Allow printfunc in the tp_vectorcall_offset slot for
+ * backwards-compatibility */
+typedef Py_ssize_t printfunc;
+
+typedef struct _typeobject {
+ PyObject_VAR_HEAD
+ const char *tp_name; /* For printing, in format "<module>.<name>" */
+ Py_ssize_t tp_basicsize, tp_itemsize; /* For allocation */
+
+ /* Methods to implement standard operations */
+
+ destructor tp_dealloc;
+ Py_ssize_t tp_vectorcall_offset;
+ getattrfunc tp_getattr;
+ setattrfunc tp_setattr;
+ PyAsyncMethods *tp_as_async; /* formerly known as tp_compare (Python 2)
+ or tp_reserved (Python 3) */
+ reprfunc tp_repr;
+
+ /* Method suites for standard classes */
+
+ PyNumberMethods *tp_as_number;
+ PySequenceMethods *tp_as_sequence;
+ PyMappingMethods *tp_as_mapping;
+
+ /* More standard operations (here for binary compatibility) */
+
+ hashfunc tp_hash;
+ ternaryfunc tp_call;
+ reprfunc tp_str;
+ getattrofunc tp_getattro;
+ setattrofunc tp_setattro;
+
+ /* Functions to access object as input/output buffer */
+ PyBufferProcs *tp_as_buffer;
+
+ /* Flags to define presence of optional/expanded features */
+ unsigned long tp_flags;
+
+ const char *tp_doc; /* Documentation string */
+
+ /* Assigned meaning in release 2.0 */
+ /* call function for all accessible objects */
+ traverseproc tp_traverse;
+
+ /* delete references to contained objects */
+ inquiry tp_clear;
+
+ /* Assigned meaning in release 2.1 */
+ /* rich comparisons */
+ richcmpfunc tp_richcompare;
+
+ /* weak reference enabler */
+ Py_ssize_t tp_weaklistoffset;
+
+ /* Iterators */
+ getiterfunc tp_iter;
+ iternextfunc tp_iternext;
+
+ /* Attribute descriptor and subclassing stuff */
+ struct PyMethodDef *tp_methods;
+ struct PyMemberDef *tp_members;
+ struct PyGetSetDef *tp_getset;
+ struct _typeobject *tp_base;
+ PyObject *tp_dict;
+ descrgetfunc tp_descr_get;
+ descrsetfunc tp_descr_set;
+ Py_ssize_t tp_dictoffset;
+ initproc tp_init;
+ allocfunc tp_alloc;
+ newfunc tp_new;
+ freefunc tp_free; /* Low-level free-memory routine */
+ inquiry tp_is_gc; /* For PyObject_IS_GC */
+ PyObject *tp_bases;
+ PyObject *tp_mro; /* method resolution order */
+ PyObject *tp_cache;
+ PyObject *tp_subclasses;
+ PyObject *tp_weaklist;
+ destructor tp_del;
+
+ /* Type attribute cache version tag. Added in version 2.6 */
+ unsigned int tp_version_tag;
+
+ destructor tp_finalize;
+ vectorcallfunc tp_vectorcall;
+
+ /* bpo-37250: kept for backwards compatibility in CPython 3.8 only */
+ Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
+
+#ifdef COUNT_ALLOCS
+ /* these must be last and never explicitly initialized */
+ Py_ssize_t tp_allocs;
+ Py_ssize_t tp_frees;
+ Py_ssize_t tp_maxalloc;
+ struct _typeobject *tp_prev;
+ struct _typeobject *tp_next;
+#endif
+} PyTypeObject;
+
+/* The *real* layout of a type object when allocated on the heap */
+typedef struct _heaptypeobject {
+ /* Note: there's a dependency on the order of these members
+ in slotptr() in typeobject.c . */
+ PyTypeObject ht_type;
+ PyAsyncMethods as_async;
+ PyNumberMethods as_number;
+ PyMappingMethods as_mapping;
+ PySequenceMethods as_sequence; /* as_sequence comes after as_mapping,
+ so that the mapping wins when both
+ the mapping and the sequence define
+ a given operator (e.g. __getitem__).
+ see add_operators() in typeobject.c . */
+ PyBufferProcs as_buffer;
+ PyObject *ht_name, *ht_slots, *ht_qualname;
+ struct _dictkeysobject *ht_cached_keys;
+ /* here are optional user slots, followed by the members. */
+} PyHeapTypeObject;
+
+/* access macro to the members which are floating "behind" the object */
+#define PyHeapType_GET_MEMBERS(etype) \
+ ((PyMemberDef *)(((char *)etype) + Py_TYPE(etype)->tp_basicsize))
+
+PyAPI_FUNC(const char *) _PyType_Name(PyTypeObject *);
+PyAPI_FUNC(PyObject *) _PyType_Lookup(PyTypeObject *, PyObject *);
+PyAPI_FUNC(PyObject *) _PyType_LookupId(PyTypeObject *, _Py_Identifier *);
+PyAPI_FUNC(PyObject *) _PyObject_LookupSpecial(PyObject *, _Py_Identifier *);
+PyAPI_FUNC(PyTypeObject *) _PyType_CalculateMetaclass(PyTypeObject *, PyObject *);
+PyAPI_FUNC(PyObject *) _PyType_GetDocFromInternalDoc(const char *, const char *);
+PyAPI_FUNC(PyObject *) _PyType_GetTextSignatureFromInternalDoc(const char *, const char *);
+
+struct _Py_Identifier;
+PyAPI_FUNC(int) PyObject_Print(PyObject *, FILE *, int);
+PyAPI_FUNC(void) _Py_BreakPoint(void);
+PyAPI_FUNC(void) _PyObject_Dump(PyObject *);
+PyAPI_FUNC(int) _PyObject_IsFreed(PyObject *);
+
+PyAPI_FUNC(int) _PyObject_IsAbstract(PyObject *);
+PyAPI_FUNC(PyObject *) _PyObject_GetAttrId(PyObject *, struct _Py_Identifier *);
+PyAPI_FUNC(int) _PyObject_SetAttrId(PyObject *, struct _Py_Identifier *, PyObject *);
+PyAPI_FUNC(int) _PyObject_HasAttrId(PyObject *, struct _Py_Identifier *);
+/* Replacements of PyObject_GetAttr() and _PyObject_GetAttrId() which
+ don't raise AttributeError.
+
+ Return 1 and set *result != NULL if an attribute is found.
+ Return 0 and set *result == NULL if an attribute is not found;
+ an AttributeError is silenced.
+ Return -1 and set *result == NULL if an error other than AttributeError
+ is raised.
+*/
+PyAPI_FUNC(int) _PyObject_LookupAttr(PyObject *, PyObject *, PyObject **);
+PyAPI_FUNC(int) _PyObject_LookupAttrId(PyObject *, struct _Py_Identifier *, PyObject **);
+PyAPI_FUNC(PyObject **) _PyObject_GetDictPtr(PyObject *);
+PyAPI_FUNC(PyObject *) _PyObject_NextNotImplemented(PyObject *);
+PyAPI_FUNC(void) PyObject_CallFinalizer(PyObject *);
+PyAPI_FUNC(int) PyObject_CallFinalizerFromDealloc(PyObject *);
+
+/* Same as PyObject_Generic{Get,Set}Attr, but passing the attributes
+ dict as the last parameter. */
+PyAPI_FUNC(PyObject *)
+_PyObject_GenericGetAttrWithDict(PyObject *, PyObject *, PyObject *, int);
+PyAPI_FUNC(int)
+_PyObject_GenericSetAttrWithDict(PyObject *, PyObject *,
+ PyObject *, PyObject *);
+
+#define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0)
+
+static inline void _Py_Dealloc_inline(PyObject *op)
+{
+ destructor dealloc = Py_TYPE(op)->tp_dealloc;
+#ifdef Py_TRACE_REFS
+ _Py_ForgetReference(op);
+#else
+ _Py_INC_TPFREES(op);
+#endif
+ (*dealloc)(op);
+}
+#define _Py_Dealloc(op) _Py_Dealloc_inline(op)
+
+
+/* Safely decref `op` and set `op` to `op2`.
+ *
+ * As in case of Py_CLEAR "the obvious" code can be deadly:
+ *
+ * Py_DECREF(op);
+ * op = op2;
+ *
+ * The safe way is:
+ *
+ * Py_SETREF(op, op2);
+ *
+ * That arranges to set `op` to `op2` _before_ decref'ing, so that any code
+ * triggered as a side-effect of `op` getting torn down no longer believes
+ * `op` points to a valid object.
+ *
+ * Py_XSETREF is a variant of Py_SETREF that uses Py_XDECREF instead of
+ * Py_DECREF.
+ */
+
+#define Py_SETREF(op, op2) \
+ do { \
+ PyObject *_py_tmp = _PyObject_CAST(op); \
+ (op) = (op2); \
+ Py_DECREF(_py_tmp); \
+ } while (0)
+
+#define Py_XSETREF(op, op2) \
+ do { \
+ PyObject *_py_tmp = _PyObject_CAST(op); \
+ (op) = (op2); \
+ Py_XDECREF(_py_tmp); \
+ } while (0)
+
+
+PyAPI_DATA(PyTypeObject) _PyNone_Type;
+PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
+
+/* Maps Py_LT to Py_GT, ..., Py_GE to Py_LE.
+ * Defined in object.c.
+ */
+PyAPI_DATA(int) _Py_SwappedOp[];
+
+/* This is the old private API, invoked by the macros before 3.2.4.
+ Kept for binary compatibility of extensions using the stable ABI. */
+PyAPI_FUNC(void) _PyTrash_deposit_object(PyObject*);
+PyAPI_FUNC(void) _PyTrash_destroy_chain(void);
+
+PyAPI_FUNC(void)
+_PyDebugAllocatorStats(FILE *out, const char *block_name, int num_blocks,
+ size_t sizeof_block);
+PyAPI_FUNC(void)
+_PyObject_DebugTypeStats(FILE *out);
+
+/* Define a pair of assertion macros:
+ _PyObject_ASSERT_FROM(), _PyObject_ASSERT_WITH_MSG() and _PyObject_ASSERT().
+
+ These work like the regular C assert(), in that they will abort the
+ process with a message on stderr if the given condition fails to hold,
+ but compile away to nothing if NDEBUG is defined.
+
+ However, before aborting, Python will also try to call _PyObject_Dump() on
+ the given object. This may be of use when investigating bugs in which a
+ particular object is corrupt (e.g. buggy a tp_visit method in an extension
+ module breaking the garbage collector), to help locate the broken objects.
+
+ The WITH_MSG variant allows you to supply an additional message that Python
+ will attempt to print to stderr, after the object dump. */
+#ifdef NDEBUG
+ /* No debugging: compile away the assertions: */
+# define _PyObject_ASSERT_FROM(obj, expr, msg, filename, lineno, func) \
+ ((void)0)
+#else
+ /* With debugging: generate checks: */
+# define _PyObject_ASSERT_FROM(obj, expr, msg, filename, lineno, func) \
+ ((expr) \
+ ? (void)(0) \
+ : _PyObject_AssertFailed((obj), Py_STRINGIFY(expr), \
+ (msg), (filename), (lineno), (func)))
+#endif
+
+#define _PyObject_ASSERT_WITH_MSG(obj, expr, msg) \
+ _PyObject_ASSERT_FROM(obj, expr, msg, __FILE__, __LINE__, __func__)
+#define _PyObject_ASSERT(obj, expr) \
+ _PyObject_ASSERT_WITH_MSG(obj, expr, NULL)
+
+#define _PyObject_ASSERT_FAILED_MSG(obj, msg) \
+ _PyObject_AssertFailed((obj), NULL, (msg), __FILE__, __LINE__, __func__)
+
+/* Declare and define _PyObject_AssertFailed() even when NDEBUG is defined,
+ to avoid causing compiler/linker errors when building extensions without
+ NDEBUG against a Python built with NDEBUG defined.
+
+ msg, expr and function can be NULL. */
+PyAPI_FUNC(void) _PyObject_AssertFailed(
+ PyObject *obj,
+ const char *expr,
+ const char *msg,
+ const char *file,
+ int line,
+ const char *function);
+
+/* Check if an object is consistent. For example, ensure that the reference
+ counter is greater than or equal to 1, and ensure that ob_type is not NULL.
+
+ Call _PyObject_AssertFailed() if the object is inconsistent.
+
+ If check_content is zero, only check header fields: reduce the overhead.
+
+ The function always return 1. The return value is just here to be able to
+ write:
+
+ assert(_PyObject_CheckConsistency(obj, 1)); */
+PyAPI_FUNC(int) _PyObject_CheckConsistency(
+ PyObject *op,
+ int check_content);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/object.h b/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/object.h
new file mode 100644
index 0000000..cc98d8a
--- /dev/null
+++ b/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/object.h
@@ -0,0 +1,753 @@
+#ifndef Py_OBJECT_H
+#define Py_OBJECT_H
+
+#include "pymem.h" /* _Py_tracemalloc_config */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Object and type object interface */
+
+/*
+Objects are structures allocated on the heap. Special rules apply to
+the use of objects to ensure they are properly garbage-collected.
+Objects are never allocated statically or on the stack; they must be
+accessed through special macros and functions only. (Type objects are
+exceptions to the first rule; the standard types are represented by
+statically initialized type objects, although work on type/class unification
+for Python 2.2 made it possible to have heap-allocated type objects too).
+
+An object has a 'reference count' that is increased or decreased when a
+pointer to the object is copied or deleted; when the reference count
+reaches zero there are no references to the object left and it can be
+removed from the heap.
+
+An object has a 'type' that determines what it represents and what kind
+of data it contains. An object's type is fixed when it is created.
+Types themselves are represented as objects; an object contains a
+pointer to the corresponding type object. The type itself has a type
+pointer pointing to the object representing the type 'type', which
+contains a pointer to itself!).
+
+Objects do not float around in memory; once allocated an object keeps
+the same size and address. Objects that must hold variable-size data
+can contain pointers to variable-size parts of the object. Not all
+objects of the same type have the same size; but the size cannot change
+after allocation. (These restrictions are made so a reference to an
+object can be simply a pointer -- moving an object would require
+updating all the pointers, and changing an object's size would require
+moving it if there was another object right next to it.)
+
+Objects are always accessed through pointers of the type 'PyObject *'.
+The type 'PyObject' is a structure that only contains the reference count
+and the type pointer. The actual memory allocated for an object
+contains other data that can only be accessed after casting the pointer
+to a pointer to a longer structure type. This longer type must start
+with the reference count and type fields; the macro PyObject_HEAD should be
+used for this (to accommodate for future changes). The implementation
+of a particular object type can cast the object pointer to the proper
+type and back.
+
+A standard interface exists for objects that contain an array of items
+whose size is determined when the object is allocated.
+*/
+
+/* Py_DEBUG implies Py_REF_DEBUG. */
+#if defined(Py_DEBUG) && !defined(Py_REF_DEBUG)
+#define Py_REF_DEBUG
+#endif
+
+#if defined(Py_LIMITED_API) && defined(Py_REF_DEBUG)
+#error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG
+#endif
+
+
+#ifdef Py_TRACE_REFS
+/* Define pointers to support a doubly-linked list of all live heap objects. */
+#define _PyObject_HEAD_EXTRA \
+ struct _object *_ob_next; \
+ struct _object *_ob_prev;
+
+#define _PyObject_EXTRA_INIT 0, 0,
+
+#else
+#define _PyObject_HEAD_EXTRA
+#define _PyObject_EXTRA_INIT
+#endif
+
+/* PyObject_HEAD defines the initial segment of every PyObject. */
+#define PyObject_HEAD PyObject ob_base;
+
+#define PyObject_HEAD_INIT(type) \
+ { _PyObject_EXTRA_INIT \
+ 1, type },
+
+#define PyVarObject_HEAD_INIT(type, size) \
+ { PyObject_HEAD_INIT(type) size },
+
+/* PyObject_VAR_HEAD defines the initial segment of all variable-size
+ * container objects. These end with a declaration of an array with 1
+ * element, but enough space is malloc'ed so that the array actually
+ * has room for ob_size elements. Note that ob_size is an element count,
+ * not necessarily a byte count.
+ */
+#define PyObject_VAR_HEAD PyVarObject ob_base;
+#define Py_INVALID_SIZE (Py_ssize_t)-1
+
+/* Nothing is actually declared to be a PyObject, but every pointer to
+ * a Python object can be cast to a PyObject*. This is inheritance built
+ * by hand. Similarly every pointer to a variable-size Python object can,
+ * in addition, be cast to PyVarObject*.
+ */
+typedef struct _object {
+ _PyObject_HEAD_EXTRA
+ Py_ssize_t ob_refcnt;
+ struct _typeobject *ob_type;
+} PyObject;
+
+/* Cast argument to PyObject* type. */
+#define _PyObject_CAST(op) ((PyObject*)(op))
+
+typedef struct {
+ PyObject ob_base;
+ Py_ssize_t ob_size; /* Number of items in variable part */
+} PyVarObject;
+
+/* Cast argument to PyVarObject* type. */
+#define _PyVarObject_CAST(op) ((PyVarObject*)(op))
+
+#define Py_REFCNT(ob) (_PyObject_CAST(ob)->ob_refcnt)
+#define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type)
+#define Py_SIZE(ob) (_PyVarObject_CAST(ob)->ob_size)
+
+/*
+Type objects contain a string containing the type name (to help somewhat
+in debugging), the allocation parameters (see PyObject_New() and
+PyObject_NewVar()),
+and methods for accessing objects of the type. Methods are optional, a
+nil pointer meaning that particular kind of access is not available for
+this type. The Py_DECREF() macro uses the tp_dealloc method without
+checking for a nil pointer; it should always be implemented except if
+the implementation can guarantee that the reference count will never
+reach zero (e.g., for statically allocated type objects).
+
+NB: the methods for certain type groups are now contained in separate
+method blocks.
+*/
+
+typedef PyObject * (*unaryfunc)(PyObject *);
+typedef PyObject * (*binaryfunc)(PyObject *, PyObject *);
+typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *);
+typedef int (*inquiry)(PyObject *);
+typedef Py_ssize_t (*lenfunc)(PyObject *);
+typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t);
+typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t);
+typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *);
+typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
+typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *);
+
+typedef int (*objobjproc)(PyObject *, PyObject *);
+typedef int (*visitproc)(PyObject *, void *);
+typedef int (*traverseproc)(PyObject *, visitproc, void *);
+
+
+typedef void (*freefunc)(void *);
+typedef void (*destructor)(PyObject *);
+typedef PyObject *(*getattrfunc)(PyObject *, char *);
+typedef PyObject *(*getattrofunc)(PyObject *, PyObject *);
+typedef int (*setattrfunc)(PyObject *, char *, PyObject *);
+typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *);
+typedef PyObject *(*reprfunc)(PyObject *);
+typedef Py_hash_t (*hashfunc)(PyObject *);
+typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int);
+typedef PyObject *(*getiterfunc) (PyObject *);
+typedef PyObject *(*iternextfunc) (PyObject *);
+typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *);
+typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *);
+typedef int (*initproc)(PyObject *, PyObject *, PyObject *);
+typedef PyObject *(*newfunc)(struct _typeobject *, PyObject *, PyObject *);
+typedef PyObject *(*allocfunc)(struct _typeobject *, Py_ssize_t);
+
+#ifdef Py_LIMITED_API
+/* In Py_LIMITED_API, PyTypeObject is an opaque structure. */
+typedef struct _typeobject PyTypeObject;
+#else
+/* PyTypeObject is defined in cpython/object.h */
+#endif
+
+typedef struct{
+ int slot; /* slot id, see below */
+ void *pfunc; /* function pointer */
+} PyType_Slot;
+
+typedef struct{
+ const char* name;
+ int basicsize;
+ int itemsize;
+ unsigned int flags;
+ PyType_Slot *slots; /* terminated by slot==0. */
+} PyType_Spec;
+
+PyAPI_FUNC(PyObject*) PyType_FromSpec(PyType_Spec*);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
+PyAPI_FUNC(PyObject*) PyType_FromSpecWithBases(PyType_Spec*, PyObject*);
+#endif
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03040000
+PyAPI_FUNC(void*) PyType_GetSlot(struct _typeobject*, int);
+#endif
+
+/* Generic type check */
+PyAPI_FUNC(int) PyType_IsSubtype(struct _typeobject *, struct _typeobject *);
+#define PyObject_TypeCheck(ob, tp) \
+ (Py_TYPE(ob) == (tp) || PyType_IsSubtype(Py_TYPE(ob), (tp)))
+
+PyAPI_DATA(struct _typeobject) PyType_Type; /* built-in 'type' */
+PyAPI_DATA(struct _typeobject) PyBaseObject_Type; /* built-in 'object' */
+PyAPI_DATA(struct _typeobject) PySuper_Type; /* built-in 'super' */
+
+PyAPI_FUNC(unsigned long) PyType_GetFlags(struct _typeobject*);
+
+#define PyType_Check(op) \
+ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS)
+#define PyType_CheckExact(op) (Py_TYPE(op) == &PyType_Type)
+
+PyAPI_FUNC(int) PyType_Ready(struct _typeobject *);
+PyAPI_FUNC(PyObject *) PyType_GenericAlloc(struct _typeobject *, Py_ssize_t);
+PyAPI_FUNC(PyObject *) PyType_GenericNew(struct _typeobject *,
+ PyObject *, PyObject *);
+PyAPI_FUNC(unsigned int) PyType_ClearCache(void);
+PyAPI_FUNC(void) PyType_Modified(struct _typeobject *);
+
+/* Generic operations on objects */
+PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
+PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *);
+PyAPI_FUNC(PyObject *) PyObject_ASCII(PyObject *);
+PyAPI_FUNC(PyObject *) PyObject_Bytes(PyObject *);
+PyAPI_FUNC(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);
+PyAPI_FUNC(int) PyObject_RichCompareBool(PyObject *, PyObject *, int);
+PyAPI_FUNC(PyObject *) PyObject_GetAttrString(PyObject *, const char *);
+PyAPI_FUNC(int) PyObject_SetAttrString(PyObject *, const char *, PyObject *);
+PyAPI_FUNC(int) PyObject_HasAttrString(PyObject *, const char *);
+PyAPI_FUNC(PyObject *) PyObject_GetAttr(PyObject *, PyObject *);
+PyAPI_FUNC(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *);
+PyAPI_FUNC(int) PyObject_HasAttr(PyObject *, PyObject *);
+PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *);
+PyAPI_FUNC(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *);
+PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *,
+ PyObject *, PyObject *);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
+PyAPI_FUNC(int) PyObject_GenericSetDict(PyObject *, PyObject *, void *);
+#endif
+PyAPI_FUNC(Py_hash_t) PyObject_Hash(PyObject *);
+PyAPI_FUNC(Py_hash_t) PyObject_HashNotImplemented(PyObject *);
+PyAPI_FUNC(int) PyObject_IsTrue(PyObject *);
+PyAPI_FUNC(int) PyObject_Not(PyObject *);
+PyAPI_FUNC(int) PyCallable_Check(PyObject *);
+PyAPI_FUNC(void) PyObject_ClearWeakRefs(PyObject *);
+
+/* PyObject_Dir(obj) acts like Python builtins.dir(obj), returning a
+ list of strings. PyObject_Dir(NULL) is like builtins.dir(),
+ returning the names of the current locals. In this case, if there are
+ no current locals, NULL is returned, and PyErr_Occurred() is false.
+*/
+PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *);
+
+
+/* Helpers for printing recursive container types */
+PyAPI_FUNC(int) Py_ReprEnter(PyObject *);
+PyAPI_FUNC(void) Py_ReprLeave(PyObject *);
+
+/* Flag bits for printing: */
+#define Py_PRINT_RAW 1 /* No string quotes etc. */
+
+/*
+Type flags (tp_flags)
+
+These flags are used to change expected features and behavior for a
+particular type.
+
+Arbitration of the flag bit positions will need to be coordinated among
+all extension writers who publicly release their extensions (this will
+be fewer than you might expect!).
+
+Most flags were removed as of Python 3.0 to make room for new flags. (Some
+flags are not for backwards compatibility but to indicate the presence of an
+optional feature; these flags remain of course.)
+
+Type definitions should use Py_TPFLAGS_DEFAULT for their tp_flags value.
+
+Code can use PyType_HasFeature(type_ob, flag_value) to test whether the
+given type object has a specified feature.
+*/
+
+/* Set if the type object is dynamically allocated */
+#define Py_TPFLAGS_HEAPTYPE (1UL << 9)
+
+/* Set if the type allows subclassing */
+#define Py_TPFLAGS_BASETYPE (1UL << 10)
+
+/* Set if the type implements the vectorcall protocol (PEP 590) */
+#ifndef Py_LIMITED_API
+#define _Py_TPFLAGS_HAVE_VECTORCALL (1UL << 11)
+#endif
+
+/* Set if the type is 'ready' -- fully initialized */
+#define Py_TPFLAGS_READY (1UL << 12)
+
+/* Set while the type is being 'readied', to prevent recursive ready calls */
+#define Py_TPFLAGS_READYING (1UL << 13)
+
+/* Objects support garbage collection (see objimpl.h) */
+#define Py_TPFLAGS_HAVE_GC (1UL << 14)
+
+/* These two bits are preserved for Stackless Python, next after this is 17 */
+#ifdef STACKLESS
+#define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION (3UL << 15)
+#else
+#define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION 0
+#endif
+
+/* Objects behave like an unbound method */
+#define Py_TPFLAGS_METHOD_DESCRIPTOR (1UL << 17)
+
+/* Objects support type attribute cache */
+#define Py_TPFLAGS_HAVE_VERSION_TAG (1UL << 18)
+#define Py_TPFLAGS_VALID_VERSION_TAG (1UL << 19)
+
+/* Type is abstract and cannot be instantiated */
+#define Py_TPFLAGS_IS_ABSTRACT (1UL << 20)
+
+/* These flags are used to determine if a type is a subclass. */
+#define Py_TPFLAGS_LONG_SUBCLASS (1UL << 24)
+#define Py_TPFLAGS_LIST_SUBCLASS (1UL << 25)
+#define Py_TPFLAGS_TUPLE_SUBCLASS (1UL << 26)
+#define Py_TPFLAGS_BYTES_SUBCLASS (1UL << 27)
+#define Py_TPFLAGS_UNICODE_SUBCLASS (1UL << 28)
+#define Py_TPFLAGS_DICT_SUBCLASS (1UL << 29)
+#define Py_TPFLAGS_BASE_EXC_SUBCLASS (1UL << 30)
+#define Py_TPFLAGS_TYPE_SUBCLASS (1UL << 31)
+
+#define Py_TPFLAGS_DEFAULT ( \
+ Py_TPFLAGS_HAVE_STACKLESS_EXTENSION | \
+ Py_TPFLAGS_HAVE_VERSION_TAG | \
+ 0)
+
+/* NOTE: The following flags reuse lower bits (removed as part of the
+ * Python 3.0 transition). */
+
+/* The following flag is kept for compatibility. Starting with 3.8,
+ * binary compatibility of C extensions accross feature releases of
+ * Python is not supported anymore, except when using the stable ABI.
+ */
+
+/* Type structure has tp_finalize member (3.4) */
+#define Py_TPFLAGS_HAVE_FINALIZE (1UL << 0)
+
+#ifdef Py_LIMITED_API
+# define PyType_HasFeature(t,f) ((PyType_GetFlags(t) & (f)) != 0)
+#endif
+#define PyType_FastSubclass(t,f) PyType_HasFeature(t,f)
+
+
+/*
+The macros Py_INCREF(op) and Py_DECREF(op) are used to increment or decrement
+reference counts. Py_DECREF calls the object's deallocator function when
+the refcount falls to 0; for
+objects that don't contain references to other objects or heap memory
+this can be the standard function free(). Both macros can be used
+wherever a void expression is allowed. The argument must not be a
+NULL pointer. If it may be NULL, use Py_XINCREF/Py_XDECREF instead.
+The macro _Py_NewReference(op) initialize reference counts to 1, and
+in special builds (Py_REF_DEBUG, Py_TRACE_REFS) performs additional
+bookkeeping appropriate to the special build.
+
+We assume that the reference count field can never overflow; this can
+be proven when the size of the field is the same as the pointer size, so
+we ignore the possibility. Provided a C int is at least 32 bits (which
+is implicitly assumed in many parts of this code), that's enough for
+about 2**31 references to an object.
+
+XXX The following became out of date in Python 2.2, but I'm not sure
+XXX what the full truth is now. Certainly, heap-allocated type objects
+XXX can and should be deallocated.
+Type objects should never be deallocated; the type pointer in an object
+is not considered to be a reference to the type object, to save
+complications in the deallocation function. (This is actually a
+decision that's up to the implementer of each new type so if you want,
+you can count such references to the type object.)
+*/
+
+/* First define a pile of simple helper macros, one set per special
+ * build symbol. These either expand to the obvious things, or to
+ * nothing at all when the special mode isn't in effect. The main
+ * macros can later be defined just once then, yet expand to different
+ * things depending on which special build options are and aren't in effect.
+ * Trust me <wink>: while painful, this is 20x easier to understand than,
+ * e.g, defining _Py_NewReference five different times in a maze of nested
+ * #ifdefs (we used to do that -- it was impenetrable).
+ */
+#ifdef Py_REF_DEBUG
+PyAPI_DATA(Py_ssize_t) _Py_RefTotal;
+PyAPI_FUNC(void) _Py_NegativeRefcount(const char *filename, int lineno,
+ PyObject *op);
+PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void);
+#define _Py_INC_REFTOTAL _Py_RefTotal++
+#define _Py_DEC_REFTOTAL _Py_RefTotal--
+
+/* Py_REF_DEBUG also controls the display of refcounts and memory block
+ * allocations at the interactive prompt and at interpreter shutdown
+ */
+PyAPI_FUNC(void) _PyDebug_PrintTotalRefs(void);
+#else
+#define _Py_INC_REFTOTAL
+#define _Py_DEC_REFTOTAL
+#endif /* Py_REF_DEBUG */
+
+#ifdef COUNT_ALLOCS
+PyAPI_FUNC(void) _Py_inc_count(struct _typeobject *);
+PyAPI_FUNC(void) _Py_dec_count(struct _typeobject *);
+#define _Py_INC_TPALLOCS(OP) _Py_inc_count(Py_TYPE(OP))
+#define _Py_INC_TPFREES(OP) _Py_dec_count(Py_TYPE(OP))
+#define _Py_DEC_TPFREES(OP) Py_TYPE(OP)->tp_frees--
+#define _Py_COUNT_ALLOCS_COMMA ,
+#else
+#define _Py_INC_TPALLOCS(OP)
+#define _Py_INC_TPFREES(OP)
+#define _Py_DEC_TPFREES(OP)
+#define _Py_COUNT_ALLOCS_COMMA
+#endif /* COUNT_ALLOCS */
+
+/* Update the Python traceback of an object. This function must be called
+ when a memory block is reused from a free list. */
+PyAPI_FUNC(int) _PyTraceMalloc_NewReference(PyObject *op);
+
+#ifdef Py_TRACE_REFS
+/* Py_TRACE_REFS is such major surgery that we call external routines. */
+PyAPI_FUNC(void) _Py_NewReference(PyObject *);
+PyAPI_FUNC(void) _Py_ForgetReference(PyObject *);
+PyAPI_FUNC(void) _Py_PrintReferences(FILE *);
+PyAPI_FUNC(void) _Py_PrintReferenceAddresses(FILE *);
+PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force);
+#else
+/* Without Py_TRACE_REFS, there's little enough to do that we expand code
+ inline. */
+static inline void _Py_NewReference(PyObject *op)
+{
+ if (_Py_tracemalloc_config.tracing) {
+ _PyTraceMalloc_NewReference(op);
+ }
+ _Py_INC_TPALLOCS(op);
+ _Py_INC_REFTOTAL;
+ Py_REFCNT(op) = 1;
+}
+
+static inline void _Py_ForgetReference(PyObject *op)
+{
+ (void)op; /* may be unused, shut up -Wunused-parameter */
+ _Py_INC_TPFREES(op);
+}
+#endif /* !Py_TRACE_REFS */
+
+
+PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
+
+static inline void _Py_INCREF(PyObject *op)
+{
+ _Py_INC_REFTOTAL;
+ op->ob_refcnt++;
+}
+
+#define Py_INCREF(op) _Py_INCREF(_PyObject_CAST(op))
+
+static inline void _Py_DECREF(const char *filename, int lineno,
+ PyObject *op)
+{
+ (void)filename; /* may be unused, shut up -Wunused-parameter */
+ (void)lineno; /* may be unused, shut up -Wunused-parameter */
+ _Py_DEC_REFTOTAL;
+ if (--op->ob_refcnt != 0) {
+#ifdef Py_REF_DEBUG
+ if (op->ob_refcnt < 0) {
+ _Py_NegativeRefcount(filename, lineno, op);
+ }
+#endif
+ }
+ else {
+ _Py_Dealloc(op);
+ }
+}
+
+#define Py_DECREF(op) _Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
+
+
+/* Safely decref `op` and set `op` to NULL, especially useful in tp_clear
+ * and tp_dealloc implementations.
+ *
+ * Note that "the obvious" code can be deadly:
+ *
+ * Py_XDECREF(op);
+ * op = NULL;
+ *
+ * Typically, `op` is something like self->containee, and `self` is done
+ * using its `containee` member. In the code sequence above, suppose
+ * `containee` is non-NULL with a refcount of 1. Its refcount falls to
+ * 0 on the first line, which can trigger an arbitrary amount of code,
+ * possibly including finalizers (like __del__ methods or weakref callbacks)
+ * coded in Python, which in turn can release the GIL and allow other threads
+ * to run, etc. Such code may even invoke methods of `self` again, or cause
+ * cyclic gc to trigger, but-- oops! --self->containee still points to the
+ * object being torn down, and it may be in an insane state while being torn
+ * down. This has in fact been a rich historic source of miserable (rare &
+ * hard-to-diagnose) segfaulting (and other) bugs.
+ *
+ * The safe way is:
+ *
+ * Py_CLEAR(op);
+ *
+ * That arranges to set `op` to NULL _before_ decref'ing, so that any code
+ * triggered as a side-effect of `op` getting torn down no longer believes
+ * `op` points to a valid object.
+ *
+ * There are cases where it's safe to use the naive code, but they're brittle.
+ * For example, if `op` points to a Python integer, you know that destroying
+ * one of those can't cause problems -- but in part that relies on that
+ * Python integers aren't currently weakly referencable. Best practice is
+ * to use Py_CLEAR() even if you can't think of a reason for why you need to.
+ */
+#define Py_CLEAR(op) \
+ do { \
+ PyObject *_py_tmp = _PyObject_CAST(op); \
+ if (_py_tmp != NULL) { \
+ (op) = NULL; \
+ Py_DECREF(_py_tmp); \
+ } \
+ } while (0)
+
+/* Function to use in case the object pointer can be NULL: */
+static inline void _Py_XINCREF(PyObject *op)
+{
+ if (op != NULL) {
+ Py_INCREF(op);
+ }
+}
+
+#define Py_XINCREF(op) _Py_XINCREF(_PyObject_CAST(op))
+
+static inline void _Py_XDECREF(PyObject *op)
+{
+ if (op != NULL) {
+ Py_DECREF(op);
+ }
+}
+
+#define Py_XDECREF(op) _Py_XDECREF(_PyObject_CAST(op))
+
+/*
+These are provided as conveniences to Python runtime embedders, so that
+they can have object code that is not dependent on Python compilation flags.
+*/
+PyAPI_FUNC(void) Py_IncRef(PyObject *);
+PyAPI_FUNC(void) Py_DecRef(PyObject *);
+
+/*
+_Py_NoneStruct is an object of undefined type which can be used in contexts
+where NULL (nil) is not suitable (since NULL often means 'error').
+
+Don't forget to apply Py_INCREF() when returning this value!!!
+*/
+PyAPI_DATA(PyObject) _Py_NoneStruct; /* Don't use this directly */
+#define Py_None (&_Py_NoneStruct)
+
+/* Macro for returning Py_None from a function */
+#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
+
+/*
+Py_NotImplemented is a singleton used to signal that an operation is
+not implemented for a given type combination.
+*/
+PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */
+#define Py_NotImplemented (&_Py_NotImplementedStruct)
+
+/* Macro for returning Py_NotImplemented from a function */
+#define Py_RETURN_NOTIMPLEMENTED \
+ return Py_INCREF(Py_NotImplemented), Py_NotImplemented
+
+/* Rich comparison opcodes */
+#define Py_LT 0
+#define Py_LE 1
+#define Py_EQ 2
+#define Py_NE 3
+#define Py_GT 4
+#define Py_GE 5
+
+/*
+ * Macro for implementing rich comparisons
+ *
+ * Needs to be a macro because any C-comparable type can be used.
+ */
+#define Py_RETURN_RICHCOMPARE(val1, val2, op) \
+ do { \
+ switch (op) { \
+ case Py_EQ: if ((val1) == (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
+ case Py_NE: if ((val1) != (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
+ case Py_LT: if ((val1) < (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
+ case Py_GT: if ((val1) > (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
+ case Py_LE: if ((val1) <= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
+ case Py_GE: if ((val1) >= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
+ default: \
+ Py_UNREACHABLE(); \
+ } \
+ } while (0)
+
+
+/*
+More conventions
+================
+
+Argument Checking
+-----------------
+
+Functions that take objects as arguments normally don't check for nil
+arguments, but they do check the type of the argument, and return an
+error if the function doesn't apply to the type.
+
+Failure Modes
+-------------
+
+Functions may fail for a variety of reasons, including running out of
+memory. This is communicated to the caller in two ways: an error string
+is set (see errors.h), and the function result differs: functions that
+normally return a pointer return NULL for failure, functions returning
+an integer return -1 (which could be a legal return value too!), and
+other functions return 0 for success and -1 for failure.
+Callers should always check for errors before using the result. If
+an error was set, the caller must either explicitly clear it, or pass
+the error on to its caller.
+
+Reference Counts
+----------------
+
+It takes a while to get used to the proper usage of reference counts.
+
+Functions that create an object set the reference count to 1; such new
+objects must be stored somewhere or destroyed again with Py_DECREF().
+Some functions that 'store' objects, such as PyTuple_SetItem() and
+PyList_SetItem(),
+don't increment the reference count of the object, since the most
+frequent use is to store a fresh object. Functions that 'retrieve'
+objects, such as PyTuple_GetItem() and PyDict_GetItemString(), also
+don't increment
+the reference count, since most frequently the object is only looked at
+quickly. Thus, to retrieve an object and store it again, the caller
+must call Py_INCREF() explicitly.
+
+NOTE: functions that 'consume' a reference count, like
+PyList_SetItem(), consume the reference even if the object wasn't
+successfully stored, to simplify error handling.
+
+It seems attractive to make other functions that take an object as
+argument consume a reference count; however, this may quickly get
+confusing (even the current practice is already confusing). Consider
+it carefully, it may save lots of calls to Py_INCREF() and Py_DECREF() at
+times.
+*/
+
+
+/* Trashcan mechanism, thanks to Christian Tismer.
+
+When deallocating a container object, it's possible to trigger an unbounded
+chain of deallocations, as each Py_DECREF in turn drops the refcount on "the
+next" object in the chain to 0. This can easily lead to stack overflows,
+especially in threads (which typically have less stack space to work with).
+
+A container object can avoid this by bracketing the body of its tp_dealloc
+function with a pair of macros:
+
+static void
+mytype_dealloc(mytype *p)
+{
+ ... declarations go here ...
+
+ PyObject_GC_UnTrack(p); // must untrack first
+ Py_TRASHCAN_BEGIN(p, mytype_dealloc)
+ ... The body of the deallocator goes here, including all calls ...
+ ... to Py_DECREF on contained objects. ...
+ Py_TRASHCAN_END // there should be no code after this
+}
+
+CAUTION: Never return from the middle of the body! If the body needs to
+"get out early", put a label immediately before the Py_TRASHCAN_END
+call, and goto it. Else the call-depth counter (see below) will stay
+above 0 forever, and the trashcan will never get emptied.
+
+How it works: The BEGIN macro increments a call-depth counter. So long
+as this counter is small, the body of the deallocator is run directly without
+further ado. But if the counter gets large, it instead adds p to a list of
+objects to be deallocated later, skips the body of the deallocator, and
+resumes execution after the END macro. The tp_dealloc routine then returns
+without deallocating anything (and so unbounded call-stack depth is avoided).
+
+When the call stack finishes unwinding again, code generated by the END macro
+notices this, and calls another routine to deallocate all the objects that
+may have been added to the list of deferred deallocations. In effect, a
+chain of N deallocations is broken into (N-1)/(PyTrash_UNWIND_LEVEL-1) pieces,
+with the call stack never exceeding a depth of PyTrash_UNWIND_LEVEL.
+
+Since the tp_dealloc of a subclass typically calls the tp_dealloc of the base
+class, we need to ensure that the trashcan is only triggered on the tp_dealloc
+of the actual class being deallocated. Otherwise we might end up with a
+partially-deallocated object. To check this, the tp_dealloc function must be
+passed as second argument to Py_TRASHCAN_BEGIN().
+*/
+
+/* The new thread-safe private API, invoked by the macros below. */
+PyAPI_FUNC(void) _PyTrash_thread_deposit_object(PyObject*);
+PyAPI_FUNC(void) _PyTrash_thread_destroy_chain(void);
+
+#define PyTrash_UNWIND_LEVEL 50
+
+#define Py_TRASHCAN_BEGIN_CONDITION(op, cond) \
+ do { \
+ PyThreadState *_tstate = NULL; \
+ /* If "cond" is false, then _tstate remains NULL and the deallocator \
+ * is run normally without involving the trashcan */ \
+ if (cond) { \
+ _tstate = PyThreadState_GET(); \
+ if (_tstate->trash_delete_nesting >= PyTrash_UNWIND_LEVEL) { \
+ /* Store the object (to be deallocated later) and jump past \
+ * Py_TRASHCAN_END, skipping the body of the deallocator */ \
+ _PyTrash_thread_deposit_object(_PyObject_CAST(op)); \
+ break; \
+ } \
+ ++_tstate->trash_delete_nesting; \
+ }
+ /* The body of the deallocator is here. */
+#define Py_TRASHCAN_END \
+ if (_tstate) { \
+ --_tstate->trash_delete_nesting; \
+ if (_tstate->trash_delete_later && _tstate->trash_delete_nesting <= 0) \
+ _PyTrash_thread_destroy_chain(); \
+ } \
+ } while (0);
+
+#define Py_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_BEGIN_CONDITION(op, \
+ Py_TYPE(op)->tp_dealloc == (destructor)(dealloc))
+
+/* For backwards compatibility, these macros enable the trashcan
+ * unconditionally */
+#define Py_TRASHCAN_SAFE_BEGIN(op) Py_TRASHCAN_BEGIN_CONDITION(op, 1)
+#define Py_TRASHCAN_SAFE_END(op) Py_TRASHCAN_END
+
+
+#ifndef Py_LIMITED_API
+# define Py_CPYTHON_OBJECT_H
+# include "cpython/object.h"
+# undef Py_CPYTHON_OBJECT_H
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OBJECT_H */
diff --git a/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/patchlevel.h b/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/patchlevel.h
new file mode 100644
index 0000000..3671bb3
--- /dev/null
+++ b/chroot/opt/android-master/arc-llvm/9.0.3/python3/include/python3.8/patchlevel.h
@@ -0,0 +1,35 @@
+
+/* Python version identification scheme.
+
+ When the major or minor version changes, the VERSION variable in
+ configure.ac must also be changed.
+
+ There is also (independent) API version information in modsupport.h.
+*/
+
+/* Values for PY_RELEASE_LEVEL */
+#define PY_RELEASE_LEVEL_ALPHA 0xA
+#define PY_RELEASE_LEVEL_BETA 0xB
+#define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */
+#define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */
+ /* Higher for patch releases */
+
+/* Version parsed out into numeric values */
+/*--start constants--*/
+#define PY_MAJOR_VERSION 3
+#define PY_MINOR_VERSION 8
+#define PY_MICRO_VERSION 2
+#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
+#define PY_RELEASE_SERIAL 0
+
+/* Version as a string */
+#define PY_VERSION "3.8.2"
+/*--end constants--*/
+
+/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
+ Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */
+#define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \
+ (PY_MINOR_VERSION << 16) | \
+ (PY_MICRO_VERSION << 8) | \
+ (PY_RELEASE_LEVEL << 4) | \
+ (PY_RELEASE_SERIAL << 0))
diff --git a/chroot/opt/android-master/arm64/usr/include/arch-arm/include/asm/byteorder.h b/chroot/opt/android-master/arm64/usr/include/arch-arm/include/asm/byteorder.h
new file mode 100644
index 0000000..a253654
--- /dev/null
+++ b/chroot/opt/android-master/arm64/usr/include/arch-arm/include/asm/byteorder.h
@@ -0,0 +1,22 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_ARM_BYTEORDER_H
+#define __ASM_ARM_BYTEORDER_H
+#include <linux/byteorder/little_endian.h>
+#endif
diff --git a/chroot/opt/android-master/arm64/usr/include/arch-arm/include/asm/swab.h b/chroot/opt/android-master/arm64/usr/include/arch-arm/include/asm/swab.h
new file mode 100644
index 0000000..081a76e
--- /dev/null
+++ b/chroot/opt/android-master/arm64/usr/include/arch-arm/include/asm/swab.h
@@ -0,0 +1,29 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI__ASM_ARM_SWAB_H
+#define _UAPI__ASM_ARM_SWAB_H
+#include <linux/compiler.h>
+#include <linux/types.h>
+#ifndef __STRICT_ANSI__
+#define __SWAB_64_THRU_32__
+#endif
+#ifndef __thumb__
+#endif
+#define __arch_swab32 __arch_swab32
+#endif
diff --git a/chroot/opt/android-master/arm64/usr/include/arch-arm64/include/asm/byteorder.h b/chroot/opt/android-master/arm64/usr/include/arch-arm64/include/asm/byteorder.h
new file mode 100644
index 0000000..c3174b1
--- /dev/null
+++ b/chroot/opt/android-master/arm64/usr/include/arch-arm64/include/asm/byteorder.h
@@ -0,0 +1,26 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __ASM_BYTEORDER_H
+#define __ASM_BYTEORDER_H
+#ifdef __AARCH64EB__
+#include <linux/byteorder/big_endian.h>
+#else
+#include <linux/byteorder/little_endian.h>
+#endif
+#endif
diff --git a/chroot/opt/android-master/arm64/usr/include/arch-arm64/include/asm/swab.h b/chroot/opt/android-master/arm64/usr/include/arch-arm64/include/asm/swab.h
new file mode 100644
index 0000000..0049f53
--- /dev/null
+++ b/chroot/opt/android-master/arm64/usr/include/arch-arm64/include/asm/swab.h
@@ -0,0 +1,19 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#include <asm-generic/swab.h>
diff --git a/chroot/opt/android-master/arm64/usr/include/asm-generic/swab.h b/chroot/opt/android-master/arm64/usr/include/asm-generic/swab.h
new file mode 100644
index 0000000..b6119db
--- /dev/null
+++ b/chroot/opt/android-master/arm64/usr/include/asm-generic/swab.h
@@ -0,0 +1,27 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ *** To edit the content of this header, modify the corresponding
+ *** source file (e.g. under external/kernel-headers/original/) then
+ *** run bionic/libc/kernel/tools/update_all.py
+ ***
+ *** Any manual change here will be lost the next time this script will
+ *** be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _ASM_GENERIC_SWAB_H
+#define _ASM_GENERIC_SWAB_H
+#include <asm/bitsperlong.h>
+#if __BITS_PER_LONG == 32
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#define __SWAB_64_THRU_32__
+#endif
+#endif
+#endif
diff --git a/chroot/opt/android-master/arm64/usr/include/cutils/compiler.h b/chroot/opt/android-master/arm64/usr/include/cutils/compiler.h
deleted file mode 100644
index 70f884a..0000000
--- a/chroot/opt/android-master/arm64/usr/include/cutils/compiler.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_CUTILS_COMPILER_H
-#define ANDROID_CUTILS_COMPILER_H
-
-/*
- * helps the compiler's optimizer predicting branches
- */
-
-#ifdef __cplusplus
-# define CC_LIKELY( exp ) (__builtin_expect( !!(exp), true ))
-# define CC_UNLIKELY( exp ) (__builtin_expect( !!(exp), false ))
-#else
-# define CC_LIKELY( exp ) (__builtin_expect( !!(exp), 1 ))
-# define CC_UNLIKELY( exp ) (__builtin_expect( !!(exp), 0 ))
-#endif
-
-/**
- * exports marked symbols
- *
- * if used on a C++ class declaration, this macro must be inserted
- * after the "class" keyword. For instance:
- *
- * template <typename TYPE>
- * class ANDROID_API Singleton { }
- */
-
-#define ANDROID_API __attribute__((visibility("default")))
-
-#endif // ANDROID_CUTILS_COMPILER_H
diff --git a/chroot/opt/android-master/arm64/usr/include/cutils/native_handle.h b/chroot/opt/android-master/arm64/usr/include/cutils/native_handle.h
deleted file mode 100644
index 4f07456..0000000
--- a/chroot/opt/android-master/arm64/usr/include/cutils/native_handle.h
+++ /dev/