├── Android.bp
├── Android.mk
├── AndroidProducts.mk
├── BoardConfig.mk
├── BoardConfigCommon.mk
├── audio
├── audio_effects.xml
├── audio_platform_info.xml
├── audio_policy_configuration.xml
└── mixer_paths.xml
├── bdAddrLoader
├── Android.mk
├── NOTICE
└── addrloader.c
├── bluetooth
└── bdroid_buildcfg.h
├── board-info.txt
├── camera
├── Android.mk
├── CleanSpec.mk
├── MODULE_LICENSE_BSD
├── QCamera2
│ ├── Android.mk
│ ├── HAL
│ │ ├── Android.mk
│ │ ├── QCamera2Factory.cpp
│ │ ├── QCamera2Factory.h
│ │ ├── QCamera2HWI.cpp
│ │ ├── QCamera2HWI.h
│ │ ├── QCamera2HWICallbacks.cpp
│ │ ├── QCamera2Hal.cpp
│ │ ├── QCameraAllocator.h
│ │ ├── QCameraChannel.cpp
│ │ ├── QCameraChannel.h
│ │ ├── QCameraMem.cpp
│ │ ├── QCameraMem.h
│ │ ├── QCameraParameters.cpp
│ │ ├── QCameraParameters.h
│ │ ├── QCameraPostProc.cpp
│ │ ├── QCameraPostProc.h
│ │ ├── QCameraStateMachine.cpp
│ │ ├── QCameraStateMachine.h
│ │ ├── QCameraStream.cpp
│ │ ├── QCameraStream.h
│ │ ├── QCameraThermalAdapter.cpp
│ │ ├── QCameraThermalAdapter.h
│ │ └── test
│ │ │ ├── Android.mk
│ │ │ ├── qcamera_test.cpp
│ │ │ └── qcamera_test.h
│ ├── HAL3
│ │ ├── Android.mk
│ │ ├── QCamera3Channel.cpp
│ │ ├── QCamera3Channel.h
│ │ ├── QCamera3Factory.cpp
│ │ ├── QCamera3Factory.h
│ │ ├── QCamera3HALHeader.h
│ │ ├── QCamera3HWI.cpp
│ │ ├── QCamera3HWI.h
│ │ ├── QCamera3Hal.cpp
│ │ ├── QCamera3Mem.cpp
│ │ ├── QCamera3Mem.h
│ │ ├── QCamera3PostProc.cpp
│ │ ├── QCamera3PostProc.h
│ │ ├── QCamera3Stream.cpp
│ │ └── QCamera3Stream.h
│ ├── stack
│ │ ├── Android.mk
│ │ ├── common
│ │ │ ├── cam_intf.h
│ │ │ ├── cam_list.h
│ │ │ ├── cam_queue.h
│ │ │ ├── cam_semaphore.h
│ │ │ ├── cam_types.h
│ │ │ ├── mm_camera_interface.h
│ │ │ └── mm_jpeg_interface.h
│ │ ├── mm-camera-interface
│ │ │ ├── Android.mk
│ │ │ ├── inc
│ │ │ │ ├── mm_camera.h
│ │ │ │ ├── mm_camera_dbg.h
│ │ │ │ └── mm_camera_sock.h
│ │ │ └── src
│ │ │ │ ├── mm_camera.c
│ │ │ │ ├── mm_camera_channel.c
│ │ │ │ ├── mm_camera_interface.c
│ │ │ │ ├── mm_camera_sock.c
│ │ │ │ ├── mm_camera_stream.c
│ │ │ │ └── mm_camera_thread.c
│ │ ├── mm-camera-test
│ │ │ ├── Android.mk
│ │ │ ├── inc
│ │ │ │ ├── mm_qcamera_app.h
│ │ │ │ └── mm_qcamera_dbg.h
│ │ │ └── src
│ │ │ │ ├── mm_qcamera_app.c
│ │ │ │ ├── mm_qcamera_dual_test.c
│ │ │ │ ├── mm_qcamera_preview.c
│ │ │ │ ├── mm_qcamera_rdi.c
│ │ │ │ ├── mm_qcamera_snapshot.c
│ │ │ │ ├── mm_qcamera_unit_test.c
│ │ │ │ └── mm_qcamera_video.c
│ │ └── mm-jpeg-interface
│ │ │ ├── Android.mk
│ │ │ ├── inc
│ │ │ ├── mm_jpeg.h
│ │ │ └── mm_jpeg_dbg.h
│ │ │ ├── src
│ │ │ ├── mm_jpeg.c
│ │ │ ├── mm_jpeg_exif.c
│ │ │ ├── mm_jpeg_interface.c
│ │ │ └── mm_jpeg_queue.c
│ │ │ └── test
│ │ │ ├── Android.mk
│ │ │ ├── mm_jpeg_ionbuf.c
│ │ │ ├── mm_jpeg_ionbuf.h
│ │ │ └── mm_jpeg_test.c
│ └── util
│ │ ├── QCameraCmdThread.cpp
│ │ ├── QCameraCmdThread.h
│ │ ├── QCameraQueue.cpp
│ │ └── QCameraQueue.h
├── QCameraParameters.h
├── QCamera_Intf.h
├── hdr
│ └── include
│ │ ├── morpho_api.h
│ │ ├── morpho_easy_hdr.h
│ │ ├── morpho_easy_hdr_ext.h
│ │ ├── morpho_error.h
│ │ ├── morpho_get_image_size.h
│ │ ├── morpho_hdr_checker.h
│ │ ├── morpho_image_data.h
│ │ ├── morpho_image_data_ex.h
│ │ ├── morpho_motion_data.h
│ │ ├── morpho_noise_reduction.h
│ │ ├── morpho_noise_reduction_ext.h
│ │ └── morpho_rect_int.h
└── mm-image-codec
│ ├── Android.mk
│ ├── qexif
│ └── qexif.h
│ └── qomx_core
│ ├── Android.mk
│ ├── QOMX_JpegExtensions.h
│ ├── qomx_core.c
│ └── qomx_core.h
├── charger_touch
├── Android.mk
├── NOTICE
└── charger_touch.c
├── configs
├── elan-touchscreen.idc
├── media_codecs.xml
├── media_codecs_performance.xml
├── media_profiles_V1_0.xml
├── nfc
│ ├── libnfc-nci-20791b05.conf
│ └── libnfc-nci.conf
├── sec_config
├── thermald-flo.conf
└── touch_dev.idc
├── conn_init
├── Android.mk
├── NOTICE
├── conn_init.c
├── wfc_util_common.c
├── wfc_util_common.h
├── wfc_util_fctrl.c
├── wfc_util_fctrl.h
├── wfc_util_log.h
├── wfc_util_qcom.c
└── wfc_util_qcom.h
├── device-common.mk
├── device.mk
├── extract-files.sh
├── gps
├── Android.mk
├── core
│ ├── Android.mk
│ ├── ContextBase.cpp
│ ├── ContextBase.h
│ ├── IzatProxyBase.h
│ ├── LocAdapterBase.cpp
│ ├── LocAdapterBase.h
│ ├── LocApiBase.cpp
│ ├── LocApiBase.h
│ ├── LocDualContext.cpp
│ ├── LocDualContext.h
│ ├── MsgTask.cpp
│ ├── MsgTask.h
│ ├── UlpProxyBase.h
│ ├── gps_extended.h
│ ├── gps_extended_c.h
│ ├── loc_core_log.cpp
│ └── loc_core_log.h
├── etc
│ ├── Android.mk
│ ├── gps.conf
│ └── sap.conf
├── loc_api
│ ├── Android.mk
│ ├── NOTICE
│ └── libloc_api_50001
│ │ ├── Android.mk
│ │ ├── LocEngAdapter.cpp
│ │ ├── LocEngAdapter.h
│ │ ├── gps.c
│ │ ├── loc.cpp
│ │ ├── loc.h
│ │ ├── loc_eng.cpp
│ │ ├── loc_eng.h
│ │ ├── loc_eng_agps.cpp
│ │ ├── loc_eng_agps.h
│ │ ├── loc_eng_dmn_conn.cpp
│ │ ├── loc_eng_dmn_conn.h
│ │ ├── loc_eng_dmn_conn_glue_msg.c
│ │ ├── loc_eng_dmn_conn_glue_msg.h
│ │ ├── loc_eng_dmn_conn_glue_pipe.c
│ │ ├── loc_eng_dmn_conn_glue_pipe.h
│ │ ├── loc_eng_dmn_conn_handler.cpp
│ │ ├── loc_eng_dmn_conn_handler.h
│ │ ├── loc_eng_dmn_conn_thread_helper.c
│ │ ├── loc_eng_dmn_conn_thread_helper.h
│ │ ├── loc_eng_log.cpp
│ │ ├── loc_eng_log.h
│ │ ├── loc_eng_msg.h
│ │ ├── loc_eng_ni.cpp
│ │ ├── loc_eng_ni.h
│ │ ├── loc_eng_nmea.cpp
│ │ ├── loc_eng_nmea.h
│ │ ├── loc_eng_xtra.cpp
│ │ └── loc_eng_xtra.h
├── platform_lib_abstractions
│ ├── elapsed_millis_since_boot.cpp
│ ├── platform_lib_includes.h
│ ├── platform_lib_macros.h
│ └── platform_lib_time.h
└── utils
│ ├── Android.mk
│ ├── linked_list.c
│ ├── linked_list.h
│ ├── loc_cfg.cpp
│ ├── loc_cfg.h
│ ├── loc_log.cpp
│ ├── loc_log.h
│ ├── loc_target.cpp
│ ├── loc_target.h
│ ├── loc_timer.c
│ ├── loc_timer.h
│ ├── log_util.h
│ ├── msg_q.c
│ └── msg_q.h
├── keylayout
├── apq8064-tabla-snd-card_Button_Jack.kcm
├── apq8064-tabla-snd-card_Button_Jack.kl
├── hs_detect.kcm
├── hs_detect.kl
├── keypad_8064.kcm
├── keypad_8064.kl
├── pmic8xxx_pwrkey.kcm
└── pmic8xxx_pwrkey.kl
├── kickstart_checker.sh
├── lineage.dependencies
├── lineage_flo.mk
├── manifest.xml
├── overlay-lineage
├── lineage-sdk
│ └── lineage
│ │ └── res
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── packages
│ └── apps
│ └── Backgrounds
│ └── app
│ └── src
│ └── main
│ └── res
│ └── values
│ └── config.xml
├── overlay
├── frameworks
│ └── base
│ │ ├── core
│ │ └── res
│ │ │ └── res
│ │ │ ├── values-mcc208-mnc01
│ │ │ └── config.xml
│ │ │ ├── values-mcc214-mnc01
│ │ │ └── config.xml
│ │ │ ├── values-mcc214-mnc03
│ │ │ └── config.xml
│ │ │ ├── values
│ │ │ └── config.xml
│ │ │ └── xml
│ │ │ └── power_profile.xml
│ │ └── packages
│ │ ├── SettingsProvider
│ │ └── res
│ │ │ └── values
│ │ │ └── defaults.xml
│ │ └── SystemUI
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── packages
│ └── apps
│ ├── Bluetooth
│ └── res
│ │ └── values
│ │ └── config.xml
│ ├── Settings
│ └── res
│ │ └── values
│ │ └── bools.xml
│ ├── Snap
│ └── res
│ │ └── values
│ │ └── config.xml
│ └── Trebuchet
│ └── res
│ └── values
│ └── config.xml
├── power
├── Android.mk
└── power_flo.c
├── proprietary-blobs.txt
├── recovery
└── root
│ ├── init.recovery.flo.rc
│ └── init.recovery.flo.usb.rc
├── releasetools.py
├── rootdir
├── Android.mk
└── etc
│ ├── fstab.flo
│ ├── init.flo.bt.sh
│ ├── init.flo.power.rc
│ ├── init.flo.rc
│ ├── init.flo.usb.rc
│ ├── init.flo.wifi.sh
│ ├── init.qcom.devstart.sh
│ ├── init.qcom.devwait.sh
│ └── ueventd.flo.rc
├── sensors
├── Android.mk
└── sensors_wrapper.cpp
├── sepolicy
├── attributes
├── bluetooth_loader.te
├── bridge.te
├── camera.te
├── cameraserver.te
├── conn_init.te
├── device.te
├── device_domain_deprecated.te
├── domain.te
├── file.te
├── file_contexts
├── fsck.te
├── genfs_contexts
├── hal_camera.te
├── hal_camera_default.te
├── hal_graphics_allocator_default.te
├── hal_light_default.te
├── hal_nfc_default.te
├── hal_sensors_default.te
├── hci_attach.te
├── healthd.te
├── hostapd.te
├── init-devstart-sh.te
├── init-devwait-sh.te
├── init.te
├── ioctl_defines
├── ioctl_macros
├── irsc_util.te
├── kickstart.te
├── mediacodec.te
├── mediaserver.te
├── mpdecision.te
├── netmgrd.te
├── perfprofd.te
├── priv_app.te
├── property.te
├── property_contexts
├── qmux.te
├── rild.te
├── rmt.te
├── sensors.te
├── surfaceflinger.te
├── system_server.te
├── tee.te
├── thermald.te
└── ueventd.te
├── setup-makefiles.sh
├── system.prop
├── voice_processing
├── Android.mk
└── voice_processing_descriptors.c
└── wifi
├── WCNSS_cfg.dat
├── WCNSS_qcom_cfg.ini
├── WCNSS_qcom_wlan_nv_deb.bin
├── WCNSS_qcom_wlan_nv_flo.bin
├── p2p_supplicant_overlay.conf
└── wpa_supplicant_overlay.conf
/Android.bp:
--------------------------------------------------------------------------------
1 | subdirs = [
2 | ]
3 |
--------------------------------------------------------------------------------
/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2016 The CyanogenMod Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 | ifneq ($(filter flo deb,$(TARGET_DEVICE)),)
17 |
18 | LOCAL_PATH := $(call my-dir)
19 |
20 | include $(call all-makefiles-under,$(LOCAL_PATH))
21 |
22 | endif
23 |
--------------------------------------------------------------------------------
/AndroidProducts.mk:
--------------------------------------------------------------------------------
1 | PRODUCT_MAKEFILES := \
2 | $(LOCAL_DIR)/lineage_flo.mk
3 |
--------------------------------------------------------------------------------
/BoardConfig.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2011 The Android Open-Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | DEVICE_PATH := device/asus/flo
18 |
19 | TARGET_BOOTLOADER_BOARD_NAME := flo
20 | TARGET_BOOTLOADER_NAME := flo
21 | TARGET_BOARD_INFO_FILE := $(DEVICE_PATH)/board-info.txt
22 |
23 | TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_PATH)
24 |
25 | TARGET_RECOVERY_FSTAB = $(DEVICE_PATH)/rootdir/etc/fstab.flox
26 |
27 | include $(DEVICE_PATH)/BoardConfigCommon.mk
28 |
--------------------------------------------------------------------------------
/audio/audio_effects.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/bdAddrLoader/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2012 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | ifneq ($(filter flo deb,$(TARGET_DEVICE)),)
18 |
19 | LOCAL_PATH:= $(call my-dir)
20 |
21 | include $(CLEAR_VARS)
22 |
23 | LOCAL_SRC_FILES := addrloader.c
24 | LOCAL_C_INCLUDES := \
25 | $(LOCAL_PATH) \
26 | $(TARGET_OUT_HEADERS)/common/inc
27 | LOCAL_SHARED_LIBRARIES := libcutils liblog
28 | LOCAL_CFLAGS += -Wall -Wextra -Werror
29 | LOCAL_MODULE_TAGS := optional
30 | LOCAL_MODULE_OWNER := qcom
31 | LOCAL_MODULE := bdAddrLoader
32 | LOCAL_PROPRIETARY_MODULE := true
33 | include $(BUILD_EXECUTABLE)
34 |
35 | endif
36 |
--------------------------------------------------------------------------------
/bluetooth/bdroid_buildcfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef _BDROID_BUILDCFG_H
18 | #define _BDROID_BUILDCFG_H
19 |
20 | #define BTM_DEF_LOCAL_NAME "Nexus 7"
21 |
22 | #define SC_MODE_INCLUDED FALSE
23 |
24 | // Networking, Capturing, Object Transfer
25 | // MAJOR CLASS: COMPUTER
26 | // MINOR CLASS: PALM SIZE PC/PDA
27 | #define BTA_DM_COD {0x1A, 0x01, 0x14}
28 |
29 | #define BTIF_HF_SERVICES (BTA_HSP_SERVICE_MASK)
30 | #define BTIF_HF_SERVICE_NAMES { BTIF_HSAG_SERVICE_NAME, NULL }
31 |
32 | #define BTA_DISABLE_DELAY 1000 /* in milliseconds */
33 | #define BTA_HOST_INTERLEAVE_SEARCH TRUE
34 | #define BLUETOOTH_QTI_SW TRUE
35 | #endif
36 |
--------------------------------------------------------------------------------
/board-info.txt:
--------------------------------------------------------------------------------
1 | require board=msm8960|flo
2 |
--------------------------------------------------------------------------------
/camera/Android.mk:
--------------------------------------------------------------------------------
1 | include $(call all-subdir-makefiles)
2 |
--------------------------------------------------------------------------------
/camera/CleanSpec.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2007 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 |
16 | # If you don't need to do a full clean build but would like to touch
17 | # a file or delete some intermediate files, add a clean step to the end
18 | # of the list. These steps will only be run once, if they haven't been
19 | # run before.
20 | #
21 | # E.g.:
22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
24 | #
25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
26 | # files that are missing or have been moved.
27 | #
28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
29 | # Use $(OUT_DIR) to refer to the "out" directory.
30 | #
31 | # If you need to re-do something that's already mentioned, just copy
32 | # the command and add it to the bottom of the list. E.g., if a change
33 | # that you made last week required touching a file and a change you
34 | # made today requires touching the same file, just copy the old
35 | # touch step and add it to the end of the list.
36 | #
37 | # ************************************************
38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
39 | # ************************************************
40 |
41 | # For example:
42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
46 |
47 | $(call add-clean-step, find $(OUT_DIR) -name "camera.msm8960*" -print0 | xargs -0 rm -rf)
48 | $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/lib/hw/camera.*.so)
49 |
--------------------------------------------------------------------------------
/camera/MODULE_LICENSE_BSD:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/MODULE_LICENSE_BSD
--------------------------------------------------------------------------------
/camera/QCamera2/Android.mk:
--------------------------------------------------------------------------------
1 | include $(call all-subdir-makefiles)
2 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH:= $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_SRC_FILES := \
6 | QCamera2Factory.cpp \
7 | QCamera2Hal.cpp \
8 | QCamera2HWI.cpp \
9 | QCameraMem.cpp \
10 | ../util/QCameraQueue.cpp \
11 | ../util/QCameraCmdThread.cpp \
12 | QCameraStateMachine.cpp \
13 | QCameraChannel.cpp \
14 | QCameraStream.cpp \
15 | QCameraPostProc.cpp \
16 | QCamera2HWICallbacks.cpp \
17 | QCameraParameters.cpp \
18 | QCameraThermalAdapter.cpp
19 |
20 | # Ignore benign clang warnings, avoid changes to third party code.
21 | LOCAL_CLANG_CFLAGS += -Wno-gnu-designator
22 |
23 | LOCAL_CFLAGS = -Wall -Werror -DDEFAULT_ZSL_MODE_ON -DDEFAULT_DENOISE_MODE_ON
24 | #Debug logs are enabled
25 | #LOCAL_CFLAGS += -DDISABLE_DEBUG_LOG
26 |
27 | LOCAL_C_INCLUDES := \
28 | $(LOCAL_PATH)/../stack/common \
29 | frameworks/native/include/media/hardware \
30 | frameworks/native/include/media/openmax \
31 | $(call project-path-for,qcom-media)/libstagefrighthw \
32 | system/media/camera/include \
33 | $(LOCAL_PATH)/../../mm-image-codec/qexif \
34 | $(LOCAL_PATH)/../../mm-image-codec/qomx_core \
35 | $(LOCAL_PATH)/../util
36 |
37 | LOCAL_C_INCLUDES += \
38 | $(call project-path-for,qcom-display)/libgralloc
39 |
40 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
41 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media
42 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
43 |
44 | LOCAL_SHARED_LIBRARIES := libcamera_client liblog libhardware libutils libcutils libdl
45 | LOCAL_SHARED_LIBRARIES += libmmcamera_interface libmmjpeg_interface
46 |
47 | LOCAL_MODULE_RELATIVE_PATH := hw
48 | LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
49 | #LOCAL_MODULE := camera.$(TARGET_DEVICE)
50 | LOCAL_MODULE_TAGS := optional
51 | LOCAL_PROPRIETARY_MODULE := true
52 |
53 | include $(BUILD_SHARED_LIBRARY)
54 |
55 | #include $(LOCAL_PATH)/test/Android.mk
56 |
57 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL/QCamera2Factory.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __QCAMERA2FACTORY_H__
31 | #define __QCAMERA2FACTORY_H__
32 |
33 | #include
34 | #include
35 | #include
36 |
37 | #include "QCamera2HWI.h"
38 |
39 | namespace qcamera {
40 |
41 | class QCamera2Factory
42 | {
43 | public:
44 | QCamera2Factory();
45 | virtual ~QCamera2Factory();
46 |
47 | static int get_number_of_cameras();
48 | static int get_camera_info(int camera_id, struct camera_info *info);
49 |
50 | private:
51 | int getNumberOfCameras();
52 | int getCameraInfo(int camera_id, struct camera_info *info);
53 | int cameraDeviceOpen(int camera_id, struct hw_device_t **hw_device);
54 | static int camera_device_open(const struct hw_module_t *module, const char *id,
55 | struct hw_device_t **hw_device);
56 |
57 | public:
58 | static struct hw_module_methods_t mModuleMethods;
59 |
60 | private:
61 | int mNumOfCameras;
62 | };
63 |
64 | }; /*namespace qcamera*/
65 |
66 | extern camera_module_t HAL_MODULE_INFO_SYM;
67 |
68 | #endif /* ANDROID_HARDWARE_QUALCOMM_CAMERA_H */
69 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL/QCamera2Hal.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundataion. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #include "QCamera2Factory.h"
31 |
32 | static hw_module_t camera_common = {
33 | tag: HARDWARE_MODULE_TAG,
34 | module_api_version: CAMERA_MODULE_API_VERSION_1_0,
35 | hal_api_version: HARDWARE_HAL_API_VERSION,
36 | id: CAMERA_HARDWARE_MODULE_ID,
37 | name: "QCamera Module",
38 | author: "Qualcomm Innovation Center Inc",
39 | methods: &qcamera::QCamera2Factory::mModuleMethods,
40 | dso: NULL,
41 | reserved: {0},
42 | };
43 |
44 | camera_module_t HAL_MODULE_INFO_SYM = {
45 | common: camera_common,
46 | get_number_of_cameras: qcamera::QCamera2Factory::get_number_of_cameras,
47 | get_camera_info: qcamera::QCamera2Factory::get_camera_info,
48 | set_callbacks: NULL,
49 | get_vendor_tag_ops: NULL,
50 | open_legacy: NULL,
51 | set_torch_mode: NULL,
52 | init: NULL,
53 | reserved: {0}
54 | };
55 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL/QCameraAllocator.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundataion. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __QCAMERA_ALLOCATOR__
31 | #define __QCAMERA_ALLOCATOR__
32 |
33 | extern "C" {
34 | #include
35 | }
36 |
37 | namespace qcamera {
38 |
39 | class QCameraMemory;
40 | class QCameraHeapMemory;
41 |
42 | class QCameraAllocator {
43 | public:
44 | virtual QCameraMemory *allocateStreamBuf(cam_stream_type_t stream_type,
45 | int size,
46 | uint8_t &bufferCnt) = 0;
47 | virtual QCameraHeapMemory *allocateStreamInfoBuf(cam_stream_type_t stream_type) = 0;
48 | virtual ~QCameraAllocator() {}
49 | };
50 |
51 | }; /* namespace qcamera */
52 | #endif /* __QCAMERA_ALLOCATOR__ */
53 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL/test/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH:= $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_SRC_FILES:= \
6 | qcamera_test.cpp \
7 |
8 | LOCAL_SHARED_LIBRARIES:= \
9 | libdl \
10 | libui \
11 | libutils \
12 | libcutils \
13 | libbinder \
14 | libmedia \
15 | libmedia_native \
16 | libui \
17 | libgui \
18 | libcamera_client
19 |
20 | LOCAL_C_INCLUDES += \
21 | frameworks/base/include/ui \
22 | frameworks/base/include/surfaceflinger \
23 | frameworks/base/include/camera \
24 | frameworks/base/include/media \
25 |
26 | LOCAL_MODULE:= camera_test
27 | LOCAL_MODULE_TAGS:= tests
28 |
29 | LOCAL_CFLAGS += -Wall -fno-short-enums -O0
30 |
31 | include $(BUILD_EXECUTABLE)
32 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL3/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH:= $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_SRC_FILES := \
6 | QCamera3Factory.cpp \
7 | QCamera3Hal.cpp \
8 | QCamera3HWI.cpp \
9 | QCamera3Mem.cpp \
10 | QCamera3Stream.cpp \
11 | QCamera3Channel.cpp \
12 | QCamera3PostProc.cpp \
13 | ../util/QCameraCmdThread.cpp \
14 | ../util/QCameraQueue.cpp
15 |
16 | LOCAL_CFLAGS := -Wall -Werror
17 | LOCAL_CFLAGS += -DHAS_MULTIMEDIA_HINTS
18 |
19 | LOCAL_C_INCLUDES := \
20 | $(LOCAL_PATH)/../stack/common \
21 | frameworks/native/include/media/openmax \
22 | frameworks/native/include \
23 | frameworks/av/include \
24 | $(call project-path-for,qcom-media)/libstagefrighthw \
25 | system/media/camera/include \
26 | $(LOCAL_PATH)/../../mm-image-codec/qexif \
27 | $(LOCAL_PATH)/../../mm-image-codec/qomx_core \
28 | $(LOCAL_PATH)/../util
29 |
30 | LOCAL_C_INCLUDES += \
31 | $(call project-path-for,qcom-display)/libgralloc
32 |
33 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
34 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media
35 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
36 |
37 | LOCAL_SHARED_LIBRARIES := libcamera_client liblog libhardware libutils libcutils libdl
38 | LOCAL_SHARED_LIBRARIES += libmmcamera_interface libmmjpeg_interface libui libcamera_metadata
39 |
40 | LOCAL_MODULE_RELATIVE_PATH := hw
41 | LOCAL_MODULE := camera.$(TARGET_DEVICE)
42 | LOCAL_PROPRIETARY_MODULE := true
43 |
44 | include $(BUILD_SHARED_LIBRARY)
45 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL3/QCamera3Factory.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __QCAMERA3FACTORY_H__
31 | #define __QCAMERA3FACTORY_H__
32 |
33 | #include
34 |
35 | #include "QCamera3HWI.h"
36 |
37 | namespace qcamera {
38 |
39 | class QCamera3Factory
40 | {
41 | public:
42 | QCamera3Factory();
43 | virtual ~QCamera3Factory();
44 |
45 | static int get_number_of_cameras();
46 | static int get_camera_info(int camera_id, struct camera_info *info);
47 |
48 | private:
49 | int getNumberOfCameras();
50 | int getCameraInfo(int camera_id, struct camera_info *info);
51 | int cameraDeviceOpen(int camera_id, struct hw_device_t **hw_device);
52 | static int camera_device_open(const struct hw_module_t *module, const char *id,
53 | struct hw_device_t **hw_device);
54 |
55 | public:
56 | static struct hw_module_methods_t mModuleMethods;
57 |
58 | private:
59 | int mNumOfCameras;
60 | };
61 |
62 | }; /*namespace qcamera*/
63 |
64 | extern camera_module_t HAL_MODULE_INFO_SYM;
65 |
66 | #endif /* ANDROID_HARDWARE_QUALCOMM_CAMERA_H */
67 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL3/QCamera3HALHeader.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2013, The Linux Foundataion. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef __QCAMERA_HALHEADER_H__
30 | #define __QCAMERA_HALHEADER_H__
31 |
32 | extern "C" {
33 | #include
34 | #include
35 | }
36 |
37 | using namespace android;
38 |
39 | namespace qcamera {
40 |
41 | class QCamera3Channel;
42 |
43 | typedef enum {
44 | INVALID,
45 | VALID,
46 | } stream_status_t;
47 |
48 | typedef struct {
49 | int32_t jpeg_orientation;
50 | uint8_t jpeg_quality;
51 | cam_dimension_t thumbnail_size;
52 | int32_t sensor_sensitivity;
53 | int64_t sensor_exposure_time;
54 | float lens_focal_length;
55 | int32_t max_jpeg_size;
56 | int exposure_compensation;
57 | cam_rational_type_t exposure_comp_step;
58 | int64_t* gps_timestamp;
59 | double* gps_coordinates[3];
60 | char gps_processing_method[35];
61 | bool is_jpeg_format;
62 | uint32_t min_required_pp_mask;
63 | float f_number;
64 | int wb;
65 | uint32_t flash;
66 | } jpeg_settings_t;
67 |
68 | typedef struct {
69 | camera3_stream_t *stream;
70 | camera3_stream_buffer_set_t buffer_set;
71 | stream_status_t status;
72 | int registered;
73 | QCamera3Channel *channel;
74 | } stream_info_t;
75 |
76 | typedef struct {
77 | int32_t iso_speed;
78 | int64_t exposure_time;
79 | } metadata_response_t;
80 |
81 | };//namespace qcamera
82 |
83 |
84 | #endif
85 |
--------------------------------------------------------------------------------
/camera/QCamera2/HAL3/QCamera3Hal.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012-2013, The Linux Foundataion. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #include "QCamera3Factory.h"
31 |
32 | static hw_module_t camera_common = {
33 | .tag = HARDWARE_MODULE_TAG,
34 | .module_api_version = CAMERA_MODULE_API_VERSION_2_0,
35 | .hal_api_version = HARDWARE_HAL_API_VERSION,
36 | .id = CAMERA_HARDWARE_MODULE_ID,
37 | .name = "QCamera Module",
38 | .author = "Qualcomm Innovation Center Inc",
39 | .methods = &qcamera::QCamera3Factory::mModuleMethods,
40 | .dso = NULL,
41 | .reserved = {0},
42 | };
43 |
44 | camera_module_t HAL_MODULE_INFO_SYM = {
45 | .common = camera_common,
46 | .get_number_of_cameras = qcamera::QCamera3Factory::get_number_of_cameras,
47 | .get_camera_info = qcamera::QCamera3Factory::get_camera_info,
48 | .set_callbacks = NULL,
49 | .get_vendor_tag_ops = NULL,
50 | .open_legacy = NULL,
51 | .set_torch_mode = NULL,
52 | .init = NULL,
53 | .reserved = {0}
54 | };
55 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH:= $(call my-dir)
2 | include $(LOCAL_PATH)/mm-camera-interface/Android.mk
3 | include $(LOCAL_PATH)/mm-jpeg-interface/Android.mk
4 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/common/cam_list.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | /* This file is a slave copy from /vendor/qcom/propreitary/mm-cammera/common,
31 | * Please do not modify it directly here. */
32 |
33 | #ifndef __CAMLIST_H
34 | #define __CAMLIST_H
35 |
36 | #include
37 |
38 | #define member_of(ptr, type, member) ({ \
39 | const typeof(((type *)0)->member) *__mptr = (ptr); \
40 | (type *)((char *)__mptr - offsetof(type,member));})
41 |
42 | struct cam_list {
43 | struct cam_list *next, *prev;
44 | };
45 |
46 | static inline void cam_list_init(struct cam_list *ptr)
47 | {
48 | ptr->next = ptr;
49 | ptr->prev = ptr;
50 | }
51 |
52 | static inline void cam_list_add_tail_node(struct cam_list *item,
53 | struct cam_list *head)
54 | {
55 | struct cam_list *prev = head->prev;
56 |
57 | head->prev = item;
58 | item->next = head;
59 | item->prev = prev;
60 | prev->next = item;
61 | }
62 |
63 | static inline void cam_list_insert_before_node(struct cam_list *item,
64 | struct cam_list *node)
65 | {
66 | item->next = node;
67 | item->prev = node->prev;
68 | item->prev->next = item;
69 | node->prev = item;
70 | }
71 |
72 | static inline void cam_list_del_node(struct cam_list *ptr)
73 | {
74 | struct cam_list *prev = ptr->prev;
75 | struct cam_list *next = ptr->next;
76 |
77 | next->prev = ptr->prev;
78 | prev->next = ptr->next;
79 | ptr->next = ptr;
80 | ptr->prev = ptr;
81 | }
82 |
83 | #endif /* __CAMLIST_H */
84 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/common/cam_semaphore.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __QCAMERA_SEMAPHORE_H__
31 | #define __QCAMERA_SEMAPHORE_H__
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | /* Implement semaphore with mutex and conditional variable.
38 | * Reason being, POSIX semaphore on Android are not used or
39 | * well tested.
40 | */
41 |
42 | typedef struct {
43 | int val;
44 | pthread_mutex_t mutex;
45 | pthread_cond_t cond;
46 | } cam_semaphore_t;
47 |
48 | static inline void cam_sem_init(cam_semaphore_t *s, int n)
49 | {
50 | pthread_mutex_init(&(s->mutex), NULL);
51 | pthread_cond_init(&(s->cond), NULL);
52 | s->val = n;
53 | }
54 |
55 | static inline void cam_sem_post(cam_semaphore_t *s)
56 | {
57 | pthread_mutex_lock(&(s->mutex));
58 | s->val++;
59 | pthread_cond_signal(&(s->cond));
60 | pthread_mutex_unlock(&(s->mutex));
61 | }
62 |
63 | static inline int cam_sem_wait(cam_semaphore_t *s)
64 | {
65 | int rc = 0;
66 | pthread_mutex_lock(&(s->mutex));
67 | while (s->val == 0)
68 | rc = pthread_cond_wait(&(s->cond), &(s->mutex));
69 | s->val--;
70 | pthread_mutex_unlock(&(s->mutex));
71 | return rc;
72 | }
73 |
74 | static inline void cam_sem_destroy(cam_semaphore_t *s)
75 | {
76 | pthread_mutex_destroy(&(s->mutex));
77 | pthread_cond_destroy(&(s->cond));
78 | s->val = 0;
79 | }
80 |
81 | #ifdef __cplusplus
82 | }
83 | #endif
84 |
85 | #endif /* __QCAMERA_SEMAPHORE_H__ */
86 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/mm-camera-interface/Android.mk:
--------------------------------------------------------------------------------
1 | OLD_LOCAL_PATH := $(LOCAL_PATH)
2 | LOCAL_PATH := $(call my-dir)
3 |
4 | include $(CLEAR_VARS)
5 |
6 | MM_CAM_FILES := \
7 | src/mm_camera_interface.c \
8 | src/mm_camera.c \
9 | src/mm_camera_channel.c \
10 | src/mm_camera_stream.c \
11 | src/mm_camera_thread.c \
12 | src/mm_camera_sock.c
13 |
14 | ifeq ($(strip $(TARGET_USES_ION)),true)
15 | LOCAL_CFLAGS += -DUSE_ION
16 | endif
17 |
18 | LOCAL_CFLAGS += -D_ANDROID_
19 | LOCAL_COPY_HEADERS_TO := mm-camera-interface
20 | LOCAL_COPY_HEADERS += ../common/cam_intf.h
21 | LOCAL_COPY_HEADERS += ../common/cam_types.h
22 |
23 | LOCAL_C_INCLUDES := \
24 | $(LOCAL_PATH)/inc \
25 | $(LOCAL_PATH)/../common
26 |
27 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
28 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media
29 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
30 |
31 | LOCAL_C_INCLUDES += $(call project-path-for,qcom-media)/mm-core/inc
32 |
33 | LOCAL_CFLAGS += -Wall -Werror
34 |
35 | LOCAL_SRC_FILES := $(MM_CAM_FILES)
36 |
37 | LOCAL_MODULE := libmmcamera_interface
38 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog
39 | LOCAL_MODULE_TAGS := optional
40 | LOCAL_PROPRIETARY_MODULE := true
41 |
42 | include $(BUILD_SHARED_LIBRARY)
43 |
44 | LOCAL_PATH := $(OLD_LOCAL_PATH)
45 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/mm-camera-interface/inc/mm_camera_dbg.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __MM_CAMERA_DBG_H__
31 | #define __MM_CAMERA_DBG_H__
32 |
33 | //#define LOG_DEBUG 1
34 |
35 | #ifndef LOG_DEBUG
36 | #ifdef _ANDROID_
37 | #undef LOG_NIDEBUG
38 | #undef LOG_TAG
39 | #define LOG_NIDEBUG 0
40 | #define LOG_TAG "mm-camera-intf"
41 | #include
42 | #else
43 | #include
44 | #define ALOGE CDBG
45 | #endif
46 | #undef CDBG
47 | #define CDBG(fmt, args...) do{}while(0)
48 | #define CDBG_ERROR(fmt, args...) ALOGE(fmt, ##args)
49 | #else
50 | #ifdef _ANDROID_
51 | #undef LOG_NIDEBUG
52 | #undef LOG_TAG
53 | #define LOG_NIDEBUG 0
54 | #define LOG_TAG "mm-camera-intf"
55 | #include
56 | #define CDBG(fmt, args...) ALOGE(fmt, ##args)
57 | #else
58 | #include
59 | #define CDBG(fmt, args...) fprintf(stderr, fmt, ##args)
60 | #define ALOGE(fmt, args...) fprintf(stderr, fmt, ##args)
61 | #endif
62 | #endif
63 |
64 | #ifdef _ANDROID_
65 | #define CDBG_HIGH(fmt, args...) ALOGD(fmt, ##args)
66 | #define CDBG_ERROR(fmt, args...) ALOGE(fmt, ##args)
67 | #else
68 | #define CDBG_HIGH(fmt, args...) fprintf(stderr, fmt, ##args)
69 | #define CDBG_ERROR(fmt, args...) fprintf(stderr, fmt, ##args)
70 | #endif
71 | #endif /* __MM_CAMERA_DBG_H__ */
72 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/mm-camera-interface/inc/mm_camera_sock.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __MM_CAMERA_SOCKET_H__
31 | #define __MM_CAMERA_SOCKET_H__
32 |
33 | #include
34 |
35 | typedef enum {
36 | MM_CAMERA_SOCK_TYPE_UDP,
37 | MM_CAMERA_SOCK_TYPE_TCP,
38 | } mm_camera_sock_type_t;
39 |
40 | int mm_camera_socket_create(int cam_id, mm_camera_sock_type_t sock_type);
41 |
42 | int mm_camera_socket_sendmsg(
43 | int fd,
44 | void *msg,
45 | uint32_t buf_size,
46 | int sendfd);
47 |
48 | int mm_camera_socket_recvmsg(
49 | int fd,
50 | void *msg,
51 | uint32_t buf_size,
52 | int *rcvdfd);
53 |
54 | void mm_camera_socket_close(int fd);
55 |
56 | #endif /*__MM_CAMERA_SOCKET_H__*/
57 |
58 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/mm-camera-test/inc/mm_qcamera_dbg.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __MM_QCAMERA_DBG_H__
31 | #define __MM_QCAMERA_DBG_H__
32 |
33 | //#define LOG_DEBUG 1
34 |
35 | #ifndef LOG_DEBUG
36 | #ifdef _ANDROID_
37 | #undef LOG_NIDEBUG
38 | #undef LOG_TAG
39 | #define LOG_NIDEBUG 0
40 | #define LOG_TAG "mm-camera-test"
41 | #include
42 | #else
43 | #include
44 | #define ALOGE CDBG
45 | #endif
46 | #undef CDBG
47 | #define CDBG(fmt, args...) do{}while(0)
48 | #define CDBG_ERROR(fmt, args...) ALOGE(fmt, ##args)
49 | #else
50 | #ifdef _ANDROID_
51 | #undef LOG_NIDEBUG
52 | #undef LOG_TAG
53 | #define LOG_NIDEBUG 0
54 | #define LOG_TAG "mm-camera-test"
55 | #include
56 | #define CDBG(fmt, args...) ALOGE(fmt, ##args)
57 | #else
58 | #include
59 | #define CDBG(fmt, args...) fprintf(stderr, fmt, ##args)
60 | #define ALOGE(fmt, args...) fprintf(stderr, fmt, ##args)
61 | #endif
62 | #endif
63 |
64 | #ifdef _ANDROID_
65 | #define CDBG_HIGH(fmt, args...) ALOGE(fmt, ##args)
66 | #define CDBG_ERROR(fmt, args...) ALOGE(fmt, ##args)
67 | #else
68 | #define CDBG_HIGH(fmt, args...) fprintf(stderr, fmt, ##args)
69 | #define CDBG_ERROR(fmt, args...) fprintf(stderr, fmt, ##args)
70 | #endif
71 | #endif /* __MM_QCAMERA_DBG_H__ */
72 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/mm-jpeg-interface/Android.mk:
--------------------------------------------------------------------------------
1 | OLD_LOCAL_PATH := $(LOCAL_PATH)
2 | LOCAL_PATH := $(call my-dir)
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_CFLAGS+= -D_ANDROID_
6 |
7 | LOCAL_C_INCLUDES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
8 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media
9 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
10 |
11 | LOCAL_C_INCLUDES += \
12 | frameworks/native/include/media/openmax \
13 | $(LOCAL_PATH)/inc \
14 | $(LOCAL_PATH)/../common \
15 | $(LOCAL_PATH)/../../../ \
16 | $(LOCAL_PATH)/../../../mm-image-codec/qexif \
17 | $(LOCAL_PATH)/../../../mm-image-codec/qomx_core
18 |
19 | ifeq ($(strip $(TARGET_USES_ION)),true)
20 | LOCAL_CFLAGS += -DUSE_ION
21 | endif
22 |
23 | LOCAL_SRC_FILES := \
24 | src/mm_jpeg_queue.c \
25 | src/mm_jpeg_exif.c \
26 | src/mm_jpeg.c \
27 | src/mm_jpeg_interface.c
28 |
29 | LOCAL_CFLAGS += -Wall -Werror
30 |
31 | LOCAL_MODULE := libmmjpeg_interface
32 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog libqomx_core
33 | LOCAL_MODULE_TAGS := optional
34 | LOCAL_PROPRIETARY_MODULE := true
35 |
36 | include $(BUILD_SHARED_LIBRARY)
37 |
38 | LOCAL_PATH := $(OLD_LOCAL_PATH)
39 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __MM_JPEG_DBG_H__
31 | #define __MM_JPEG_DBG_H__
32 |
33 | #ifndef LOG_DEBUG
34 | #ifdef _ANDROID_
35 | #undef LOG_NIDEBUG
36 | #undef LOG_TAG
37 | #define LOG_NIDEBUG 0
38 | #define LOG_TAG "mm-jpeg-intf"
39 | #include
40 | #else
41 | #include
42 | #define ALOGE CDBG
43 | #endif
44 | #undef CDBG
45 | #define CDBG(fmt, args...) do{}while(0)
46 | #else
47 | #ifdef _ANDROID_
48 | #undef LOG_NIDEBUG
49 | #undef LOG_TAG
50 | #define LOG_NIDEBUG 0
51 | #define LOG_TAG "mm-jpeg-intf"
52 | #include
53 | #define CDBG(fmt, args...) ALOGE(fmt, ##args)
54 | #else
55 | #include
56 | #define CDBG(fmt, args...) fprintf(stderr, fmt, ##args)
57 | #define ALOGE(fmt, args...) fprintf(stderr, fmt, ##args)
58 | #endif
59 | #endif
60 |
61 | #ifdef _ANDROID_
62 | #define CDBG_HIGH(fmt, args...) ALOGI(fmt, ##args)
63 | #define CDBG_ERROR(fmt, args...) ALOGE(fmt, ##args)
64 | #else
65 | #define CDBG_HIGH(fmt, args...) fprintf(stderr, fmt, ##args)
66 | #define CDBG_ERROR(fmt, args...) fprintf(stderr, fmt, ##args)
67 | #endif
68 | #endif /* __MM_JPEG_DBG_H__ */
69 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/mm-jpeg-interface/test/Android.mk:
--------------------------------------------------------------------------------
1 | OLD_LOCAL_PATH := $(LOCAL_PATH)
2 | MM_JPEG_TEST_PATH := $(call my-dir)
3 |
4 | include $(CLEAR_VARS)
5 | LOCAL_PATH := $(MM_JPEG_TEST_PATH)
6 | LOCAL_MODULE_TAGS := optional
7 |
8 | LOCAL_CFLAGS := -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID
9 | LOCAL_CFLAGS += -Werror -Wno-unused-parameter
10 | LOCAL_CFLAGS += -D_ANDROID_
11 | LOCAL_CFLAGS += -include mm_jpeg_dbg.h
12 |
13 | ifeq ($(strip $(TARGET_USES_ION)),true)
14 | LOCAL_CFLAGS += -DUSE_ION
15 | endif
16 |
17 | OMX_HEADER_DIR := frameworks/native/include/media/openmax
18 | OMX_CORE_DIR := device/asus/flo/camera/mm-image-codec
19 |
20 | LOCAL_C_INCLUDES := $(MM_JPEG_TEST_PATH)
21 | LOCAL_C_INCLUDES += $(MM_JPEG_TEST_PATH)/../inc
22 | LOCAL_C_INCLUDES += $(MM_JPEG_TEST_PATH)/../../common
23 | LOCAL_C_INCLUDES += $(OMX_HEADER_DIR)
24 | LOCAL_C_INCLUDES += $(OMX_CORE_DIR)/qexif
25 | LOCAL_C_INCLUDES += $(OMX_CORE_DIR)/qomx_core
26 |
27 |
28 | LOCAL_SRC_FILES := mm_jpeg_ionbuf.c
29 | LOCAL_SRC_FILES += mm_jpeg_test.c
30 |
31 | LOCAL_MODULE := mm-jpeg-interface-test
32 | LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libmmjpeg_interface
33 |
34 | include $(BUILD_EXECUTABLE)
35 |
36 | LOCAL_PATH := $(OLD_LOCAL_PATH)
37 |
--------------------------------------------------------------------------------
/camera/QCamera2/stack/mm-jpeg-interface/test/mm_jpeg_ionbuf.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __MM_JPEG_IONBUF_H__
31 | #define __MM_JPEG_IONBUF_H__
32 |
33 |
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 | #include
40 | #include
41 | #include "mm_jpeg_dbg.h"
42 |
43 | typedef struct {
44 | struct ion_fd_data ion_info_fd;
45 | struct ion_allocation_data alloc;
46 | int p_pmem_fd;
47 | long size;
48 | int ion_fd;
49 | uint8_t *addr;
50 | } buffer_test_t;
51 |
52 | /** buffer_allocate:
53 | *
54 | * Arguments:
55 | * @p_buffer: ION buffer
56 | *
57 | * Return:
58 | * buffer address
59 | *
60 | * Description:
61 | * allocates ION buffer
62 | *
63 | **/
64 | void* buffer_allocate(buffer_test_t *p_buffer);
65 |
66 | /** buffer_deallocate:
67 | *
68 | * Arguments:
69 | * @p_buffer: ION buffer
70 | *
71 | * Return:
72 | * buffer address
73 | *
74 | * Description:
75 | * deallocates ION buffer
76 | *
77 | **/
78 | int buffer_deallocate(buffer_test_t *p_buffer);
79 |
80 | #endif
81 |
82 |
--------------------------------------------------------------------------------
/camera/QCamera2/util/QCameraCmdThread.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundataion. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __QCAMERA_CMD_THREAD_H__
31 | #define __QCAMERA_CMD_THREAD_H__
32 |
33 | #include
34 | #include
35 |
36 | #include "cam_types.h"
37 | #include "QCameraQueue.h"
38 |
39 | namespace qcamera {
40 |
41 | typedef enum
42 | {
43 | CAMERA_CMD_TYPE_NONE,
44 | CAMERA_CMD_TYPE_START_DATA_PROC,
45 | CAMERA_CMD_TYPE_STOP_DATA_PROC,
46 | CAMERA_CMD_TYPE_DO_NEXT_JOB,
47 | CAMERA_CMD_TYPE_EXIT,
48 | CAMERA_CMD_TYPE_MAX
49 | } camera_cmd_type_t;
50 |
51 | typedef struct {
52 | camera_cmd_type_t cmd;
53 | } camera_cmd_t;
54 |
55 | class QCameraCmdThread {
56 | public:
57 | QCameraCmdThread();
58 | ~QCameraCmdThread();
59 |
60 | int32_t launch(void *(*start_routine)(void *), void* user_data);
61 | int32_t setName(const char* name);
62 | int32_t exit();
63 | int32_t sendCmd(camera_cmd_type_t cmd, uint8_t sync_cmd, uint8_t priority);
64 | camera_cmd_type_t getCmd();
65 |
66 | QCameraQueue cmd_queue; /* cmd queue */
67 | pthread_t cmd_pid; /* cmd thread ID */
68 | cam_semaphore_t cmd_sem; /* semaphore for cmd thread */
69 | cam_semaphore_t sync_sem; /* semaphore for synchronized call signal */
70 | };
71 |
72 | }; // namespace qcamera
73 |
74 | #endif /* __QCAMERA_CMD_THREAD_H__ */
75 |
--------------------------------------------------------------------------------
/camera/QCamera2/util/QCameraQueue.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundataion. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __QCAMERA_QUEUE_H__
31 | #define __QCAMERA_QUEUE_H__
32 |
33 | #include
34 | #include "cam_list.h"
35 |
36 | namespace qcamera {
37 |
38 | typedef void (*release_data_fn)(void* data, void *user_data);
39 | typedef bool (*match_fn)(void *data, void *user_data);
40 |
41 | class QCameraQueue {
42 | public:
43 | QCameraQueue();
44 | QCameraQueue(release_data_fn data_rel_fn, void *user_data);
45 | virtual ~QCameraQueue();
46 | bool enqueue(void *data);
47 | bool enqueueWithPriority(void *data);
48 | void flush();
49 | void flushNodes(match_fn match);
50 | void* dequeue(bool bFromHead = true);
51 | bool isEmpty();
52 | private:
53 | typedef struct {
54 | struct cam_list list;
55 | void* data;
56 | } camera_q_node;
57 |
58 | camera_q_node m_head; // dummy head
59 | int m_size;
60 | pthread_mutex_t m_lock;
61 | release_data_fn m_dataFn;
62 | void * m_userData;
63 | };
64 |
65 | }; // namespace qcamera
66 |
67 | #endif /* __QCAMERA_QUEUE_H__ */
68 |
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_api.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_api.h
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_easy_hdr.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_easy_hdr.h
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_easy_hdr_ext.h:
--------------------------------------------------------------------------------
1 | #ifndef MORPHO_EASY_HDR_EXT_H
2 | #define MORPHO_EASY_HDR_EXT_H
3 |
4 | #include "morpho_easy_hdr.h"
5 | /*
6 | return == 0 : OK
7 | return != 0 : NG (Please print the return value to check Error types)
8 | */
9 | MORPHO_API(int)
10 | LINK_mm_camera_HDR(
11 | unsigned char* yuvInput01,
12 | unsigned char* yuvInput02,
13 | unsigned char* yuvInput03,
14 | unsigned char* pHDROutImage,
15 | int width,
16 | int height,
17 | int indoor);
18 |
19 | #endif //MORPHO_EASY_HDR_EXT_H
20 |
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_error.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_error.h
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_get_image_size.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_get_image_size.h
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_hdr_checker.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_hdr_checker.h
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_image_data.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_image_data.h
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_image_data_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file morpho_image_data_ex.h
3 | * @brief 画像データの構造体定義
4 | * @version 1.0.0
5 | * @date 2010-03-30
6 | *
7 | * Copyright (C) 2010-2011 Morpho, Inc.
8 | */
9 |
10 | #ifndef MORPHO_IMAGE_DATA_EX_H
11 | #define MORPHO_IMAGE_DATA_EX_H
12 |
13 | #include "morpho_image_data.h"
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | typedef struct{
20 | int y;
21 | int u;
22 | int v;
23 | } morpho_ImageYuvPlanarPitch;
24 |
25 | typedef struct{
26 | int y;
27 | int uv;
28 | } morpho_ImageYuvSemiPlanarPitch;
29 |
30 | /** 画像データ. */
31 | typedef struct {
32 | int width; /**< 幅 */
33 | int height; /**< 高さ */
34 | union{
35 | void *p; /**< 画像データの先頭ポインタ */
36 | morpho_ImageYuvPlanar planar;
37 | morpho_ImageYuvSemiPlanar semi_planar;
38 | } dat;
39 | union{
40 | int p; /**< ラインの先頭から次のライン先頭までのバイト数 */
41 | morpho_ImageYuvPlanarPitch planar;
42 | morpho_ImageYuvSemiPlanarPitch semi_planar;
43 | } pitch;
44 | } morpho_ImageDataEx;
45 |
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif
50 |
51 | #endif /* #ifndef MORPHO_IMAGE_DATA_EX_H */
52 |
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_motion_data.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_motion_data.h
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_noise_reduction.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_noise_reduction.h
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_noise_reduction_ext.h:
--------------------------------------------------------------------------------
1 | #ifndef MORPHO_NR_EXT_H
2 | #define MORPHO_NR_EXT_H
3 |
4 | #include "morpho_noise_reduction.h"
5 | /*
6 | return == 0 : OK
7 | return != 0 : NG (Please print the return value to check Error types)
8 | */
9 | MORPHO_API(int)
10 | LINK_mm_camera_morpho_noise_reduction(
11 | unsigned char* yuvImage,
12 | int width,
13 | int height,
14 | int y_level,
15 | int c_level);
16 |
17 | #endif //MORPHO_NR_EXT_H
18 |
--------------------------------------------------------------------------------
/camera/hdr/include/morpho_rect_int.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/camera/hdr/include/morpho_rect_int.h
--------------------------------------------------------------------------------
/camera/mm-image-codec/Android.mk:
--------------------------------------------------------------------------------
1 | include $(call all-subdir-makefiles)
2 |
--------------------------------------------------------------------------------
/camera/mm-image-codec/qomx_core/Android.mk:
--------------------------------------------------------------------------------
1 | OMX_CORE_PATH := $(call my-dir)
2 |
3 | # ------------------------------------------------------------------------------
4 | # Make the shared library (libqomx_core)
5 | # ------------------------------------------------------------------------------
6 |
7 | include $(CLEAR_VARS)
8 | LOCAL_PATH := $(OMX_CORE_PATH)
9 | LOCAL_MODULE_TAGS := optional
10 |
11 | omx_core_defines:= -Wall -Werror \
12 | -g -O0
13 |
14 | LOCAL_CFLAGS := $(omx_core_defines)
15 |
16 | OMX_HEADER_DIR := frameworks/native/include/media/openmax
17 |
18 | LOCAL_C_INCLUDES := $(OMX_HEADER_DIR)
19 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../qexif
20 |
21 | LOCAL_SRC_FILES := qomx_core.c
22 |
23 | LOCAL_MODULE := libqomx_core
24 | LOCAL_SHARED_LIBRARIES := libcutils libdl liblog
25 | LOCAL_PROPRIETARY_MODULE := true
26 |
27 | include $(BUILD_SHARED_LIBRARY)
28 |
--------------------------------------------------------------------------------
/charger_touch/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2012 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | ifneq ($(filter flo deb,$(TARGET_DEVICE)),)
18 |
19 | LOCAL_PATH:= $(call my-dir)
20 |
21 | include $(CLEAR_VARS)
22 | LOCAL_SRC_FILES := charger_touch.c
23 | LOCAL_SHARED_LIBRARIES := libcutils liblog libhardware_legacy
24 | LOCAL_MODULE_TAGS := optional
25 | LOCAL_MODULE_PATH := $(TARGET_OUT)/bin
26 | LOCAL_MODULE := charger_touch
27 | LOCAL_MODULE_OWNER := qcom
28 | LOCAL_PROPRIETARY_MODULE := true
29 | include $(BUILD_EXECUTABLE)
30 |
31 | endif
32 |
--------------------------------------------------------------------------------
/configs/elan-touchscreen.idc:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | #
16 | # Input Device Configuration File for the ELAN touch panel device.
17 | #
18 | # These calibration values are derived from empirical measurements
19 | # and may not be appropriate for use with other touch screens.
20 | # Refer to the input device configuration documentation for more details.
21 | #
22 |
23 | # Basic Parameters
24 | touch.deviceType = touchScreen
25 | touch.orientationAware = 1
26 |
27 | # Size
28 | touch.size.calibration = diameter
29 | touch.size.scale = 6.3284
30 | touch.size.bias = 39.9752
31 |
32 | # Pressure
33 | touch.pressure.calibration = amplitude
34 | touch.pressure.scale = 0.0048
35 |
36 | # Orientation
37 | touch.orientation.calibration = none
38 |
39 | touch.coverage.calibration = box
40 |
--------------------------------------------------------------------------------
/configs/sec_config:
--------------------------------------------------------------------------------
1 | /* IPC Security Config */
2 | /* :: */
3 | 16:4294967295:1000
4 |
--------------------------------------------------------------------------------
/configs/thermald-flo.conf:
--------------------------------------------------------------------------------
1 | sampling 5000
2 |
3 | [pa_therm0]
4 | sampling 5000
5 | thresholds 70
6 | thresholds_clr 67
7 | actions none
8 | action_info 0
9 |
10 | [tsens_tz_sensor0]
11 | sampling 1000
12 | thresholds 70
13 | thresholds_clr 67
14 | actions none
15 | action_info 0
16 |
17 | [tsens_tz_sensor1]
18 | sampling 1000
19 | thresholds 70
20 | thresholds_clr 67
21 | actions none
22 | action_info 0
23 |
24 | [tsens_tz_sensor2]
25 | sampling 1000
26 | thresholds 70
27 | thresholds_clr 67
28 | actions none
29 | action_info 0
30 |
31 | [tsens_tz_sensor3]
32 | sampling 1000
33 | thresholds 70
34 | thresholds_clr 67
35 | actions none
36 | action_info 0
37 |
38 | [tsens_tz_sensor4]
39 | sampling 1000
40 | thresholds 70
41 | thresholds_clr 67
42 | actions none
43 | action_info 0
44 |
45 | [tsens_tz_sensor5]
46 | sampling 1000
47 | thresholds 70
48 | thresholds_clr 67
49 | actions none
50 | action_info 0
51 |
52 | [tsens_tz_sensor6]
53 | sampling 1000
54 | thresholds 70
55 | thresholds_clr 67
56 | actions none
57 | action_info 0
58 |
59 | [tsens_tz_sensor7]
60 | sampling 1000
61 | thresholds 70 90 95 100 105 110 115 120
62 | thresholds_clr 67 85 90 95 100 105 110 115
63 | actions cpu+battery cpu+battery cpu+battery cpu+battery cpu+battery cpu+battery cpu+battery shutdown
64 | action_info 1512000+0 1188000+0 810000+1 648000+1 540000+2 487000+2 384000+3 5000
65 |
66 | [tsens_tz_sensor8]
67 | sampling 1000
68 | thresholds 70 90 95 100 105 110 115 120
69 | thresholds_clr 67 85 90 95 100 105 110 115
70 | actions cpu cpu cpu cpu cpu cpu cpu shutdown
71 | action_info 1512000 1188000 810000 648000 540000 487000 384000 5000
72 |
73 | [tsens_tz_sensor9]
74 | sampling 1000
75 | thresholds 70 90 95 100 105 110 115 120
76 | thresholds_clr 67 85 90 95 100 105 110 115
77 | actions cpu cpu cpu cpu cpu cpu cpu shutdown
78 | action_info 1512000 1188000 810000 648000 540000 487000 384000 5000
79 |
80 | [tsens_tz_sensor10]
81 | sampling 1000
82 | thresholds 70 90 95 100 105 110 115 120
83 | thresholds_clr 67 85 90 95 100 105 110 115
84 | actions cpu cpu cpu cpu cpu cpu cpu shutdown
85 | action_info 1512000 1188000 810000 648000 540000 487000 384000 5000
86 |
87 |
--------------------------------------------------------------------------------
/configs/touch_dev.idc:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2012 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | #
16 | # Input Device Calibration File for the Mako touch screen.
17 | #
18 |
19 | device.internal = 1
20 |
21 | touch.deviceType = touchScreen
22 | touch.orientationAware = 1
23 |
24 | touch.size.calibration = diameter
25 | touch.size.scale = 22.5
26 | touch.size.bias = 0
27 | touch.size.isSummed = 0
28 |
29 | touch.pressure.calibration = amplitude
30 | touch.pressure.scale = 0.0125
31 |
32 | touch.orientation.calibration = none
33 |
--------------------------------------------------------------------------------
/conn_init/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2012 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | ifneq ($(filter flo deb,$(TARGET_DEVICE)),)
18 |
19 | LOCAL_PATH:= $(call my-dir)
20 |
21 | include $(CLEAR_VARS)
22 | LOCAL_MODULE := libwfcu
23 | LOCAL_SRC_FILES := wfc_util_fctrl.c \
24 | wfc_util_common.c
25 | LOCAL_CFLAGS := -Wall \
26 | -Werror
27 | LOCAL_CFLAGS += -DCONFIG_LGE_WLAN_WIFI_PATCH
28 | ifeq ($(BOARD_HAS_QCOM_WLAN), true)
29 | LOCAL_SRC_FILES += wfc_util_qcom.c
30 | LOCAL_CFLAGS += -DCONFIG_LGE_WLAN_QCOM_PATCH
31 | LOCAL_CFLAGS += -DWLAN_CHIP_VERSION_WCNSS
32 | endif
33 | LOCAL_SHARED_LIBRARIES := libcutils liblog
34 | LOCAL_MODULE_TAGS := optional
35 | LOCAL_MODULE_OWNER := qcom
36 | LOCAL_PROPRIETARY_MODULE := true
37 | include $(BUILD_SHARED_LIBRARY)
38 |
39 | include $(CLEAR_VARS)
40 | LOCAL_SRC_FILES := conn_init.c
41 | LOCAL_SHARED_LIBRARIES := libcutils liblog
42 | LOCAL_SHARED_LIBRARIES += libwfcu
43 | LOCAL_CFLAGS += -Wall -Werror
44 | LOCAL_MODULE_TAGS := optional
45 | LOCAL_MODULE := conn_init
46 | LOCAL_MODULE_OWNER := qcom
47 | LOCAL_PROPRIETARY_MODULE := true
48 |
49 | # Make sure the symlinks get created as well.
50 | LOCAL_POST_INSTALL_CMD := \
51 | mkdir -p $(TARGET_OUT_VENDOR)/firmware/wlan/prima/; \
52 | ln -sf /data/misc/wifi/WCNSS_qcom_cfg.ini \
53 | $(TARGET_OUT_VENDOR)/firmware/wlan/prima/WCNSS_qcom_cfg.ini; \
54 | ln -sf /data/misc/wifi/WCNSS_qcom_wlan_nv.bin \
55 | $(TARGET_OUT_VENDOR)/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
56 |
57 | include $(BUILD_EXECUTABLE)
58 |
59 | endif
60 |
--------------------------------------------------------------------------------
/conn_init/conn_init.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | #include
17 | #include
18 | #include
19 |
20 | extern int wfc_util_qcom_check_config(unsigned char *nv_mac_addr);
21 | extern void wfc_util_atoh(char *pAsciiString, int szAsciiString, unsigned char *pHexaBuff, int szHexaBuff);
22 |
23 | static int wifi_check_qcom_cfg_files()
24 | {
25 | char macAddress[13];
26 | char hex[7];
27 | memset(macAddress, 0, 13);
28 | memset(hex, 0, 7);
29 |
30 | // Read MAC String
31 | FILE *fp = NULL;
32 | fp = fopen("/persist/wifi/.macaddr", "r");
33 | if ( fp == NULL )
34 | {
35 | wfc_util_qcom_check_config((unsigned char *)macAddress);
36 | return 0;
37 | }
38 | else
39 | {
40 | int n = fread(macAddress, 12, 1, fp);
41 | fclose(fp);
42 | if (n != 1) {
43 | memset(macAddress, 0, 13);
44 | wfc_util_qcom_check_config((unsigned char *)macAddress);
45 | return 0;
46 | }
47 |
48 | // Write MAC String
49 | wfc_util_atoh( macAddress, 12, (unsigned char *)hex, 6);
50 | wfc_util_qcom_check_config((unsigned char *)hex);
51 | }
52 | return 1;
53 | }
54 |
55 | int main(void)
56 | {
57 | wifi_check_qcom_cfg_files();
58 |
59 | return 0;
60 | }
61 |
--------------------------------------------------------------------------------
/conn_init/wfc_util_common.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef __WFC_UTIL_COMMON_H__
18 | #define __WFC_UTIL_COMMON_H__
19 |
20 | /*
21 | * wfc_util_htoa
22 | *
23 | * return : void
24 | */
25 | extern void wfc_util_htoa(unsigned char *pHexaBuff, int szHexaBuff, char *pAsciiStringBuff, int szAsciiStringBuff);
26 |
27 | /*
28 | * wfc_util_atoh
29 | *
30 | * return : void
31 | */
32 | extern void wfc_util_atoh(char *pAsciiString, int szAsciiString, unsigned char *pHexaBuff, int szHexaBuff);
33 |
34 | /*
35 | * wfc_util_is_random_mac
36 | *
37 | * return : it will return 1 if [mac_add] is same with WFC_UTIL_RANDOM_MAC_HEADER
38 | * or will return 0 if not.
39 | */
40 | extern int wfc_util_is_random_mac(char *mac_add);
41 |
42 | /*
43 | * wfc_util_random_mac
44 | *
45 | * Create random MAC address
46 | *
47 | * return : void
48 | */
49 | void wfc_util_random_mac(unsigned char* mac_addr);
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/conn_init/wfc_util_log.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef __WFC_UTIL_LOG_H__
18 | #define __WFC_UTIL_LOG_H__
19 |
20 | #ifdef ANDROID
21 | #define LOG_TAG "WifiUtil"
22 | #include
23 |
24 | #define wfc_util_log_info(...) ALOGI(__VA_ARGS__)
25 | #define wfc_util_log_error(...) ALOGE(__VA_ARGS__)
26 | #else /* ANDROID */
27 | #define wfc_util_log_info(...) printf(__VA_ARGS__);printf("\n")
28 | #define wfc_util_log_error(...) printf(__VA_ARGS__);printf("\n")
29 | #endif /* ANDROID */
30 |
31 | #endif
32 |
33 |
--------------------------------------------------------------------------------
/conn_init/wfc_util_qcom.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef __WFC_UTIL_QCOM_H__
18 | #define __WFC_UTIL_QCOM_H__
19 |
20 | #ifdef CONFIG_LGE_WLAN_QCOM_PATCH
21 | /*
22 | * wfc_util_qcom_check_config
23 | *
24 | * check the qcom wlan driver config file
25 | *
26 | * return : it will return 0 if procedure is success
27 | * or will return -1 if not.
28 | */
29 | extern int wfc_util_qcom_check_config(unsigned char *nv_mac_addr);
30 |
31 | /*
32 | * wfc_util_qcom_reset_mac
33 | *
34 | * reset the mac address of config file
35 | *
36 | * return : void
37 | */
38 | extern void wfc_util_qcom_reset_mac(void);
39 |
40 | /*
41 | * wfc_util_qcom_ota_enable/disable
42 | *
43 | * enable OTA mode for Wi-Fi related certificiation
44 | *
45 | * return : int (boolean)
46 | */
47 | extern int wfc_util_qcom_ota_enable(void);
48 | extern int wfc_util_qcom_ota_disable(void);
49 | extern int wfc_util_qcom_checkt_roaming_off(void);
50 | #endif /* CONFIG_LGE_WLAN_QCOM_PATCH */
51 | #endif
52 |
53 |
--------------------------------------------------------------------------------
/device.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2011 The Android Open-Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | PRODUCT_PROPERTY_OVERRIDES := \
18 | ro.carrier=wifi-only
19 |
20 | # Camera
21 | PRODUCT_PACKAGES += \
22 | camera.flo
23 |
24 | # the actual meat of the device-specific product definition
25 | $(call inherit-product, $(LOCAL_PATH)/device-common.mk)
26 |
27 | # Overlays
28 | DEVICE_PACKAGE_OVERLAYS += \
29 | $(LOCAL_PATH)/overlay \
30 | $(LOCAL_PATH)/overlay-lineage
31 |
32 | PRODUCT_ENFORCE_RRO_TARGETS := \
33 | framework-res
34 |
35 | PRODUCT_COPY_FILES += \
36 | $(LOCAL_PATH)/rootdir/etc/fstab.flo:$(TARGET_COPY_OUT_RAMDISK)/fstab.flo \
37 | $(LOCAL_PATH)/rootdir/etc/fstab.flo:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.flo
38 |
--------------------------------------------------------------------------------
/extract-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017 The LineageOS Project
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | set -e
19 |
20 | VENDOR=asus
21 | DEVICE_COMMON=flo
22 | DEVICE=${DEVICE:-flo}
23 |
24 | # Load extractutils and do some sanity checks
25 | MY_DIR="${BASH_SOURCE%/*}"
26 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
27 |
28 | CM_ROOT="$MY_DIR"/../../..
29 |
30 | HELPER="$CM_ROOT"/vendor/lineage/build/tools/extract_utils.sh
31 | if [ ! -f "$HELPER" ]; then
32 | echo "Unable to find helper script at $HELPER"
33 | exit 1
34 | fi
35 | . "$HELPER"
36 |
37 | if [ $# -eq 0 ]; then
38 | SRC=adb
39 | else
40 | if [ $# -eq 1 ]; then
41 | SRC=$1
42 | else
43 | echo "$0: bad number of arguments"
44 | echo ""
45 | echo "usage: $0 [PATH_TO_EXPANDED_ROM]"
46 | echo ""
47 | echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from"
48 | echo "the device using adb pull."
49 | exit 1
50 | fi
51 | fi
52 |
53 | # Initialize the helper
54 | setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true
55 |
56 | extract "$MY_DIR"/proprietary-blobs.txt "$SRC"
57 |
58 | if [ "$DEVICE" '!=' "$DEVICE_COMMON" ]; then
59 | # Reinitialize the helper for the device-specific blobs
60 | setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"
61 |
62 | extract "$MY_DIR"/../$DEVICE/proprietary-blobs.txt "$SRC"
63 | fi
64 |
65 | "$MY_DIR"/setup-makefiles.sh
66 |
--------------------------------------------------------------------------------
/gps/Android.mk:
--------------------------------------------------------------------------------
1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)
2 | LOCAL_PATH := $(call my-dir)
3 |
4 | include $(call all-makefiles-under,$(LOCAL_PATH))
5 | endif
6 |
--------------------------------------------------------------------------------
/gps/core/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := libloc_core
6 | LOCAL_MODULE_OWNER := qcom
7 | LOCAL_VENDOR_MODULE := true
8 |
9 | LOCAL_MODULE_TAGS := optional
10 |
11 | LOCAL_SHARED_LIBRARIES := \
12 | libutils \
13 | liblog \
14 | libcutils \
15 | libgps.utils \
16 | libdl \
17 | libprocessgroup
18 |
19 | LOCAL_SRC_FILES += \
20 | MsgTask.cpp \
21 | LocApiBase.cpp \
22 | LocAdapterBase.cpp \
23 | ContextBase.cpp \
24 | LocDualContext.cpp \
25 | loc_core_log.cpp
26 |
27 | LOCAL_CFLAGS += \
28 | -fno-short-enums \
29 | -D_ANDROID_ \
30 | -Wno-error \
31 | -Wno-unused-parameter
32 |
33 | LOCAL_C_INCLUDES:= \
34 | $(TARGET_OUT_HEADERS)/gps.utils
35 |
36 | LOCAL_COPY_HEADERS_TO:= libloc_core/
37 | LOCAL_COPY_HEADERS:= \
38 | MsgTask.h \
39 | LocApiBase.h \
40 | LocAdapterBase.h \
41 | ContextBase.h \
42 | LocDualContext.h \
43 | IzatProxyBase.h \
44 | UlpProxyBase.h \
45 | gps_extended_c.h \
46 | gps_extended.h \
47 | loc_core_log.h
48 |
49 | include $(BUILD_SHARED_LIBRARY)
50 |
--------------------------------------------------------------------------------
/gps/core/ContextBase.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef __LOC_CONTEXT_BASE__
30 | #define __LOC_CONTEXT_BASE__
31 |
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 |
38 | namespace loc_core {
39 |
40 | class LocAdapterBase;
41 |
42 | class ContextBase {
43 | static IzatProxyBase* getIzatProxy(const char* libName);
44 | LocApiBase* createLocApi(LOC_API_ADAPTER_EVENT_MASK_T excludedMask);
45 | protected:
46 | const IzatProxyBase* mIzatProxy;
47 | const MsgTask* mMsgTask;
48 | LocApiBase* mLocApi;
49 |
50 | public:
51 | ContextBase(const MsgTask* msgTask,
52 | LOC_API_ADAPTER_EVENT_MASK_T exMask,
53 | const char* libName);
54 | inline virtual ~ContextBase() { delete mLocApi; delete mIzatProxy; }
55 |
56 | inline const MsgTask* getMsgTask() { return mMsgTask; }
57 | inline LocApiBase* getLocApi() { return mLocApi; }
58 | inline bool hasAgpsExt() { return mIzatProxy->hasAgpsExt(); }
59 | inline void requestUlp(LocAdapterBase* adapter,
60 | unsigned long capabilities) {
61 | mIzatProxy->requestUlp(adapter, capabilities);
62 | }
63 | };
64 |
65 | } // namespace loc_core
66 |
67 | #endif //__LOC_CONTEXT_BASE__
68 |
--------------------------------------------------------------------------------
/gps/core/IzatProxyBase.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef IZAT_PROXY_BASE_H
30 | #define IZAT_PROXY_BASE_H
31 |
32 | #include
33 | #include
34 |
35 | namespace loc_core {
36 |
37 | class LocApiBase;
38 | class LocAdapterBase;
39 |
40 | class IzatProxyBase {
41 | friend class ContextBase;
42 | inline virtual LocApiBase*
43 | getLocApi(const MsgTask* msgTask,
44 | LOC_API_ADAPTER_EVENT_MASK_T exMask) const {
45 | return NULL;
46 | }
47 | protected:
48 | inline IzatProxyBase() {}
49 | public:
50 | inline virtual ~IzatProxyBase() {}
51 | inline virtual void requestUlp(LocAdapterBase* adapter,
52 | unsigned long capabilities) const {}
53 | inline virtual bool hasAgpsExt() const { return false; }
54 | };
55 |
56 | typedef IzatProxyBase* (getIzatProxy_t)();
57 |
58 | } // namespace loc_core
59 |
60 | #endif // IZAT_PROXY_BASE_H
61 |
--------------------------------------------------------------------------------
/gps/core/MsgTask.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef __MSG_TASK__
30 | #define __MSG_TASK__
31 |
32 | #include
33 | #include
34 | #include
35 | #include
36 |
37 | namespace loc_core {
38 |
39 | struct LocMsg {
40 | inline LocMsg() {}
41 | inline virtual ~LocMsg() {}
42 | virtual void proc() const = 0;
43 | inline virtual void log() const {}
44 | };
45 |
46 | class MsgTask {
47 | public:
48 | typedef void* (*tStart)(void*);
49 | typedef pthread_t (*tCreate)(const char* name, tStart start, void* arg);
50 | typedef int (*tAssociate)();
51 | MsgTask(tCreate tCreator, const char* threadName);
52 | MsgTask(tAssociate tAssociator, const char* threadName);
53 | ~MsgTask();
54 | void sendMsg(const LocMsg* msg) const;
55 |
56 | private:
57 | const void* mQ;
58 | tAssociate mAssociator;
59 | MsgTask(const void* q, tAssociate associator);
60 | static void* loopMain(void* copy);
61 | void createPThread(const char* name);
62 | };
63 |
64 | } // namespace loc_core
65 |
66 | #endif //__MSG_TASK__
67 |
--------------------------------------------------------------------------------
/gps/core/UlpProxyBase.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef ULP_PROXY_BASE_H
30 | #define ULP_PROXY_BASE_H
31 |
32 | #include
33 |
34 | namespace loc_core {
35 |
36 | class LocAdapterBase;
37 |
38 | class UlpProxyBase {
39 | public:
40 | inline UlpProxyBase() {}
41 | inline virtual ~UlpProxyBase() {}
42 | inline virtual bool sendStartFix() { return false;}
43 | inline virtual bool sendStopFix() { return false;}
44 | inline virtual bool sendFixMode(LocPosMode ¶ms) { return false;}
45 | inline virtual bool reportPosition(UlpLocation &location,
46 | GpsLocationExtended &locationExtended,
47 | void* locationExt,
48 | enum loc_sess_status status,
49 | LocPosTechMask loc_technology_mask) {
50 | return false;
51 | }
52 | inline virtual bool reportSv(GpsSvStatus &svStatus,
53 | GpsLocationExtended &locationExtended,
54 | void* svExt) {
55 | return false;
56 | }
57 | inline virtual void setAdapter(LocAdapterBase* adapter) {}
58 | inline virtual void setCapabilities(unsigned long capabilities) {}
59 | };
60 |
61 | } // namespace loc_core
62 |
63 | #endif // ULP_PROXY_BASE_H
64 |
--------------------------------------------------------------------------------
/gps/core/loc_core_log.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef LOC_CORE_LOG_H
31 | #define LOC_CORE_LOG_H
32 |
33 | #ifdef __cplusplus
34 | extern "C"
35 | {
36 | #endif
37 |
38 | #include
39 | #include
40 |
41 | const char* loc_get_gps_status_name(GpsStatusValue gps_status);
42 | const char* loc_get_position_mode_name(GpsPositionMode mode);
43 | const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur);
44 | const char* loc_get_aiding_data_mask_names(GpsAidingData data);
45 | const char* loc_get_agps_type_name(AGpsType type);
46 | const char* loc_get_ni_type_name(GpsNiType type);
47 | const char* loc_get_ni_response_name(GpsUserResponseType response);
48 | const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding);
49 | const char* loc_get_agps_bear_name(AGpsBearerType bear);
50 | const char* loc_get_server_type_name(LocServerType type);
51 | const char* loc_get_position_sess_status_name(enum loc_sess_status status);
52 | const char* loc_get_agps_status_name(AGpsStatusValue status);
53 |
54 | #ifdef __cplusplus
55 | }
56 | #endif
57 |
58 | #endif /* LOC_CORE_LOG_H */
59 |
--------------------------------------------------------------------------------
/gps/etc/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_MODULE := gps.conf
5 | LOCAL_MODULE_TAGS := optional
6 | LOCAL_MODULE_CLASS := ETC
7 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/
8 | LOCAL_SRC_FILES := gps.conf
9 | include $(BUILD_PREBUILT)
10 |
11 | include $(CLEAR_VARS)
12 | LOCAL_MODULE := sap.conf
13 | LOCAL_MODULE_TAGS := optional
14 | LOCAL_MODULE_CLASS := ETC
15 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/
16 | LOCAL_SRC_FILES := sap.conf
17 | include $(BUILD_PREBUILT)
18 |
--------------------------------------------------------------------------------
/gps/etc/gps.conf:
--------------------------------------------------------------------------------
1 | # XTRA_SERVER_QUERY (1=on, 0=off)
2 | # If XTRA_SERVER_QUERY is on, the XTRA_SERVERs listed
3 | # below will be ignored, and instead the servers will
4 | # be queried from the modem.
5 | #XTRA_SERVER_QUERY=0
6 |
7 | # XTRA_SERVERs below are used only if XTRA_SERVER_QUERY
8 | # is off.
9 | XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
10 | XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
11 | XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin
12 |
13 | # Error Estimate
14 | # _SET = 1
15 | # _CLEAR = 0
16 | ERR_ESTIMATE=0
17 |
18 | #Test
19 | NTP_SERVER=time.gpsonextra.net
20 | #Asia
21 | # NTP_SERVER=asia.pool.ntp.org
22 | #Europe
23 | # NTP_SERVER=europe.pool.ntp.org
24 | #North America
25 | # NTP_SERVER=north-america.pool.ntp.org
26 |
27 | # DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
28 | # 4 - Debug, 5 - Verbose
29 | # If DEBUG_LEVEL is commented, Android's logging levels will be used
30 | DEBUG_LEVEL = 2
31 |
32 | # Intermediate position report, 1=enable, 0=disable
33 | INTERMEDIATE_POS=0
34 |
35 | # Below bit mask configures how GPS functionalities
36 | # should be locked when user turns off GPS on Settings
37 | # Set bit 0x1 if MO GPS functionalities are to be locked
38 | # Set bit 0x2 if NI GPS functionalities are to be locked
39 | # default - non is locked for backward compatibility
40 | #GPS_LOCK = 0
41 |
42 | # supl version 1.0
43 | SUPL_VER=0x10000
44 |
45 | # GPS Capabilities bit mask
46 | # SCHEDULING = 0x01
47 | # MSB = 0x02
48 | # MSA = 0x04
49 | # ON_DEMAND_TIME = 0x10
50 | # GEOFENCE = 0x20
51 | # default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
52 | CAPABILITIES=0x31
53 |
54 | # Accuracy threshold for intermediate positions
55 | # less accurate positions are ignored, 0 for passing all positions
56 | # ACCURACY_THRES=5000
57 |
58 | ################################
59 | ##### AGPS server settings #####
60 | ################################
61 |
62 | # FOR SUPL SUPPORT, set the following
63 | # SUPL_HOST=supl.host.com or IP
64 | # SUPL_PORT=1234
65 | #SUPL_HOST=supl.google.com
66 | #SUPL_PORT=7276
67 |
68 | # FOR C2K PDE SUPPORT, set the following
69 | # C2K_HOST=c2k.pde.com or IP
70 | # C2K_PORT=1234
71 |
72 | ####################################
73 | # LTE Positioning Profile Settings
74 | ####################################
75 | # 0: Enable RRLP on LTE(Default)
76 | # 1: Enable LPP_User_Plane on LTE
77 | # 2: Enable LPP_Control_Plane
78 | # 3: Enable both LPP_User_Plane and LPP_Control_Plane
79 | LPP_PROFILE = 0
80 |
81 | ################################
82 | # EXTRA SETTINGS
83 | ################################
84 | # NMEA provider (1=Modem Processor, 0=Application Processor)
85 | NMEA_PROVIDER=1
86 |
87 | ##################################################
88 | # Select Positioning Protocol on A-GLONASS system
89 | ##################################################
90 | # 0x1: RRC CPlane
91 | # 0x2: RRLP UPlane
92 | # 0x4: LLP Uplane
93 | A_GLONASS_POS_PROTOCOL_SELECT = 0
94 |
--------------------------------------------------------------------------------
/gps/etc/sap.conf:
--------------------------------------------------------------------------------
1 | ################################
2 | # Sensor Settings
3 | ################################
4 |
5 | # Needs to be set explicitly based on sensor
6 | # There is no default value.
7 | # used in loc_eng_reinit
8 | #GYRO_BIAS_RANDOM_WALK=
9 | #ACCEL_RANDOM_WALK_SPECTRAL_DENSITY=
10 | #ANGLE_RANDOM_WALK_SPECTRAL_DENSITY=
11 | #RATE_RANDOM_WALK_SPECTRAL_DENSITY=
12 | #VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY=
13 |
14 | # Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0)
15 | # used in loc_eng_reinit
16 | SENSOR_ACCEL_BATCHES_PER_SEC=3
17 | SENSOR_ACCEL_SAMPLES_PER_BATCH=5
18 | SENSOR_GYRO_BATCHES_PER_SEC=3
19 | SENSOR_GYRO_SAMPLES_PER_BATCH=5
20 | # Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0)
21 | SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4
22 | SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25
23 | SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4
24 | SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25
25 |
26 | # Sensor Control Mode (0=AUTO, 1=FORCE_ON)
27 | # used in loc_eng_reinit
28 | SENSOR_CONTROL_MODE=0
29 |
30 | # Enable or Disable Sensors for GPS use (0=Enable, 1=Disable)
31 | # used in loc_eng_reinit
32 | SENSOR_USAGE=1
33 |
34 | # Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK)
35 | SENSOR_PROVIDER=2
36 |
37 | # Bit mask used to define which sensor algorithms are used.
38 | # Setting each bit has the following definition:
39 | # 0x1 - DISABLE_INS_POSITIONING_FILTER
40 | # 0x0 - ENABLE_INS_POSITIONING_FILTER
41 | SENSOR_ALGORITHM_CONFIG_MASK=0x1
42 |
--------------------------------------------------------------------------------
/gps/loc_api/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api_50001/
4 |
5 | #call the subfolders
6 | include $(addsuffix Android.mk, $(GPS_DIR_LIST))
7 |
--------------------------------------------------------------------------------
/gps/loc_api/NOTICE:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/gps/loc_api/NOTICE
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := libloc_eng
6 | LOCAL_MODULE_OWNER := qcom
7 | LOCAL_VENDOR_MODULE := true
8 |
9 | LOCAL_MODULE_TAGS := optional
10 |
11 | LOCAL_SHARED_LIBRARIES := \
12 | libutils \
13 | libcutils \
14 | libdl \
15 | liblog \
16 | libloc_core \
17 | libgps.utils \
18 | libprocessgroup
19 |
20 | LOCAL_SRC_FILES += \
21 | loc_eng.cpp \
22 | loc_eng_agps.cpp \
23 | loc_eng_xtra.cpp \
24 | loc_eng_ni.cpp \
25 | loc_eng_log.cpp \
26 | loc_eng_nmea.cpp \
27 | LocEngAdapter.cpp
28 |
29 | LOCAL_SRC_FILES += \
30 | loc_eng_dmn_conn.cpp \
31 | loc_eng_dmn_conn_handler.cpp \
32 | loc_eng_dmn_conn_thread_helper.c \
33 | loc_eng_dmn_conn_glue_msg.c \
34 | loc_eng_dmn_conn_glue_pipe.c
35 |
36 | LOCAL_CFLAGS += \
37 | -fno-short-enums \
38 | -D_ANDROID_ \
39 | -Wno-error \
40 | -Wno-unused-parameter
41 |
42 | LOCAL_C_INCLUDES:= \
43 | $(TARGET_OUT_HEADERS)/gps.utils \
44 | $(TARGET_OUT_HEADERS)/libloc_core
45 |
46 | LOCAL_COPY_HEADERS_TO:= libloc_eng/
47 | LOCAL_COPY_HEADERS:= \
48 | LocEngAdapter.h \
49 | loc.h \
50 | loc_eng.h \
51 | loc_eng_xtra.h \
52 | loc_eng_ni.h \
53 | loc_eng_agps.h \
54 | loc_eng_msg.h \
55 | loc_eng_log.h
56 |
57 | include $(BUILD_SHARED_LIBRARY)
58 |
59 | include $(CLEAR_VARS)
60 |
61 | LOCAL_MODULE := gps.$(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE)
62 | LOCAL_MODULE_OWNER := qcom
63 | LOCAL_VENDOR_MODULE := true
64 |
65 | LOCAL_MODULE_TAGS := optional
66 |
67 | ## Libs
68 | LOCAL_SHARED_LIBRARIES := \
69 | libutils \
70 | libcutils \
71 | liblog \
72 | libloc_eng \
73 | libloc_core \
74 | libgps.utils \
75 | libdl \
76 | libprocessgroup
77 |
78 | LOCAL_SRC_FILES += \
79 | loc.cpp \
80 | gps.c
81 |
82 | LOCAL_CFLAGS += \
83 | -fno-short-enums \
84 | -D_ANDROID_ \
85 | -Wno-error \
86 | -Wno-unused-parameter
87 |
88 | ## Includes
89 | LOCAL_C_INCLUDES:= \
90 | $(TARGET_OUT_HEADERS)/gps.utils \
91 | $(TARGET_OUT_HEADERS)/libloc_core
92 |
93 | LOCAL_MODULE_RELATIVE_PATH := hw
94 |
95 | include $(BUILD_SHARED_LIBRARY)
96 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/gps.c:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011 The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #include
31 |
32 | #include
33 | #include
34 |
35 | extern const GpsInterface* get_gps_interface();
36 |
37 | const GpsInterface* gps__get_gps_interface(struct gps_device_t* dev)
38 | {
39 | return get_gps_interface();
40 | }
41 |
42 | static int open_gps(const struct hw_module_t* module, char const* name,
43 | struct hw_device_t** device)
44 | {
45 | struct gps_device_t *dev = (struct gps_device_t *) malloc(sizeof(struct gps_device_t));
46 | memset(dev, 0, sizeof(*dev));
47 |
48 | dev->common.tag = HARDWARE_DEVICE_TAG;
49 | dev->common.version = 0;
50 | dev->common.module = (struct hw_module_t*)module;
51 | dev->get_gps_interface = gps__get_gps_interface;
52 |
53 | *device = (struct hw_device_t*)dev;
54 | return 0;
55 | }
56 |
57 | static struct hw_module_methods_t gps_module_methods = {
58 | .open = open_gps
59 | };
60 |
61 | struct hw_module_t HAL_MODULE_INFO_SYM = {
62 | .tag = HARDWARE_MODULE_TAG,
63 | .module_api_version = 1,
64 | .hal_api_version = 0,
65 | .id = GPS_HARDWARE_MODULE_ID,
66 | .name = "loc_api GPS Module",
67 | .author = "Qualcomm USA, Inc.",
68 | .methods = &gps_module_methods,
69 | };
70 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __LOC_H__
31 | #define __LOC_H__
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif /* __cplusplus */
36 |
37 | #include
38 | #include
39 | #include
40 | #include
41 |
42 | #define XTRA_DATA_MAX_SIZE 100000 /*bytes*/
43 |
44 | typedef void (*loc_location_cb_ext) (UlpLocation* location, void* locExt);
45 | typedef void (*loc_sv_status_cb_ext) (GpsSvStatus* sv_status, void* svExt);
46 | typedef void* (*loc_ext_parser)(void* data);
47 |
48 | typedef struct {
49 | loc_location_cb_ext location_cb;
50 | gps_status_callback status_cb;
51 | loc_sv_status_cb_ext sv_status_cb;
52 | gps_nmea_callback nmea_cb;
53 | gps_set_capabilities set_capabilities_cb;
54 | gps_acquire_wakelock acquire_wakelock_cb;
55 | gps_release_wakelock release_wakelock_cb;
56 | gps_create_thread create_thread_cb;
57 | loc_ext_parser location_ext_parser;
58 | loc_ext_parser sv_ext_parser;
59 | gps_request_utc_time request_utc_time_cb;
60 | } LocCallbacks;
61 |
62 | #ifdef __cplusplus
63 | }
64 | #endif /* __cplusplus */
65 |
66 | #endif //__LOC_H__
67 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef LOC_ENG_DATA_SERVER_H
30 | #define LOC_ENG_DATA_SERVER_H
31 |
32 | #include "loc_eng_dmn_conn_thread_helper.h"
33 |
34 | #ifdef _ANDROID_
35 |
36 | #define GPSONE_LOC_API_Q_PATH "/data/misc/gpsone_d/gpsone_loc_api_q"
37 | #define GPSONE_LOC_API_RESP_Q_PATH "/data/misc/gpsone_d/gpsone_loc_api_resp_q"
38 | #define QUIPC_CTRL_Q_PATH "/data/misc/gpsone_d/quipc_ctrl_q"
39 | #define MSAPM_CTRL_Q_PATH "/data/misc/gpsone_d/msapm_ctrl_q"
40 | #define MSAPU_CTRL_Q_PATH "/data/misc/gpsone_d/msapu_ctrl_q"
41 |
42 | #else
43 |
44 | #define GPSONE_LOC_API_Q_PATH "/tmp/gpsone_loc_api_q"
45 | #define GPSONE_LOC_API_RESP_Q_PATH "/tmp/gpsone_loc_api_resp_q"
46 | #define QUIPC_CTRL_Q_PATH "/tmp/quipc_ctrl_q"
47 | #define MSAPM_CTRL_Q_PATH "/tmp/msapm_ctrl_q"
48 | #define MSAPU_CTRL_Q_PATH "/tmp/msapu_ctrl_q"
49 |
50 | #endif
51 |
52 | int loc_eng_dmn_conn_loc_api_server_launch(thelper_create_thread create_thread_cb,
53 | const char * loc_api_q_path, const char * ctrl_q_path, void *agps_handle);
54 | int loc_eng_dmn_conn_loc_api_server_unblock(void);
55 | int loc_eng_dmn_conn_loc_api_server_join(void);
56 | int loc_eng_dmn_conn_loc_api_server_data_conn(int, int);
57 |
58 | #endif /* LOC_ENG_DATA_SERVER_H */
59 |
60 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef LOC_ENG_DMN_CONN_GLUE_MSG_H
30 | #define LOC_ENG_DMN_CONN_GLUE_MSG_H
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif /* __cplusplus */
35 |
36 |
37 | #include
38 | #include "loc_eng_dmn_conn_glue_pipe.h"
39 |
40 | int loc_eng_dmn_conn_glue_msgget(const char * q_path, int mode);
41 | int loc_eng_dmn_conn_glue_msgremove(const char * q_path, int msgqid);
42 | int loc_eng_dmn_conn_glue_msgsnd(int msgqid, const void * msgp, size_t msgsz);
43 | int loc_eng_dmn_conn_glue_msgrcv(int msgqid, void *msgp, size_t msgsz);
44 | int loc_eng_dmn_conn_glue_msgflush(int msgqid);
45 | int loc_eng_dmn_conn_glue_msgunblock(int msgqid);
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif /* __cplusplus */
50 |
51 | #endif /* LOC_ENG_DMN_CONN_GLUE_MSG_H */
52 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef LOC_ENG_DMN_CONN_GLUE_PIPE_H
30 | #define LOC_ENG_DMN_CONN_GLUE_PIPE_H
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif /* __cplusplus */
35 |
36 | #include
37 |
38 | int loc_eng_dmn_conn_glue_pipeget(const char * pipe_name, int mode);
39 | int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd);
40 | int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz);
41 | int loc_eng_dmn_conn_glue_piperead(int fd, void * buf, size_t sz);
42 |
43 | int loc_eng_dmn_conn_glue_pipeflush(int fd);
44 | int loc_eng_dmn_conn_glue_pipeunblock(int fd);
45 |
46 | #ifdef __cplusplus
47 | }
48 | #endif /* __cplusplus */
49 |
50 | #endif /* LOC_ENG_DMN_CONN_GLUE_PIPE_H */
51 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc_eng_log.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #define LOG_NDDEBUG 0
31 | #define LOG_TAG "LocSvc_eng"
32 |
33 | #include "loc_log.h"
34 | #include "loc_eng_log.h"
35 |
36 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc_eng_log.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef LOC_ENG_LOG_H
31 | #define LOC_ENG_LOG_H
32 |
33 | #ifdef __cplusplus
34 | extern "C"
35 | {
36 | #endif
37 |
38 | #include
39 |
40 | #ifdef __cplusplus
41 | }
42 | #endif
43 |
44 | #endif /* LOC_ENG_LOG_H */
45 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc_eng_ni.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2009,2011 The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef LOC_ENG_NI_H
31 | #define LOC_ENG_NI_H
32 |
33 | #include
34 |
35 | #define LOC_NI_NO_RESPONSE_TIME 20 /* secs */
36 | #define LOC_NI_NOTIF_KEY_ADDRESS "Address"
37 |
38 | typedef struct {
39 | pthread_t thread; /* NI thread */
40 | int respTimeLeft; /* examine time for NI response */
41 | bool respRecvd; /* NI User reponse received or not from Java layer*/
42 | void* rawRequest;
43 | int reqID; /* ID to check against response */
44 | GpsUserResponseType resp;
45 | pthread_cond_t tCond;
46 | pthread_mutex_t tLock;
47 | } loc_eng_ni_data_s_type;
48 |
49 |
50 | #endif /* LOC_ENG_NI_H */
51 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc_eng_nmea.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef LOC_ENG_NMEA_H
31 | #define LOC_ENG_NMEA_H
32 |
33 | #include
34 |
35 | #define NMEA_SENTENCE_MAX_LENGTH 200
36 |
37 | void loc_eng_nmea_send(char *pNmea, int length, loc_eng_data_s_type *loc_eng_data_p);
38 | int loc_eng_nmea_put_checksum(char *pNmea, int maxSize);
39 | void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, const GpsSvStatus &svStatus, const GpsLocationExtended &locationExtended);
40 | void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, const UlpLocation &location, const GpsLocationExtended &locationExtended, unsigned char generate_nmea);
41 |
42 | #endif // LOC_ENG_NMEA_H
43 |
--------------------------------------------------------------------------------
/gps/loc_api/libloc_api_50001/loc_eng_xtra.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2009,2011 The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef LOC_ENG_XTRA_H
31 | #define LOC_ENG_XTRA_H
32 |
33 | #include
34 |
35 | // Module data
36 | typedef struct
37 | {
38 | // loc_eng_ioctl_cb_data_s_type ioctl_cb_data;
39 | gps_xtra_download_request download_request_cb;
40 | report_xtra_server report_xtra_server_cb;
41 |
42 | // XTRA data buffer
43 | char *xtra_data_for_injection; // NULL if no pending data
44 | int xtra_data_len;
45 | } loc_eng_xtra_data_s_type;
46 |
47 | #endif // LOC_ENG_XTRA_H
48 |
--------------------------------------------------------------------------------
/gps/platform_lib_abstractions/elapsed_millis_since_boot.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #include
30 | #include
31 | #include "platform_lib_time.h"
32 |
33 | int64_t systemTime(int clock)
34 | {
35 | struct timeval t;
36 | t.tv_sec = t.tv_usec = 0;
37 | gettimeofday(&t, NULL);
38 | return t.tv_sec*1000000LL + t.tv_usec;
39 | }
40 |
41 |
42 | int64_t elapsedMillisSinceBoot()
43 | {
44 | int64_t t_us = systemTime(0);
45 | return (int64_t) t_us / 1000LL;
46 | }
47 |
--------------------------------------------------------------------------------
/gps/platform_lib_abstractions/platform_lib_includes.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #ifndef _PLATFORM_LIB_INCLUDES_H_
30 | #define _PLATFORM_LIB_INCLUDES_H_
31 |
32 | #include "platform_lib_time.h"
33 | #include "platform_lib_macros.h"
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/gps/platform_lib_abstractions/platform_lib_time.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | */
28 |
29 | #ifndef _PLATFORM_LIB_TIME_H_
30 | #define _PLATFORM_LIB_TIME_H_
31 |
32 | int64_t systemTime(int clock);
33 | int64_t elapsedMillisSinceBoot();
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/gps/utils/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | ## Libs
6 | LOCAL_SHARED_LIBRARIES := \
7 | libutils \
8 | libcutils \
9 | liblog
10 |
11 | LOCAL_SRC_FILES += \
12 | loc_log.cpp \
13 | loc_cfg.cpp \
14 | msg_q.c \
15 | linked_list.c \
16 | loc_target.cpp \
17 | loc_timer.c \
18 | ../platform_lib_abstractions/elapsed_millis_since_boot.cpp
19 |
20 |
21 | LOCAL_CFLAGS += \
22 | -fno-short-enums \
23 | -D_ANDROID_ \
24 | -Wno-error \
25 | -Wno-format \
26 | -Wno-unused-parameter
27 |
28 | LOCAL_LDFLAGS += -Wl,--export-dynamic
29 |
30 | ## Includes
31 | LOCAL_C_INCLUDES:= \
32 | $(LOCAL_PATH)/../platform_lib_abstractions
33 |
34 | LOCAL_COPY_HEADERS_TO:= gps.utils/
35 | LOCAL_COPY_HEADERS:= \
36 | loc_log.h \
37 | loc_cfg.h \
38 | log_util.h \
39 | linked_list.h \
40 | msg_q.h \
41 | loc_target.h \
42 | loc_timer.h \
43 | ../platform_lib_abstractions/platform_lib_includes.h \
44 | ../platform_lib_abstractions/platform_lib_time.h \
45 | ../platform_lib_abstractions/platform_lib_macros.h
46 |
47 |
48 | LOCAL_MODULE := libgps.utils
49 | LOCAL_MODULE_OWNER := qcom
50 | LOCAL_VENDOR_MODULE := true
51 |
52 | LOCAL_MODULE_TAGS := optional
53 |
54 | include $(BUILD_SHARED_LIBRARY)
55 |
--------------------------------------------------------------------------------
/gps/utils/loc_log.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef LOC_LOG_H
31 | #define LOC_LOG_H
32 |
33 | #ifdef __cplusplus
34 | extern "C"
35 | {
36 | #endif
37 |
38 | #include
39 | #include "loc_target.h"
40 |
41 | typedef struct
42 | {
43 | char name[128];
44 | long val;
45 | } loc_name_val_s_type;
46 |
47 | #define NAME_VAL(x) {"" #x "", x }
48 |
49 | #define UNKNOWN_STR "UNKNOWN"
50 |
51 | #define CHECK_MASK(type, value, mask_var, mask) \
52 | ((mask_var & mask) ? (type) value : (type) (-1))
53 |
54 | /* Get names from value */
55 | const char* loc_get_name_from_mask(loc_name_val_s_type table[], int table_size, long mask);
56 | const char* loc_get_name_from_val(loc_name_val_s_type table[], int table_size, long value);
57 | const char* loc_get_msg_q_status(int status);
58 | const char* loc_get_target_name(unsigned int target);
59 |
60 | extern const char* log_succ_fail_string(int is_succ);
61 |
62 | extern char *loc_get_time(char *time_string, unsigned long buf_size);
63 |
64 | #ifdef __cplusplus
65 | }
66 | #endif
67 |
68 | #endif /* LOC_LOG_H */
69 |
--------------------------------------------------------------------------------
/gps/utils/loc_target.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 | #ifndef LOC_TARGET_H
30 | #define LOC_TARGET_H
31 | #define TARGET_SET(gnss,ssc) ( (gnss<<1)|ssc )
32 | #define TARGET_DEFAULT TARGET_SET(GNSS_MSM, HAS_SSC)
33 | #define TARGET_MDM TARGET_SET(GNSS_MDM, HAS_SSC)
34 | #define TARGET_APQ_SA TARGET_SET(GNSS_GSS, NO_SSC)
35 | #define TARGET_MPQ TARGET_SET(GNSS_NONE,NO_SSC)
36 | #define TARGET_MSM_NO_SSC TARGET_SET(GNSS_MSM, NO_SSC)
37 | #define getTargetGnssType(target) (target>>1)
38 |
39 | #ifdef __cplusplus
40 | extern "C"
41 | {
42 | #endif
43 |
44 | unsigned int get_target(void);
45 |
46 | typedef enum {
47 | GNSS_NONE = 0,
48 | GNSS_MSM,
49 | GNSS_GSS,
50 | GNSS_MDM,
51 | GNSS_GRIFFON,
52 | GNSS_UNKNOWN
53 | }GNSS_TARGET;
54 |
55 | typedef enum {
56 | NO_SSC = 0,
57 | HAS_SSC
58 | }SSC_TYPE;
59 |
60 | #ifdef __cplusplus
61 | }
62 | #endif
63 |
64 | #endif /*LOC_TARGET_H*/
65 |
--------------------------------------------------------------------------------
/gps/utils/loc_timer.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundation, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *
28 | */
29 |
30 | #ifndef __LOC_DELAY_H__
31 | #define __LOC_DELAY_H__
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif /* __cplusplus */
36 | #include
37 | #include "log_util.h"
38 |
39 | /*
40 | Return values:
41 | Success = 0
42 | Failure = Non zero
43 | */
44 | typedef void(*loc_timer_callback)(void *user_data, int result);
45 |
46 | //int loc_timer_start(loc_timer_client_data *p_thread);
47 | int loc_timer_start(unsigned int delay_msec,
48 | loc_timer_callback,
49 | void* user_data);
50 | #ifdef __cplusplus
51 | }
52 | #endif /* __cplusplus */
53 |
54 | #endif //__LOC_DELAY_H__
55 |
--------------------------------------------------------------------------------
/keylayout/apq8064-tabla-snd-card_Button_Jack.kcm:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | type SPECIAL_FUNCTION
16 |
--------------------------------------------------------------------------------
/keylayout/apq8064-tabla-snd-card_Button_Jack.kl:
--------------------------------------------------------------------------------
1 | key 256 HEADSETHOOK
2 |
--------------------------------------------------------------------------------
/keylayout/hs_detect.kcm:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | type SPECIAL_FUNCTION
16 |
--------------------------------------------------------------------------------
/keylayout/hs_detect.kl:
--------------------------------------------------------------------------------
1 | key 226 HEADSETHOOK
2 | key 116 POWER
3 | key 107 ENDCALL
4 |
5 |
--------------------------------------------------------------------------------
/keylayout/keypad_8064.kcm:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | type SPECIAL_FUNCTION
16 |
--------------------------------------------------------------------------------
/keylayout/keypad_8064.kl:
--------------------------------------------------------------------------------
1 | key 114 VOLUME_DOWN
2 | key 115 VOLUME_UP
3 |
--------------------------------------------------------------------------------
/keylayout/pmic8xxx_pwrkey.kcm:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | type SPECIAL_FUNCTION
16 |
--------------------------------------------------------------------------------
/keylayout/pmic8xxx_pwrkey.kl:
--------------------------------------------------------------------------------
1 | key 116 POWER
2 |
--------------------------------------------------------------------------------
/kickstart_checker.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 | setprop gsm.radio.kickstart off
3 |
4 | if [ $(getprop ro.boot.baseband) == "mdm" ]; then
5 |
6 | for f in $(ls /data/qcks/); do
7 | (ls -l /data/qcks/$f | grep root) && rm /data/qcks/$f;
8 | done
9 |
10 | chown system:system $(realpath /dev/block/platform/msm_sdcc.1/by-name/m9kefs1)
11 | chmod 660 $(realpath /dev/block/platform/msm_sdcc.1/by-name/m9kefs1)
12 | chown system:system $(realpath /dev/block/platform/msm_sdcc.1/by-name/m9kefs2)
13 | chmod 660 $(realpath /dev/block/platform/msm_sdcc.1/by-name/m9kefs2)
14 | chown system:system $(realpath /dev/block/platform/msm_sdcc.1/by-name/m9kefs3)
15 | chmod 660 $(realpath /dev/block/platform/msm_sdcc.1/by-name/m9kefs3)
16 | chown system:system $(realpath /dev/block/platform/msm_sdcc.1/by-name/m9kefsc)
17 | chmod 660 $(realpath /dev/block/platform/msm_sdcc.1/by-name/m9kefsc)
18 |
19 | echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init
20 |
21 | setprop gsm.radio.kickstart on
22 | fi
23 |
--------------------------------------------------------------------------------
/lineage.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "repository": "android_kernel_google_msm",
4 | "target_path": "kernel/google/msm"
5 | }
6 | ]
7 |
--------------------------------------------------------------------------------
/lineage_flo.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2016 The CyanogenMod Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | # Inherit some common Lineage stuff.
16 | $(call inherit-product, vendor/lineage/config/common_mini_tablet_wifionly.mk)
17 |
18 | # Inherit from the common Open Source product configuration
19 | $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
20 |
21 | # Inherit from hardware-specific part of the product configuration
22 | $(call inherit-product, $(LOCAL_PATH)/device.mk)
23 |
24 | ## Device identifier. This must come after all inclusions
25 | PRODUCT_DEVICE := flo
26 | PRODUCT_NAME := lineage_flo
27 | PRODUCT_BRAND := google
28 | PRODUCT_MODEL := Nexus 7
29 | PRODUCT_MANUFACTURER := asus
30 |
31 | PRODUCT_BUILD_PROP_OVERRIDES += \
32 | PRODUCT_NAME=razor \
33 | PRIVATE_BUILD_DESC="razor-user 6.0.1 MOB30X 3036618 release-keys"
34 |
35 | BUILD_FINGERPRINT := google/razor/flo:6.0.1/MOB30X/3036618:user/release-keys
36 |
--------------------------------------------------------------------------------
/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
33 | 8
34 |
35 |
47 | 64
48 |
49 |
61 | 64
62 |
63 |
65 | true
66 |
67 |
--------------------------------------------------------------------------------
/overlay-lineage/packages/apps/Backgrounds/app/src/main/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 | 1
18 |
19 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc208-mnc01/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
24 |
25 |
27 |
28 | - 1
29 | - 4
30 |
31 |
32 |
36 |
37 | - Orange Internet,orange.fr,,,orange,orange,,,,,208,01,,DUN"
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc214-mnc01/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
24 |
25 |
27 |
28 | - 1
29 | - 4
30 |
31 |
32 |
36 |
37 | - INTERNET,airtelnet.es,,,vodafone,vodafone,,,,,214,01,,DUN"
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values-mcc214-mnc03/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
24 |
25 |
27 |
28 | - 1
29 | - 4
30 |
31 |
32 |
36 |
37 | - Orange Internet PC,internet,,,orange,orange,,,,,214,03,,DUN"
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | 30000
22 |
23 | true
24 |
25 | 87
26 |
27 |
29 | 3600000
30 |
31 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SystemUI/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
24 |
26 | true
27 |
28 |
29 | 7
30 |
31 |
34 | false
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Bluetooth/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 | false
18 | true
19 |
20 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/bools.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 | true
20 |
21 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Snap/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
17 |
18 |
19 | true
20 |
21 |
22 | true
23 |
24 |
25 | false
26 |
27 |
28 | false
29 |
30 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Trebuchet/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 | true
3 |
4 |
--------------------------------------------------------------------------------
/power/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2014 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | LOCAL_PATH:= $(call my-dir)
18 |
19 | include $(CLEAR_VARS)
20 | LOCAL_MODULE_RELATIVE_PATH := hw
21 | LOCAL_SRC_FILES := power_flo.c
22 | LOCAL_SHARED_LIBRARIES := liblog libcutils
23 | LOCAL_MODULE_TAGS := optional
24 | LOCAL_MODULE := power.flo
25 | LOCAL_PROPRIETARY_MODULE := true
26 | include $(BUILD_SHARED_LIBRARY)
27 |
--------------------------------------------------------------------------------
/rootdir/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | # Device init scripts
4 |
5 | ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),flo)
6 | # deb also has fstab.flo and init.flo.rc
7 | include $(CLEAR_VARS)
8 | LOCAL_MODULE := fstab.flo
9 | LOCAL_MODULE_TAGS := optional
10 | LOCAL_MODULE_CLASS := ETC
11 | LOCAL_SRC_FILES := etc/fstab.flo
12 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
13 | include $(BUILD_PREBUILT)
14 |
15 | include $(CLEAR_VARS)
16 | LOCAL_MODULE := init.flo.rc
17 | LOCAL_MODULE_TAGS := optional
18 | LOCAL_MODULE_CLASS := ETC
19 | LOCAL_SRC_FILES := etc/init.flo.rc
20 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
21 | include $(BUILD_PREBUILT)
22 |
23 | endif
24 |
25 | include $(CLEAR_VARS)
26 | LOCAL_MODULE := init.flo.power.rc
27 | LOCAL_MODULE_TAGS := optional
28 | LOCAL_MODULE_CLASS := ETC
29 | LOCAL_SRC_FILES := etc/init.flo.power.rc
30 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
31 | include $(BUILD_PREBUILT)
32 |
33 | include $(CLEAR_VARS)
34 | LOCAL_MODULE := init.flo.usb.rc
35 | LOCAL_MODULE_TAGS := optional
36 | LOCAL_MODULE_CLASS := ETC
37 | LOCAL_SRC_FILES := etc/init.flo.usb.rc
38 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
39 | include $(BUILD_PREBUILT)
40 |
41 | include $(CLEAR_VARS)
42 | LOCAL_MODULE := ueventd.flo.rc
43 | LOCAL_MODULE_TAGS := optional
44 | LOCAL_MODULE_CLASS := ETC
45 | LOCAL_SRC_FILES := etc/ueventd.flo.rc
46 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
47 | include $(BUILD_PREBUILT)
48 |
--------------------------------------------------------------------------------
/rootdir/etc/init.flo.bt.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | BLUETOOTH_SLEEP_PATH=/proc/bluetooth/sleep/proto
4 | LOG_TAG="msm8960-bluetooth"
5 | LOG_NAME="${0}:"
6 |
7 | loge ()
8 | {
9 | /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
10 | }
11 |
12 | logi ()
13 | {
14 | /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
15 | }
16 |
17 | failed ()
18 | {
19 | loge "$1: exit code $2"
20 | exit $2
21 | }
22 |
23 | # Note that "hci_qcomm_init -e" prints expressions to set the shell variables
24 | # BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS.
25 |
26 | POWER_CLASS=`getprop qcom.bt.dev_power_class`
27 | TRANSPORT=`getprop ro.qualcomm.bt.hci_transport`
28 | DUTADDR=`getprop net.btdut.address`
29 |
30 | #find the transport type
31 | logi "Transport : $TRANSPORT"
32 | logi "DUTADDR : $DUTADDR"
33 |
34 | #load bd addr
35 | if [$DUTADDR == ""]
36 | then
37 | BDADDR=`/vendor/bin/bdAddrLoader -f /persist/bluetooth/.bdaddr -h -x`
38 | else
39 | BDADDR=`/vendor/bin/bdAddrLoader -p net.btdut.address -s -x`
40 | fi
41 |
42 | setprop vendor.bluetooth.status off
43 |
44 | logi "BDADDR: $BDADDR"
45 |
46 | case $POWER_CLASS in
47 | 1) PWR_CLASS="-p 0" ;
48 | logi "Power Class: 1";;
49 | 2) PWR_CLASS="-p 1" ;
50 | logi "Power Class: 2";;
51 | 3) PWR_CLASS="-p 2" ;
52 | logi "Power Class: CUSTOM";;
53 | *) PWR_CLASS="";
54 | logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
55 | logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";;
56 | esac
57 |
58 | if [$BDADDR == ""]
59 | then
60 | /vendor/bin/hci_qcomm_init -e $PWR_CLASS -vv
61 | else
62 | /vendor/bin/hci_qcomm_init -b $BDADDR -e $PWR_CLASS -vv
63 | fi
64 |
65 | case $? in
66 | 0) logi "Bluetooth QSoC firmware download succeeded, $PWR_CLASS $BDADDR $TRANSPORT";;
67 | *) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init;
68 | setprop vendor.bluetooth.status off;
69 | exit $exit_code_hci_qcomm_init;;
70 | esac
71 |
72 | setprop vendor.bluetooth.status on
73 |
74 | logi "start bluetooth smd transport"
75 |
76 | exit 0
77 |
--------------------------------------------------------------------------------
/rootdir/etc/init.flo.wifi.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | # Workaround for conn_init not copying the updated firmware
4 | rm /data/misc/wifi/WCNSS_qcom_cfg.ini
5 | rm /data/misc/wifi/WCNSS_qcom_wlan_nv.bin
6 |
7 | /vendor/bin/conn_init
8 |
9 | echo 1 > /dev/wcnss_wlan
10 |
11 |
--------------------------------------------------------------------------------
/rootdir/etc/init.qcom.devstart.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | echo 1 > /sys/kernel/boot_adsp/boot
4 | setprop sys.qcom.devup 1
5 |
--------------------------------------------------------------------------------
/rootdir/etc/init.qcom.devwait.sh:
--------------------------------------------------------------------------------
1 | #!/system/bin/sh
2 |
3 | up="`getprop sys.qcom.devup`"
4 | while [ "$up" != "1" ]
5 | do
6 | sleep 0.1
7 | up="`getprop sys.qcom.devup`"
8 | done
9 |
--------------------------------------------------------------------------------
/rootdir/etc/ueventd.flo.rc:
--------------------------------------------------------------------------------
1 | /dev/cpu_dma_latency 0660 system system
2 | /dev/smd3 0660 bluetooth bluetooth
3 | /dev/smd2 0660 bluetooth bluetooth
4 | /dev/uinput 0660 system bluetooth
5 | /dev/ttyHS0 0600 bluetooth bluetooth
6 | /dev/ttyMSM0 0600 bluetooth bluetooth
7 | /dev/kgsl 0666 system system
8 | /dev/kgsl-3d0 0666 system system
9 | /dev/ion 0664 system system
10 | /dev/msm_rotator 0664 system system
11 | /dev/msm_vidc_dec 0660 system camera
12 | /dev/msm_vidc_dec_sec 0660 system camera
13 | /dev/msm_vidc_enc 0660 system camera
14 | /dev/msm_acdb 0660 system audio
15 | /dev/msm_rtac 0660 system audio
16 | /dev/smd4 0660 system system
17 | /dev/smd7 0640 radio radio
18 | /dev/smdcntl0 0640 radio radio
19 | /dev/smdcntl1 0640 radio radio
20 | /dev/smdcntl2 0640 radio radio
21 | /dev/smdcntl3 0640 radio radio
22 | /dev/smdcntl4 0640 radio radio
23 | /dev/smdcntl5 0640 radio radio
24 | /dev/smdcntl6 0640 radio radio
25 | /dev/smdcntl7 0640 radio radio
26 | /dev/smd_sns_adsp 0600 system system
27 | /dev/smd_sns_dsps 0600 system system
28 | /dev/smuxctl32 0640 radio radio
29 | /dev/rmnet_mux_ctrl 0640 radio radio
30 | /dev/hsicctl0 0640 radio radio
31 | /dev/hsicctl1 0640 radio radio
32 | /dev/hsicctl2 0640 radio radio
33 | /dev/hsicctl3 0640 radio radio
34 | /dev/video* 0660 system camera
35 | /dev/media* 0660 system camera
36 | /dev/v4l-subdev* 0660 system camera
37 | /dev/msm_camera/* 0660 system camera
38 | /dev/gemini* 0660 system camera
39 | /dev/msm_dsps 0600 system system
40 | /dev/bcm2079x-i2c 0660 nfc nfc
41 | /dev/qseecom 0660 system drmrpc
42 | /dev/diag 0660 radio radio
43 | /dev/mdm 0660 system radio
44 | /dev/gss 0660 system gps
45 | /dev/ks_hsic_bridge 0660 system system
46 | /dev/efs_hsic_bridge 0660 system system
47 |
--------------------------------------------------------------------------------
/sensors/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 Unlegacy Android Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | LOCAL_PATH := $(call my-dir)
18 |
19 | include $(CLEAR_VARS)
20 |
21 | LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM)
22 |
23 | LOCAL_MODULE_RELATIVE_PATH := hw
24 | LOCAL_PROPRIETARY_MODULE := true
25 |
26 | LOCAL_CFLAGS := -DLOG_TAG=\"sensors_wrapper\"
27 |
28 | LOCAL_SRC_FILES := sensors_wrapper.cpp
29 |
30 | LOCAL_SHARED_LIBRARIES := liblog
31 |
32 | include $(BUILD_SHARED_LIBRARY)
33 |
--------------------------------------------------------------------------------
/sepolicy/attributes:
--------------------------------------------------------------------------------
1 | # domain_deprecated attribute is being removed from core policy. Leave it
2 | # in device-specific policy for device-specific domains. Unlike core policy,
3 | # device-specific policy will eventually be deprecated.
4 | attribute device_domain_deprecated;
5 |
--------------------------------------------------------------------------------
/sepolicy/bluetooth_loader.te:
--------------------------------------------------------------------------------
1 | # Bluetooth executables and script (bdAddrLoader, init.flo.bt.sh)
2 | # type bluetooth_loader, domain, device_domain_deprecated;
3 | # type bluetooth_loader_exec, exec_type, file_type;
4 |
5 | # Run init.flo.bt.sh
6 | allow bluetooth_loader shell_exec:file rx_file_perms;
7 | allow bluetooth_loader bluetooth_loader_exec:file rx_file_perms;
8 |
9 | # init.flo.bt.sh needs /system/bin/log access
10 | allow bluetooth_loader devpts:chr_file rw_file_perms;
11 |
12 | # Run hci_qcomm_init from init.flo.bt.sh
13 | domain_auto_trans(bluetooth_loader, hci_attach_exec, hci_attach)
14 | allow hci_attach bluetooth_loader:fd use;
15 |
16 | # Read mac address from persist partition
17 | allow bluetooth_loader persist_file:dir search;
18 | r_dir_file(bluetooth_loader, persist_bluetooth_file)
19 |
20 | # Set persist.service.bdroid.* and bluetooth.* property values
21 | set_prop(bluetooth, bluetooth_prop)
22 | set_prop(bluetooth_loader, bluetooth_prop)
23 |
24 | # Allow getprop/setprop for init.flo.bt.sh
25 | allow bluetooth_loader system_file:file execute_no_trans;
26 | allow bluetooth_loader toolbox_exec:file rx_file_perms;
27 |
--------------------------------------------------------------------------------
/sepolicy/bridge.te:
--------------------------------------------------------------------------------
1 | # Bridge Manager (radio process)
2 | type bridge, domain, device_domain_deprecated;
3 | type bridge_exec, exec_type, file_type;
4 |
5 | # Started by init
6 | init_daemon_domain(bridge)
7 |
8 | # Uevent for usb connection
9 | allow bridge self:netlink_kobject_uevent_socket { create bind read };
10 |
11 | # Talk to qmuxd (qmux_radio)
12 | qmux_socket(bridge)
13 |
14 | # Alert the RmNet SMD & SDIO function driver of the correct transport.
15 | # (/sys/class/android_usb/f_rmnet_smd_sdio/transport)
16 | allow bridge sysfs_rmnet:file { open read write getattr };
17 |
18 | allow bridge sysfs_android_usb:dir r_dir_perms;
19 |
--------------------------------------------------------------------------------
/sepolicy/camera.te:
--------------------------------------------------------------------------------
1 | # Qualcomm MSM camera
2 | type camera, domain, device_domain_deprecated;
3 | type camera_exec, exec_type, file_type;
4 |
5 | # Started by init
6 | init_daemon_domain(camera)
7 |
8 | # Interact with other media devices
9 | allow camera camera_device:chr_file rw_file_perms;
10 | allow camera gpu_device:chr_file rw_file_perms;
11 | allow camera video_device:chr_file rw_file_perms;
12 | allow camera { surfaceflinger mediaserver cameraserver }:fd use;
13 | hal_client_domain(camera, hal_graphics_allocator)
14 |
15 | # Create camera sockets
16 | allow camera camera_socket:dir w_dir_perms;
17 | allow camera camera_socket:sock_file create_file_perms;
18 |
19 | type_transition camera system_data_file:file camera_data_file "fdAlbum";
20 | allow camera camera_data_file:file create_file_perms;
21 |
22 | # Connect to sensor socket
23 | unix_socket_connect(camera, sensors, sensors)
24 | allow camera sensors_socket:dir search;
25 | allow camera sensors_socket:sock_file read;
26 |
27 | # Read camera files from persist filesystem
28 | allow camera persist_file:dir search;
29 | r_dir_file(camera, persist_camera_file)
30 |
--------------------------------------------------------------------------------
/sepolicy/cameraserver.te:
--------------------------------------------------------------------------------
1 | unix_socket_send(cameraserver, camera, camera);
2 | unix_socket_send(cameraserver, mpdecision, mpdecision);
3 |
4 | # for libmmjpeg
5 | allow cameraserver vendor_file:file execmod;
6 |
7 | # Allow reading /dev/graphics
8 | allow cameraserver graphics_device:dir r_dir_perms;
9 | allow cameraserver camera_socket:dir r_dir_perms;
10 |
--------------------------------------------------------------------------------
/sepolicy/conn_init.te:
--------------------------------------------------------------------------------
1 | # wifi connection service
2 | type conn_init, domain, device_domain_deprecated;
3 | type conn_init_exec, exec_type, file_type;
4 |
5 | init_daemon_domain(conn_init)
6 |
7 | # Runs init.flo.wifi.sh
8 | allow conn_init shell_exec:file rx_file_perms;
9 | allow conn_init conn_init_exec:file rx_file_perms;
10 |
11 | # Allow /persist/wifi access
12 | allow conn_init { persist_file persist_wifi_file }:dir search;
13 | allow conn_init persist_wifi_file:file r_file_perms;
14 |
15 | # Allow /data/misc/wifi access for firmware files
16 | allow conn_init wifi_data_file:dir w_dir_perms;
17 | allow conn_init wifi_data_file:file create_file_perms;
18 |
19 | allow conn_init wlan_device:chr_file rw_file_perms;
20 |
21 | # init.flo.wifi.sh runs toolbox
22 | allow conn_init system_file:file execute_no_trans;
23 | allow conn_init toolbox_exec:file rx_file_perms;
24 |
25 | allow conn_init wcnss_device:chr_file rw_file_perms ;
26 |
--------------------------------------------------------------------------------
/sepolicy/device.te:
--------------------------------------------------------------------------------
1 | # Kickstart device used by QC qcks
2 | type kickstart_device, dev_type;
3 |
4 | # Radio related block device
5 | type efs_block_device, dev_type;
6 |
7 | # Shared memory logger
8 | type shared_log_device, dev_type;
9 |
10 | type power_control_device, dev_type;
11 |
--------------------------------------------------------------------------------
/sepolicy/device_domain_deprecated.te:
--------------------------------------------------------------------------------
1 | allow device_domain_deprecated adbd:unix_stream_socket connectto;
2 | allow device_domain_deprecated adbd:fd use;
3 | allow device_domain_deprecated adbd:unix_stream_socket { getattr getopt ioctl read write shutdown };
4 | allow device_domain_deprecated rootfs:dir r_dir_perms;
5 | allow device_domain_deprecated rootfs:file r_file_perms;
6 | allow device_domain_deprecated rootfs:lnk_file r_file_perms;
7 | allow device_domain_deprecated device:file read;
8 | allow device_domain_deprecated system_file:dir r_dir_perms;
9 | allow device_domain_deprecated system_file:file r_file_perms;
10 | allow device_domain_deprecated system_file:lnk_file r_file_perms;
11 | allow device_domain_deprecated system_data_file:file { getattr read };
12 | allow device_domain_deprecated system_data_file:lnk_file r_file_perms;
13 | allow device_domain_deprecated apk_data_file:dir { getattr search };
14 | allow device_domain_deprecated apk_data_file:file r_file_perms;
15 | allow device_domain_deprecated apk_data_file:lnk_file r_file_perms;
16 | allow device_domain_deprecated dalvikcache_data_file:dir { search getattr };
17 | allow device_domain_deprecated dalvikcache_data_file:file r_file_perms;
18 | allow device_domain_deprecated cache_file:dir r_dir_perms;
19 | allow device_domain_deprecated cache_file:file { getattr read };
20 | allow device_domain_deprecated cache_file:lnk_file r_file_perms;
21 | allow device_domain_deprecated ion_device:chr_file rw_file_perms;
22 | allow device_domain_deprecated proc:dir r_dir_perms;
23 | allow device_domain_deprecated proc:{ file lnk_file } r_file_perms;
24 | allow device_domain_deprecated sysfs:dir r_dir_perms;
25 | allow device_domain_deprecated sysfs:{ file lnk_file } r_file_perms;
26 | allow device_domain_deprecated inotify:dir r_dir_perms;
27 | allow device_domain_deprecated inotify:{ file lnk_file } r_file_perms;
28 | allow device_domain_deprecated cgroup:dir r_dir_perms;
29 | allow device_domain_deprecated cgroup:{ file lnk_file } r_file_perms;
30 | allow device_domain_deprecated proc_meminfo:file r_file_perms;
31 | allow device_domain_deprecated proc_net:dir r_dir_perms;
32 | allow device_domain_deprecated proc_net:{ file lnk_file } r_file_perms;
33 | allow device_domain_deprecated selinuxfs:dir r_dir_perms;
34 | allow device_domain_deprecated selinuxfs:file r_file_perms;
35 | allow device_domain_deprecated asec_public_file:file r_file_perms;
36 | allow device_domain_deprecated { asec_public_file asec_apk_file }:dir r_dir_perms;
37 |
--------------------------------------------------------------------------------
/sepolicy/domain.te:
--------------------------------------------------------------------------------
1 | userdebug_or_eng(`
2 | allow domain diag_device:chr_file rw_file_perms;
3 | ')
4 |
--------------------------------------------------------------------------------
/sepolicy/file.te:
--------------------------------------------------------------------------------
1 | type kickstart_data_file, file_type, data_file_type;
2 |
3 | # Default type for anything under /firmware
4 | type radio_efs_file, fs_type, contextmount_type;
5 |
6 | # Persist firmware types
7 | type persist_camera_file, file_type;
8 | type persist_sensors_file, file_type;
9 | type persist_wifi_file, file_type;
10 |
11 | type sysfs_rmnet, fs_type, sysfs_type;
12 | type sysfs_surfaceflinger, fs_type, sysfs_type;
13 | type sysfs_rmt_storage, fs_type, sysfs_type;
14 | type sysfs_msm_subsys, fs_type, sysfs_type;
15 | type sensors_vendor_data_file, file_type, data_file_type;
16 |
--------------------------------------------------------------------------------
/sepolicy/fsck.te:
--------------------------------------------------------------------------------
1 | allow fsck self:capability dac_override;
2 | allow fsck tmpfs:blk_file getattr;
3 |
--------------------------------------------------------------------------------
/sepolicy/genfs_contexts:
--------------------------------------------------------------------------------
1 | # sysfs
2 | genfscon sysfs /class/android_usb/f_rmnet_smd_sdio/transport u:object_r:sysfs_rmnet:s0
3 | genfscon sysfs /devices/virtual/android_usb/android0/f_rmnet_smd_sdio/transport u:object_r:sysfs_rmnet:s0
4 | genfscon sysfs /module/rmnet_usb/parameters/rmnet_data_init u:object_r:sysfs_rmnet:s0
5 | genfscon sysfs /module/pm2/modes u:object_r:sysfs_mpdecision:s0
6 | genfscon sysfs /module/pm_8x60/modes u:object_r:sysfs_mpdecision:s0
7 | genfscon sysfs /devices/virtual/graphics/fb1/format_3d u:object_r:sysfs_surfaceflinger:s0
8 | genfscon sysfs /devices/virtual/graphics/fb1/hpd u:object_r:sysfs_surfaceflinger:s0
9 | genfscon sysfs /kernel/boot_adsp/boot u:object_r:sysfs_audio:s0
10 | genfscon sysfs /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/rev u:object_r:sysfs_disk_stat:s0
11 | genfscon sysfs /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/stat u:object_r:sysfs_disk_stat:s0
12 |
13 | # remote storage
14 | genfscon sysfs /class/uio u:object_r:sysfs_rmt_storage:s0
15 | genfscon sysfs /devices/platform/msm_sharedmem/uio u:object_r:sysfs_rmt_storage:s0
16 |
17 | # graphics
18 | genfscon sysfs /devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk u:object_r:sysfs_graphics:s0
19 | genfscon sysfs /devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk u:object_r:sysfs_graphics:s0
20 | genfscon sysfs /devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/reset_count u:object_r:sysfs_graphics:s0
21 | genfscon sysfs /devices/virtual/graphics/fb0 u:object_r:sysfs_graphics:s0
22 | genfscon sysfs /devices/virtual/graphics/fb1 u:object_r:sysfs_graphics:s0
23 |
24 | # thermald
25 | genfscon sysfs /devices/platform/msm_ssbi.0/pm8921-core/pm8xxx-adc/batt_therm u:object_r:sysfs_thermal:s0
26 | genfscon sysfs /module/msm_thermal u:object_r:sysfs_thermal:s0
27 |
28 | # lights
29 | genfscon sysfs /devices/platform/msm_fb.591617/leds/lcd-backlight u:object_r:sysfs_leds:s0
30 | genfscon sysfs /devices/platform/msm_ssbi.0/pm8921-core/pm8xxx-led u:object_r:sysfs_leds:s0
31 |
32 | # Networking
33 | genfscon sysfs /devices/platform/msm_hsic_host/usb1/1-1/1-1:1.5/net/rmnet_usb0/mtu u:object_r:sysfs_net:s0
34 |
--------------------------------------------------------------------------------
/sepolicy/hal_camera.te:
--------------------------------------------------------------------------------
1 | unix_socket_send(hal_camera, camera, camera);
2 | unix_socket_send(hal_camera, mpdecision, mpdecision);
3 |
4 | allow hal_camera sysfs:file r_file_perms;
5 |
6 | # for libmmjpeg
7 | allow hal_camera system_file:file execmod;
8 |
--------------------------------------------------------------------------------
/sepolicy/hal_camera_default.te:
--------------------------------------------------------------------------------
1 | vndbinder_use(hal_camera_default);
2 |
3 | # Text relocations in libmmjpeg
4 | allow hal_camera_default vendor_file:file execmod;
5 |
6 | allow hal_camera_default hal_graphics_mapper_hwservice:hwservice_manager find;
7 | allow hal_camera_default camera_socket:dir search;
8 |
9 | unix_socket_send(hal_camera_default, camera, camera)
10 |
--------------------------------------------------------------------------------
/sepolicy/hal_graphics_allocator_default.te:
--------------------------------------------------------------------------------
1 | allow hal_graphics_allocator_default graphics_device:chr_file rw_file_perms;
2 | allow hal_graphics_allocator_default graphics_device:dir search;
3 |
--------------------------------------------------------------------------------
/sepolicy/hal_light_default.te:
--------------------------------------------------------------------------------
1 | allow hal_light_default sysfs_leds:file rw_file_perms;
2 |
--------------------------------------------------------------------------------
/sepolicy/hal_nfc_default.te:
--------------------------------------------------------------------------------
1 | allow hal_nfc_default nfc_data_file:dir create_dir_perms;
2 | allow hal_nfc_default nfc_data_file:file create_file_perms;
3 |
--------------------------------------------------------------------------------
/sepolicy/hal_sensors_default.te:
--------------------------------------------------------------------------------
1 | unix_socket_connect(hal_sensors_default, sensors, sensors)
2 |
3 | # Read /dev/socket/sensors/ctl
4 | allow hal_sensors_default sensors_socket:sock_file read;
5 |
6 | # Monitor /dev/socket/sensors
7 | allow hal_sensors_default sensors_socket:dir { search read };
8 |
9 | # Read directories under /data/vendor/sensors
10 | allow hal_sensors_default sensors_vendor_data_file:dir search;
11 |
12 | # Read sensor nodes (/dev/msm_dsps)
13 | allow hal_sensors_default sensors_device:chr_file read;
14 |
--------------------------------------------------------------------------------
/sepolicy/hci_attach.te:
--------------------------------------------------------------------------------
1 | type hci_attach, domain, device_domain_deprecated;
2 | type hci_attach_exec, exec_type, file_type;
3 | init_daemon_domain(hci_attach)
4 | allow hci_attach kernel:system module_request;
5 | allow hci_attach hci_attach_dev:chr_file rw_file_perms;
6 | allow hci_attach bluetooth_efs_file:dir r_dir_perms;
7 | allow hci_attach bluetooth_efs_file:file r_file_perms;
8 | r_dir_file(hci_attach, bluetooth_prop)
9 |
10 |
--------------------------------------------------------------------------------
/sepolicy/healthd.te:
--------------------------------------------------------------------------------
1 | allow healthd sysfs:file rw_file_perms;
2 |
--------------------------------------------------------------------------------
/sepolicy/hostapd.te:
--------------------------------------------------------------------------------
1 | # Reading from /persist/wifi/.macaddr
2 | allow hostapd persist_file:dir r_dir_perms;
3 | r_dir_file(hostapd, persist_wifi_file)
4 |
--------------------------------------------------------------------------------
/sepolicy/init-devstart-sh.te:
--------------------------------------------------------------------------------
1 | type init-qcom-devstart-sh, domain;
2 | type init-qcom-devstart-sh_exec, exec_type, file_type;
3 |
4 | init_daemon_domain(init-qcom-devstart-sh)
5 |
6 | allow init-qcom-devstart-sh shell_exec:file rx_file_perms;
7 |
8 | # execute toybox/toolbox
9 | allow init-qcom-devstart-sh toolbox_exec:file rx_file_perms;
10 |
11 | # Set the sys.qcom.devup property
12 | set_prop(init-qcom-devstart-sh, system_prop)
13 |
14 | # Set boot_adsp and boot_slpi to 1
15 | allow init-qcom-devstart-sh sysfs_audio:file w_file_perms;
16 | allow init-qcom-devstart-sh sysfs_boot_adsp:file w_file_perms;
17 |
--------------------------------------------------------------------------------
/sepolicy/init-devwait-sh.te:
--------------------------------------------------------------------------------
1 | type init-qcom-devwait-sh, domain;
2 | type init-qcom-devwait-sh_exec, exec_type, file_type;
3 |
4 | init_daemon_domain(init-qcom-devwait-sh)
5 |
6 | allow init-qcom-devwait-sh shell_exec:file rx_file_perms;
7 |
8 | # execute toybox/toolbox
9 | allow init-qcom-devwait-sh toolbox_exec:file rx_file_perms;
10 |
--------------------------------------------------------------------------------
/sepolicy/init.te:
--------------------------------------------------------------------------------
1 | allow init diag_device:chr_file unlink;
2 | allow init sysfs_mmc_host:file rw_file_perms;
3 | allow init sysfs:file { rw_file_perms setattr };
4 |
5 | # Symlink /sdcard to backing block
6 | allow init tmpfs:lnk_file create;
7 |
8 | allow init {
9 | sysfs_devices_system_cpu
10 | sysfs_mpdecision
11 | sysfs_msm_subsys
12 | sysfs_net
13 | }:file w_file_perms;
14 |
15 | allow init {
16 | proc_slabinfo
17 | sysfs_graphics
18 | sysfs_msm_subsys
19 | sysfs_usb
20 | sysfs_wlan_fwpath
21 | }:file setattr;
22 |
--------------------------------------------------------------------------------
/sepolicy/ioctl_defines:
--------------------------------------------------------------------------------
1 | # socket ioctls defined in the kernel in include/uapi/linux/msm_ipc.h
2 | define(`IPC_ROUTER_IOCTL_GET_VERSION', `0x0000c300')
3 | define(`IPC_ROUTER_IOCTL_GET_MTU', `0x0000c301')
4 | define(`IPC_ROUTER_IOCTL_LOOKUP_SERVER', `0x0000c302')
5 | define(`IPC_ROUTER_IOCTL_GET_CURR_PKT_SIZE', `0x0000c303')
6 | define(`IPC_ROUTER_IOCTL_BIND_CONTROL_PORT', `0x0000c304')
7 | define(`IPC_ROUTER_IOCTL_CONFIG_SEC_RULES', `0x0000c305')
8 |
--------------------------------------------------------------------------------
/sepolicy/ioctl_macros:
--------------------------------------------------------------------------------
1 | define(`msm_sock_ipc_ioctls', `{
2 | IPC_ROUTER_IOCTL_GET_VERSION
3 | IPC_ROUTER_IOCTL_GET_MTU
4 | IPC_ROUTER_IOCTL_LOOKUP_SERVER
5 | IPC_ROUTER_IOCTL_GET_CURR_PKT_SIZE
6 | IPC_ROUTER_IOCTL_BIND_CONTROL_PORT
7 | IPC_ROUTER_IOCTL_CONFIG_SEC_RULES
8 | }')
9 |
--------------------------------------------------------------------------------
/sepolicy/irsc_util.te:
--------------------------------------------------------------------------------
1 | allow irsc_util self:socket create_socket_perms;
2 | allowxperm irsc_util self:socket ioctl msm_sock_ipc_ioctls;
3 |
--------------------------------------------------------------------------------
/sepolicy/kickstart.te:
--------------------------------------------------------------------------------
1 | # kickstart processes and scripts (system process)
2 | type kickstart, domain, device_domain_deprecated;
3 | type kickstart_exec, file_type, exec_type;
4 |
5 | init_daemon_domain(kickstart)
6 |
7 | # Run kickstart_checker.sh
8 | allow kickstart shell_exec:file rx_file_perms;
9 | allow kickstart kickstart_exec:file rx_file_perms;
10 |
11 | # kickstart_checker.sh changes block devices
12 | # /dev/block/platform/msm_sdcc.1/by-name/m9kefs*
13 | allow kickstart self:capability { chown fowner };
14 |
15 | # Let qcks access /dev/mdm node (modem driver)
16 | allow kickstart radio_device:chr_file r_file_perms;
17 |
18 | # Access USB host ks bridge drivers
19 | allow kickstart kickstart_device:chr_file rw_file_perms;
20 |
21 | # Read and write to /dev/block/mmcblk0p[567]
22 | allow kickstart efs_block_device:blk_file { setattr rw_file_perms };
23 | allow kickstart block_device:dir { getattr write search };
24 |
25 | # Write contents of block device to kickstart data dir
26 | allow kickstart kickstart_data_file:file create_file_perms;
27 | allow kickstart kickstart_data_file:dir rw_dir_perms;
28 |
29 | # Read radio firmware file(s)
30 | allow kickstart radio_efs_file:dir search;
31 | allow kickstart radio_efs_file:file r_file_perms;
32 |
33 | # Run dd from toolbox on firmware files
34 | allow kickstart shell_exec:file rx_file_perms;
35 | allow kickstart system_file:file execute_no_trans;
36 | allow kickstart toolbox_exec:file rx_file_perms;
37 |
38 | # Wake lock access
39 | wakelock_use(kickstart)
40 |
41 | # Set property key gsm.radio.kickstart
42 | set_prop(kickstart, radio_prop)
43 |
44 | # Access /sys/module/rmnet_usb/parameters/rmnet_data_init
45 | allow kickstart sysfs_rmnet:file w_file_perms;
46 |
--------------------------------------------------------------------------------
/sepolicy/mediacodec.te:
--------------------------------------------------------------------------------
1 | allow mediacodec audio_device:chr_file rw_file_perms;
2 | r_dir_file(mediacodec, camera_prop)
3 |
--------------------------------------------------------------------------------
/sepolicy/mediaserver.te:
--------------------------------------------------------------------------------
1 | # Grant access to Qualcomm MSM Interface (QMI) audio sockets to mediaserver
2 | qmux_socket(mediaserver)
3 |
4 | unix_socket_send(mediaserver, camera, camera)
5 | unix_socket_send(mediaserver, mpdecision, mpdecision)
6 |
7 | # Permit mediaserver to create sockets with no specific SELinux class.
8 | # TODO: Investigate the specific type of socket.
9 | allow mediaserver self:socket create_socket_perms_no_ioctl;
10 |
--------------------------------------------------------------------------------
/sepolicy/mpdecision.te:
--------------------------------------------------------------------------------
1 | # DAC overrides
2 | allow mpdecision self:capability dac_override;
3 | auditallow mpdecision self:capability dac_override;
4 |
5 | # CPU hotplug uevent to manage cores
6 | allow mpdecision self:netlink_kobject_uevent_socket { create setopt bind read };
7 | allow mpdecision self:capability net_admin;
8 |
9 | # Create under /dev/socket/mpdecision
10 | allow mpdecision mpdecision_socket:dir w_dir_perms;
11 | allow mpdecision mpdecision_socket:sock_file create_file_perms;
12 |
13 | # Also support mpdecision creating the /dev/socket/pb socket
14 | type_transition mpdecision socket_device:sock_file mpdecision_socket;
15 | allow mpdecision self:capability chown;
16 | allow mpdecision socket_device:dir w_dir_perms;
17 |
18 | # By-product of setting owner on sock_file (don't allow)
19 | dontaudit mpdecision self:capability fsetid;
20 |
21 | allow mpdecision sysfs_devices_system_cpu:file rw_file_perms;
22 | allow mpdecision sysfs_mpdecision:dir r_dir_perms;
23 | allow mpdecision sysfs_mpdecision:file rw_file_perms;
24 |
25 | allow mpdecision sysfs:file write;
26 |
27 | # This is needed to allow mpdecision to look at system_server's
28 | # /proc/PID/status file.
29 | r_dir_file(mpdecision, system_server)
30 | r_dir_file(mpdecision, mediaserver)
31 | r_dir_file(mpdecision, cameraserver)
32 |
33 | allow mpdecision self:capability sys_nice;
34 |
--------------------------------------------------------------------------------
/sepolicy/netmgrd.te:
--------------------------------------------------------------------------------
1 | # Starts as (root,radio) changes to (radio,radio)
2 | allow netmgrd self:capability { setuid setgid net_admin net_raw };
3 |
4 | # Support modprobe??
5 | dontaudit netmgrd self:capability sys_module;
6 |
7 | allowxperm netmgrd self:udp_socket ioctl priv_sock_ioctls;
8 | allow netmgrd self:udp_socket { create ioctl };
9 | allow netmgrd self:netlink_socket create_socket_perms_no_ioctl;
10 | allow netmgrd self:netlink_route_socket { create_socket_perms_no_ioctl nlmsg_read nlmsg_write };
11 | allow netmgrd self:packet_socket create_socket_perms_no_ioctl;
12 | allow netmgrd self:rawip_socket create_socket_perms_no_ioctl;
13 |
14 | # Talk to qmuxd (qmux_radio)
15 | qmux_socket(netmgrd)
16 |
17 | # Runs commands via sh.
18 | # TODO: Convert to direct exec of /system/bin/ip and any other helpers.
19 | allow netmgrd shell_exec:file rx_file_perms;
20 |
21 | # Runs /system/bin/ip addr flush dev commands.
22 | allow netmgrd system_file:file rx_file_perms;
23 |
24 | # XXX Run toolbox. Might not be needed.
25 | allow netmgrd toolbox_exec:file rx_file_perms;
26 | auditallow netmgrd toolbox_exec:file rx_file_perms;
27 |
28 | allow netmgrd proc_net:file r_file_perms;
29 | allow netmgrd proc_net:dir r_dir_perms;
30 |
31 | # set net.rmnet* properties.
32 | set_prop(netmgrd, radio_prop)
33 | auditallow netmgrd radio_prop:property_service set;
34 | set_prop(netmgrd, net_radio_prop)
35 |
--------------------------------------------------------------------------------
/sepolicy/perfprofd.te:
--------------------------------------------------------------------------------
1 | userdebug_or_eng(`
2 | # perfprofd disables mpdecision temporarily via setprop ctl.stop,
3 | # then re-enables afterwards with setprop ctl.start
4 | set_prop(perfprofd, ctl_mpdecision)
5 | ')
6 |
--------------------------------------------------------------------------------
/sepolicy/priv_app.te:
--------------------------------------------------------------------------------
1 | allow priv_app device:dir r_dir_perms;
2 | allowxperm priv_app self:udp_socket ioctl { SIOCGIWESSID };
3 |
--------------------------------------------------------------------------------
/sepolicy/property.te:
--------------------------------------------------------------------------------
1 | type ctl_rmt_prop, property_type;
2 | type ctl_mpdecision, property_type;
3 |
--------------------------------------------------------------------------------
/sepolicy/property_contexts:
--------------------------------------------------------------------------------
1 | ctl.rmt_storage u:object_r:ctl_rmt_prop:s0
2 |
--------------------------------------------------------------------------------
/sepolicy/qmux.te:
--------------------------------------------------------------------------------
1 | # Qualcomm Management Interface Multiplexer
2 | type qmux, domain, device_domain_deprecated;
3 | type qmux_exec, exec_type, file_type;
4 |
5 | # Started by init
6 | init_daemon_domain(qmux)
7 |
8 | # Create sockets under each /dev/socket/qmux_* directory.
9 | allow qmux qmuxd_socket:dir w_dir_perms;
10 | allow qmux qmuxd_socket:sock_file { create setattr getattr unlink };
11 |
12 | # /dev/hsicctl* node access
13 | allow qmux radio_device:chr_file rw_file_perms;
14 |
15 | # wake lock access
16 | wakelock_use(qmux)
17 |
--------------------------------------------------------------------------------
/sepolicy/rild.te:
--------------------------------------------------------------------------------
1 | qmux_socket(rild)
2 |
3 | # whitelist qualcomm specific ioctls
4 | allow rild self:socket ioctl;
5 | allowxperm rild self:socket ioctl msm_sock_ipc_ioctls;
6 | allowxperm rild self:udp_socket ioctl priv_sock_ioctls;
7 |
--------------------------------------------------------------------------------
/sepolicy/rmt.te:
--------------------------------------------------------------------------------
1 | # remote storage process (runs as nobody)
2 | type rmt, domain, device_domain_deprecated;
3 | type rmt_exec, exec_type, file_type;
4 |
5 | # Started by init
6 | init_daemon_domain(rmt)
7 |
8 | # Drop (user, group) to (nobody, nobody)
9 | allow rmt self:capability { setuid setgid };
10 |
11 | # opens and reads /dev/block/mmcblk0
12 | allow rmt root_block_device:blk_file r_file_perms;
13 | allow rmt block_device:dir r_dir_perms;
14 |
15 | # Allow reads/writes to modem related block devices
16 | allow rmt modem_block_device:blk_file rw_file_perms;
17 | allow rmt smem_log_device:chr_file rw_file_perms;
18 |
19 | # Allow shared memory logging access
20 | allow rmt shared_log_device:chr_file rw_file_perms;
21 |
22 | allow rmt self:socket create_socket_perms;
23 | allow rmt cgroup:dir { create add_name };
24 | allowxperm rmt self:socket ioctl msm_sock_ipc_ioctls;
25 |
26 | # Wake lock access
27 | wakelock_use(rmt)
28 |
29 | # Allow access to /dev/uio0.
30 | allow rmt uio_device:chr_file rw_file_perms;
31 |
32 | allow rmt smem_log_device:chr_file rw_file_perms;
33 | allow rmt sysfs_uio:dir r_dir_perms;
34 |
35 | allow rmt modem_efs_partition_device:blk_file rw_file_perms;
36 | allow rmt ssd_device:blk_file rw_file_perms;
37 |
38 | # rmt_storage shuts itself down if there is an unknown value of ro.baseband
39 | set_prop(rmt, ctl_rmt_prop)
40 |
41 | # Access to sysfs
42 | r_dir_file(rmt, sysfs_rmt_storage)
43 | r_dir_file(rmt, sysfs_uio)
44 |
--------------------------------------------------------------------------------
/sepolicy/sensors.te:
--------------------------------------------------------------------------------
1 | # Started by init
2 | init_daemon_domain(sensors)
3 |
4 | # Create /dev/socket/sensors/ctl
5 | allow sensors sensors_socket:dir w_dir_perms;
6 | allow sensors sensors_socket:sock_file create_file_perms;
7 |
8 | # Create directories and files under /data/misc/sensors
9 | # and /data/system/sensors. Allow generic r/w file access.
10 | allow sensors sensors_vendor_data_file:dir create_dir_perms;
11 | allow sensors sensors_vendor_data_file:file create_file_perms;
12 |
13 | # Access sensor nodes (/dev/msm_dsps)
14 | allow sensors sensors_device:chr_file rw_file_perms;
15 |
16 | # Access power management controls
17 | allow sensors power_control_device:chr_file w_file_perms;
18 |
19 | # Access to /persist/sensors
20 | allow sensors persist_file:dir r_dir_perms;
21 | allow sensors persist_sensors_file:dir r_dir_perms;
22 | allow sensors persist_sensors_file:file rw_file_perms;
23 |
24 | # Wake lock access
25 | wakelock_use(sensors)
26 |
--------------------------------------------------------------------------------
/sepolicy/surfaceflinger.te:
--------------------------------------------------------------------------------
1 | allow surfaceflinger sysfs_surfaceflinger:file rw_file_perms;
2 |
--------------------------------------------------------------------------------
/sepolicy/system_server.te:
--------------------------------------------------------------------------------
1 | # Grant access to Qualcomm MSM Interface (QMI) radio sockets to system services
2 | # (e.g., LocationManager)
3 | qmux_socket(system_server)
4 |
5 | # PowerManagerService access to sensors socket
6 | unix_socket_connect(system_server, sensors, sensors)
7 | unix_socket_send(system_server, sensors, sensors)
8 | allow system_server sensors:unix_stream_socket sendto;
9 | allow system_server sensors_socket:sock_file r_file_perms;
10 | allow system_server sensors_socket:dir r_dir_perms;
11 |
12 | allow system_server persist_file:dir r_dir_perms;
13 | allow system_server sensors_device:chr_file rw_file_perms;
14 |
15 | # mpdecision socket access
16 | unix_socket_connect(system_server, mpdecision, mpdecision)
17 | unix_socket_send(system_server, mpdecision, mpdecision)
18 | allow system_server mpdecision:unix_stream_socket sendto;
19 | allow system_server mpdecision_socket:dir search;
20 |
21 | # use MSM ipc router ioctls
22 | allow system_server self:socket ioctl;
23 | allowxperm system_server self:socket ioctl msm_sock_ipc_ioctls;
24 |
25 | allow system_server sensors_data_file:dir search;
26 | allow system_server sensors_data_file:dir r_file_perms;
27 |
28 | allow system_server sensors_socket:sock_file getattr;
29 |
30 | allow system_server thermal_service:service_manager find;
31 |
--------------------------------------------------------------------------------
/sepolicy/tee.te:
--------------------------------------------------------------------------------
1 | # Qualcomm Secure Execution Environment Communicator policy
2 | allow tee self:process execmem;
3 |
4 | # /data/misc/playready labeling
5 | type_transition tee system_data_file:dir drm_data_file;
6 |
7 | # Access /data/misc/playready
8 | allow tee system_data_file:dir ra_dir_perms;
9 | allow tee drm_data_file:dir create_dir_perms;
10 | allow tee drm_data_file:file create_file_perms;
11 |
12 | # Read from persist partition
13 | allow tee persist_file:dir r_dir_perms;
14 | r_dir_file(tee, persist_data_file)
15 | # Write to drm related pieces of persist partition
16 | allow tee persist_data_file:dir create_dir_perms;
17 | allow tee persist_data_file:file create_file_perms;
18 |
--------------------------------------------------------------------------------
/sepolicy/thermald.te:
--------------------------------------------------------------------------------
1 | # Temperature sensor daemon (root process)
2 | type thermald, domain;
3 | type thermald_exec, exec_type, file_type;
4 |
5 | # Started by init
6 | init_daemon_domain(thermald)
7 |
8 | allow thermald self:socket create_socket_perms;
9 | allowxperm thermald self:socket ioctl msm_sock_ipc_ioctls;
10 |
11 | # CPU hotplug uevent
12 | allow thermald self:netlink_kobject_uevent_socket { create getopt setopt bind read };
13 | allow thermald self:capability net_admin;
14 |
15 | # Talk to qmuxd (/dev/socket/qmux_radio)
16 | qmux_socket(thermald)
17 |
18 | # Access shared logger (/dev/smem_log)
19 | allow thermald smem_log_device:chr_file rw_file_perms;
20 |
21 | # Allow writing in /sys/devices/system/cpu
22 | allow thermald sysfs_devices_system_cpu:file w_file_perms;
23 |
24 | # Access leds
25 | allow thermald sysfs_leds:file rw_file_perms;
26 | allow thermald sysfs_leds:dir r_dir_perms;
27 |
28 | # Allow accessing thermal related sysfs nodes
29 | allow thermald sysfs_thermal:file rw_file_perms;
30 | allow thermald sysfs_thermal:dir r_dir_perms;
31 |
32 | # Read the /sys/devices/virtual folder
33 | allow thermald sysfs:dir r_dir_perms;
34 | allow thermald sysfs:file r_file_perms;
35 |
36 | # Access graphics related sysfs nodes
37 | allow thermald sysfs_graphics:file rw_file_perms;
38 |
39 | # Access /sys/devices/system/soc/soc0
40 | r_dir_file(thermald, sysfs_socinfo)
41 |
42 | # Connect to mpdecision.
43 | allow thermald mpdecision_socket:dir r_dir_perms;
44 | unix_socket_connect(thermald, mpdecision, mpdecision)
45 |
--------------------------------------------------------------------------------
/sepolicy/ueventd.te:
--------------------------------------------------------------------------------
1 | allow ueventd { radio_efs_file wifi_data_file }:dir search;
2 | allow ueventd { radio_efs_file wifi_data_file }:file r_file_perms;
3 | allow ueventd self:capability sys_nice;
4 |
--------------------------------------------------------------------------------
/setup-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017 The LineageOS Project
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 |
18 | set -e
19 |
20 | VENDOR=asus
21 | DEVICE_COMMON=flo
22 | DEVICE=${DEVICE:-flo}
23 | export INITIAL_COPYRIGHT_YEAR=2013
24 |
25 | # Load extractutils and do some sanity checks
26 | MY_DIR="${BASH_SOURCE%/*}"
27 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
28 |
29 | CM_ROOT="$MY_DIR"/../../..
30 |
31 | HELPER="$CM_ROOT"/vendor/lineage/build/tools/extract_utils.sh
32 | if [ ! -f "$HELPER" ]; then
33 | echo "Unable to find helper script at $HELPER"
34 | exit 1
35 | fi
36 | . "$HELPER"
37 |
38 | # Initialize the helper
39 | setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true
40 |
41 | # Copyright headers and guards
42 | write_headers "flo deb"
43 |
44 | # The standard blobs
45 | write_makefiles "$MY_DIR"/proprietary-blobs.txt
46 |
47 | # Done
48 | write_footers
49 |
50 | if [ "$DEVICE" '!=' "$DEVICE_COMMON" ]; then
51 | # Reinitialize the helper for the device-specific blobs
52 | setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"
53 |
54 | # Copyright headers and guards
55 | write_headers
56 |
57 | # The device-specific blobs
58 | write_makefiles "$MY_DIR"/../$DEVICE/proprietary-blobs.txt
59 |
60 | # Done
61 | write_footers
62 | fi
63 |
64 |
65 |
--------------------------------------------------------------------------------
/system.prop:
--------------------------------------------------------------------------------
1 | # Bluetooth
2 | vendor.qcom.bluetooth.soc=pronto
3 | ro.qualcomm.bt.hci_transport=smd
4 | ro.bluetooth.hfp.ver=1.6
5 |
6 | # Audio
7 | # Monitor device rotation for speaker channel swap
8 | ro.audio.monitorRotation=true
9 | # Enable AAC 5.1 output
10 | media.aac_51_output_enabled=true
11 | # Audio HAL configuration
12 | audio.offload.disable=1
13 | mm.enable.smoothstreaming=true
14 | ro.qc.sdk.audio.fluencetype=none
15 | persist.audio.fluence.voicecall=true
16 | persist.audio.fluence.voicerec=false
17 | persist.audio.fluence.speaker=true
18 | qcom.hw.aac.encoder=true
19 |
20 | # Media volume steps
21 | ro.config.media_vol_steps=25
22 |
23 | # Camera
24 | camera.disable_zsl_mode=1
25 |
26 | # DRM
27 | drm.service.enabled=true
28 |
29 | # Wifi
30 | wifi.interface=wlan0
31 |
32 | # Sensors
33 | ro.qc.sensors.wl_dis=true
34 | ro.qualcomm.sensors.smd=true
35 |
36 | # libhwui
37 | ro.hwui.texture_cache_size=48
38 | ro.hwui.layer_cache_size=32
39 | ro.hwui.r_buffer_cache_size=4
40 | ro.hwui.path_cache_size=24
41 | ro.hwui.gradient_cache_size=1
42 | ro.hwui.drop_shadow_cache_size=5
43 | ro.hwui.texture_cache_flushrate=0.5
44 | ro.hwui.text_small_cache_width=1024
45 | ro.hwui.text_small_cache_height=1024
46 | ro.hwui.text_large_cache_width=2048
47 | ro.hwui.text_large_cache_height=1024
48 |
49 | # Dalvik/ART
50 | dalvik.vm.dex2oat-swap=false
51 |
52 | #Disable more Codec2.0 components
53 | debug.stagefright.ccodec=0
54 |
55 | # Graphics
56 | ro.opengles.version=196608
57 | debug.hwui.use_buffer_age=false
58 | debug.sf.enable_gl_backpressure=1
59 | debug.sf.latch_unsignaled=1
60 |
61 | # Display
62 | persist.hwc.mdpcomp.enable=true
63 |
64 | # Vendor security patch level
65 | ro.lineage.build.vendor_security_patch=2016-08-05
66 |
--------------------------------------------------------------------------------
/voice_processing/Android.mk:
--------------------------------------------------------------------------------
1 | ifneq ($(filter flo deb,$(TARGET_DEVICE)),)
2 |
3 | LOCAL_PATH:= $(call my-dir)
4 |
5 | include $(CLEAR_VARS)
6 |
7 | LOCAL_SRC_FILES := \
8 | voice_processing_descriptors.c
9 |
10 | LOCAL_C_INCLUDES += \
11 | $(call include-path-for, audio-effects)
12 |
13 | LOCAL_MODULE := libqcomvoiceprocessingdescriptors
14 |
15 | LOCAL_MODULE_RELATIVE_PATH := soundfx
16 |
17 | LOCAL_MODULE_TAGS := optional
18 |
19 | LOCAL_MODULE_OWNER := qcom
20 |
21 | LOCAL_PROPRIETARY_MODULE := true
22 |
23 | include $(BUILD_SHARED_LIBRARY)
24 |
25 | endif
26 |
--------------------------------------------------------------------------------
/voice_processing/voice_processing_descriptors.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | //------------------------------------------------------------------------------
19 | // Effect descriptors
20 | //------------------------------------------------------------------------------
21 |
22 | // UUIDs for effect types have been generated from http://www.itu.int/ITU-T/asn1/uuid.html
23 | // as the pre processing effects are not defined by OpenSL ES
24 |
25 | // Acoustic Echo Cancellation
26 | const effect_descriptor_t qcom_product_aec_descriptor = {
27 | { 0x7b491460, 0x8d4d, 0x11e0, 0xbd61, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }, // type
28 | { 0x1c04e560, 0xc720, 0x11e2, 0x9525, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }, // uuid
29 | EFFECT_CONTROL_API_VERSION,
30 | (EFFECT_FLAG_TYPE_PRE_PROC|EFFECT_FLAG_DEVICE_IND),
31 | 0,
32 | 0,
33 | "Acoustic Echo Canceler",
34 | "Qualcomm Fluence for Flo"
35 | };
36 |
37 | // Noise suppression
38 | const effect_descriptor_t qcom_product_ns_descriptor = {
39 | { 0x58b4b260, 0x8e06, 0x11e0, 0xaa8e, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }, // type
40 | { 0x4bb6faa0, 0xc720, 0x11e2, 0x91f5, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }, // uuid
41 | EFFECT_CONTROL_API_VERSION,
42 | (EFFECT_FLAG_TYPE_PRE_PROC|EFFECT_FLAG_DEVICE_IND),
43 | 0,
44 | 0,
45 | "Noise Suppression",
46 | "Qualcomm Fluence for Flo"
47 | };
48 |
49 | //ENABLE_AGC
50 | // Automatic Gain Control
51 | //const effect_descriptor_t qcom_product_agc_descriptor = {
52 | // { 0x0a8abfe0, 0x654c, 0x11e0, 0xba26, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }, // type
53 | // { 0x6e8188c0, 0xc720, 0x11e2, 0x830f, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } }, // uuid
54 | // EFFECT_CONTROL_API_VERSION,
55 | // (EFFECT_FLAG_TYPE_PRE_PROC|EFFECT_FLAG_DEVICE_IND),
56 | // 0,
57 | // 0,
58 | // "Automatic Gain Control",
59 | // "Qualcomm Fluence for Flo"
60 | //};
61 |
62 |
--------------------------------------------------------------------------------
/wifi/WCNSS_cfg.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/wifi/WCNSS_cfg.dat
--------------------------------------------------------------------------------
/wifi/WCNSS_qcom_wlan_nv_deb.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/wifi/WCNSS_qcom_wlan_nv_deb.bin
--------------------------------------------------------------------------------
/wifi/WCNSS_qcom_wlan_nv_flo.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_asus_flo/3ba4d7c18153062e8bd460bc1fe92dda9982b453/wifi/WCNSS_qcom_wlan_nv_flo.bin
--------------------------------------------------------------------------------
/wifi/p2p_supplicant_overlay.conf:
--------------------------------------------------------------------------------
1 | disable_scan_offload=1
2 | p2p_no_group_iface=1
3 | no_ctrl_interface=
4 |
--------------------------------------------------------------------------------
/wifi/wpa_supplicant_overlay.conf:
--------------------------------------------------------------------------------
1 | disable_scan_offload=1
2 | tdls_external_control=1
3 | p2p_disabled=1
4 | no_ctrl_interface=
5 |
--------------------------------------------------------------------------------