land: switch to msm8937-common

This commit is contained in:
Prateek Chaubey 2018-03-20 06:14:48 +01:00 committed by Isaac Chen
parent d4b40cf559
commit b1bcffd829
329 changed files with 113 additions and 45033 deletions

View file

@ -1,5 +1,6 @@
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-18 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -12,113 +13,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This contains the module build definitions for the hardware-specific
# components for this device.
#
# As much as possible, those components should be built unconditionally,
# with device-specific names to avoid collisions, to avoid device-specific
# bitrot and build breakages. Building a component unconditionally does
# *not* include it on all devices, so it is safe even with hardware-specific
# components.
# WARNING: Everything listed here will be built on ALL platforms,
# including x86, the emulator, and the SDK. Modules must be uniquely
# named (liblights.tuna), and must build everywhere, or limit themselves
# to only building on ARM if they include assembly. Individual makefiles
# are responsible for having their own logic, for fine-grained control.
LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),land)
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(CLEAR_VARS)
LOCAL_MODULE := wifi_symlinks
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_SUFFIX := -timestamp
include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): ACTUAL_INI_FILE := /data/misc/wifi/WCNSS_qcom_cfg.ini
$(LOCAL_BUILT_MODULE): WCNSS_INI_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
$(LOCAL_BUILT_MODULE): ACTUAL_BIN_FILE := /persist/WCNSS_qcom_wlan_nv.bin
$(LOCAL_BUILT_MODULE): WCNSS_BIN_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
$(LOCAL_BUILT_MODULE): ACTUAL_DAT_FILE := /persist/WCNSS_wlan_dictionary.dat
$(LOCAL_BUILT_MODULE): WCNSS_DAT_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/prima/WCNSS_wlan_dictionary.dat
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/Android.mk
$(LOCAL_BUILT_MODULE):
$(hide) echo "Making symlinks for wifi"
$(hide) mkdir -p $(dir $@)
$(hide) mkdir -p $(dir $(WCNSS_INI_SYMLINK))
$(hide) rm -rf $@
$(hide) rm -rf $(WCNSS_INI_SYMLINK)
$(hide) ln -sf $(ACTUAL_INI_FILE) $(WCNSS_INI_SYMLINK)
$(hide) rm -rf $(WCNSS_BIN_SYMLINK)
$(hide) ln -sf $(ACTUAL_BIN_FILE) $(WCNSS_BIN_SYMLINK)
$(hide) rm -rf $(WCNSS_DAT_SYMLINK)
$(hide) ln -sf $(ACTUAL_DAT_FILE) $(WCNSS_DAT_SYMLINK)
$(hide) touch $@
IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so
IMS_SYMLINKS := $(addprefix $(TARGET_OUT)/priv-app/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
$(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "IMS lib link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /system/lib64/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)
GOODIX_IMAGES := \
goodixfp.b00 goodixfp.b01 goodixfp.b02 goodixfp.b03 \
goodixfp.b04 goodixfp.b05 goodixfp.b06 goodixfp.mdt
GOODIX_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(GOODIX_IMAGES)))
$(GOODIX_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Goodix firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(GOODIX_SYMLINKS)
FPC_IMAGES := \
fpcta.b00 fpcta.b01 fpcta.b02 fpcta.b03 \
fpcta.b04 fpcta.b05 fpcta.b06 fpcta.mdt
FPC_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(FPC_IMAGES)))
$(FPC_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Fpc firmware link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /firmware/image/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(FPC_SYMLINKS)
RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT)/rfs/msm/adsp/
$(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM ADSP folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly
$(hide) ln -sf /data/tombstones/lpass $@/ramdumps
$(hide) ln -sf /persist/rfs/msm/adsp $@/readwrite
$(hide) ln -sf /persist/rfs/shared $@/shared
$(hide) ln -sf /persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /firmware $@/readonly/firmware
RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT)/rfs/msm/mpss/
$(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM MPSS folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly
$(hide) ln -sf /data/tombstones/modem $@/ramdumps
$(hide) ln -sf /persist/rfs/msm/mpss $@/readwrite
$(hide) ln -sf /persist/rfs/shared $@/shared
$(hide) ln -sf /persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /firmware $@/readonly/firmware
ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS)
endif

View file

@ -1,5 +1,6 @@
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-18 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -14,6 +15,9 @@
# limitations under the License.
#
# inherit from common msm8937-common
-include device/xiaomi/msm8937-common/BoardConfigCommon.mk
DEVICE_PATH := device/xiaomi/land
# Inherit device-specific board fragments

View file

@ -1,44 +0,0 @@
/*
# Copyright (c) 2016, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <private/android_filesystem_config.h>
#define NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS
static const struct fs_path_config android_device_files[] = {
// { 00755, AID_UID, AID_GID, (1ULL << CAPABILITY), "PATH_TO_BINARY" },
{ 00755, AID_BLUETOOTH, AID_BLUETOOTH, (1ULL << CAP_BLOCK_SUSPEND), "system/bin/wcnss_filter" },
{ 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/cnss-daemon"},
{ 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/pm-service"},
{ 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/imsdatadaemon" },
{ 00755, AID_SYSTEM, AID_RADIO, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/ims_rtp_daemon" },
#ifdef NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS
{ 00000, AID_ROOT, AID_ROOT, 0, "system/etc/fs_config_dirs" },
#endif
};

View file

@ -1,144 +0,0 @@
#ANC_TEST_P_PATH_MIC_STEREO Capture
acdb_dev_id:85
!Capture
Txdevice:0
enable
TX7 HPF Switch:0
TX8 HPF Switch:0
AIF1_CAP Mixer SLIM TX7:1
AIF1_CAP Mixer SLIM TX8:1
SLIM TX7 MUX:DEC9
DEC9 MUX:DMIC4
SLIM TX8 MUX:DEC10
DEC10 MUX:DMIC3
SLIM_0_TX Channels:Two
MultiMedia1 Mixer SLIM_0_TX:1
disable
MultiMedia1 Mixer SLIM_0_TX:0
AIF1_CAP Mixer SLIM TX7:0
AIF1_CAP Mixer SLIM TX8:0
SLIM TX7 MUX:ZERO
SLIM TX8 MUX:ZERO
DEC10 MUX:ZERO
DEC9 MUX:ZERO
TX7 HPF Switch:0
TX8 HPF Switch:0
#ANC_TEST_S_PATH_MIC_STEREO Capture
acdb_dev_id:88
!Capture
Txdevice:0
enable
TX7 HPF Switch:0
TX8 HPF Switch:0
AIF1_CAP Mixer SLIM TX7:1
AIF1_CAP Mixer SLIM TX8:1
SLIM TX7 MUX:DEC8
DEC7 MUX:ANC2_FB
ANC2 MUX:DMIC3
SLIM TX8 MUX:DEC7
DEC8 MUX:ANC1_FB
ANC1 MUX:DMIC3
ANC1 FB MUX:EAR_HPH_L
SLIM_0_TX Channels:Two
MultiMedia1 Mixer SLIM_0_TX:1
disable
MultiMedia1 Mixer SLIM_0_TX:0
AIF1_CAP Mixer SLIM TX7:0
AIF1_CAP Mixer SLIM TX8:0
SLIM TX7 MUX:ZERO
SLIM TX8 MUX:ZERO
DEC7 MUX:ZERO
ANC2 MUX:ZERO
ANC1 MUX:ZERO
DEC8 MUX:ZERO
ANC1 FB MUX:ZERO
TX7 HPF Switch:0
TX8 HPF Switch:0
#ANC_TEST_E_PATH_MIC_STEREO Capture
acdb_dev_id:91
!Capture
Txdevice:0
enable
TX7 HPF Switch:0
TX8 HPF Switch:0
AIF1_CAP Mixer SLIM TX7:1
AIF1_CAP Mixer SLIM TX8:1
SLIM TX7 MUX:DEC8
DEC7 MUX:ANC2_FB
ANC2 MUX:DMIC4
ANC1 MUX:DMIC4
SLIM TX8 MUX:DEC7
DEC8 MUX:ANC1_FB
ANC1 FB MUX:EAR_HPH_L
SLIM_0_TX Channels:Two
MultiMedia1 Mixer SLIM_0_TX:1
disable
MultiMedia1 Mixer SLIM_0_TX:0
AIF1_CAP Mixer SLIM TX7:0
AIF1_CAP Mixer SLIM TX8:0
SLIM TX7 MUX:ZERO
SLIM TX8 MUX:ZERO
DEC7 MUX:ZERO
ANC2 MUX:ZERO
DEC10 MUX:ZERO
ANC1 FB MUX:ZERO
TX7 HPF Switch:0
TX8 HPF Switch:0
#ANC_TEST_S_PATH_HANDSET_SPKR_ANC_MONO
acdb_dev_id:86
!Playback
Rxdevice:0
enable
ANC Function:ON
SLIM RX1 MUX:AIF1_PB
SLIM_0_RX Channels:One
RX1 MIX1 INP1:RX1
CLASS_H_DSM MUX:DSM_HPHL_RX1
RX1 Digital Volume:87
DAC1 Switch:1
ANC Slot:7
SLIMBUS_0_RX Audio Mixer MultiMedia1:1
disable
SLIMBUS_0_RX Audio Mixer MultiMedia1:0
ANC Slot:0
SLIM RX1 MUX:ZERO
RX1 MIX1 INP1:ZERO
RX1 Digital Volume:0
DAC1 Switch:0
ANC Function:OFF
#ANC_TEST_E_PATH_HANDSET_SPKR_ANC_MONO
acdb_dev_id:89
!Playback
Rxdevice:0
enable
ANC Function:ON
SLIM RX1 MUX:AIF1_PB
SLIM_0_RX Channels:One
RX1 MIX1 INP1:RX1
CLASS_H_DSM MUX:DSM_HPHL_RX1
RX1 Digital Volume:87
DAC1 Switch:1
ANC Slot:8
SLIMBUS_0_RX Audio Mixer MultiMedia1:1
disable
SLIMBUS_0_RX Audio Mixer MultiMedia1:0
ANC Slot:0
SLIM RX1 MUX:ZERO
RX1 MIX1 INP1:ZERO
RX1 Digital Volume:0
DAC1 Switch:0
ANC Function:OFF

View file

@ -1,412 +0,0 @@
# List of effect libraries to load. Each library element must contain a "path" element
# giving the full path of the library .so file.
# libraries {
# <lib name> {
# path <lib path>
# }
# }
libraries {
bundle {
path /system/lib/soundfx/libbundlewrapper.so
}
reverb {
path /system/lib/soundfx/libreverbwrapper.so
}
qcbassboost {
path /vendor/lib/soundfx/libqcbassboost.so
}
qcvirt {
path /vendor/lib/soundfx/libqcvirt.so
}
qcreverb {
path /vendor/lib/soundfx/libqcreverb.so
}
visualizer_sw {
path /system/lib/soundfx/libvisualizer.so
}
visualizer_hw {
path /system/lib/soundfx/libqcomvisualizer.so
}
downmix {
path /system/lib/soundfx/libdownmix.so
}
loudness_enhancer {
path /system/lib/soundfx/libldnhncr.so
}
proxy {
path /system/lib/soundfx/libeffectproxy.so
}
offload_bundle {
path /system/lib/soundfx/libqcompostprocbundle.so
}
audio_pre_processing {
path /system/lib/soundfx/libqcomvoiceprocessing.so
}
#add dirac effect bug 156518
loudness_enhancer {
path /system/lib/soundfx/libldnhncr.so
}
volume_listener {
path /system/lib/soundfx/libvolumelistener.so
}
dirac {
path /system/lib/soundfx/libdirac.so
}
}
# Default pre-processing library. Add to audio_effect.conf "libraries" section if
# audio HAL implements support for default software audio pre-processing effects
#
# pre_processing {
# path /system/lib/soundfx/libaudiopreprocessing.so
# }
# list of effects to load. Each effect element must contain a "library" and a "uuid" element.
# The value of the "library" element must correspond to the name of one library element in the
# "libraries" element.
# The name of the effect element is indicative, only the value of the "uuid" element
# designates the effect.
# The uuid is the implementation specific UUID as specified by the effect vendor. This is not the
# generic effect type UUID.
# effects {
# <fx name> {
# library <lib name>
# uuid <effect uuid>
# }
# ...
# }
effects {
# additions for the proxy implementation
# Proxy implementation
#effectname {
#library proxy
#uuid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# SW implemetation of the effect. Added as a node under the proxy to
# indicate this as a sub effect.
#libsw {
#library libSW
#uuid yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
#} End of SW effect
# HW implementation of the effect. Added as a node under the proxy to
# indicate this as a sub effect.
#libhw {
#library libHW
#uuid zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz
#}End of HW effect
#} End of effect proxy
bassboost {
library proxy
uuid 14804144-a5ee-4d24-aa88-0002a5d5c51b
libsw {
library qcbassboost
uuid 23aca180-44bd-11e2-bcfd-0800200c9a66
}
libhw {
library offload_bundle
uuid 2c4a8c24-1581-487f-94f6-0002a5d5c51b
}
}
virtualizer {
library proxy
uuid d3467faa-acc7-4d34-acaf-0002a5d5c51b
libsw {
library qcvirt
uuid e6c98a16-22a3-11e2-b87b-f23c91aec05e
}
libhw {
library offload_bundle
uuid 509a4498-561a-4bea-b3b1-0002a5d5c51b
}
}
equalizer {
library proxy
uuid c8e70ecd-48ca-456e-8a4f-0002a5d5c51b
libsw {
library bundle
uuid ce772f20-847d-11df-bb17-0002a5d5c51b
}
libhw {
library offload_bundle
uuid a0dac280-401c-11e3-9379-0002a5d5c51b
}
}
volume {
library bundle
uuid 119341a0-8469-11df-81f9-0002a5d5c51b
}
reverb_env_aux {
library proxy
uuid 48404ac9-d202-4ccc-bf84-0002a5d5c51b
libsw {
library qcreverb
uuid a8c1e5f3-293d-43cd-95ec-d5e26c02e217
}
libhw {
library offload_bundle
uuid 79a18026-18fd-4185-8233-0002a5d5c51b
}
}
reverb_env_ins {
library proxy
uuid b707403a-a1c1-4291-9573-0002a5d5c51b
libsw {
library qcreverb
uuid 791fff8b-8129-4655-83a4-59bc61034c3a
}
libhw {
library offload_bundle
uuid eb64ea04-973b-43d2-8f5e-0002a5d5c51b
}
}
reverb_pre_aux {
library proxy
uuid 1b78f587-6d1c-422e-8b84-0002a5d5c51b
libsw {
library qcreverb
uuid 53ef1db5-c0c0-445b-b060-e34d20ebb70a
}
libhw {
library offload_bundle
uuid 6987be09-b142-4b41-9056-0002a5d5c51b
}
}
reverb_pre_ins {
library proxy
uuid f3e178d2-ebcb-408e-8357-0002a5d5c51b
libsw {
library qcreverb
uuid b08a0e38-22a5-11e2-b87b-f23c91aec05e
}
libhw {
library offload_bundle
uuid aa2bebf6-47cf-4613-9bca-0002a5d5c51b
}
}
visualizer {
library proxy
uuid 1d0a1a53-7d5d-48f2-8e71-27fbd10d842c
libsw {
library visualizer_sw
uuid d069d9e0-8329-11df-9168-0002a5d5c51b
}
libhw {
library visualizer_hw
uuid 7a8044a0-1a71-11e3-a184-0002a5d5c51b
}
}
downmix {
library downmix
uuid 93f04452-e4fe-41cc-91f9-e475b6d1d69f
}
loudness_enhancer {
library loudness_enhancer
uuid fa415329-2034-4bea-b5dc-5b381c8d1e2c
}
aec {
library audio_pre_processing
uuid 0f8d0d2a-59e5-45fe-b6e4-248c8a799109
}
ns {
library audio_pre_processing
uuid 1d97bb0b-9e2f-4403-9ae3-58c2554306f8
}
#bug 156518 add dirac effect
music_helper {
library volume_listener
uuid 08b8b058-0590-11e5-ac71-0025b32654a0
}
ring_helper {
library volume_listener
uuid 0956df94-0590-11e5-bdbe-0025b32654a0
}
alarm_helper {
library volume_listener
uuid 09f303e2-0590-11e5-8fdb-0025b32654a0
}
# voice_helper is called when stream type is voice_call in VoIP usecase
voice_helper {
library volume_listener
uuid 0ace5c08-0590-11e5-ae9e-0025b32654a0
}
notification_helper {
library volume_listener
uuid 0b776dde-0590-11e5-81ba-0025b32654a0
}
dirac {
library dirac
uuid e069d9e0-8329-11df-9168-0002a5d5c51b
}
}
# additional effect from vendor
# UUID generated using version 1
output_session_processing {
music {
music_helper {
}
}
ring {
ring_helper {
}
}
alarm {
alarm_helper {
}
}
# stream type voice_call is used for VoIP call
voice_call {
voice_helper {
}
}
notification {
notification_helper {
}
}
}
# Audio global processor configurations.
# The global processor configuration consists in a list of effects elements.
# The name of the effect element must be the name of one of the effects in
# the "effects" list of the file.
# Each effect element may optionally contain a list of parameters and their
# default value to apply when the pre processor effect is created.
# A parameter is defined by a "param" element and a "value" element. Each of these elements
# consists in one or more elements specifying a type followed by a value.
# The types defined are: "int", "short", "float", "bool" and "string"
# When both "param" and "value" are a single int, a simple form is allowed where just
# the param and value pair is present in the parameter description
# global_processing {
# <fx name> {
# <param 1 name> {
# param {
# int|short|float|bool|string <value>
# [ int|short|float|bool|string <value> ]
# ...
# }
# value {
# int|short|float|bool|string <value>
# [ int|short|float|bool|string <value> ]
# ...
# }
# }
# <param 2 name > {<param> <value>}
# ...
# }
# ...
# }
global_processing {
dirac {
bl@lakala {
param {
int 6
}
value {
string *com.lakala.android
}
}
bl@jawboneup {
param {
int 6
}
value {
string *com.jawbone.up
}
}
bl@hojyremote {
param {
int 6
}
value {
string *com.hojy.hremote
}
}
}
}
# Default pre-processing effects. Add to audio_effect.conf "effects" section if
# audio HAL implements support for them.
#
# agc {
# library pre_processing
# uuid aa8130e0-66fc-11e0-bad0-0002a5d5c51b
# }
# aec {
# library pre_processing
# uuid bb392ec0-8d4d-11e0-a896-0002a5d5c51b
# }
# ns {
# library pre_processing
# uuid c06c8400-8e06-11e0-9cb6-0002a5d5c51b
# }
# Audio preprocessor configurations.
# The pre processor configuration consists in a list of elements each describing
# pre processor settings for a given input source. Valid input source names are:
# "mic", "camcorder", "voice_recognition", "voice_communication"
# Each input source element contains a list of effects elements. The name of the effect
# element must be the name of one of the effects in the "effects" list of the file.
# Each effect element may optionally contain a list of parameters and their
# default value to apply when the pre processor effect is created.
# A parameter is defined by a "param" element and a "value" element. Each of these elements
# consists in one or more elements specifying a type followed by a value.
# The types defined are: "int", "short", "float", "bool" and "string"
# When both "param" and "value" are a single int, a simple form is allowed where just
# the param and value pair is present in the parameter description
# pre_processing {
# <input source name> {
# <fx name> {
# <param 1 name> {
# param {
# int|short|float|bool|string <value>
# [ int|short|float|bool|string <value> ]
# ...
# }
# value {
# int|short|float|bool|string <value>
# [ int|short|float|bool|string <value> ]
# ...
# }
# }
# <param 2 name > {<param> <value>}
# ...
# }
# ...
# }
# ...
# }
# Added aec, ns effects for voice_commuincation, which are supported by the board
pre_processing {
voice_communication {
aec {
}
ns {
}
}
}
#
# TODO: add default audio pre processor configurations after debug and tuning phase
#

View file

@ -1,63 +0,0 @@
# List of profiles for the output device session where stream is routed.
# A stream opened with the inputs attributes which match the "flags" and
# "formats" as specified in the profile is routed to a device at
# sample rate specified under "sampling_rates" and bit width under
# "bit_width" and the topology extracted from the acdb data against
# the "app_type".
#
# the flags and formats are specified using the strings corresponding to
# enums in audio.h and audio_policy.h. They are concatenated with "|"
# without space or "\n".
# the flags and formats should match the ones in "audio_policy.conf"
outputs {
default {
flags AUDIO_OUTPUT_FLAG_PRIMARY
formats AUDIO_FORMAT_PCM_16_BIT
sampling_rates 48000
bit_width 16
app_type 69937
}
deep_buffer {
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
formats AUDIO_FORMAT_PCM_16_BIT
sampling_rates 48000
bit_width 16
app_type 69936
}
direct {
flags AUDIO_OUTPUT_FLAG_DIRECT
formats AUDIO_FORMAT_PCM_16_BIT
sampling_rates 48000
bit_width 16
app_type 69936
}
direct_pcm_16 {
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_DIRECT_PCM
formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT
sampling_rates 44100|48000|96000|192000
bit_width 16
app_type 69936
}
direct_pcm_24 {
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_DIRECT_PCM
formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT
sampling_rates 44100|48000|96000|192000
bit_width 24
app_type 69940
}
compress_offload_16 {
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2
sampling_rates 44100|48000|96000|192000
bit_width 16
app_type 69936
}
compress_offload_24 {
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
formats AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_VORBIS
sampling_rates 44100|48000|96000|192000
bit_width 24
app_type 69940
}
}

View file

@ -1,173 +0,0 @@
# Global configuration section:
# - lists input and output devices always present on the device
# as well as the output device selected by default.
# Devices are designated by a string that corresponds to the enum in audio.h
# - defines whether the speaker output path uses DRC
# "TRUE" means DRC is enabled, "FALSE" or omission means DRC isn't used.
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_TELEPHONY_TX
default_output_device AUDIO_DEVICE_OUT_SPEAKER
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_FM_TUNER|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_TELEPHONY_RX
speaker_drc_enabled TRUE
}
# audio hardware module section: contains descriptors for all audio hw modules present on the
# device. Each hw module node is named after the corresponding hw module library base name.
# For instance, "primary" corresponds to audio.primary.<device>.so.
# The "primary" module is mandatory and must include at least one output with
# AUDIO_OUTPUT_FLAG_PRIMARY flag.
# Each module descriptor contains one or more output profile descriptors and zero or more
# input profile descriptors. Each profile lists all the parameters supported by a given output
# or input stream category.
# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
audio_hw_modules {
primary {
outputs {
primary {
sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_LINE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_FM
flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST
}
raw {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_LINE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW
}
deep_buffer {
sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_LINE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
}
multichannel {
sampling_rates 44100|48000
channel_masks dynamic
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
flags AUDIO_OUTPUT_FLAG_DIRECT
}
direct_pcm {
sampling_rates 8000|11025|16000|22050|32000|44100|48000|64000|88200|96000|176400|192000
channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1
formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_LINE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_AUX_DIGITAL
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_DIRECT_PCM
}
compress_offload {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|64000|88200|96000|176400|192000
channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1
formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_LINE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
}
incall_music {
sampling_rates 8000|16000|48000
channel_masks AUDIO_CHANNEL_OUT_MONO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_LINE|AUDIO_DEVICE_OUT_ALL_SCO
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_INCALL_MUSIC
}
voice_tx {
sampling_rates 8000|16000|48000
channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_TELEPHONY_TX
}
voip_rx {
sampling_rates 8000|16000
channel_masks AUDIO_CHANNEL_OUT_MONO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_LINE|AUDIO_DEVICE_OUT_ALL_SCO
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX
}
}
inputs {
primary {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_FM_TUNER|AUDIO_DEVICE_IN_VOICE_CALL
}
surround_sound {
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK|AUDIO_CHANNEL_INDEX_MASK_3|AUDIO_CHANNEL_INDEX_MASK_4|AUDIO_CHANNEL_IN_5POINT1
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC
}
voice_rx {
sampling_rates 8000|16000|48000
channel_masks AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_MONO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_TELEPHONY_RX
}
}
}
a2dp {
outputs {
a2dp {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_ALL_A2DP
}
}
inputs {
a2dp {
sampling_rates 44100|48000
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_BLUETOOTH_A2DP
}
}
}
usb {
outputs {
usb_accessory {
sampling_rates 44100
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_USB_ACCESSORY
}
usb_device {
sampling_rates dynamic
channel_masks dynamic
formats dynamic
devices AUDIO_DEVICE_OUT_USB_DEVICE
}
}
inputs {
usb_device {
sampling_rates dynamic
channel_masks AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_USB_DEVICE
}
}
}
r_submix {
outputs {
submix {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
}
}
inputs {
submix {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
}
}
}
}

View file

@ -1,296 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved
Not a Contribution.
-->
<!-- Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
<!-- Global configuration Decalaration -->
<globalConfiguration speaker_drc_enabled="true"/>
<!-- Modules section:
There is one section per audio HW module present on the platform.
Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
The module names are the same as in current .conf file:
“primary”, “A2DP”, “remote_submix”, “USB”
Each module will contain the following sections:
“devicePorts”: a list of device descriptors for all input and output devices accessible via this
module.
This contains both permanently attached devices and removable devices.
“mixPorts”: listing all output and input streams exposed by the audio HAL
“routes”: list of possible connections between input and output devices or between stream and
devices.
"route": is defined by an attribute:
-"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
-"sink": the sink involved in this route
-"sources": all the sources than can be connected to the sink via vis route
“attachedDevices”: permanently attached devices.
The attachedDevices section is a list of devices names. The names correspond to device names
defined in <devicePorts> section.
“defaultOutputDevice”: device to be used by default when no policy rule applies
-->
<modules>
<!-- Primary Audio HAL -->
<module name="primary" halVersion="2.0">
<attachedDevices>
<item>Earpiece</item>
<item>Speaker</item>
<item>Telephony Tx</item>
<item>Built-In Mic</item>
<item>Built-In Back Mic</item>
<item>FM Tuner</item>
<item>Telephony Rx</item>
</attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts>
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_PRIMARY">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="raw" role="source"
flags="AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="deep_buffer" role="source"
flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="multichannel" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
</mixPort>
<mixPort name="direct_pcm" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_DIRECT_PCM">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_PCM_24_BIT_PACKED"
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
</mixPort>
<mixPort name="compressed_offload" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
<profile name="" format="AUDIO_FORMAT_MP3"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_FLAC"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_ALAC"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_APE"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_LC"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_WMA"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_WMA_PRO"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
<profile name="" format="AUDIO_FORMAT_VORBIS"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_LC"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V1"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
<profile name="" format="AUDIO_FORMAT_AAC_ADTS_HE_V2"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000"
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
<mixPort name="voice_tx" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="voip_rx" role="source"
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</mixPort>
<mixPort name="primary input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
</mixPort>
<mixPort name="surround_sound" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_INDEX_MASK_3,AUDIO_CHANNEL_INDEX_MASK_4,AUDIO_CHANNEL_IN_5POINT1"/>
</mixPort>
<mixPort name="voice_rx" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
<devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
<devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Line" type="AUDIO_DEVICE_OUT_LINE" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="BT SCO All" type="AUDIO_DEVICE_OUT_ALL_SCO" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
</devicePort>
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="HDMI" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
</devicePort>
<devicePort tagName="Proxy" type="AUDIO_DEVICE_OUT_PROXY" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
</devicePort>
<devicePort tagName="FM" type="AUDIO_DEVICE_OUT_FM" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
</devicePort>
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
<devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</devicePort>
</devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
<route type="mix" sink="Earpiece"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Speaker"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Wired Headset"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Wired Headphones"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Line"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="HDMI"
sources="primary output,raw,deep_buffer,multichannel,direct_pcm,compressed_offload"/>
<route type="mix" sink="Proxy"
sources="primary output,raw,deep_buffer,multichannel,direct_pcm,compressed_offload"/>
<route type="mix" sink="FM"
sources="primary output"/>
<route type="mix" sink="BT SCO All"
sources="primary output,raw,deep_buffer,direct_pcm,compressed_offload,voip_rx"/>
<route type="mix" sink="Telephony Tx"
sources="voice_tx"/>
<route type="mix" sink="primary input"
sources="Wired Headset Mic,BT SCO Headset Mic,FM Tuner,Telephony Rx"/>
<route type="mix" sink="surround_sound"
sources="Built-In Mic,Built-In Back Mic"/>
<route type="mix" sink="voice_rx"
sources="Telephony Rx"/>
</routes>
</module>
<!-- A2dp Audio HAL -->
<xi:include href="a2dp_audio_policy_configuration.xml"/>
<!-- Usb Audio HAL -->
<xi:include href="usb_audio_policy_configuration.xml"/>
<!-- Remote Submix Audio HAL -->
<xi:include href="r_submix_audio_policy_configuration.xml"/>
</modules>
<!-- End of Modules section -->
<!-- Volume section -->
<xi:include href="audio_policy_volumes.xml"/>
<xi:include href="default_volume_tables.xml"/>
<!-- End of Volume section -->
</audioPolicyConfiguration>

File diff suppressed because it is too large Load diff

View file

@ -1,83 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--- Copyright (c) 2014, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
<!--- met: -->
<!--- * Redistributions of source code must retain the above copyright -->
<!--- notice, this list of conditions and the following disclaimer. -->
<!--- * Redistributions in binary form must reproduce the above -->
<!--- copyright notice, this list of conditions and the following -->
<!--- disclaimer in the documentation and/or other materials provided -->
<!--- with the distribution. -->
<!--- * Neither the name of The Linux Foundation nor the names of its -->
<!--- contributors may be used to endorse or promote products derived -->
<!--- from this software without specific prior written permission. -->
<!--- -->
<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
<mixer>
<!-- These are the initial mixer settings -->
<ctl name="LSM1 MUX" value="None" />
<ctl name="LSM2 MUX" value="None" />
<ctl name="LSM3 MUX" value="None" />
<ctl name="LSM4 MUX" value="None" />
<ctl name="LSM5 MUX" value="None" />
<ctl name="LSM6 MUX" value="None" />
<ctl name="LSM7 MUX" value="None" />
<ctl name="LSM8 MUX" value="None" />
<ctl name="TERT_MI2S_TX LSM Function" value="None" />
<path name="listen-voice-wakeup-1">
<ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
<ctl name="LSM1 MUX" value="TERT_MI2S_TX" />
</path>
<path name="listen-voice-wakeup-2">
<ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
<ctl name="LSM2 MUX" value="TERT_MI2S_TX" />
</path>
<path name="listen-voice-wakeup-3">
<ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
<ctl name="LSM3 MUX" value="TERT_MI2S_TX" />
</path>
<path name="listen-voice-wakeup-4">
<ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
<ctl name="LSM4 MUX" value="TERT_MI2S_TX" />
</path>
<path name="listen-voice-wakeup-5">
<ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
<ctl name="LSM5 MUX" value="TERT_MI2S_TX" />
</path>
<path name="listen-voice-wakeup-6">
<ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
<ctl name="LSM6 MUX" value="TERT_MI2S_TX" />
</path>
<path name="listen-voice-wakeup-7">
<ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
<ctl name="LSM7 MUX" value="TERT_MI2S_TX" />
</path>
<path name="listen-voice-wakeup-8">
<ctl name="TERT_MI2S_TX LSM Function" value="SWAUDIO" />
<ctl name="LSM8 MUX" value="TERT_MI2S_TX" />
</path>
<path name="listen-ape-handset-mic">
<!-- this is to avoid codec mute when device is not enabled first -->
<ctl name="LOOPBACK Mode" value="ENABLE" />
<!-- actual device ebable sequence -->
<ctl name="DEC1 MUX" value="ADC2" />
<ctl name="ADC2 MUX" value="INP3" />
</path>
</mixer>

View file

@ -1,72 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--- Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. -->
<!--- -->
<!--- Redistribution and use in source and binary forms, with or without -->
<!--- modification, are permitted provided that the following conditions are -->
<!--- met: -->
<!--- * Redistributions of source code must retain the above copyright -->
<!--- notice, this list of conditions and the following disclaimer. -->
<!--- * Redistributions in binary form must reproduce the above -->
<!--- copyright notice, this list of conditions and the following -->
<!--- disclaimer in the documentation and/or other materials provided -->
<!--- with the distribution. -->
<!--- * Neither the name of The Linux Foundation nor the names of its -->
<!--- contributors may be used to endorse or promote products derived -->
<!--- from this software without specific prior written permission. -->
<!--- -->
<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -->
<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
<sound_trigger_platform_info>
<param version="0x0101" /> <!-- this must be the first param -->
<common_config>
<param execution_type="APE" /> <!-- value: "CPE" "APE" -->
<param max_cpe_sessions="1" />
<param max_ape_sessions="5" />
<param enable_failure_detection="false" />
<param rx_concurrency_disabled="true" />
<param rx_conc_max_st_ses="1" />
</common_config>
<acdb_ids>
<param DEVICE_HANDSET_APE_ACDB_ID="130" />
<param DEVICE_HANDSET_CPE_ACDB_ID="128" />
<param DEVICE_HANDSET_CPE_ECPP_ACDB_ID="128" />
</acdb_ids>
<!-- Multiple sound_model_config tags can be listed, each with unique -->
<!-- vendor_uuid. The below tag represents QTI SVA engine sound model -->
<!-- configuration. ISV must use their own unique vendor_uuid. -->
<sound_model_config>
<param vendor_uuid="68ab2d40-e860-11e3-95ef-0002a5d5c51b" />
<param app_type="2" /> <!-- app type used in ACDB -->
<param library="libsmwrapper.so" />
<param max_cpe_phrases="6" />
<param max_cpe_users="3" />
<param max_ape_phrases="10" />
<param max_ape_users="10" />
<param sample_rate="16000" />
<!-- Module and param ids with which the algorithm is integrated in firmware -->
<param load_sound_model_ids="0x00012C0D, 0x00012C14" />
<param unload_sound_model_ids="0x00012C0D, 0x00012C15" />
<param confidence_levels_ids="0x00012C0D, 0x00012C07" />
<param operation_mode_ids="0x00012C0D, 0x00012C02" />
<!-- format: "ADPCM_packet" or "PCM_packet" !-->
<!-- transfer_mode: "FTRT" or "RT" -->
<!-- kw_duration is in milli seconds. It is valid only for FTRT transfer mode -->
<param capture_keyword="PCM_packet, RT, 2000" />
<param client_capture_read_delay="2000" />
</sound_model_config>
</sound_trigger_platform_info>

View file

@ -1,31 +0,0 @@
/**
* Copyright (C) 2012 The Android Open Source Project
* Copyright (C) 2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#define BTA_SKIP_BLE_READ_REMOTE_FEAT FALSE
#define MAX_ACL_CONNECTIONS 7
#define MAX_L2CAP_CHANNELS 16
#define BLE_VND_INCLUDED TRUE
#define BTA_BLE_SKIP_CONN_UPD FALSE
#define BLE_PERIPHERAL_ADV_NAME FALSE
#define BT_CLEAN_TURN_ON_DISABLED 1
#define BTA_DISABLE_DELAY 1000
#define BTM_WBS_INCLUDED TRUE
#define BTIF_HF_WBS_PREFERRED TRUE
#endif

View file

@ -1,24 +0,0 @@
# Platform
TARGET_BOARD_PLATFORM := msm8937
# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
# Second architecture
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := cortex-a53
TARGET_USES_64_BIT_BINDER := true
# Qualcomm support
BOARD_USES_QCOM_HARDWARE := true
BOARD_USES_QC_TIME_SERVICES := true
TARGET_POWERHAL_VARIANT := qcom
TARGET_RIL_VARIANT := caf

View file

@ -1,2 +0,0 @@
# ANT
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"

View file

@ -1,3 +0,0 @@
# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth
BOARD_HAVE_BLUETOOTH_QCOM := true

View file

@ -1,3 +0,0 @@
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := MSM8937
TARGET_NO_BOOTLOADER := true

View file

@ -1,3 +0,0 @@
# Charger
BOARD_CHARGER_DISABLE_INIT_BLANK := true
BOARD_CHARGER_ENABLE_SUSPEND := true

View file

@ -1,2 +0,0 @@
# CNE / DPM
BOARD_USES_QCNE := true

View file

@ -1,2 +0,0 @@
# Encryption
TARGET_HW_DISK_ENCRYPTION := true

View file

@ -1,6 +0,0 @@
# Bootanimation
TARGET_BOOTANIMATION_HALF_RES := true
TARGET_USES_C2D_COMPOSITION := true
TARGET_USES_ION := true
USE_OPENGL_RENDERER := true

View file

@ -1,11 +0,0 @@
# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
BOARD_USERDATAIMAGE_PARTITION_SIZE := 26301931008
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_USERIMAGES_USE_F2FS := true
TARGET_USERIMAGES_USE_EXT4 := true

View file

@ -1,4 +0,0 @@
# FM
AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
BOARD_HAVE_QCOM_FM := true
TARGET_QCOM_NO_FM_FIRMWARE := true

View file

@ -1,3 +0,0 @@
# GPS
USE_DEVICE_SPECIFIC_GPS := true
TARGET_NO_RPC := true

View file

@ -1,5 +0,0 @@
# CM Hardware
BOARD_USES_CYANOGEN_HARDWARE := true
BOARD_HARDWARE_CLASS += \
hardware/cyanogen/cmhw \
device/xiaomi/land/cmhw

2
board/init.mk Normal file
View file

@ -0,0 +1,2 @@
# Libinit
TARGET_LIBINIT_MSM8937_DEFINES_FILE := $(DEVICE_PATH)/libinit/init_land.cpp

View file

@ -1,12 +1,2 @@
# CPUsets
ENABLE_CPUSETS := true
# kernel
BOARD_KERNEL_BASE := 0x80000000
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_hsl_uart,0x78B0000
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --tags_offset 0x00000100
# Kernel
TARGET_KERNEL_CONFIG := lineageos_land_defconfig
TARGET_KERNEL_SOURCE := kernel/xiaomi/msm8937
TARGET_USE_SDCLANG := true

View file

@ -1,2 +0,0 @@
# Malloc
MALLOC_SVELTE := true

View file

@ -1,2 +0,0 @@
# Peripheral manager
TARGET_PER_MGR_ENABLED := true

View file

@ -1,39 +0,0 @@
# Audio
AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true
AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
AUDIO_FEATURE_ENABLED_CUSTOMSTEREO := true
AUDIO_FEATURE_ENABLED_DEV_ARBI := true
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true
AUDIO_FEATURE_ENABLED_EXT_HDMI := true
AUDIO_FEATURE_ENABLED_EXTN_FLAC_DECODER := true
AUDIO_FEATURE_ENABLED_EXTN_FORMATS := true
AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
AUDIO_FEATURE_ENABLED_FLUENCE := true
AUDIO_FEATURE_ENABLED_HFP := true
AUDIO_FEATURE_ENABLED_HDMI_EDID := true
AUDIO_FEATURE_ENABLED_HIFI_AUDIO := true
AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
AUDIO_FEATURE_ENABLED_SPKR_PROTECTION := true
AUDIO_FEATURE_ENABLED_SOURCE_TRACKING := true
AUDIO_FEATURE_ENABLED_SSR := true
AUDIO_FEATURE_ENABLED_VBAT_MONITOR := true
#AUDIO_FEATURE_ENABLED_VOICE_CONCURRENCY := true
AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := false
AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
BOARD_SUPPORTS_SOUND_TRIGGER := true
BOARD_USES_ALSA_AUDIO := true
USE_CUSTOM_AUDIO_POLICY := 1
USE_XML_AUDIO_POLICY_CONF := 1

View file

@ -1,3 +0,0 @@
# Bluetooth
BLUETOOTH_HCI_USE_MCT := true
QCOM_BT_USE_SMD_TTY := true

View file

@ -1,6 +0,0 @@
MAX_EGL_CACHE_KEY_SIZE := 12*1024
MAX_EGL_CACHE_SIZE := 2048*1024
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so

View file

@ -1,4 +0,0 @@
# Init
TARGET_INIT_VENDOR_LIB := libinit_land
TARGET_PLATFORM_DEVICE_BASE := /devices/soc/
TARGET_RECOVERY_DEVICE_MODULES := libinit_land

View file

@ -1,2 +0,0 @@
# Keystore
TARGET_PROVIDES_KEYMASTER := true

View file

@ -1 +0,0 @@
TARGET_USES_MEDIA_EXTENSIONS := true

View file

@ -1,16 +0,0 @@
# Wi-Fi
BOARD_HAS_QCOM_WLAN := true
BOARD_HAS_QCOM_WLAN_SDK := true
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn
BOARD_WLAN_DEVICE := qcwcn
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn
WIFI_DRIVER_FW_PATH_AP := "ap"
WIFI_DRIVER_FW_PATH_STA := "sta"
WPA_SUPPLICANT_VERSION := VER_0_8_X

View file

@ -1,2 +0,0 @@
# Recovery
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/fstab.qcom

View file

@ -1,2 +0,0 @@
# Sensors
USE_SENSOR_MULTI_HAL := true

View file

@ -1,5 +0,0 @@
# SELinux
BOARD_SEPOLICY_DIRS += \
$(DEVICE_PATH)/sepolicy
include device/qcom/sepolicy/sepolicy.mk

View file

@ -1,46 +0,0 @@
/*
* Copyright (C) 2017 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cyanogenmod.hardware;
import org.cyanogenmod.internal.util.FileUtils;
/*
* Disable capacitive keys
*
* This is intended for use on devices in which the capacitive keys
* can be fully disabled for replacement with a soft navbar. You
* really should not be using this on a device with mechanical or
* otherwise visible-when-inactive keys
*/
public class KeyDisabler {
private static String CONTROL_PATH = "/proc/touchpanel/capacitive_keys_enable";
public static boolean isSupported() {
return FileUtils.isFileWritable(CONTROL_PATH);
}
public static boolean isActive() {
return FileUtils.readOneLine(CONTROL_PATH).equals("0");
}
public static boolean setActive(boolean state) {
return FileUtils.writeLine(CONTROL_PATH, (state ? "1" : "0"));
}
}

View file

@ -1,54 +0,0 @@
/*
* Copyright (C) 2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cyanogenmod.hardware;
import org.cyanogenmod.internal.util.FileUtils;
public class VibratorHW {
private static String LEVEL_PATH = "/sys/class/timed_output/vibrator/vtg_level";
private static String MAX_PATH = "/sys/class/timed_output/vibrator/vtg_max";
private static String MIN_PATH = "/sys/class/timed_output/vibrator/vtg_min";
public static boolean isSupported() {
return FileUtils.isFileReadable(LEVEL_PATH) &&
FileUtils.isFileWritable(LEVEL_PATH);
}
public static int getMaxIntensity() {
return Integer.parseInt(FileUtils.readOneLine(MAX_PATH));
}
public static int getMinIntensity() {
return Integer.parseInt(FileUtils.readOneLine(MIN_PATH));
}
public static int getWarningThreshold() {
return -1;
}
public static int getCurIntensity() {
return Integer.parseInt(FileUtils.readOneLine(LEVEL_PATH));
}
public static int getDefaultIntensity() {
return getMaxIntensity();
}
public static boolean setIntensity(int intensity) {
return FileUtils.writeLine(LEVEL_PATH, String.valueOf(intensity));
}
}

View file

@ -1,259 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2013 The Android Open Source Project
Copyright (C) 2016 The Linux Foundation. All rights reserved.
Not a contribution.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
<!DOCTYPE MediaCodecs [
<!ELEMENT Include EMPTY>
<!ATTLIST Include href CDATA #REQUIRED>
<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
<!ELEMENT Decoders (MediaCodec|Include)*>
<!ELEMENT Encoders (MediaCodec|Include)*>
<!ELEMENT MediaCodec (Type|Quirk|Include)*>
<!ATTLIST MediaCodec name CDATA #REQUIRED>
<!ATTLIST MediaCodec type CDATA>
<!ELEMENT Type EMPTY>
<!ATTLIST Type name CDATA #REQUIRED>
<!ELEMENT Quirk EMPTY>
<!ATTLIST Quirk name CDATA #REQUIRED>
]>
There's a simple and a complex syntax to declare the availability of a
media codec:
A codec that properly follows the OpenMax spec and therefore doesn't have any
quirks and that only supports a single content type can be declared like so:
<MediaCodec name="OMX.foo.bar" type="something/interesting" />
If a codec has quirks OR supports multiple content types, the following syntax
can be used:
<MediaCodec name="OMX.foo.bar" >
<Type name="something/interesting" />
<Type name="something/else" />
...
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="output-buffers-are-unreadable" />
</MediaCodec>
Only the three quirks included above are recognized at this point:
"requires-allocate-on-input-ports"
must be advertised if the component does not properly support specification
of input buffers using the OMX_UseBuffer(...) API but instead requires
OMX_AllocateBuffer to be used.
"requires-allocate-on-output-ports"
must be advertised if the component does not properly support specification
of output buffers using the OMX_UseBuffer(...) API but instead requires
OMX_AllocateBuffer to be used.
"output-buffers-are-unreadable"
must be advertised if the emitted output buffers of a decoder component
are not readable, i.e. use a custom format even though abusing one of
the official OMX colorspace constants.
Clients of such decoders will not be able to access the decoded data,
naturally making the component much less useful. The only use for
a component with this quirk is to render the output to the screen.
Audio decoders MUST NOT advertise this quirk.
Video decoders that advertise this quirk must be accompanied by a
corresponding color space converter for thumbnail extraction,
matching surfaceflinger support that can render the custom format to
a texture and possibly other code, so just DON'T USE THIS QUIRK.
-->
<!--
Decoder capabilities for thorium
_________________________________________________________________________
| Codec | W H fps Mbps MB/s | Encode Secure-dec |
|__________|_________________________________________|___________________|
| h264 | 1920 1088 30 20 244800 | Y N |
| hevc | 1920 1088 30 20 244800 | N N |
| mpeg4 | 1920 1088 30 6 244800 | Y N |
| vp8 | 1920 1088 30 20 244800 | N N |
| div4/5/6 | 1920 1088 30 6 244800 | N N |
| h263 | 864 480 30 2 48600 | Y N |
|__________|_________________________________________|___________________|
-->
<!--
Encoder capabilities for thorium
____________________________________________________
| Codec | W H fps Mbps MB/s |
|__________|_________________________________________|
| h264 | 1920 1088 30 20 244800 |
| mpeg4 | 864 480 30 2 48600 |
| h263 | 864 480 30 2 48600 |
|____________________________________________________|
-->
<MediaCodecs>
<Include href="media_codecs_google_audio.xml" />
<Include href="media_codecs_google_telephony.xml" />
<Settings>
<Setting name="max-video-encoder-input-buffers" value="9" />
</Settings>
<Encoders>
<!-- Video Hardware -->
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
<Limit name="size" min="96x96" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-20000000" />
<Limit name="concurrent-instances" max="8" />
<Feature name="can-swap-width-height" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
<Limit name="size" min="32x32" max="864x480" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="48600" />
<Limit name="bitrate" range="1-2000000" />
<Limit name="concurrent-instances" max="16" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
<Limit name="size" min="32x32" max="864x480" />
<Limit name="alignment" value="4x4" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="48600" />
<Limit name="bitrate" range="1-2000000" />
<Limit name="concurrent-instances" max="16" />
</MediaCodec>
</Encoders>
<Decoders>
<!-- Audio Software -->
<!-- Video Hardware -->
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="defers-output-buffer-allocation" />
<Limit name="size" min="64x64" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-20000000" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="8" />
<Feature name="can-swap-width-height" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="defers-output-buffer-allocation" />
<Limit name="size" min="64x64" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-20000000" />
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="4" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="defers-output-buffer-allocation" />
<Limit name="size" min="64x64" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-20000000" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="8" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="defers-output-buffer-allocation" />
<Limit name="size" min="64x64" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-20000000" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="8" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="size" min="16x16" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-6000000" />
<Limit name="concurrent-instances" max="16" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="size" min="16x16" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-6000000" />
<Limit name="concurrent-instances" max="16" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw">
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Type name="video/mp4v-es">
<Limit name="size" min="16x16" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-6000000" />
<Limit name="concurrent-instances" max="16" />
</Type>
<Type name="video/mp4v-esdp">
<Limit name="size" min="16x16" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="244800" />
<Limit name="bitrate" range="1-6000000" />
<Limit name="concurrent-instances" max="16" />
</Type>
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Limit name="size" min="16x16" max="864x480" />
<Limit name="alignment" value="4x4" />
<Limit name="block-size" value="16x16" />
<Limit name="blocks-per-second" min="1" max="48600" />
<Limit name="bitrate" range="1-2000000" />
<Limit name="concurrent-instances" max="16" />
</MediaCodec>
</Decoders>
<Include href="media_codecs_google_video.xml" />
<Include href="media_codecs_ffmpeg.xml" />
</MediaCodecs>

View file

@ -1,127 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
Not a Contribution.
Copyright 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<MediaCodecs>
<Encoders>
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="377-377" />
<Limit name="measured-frame-rate-720x480" range="113-113" />
<Limit name="measured-frame-rate-1280x720" range="50-50" />
<Limit name="measured-frame-rate-1920x1080" range="18-18" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="160-160" />
<Limit name="measured-frame-rate-352x288" range="86-86" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="179-179" />
<Limit name="measured-frame-rate-352x288" range="84-84" />
<Limit name="measured-frame-rate-640x480" range="54-54" />
</MediaCodec>
<MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="208-208" />
<Limit name="measured-frame-rate-720x480" range="36-37" />
<Limit name="measured-frame-rate-1280x720" range="16-16" />
<Limit name="measured-frame-rate-1920x1080" range="9-9" />
</MediaCodec>
<MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="397-397" />
</MediaCodec>
<MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="413-413" />
</MediaCodec>
<MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="71-71" />
<Limit name="measured-frame-rate-640x360" range="37-37" />
<Limit name="measured-frame-rate-1280x720" range="21-21" />
<Limit name="measured-frame-rate-1920x1080" range="12-12" />
</MediaCodec>
</Encoders>
<Decoders>
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="396-405" />
<Limit name="measured-frame-rate-720x480" range="280-280" />
<Limit name="measured-frame-rate-1280x720" range="155-155" />
<Limit name="measured-frame-rate-1920x1088" range="57-57" />
<Limit name="measured-frame-rate-1920x1080" range="57-57" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
<Limit name="measured-frame-rate-352x288" range="337-337" />
<Limit name="measured-frame-rate-640x360" range="253-253" />
<Limit name="measured-frame-rate-720x480" range="200-200" />
<Limit name="measured-frame-rate-1280x720" range="91-91" />
<Limit name="measured-frame-rate-1920x1088" range="63-63" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="392-394" />
<Limit name="measured-frame-rate-352x288" range="251-251" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" update="true">
<Type name="video/mp4v-es">
<Limit name="measured-frame-rate-480x360" range="232-232" />
<Limit name="measured-frame-rate-176x144" range="322-322" />
</Type>
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="360-360" />
<Limit name="measured-frame-rate-320x240" range="659-659" />
<Limit name="measured-frame-rate-640x360" range="370-370" />
<Limit name="measured-frame-rate-1280x720" range="162-162" />
<Limit name="measured-frame-rate-1920x1080" range="87-87" />
</MediaCodec>
<MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="250-250" />
<Limit name="measured-frame-rate-720x480" range="92-92" />
<Limit name="measured-frame-rate-1280x720" range="35-35" />
<Limit name="measured-frame-rate-1920x1080" range="15-15" />
</MediaCodec>
<MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-352x288" range="226-226" />
<Limit name="measured-frame-rate-640x360" range="150-170" />
<Limit name="measured-frame-rate-720x480" range="140-150" />
<Limit name="measured-frame-rate-1280x720" range="63-63" />
<Limit name="measured-frame-rate-1920x1080" range="35-34" />
</MediaCodec>
<MediaCodec name="OMX.google.mpeg4.decoder" update="true">
<Type name="video/mp4v-es">
<Limit name="measured-frame-rate-176x144" range="430-450" />
</Type>
</MediaCodec>
<MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="212-241" />
<Limit name="measured-frame-rate-352x288" range="172-175" />
</MediaCodec>
<MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x240" range="1330-1330" />
<Limit name="measured-frame-rate-320x180" range="495-500" />
<Limit name="measured-frame-rate-640x360" range="146-149" />
<Limit name="measured-frame-rate-1280x720" range="31-31" />
<Limit name="measured-frame-rate-1920x1080" range="12-13" />
</MediaCodec>
<MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
<Limit name="measured-frame-rate-320x180" range="304-304" />
<Limit name="measured-frame-rate-320x240" range="511-511" />
<Limit name="measured-frame-rate-640x360" range="103-105" />
<Limit name="measured-frame-rate-1280x720" range="53-53" />
<Limit name="measured-frame-rate-1920x1080" range="29-31" />
</MediaCodec>
</Decoders>
</MediaCodecs>

View file

@ -1,698 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Copyright (C) 2015 The Linux Foundation. All rights reserved.
Not a contribution.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE MediaSettings [
<!ELEMENT MediaSettings (CamcorderProfiles,
EncoderOutputFileFormat+,
VideoEncoderCap+,
AudioEncoderCap+,
VideoDecoderCap,
AudioDecoderCap)>
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
<!ELEMENT EncoderProfile (Video, Audio)>
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
<!ELEMENT Video EMPTY>
<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
<!ATTLIST Video bitRate CDATA #REQUIRED>
<!ATTLIST Video width CDATA #REQUIRED>
<!ATTLIST Video height CDATA #REQUIRED>
<!ATTLIST Video frameRate CDATA #REQUIRED>
<!ELEMENT Audio EMPTY>
<!ATTLIST Audio codec (amrnb|amrwb|aac|lpcm) #REQUIRED>
<!ATTLIST Audio bitRate CDATA #REQUIRED>
<!ATTLIST Audio sampleRate CDATA #REQUIRED>
<!ATTLIST Audio channels (1|2|6) #REQUIRED>
<!ELEMENT ImageEncoding EMPTY>
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
<!ELEMENT ImageDecoding EMPTY>
<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
<!ELEMENT Camera EMPTY>
<!ELEMENT EncoderOutputFileFormat EMPTY>
<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
<!ELEMENT VideoEncoderCap EMPTY>
<!ATTLIST VideoEncoderCap name (h264|h263|m4v) #REQUIRED>
<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxHFRFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxHFRFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxHFRMode CDATA #REQUIRED>
<!ELEMENT AudioEncoderCap EMPTY>
<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma|lpcm) #REQUIRED>
<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minChannels (1|2|6) #REQUIRED>
<!ATTLIST AudioEncoderCap maxChannels (1|2|6) #REQUIRED>
<!ELEMENT VideoDecoderCap EMPTY>
<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT AudioDecoderCap EMPTY>
<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT VideoEditorCap EMPTY>
<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
<!ELEMENT ExportVideoProfile EMPTY>
<!ATTLIST ExportVideoProfile name (h264) #REQUIRED>
<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
]>
<!--
This file is used to declare the multimedia profiles and capabilities
on an android-powered device.
-->
<MediaSettings>
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<!-- Back Camera -->
<CamcorderProfiles cameraId="0">
<EncoderProfile quality="low" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="high" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="512000"
width="320"
height="240"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="cif" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="720000"
width="352"
height="288"
frameRate="30" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="2000000"
width="720"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="14000000"
width="1280"
height="720"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="vga" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="2000000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="720000"
width="352"
height="288"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="512000"
width="320"
height="240"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="2000000"
width="640"
height="480"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="2000000"
width="640"
height="480"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="14000000"
width="1280"
height="720"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<!-- Front Camera -->
<CamcorderProfiles cameraId="1">
<EncoderProfile quality="low" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="high" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="512000"
width="320"
height="240"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="cif" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="720000"
width="352"
height="288"
frameRate="30" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="2000000"
width="720"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="14000000"
width="1280"
height="720"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="vga" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="2000000"
width="640"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="1200000"
width="352"
height="288"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="512000"
width="320"
height="240"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="2000000"
width="640"
height="480"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="5000000"
width="720"
height="480"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="8000000"
width="1280"
height="720"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="aac"
bitRate="156000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<EncoderOutputFileFormat name="3gp" />
<EncoderOutputFileFormat name="mp4" />
<!--
If a codec is not enabled, it is invisible to the applications
In other words, the applications won't be able to use the codec
or query the capabilities of the codec at all if it is disabled
-->
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="20000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1080"
minFrameRate="15" maxFrameRate="30"
maxHFRFrameWidth="1280" maxHFRFrameHeight="720"
maxHFRMode="60" />
<VideoEncoderCap name="h263" enabled="true"
minBitRate="64000" maxBitRate="2000000"
minFrameWidth="176" maxFrameWidth="864"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="15" maxFrameRate="30"
maxHFRFrameWidth="0" maxHFRFrameHeight="0"
maxHFRMode="0" />
<VideoEncoderCap name="m4v" enabled="true"
minBitRate="64000" maxBitRate="2000000"
minFrameWidth="176" maxFrameWidth="864"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="15" maxFrameRate="30"
maxHFRFrameWidth="0" maxHFRFrameHeight="0"
maxHFRMode="0" />
<AudioEncoderCap name="aac" enabled="true"
minBitRate="8000" maxBitRate="96000"
minSampleRate="8000" maxSampleRate="48000"
minChannels="1" maxChannels="6" />
<AudioEncoderCap name="heaac" enabled="true"
minBitRate="8000" maxBitRate="64000"
minSampleRate="16000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="aaceld" enabled="true"
minBitRate="16000" maxBitRate="192000"
minSampleRate="16000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="amrwb" enabled="true"
minBitRate="6600" maxBitRate="23850"
minSampleRate="16000" maxSampleRate="16000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="amrnb" enabled="true"
minBitRate="5525" maxBitRate="12200"
minSampleRate="8000" maxSampleRate="8000"
minChannels="1" maxChannels="1" />
<!-- <AudioEncoderCap name="lpcm" enabled="true"
minBitRate="768000" maxBitRate="4608000"
minSampleRate="48000" maxSampleRate="48000"
minChannels="1" maxChannels="6" />-->
<!--
FIXME:
We do not check decoder capabilities at present
At present, we only check whether windows media is visible
for TEST applications. For other applications, we do
not perform any checks at all.
-->
<VideoDecoderCap name="wmv" enabled="true"/>
<AudioDecoderCap name="wma" enabled="true"/>
<!--
The VideoEditor Capability configuration:
- maxInputFrameWidth: maximum video width of imported video clip.
- maxInputFrameHeight: maximum video height of imported video clip.
- maxOutputFrameWidth: maximum video width of exported video clip.
- maxOutputFrameHeight: maximum video height of exported video clip.
- maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
used to limit the amount of memory for prefetched YUV frames.
For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
frames) memory.
-->
<VideoEditorCap maxInputFrameWidth="1920"
maxInputFrameHeight="1080" maxOutputFrameWidth="1920"
maxOutputFrameHeight="1080" maxPrefetchYUVFrames="10"/>
<!--
The VideoEditor Export codec profile and level values
correspond to the values in OMX_Video.h.
E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
and level 4096 means OMX_VIDEO_AVCLevel41.
Please note that the values are in decimal.
These values are for video encoder.
-->
<!--
Codec = h.264, Baseline profile, level 4
-->
<ExportVideoProfile name="h264" profile= "1" level="2048"/>
</MediaSettings>

View file

@ -1,2 +0,0 @@
PRIO=0,0,0,0,1,1,1,1
IGNORED_IRQ=20,39

View file

@ -1,319 +0,0 @@
/* IPC Security Config */
/* <GPS QMI Service ID - 16>:<GPS QMI Instance ID - all instances>:<Client Group ID> */
16:4294967295:1000:1021
/* <LOWI QMI Service ID - 38>:<LOWI QMI Instance ID - all instances>:<Client Group ID> */
56:4294967295:1021
/* Allow SS CTL service to be used by system and net_raw processes */
43:4294967295:1000:3004
/* <UIMHTTP QMI Service ID - 16>:<UIMHTTP QMI Instance ID - all instances>:<Client Group ID> */
71:4294967295:1001
/* <UIMRMT QMI Service ID - 16>:<UIMRMT QMI Instance ID - all instances>:<Client Group ID> */
50:4294967295:1001
/* QMI-SLIM service permitted to gps and net_raw */
55:4294967295:1021
/* Allow Sensor services to be used by sensor process */
256:4294967295:1000:1006:1013:1021:1047:3011
257:4294967295:1000:1006:1013:1021:1047:3011
258:4294967295:1000:1006:1013:1021:1047:3011
259:4294967295:1000:1006:1013:1021:1047:3011
260:4294967295:1000:1006:1013:1021:1047:3011
261:4294967295:1000:1006:1013:1021:1047:3011
262:4294967295:1000:1006:1013:1021:1047:3011
263:4294967295:1000:1006:1013:1021:1047:3011
264:4294967295:1000:1006:1013:1021:1047:3011
265:4294967295:1000:1006:1013:1021:1047:3011
266:4294967295:1000:1006:1013:1021:1047:3011
267:4294967295:1000:1006:1013:1021:1047:3011
268:4294967295:1000:1006:1013:1021:1047:3011
269:4294967295:1000:1006:1013:1021:1047:3011
270:4294967295:1000:1006:1013:1021:1047:3011
271:4294967295:1000:1006:1013:1021:1047:3011
272:4294967295:1000:1006:1013:1021:1047:3011
273:4294967295:1000:1006:1013:1021:1047:3011
274:4294967295:1000:1006:1013:1021:1047:3011
275:4294967295:1000:1006:1013:1021:1047:3011
276:4294967295:1000:1006:1013:1021:1047:3011
277:4294967295:1000:1006:1013:1021:1047:3011
278:4294967295:1000:1006:1013:1021:1047:3011
279:4294967295:1000:1006:1013:1021:1047:3011
280:4294967295:1000:1006:1013:1021:1047:3011
281:4294967295:1000:1006:1013:1021:1047:3011
282:4294967295:1000:1006:1013:1021:1047:3011
283:4294967295:1000:1006:1013:1021:1047:3011
284:4294967295:1000:1006:1013:1021:1047:3011
285:4294967295:1000:1006:1013:1021:1047:3011
286:4294967295:1000:1006:1013:1021:1047:3011
287:4294967295:1000:1006:1013:1021:1047:3011
288:4294967295:1000:1006:1013:1021:1047:3011
289:4294967295:1000:1006:1013:1021:1047:3011
290:4294967295:1000:1006:1013:1021:1047:3011
291:4294967295:1000:1006:1013:1021:1047:3011
292:4294967295:1000:1006:1013:1021:1047:3011
293:4294967295:1000:1006:1013:1021:1047:3011
294:4294967295:1000:1006:1013:1021:1047:3011
295:4294967295:1000:1006:1013:1021:1047:3011
296:4294967295:1000:1006:1013:1021:1047:3011
297:4294967295:1000:1006:1013:1021:1047:3011
298:4294967295:1000:1006:1013:1021:1047:3011
299:4294967295:1000:1006:1013:1021:1047:3011
300:4294967295:1000:1006:1013:1021:1047:3011
301:4294967295:1000:1006:1013:1021:1047:3011
302:4294967295:1000:1006:1013:1021:1047:3011
303:4294967295:1000:1006:1013:1021:1047:3011
304:4294967295:1000:1006:1013:1021:1047:3011
305:4294967295:1000:1006:1013:1021:1047:3011
306:4294967295:1000:1006:1013:1021:1047:3011
307:4294967295:1000:1006:1013:1021:1047:3011
308:4294967295:1000:1006:1013:1021:1047:3011
309:4294967295:1000:1006:1013:1021:1047:3011
310:4294967295:1000:1006:1013:1021:1047:3011
311:4294967295:1000:1006:1013:1021:1047:3011
312:4294967295:1000:1006:1013:1021:1047:3011
313:4294967295:1000:1006:1013:1021:1047:3011
314:4294967295:1000:1006:1013:1021:1047:3011
315:4294967295:1000:1006:1013:1021:1047:3011
316:4294967295:1000:1006:1013:1021:1047:3011
317:4294967295:1000:1006:1013:1021:1047:3011
318:4294967295:1000:1006:1013:1021:1047:3011
319:4294967295:1000:1006:1013:1021:1047:3011
320:4294967295:1000:1006:1013:1021:1047:3011
321:4294967295:1000:1006:1013:1021:1047:3011
322:4294967295:1000:1006:1013:1021:1047:3011
323:4294967295:1000:1006:1013:1021:1047:3011
324:4294967295:1000:1006:1013:1021:1047:3011
325:4294967295:1000:1006:1013:1021:1047:3011
326:4294967295:1000:1006:1013:1021:1047:3011
327:4294967295:1000:1006:1013:1021:1047:3011
328:4294967295:1000:1006:1013:1021:1047:3011
329:4294967295:1000:1006:1013:1021:1047:3011
330:4294967295:1000:1006:1013:1021:1047:3011
331:4294967295:1000:1006:1013:1021:1047:3011
332:4294967295:1000:1006:1013:1021:1047:3011
333:4294967295:1000:1006:1013:1021:1047:3011
334:4294967295:1000:1006:1013:1021:1047:3011
335:4294967295:1000:1006:1013:1021:1047:3011
336:4294967295:1000:1006:1013:1021:1047:3011
337:4294967295:1000:1006:1013:1021:1047:3011
338:4294967295:1000:1006:1013:1021:1047:3011
339:4294967295:1000:1006:1013:1021:1047:3011
340:4294967295:1000:1006:1013:1021:1047:3011
341:4294967295:1000:1006:1013:1021:1047:3011
342:4294967295:1000:1006:1013:1021:1047:3011
343:4294967295:1000:1006:1013:1021:1047:3011
344:4294967295:1000:1006:1013:1021:1047:3011
345:4294967295:1000:1006:1013:1021:1047:3011
346:4294967295:1000:1006:1013:1021:1047:3011
347:4294967295:1000:1006:1013:1021:1047:3011
348:4294967295:1000:1006:1013:1021:1047:3011
349:4294967295:1000:1006:1013:1021:1047:3011
350:4294967295:1000:1006:1013:1021:1047:3011
351:4294967295:1000:1006:1013:1021:1047:3011
352:4294967295:1000:1006:1013:1021:1047:3011
353:4294967295:1000:1006:1013:1021:1047:3011
354:4294967295:1000:1006:1013:1021:1047:3011
355:4294967295:1000:1006:1013:1021:1047:3011
356:4294967295:1000:1006:1013:1021:1047:3011
357:4294967295:1000:1006:1013:1021:1047:3011
358:4294967295:1000:1006:1013:1021:1047:3011
359:4294967295:1000:1006:1013:1021:1047:3011
360:4294967295:1000:1006:1013:1021:1047:3011
361:4294967295:1000:1006:1013:1021:1047:3011
362:4294967295:1000:1006:1013:1021:1047:3011
363:4294967295:1000:1006:1013:1021:1047:3011
364:4294967295:1000:1006:1013:1021:1047:3011
365:4294967295:1000:1006:1013:1021:1047:3011
366:4294967295:1000:1006:1013:1021:1047:3011
367:4294967295:1000:1006:1013:1021:1047:3011
368:4294967295:1000:1006:1013:1021:1047:3011
369:4294967295:1000:1006:1013:1021:1047:3011
370:4294967295:1000:1006:1013:1021:1047:3011
371:4294967295:1000:1006:1013:1021:1047:3011
372:4294967295:1000:1006:1013:1021:1047:3011
373:4294967295:1000:1006:1013:1021:1047:3011
374:4294967295:1000:1006:1013:1021:1047:3011
375:4294967295:1000:1006:1013:1021:1047:3011
376:4294967295:1000:1006:1013:1021:1047:3011
377:4294967295:1000:1006:1013:1021:1047:3011
378:4294967295:1000:1006:1013:1021:1047:3011
379:4294967295:1000:1006:1013:1021:1047:3011
380:4294967295:1000:1006:1013:1021:1047:3011
381:4294967295:1000:1006:1013:1021:1047:3011
382:4294967295:1000:1006:1013:1021:1047:3011
383:4294967295:1000:1006:1013:1021:1047:3011
384:4294967295:1000:1006:1013:1021:1047:3011
385:4294967295:1000:1006:1013:1021:1047:3011
386:4294967295:1000:1006:1013:1021:1047:3011
387:4294967295:1000:1006:1013:1021:1047:3011
388:4294967295:1000:1006:1013:1021:1047:3011
389:4294967295:1000:1006:1013:1021:1047:3011
390:4294967295:1000:1006:1013:1021:1047:3011
391:4294967295:1000:1006:1013:1021:1047:3011
392:4294967295:1000:1006:1013:1021:1047:3011
393:4294967295:1000:1006:1013:1021:1047:3011
394:4294967295:1000:1006:1013:1021:1047:3011
395:4294967295:1000:1006:1013:1021:1047:3011
396:4294967295:1000:1006:1013:1021:1047:3011
397:4294967295:1000:1006:1013:1021:1047:3011
398:4294967295:1000:1006:1013:1021:1047:3011
399:4294967295:1000:1006:1013:1021:1047:3011
400:4294967295:1000:1006:1013:1021:1047:3011
401:4294967295:1000:1006:1013:1021:1047:3011
402:4294967295:1000:1006:1013:1021:1047:3011
403:4294967295:1000:1006:1013:1021:1047:3011
404:4294967295:1000:1006:1013:1021:1047:3011
405:4294967295:1000:1006:1013:1021:1047:3011
406:4294967295:1000:1006:1013:1021:1047:3011
407:4294967295:1000:1006:1013:1021:1047:3011
408:4294967295:1000:1006:1013:1021:1047:3011
409:4294967295:1000:1006:1013:1021:1047:3011
410:4294967295:1000:1006:1013:1021:1047:3011
411:4294967295:1000:1006:1013:1021:1047:3011
412:4294967295:1000:1006:1013:1021:1047:3011
413:4294967295:1000:1006:1013:1021:1047:3011
414:4294967295:1000:1006:1013:1021:1047:3011
415:4294967295:1000:1006:1013:1021:1047:3011
416:4294967295:1000:1006:1013:1021:1047:3011
417:4294967295:1000:1006:1013:1021:1047:3011
418:4294967295:1000:1006:1013:1021:1047:3011
419:4294967295:1000:1006:1013:1021:1047:3011
420:4294967295:1000:1006:1013:1021:1047:3011
421:4294967295:1000:1006:1013:1021:1047:3011
422:4294967295:1000:1006:1013:1021:1047:3011
423:4294967295:1000:1006:1013:1021:1047:3011
424:4294967295:1000:1006:1013:1021:1047:3011
425:4294967295:1000:1006:1013:1021:1047:3011
426:4294967295:1000:1006:1013:1021:1047:3011
427:4294967295:1000:1006:1013:1021:1047:3011
428:4294967295:1000:1006:1013:1021:1047:3011
429:4294967295:1000:1006:1013:1021:1047:3011
430:4294967295:1000:1006:1013:1021:1047:3011
431:4294967295:1000:1006:1013:1021:1047:3011
432:4294967295:1000:1006:1013:1021:1047:3011
433:4294967295:1000:1006:1013:1021:1047:3011
434:4294967295:1000:1006:1013:1021:1047:3011
435:4294967295:1000:1006:1013:1021:1047:3011
436:4294967295:1000:1006:1013:1021:1047:3011
437:4294967295:1000:1006:1013:1021:1047:3011
438:4294967295:1000:1006:1013:1021:1047:3011
439:4294967295:1000:1006:1013:1021:1047:3011
440:4294967295:1000:1006:1013:1021:1047:3011
441:4294967295:1000:1006:1013:1021:1047:3011
442:4294967295:1000:1006:1013:1021:1047:3011
443:4294967295:1000:1006:1013:1021:1047:3011
444:4294967295:1000:1006:1013:1021:1047:3011
445:4294967295:1000:1006:1013:1021:1047:3011
446:4294967295:1000:1006:1013:1021:1047:3011
447:4294967295:1000:1006:1013:1021:1047:3011
448:4294967295:1000:1006:1013:1021:1047:3011
449:4294967295:1000:1006:1013:1021:1047:3011
450:4294967295:1000:1006:1013:1021:1047:3011
451:4294967295:1000:1006:1013:1021:1047:3011
452:4294967295:1000:1006:1013:1021:1047:3011
453:4294967295:1000:1006:1013:1021:1047:3011
454:4294967295:1000:1006:1013:1021:1047:3011
455:4294967295:1000:1006:1013:1021:1047:3011
456:4294967295:1000:1006:1013:1021:1047:3011
457:4294967295:1000:1006:1013:1021:1047:3011
458:4294967295:1000:1006:1013:1021:1047:3011
459:4294967295:1000:1006:1013:1021:1047:3011
460:4294967295:1000:1006:1013:1021:1047:3011
461:4294967295:1000:1006:1013:1021:1047:3011
462:4294967295:1000:1006:1013:1021:1047:3011
463:4294967295:1000:1006:1013:1021:1047:3011
464:4294967295:1000:1006:1013:1021:1047:3011
465:4294967295:1000:1006:1013:1021:1047:3011
466:4294967295:1000:1006:1013:1021:1047:3011
467:4294967295:1000:1006:1013:1021:1047:3011
468:4294967295:1000:1006:1013:1021:1047:3011
469:4294967295:1000:1006:1013:1021:1047:3011
470:4294967295:1000:1006:1013:1021:1047:3011
471:4294967295:1000:1006:1013:1021:1047:3011
472:4294967295:1000:1006:1013:1021:1047:3011
473:4294967295:1000:1006:1013:1021:1047:3011
474:4294967295:1000:1006:1013:1021:1047:3011
475:4294967295:1000:1006:1013:1021:1047:3011
476:4294967295:1000:1006:1013:1021:1047:3011
477:4294967295:1000:1006:1013:1021:1047:3011
478:4294967295:1000:1006:1013:1021:1047:3011
479:4294967295:1000:1006:1013:1021:1047:3011
480:4294967295:1000:1006:1013:1021:1047:3011
481:4294967295:1000:1006:1013:1021:1047:3011
482:4294967295:1000:1006:1013:1021:1047:3011
483:4294967295:1000:1006:1013:1021:1047:3011
484:4294967295:1000:1006:1013:1021:1047:3011
485:4294967295:1000:1006:1013:1021:1047:3011
486:4294967295:1000:1006:1013:1021:1047:3011
487:4294967295:1000:1006:1013:1021:1047:3011
488:4294967295:1000:1006:1013:1021:1047:3011
489:4294967295:1000:1006:1013:1021:1047:3011
490:4294967295:1000:1006:1013:1021:1047:3011
491:4294967295:1000:1006:1013:1021:1047:3011
492:4294967295:1000:1006:1013:1021:1047:3011
493:4294967295:1000:1006:1013:1021:1047:3011
494:4294967295:1000:1006:1013:1021:1047:3011
495:4294967295:1000:1006:1013:1021:1047:3011
496:4294967295:1000:1006:1013:1021:1047:3011
497:4294967295:1000:1006:1013:1021:1047:3011
498:4294967295:1000:1006:1013:1021:1047:3011
499:4294967295:1000:1006:1013:1021:1047:3011
500:4294967295:1000:1006:1013:1021:1047:3011
501:4294967295:1000:1006:1013:1021:1047:3011
502:4294967295:1000:1006:1013:1021:1047:3011
503:4294967295:1000:1006:1013:1021:1047:3011
504:4294967295:1000:1006:1013:1021:1047:3011
505:4294967295:1000:1006:1013:1021:1047:3011
506:4294967295:1000:1006:1013:1021:1047:3011
507:4294967295:1000:1006:1013:1021:1047:3011
508:4294967295:1000:1006:1013:1021:1047:3011
509:4294967295:1000:1006:1013:1021:1047:3011
510:4294967295:1000:1006:1013:1021:1047:3011
511:4294967295:1000:1006:1013:1021:1047:3011
/* Allow RCS service to aquire net_raw permission */
18:4294967295:1001:3004
/* Allow QMID service to aquire net_raw permission */
3:4294967295:1001:3004
2:4294967295:1000:1001:3004
42:4294967295:1001:3004
18:4294967295:1001:3004
9:4294967295:1001:3004
1:4294967295:1001:3004:1000
4:4294967295:1001:3004
7:4294967295:1001:3004
8:4294967295:1001:3004:1000
68:4294967295:1001:3004
/* DPM */
47:4294967295:1001:3004
/* Allow communication to some QMI services with radio privilages */
/* Format is <Service id>:<all instances>:<radio> */
/* PBM */
12:4294967295:1001
/* WMS */
5:4294967295:1001
/* IMS VT */
32:4294967295:1001
/* IMSP */
31:4294967295:1001
/* PDC */
36:4294967295:1001
/* SAR */
17:4294967295:1001
/* RFRPE */
41:4294967295:1001
/*UIM*/
11:4294967295:1001
/*CAT*/
10:4294967295:1001
/*IMSA*/
33:4294967295:1001
/* CSVT */
29:4294967295:1001
/*LTE*/
70:4294967295:1001
/* Allow Data dpmd to access QMI DFS */
48:4294967295:1000:3004
/* DIAG */
4097:4294967295:2002:2950:3009
/* <WLFW QMI Service ID - 0x45>:<WLFW QMI Instance ID - all instances>:<Client Group ID> */
69:4294967295:1000
/* <WLPS QMI Service ID - 0x39>:<WLFW QMI Instance ID - all instances>:<Client Group ID> */
57:4294967295:1000

View file

@ -1 +0,0 @@
sensors.ssc.so

View file

@ -1,351 +0,0 @@
#
# File: sensor_def_qcomdev.conf
#
# Tihs file contains default sensor registry values for Qualcomm development
# test platforms.
#
# Copyright (c) 2013-2016 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
# File format:
#
# Lines starting with "#" are comments and ignored.
#
# File metadata uses this format:
# :key value1 value2
#
# The following keys are defined:
# - "version" : value1 is non-zero positive version number of the file. This
# number will be stored in the sensors registry. It should be equal to the
# largest version of any item. It will be saved in the sensors registry for
# later use when initializing values. See the item format below.
# This value should only be specified once in the file.
#
# - "hardware" : The value1 will be compared to the "Hardware" string from
# the property of ro.board.platform.
# Items will only be used as default values in the registry if the hardware
# string value is a substring of the ro.board.platform string.
# This metadata key can be used more than once, so that one file can support
# more than one type of hardware.
# The value may be NULL, indicating common item values for all hardware.
# Common conf entries for multiple hardware can be mentioned as below.
# configuration below this string is common for 8952,8956 and 8974
# :hardware 8952 8956 8974
# hardware list gets overwritten with the new one every time when "hardware"
# tag appears while parsing conf file.
#
# - "platform" : Similar to the "hardware" key, but this string will need to
# match the text of either /sys/devices/soc0/hw_platform or
# /sys/devices/soc0/platform_subtype.
# Common conf entries for multiple platform can be mentioned as below.
# configuration below this string is common for MTP and QRD
# :platfrom MTP QRD
# platform list gets overwritten with the new one every time when "platfrom"
# tag appears while parsing conf file.
#
#
# - "soc_id" : Similar to the "hardware" key, but this string will need to
# match the text of /sys/devices/soc0/soc_id.
# Common conf entries for multiple soc_id can be mentioned as below.
# configuration below this string is common for soc_id 264 and 278
# :soc_id 264 278
# soc_id list gets overwritten with the new one every time when "soc_id"
# tag appears while parsing conf file.
#
# - "subtype" : Similar to the "hardware" key, but this string will need to
# match the text of /sys/devices/soc0/platform_subtype.
# Common conf entries for multiple subtype can be mentioned as below.
# configuration below this string is common for subtype X and Y
# :subtype X Y
# subtype list gets overwritten with the new one every time when "subtype"
# tag appears while parsing conf file.
#
# - "sub_id" : Similar to the "hardware" key, but this string will need to
# match the text of /sys/devices/soc0/platform_subtype_id.
# Common conf entries for multiple sub_id can be mentioned as below.
# configuration below this string is common for sub_id
# :sub_id 0 10
# sub_id list gets overwritten with the new one every time when "sub_id"
# tag appears while parsing conf file.
#
# - "soc_rev" : Similar to the "hardware" key, but this string will need to
# match the text of /sys/devices/soc0/revision.
# Common conf entries for multiple soc_rev can be mentioned as below.
# configuration below this string is common for soc_rev 1.0,2.0 and 3.0
# :soc_rev 1.0 2.0 3.0
# soc_rev list gets overwritten with the new one every time when "soc_rev"
# tag appears while parsing conf file.
#
# - "plat_ver" : Similar to the "hardware" key, but this string will need to
# match the text of /sys/devices/soc0/platform_version.
# Common conf entries for multiple plat_ver can be mentioned as below.
# configuration below this string is common for plat_ver 131072 and 1179648
# :plat_ver 131072 1179648
# plat_ver list gets overwritten with the new one every time when "plat_ver"
# tag appears while parsing conf file.
#
# - "property" : value1 is the Android system property key, and value2 is
# the desired property value. If the system property value matches the
# desired property value, then the following items will be applied.
# This metadata key can be used more than once, in which case the new
# property value overrides the old.
# value1 and 2 may be NULL, indicating common item values for all properties.
#
# Registry items are in lines with the following format:
# <itemID> <value> <version>
# Where:
# itemID is the numeric item ID defined in sns_reg_api_v02.h
#
# "value" is the numeric value of the item.
#
# "version" is a non-zero version of the item value.
# The version field will be compared against the previous saved
# value in the sensors registry. If this value is greater than the
# saved value, the default will be applied. Otherwise, the default
# will be skipped.
#
# Registry item values will only be applied if the hardware, platform, and
# property values match for the current hardware configuration.
#
# The numeric fields are parsed with the strtoull function, base 0.
#
:version 0x00010003
#######################################################################
### MSM8940, MSM8937 and MSM8917 Chipsets
#######################################################################
# MSM8940, MSM8937 and MSM8917 share the same property(ro.board.platfrom) as 8937.
# In this configuration, MSM8940, MSM8937 and MSM8917 share same sensor
# configuration because sensors are same in reference design.
# The identification of MSM8940, MSM8937 and MSM8917 can be done by soc_id
# which is unique.
# <target> - <soc_id>:
# MSM8940 - 313
# MSM8937 - 294 APQ8037 - 295
# MSM8917 - 303 APQ8017 - 307 MSM8217 - 308 MSM8617 - 309
# MSM8920 - 320
:hardware 8937
:platform
:property
:soc_id
# Orientation of sensors
# accel x/y/z
700 -1 0x00010003 #accel-x-axis
701 -2 0x00010003 #accel-y-axis
702 3 0x00010003 #accel-z-axis
# gyro x/y/z
800 -1 0x00010003 #gyro-x-axis
801 -2 0x00010003 #gyro-y-axis
802 3 0x00010003 #gyro-z-axis
# mag x/y/z
900 1 0x00010003 #mag-x-axis
901 -2 0x00010003 #mag-y-axis
902 -3 0x00010003 #mag-z-axis
# SSI SMGR Version
1900 1 0x00010003 #Maj Ver
1901 2 0x00010003 #Min Ver
2000 1 0x00010003 # set to 1 to enable
2001 2 0x00010003 # number of accel sensors
2100 1 0x00010003 # set to 1 to enable
2101 2 0x00010003 # number of gyro sensors
2200 1 0x00010003 # set to 1 to enable
2201 2 0x00010003 # number of mag sensors
2300 1 0x00010003 # set to 1 to enable
2301 3 0x00010003 # number of plsensors
# SAM config
#
203 65536 0x00010003 # AMD
225 983040 0x00010003 # RMD
504 65536 0x00010003 # Gyro Cal
1703 65536 0x00010003 # Ped
2800 983040 0x00010003 # basic ges
2900 983040 0x00010003 # Facing
3400 65536 0x00010003 # CMC
609 983040 0x00010003 # FMV
1005 983040 0x00010003 # Grav
1103 983040 0x00010003 # orientation
3000 983040 0x00010003 # gyro quat
3100 983040 0x00010003 # rot vec
3500 983040 0x00010003 # game rv
4112 65536 0x00010003 # SMD
4103 5 0x00010001 # SMD_ACC_WIN_TIME
# SSI SMGR Cfg 0 BMI160 ACCEL
2003 0x0f4d0fd654c7eab5 0x00010003 #UUID
2002 0xd646cb83ec0cd5a5 0x00010003 #UUID
2004 30000 0x00010003 #off_to_idle
2005 5000 0x00010003 #idle_to_ready
2006 42 0x00010003 #gpio1
2007 1000 0x00010003 #reg_group_id
2008 0 0x00010003 #cal_grp_id
2009 4 0x00010003 #i2c_bus
2010 0x68 0x00010003 #i2c_address
2011 1 0x00010003 #sens_default
2012 0xD0 0x00010003 #flags
2068 0xff 0x00010003 #vdd
2069 0xff 0x00010003 #vddio
# SSI SMGR Cfg 1: ICM20607 Accel FIFO
2014 0x8e13a32aa65f6521 0x00010003 #UUID
2013 0xa3524f726703c251 0x00010003 #UUID
2015 30000 0x00010003 #off_to_idle
2016 5000 0x00010003 #idle_to_ready
2017 42 0x00010003 #gpio1
2018 1000 0x00010003 #reg_group_id
2019 0 0x00010003 #cal_grp_id
2020 4 0x00010003 #i2c_bus
2021 0x68 0x00010003 #i2c_address
2022 1 0x00010003 #sens_default
2023 0x80 0x00010003 #flags
2070 0xff 0x00010003 #vdd
2071 0xff 0x00010003 #vddio
# SSI SMGR Cfg 0 BMI160 GYRO
2103 0x0f4d0fd654c7eab5 0x00010003 #UUID
2102 0xd646cb83ec0cd5a5 0x00010003 #UUID
2104 30000 0x00010003 #off_to_idle
2105 5000 0x00010003 #idle_to_ready
2106 42 0x00010003 #gpio1
2107 1010 0x00010003 #reg_group_id
2108 10 0x00010003 #cal_grp_id
2109 4 0x00010003 #i2c_bus
2110 0x68 0x00010003 #i2c_address
2111 4 0x00010003 #sens_default
2112 0xD0 0x00010003 #flags
2168 0xff 0x00010003 #vdd
2169 0xff 0x00010003 #vddio
# SSI SMGR Cfg 1: ICM20607 Gyro FIFO
2114 0x8e13a32aa65f6521 0x00010003 #UUID
2113 0xa3524f726703c251 0x00010003 #UUID
2115 30000 0x00010003 #off_to_idle
2116 5000 0x00010003 #idle_to_ready
2117 42 0x00010003 #gpio1
2118 1010 0x00010003 #reg_group_id
2119 10 0x00010003 #cal_grp_id
2120 4 0x00010003 #i2c_bus
2121 0x68 0x00010003 #i2c_address
2122 3 0x00010003 #sens_default
2123 0x80 0x00010003 #flags
2170 0xff 0x00010003 #vdd
2171 0xff 0x00010003 #vddio
# SSI SMGR Cfg 1 ST480
2203 0x2e94aafbde68bd9d 0x00010003 #UUID
2202 0xc04992988b1365e3 0x00010003 #UUID
2204 1500 0x00010003 #off_to_idle
2205 10000 0x00010003 #idle_to_ready
2206 0xFFFF 0x00010003 #gpio1
2207 1020 0x00010003 #reg_group_id
2208 0xFFFF 0x00010003 #cal_grp_id
2209 4 0x00010003 #i2c_bus
2210 0x0C 0x00010003 #i2c_address
2211 1 0x00010003 #sens_default
2212 0x00 0x00010003 #flags
2268 0xff 0x00010003 #vdd
2269 0xff 0x00010003 #vddio
# SSI SMGR Cfg 0 YAS530
2214 0x1dc79ad346a827b3 0x00010003 #UUID
2213 0xbd403129b15b7905 0x00010003 #UUID
2215 5 0x00010003 #off_to_idle
2216 10 0x00010003 #idle_to_ready
2217 0xFFFF 0x00010003 #gpio1
2218 1020 0x00010003 #reg_group_id
2219 0xFFFF 0x00010003 #cal_grp_id
2220 4 0x00010003 #i2c_bus
2221 0x2E 0x00010003 #i2c_address
2222 1 0x00010003 #sens_default
2223 0x00 0x00010003 #flags
2270 0xff 0x00010003 #vdd
2271 0xff 0x00010003 #vddio
# SSI SMGR Cfg 1 ltr559
2303 0x2f1531647b9aa8b3 0x00010003 #UUID should same to ADSP
2302 0x194a7a549019f36d 0x00010003 #UUID
2304 5700 0x00010003 #off_to_idle
2305 10000 0x00010003 #idle_to_ready
2306 0xFFFF 0x00010003 #gpio1
2307 1040 0x00010003 #reg_group_id
2308 0xFFFF 0x00010003 #cal_grp_id
2309 4 0x00010003 #i2c_bus
2310 0x23 0x00010003 #i2c_address
2311 0 0x00010003 #sens_default
2312 0x00 0x00010003 #flags
2368 0xff 0x00010003 #vdd
2369 0xff 0x00010003 #vddio
# SSI SMGR Cfg 0 STK3x1x
2314 0x8b11a21aa55e6586 0x00010003 #UUID should same to ADSP
2313 0xa4524f726702e351 0x00010003 #UUID
2315 5700 0x00010003 #off_to_idle
2316 0 0x00010003 #idle_to_ready
2317 43 0x00010003 #gpio1
2318 1040 0x00010003 #reg_group_id
2319 0xFFFF 0x00010003 #cal_grp_id
2320 4 0x00010003 #i2c_bus
2321 0x48 0x00010003 #i2c_address
2322 0 0x00010003 #sens_default
2323 0x00 0x00010003 #flags
2370 0xff 0x00010003 #vdd
2371 0xff 0x00010003 #vddio
# SSI SMGR Cfg 2 ltr578
2325 0x8f11a32aa65f6586 0x00010003 #UUID should same to ADSP
2324 0xa4524f726703e252 0x00010003 #UUID
2326 5700 0x00010003 #off_to_idle
2327 10000 0x00010003 #idle_to_ready
2328 0xFFFF 0x00010003 #gpio1
2329 1040 0x00010003 #reg_group_id
2330 0xFFFF 0x00010003 #cal_grp_id
2331 4 0x00010003 #i2c_bus
2332 0x53 0x00010003 #i2c_address
2333 0 0x00010003 #sens_default
2334 0x00 0x00010003 #flags
2372 0xff 0x00010003 #vdd
2373 0xff 0x00010003 #vddio
# SSI SMGR Version
3600 1 0x00010001 #Maj Ver
3601 2 0x00010001 #Min Ver
# QMAG_CAL Configuration
3801 1 0x00010001
3804 0x000A0000 0x00010001 #Sample Rate
#
# SSI GPIO configuration
#-----------------------------
2700 1 0x00010001 #maj ver
2701 1 0x00010001 #min ver
2702 14 0x00010001 #I2C SDA_1
2703 15 0x00010001 #I2C SCL_1
2704 0xFFFF 0x00010001 #I2C SDA_2
2705 0xFFFF 0x00010001 #I2C SCL_2
2706 59 0x00010001 #RESET pin
2709 42 0x00010001 #ACCEL DRI
2710 45 0x00010001 #GYRO DRI
2711 44 0x00010001 #MAG DRI
2712 43 0x00010001 #ALS/PRX INT
2714 46 0x00010001 #PRESS INT
# AMD Cfg
200 0x000A0000 0x00010001 #AMD Default Sample rate
201 0x00000CDC 0x00010001 #AMD INT Cfg param1
202 0x00008000 0x00010001 #AMD INT Cfg param2
# RMD Cfg
220 0x001E0000 0x00010001 #RMD Default Sample rate
221 0X0001B333 0x00010001 #RMD INT Cfg param1
222 0x00003333 0x00010001 #RMD INT Cfg param2
223 0x00001657 0x00010001 #RMD INT Cfg param3
224 0x00003333 0x00010001 #RMD INT Cfg param4

View file

@ -1,230 +0,0 @@
# SENSOR : ALIAS
# tsens_tz_sensor2 : pop_mem
# tsens_tz_sensor10 : gpu
# tsens_tz_sensor9 : cpu4-cpu5-cpu6-cpu7
# tsens_tz_sensor8 : cpu3
# tsens_tz_sensor7 : cpu2
# tsens_tz_sensor6 : cpu1
# tsens_tz_sensor5 : cpu0
# tsens_tz_sensor4 : L2_cache_1
#Conf file: /system/etc/thermal-engine.conf
[CAMERA_CAMCORDER_MONITOR]
algo_type monitor
sampling 1000
sensor case_therm
thresholds 43000 45000
thresholds_clr 42000 43000
actions camera+camcorder camera+camcorder
action_info 1+1 2+2
[BATTERY_CHARGING_CTL]
algo_type monitor
sampling 10000
sensor case_therm
thresholds 42000 44000 46000
thresholds_clr 39000 42000 44000
actions battery battery battery battery
action_info 1 2 3
[LCD_SKIN_MANAGEMENT]
algo_type monitor
sampling 5000
sensor case_therm
thresholds 56000 66000
thresholds_clr 52000 56000
actions lcd lcd
action_info 110 90
[CPU2_HOTPLUG_MONITOR]
algo_type monitor
sampling 1000
sensor case_therm
thresholds 43000
thresholds_clr 41000
actions hotplug_2
action_info 1
[CPU1_HOTPLUG_MONITOR]
algo_type monitor
sampling 1000
sensor case_therm
thresholds 46000
thresholds_clr 43000
actions hotplug_1
action_info 1
[CPU5_HOTPLUG_MONITOR]
algo_type monitor
sampling 1000
sensor case_therm
thresholds 50000
thresholds_clr 48000
actions hotplug_5
action_info 1
[SS-CASE-THERM-LOW]
algo_type ss
sampling 1000
sensor case_therm
device cluster0
set_point 46000
set_point_clr 44000
time_constant 3
device_max_limit 902400
[VIRTUAL-CPUS]
#algo_type virtual
trip_sensor tsens_tz_sensor5
set_point 75000
set_point_clr 65000
sensors tsens_tz_sensor5 tsens_tz_sensor6 tsens_tz_sensor7 tsens_tz_sensor8 tsens_tz_sensor9
weights
sampling 50
math 2
[SS-GPU]
#algo_type ss
sampling 250
sensor gpu
device gpu
set_point 95000
set_point_clr 65000
time_constant 0
[SS-POPMEM]
#algo_type ss
sampling 250
sensor pop_mem
device cpu_voltage
set_point 70000
set_point_clr 55000
time_constant 2
[SS-CPUS]
#algo_type ss
sampling 50
sensor VIRTUAL-CPUS
device cpu_voltage
set_point 85000
set_point_clr 55000
time_constant 0
[SPEAKER-CAL]
sampling 30000 30000 10 1800000
sensor pm8937_tz
sensors tsens_tz_sensor1 tsens_tz_sensor2 tsens_tz_sensor3 tsens_tz_sensor10
temp_range 6000 10000 2000
max_temp 45000
offset -4000
[VDD_RSTR_MONITOR-TSENS10]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor10
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS9]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor9
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS8]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor8
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS7]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor7
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS6]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor6
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS5]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor5
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS4]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor4
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS3]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor3
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS2]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor2
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS1]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor1
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending
[VDD_RSTR_MONITOR-TSENS0]
#algo_type monitor
sampling 1000
sensor tsens_tz_sensor0
thresholds 5000
thresholds_clr 10000
actions vdd_restriction
action_info 1
descending

View file

@ -1,5 +1,6 @@
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-18 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -16,13 +17,11 @@
DEVICE_PATH := device/xiaomi/land
# Overlay
DEVICE_PACKAGE_OVERLAYS += \
$(DEVICE_PATH)/overlay \
$(DEVICE_PATH)/overlay-lineage
# Inherit proprietary files
$(call inherit-product-if-exists, vendor/xiaomi/land/land-vendor.mk)
# Include device-specific product fragments
include $(DEVICE_PATH)/product/*.mk
# Inherit proprietary files
$(call inherit-product-if-exists, vendor/xiaomi/land/land-vendor.mk)
# Inherit from msm8937-common
$(call inherit-product, device/xiaomi/msm8937-common/msm8937.mk)

View file

@ -1,17 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := CMDoze
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
include $(BUILD_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))

View file

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="org.cyanogenmod.doze"
android:sharedUserId="android.uid.system">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<protected-broadcast android:name="com.android.systemui.doze.pulse" />
<application
android:label="@string/app_name">
<receiver android:name=".BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:name=".DozeService" />
</application>
</manifest>

View file

@ -1,3 +0,0 @@
-keep class org.cyanogenmod.doze.* {
*;
}

View file

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name" translatable="false">CMDoze</string>
</resources>

View file

@ -1,33 +0,0 @@
/**
* Copyright (c) 2015-2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cyanogenmod.doze;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class BootCompletedReceiver extends BroadcastReceiver {
private static final boolean DEBUG = false;
private static final String TAG = BootCompletedReceiver.class.getSimpleName();
@Override
public void onReceive(final Context context, Intent intent) {
if (DEBUG) Log.d(TAG, "Starting service");
context.startService(new Intent(context, DozeService.class));
}
}

View file

@ -1,77 +0,0 @@
/**
* Copyright (c) 2015-2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cyanogenmod.doze;
import android.content.Context;
import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.UserHandle;
import android.util.Log;
public abstract class CMSensor {
private static final boolean DEBUG = false;
private static final String TAG = CMSensor.class.getSimpleName();
private static final String DOZE_INTENT = "com.android.systemui.doze.pulse";
private static final int BATCH_LATENCY_IN_MS = 100;
private Context mContext;
private SensorManager mSensorManager;
private Sensor mSensor;
private SensorEventListener mSensorEventListener = new SensorEventListener() {
@Override
public void onSensorChanged(SensorEvent event) {
onSensorEvent(event);
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// Do nothing
}
};
CMSensor(Context context, int type) {
mContext = context;
mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);
mSensor = mSensorManager.getDefaultSensor(type);
}
void launchDozePulse() {
Log.d(TAG, "Launch doze pulse");
mContext.sendBroadcastAsUser(new Intent(DOZE_INTENT),
new UserHandle(UserHandle.USER_CURRENT));
}
void enable() {
if (DEBUG) Log.d(TAG, "Enabling");
mSensorManager.registerListener(mSensorEventListener, mSensor,
SensorManager.SENSOR_DELAY_NORMAL, BATCH_LATENCY_IN_MS * 1000);
}
void disable() {
if (DEBUG) Log.d(TAG, "Disabling");
mSensorManager.unregisterListener(mSensorEventListener);
}
void onSensorEvent(SensorEvent event) {
if (DEBUG) Log.d(TAG, "Got sensor event: " + event.values[0]);
}
}

View file

@ -1,91 +0,0 @@
/**
* Copyright (c) 2015-2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cyanogenmod.doze;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;
import android.provider.Settings;
import android.util.Log;
public class DozeService extends Service {
private static final boolean DEBUG = false;
private static final String TAG = DozeService.class.getSimpleName();
private Context mContext;
private TiltSensor mTiltSensor;
private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
onDisplayOff();
} else if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
onDisplayOn();
}
}
};
@Override
public void onCreate() {
if (DEBUG) Log.d(TAG, "Creating service");
super.onCreate();
mContext = this;
mTiltSensor = new TiltSensor(mContext);
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (DEBUG) Log.d(TAG, "Starting service");
IntentFilter screenStateFilter = new IntentFilter(Intent.ACTION_SCREEN_ON);
screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF);
mContext.registerReceiver(mScreenStateReceiver, screenStateFilter);
return START_STICKY;
}
@Override
public void onDestroy() {
if (DEBUG) Log.d(TAG, "Destroying service");
super.onDestroy();
mTiltSensor.disable();
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
private boolean isDozeEnabled() {
return Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.DOZE_ENABLED, 1) != 0;
}
private void onDisplayOn() {
if (DEBUG) Log.d(TAG, "Display on");
mTiltSensor.disable();
}
private void onDisplayOff() {
if (DEBUG) Log.d(TAG, "Display off");
if (isDozeEnabled()) {
mTiltSensor.enable();
}
}
}

View file

@ -1,48 +0,0 @@
/**
* Copyright (c) 2015-2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cyanogenmod.doze;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.os.SystemClock;
import android.util.Log;
public class TiltSensor extends CMSensor {
private static final int MIN_PULSE_INTERVAL_MS = 2500;
private long mEntryTimestamp;
TiltSensor(Context context) {
super(context, Sensor.TYPE_TILT_DETECTOR);
}
@Override
void onSensorEvent(SensorEvent event) {
super.onSensorEvent(event);
if (SystemClock.elapsedRealtime() - mEntryTimestamp < MIN_PULSE_INTERVAL_MS) {
return;
}
mEntryTimestamp = SystemClock.elapsedRealtime();
if (event.values[0] == 1) {
launchDozePulse();
}
}
}

View file

@ -58,7 +58,6 @@ fi
# Initialize the helper
setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" false "$CLEAN_VENDOR"
extract "$MY_DIR"/proprietary-files-qc.txt "$SRC" "$SECTION"
extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION"
"$MY_DIR"/setup-makefiles.sh

View file

@ -1,21 +0,0 @@
#
# Copyright (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),land)
include $(call all-subdir-makefiles,$(LOCAL_PATH))
endif

View file

@ -1,50 +0,0 @@
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# If you don't need to do a full clean build but would like to touch
# a file or delete some intermediate files, add a clean step to the end
# of the list. These steps will only be run once, if they haven't been
# run before.
#
# E.g.:
# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
#
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
# files that are missing or have been moved.
#
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
# Use $(OUT_DIR) to refer to the "out" directory.
#
# If you need to re-do something that's already mentioned, just copy
# the command and add it to the bottom of the list. E.g., if a change
# that you made last week required touching a file and a change you
# made today requires touching the same file, just copy the old
# touch step and add it to the end of the list.
#
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
# For example:
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libloc_api*)

View file

@ -1,10 +0,0 @@
# Makefile.am - Automake script for gps loc_api
#
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = utils core loc_api
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = loc-hal.pc
EXTRA_DIST = $(pkgconfig_DATA)

View file

@ -1,97 +0,0 @@
# configure.ac -- Autoconf script for gps loc_hal
#
# Process this file with autoconf to produce a configure script
# Requires autoconf tool later than 2.61
AC_PREREQ(2.61)
# Initialize the gps loc-hal package version 1.0.0
AC_INIT([loc-hal],1.0.0)
# Does not strictly follow GNU Coding standards
AM_INIT_AUTOMAKE([foreign])
# Disables auto rebuilding of configure, Makefile.ins
AM_MAINTAINER_MODE
# Verifies the --srcdir is correct by checking for the path
AC_CONFIG_SRCDIR([utils/loc_cfg.cpp])
# defines some macros variable to be included by source
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_LIBTOOL
AC_PROG_CXX
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_AWK
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
PKG_PROG_PKG_CONFIG
# Checks for libraries.
PKG_CHECK_MODULES([QMI], [qmi])
AC_SUBST([QMI_CFLAGS])
AC_SUBST([QMI_LIBS])
PKG_CHECK_MODULES([QMIF], [qmi-framework])
AC_SUBST([QMIF_CFLAGS])
AC_SUBST([QMIF_LIBS])
PKG_CHECK_MODULES([DATA], [data])
AC_SUBST([DATA_CFLAGS])
AC_SUBST([DATA_LIBS])
PKG_CHECK_MODULES([LOCPLA], [loc-pla])
AC_SUBST([LOCPLA_CFLAGS])
AC_SUBST([LOCPLA_LIBS])
AC_ARG_WITH([libhardware_includes],
AC_HELP_STRING([--with-libhardware-includes=@<:@dir@:>@],
[Specify the location of the libhardware headers]),
[libhardware_incdir=$withval],
with_libhardware_includes=no)
if test "x$with_libhardware_includes" != "xno"; then
CPPFLAGS="${CPPFLAGS} -I${libhardware_incdir}"
fi
AC_ARG_WITH([core_includes],
AC_HELP_STRING([--with-core-includes=@<:@dir@:>@],
[Specify the location of the core headers]),
[core_incdir=$withval],
with_core_includes=no)
if test "x$with_core_includes" != "xno"; then
CPPFLAGS="${CPPFLAGS} -I${core_incdir}"
fi
AC_SUBST([CPPFLAGS])
AC_ARG_WITH([glib],
AC_HELP_STRING([--with-glib],
[enable glib, building HLOS systems which use glib]))
if (test "x${with_glib}" = "xyes"); then
AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
AC_MSG_ERROR(GThread >= 2.16 is required))
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
AC_MSG_ERROR(GLib >= 2.16 is required))
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
fi
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
AC_CONFIG_FILES([ \
Makefile \
utils/Makefile \
core/Makefile \
loc_api/Makefile \
loc-hal.pc \
])
AC_OUTPUT

View file

@ -1,58 +0,0 @@
ifneq ($(BUILD_TINY_ANDROID),true)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libloc_core
LOCAL_MODULE_OWNER := qcom
LOCAL_MODULE_TAGS := optional
ifeq ($(TARGET_DEVICE),apq8026_lw)
LOCAL_CFLAGS += -DPDK_FEATURE_SET
else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true)
LOCAL_CFLAGS += -DPDK_FEATURE_SET
endif
LOCAL_SHARED_LIBRARIES := \
libutils \
libcutils \
libgps.utils \
libdl \
libloc_pla
LOCAL_SRC_FILES += \
LocApiBase.cpp \
LocAdapterBase.cpp \
ContextBase.cpp \
LocDualContext.cpp \
loc_core_log.cpp
LOCAL_CFLAGS += \
-fno-short-enums \
-D_ANDROID_
LOCAL_C_INCLUDES:= \
$(TARGET_OUT_HEADERS)/gps.utils \
$(TARGET_OUT_HEADERS)/libflp \
$(TARGET_OUT_HEADERS)/libloc_pla
LOCAL_COPY_HEADERS_TO:= libloc_core/
LOCAL_COPY_HEADERS:= \
LocApiBase.h \
LocAdapterBase.h \
ContextBase.h \
LocDualContext.h \
LBSProxyBase.h \
UlpProxyBase.h \
gps_extended_c.h \
gps_extended.h \
loc_core_log.h \
LocAdapterProxyBase.h
LOCAL_PRELINK_MODULE := false
include $(BUILD_SHARED_LIBRARY)
endif # not BUILD_TINY_ANDROID

View file

@ -1,138 +0,0 @@
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#define LOG_NDDEBUG 0
#define LOG_TAG "LocSvc_CtxBase"
#include <dlfcn.h>
#include <cutils/sched_policy.h>
#include <unistd.h>
#include <ContextBase.h>
#include <msg_q.h>
#include <loc_target.h>
#include <platform_lib_includes.h>
#include <loc_log.h>
namespace loc_core {
loc_gps_cfg_s_type ContextBase::mGps_conf {0};
loc_sap_cfg_s_type ContextBase::mSap_conf {0};
uint32_t ContextBase::getCarrierCapabilities() {
#define carrierMSA (uint32_t)0x2
#define carrierMSB (uint32_t)0x1
#define gpsConfMSA (uint32_t)0x4
#define gpsConfMSB (uint32_t)0x2
uint32_t capabilities = mGps_conf.CAPABILITIES;
if ((mGps_conf.SUPL_MODE & carrierMSA) != carrierMSA) {
capabilities &= ~gpsConfMSA;
}
if ((mGps_conf.SUPL_MODE & carrierMSB) != carrierMSB) {
capabilities &= ~gpsConfMSB;
}
LOC_LOGV("getCarrierCapabilities: CAPABILITIES %x, SUPL_MODE %x, carrier capabilities %x",
mGps_conf.CAPABILITIES, mGps_conf.SUPL_MODE, capabilities);
return capabilities;
}
LBSProxyBase* ContextBase::getLBSProxy(const char* libName)
{
LBSProxyBase* proxy = NULL;
LOC_LOGD("%s:%d]: getLBSProxy libname: %s\n", __func__, __LINE__, libName);
void* lib = dlopen(libName, RTLD_NOW);
if ((void*)NULL != lib) {
getLBSProxy_t* getter = (getLBSProxy_t*)dlsym(lib, "getLBSProxy");
if (NULL != getter) {
proxy = (*getter)();
}
}
else
{
LOC_LOGW("%s:%d]: FAILED TO LOAD libname: %s\n", __func__, __LINE__, libName);
}
if (NULL == proxy) {
proxy = new LBSProxyBase();
}
LOC_LOGD("%s:%d]: Exiting\n", __func__, __LINE__);
return proxy;
}
LocApiBase* ContextBase::createLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask)
{
LocApiBase* locApi = NULL;
if (NULL == (locApi = mLBSProxy->getLocApi(mMsgTask, exMask, this))) {
void *handle = NULL;
//try to see if LocApiV02 is present
if ((handle = dlopen("libloc_api_v02.so", RTLD_NOW)) != NULL) {
LOC_LOGD("%s:%d]: libloc_api_v02.so is present", __func__, __LINE__);
getLocApi_t* getter = (getLocApi_t*) dlsym(handle, "getLocApi");
if (getter != NULL) {
LOC_LOGD("%s:%d]: getter is not NULL for LocApiV02", __func__,
__LINE__);
locApi = (*getter)(mMsgTask, exMask, this);
}
}
// only RPC is the option now
else {
LOC_LOGD("%s:%d]: libloc_api_v02.so is NOT present. Trying RPC",
__func__, __LINE__);
handle = dlopen("libloc_api-rpc-qc.so", RTLD_NOW);
if (NULL != handle) {
getLocApi_t* getter = (getLocApi_t*) dlsym(handle, "getLocApi");
if (NULL != getter) {
LOC_LOGD("%s:%d]: getter is not NULL in RPC", __func__,
__LINE__);
locApi = (*getter)(mMsgTask, exMask, this);
}
}
}
}
// locApi could still be NULL at this time
// we would then create a dummy one
if (NULL == locApi) {
locApi = new LocApiBase(mMsgTask, exMask, this);
}
return locApi;
}
ContextBase::ContextBase(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask,
const char* libName) :
mLBSProxy(getLBSProxy(libName)),
mMsgTask(msgTask),
mLocApi(createLocApi(exMask)),
mLocApiProxy(mLocApi->getLocApiProxy())
{
}
}

View file

@ -1,144 +0,0 @@
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef __LOC_CONTEXT_BASE__
#define __LOC_CONTEXT_BASE__
#include <stdbool.h>
#include <ctype.h>
#include <MsgTask.h>
#include <LocApiBase.h>
#include <LBSProxyBase.h>
#define MAX_XTRA_SERVER_URL_LENGTH 256
/* GPS.conf support */
/* NOTE: the implementaiton of the parser casts number
fields to 32 bit. To ensure all 'n' fields working,
they must all be 32 bit fields. */
typedef struct loc_gps_cfg_s
{
uint32_t INTERMEDIATE_POS;
uint32_t ACCURACY_THRES;
uint32_t SUPL_VER;
uint32_t SUPL_MODE;
uint32_t SUPL_ES;
uint32_t CAPABILITIES;
uint32_t LPP_PROFILE;
uint32_t XTRA_VERSION_CHECK;
char XTRA_SERVER_1[MAX_XTRA_SERVER_URL_LENGTH];
char XTRA_SERVER_2[MAX_XTRA_SERVER_URL_LENGTH];
char XTRA_SERVER_3[MAX_XTRA_SERVER_URL_LENGTH];
uint32_t USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL;
uint32_t NMEA_PROVIDER;
uint32_t GPS_LOCK;
uint32_t A_GLONASS_POS_PROTOCOL_SELECT;
uint32_t AGPS_CERT_WRITABLE_MASK;
uint32_t AGPS_CONFIG_INJECT;
uint32_t LPPE_CP_TECHNOLOGY;
uint32_t LPPE_UP_TECHNOLOGY;
uint32_t EXTERNAL_DR_ENABLED;
} loc_gps_cfg_s_type;
/* NOTE: the implementaiton of the parser casts number
fields to 32 bit. To ensure all 'n' fields working,
they must all be 32 bit fields. */
/* Meanwhile, *_valid fields are 8 bit fields, and 'f'
fields are double. Rigid as they are, it is the
the status quo, until the parsing mechanism is
change, that is. */
typedef struct
{
uint8_t GYRO_BIAS_RANDOM_WALK_VALID;
double GYRO_BIAS_RANDOM_WALK;
uint32_t SENSOR_ACCEL_BATCHES_PER_SEC;
uint32_t SENSOR_ACCEL_SAMPLES_PER_BATCH;
uint32_t SENSOR_GYRO_BATCHES_PER_SEC;
uint32_t SENSOR_GYRO_SAMPLES_PER_BATCH;
uint32_t SENSOR_ACCEL_BATCHES_PER_SEC_HIGH;
uint32_t SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH;
uint32_t SENSOR_GYRO_BATCHES_PER_SEC_HIGH;
uint32_t SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH;
uint32_t SENSOR_CONTROL_MODE;
uint32_t SENSOR_USAGE;
uint32_t SENSOR_ALGORITHM_CONFIG_MASK;
uint8_t ACCEL_RANDOM_WALK_SPECTRAL_DENSITY_VALID;
double ACCEL_RANDOM_WALK_SPECTRAL_DENSITY;
uint8_t ANGLE_RANDOM_WALK_SPECTRAL_DENSITY_VALID;
double ANGLE_RANDOM_WALK_SPECTRAL_DENSITY;
uint8_t RATE_RANDOM_WALK_SPECTRAL_DENSITY_VALID;
double RATE_RANDOM_WALK_SPECTRAL_DENSITY;
uint8_t VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY_VALID;
double VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY;
uint32_t SENSOR_PROVIDER;
} loc_sap_cfg_s_type;
namespace loc_core {
class LocAdapterBase;
class ContextBase {
static LBSProxyBase* getLBSProxy(const char* libName);
LocApiBase* createLocApi(LOC_API_ADAPTER_EVENT_MASK_T excludedMask);
protected:
const LBSProxyBase* mLBSProxy;
const MsgTask* mMsgTask;
LocApiBase* mLocApi;
LocApiProxyBase *mLocApiProxy;
public:
ContextBase(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask,
const char* libName);
inline virtual ~ContextBase() { delete mLocApi; delete mLBSProxy; }
inline const MsgTask* getMsgTask() { return mMsgTask; }
inline LocApiBase* getLocApi() { return mLocApi; }
inline LocApiProxyBase* getLocApiProxy() { return mLocApiProxy; }
inline bool hasAgpsExtendedCapabilities() { return mLBSProxy->hasAgpsExtendedCapabilities(); }
inline bool hasCPIExtendedCapabilities() { return mLBSProxy->hasCPIExtendedCapabilities(); }
inline bool hasNativeXtraClient() { return mLBSProxy->hasNativeXtraClient(); }
inline void modemPowerVote(bool power) const { return mLBSProxy->modemPowerVote(power); }
inline void requestUlp(LocAdapterBase* adapter,
unsigned long capabilities) {
mLBSProxy->requestUlp(adapter, capabilities);
}
inline IzatDevId_t getIzatDevId() const {
return mLBSProxy->getIzatDevId();
}
inline void sendMsg(const LocMsg *msg) { getMsgTask()->sendMsg(msg); }
static loc_gps_cfg_s_type mGps_conf;
static loc_sap_cfg_s_type mSap_conf;
static uint32_t getCarrierCapabilities();
};
} // namespace loc_core
#endif //__LOC_CONTEXT_BASE__

View file

@ -1,80 +0,0 @@
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef IZAT_PROXY_BASE_H
#define IZAT_PROXY_BASE_H
#include <gps_extended.h>
#include <MsgTask.h>
namespace loc_core {
class LocApiBase;
class LocAdapterBase;
class ContextBase;
class LBSProxyBase {
friend class ContextBase;
inline virtual LocApiBase*
getLocApi(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask,
ContextBase* context) const {
(void)msgTask;
(void)exMask;
(void)context;
return NULL;
}
protected:
inline LBSProxyBase() {}
public:
inline virtual ~LBSProxyBase() {}
inline virtual void requestUlp(LocAdapterBase* adapter,
unsigned long capabilities) const {
(void)adapter;
(void)capabilities;
}
inline virtual bool hasAgpsExtendedCapabilities() const { return false; }
inline virtual bool hasCPIExtendedCapabilities() const { return false; }
inline virtual void modemPowerVote(bool power) const {
(void)power;
}
virtual void injectFeatureConfig(ContextBase* context) const {
(void)context;
}
inline virtual bool hasNativeXtraClient() const { return false; }
inline virtual IzatDevId_t getIzatDevId() const { return 0; }
};
typedef LBSProxyBase* (getLBSProxy_t)();
} // namespace loc_core
#endif // IZAT_PROXY_BASE_H

View file

@ -1,149 +0,0 @@
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#define LOG_NDDEBUG 0
#define LOG_TAG "LocSvc_LocAdapterBase"
#include <dlfcn.h>
#include <LocAdapterBase.h>
#include <loc_target.h>
#include <platform_lib_log_util.h>
#include <LocAdapterProxyBase.h>
namespace loc_core {
// This is the top level class, so the constructor will
// always gets called. Here we prepare for the default.
// But if getLocApi(targetEnumType target) is overriden,
// the right locApi should get created.
LocAdapterBase::LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context, LocAdapterProxyBase *adapterProxyBase) :
mEvtMask(mask), mContext(context),
mLocApi(context->getLocApi()), mLocAdapterProxyBase(adapterProxyBase),
mMsgTask(context->getMsgTask())
{
mLocApi->addAdapter(this);
}
void LocAdapterBase::handleEngineUpEvent()
{
if (mLocAdapterProxyBase) {
mLocAdapterProxyBase->handleEngineUpEvent();
}
}
void LocAdapterBase::handleEngineDownEvent()
{
if (mLocAdapterProxyBase) {
mLocAdapterProxyBase->handleEngineDownEvent();
}
}
void LocAdapterBase::
reportPosition(UlpLocation &location,
GpsLocationExtended &locationExtended,
void* locationExt,
enum loc_sess_status status,
LocPosTechMask loc_technology_mask) {
if (mLocAdapterProxyBase == NULL ||
!mLocAdapterProxyBase->reportPosition(location,
locationExtended,
status,
loc_technology_mask)) {
DEFAULT_IMPL()
}
}
void LocAdapterBase::
reportSv(GnssSvStatus &svStatus,
GpsLocationExtended &locationExtended,
void* svExt)
DEFAULT_IMPL()
void LocAdapterBase::
reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet)
DEFAULT_IMPL()
void LocAdapterBase::
reportSvPolynomial(GnssSvPolynomial &svPolynomial)
DEFAULT_IMPL()
void LocAdapterBase::
reportStatus(GpsStatusValue status)
DEFAULT_IMPL()
void LocAdapterBase::
reportNmea(const char* nmea, int length)
DEFAULT_IMPL()
bool LocAdapterBase::
reportXtraServer(const char* url1, const char* url2,
const char* url3, const int maxlength)
DEFAULT_IMPL(false)
bool LocAdapterBase::
requestXtraData()
DEFAULT_IMPL(false)
bool LocAdapterBase::
requestTime()
DEFAULT_IMPL(false)
bool LocAdapterBase::
requestLocation()
DEFAULT_IMPL(false)
bool LocAdapterBase::
requestATL(int connHandle, AGpsType agps_type)
DEFAULT_IMPL(false)
bool LocAdapterBase::
releaseATL(int connHandle)
DEFAULT_IMPL(false)
bool LocAdapterBase::
requestSuplES(int connHandle)
DEFAULT_IMPL(false)
bool LocAdapterBase::
reportDataCallOpened()
DEFAULT_IMPL(false)
bool LocAdapterBase::
reportDataCallClosed()
DEFAULT_IMPL(false)
bool LocAdapterBase::
requestNiNotify(GpsNiNotification &notify, const void* data)
DEFAULT_IMPL(false)
void LocAdapterBase::
reportGnssMeasurementData(GnssData &gnssMeasurementData)
DEFAULT_IMPL()
} // namespace loc_core

View file

@ -1,131 +0,0 @@
/* Copyright (c) 2011-2014,2016 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef LOC_API_ADAPTER_BASE_H
#define LOC_API_ADAPTER_BASE_H
#include <gps_extended.h>
#include <UlpProxyBase.h>
#include <ContextBase.h>
namespace loc_core {
class LocAdapterProxyBase;
class LocAdapterBase {
protected:
LOC_API_ADAPTER_EVENT_MASK_T mEvtMask;
ContextBase* mContext;
LocApiBase* mLocApi;
LocAdapterProxyBase* mLocAdapterProxyBase;
const MsgTask* mMsgTask;
inline LocAdapterBase(const MsgTask* msgTask) :
mEvtMask(0), mContext(NULL), mLocApi(NULL),
mLocAdapterProxyBase(NULL), mMsgTask(msgTask) {}
public:
inline virtual ~LocAdapterBase() { mLocApi->removeAdapter(this); }
LocAdapterBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context, LocAdapterProxyBase *adapterProxyBase = NULL);
inline LOC_API_ADAPTER_EVENT_MASK_T
checkMask(LOC_API_ADAPTER_EVENT_MASK_T mask) const {
return mEvtMask & mask;
}
inline LOC_API_ADAPTER_EVENT_MASK_T getEvtMask() const {
return mEvtMask;
}
inline void sendMsg(const LocMsg* msg) const {
mMsgTask->sendMsg(msg);
}
inline void sendMsg(const LocMsg* msg) {
mMsgTask->sendMsg(msg);
}
inline void updateEvtMask(LOC_API_ADAPTER_EVENT_MASK_T event,
loc_registration_mask_status isEnabled)
{
mEvtMask =
isEnabled == LOC_REGISTRATION_MASK_ENABLED ? (mEvtMask|event):(mEvtMask&~event);
mLocApi->updateEvtMask();
}
inline bool isFeatureSupported(uint8_t featureVal) {
return mLocApi->isFeatureSupported(featureVal);
}
// This will be overridden by the individual adapters
// if necessary.
inline virtual void setUlpProxy(UlpProxyBase* ulp) {
(void)ulp;
}
virtual void handleEngineUpEvent();
virtual void handleEngineDownEvent();
inline virtual void setPositionModeInt(LocPosMode& posMode) {
(void)posMode;
}
virtual void startFixInt() {}
virtual void stopFixInt() {}
virtual void getZppInt() {}
virtual void reportPosition(UlpLocation &location,
GpsLocationExtended &locationExtended,
void* locationExt,
enum loc_sess_status status,
LocPosTechMask loc_technology_mask);
virtual void reportSv(GnssSvStatus &svStatus,
GpsLocationExtended &locationExtended,
void* svExt);
virtual void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet);
virtual void reportSvPolynomial(GnssSvPolynomial &svPolynomial);
virtual void reportStatus(GpsStatusValue status);
virtual void reportNmea(const char* nmea, int length);
virtual bool reportXtraServer(const char* url1, const char* url2,
const char* url3, const int maxlength);
virtual bool requestXtraData();
virtual bool requestTime();
virtual bool requestLocation();
virtual bool requestATL(int connHandle, AGpsType agps_type);
virtual bool releaseATL(int connHandle);
virtual bool requestSuplES(int connHandle);
virtual bool reportDataCallOpened();
virtual bool reportDataCallClosed();
virtual bool requestNiNotify(GpsNiNotification &notify,
const void* data);
inline virtual bool isInSession() { return false; }
ContextBase* getContext() const { return mContext; }
virtual void reportGnssMeasurementData(GnssData &gnssMeasurementData);
};
} // namespace loc_core
#endif //LOC_API_ADAPTER_BASE_H

View file

@ -1,75 +0,0 @@
/* Copyright (c) 2014 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef LOC_ADAPTER_PROXY_BASE_H
#define LOC_ADAPTER_PROXY_BASE_H
#include <ContextBase.h>
#include <gps_extended.h>
namespace loc_core {
class LocAdapterProxyBase {
private:
LocAdapterBase *mLocAdapterBase;
protected:
inline LocAdapterProxyBase(const LOC_API_ADAPTER_EVENT_MASK_T mask,
ContextBase* context):
mLocAdapterBase(new LocAdapterBase(mask, context, this)) {
}
inline virtual ~LocAdapterProxyBase() {
delete mLocAdapterBase;
}
inline void updateEvtMask(LOC_API_ADAPTER_EVENT_MASK_T event,
loc_registration_mask_status isEnabled) {
mLocAdapterBase->updateEvtMask(event,isEnabled);
}
public:
inline ContextBase* getContext() const {
return mLocAdapterBase->getContext();
}
inline virtual void handleEngineUpEvent() {};
inline virtual void handleEngineDownEvent() {};
inline virtual bool reportPosition(UlpLocation &location,
GpsLocationExtended &locationExtended,
enum loc_sess_status status,
LocPosTechMask loc_technology_mask) {
(void)location;
(void)locationExtended;
(void)status;
(void)loc_technology_mask;
return false;
}
};
} // namespace loc_core
#endif //LOC_ADAPTER_PROXY_BASE_H

View file

@ -1,598 +0,0 @@
/* Copyright (c) 2011-2014,2016 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#define LOG_NDDEBUG 0
#define LOG_TAG "LocSvc_LocApiBase"
#include <dlfcn.h>
#include <LocApiBase.h>
#include <LocAdapterBase.h>
#include <platform_lib_log_util.h>
#include <LocDualContext.h>
namespace loc_core {
#define TO_ALL_LOCADAPTERS(call) TO_ALL_ADAPTERS(mLocAdapters, (call))
#define TO_1ST_HANDLING_LOCADAPTERS(call) TO_1ST_HANDLING_ADAPTER(mLocAdapters, (call))
int hexcode(char *hexstring, int string_size,
const char *data, int data_size)
{
int i;
for (i = 0; i < data_size; i++)
{
char ch = data[i];
if (i*2 + 3 <= string_size)
{
snprintf(&hexstring[i*2], 3, "%02X", ch);
}
else {
break;
}
}
return i;
}
int decodeAddress(char *addr_string, int string_size,
const char *data, int data_size)
{
const char addr_prefix = 0x91;
int i, idxOutput = 0;
if (!data || !addr_string) { return 0; }
if (data[0] != addr_prefix)
{
LOC_LOGW("decodeAddress: address prefix is not 0x%x but 0x%x", addr_prefix, data[0]);
addr_string[0] = '\0';
return 0; // prefix not correct
}
for (i = 1; i < data_size; i++)
{
unsigned char ch = data[i], low = ch & 0x0F, hi = ch >> 4;
if (low <= 9 && idxOutput < string_size - 1) { addr_string[idxOutput++] = low + '0'; }
if (hi <= 9 && idxOutput < string_size - 1) { addr_string[idxOutput++] = hi + '0'; }
}
addr_string[idxOutput] = '\0'; // Terminates the string
return idxOutput;
}
struct LocSsrMsg : public LocMsg {
LocApiBase* mLocApi;
inline LocSsrMsg(LocApiBase* locApi) :
LocMsg(), mLocApi(locApi)
{
locallog();
}
inline virtual void proc() const {
mLocApi->close();
mLocApi->open(mLocApi->getEvtMask());
}
inline void locallog() {
LOC_LOGV("LocSsrMsg");
}
inline virtual void log() {
locallog();
}
};
struct LocOpenMsg : public LocMsg {
LocApiBase* mLocApi;
LOC_API_ADAPTER_EVENT_MASK_T mMask;
inline LocOpenMsg(LocApiBase* locApi,
LOC_API_ADAPTER_EVENT_MASK_T mask) :
LocMsg(), mLocApi(locApi), mMask(mask)
{
locallog();
}
inline virtual void proc() const {
mLocApi->open(mMask);
}
inline void locallog() {
LOC_LOGV("%s:%d]: LocOpen Mask: %x\n",
__func__, __LINE__, mMask);
}
inline virtual void log() {
locallog();
}
};
LocApiBase::LocApiBase(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T excludedMask,
ContextBase* context) :
mExcludedMask(excludedMask), mMsgTask(msgTask),
mMask(0), mSupportedMsg(0), mContext(context)
{
memset(mLocAdapters, 0, sizeof(mLocAdapters));
memset(mFeaturesSupported, 0, sizeof(mFeaturesSupported));
}
LOC_API_ADAPTER_EVENT_MASK_T LocApiBase::getEvtMask()
{
LOC_API_ADAPTER_EVENT_MASK_T mask = 0;
TO_ALL_LOCADAPTERS(mask |= mLocAdapters[i]->getEvtMask());
return mask & ~mExcludedMask;
}
bool LocApiBase::isInSession()
{
bool inSession = false;
for (int i = 0;
!inSession && i < MAX_ADAPTERS && NULL != mLocAdapters[i];
i++) {
inSession = mLocAdapters[i]->isInSession();
}
return inSession;
}
void LocApiBase::addAdapter(LocAdapterBase* adapter)
{
for (int i = 0; i < MAX_ADAPTERS && mLocAdapters[i] != adapter; i++) {
if (mLocAdapters[i] == NULL) {
mLocAdapters[i] = adapter;
mMsgTask->sendMsg(new LocOpenMsg(this,
(adapter->getEvtMask())));
break;
}
}
}
void LocApiBase::removeAdapter(LocAdapterBase* adapter)
{
for (int i = 0;
i < MAX_ADAPTERS && NULL != mLocAdapters[i];
i++) {
if (mLocAdapters[i] == adapter) {
mLocAdapters[i] = NULL;
// shift the rest of the adapters up so that the pointers
// in the array do not have holes. This should be more
// performant, because the array maintenance is much much
// less frequent than event handlings, which need to linear
// search all the adapters
int j = i;
while (++i < MAX_ADAPTERS && mLocAdapters[i] != NULL);
// i would be MAX_ADAPTERS or point to a NULL
i--;
// i now should point to a none NULL adapter within valid
// range although i could be equal to j, but it won't hurt.
// No need to check it, as it gains nothing.
mLocAdapters[j] = mLocAdapters[i];
// this makes sure that we exit the for loop
mLocAdapters[i] = NULL;
// if we have an empty list of adapters
if (0 == i) {
close();
} else {
// else we need to remove the bit
mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask()));
}
}
}
}
void LocApiBase::updateEvtMask()
{
mMsgTask->sendMsg(new LocOpenMsg(this, getEvtMask()));
}
void LocApiBase::handleEngineUpEvent()
{
// This will take care of renegotiating the loc handle
mMsgTask->sendMsg(new LocSsrMsg(this));
LocDualContext::injectFeatureConfig(mContext);
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(mLocAdapters[i]->handleEngineUpEvent());
}
void LocApiBase::handleEngineDownEvent()
{
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(mLocAdapters[i]->handleEngineDownEvent());
}
void LocApiBase::reportPosition(UlpLocation &location,
GpsLocationExtended &locationExtended,
void* locationExt,
enum loc_sess_status status,
LocPosTechMask loc_technology_mask)
{
// print the location info before delivering
LOC_LOGV("flags: %d\n source: %d\n latitude: %f\n longitude: %f\n "
"altitude: %f\n speed: %f\n bearing: %f\n accuracy: %f\n "
"timestamp: %lld\n rawDataSize: %d\n rawData: %p\n "
"Session status: %d\n Technology mask: %u\n "
"SV used in fix (gps/glo/bds/gal) : (%x/%x/%x/%x)",
location.gpsLocation.flags, location.position_source,
location.gpsLocation.latitude, location.gpsLocation.longitude,
location.gpsLocation.altitude, location.gpsLocation.speed,
location.gpsLocation.bearing, location.gpsLocation.accuracy,
location.gpsLocation.timestamp, location.rawDataSize,
location.rawData, status, loc_technology_mask,
locationExtended.gnss_sv_used_ids.gps_sv_used_ids_mask,
locationExtended.gnss_sv_used_ids.glo_sv_used_ids_mask,
locationExtended.gnss_sv_used_ids.bds_sv_used_ids_mask,
locationExtended.gnss_sv_used_ids.gal_sv_used_ids_mask);
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(
mLocAdapters[i]->reportPosition(location,
locationExtended,
locationExt,
status,
loc_technology_mask)
);
}
void LocApiBase::reportSv(GnssSvStatus &svStatus,
GpsLocationExtended &locationExtended,
void* svExt)
{
const char* constellationString[] = { "Unknown", "GPS", "SBAS", "GLONASS",
"QZSS", "BEIDOU", "GALILEO" };
// print the SV info before delivering
LOC_LOGV("num sv: %d\n"
" sv: constellation svid cN0"
" elevation azimuth flags",
svStatus.num_svs);
for (int i = 0; i < svStatus.num_svs && i < GNSS_MAX_SVS; i++) {
if (svStatus.gnss_sv_list[i].constellation >
sizeof(constellationString) / sizeof(constellationString[0]) - 1) {
svStatus.gnss_sv_list[i].constellation = 0;
}
LOC_LOGV(" %03d: %*s %02d %f %f %f 0x%02X",
i,
13,
constellationString[svStatus.gnss_sv_list[i].constellation],
svStatus.gnss_sv_list[i].svid,
svStatus.gnss_sv_list[i].c_n0_dbhz,
svStatus.gnss_sv_list[i].elevation,
svStatus.gnss_sv_list[i].azimuth,
svStatus.gnss_sv_list[i].flags);
}
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(
mLocAdapters[i]->reportSv(svStatus,
locationExtended,
svExt)
);
}
void LocApiBase::reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet)
{
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(
mLocAdapters[i]->reportSvMeasurement(svMeasurementSet)
);
}
void LocApiBase::reportSvPolynomial(GnssSvPolynomial &svPolynomial)
{
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(
mLocAdapters[i]->reportSvPolynomial(svPolynomial)
);
}
void LocApiBase::reportStatus(GpsStatusValue status)
{
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportStatus(status));
}
void LocApiBase::reportNmea(const char* nmea, int length)
{
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportNmea(nmea, length));
}
void LocApiBase::reportXtraServer(const char* url1, const char* url2,
const char* url3, const int maxlength)
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportXtraServer(url1, url2, url3, maxlength));
}
void LocApiBase::requestXtraData()
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestXtraData());
}
void LocApiBase::requestTime()
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestTime());
}
void LocApiBase::requestLocation()
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestLocation());
}
void LocApiBase::requestATL(int connHandle, AGpsType agps_type)
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestATL(connHandle, agps_type));
}
void LocApiBase::releaseATL(int connHandle)
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->releaseATL(connHandle));
}
void LocApiBase::requestSuplES(int connHandle)
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestSuplES(connHandle));
}
void LocApiBase::reportDataCallOpened()
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDataCallOpened());
}
void LocApiBase::reportDataCallClosed()
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDataCallClosed());
}
void LocApiBase::requestNiNotify(GpsNiNotification &notify, const void* data)
{
// loop through adapters, and deliver to the first handling adapter.
TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestNiNotify(notify, data));
}
void LocApiBase::saveSupportedMsgList(uint64_t supportedMsgList)
{
mSupportedMsg = supportedMsgList;
}
void LocApiBase::saveSupportedFeatureList(uint8_t *featureList)
{
memcpy((void *)mFeaturesSupported, (void *)featureList, sizeof(mFeaturesSupported));
}
void* LocApiBase :: getSibling()
DEFAULT_IMPL(NULL)
LocApiProxyBase* LocApiBase :: getLocApiProxy()
DEFAULT_IMPL(NULL)
void LocApiBase::reportGnssMeasurementData(GnssData &gnssMeasurementData)
{
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportGnssMeasurementData(gnssMeasurementData));
}
enum loc_api_adapter_err LocApiBase::
open(LOC_API_ADAPTER_EVENT_MASK_T mask)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
close()
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
startFix(const LocPosMode& posMode)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
stopFix()
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
deleteAidingData(GpsAidingData f)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
enableData(int enable)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setAPN(char* apn, int len)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
injectPosition(double latitude, double longitude, float accuracy)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setTime(GpsUtcTime time, int64_t timeReference, int uncertainty)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setXtraData(char* data, int length)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
requestXtraServer()
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
atlOpenStatus(int handle, int is_succ, char* apn,
AGpsBearerType bear, AGpsType agpsType)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
atlCloseStatus(int handle, int is_succ)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setPositionMode(const LocPosMode& posMode)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setServer(const char* url, int len)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setServer(unsigned int ip, int port,
LocServerType type)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
informNiResponse(GpsUserResponseType userResponse,
const void* passThroughData)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setSUPLVersion(uint32_t version)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setNMEATypes (uint32_t typesMask)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setLPPConfig(uint32_t profile)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setSensorControlConfig(int sensorUsage,
int sensorProvider)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setSensorProperties(bool gyroBiasVarianceRandomWalk_valid,
float gyroBiasVarianceRandomWalk,
bool accelBiasVarianceRandomWalk_valid,
float accelBiasVarianceRandomWalk,
bool angleBiasVarianceRandomWalk_valid,
float angleBiasVarianceRandomWalk,
bool rateBiasVarianceRandomWalk_valid,
float rateBiasVarianceRandomWalk,
bool velocityBiasVarianceRandomWalk_valid,
float velocityBiasVarianceRandomWalk)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setSensorPerfControlConfig(int controlMode,
int accelSamplesPerBatch,
int accelBatchesPerSec,
int gyroSamplesPerBatch,
int gyroBatchesPerSec,
int accelSamplesPerBatchHigh,
int accelBatchesPerSecHigh,
int gyroSamplesPerBatchHigh,
int gyroBatchesPerSecHigh,
int algorithmConfig)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setAGLONASSProtocol(unsigned long aGlonassProtocol)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
setLPPeProtocol(unsigned long lppeCP, unsigned long lppeUP)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
getWwanZppFix(GpsLocation& zppLoc)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
enum loc_api_adapter_err LocApiBase::
getBestAvailableZppFix(GpsLocation& zppLoc)
{
memset(&zppLoc, 0, sizeof(zppLoc));
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
}
enum loc_api_adapter_err LocApiBase::
getBestAvailableZppFix(GpsLocation & zppLoc, LocPosTechMask & tech_mask)
{
memset(&zppLoc, 0, sizeof(zppLoc));
memset(&tech_mask, 0, sizeof(tech_mask));
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
}
int LocApiBase::
initDataServiceClient()
DEFAULT_IMPL(-1)
int LocApiBase::
openAndStartDataCall()
DEFAULT_IMPL(-1)
void LocApiBase::
stopDataCall()
DEFAULT_IMPL()
void LocApiBase::
closeDataCall()
DEFAULT_IMPL()
int LocApiBase::
setGpsLock(LOC_GPS_LOCK_MASK lock)
DEFAULT_IMPL(-1)
void LocApiBase::
installAGpsCert(const DerEncodedCertificate* pData,
size_t length,
uint32_t slotBitMask)
DEFAULT_IMPL()
int LocApiBase::
getGpsLock()
DEFAULT_IMPL(-1)
enum loc_api_adapter_err LocApiBase::
setXtraVersionCheck(enum xtra_version_check check)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
bool LocApiBase::
gnssConstellationConfig()
DEFAULT_IMPL(false)
bool LocApiBase::
isFeatureSupported(uint8_t featureVal)
{
uint8_t arrayIndex = featureVal >> 3;
uint8_t bitPos = featureVal & 7;
if (arrayIndex >= MAX_FEATURE_LENGTH) return false;
return ((mFeaturesSupported[arrayIndex] >> bitPos ) & 0x1);
}
} // namespace loc_core

View file

@ -1,274 +0,0 @@
/* Copyright (c) 2011-2014, 2016 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef LOC_API_BASE_H
#define LOC_API_BASE_H
#include <stddef.h>
#include <ctype.h>
#include <gps_extended.h>
#include <MsgTask.h>
#include <platform_lib_log_util.h>
namespace loc_core {
class ContextBase;
int hexcode(char *hexstring, int string_size,
const char *data, int data_size);
int decodeAddress(char *addr_string, int string_size,
const char *data, int data_size);
#define MAX_ADAPTERS 10
#define MAX_FEATURE_LENGTH 100
#define TO_ALL_ADAPTERS(adapters, call) \
for (int i = 0; i < MAX_ADAPTERS && NULL != (adapters)[i]; i++) { \
call; \
}
#define TO_1ST_HANDLING_ADAPTER(adapters, call) \
for (int i = 0; i <MAX_ADAPTERS && NULL != (adapters)[i] && !(call); i++);
enum xtra_version_check {
DISABLED,
AUTO,
XTRA2,
XTRA3
};
class LocAdapterBase;
struct LocSsrMsg;
struct LocOpenMsg;
class LocApiProxyBase {
public:
inline LocApiProxyBase() {}
inline virtual ~LocApiProxyBase() {}
inline virtual void* getSibling2() { return NULL; }
};
class LocApiBase {
friend struct LocSsrMsg;
//LocOpenMsg calls open() which makes it necessary to declare
//it as a friend
friend struct LocOpenMsg;
friend class ContextBase;
const MsgTask* mMsgTask;
ContextBase *mContext;
LocAdapterBase* mLocAdapters[MAX_ADAPTERS];
uint64_t mSupportedMsg;
uint8_t mFeaturesSupported[MAX_FEATURE_LENGTH];
protected:
virtual enum loc_api_adapter_err
open(LOC_API_ADAPTER_EVENT_MASK_T mask);
virtual enum loc_api_adapter_err
close();
LOC_API_ADAPTER_EVENT_MASK_T getEvtMask();
LOC_API_ADAPTER_EVENT_MASK_T mMask;
LocApiBase(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T excludedMask,
ContextBase* context = NULL);
inline virtual ~LocApiBase() { close(); }
bool isInSession();
const LOC_API_ADAPTER_EVENT_MASK_T mExcludedMask;
public:
inline void sendMsg(const LocMsg* msg) const {
mMsgTask->sendMsg(msg);
}
void addAdapter(LocAdapterBase* adapter);
void removeAdapter(LocAdapterBase* adapter);
// upward calls
void handleEngineUpEvent();
void handleEngineDownEvent();
void reportPosition(UlpLocation &location,
GpsLocationExtended &locationExtended,
void* locationExt,
enum loc_sess_status status,
LocPosTechMask loc_technology_mask =
LOC_POS_TECH_MASK_DEFAULT);
void reportSv(GnssSvStatus &svStatus,
GpsLocationExtended &locationExtended,
void* svExt);
void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet);
void reportSvPolynomial(GnssSvPolynomial &svPolynomial);
void reportStatus(GpsStatusValue status);
void reportNmea(const char* nmea, int length);
void reportXtraServer(const char* url1, const char* url2,
const char* url3, const int maxlength);
void requestXtraData();
void requestTime();
void requestLocation();
void requestATL(int connHandle, AGpsType agps_type);
void releaseATL(int connHandle);
void requestSuplES(int connHandle);
void reportDataCallOpened();
void reportDataCallClosed();
void requestNiNotify(GpsNiNotification &notify, const void* data);
void saveSupportedMsgList(uint64_t supportedMsgList);
void reportGnssMeasurementData(GnssData &gnssMeasurementData);
void saveSupportedFeatureList(uint8_t *featureList);
// downward calls
// All below functions are to be defined by adapter specific modules:
// RPC, QMI, etc. The default implementation is empty.
virtual void* getSibling();
virtual LocApiProxyBase* getLocApiProxy();
virtual enum loc_api_adapter_err
startFix(const LocPosMode& posMode);
virtual enum loc_api_adapter_err
stopFix();
virtual enum loc_api_adapter_err
deleteAidingData(GpsAidingData f);
virtual enum loc_api_adapter_err
enableData(int enable);
virtual enum loc_api_adapter_err
setAPN(char* apn, int len);
virtual enum loc_api_adapter_err
injectPosition(double latitude, double longitude, float accuracy);
virtual enum loc_api_adapter_err
setTime(GpsUtcTime time, int64_t timeReference, int uncertainty);
virtual enum loc_api_adapter_err
setXtraData(char* data, int length);
virtual enum loc_api_adapter_err
requestXtraServer();
virtual enum loc_api_adapter_err
atlOpenStatus(int handle, int is_succ, char* apn, AGpsBearerType bear, AGpsType agpsType);
virtual enum loc_api_adapter_err
atlCloseStatus(int handle, int is_succ);
virtual enum loc_api_adapter_err
setPositionMode(const LocPosMode& posMode);
virtual enum loc_api_adapter_err
setServer(const char* url, int len);
virtual enum loc_api_adapter_err
setServer(unsigned int ip, int port,
LocServerType type);
virtual enum loc_api_adapter_err
informNiResponse(GpsUserResponseType userResponse, const void* passThroughData);
virtual enum loc_api_adapter_err
setSUPLVersion(uint32_t version);
virtual enum loc_api_adapter_err
setNMEATypes (uint32_t typesMask);
virtual enum loc_api_adapter_err
setLPPConfig(uint32_t profile);
virtual enum loc_api_adapter_err
setSensorControlConfig(int sensorUsage, int sensorProvider);
virtual enum loc_api_adapter_err
setSensorProperties(bool gyroBiasVarianceRandomWalk_valid,
float gyroBiasVarianceRandomWalk,
bool accelBiasVarianceRandomWalk_valid,
float accelBiasVarianceRandomWalk,
bool angleBiasVarianceRandomWalk_valid,
float angleBiasVarianceRandomWalk,
bool rateBiasVarianceRandomWalk_valid,
float rateBiasVarianceRandomWalk,
bool velocityBiasVarianceRandomWalk_valid,
float velocityBiasVarianceRandomWalk);
virtual enum loc_api_adapter_err
setSensorPerfControlConfig(int controlMode,
int accelSamplesPerBatch,
int accelBatchesPerSec,
int gyroSamplesPerBatch,
int gyroBatchesPerSec,
int accelSamplesPerBatchHigh,
int accelBatchesPerSecHigh,
int gyroSamplesPerBatchHigh,
int gyroBatchesPerSecHigh,
int algorithmConfig);
virtual enum loc_api_adapter_err
setAGLONASSProtocol(unsigned long aGlonassProtocol);
virtual enum loc_api_adapter_err
setLPPeProtocol(unsigned long lppeCP, unsigned long lppeUP);
virtual enum loc_api_adapter_err
getWwanZppFix(GpsLocation & zppLoc);
virtual enum loc_api_adapter_err
getBestAvailableZppFix(GpsLocation & zppLoc);
virtual enum loc_api_adapter_err
getBestAvailableZppFix(GpsLocation & zppLoc, LocPosTechMask & tech_mask);
virtual int initDataServiceClient();
virtual int openAndStartDataCall();
virtual void stopDataCall();
virtual void closeDataCall();
virtual void installAGpsCert(const DerEncodedCertificate* pData,
size_t length,
uint32_t slotBitMask);
inline virtual void setInSession(bool inSession) {
(void)inSession;
}
inline bool isMessageSupported (LocCheckingMessagesID msgID) const {
// confirm if msgID is not larger than the number of bits in
// mSupportedMsg
if ((uint64_t)msgID > (sizeof(mSupportedMsg) << 3)) {
return false;
} else {
uint32_t messageChecker = 1 << msgID;
return (messageChecker & mSupportedMsg) == messageChecker;
}
}
void updateEvtMask();
/*Values for lock
1 = Do not lock any position sessions
2 = Lock MI position sessions
3 = Lock MT position sessions
4 = Lock all position sessions
*/
virtual int setGpsLock(LOC_GPS_LOCK_MASK lock);
/*
Returns
Current value of GPS Lock on success
-1 on failure
*/
virtual int getGpsLock(void);
virtual enum loc_api_adapter_err setXtraVersionCheck(enum xtra_version_check check);
/*
Check if the modem support the service
*/
virtual bool gnssConstellationConfig();
/*
Check if a feature is supported
*/
bool isFeatureSupported(uint8_t featureVal);
};
typedef LocApiBase* (getLocApi_t)(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask,
ContextBase *context);
} // namespace loc_core
#endif //LOC_API_BASE_H

View file

@ -1,151 +0,0 @@
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#define LOG_NDDEBUG 0
#define LOG_TAG "LocSvc_DualCtx"
#include <cutils/sched_policy.h>
#include <unistd.h>
#include <LocDualContext.h>
#include <msg_q.h>
#include <platform_lib_log_util.h>
#include <loc_log.h>
namespace loc_core {
// nothing exclude for foreground
const LOC_API_ADAPTER_EVENT_MASK_T
LocDualContext::mFgExclMask = 0;
// excluded events for background clients
const LOC_API_ADAPTER_EVENT_MASK_T
LocDualContext::mBgExclMask =
(LOC_API_ADAPTER_BIT_PARSED_POSITION_REPORT |
LOC_API_ADAPTER_BIT_SATELLITE_REPORT |
LOC_API_ADAPTER_BIT_NMEA_1HZ_REPORT |
LOC_API_ADAPTER_BIT_NMEA_POSITION_REPORT |
LOC_API_ADAPTER_BIT_IOCTL_REPORT |
LOC_API_ADAPTER_BIT_STATUS_REPORT |
LOC_API_ADAPTER_BIT_GEOFENCE_GEN_ALERT |
LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT);
const MsgTask* LocDualContext::mMsgTask = NULL;
ContextBase* LocDualContext::mFgContext = NULL;
ContextBase* LocDualContext::mBgContext = NULL;
ContextBase* LocDualContext::mInjectContext = NULL;
// the name must be shorter than 15 chars
const char* LocDualContext::mLocationHalName = "Loc_hal_worker";
#ifndef USE_GLIB
const char* LocDualContext::mLBSLibName = "liblbs_core.so";
#else
const char* LocDualContext::mLBSLibName = "liblbs_core.so.1";
#endif
pthread_mutex_t LocDualContext::mGetLocContextMutex = PTHREAD_MUTEX_INITIALIZER;
const MsgTask* LocDualContext::getMsgTask(LocThread::tCreate tCreator,
const char* name, bool joinable)
{
if (NULL == mMsgTask) {
mMsgTask = new MsgTask(tCreator, name, joinable);
}
return mMsgTask;
}
inline
const MsgTask* LocDualContext::getMsgTask(const char* name, bool joinable) {
return getMsgTask((LocThread::tCreate)NULL, name, joinable);
}
ContextBase* LocDualContext::getLocFgContext(LocThread::tCreate tCreator,
LocMsg* firstMsg, const char* name, bool joinable)
{
pthread_mutex_lock(&LocDualContext::mGetLocContextMutex);
LOC_LOGD("%s:%d]: querying ContextBase with tCreator", __func__, __LINE__);
if (NULL == mFgContext) {
LOC_LOGD("%s:%d]: creating msgTask with tCreator", __func__, __LINE__);
const MsgTask* msgTask = getMsgTask(tCreator, name, joinable);
mFgContext = new LocDualContext(msgTask,
mFgExclMask);
}
if(NULL == mInjectContext) {
LOC_LOGD("%s:%d]: mInjectContext is FgContext", __func__, __LINE__);
mInjectContext = mFgContext;
injectFeatureConfig(mInjectContext);
}
pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex);
if (firstMsg) {
mFgContext->sendMsg(firstMsg);
}
return mFgContext;
}
ContextBase* LocDualContext::getLocBgContext(LocThread::tCreate tCreator,
LocMsg* firstMsg, const char* name, bool joinable)
{
pthread_mutex_lock(&LocDualContext::mGetLocContextMutex);
LOC_LOGD("%s:%d]: querying ContextBase with tCreator", __func__, __LINE__);
if (NULL == mBgContext) {
LOC_LOGD("%s:%d]: creating msgTask with tCreator", __func__, __LINE__);
const MsgTask* msgTask = getMsgTask(tCreator, name, joinable);
mBgContext = new LocDualContext(msgTask,
mBgExclMask);
}
if(NULL == mInjectContext) {
LOC_LOGD("%s:%d]: mInjectContext is BgContext", __func__, __LINE__);
mInjectContext = mBgContext;
injectFeatureConfig(mInjectContext);
}
pthread_mutex_unlock(&LocDualContext::mGetLocContextMutex);
if (firstMsg) {
mBgContext->sendMsg(firstMsg);
}
return mBgContext;
}
void LocDualContext :: injectFeatureConfig(ContextBase *curContext)
{
LOC_LOGD("%s:%d]: Enter", __func__, __LINE__);
if(curContext == mInjectContext) {
LOC_LOGD("%s:%d]: Calling LBSProxy (%p) to inject feature config",
__func__, __LINE__, ((LocDualContext *)mInjectContext)->mLBSProxy);
((LocDualContext *)mInjectContext)->mLBSProxy->injectFeatureConfig(curContext);
}
LOC_LOGD("%s:%d]: Exit", __func__, __LINE__);
}
LocDualContext::LocDualContext(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask) :
ContextBase(msgTask, exMask, mLBSLibName)
{
}
}

View file

@ -1,76 +0,0 @@
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef __LOC_ENG_CONTEXT__
#define __LOC_ENG_CONTEXT__
#include <stdbool.h>
#include <ctype.h>
#include <dlfcn.h>
#include <ContextBase.h>
namespace loc_core {
class LocDualContext : public ContextBase {
static const MsgTask* mMsgTask;
static ContextBase* mFgContext;
static ContextBase* mBgContext;
static ContextBase* mInjectContext;
static const MsgTask* getMsgTask(LocThread::tCreate tCreator,
const char* name, bool joinable = true);
static const MsgTask* getMsgTask(const char* name, bool joinable = true);
static pthread_mutex_t mGetLocContextMutex;
protected:
LocDualContext(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask);
inline virtual ~LocDualContext() {}
public:
static const char* mLBSLibName;
static const LOC_API_ADAPTER_EVENT_MASK_T mFgExclMask;
static const LOC_API_ADAPTER_EVENT_MASK_T mBgExclMask;
static const char* mLocationHalName;
static ContextBase* getLocFgContext(LocThread::tCreate tCreator, LocMsg* firstMsg,
const char* name, bool joinable = true);
inline static ContextBase* getLocFgContext(const char* name, bool joinable = true) {
return getLocFgContext(NULL, NULL, name, joinable);
}
static ContextBase* getLocBgContext(LocThread::tCreate tCreator, LocMsg* firstMsg,
const char* name, bool joinable = true);
inline static ContextBase* getLocBgContext(const char* name, bool joinable = true) {
return getLocBgContext(NULL, NULL, name, joinable);
}
static void injectFeatureConfig(ContextBase *context);
};
}
#endif //__LOC_ENG_CONTEXT__

View file

@ -1,46 +0,0 @@
AM_CFLAGS = -I./ \
-I../utils \
$(LOCPLA_CFLAGS) \
-I$(WORKSPACE)/gps-noship/flp \
-D__func__=__PRETTY_FUNCTION__ \
-fno-short-enums
libloc_core_la_h_sources = \
LocApiBase.h \
LocAdapterBase.h \
ContextBase.h \
LocDualContext.h \
LBSProxyBase.h \
UlpProxyBase.h \
gps_extended_c.h \
gps_extended.h \
loc_core_log.h \
LocAdapterProxyBase.h
libloc_core_la_c_sources = \
LocApiBase.cpp \
LocAdapterBase.cpp \
ContextBase.cpp \
LocDualContext.cpp \
loc_core_log.cpp
library_includedir = $(pkgincludedir)/core
library_include_HEADERS = $(libloc_core_la_h_sources)
libloc_core_la_SOURCES = $(libloc_core_la_c_sources)
if USE_GLIB
libloc_core_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
libloc_core_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
libloc_core_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
else
libloc_core_la_CFLAGS = $(AM_CFLAGS)
libloc_core_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
libloc_core_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
endif
libloc_core_la_LIBADD = -lstdc++ -ldl $(LOCPLA_LIBS) ../utils/libgps_utils_so.la
#Create and Install libraries
lib_LTLIBRARIES = libloc_core.la

View file

@ -1,122 +0,0 @@
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef ULP_PROXY_BASE_H
#define ULP_PROXY_BASE_H
#include <gps_extended.h>
struct FlpExtLocation_s;
struct FlpExtBatchOptions;
namespace loc_core {
class LocAdapterBase;
class UlpProxyBase {
public:
LocPosMode mPosMode;
bool mFixSet;
inline UlpProxyBase() {
mPosMode.mode = LOC_POSITION_MODE_INVALID;
mFixSet = false;
}
inline virtual ~UlpProxyBase() {}
inline virtual bool sendStartFix() { mFixSet = true; return false; }
inline virtual bool sendStopFix() { mFixSet = false; return false; }
inline virtual bool sendFixMode(LocPosMode &params) {
mPosMode = params;
return false;
}
inline virtual bool reportPosition(UlpLocation &location,
GpsLocationExtended &locationExtended,
void* locationExt,
enum loc_sess_status status,
LocPosTechMask loc_technology_mask) {
(void)location;
(void)locationExtended;
(void)locationExt;
(void)status;
(void)loc_technology_mask;
return false;
}
inline virtual bool reportSv(GnssSvStatus &svStatus,
GpsLocationExtended &locationExtended,
void* svExt) {
(void)svStatus;
(void)locationExtended;
(void)svExt;
return false;
}
inline virtual bool reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet) {
(void)svMeasurementSet;
return false;
}
inline virtual bool reportSvPolynomial(GnssSvPolynomial &svPolynomial)
{
(void)svPolynomial;
return false;
}
inline virtual bool reportStatus(GpsStatusValue status) {
(void)status;
return false;
}
inline virtual void setAdapter(LocAdapterBase* adapter) {
(void)adapter;
}
inline virtual void setCapabilities(unsigned long capabilities) {
(void)capabilities;
}
inline virtual bool reportBatchingSession(FlpExtBatchOptions &options,
bool active) {
(void)options;
(void)active;
return false;
}
inline virtual bool reportPositions(const struct FlpExtLocation_s* locations,
int32_t number_of_locations) {
(void)locations;
(void)number_of_locations;
return false;
}
inline virtual bool reportDeleteAidingData(GpsAidingData aidingData)
{
(void)aidingData;
return false;
}
};
} // namespace loc_core
#endif // ULP_PROXY_BASE_H

View file

@ -1,104 +0,0 @@
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef GPS_EXTENDED_H
#define GPS_EXTENDED_H
#include <gps_extended_c.h>
/**
* @file
* @brief C++ declarations for GPS types
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#if defined(USE_GLIB) || defined(OFF_TARGET)
#include <string.h>
#endif
struct LocPosMode
{
LocPositionMode mode;
GpsPositionRecurrence recurrence;
uint32_t min_interval;
uint32_t preferred_accuracy;
uint32_t preferred_time;
bool share_position;
char credentials[14];
char provider[8];
LocPosMode(LocPositionMode m, GpsPositionRecurrence recr,
uint32_t gap, uint32_t accu, uint32_t time,
bool sp, const char* cred, const char* prov) :
mode(m), recurrence(recr),
min_interval(gap < GPS_MIN_POSSIBLE_FIX_INTERVAL_MS ?
GPS_MIN_POSSIBLE_FIX_INTERVAL_MS : gap),
preferred_accuracy(accu), preferred_time(time),
share_position(sp) {
memset(credentials, 0, sizeof(credentials));
memset(provider, 0, sizeof(provider));
if (NULL != cred) {
memcpy(credentials, cred, sizeof(credentials)-1);
}
if (NULL != prov) {
memcpy(provider, prov, sizeof(provider)-1);
}
}
inline LocPosMode() :
mode(LOC_POSITION_MODE_MS_BASED),
recurrence(GPS_POSITION_RECURRENCE_PERIODIC),
min_interval(GPS_DEFAULT_FIX_INTERVAL_MS),
preferred_accuracy(50), preferred_time(120000),
share_position(true) {
memset(credentials, 0, sizeof(credentials));
memset(provider, 0, sizeof(provider));
}
inline bool equals(const LocPosMode &anotherMode) const
{
return anotherMode.mode == mode &&
anotherMode.recurrence == recurrence &&
anotherMode.min_interval == min_interval &&
anotherMode.preferred_accuracy == preferred_accuracy &&
anotherMode.preferred_time == preferred_time &&
!strncmp(anotherMode.credentials, credentials, sizeof(credentials)-1) &&
!strncmp(anotherMode.provider, provider, sizeof(provider)-1);
}
void logv() const;
};
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* GPS_EXTENDED_H */

File diff suppressed because it is too large Load diff

View file

@ -1,243 +0,0 @@
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#define LOG_NDDEBUG 0
#define LOG_TAG "LocSvc_core_log"
#include <loc_log.h>
#include <loc_core_log.h>
#include <platform_lib_includes.h>
void LocPosMode::logv() const
{
LOC_LOGV ("Position mode: %s\n Position recurrence: %s\n "
"min interval: %d\n preferred accuracy: %d\n "
"preferred time: %d\n credentials: %s provider: %s",
loc_get_position_mode_name(mode),
loc_get_position_recurrence_name(recurrence),
min_interval,
preferred_accuracy,
preferred_time,
credentials,
provider);
}
/* GPS status names */
static const loc_name_val_s_type gps_status_name[] =
{
NAME_VAL( GPS_STATUS_NONE ),
NAME_VAL( GPS_STATUS_SESSION_BEGIN ),
NAME_VAL( GPS_STATUS_SESSION_END ),
NAME_VAL( GPS_STATUS_ENGINE_ON ),
NAME_VAL( GPS_STATUS_ENGINE_OFF ),
};
static const int gps_status_num = sizeof(gps_status_name) / sizeof(loc_name_val_s_type);
/* Find Android GPS status name */
const char* loc_get_gps_status_name(GpsStatusValue gps_status)
{
return loc_get_name_from_val(gps_status_name, gps_status_num,
(long) gps_status);
}
static const loc_name_val_s_type loc_eng_position_modes[] =
{
NAME_VAL( LOC_POSITION_MODE_STANDALONE ),
NAME_VAL( LOC_POSITION_MODE_MS_BASED ),
NAME_VAL( LOC_POSITION_MODE_MS_ASSISTED ),
NAME_VAL( LOC_POSITION_MODE_RESERVED_1 ),
NAME_VAL( LOC_POSITION_MODE_RESERVED_2 ),
NAME_VAL( LOC_POSITION_MODE_RESERVED_3 ),
NAME_VAL( LOC_POSITION_MODE_RESERVED_4 ),
NAME_VAL( LOC_POSITION_MODE_RESERVED_5 )
};
static const int loc_eng_position_mode_num = sizeof(loc_eng_position_modes) / sizeof(loc_name_val_s_type);
const char* loc_get_position_mode_name(GpsPositionMode mode)
{
return loc_get_name_from_val(loc_eng_position_modes, loc_eng_position_mode_num, (long) mode);
}
static const loc_name_val_s_type loc_eng_position_recurrences[] =
{
NAME_VAL( GPS_POSITION_RECURRENCE_PERIODIC ),
NAME_VAL( GPS_POSITION_RECURRENCE_SINGLE )
};
static const int loc_eng_position_recurrence_num = sizeof(loc_eng_position_recurrences) / sizeof(loc_name_val_s_type);
const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur)
{
return loc_get_name_from_val(loc_eng_position_recurrences, loc_eng_position_recurrence_num, (long) recur);
}
static const loc_name_val_s_type loc_eng_aiding_data_bits[] =
{
NAME_VAL( GPS_DELETE_EPHEMERIS ),
NAME_VAL( GPS_DELETE_ALMANAC ),
NAME_VAL( GPS_DELETE_POSITION ),
NAME_VAL( GPS_DELETE_TIME ),
NAME_VAL( GPS_DELETE_IONO ),
NAME_VAL( GPS_DELETE_UTC ),
NAME_VAL( GPS_DELETE_HEALTH ),
NAME_VAL( GPS_DELETE_SVDIR ),
NAME_VAL( GPS_DELETE_SVSTEER ),
NAME_VAL( GPS_DELETE_SADATA ),
NAME_VAL( GPS_DELETE_RTI ),
NAME_VAL( GPS_DELETE_CELLDB_INFO ),
NAME_VAL( GPS_DELETE_ALL)
};
static const int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type);
const char* loc_get_aiding_data_mask_names(GpsAidingData data)
{
return NULL;
}
static const loc_name_val_s_type loc_eng_agps_types[] =
{
NAME_VAL( AGPS_TYPE_INVALID ),
NAME_VAL( AGPS_TYPE_ANY ),
NAME_VAL( AGPS_TYPE_SUPL ),
NAME_VAL( AGPS_TYPE_C2K ),
NAME_VAL( AGPS_TYPE_WWAN_ANY )
};
static const int loc_eng_agps_type_num = sizeof(loc_eng_agps_types) / sizeof(loc_name_val_s_type);
const char* loc_get_agps_type_name(AGpsType type)
{
return loc_get_name_from_val(loc_eng_agps_types, loc_eng_agps_type_num, (long) type);
}
static const loc_name_val_s_type loc_eng_ni_types[] =
{
NAME_VAL( GPS_NI_TYPE_VOICE ),
NAME_VAL( GPS_NI_TYPE_UMTS_SUPL ),
NAME_VAL( GPS_NI_TYPE_UMTS_CTRL_PLANE ),
NAME_VAL( GPS_NI_TYPE_EMERGENCY_SUPL )
};
static const int loc_eng_ni_type_num = sizeof(loc_eng_ni_types) / sizeof(loc_name_val_s_type);
const char* loc_get_ni_type_name(GpsNiType type)
{
return loc_get_name_from_val(loc_eng_ni_types, loc_eng_ni_type_num, (long) type);
}
static const loc_name_val_s_type loc_eng_ni_responses[] =
{
NAME_VAL( GPS_NI_RESPONSE_ACCEPT ),
NAME_VAL( GPS_NI_RESPONSE_DENY ),
NAME_VAL( GPS_NI_RESPONSE_DENY )
};
static const int loc_eng_ni_reponse_num = sizeof(loc_eng_ni_responses) / sizeof(loc_name_val_s_type);
const char* loc_get_ni_response_name(GpsUserResponseType response)
{
return loc_get_name_from_val(loc_eng_ni_responses, loc_eng_ni_reponse_num, (long) response);
}
static const loc_name_val_s_type loc_eng_ni_encodings[] =
{
NAME_VAL( GPS_ENC_NONE ),
NAME_VAL( GPS_ENC_SUPL_GSM_DEFAULT ),
NAME_VAL( GPS_ENC_SUPL_UTF8 ),
NAME_VAL( GPS_ENC_SUPL_UCS2 ),
NAME_VAL( GPS_ENC_UNKNOWN )
};
static const int loc_eng_ni_encoding_num = sizeof(loc_eng_ni_encodings) / sizeof(loc_name_val_s_type);
const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding)
{
return loc_get_name_from_val(loc_eng_ni_encodings, loc_eng_ni_encoding_num, (long) encoding);
}
static const loc_name_val_s_type loc_eng_agps_bears[] =
{
NAME_VAL( AGPS_APN_BEARER_INVALID ),
NAME_VAL( AGPS_APN_BEARER_IPV4 ),
NAME_VAL( AGPS_APN_BEARER_IPV6 ),
NAME_VAL( AGPS_APN_BEARER_IPV4V6 )
};
static const int loc_eng_agps_bears_num = sizeof(loc_eng_agps_bears) / sizeof(loc_name_val_s_type);
const char* loc_get_agps_bear_name(AGpsBearerType bearer)
{
return loc_get_name_from_val(loc_eng_agps_bears, loc_eng_agps_bears_num, (long) bearer);
}
static const loc_name_val_s_type loc_eng_server_types[] =
{
NAME_VAL( LOC_AGPS_CDMA_PDE_SERVER ),
NAME_VAL( LOC_AGPS_CUSTOM_PDE_SERVER ),
NAME_VAL( LOC_AGPS_MPC_SERVER ),
NAME_VAL( LOC_AGPS_SUPL_SERVER )
};
static const int loc_eng_server_types_num = sizeof(loc_eng_server_types) / sizeof(loc_name_val_s_type);
const char* loc_get_server_type_name(LocServerType type)
{
return loc_get_name_from_val(loc_eng_server_types, loc_eng_server_types_num, (long) type);
}
static const loc_name_val_s_type loc_eng_position_sess_status_types[] =
{
NAME_VAL( LOC_SESS_SUCCESS ),
NAME_VAL( LOC_SESS_INTERMEDIATE ),
NAME_VAL( LOC_SESS_FAILURE )
};
static const int loc_eng_position_sess_status_num = sizeof(loc_eng_position_sess_status_types) / sizeof(loc_name_val_s_type);
const char* loc_get_position_sess_status_name(enum loc_sess_status status)
{
return loc_get_name_from_val(loc_eng_position_sess_status_types, loc_eng_position_sess_status_num, (long) status);
}
static const loc_name_val_s_type loc_eng_agps_status_names[] =
{
NAME_VAL( GPS_REQUEST_AGPS_DATA_CONN ),
NAME_VAL( GPS_RELEASE_AGPS_DATA_CONN ),
NAME_VAL( GPS_AGPS_DATA_CONNECTED ),
NAME_VAL( GPS_AGPS_DATA_CONN_DONE ),
NAME_VAL( GPS_AGPS_DATA_CONN_FAILED )
};
static const int loc_eng_agps_status_num = sizeof(loc_eng_agps_status_names) / sizeof(loc_name_val_s_type);
const char* loc_get_agps_status_name(AGpsStatusValue status)
{
return loc_get_name_from_val(loc_eng_agps_status_names, loc_eng_agps_status_num, (long) status);
}

View file

@ -1,58 +0,0 @@
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef LOC_CORE_LOG_H
#define LOC_CORE_LOG_H
#ifdef __cplusplus
extern "C"
{
#endif
#include <ctype.h>
#include <gps_extended.h>
const char* loc_get_gps_status_name(GpsStatusValue gps_status);
const char* loc_get_position_mode_name(GpsPositionMode mode);
const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur);
const char* loc_get_aiding_data_mask_names(GpsAidingData data);
const char* loc_get_agps_type_name(AGpsType type);
const char* loc_get_ni_type_name(GpsNiType type);
const char* loc_get_ni_response_name(GpsUserResponseType response);
const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding);
const char* loc_get_agps_bear_name(AGpsBearerType bear);
const char* loc_get_server_type_name(LocServerType type);
const char* loc_get_position_sess_status_name(enum loc_sess_status status);
const char* loc_get_agps_status_name(AGpsStatusValue status);
#ifdef __cplusplus
}
#endif
#endif /* LOC_CORE_LOG_H */

View file

@ -1,60 +0,0 @@
###################################
##### FLP settings #####
###################################
###################################
# FLP BATCHING SIZE
###################################
# The number of batched locations
# requested to modem. The desired number
# defined below may not be satisfied, as
# the modem can only return the number
# of batched locations that can be allocated,
# which is limited by memory. The default
# batch size defined as 20 as below.
BATCH_SIZE=20
###################################
# FLP BATCHING SESSION TIMEOUT
###################################
# Duration with which batch session timeout
# happens in milliseconds. If not specified
# or set to zero, batching session timeout
# defaults to 20 seconds by the modem.
# BATCH_SESSION_TIMEOUT=20000
###################################
# FLP CAPABILITIES BIT MASK
###################################
# GEOFENCE = 0x01
# BATCHING = 0x02
# default = GEOFENCE | BATCHING
CAPABILITIES=0x03
###################################
# FLP BATCHING ACCURACY
###################################
# Set to one of the defined values below
# to define the accuracy of batching.
# If not specified, accuracy defaults
# to LOW.
# FLP BATCHING ACCURACY values:
# Low accuracy = 0
# Medium accuracy = 1
# High accuracy = 2
ACCURACY=1
###################################
# FLP GEOFENCE RESPONSIVENESS
###################################
# If set to one of the defined values below,
# it will override the responsiveness for
# FLP geofence, which implements the fused
# location API. If not set to a value defined
# below, which is default, it will not
# override the responsivness.
# FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE Values:
# 1: LOW responsiveness
# 2: MEDIUM responsiveness
# 3: HIGH responsiveness
FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE = 0

View file

@ -1,182 +0,0 @@
#URLs from which to download XTRA data
XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin
XTRA_SERVER_2=https://xtrapath2.izatcloud.net/xtra3grc.bin
XTRA_SERVER_3=https://xtrapath3.izatcloud.net/xtra3grc.bin
#Version check for XTRA
#DISABLE = 0
#AUTO = 1
#XTRA2 = 2
#XTRA3 = 3
XTRA_VERSION_CHECK=1
# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
#NTP server
NTP_SERVER=time.izatcloud.net
#XTRA CA path
XTRA_CA_PATH=/system/etc/security/cacerts
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
# If DEBUG_LEVEL is commented, Android's logging levels will be used
DEBUG_LEVEL = 3
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# Below bit mask configures how GPS functionalities
# should be locked when user turns off GPS on Settings
# Set bit 0x1 if MO GPS functionalities are to be locked
# Set bit 0x2 if NI GPS functionalities are to be locked
# default - non is locked for backward compatibility
#GPS_LOCK = 0
# supl version 1.0
SUPL_VER=0x10000
# Emergency SUPL, 1=enable, 0=disable
SUPL_ES=0
#Choose PDN for Emergency SUPL
#1 - Use emergency PDN
#0 - Use regular SUPL PDN for Emergency SUPL
USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0
#SUPL_MODE is a bit mask set in config.xml per carrier by default.
#If it is uncommented here, this value will overwrite the value from
#config.xml.
#MSA=0X2
#MSB=0X1
#SUPL_MODE=
# GPS Capabilities bit mask
# SCHEDULING = 0x01
# MSB = 0x02
# MSA = 0x04
# ON_DEMAND_TIME = 0x10
# GEOFENCE = 0x20
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
CAPABILITIES=0x37
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
# ACCURACY_THRES=5000
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
# SUPL_HOST=supl.host.com or IP
# SUPL_PORT=1234
# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=1234
# Bitmask of slots that are available
# for write/install to, where 1s indicate writable,
# and the default value is 0 where no slots
# are writable. For example, AGPS_CERT_WRITABLE_MASK
# of b1000001010 makes 3 slots available
# and the remaining 7 slots unwritable.
#AGPS_CERT_WRITABLE_MASK=0
####################################
# LTE Positioning Profile Settings
####################################
# 0: Enable RRLP on LTE(Default)
# 1: Enable LPP_User_Plane on LTE
# 2: Enable LPP_Control_Plane
# 3: Enable both LPP_User_Plane and LPP_Control_Plane
LPP_PROFILE = 2
################################
# EXTRA SETTINGS
################################
# NMEA provider (1=Modem Processor, 0=Application Processor)
NMEA_PROVIDER=0
# Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE)
SGLTE_TARGET=0
##################################################
# Select Positioning Protocol on A-GLONASS system
##################################################
# 0x1: RRC CPlane
# 0x2: RRLP UPlane
# 0x4: LLP Uplane
A_GLONASS_POS_PROTOCOL_SELECT = 0
##################################################
# Select technology for LPPe Control Plane
##################################################
# 0x1: DBH for LPPe CP
# 0x2: WLAN AP Measurements for LPPe CP
LPPE_CP_TECHNOLOGY = 0
##################################################
# Select technology for LPPe User Plane
##################################################
# 0x1: DBH for LPPe UP
# 0x2: WLAN AP Measurements for LPPe UP
LPPE_UP_TECHNOLOGY = 0
##################################################
# AGPS_CONFIG_INJECT
##################################################
# enable/disable injection of AGPS configurations:
# SUPL_VER
# SUPL_HOST
# SUPL_PORT
# C2K_HOST
# C2K_PORT
# LPP_PROFILE
# A_GLONASS_POS_PROTOCOL_SELECT
# 0: disable
# 1: enable
AGPS_CONFIG_INJECT = 1
# AP Coarse Timestamp Uncertainty
##################################################
# default : 10
# or as per clock uncertainty of product
AP_TIMESTAMP_UNCERTAINTY = 10
#####################################
# GNSS PPS settings
#####################################
#AP DR engine availability status
# 0 : NO AP DR (default)
# 1 : AP DR enabled
#EXTERNAL_DR_ENABLED = 0
#####################################
#DR_SYNC Pulse Availability
#####################################
# 0 : DR_SYNC pulse not available (default)
# 1 : DR_SYNC pulse available
DR_SYNC_ENABLED = 0
#####################################
#PPS Device name
#####################################
PPS_DEVICENAME = /dev/pps0
#####################################
#AP Clock Accuracy
#####################################
AP_CLOCK_PPM = 100
#####################################
#MAX ms difference to detect missing pulse
#####################################
MISSING_PULSE_TIME_DELTA = 900
#####################################
#Propagation time uncertainty
#####################################
PROPAGATION_TIME_UNCERTAINTY = 1

View file

@ -1,233 +0,0 @@
#########################################
# Log verbosity control for izat modules
#########################################
# OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5
IZAT_DEBUG_LEVEL = 2
##################################################
# Select WIFI Wait Timeout value in seconds for SUPL
##################################################
WIFI_WAIT_TIMEOUT_SELECT = 0
################################
# NLP Settings
################################
# NLP_MODE 1: OSNLP Only, 2: QNP Only, 3: Combo, 4: QNP preferred
# NLP_TOLERANCE_TIME_FIRST: Time in ms used in Combo mode
# to determine how much Tolerance for first position
# NLP_TOLERANCE_TIME_AFTER: Time in ms used in Combo mode
# to determine how much Tolerance for positions after first
# NLP_THRESHOLD: Sets how many failures needed before
# switching preferred NLP in Combo mode
# NLP_ACCURACY_MULTIPLE: Determines how far off the accuracy
# must be, in multiples, between two NLP location reports to
# be considered much worse accuracy. Used in switching logic
# NLP COMBO MODE USES QNP WITH NO EULA CONSENT: Determines
# whether or not to still send network location requests to
# QNP when the EULA is not consented to by the user. QNP can
# still return ZPP locations or injected locations even
# without EULA consent, but the uncertainty can be high.
# QNP preferred mode prefers QNP when there is EULA consent,
# otherwise OSNLP is used.
NLP_MODE = 3
NLP_MODE_EMERGENCY = 2
NLP_TOLERANCE_TIME_FIRST = 5000
NLP_TOLERANCE_TIME_AFTER = 20000
NLP_THRESHOLD = 3
NLP_ACCURACY_MULTIPLE = 2
NLP_COMBO_MODE_USES_QNP_WITH_NO_EULA_CONSENT = 1
#########################################
# NLP PACKAGE AND ACTION SETTINGS
#########################################
# OSNLP_PACKAGE/OSNLP_ACTION: name/action of default NLP package
OSNLP_PACKAGE = com.google.android.gms
OSNLP_ACTION = com.android.location.service.v3.NetworkLocationProvider
# REGION_OSNLP_PACKAGE/REGION_OSNLP_ACTION:
# These two values will be used as alternative
# for particular region where default NLP is not functional.
#REGION_OSNLP_PACKAGE = com.baidu.map.location
#REGION_OSNLP_ACTION = com.android.location.service.v3.NetworkLocationProvider
# Threshold period for ZPP triggers
ZPP_TRIGGER_THRESHOLD=60000
###################################
# GEOFENCE SERVICES
###################################
# If set to one of the defined values below, it will override
# the responsiveness for geofence services, which implements
# the Proximity Alert API. If not set to a value defined below,
# which is default, it will not override the responsivness.
# The geofence HAL API is unaffected by this value.
# GEOFENCE_SERVICES_RESPONSIVENESS_OVERRIDE Values:
# 1: LOW responsiveness
# 2: MEDIUM responsiveness
# 3: HIGH responsiveness
GEOFENCE_SERVICES_RESPONSIVENESS_OVERRIDE = 0
#####################################
# IZAT PREMIUM FEATURE SETTINGS
#####################################
#Possible states of a feature:
#DISABLED
#BASIC
#PREMIUM
#GTP_CELL_PROC valid options:
# AP
# MODEM
GTP_CELL_PROC=MODEM
#GTP_CELL valid modes:
# DISABLED
# BASIC
GTP_CELL=BASIC
#GTP_WIFI valid modes:
# DISABLED
# BASIC
GTP_WIFI=BASIC
#GTP_WAA valid modes:
# DISABLED
# BASIC
GTP_WAA=DISABLED
#SAP valid modes:
# DISABLED
# BASIC
# PREMIUM
SAP=BASIC
#ODCPI valid modes:
#DISABLED
#BASIC
ODCPI=BASIC
#FREE_WIFI_SCAN_INJECT valid modes:
#DISABLED
#BASIC
FREE_WIFI_SCAN_INJECT=BASIC
#SUPL_WIFI valid modes:
#DISABLED
#BASIC
SUPL_WIFI=BASIC
#WIFI_SUPPLICANT_INFO valid modes:
#DISABLED
#BASIC
WIFI_SUPPLICANT_INFO=BASIC
#####################################
# Location process launcher settings
#####################################
# DO NOT MODIFY
# Modifying below attributes without
# caution can have serious implications.
#Values for PROCESS_STATE:
# ENABLED
# DISABLED
#FEATURE MASKS:
# GTP-WIFI 0X03
# GTP-AP-CELL 0X0c
# GTP-MP-CELL 0xc00
# GTP-WAA 0X300
# SAP 0Xc0
# ODCPI 0x1000
# FREE_WIFI_SCAN_INJECT 0x2000
# SUPL_WIFI 0x4000
# WIFI_SUPPLICANT_INFO 0x8000
#Values for PLATFORMS can be:
#1. Any valid values obtained from ro.board.platform separated by single space. For example: msm8960 msm8226
#2. 'all' or 'all exclude' -> for All platforms
#3. 'all exclude XXXX' -> All platforms exclude XXXX. For example: all exclude msm8937
#Values for BASEBAND can be:
#1. Any valid values obtained from ro.baseband separated by single space. For example: sglte sglte2
#2. 'all' or 'all exclude' -> for all basebands
#3. 'all exclude XXXX' -> All basebands exclude XXXX. For example: all exclude sglte
PROCESS_NAME=/system/bin/DR_AP_Service
PROCESS_ARGUMENT=
PROCESS_STATE=DISABLED
PROCESS_GROUPS=gps net_raw diag qcom_diag
PREMIUM_FEATURE=0
IZAT_FEATURE_MASK=0
PLATFORMS=all
BASEBAND=all
LEAN_TARGETS=DISABLED
HARDWARE_TYPE=automotive
#Valyes for LEAN_TARGETS can be:
#ENABLED -> if this process is supposed to run on lean and mean targets
#DISABLED -> if this process is to be disabled on lean and mean targets
PROCESS_NAME=/system/bin/garden_app
PROCESS_ARGUMENT=-u 0 -q 0 -j 0 -g 0 -l 0 -Z 0 -T 1
PROCESS_STATE=ENABLED
PROCESS_GROUPS=gps
PREMIUM_FEATURE=0
IZAT_FEATURE_MASK=0
PLATFORMS=all
BASEBAND=all
LEAN_TARGETS=DISABLED
HARDWARE_TYPE=automotive
PROCESS_NAME=/system/bin/gpsone_daemon
PROCESS_ARGUMENT=
PROCESS_STATE=ENABLED
PROCESS_GROUPS=inet
PREMIUM_FEATURE=0
IZAT_FEATURE_MASK=0
PLATFORMS=msm7630_fusion
BASEBAND=svlte2a sglte sglte2
LEAN_TARGETS=DISABLED
HARDWARE_TYPE=all
PROCESS_NAME=/system/bin/lowi-server
PROCESS_ARGUMENT=
PROCESS_STATE=ENABLED
PROCESS_GROUPS=gps net_admin wifi inet qcom_diag
PREMIUM_FEATURE=0
IZAT_FEATURE_MASK=0xf303
PLATFORMS=all
BASEBAND=all
LEAN_TARGETS=DISABLED
HARDWARE_TYPE=all
PROCESS_NAME=/system/bin/xtwifi-inet-agent
PROCESS_ARGUMENT=
PROCESS_STATE=ENABLED
PROCESS_GROUPS=inet gps
PREMIUM_FEATURE=1
IZAT_FEATURE_MASK=0xc0f
PLATFORMS=all
BASEBAND=all
LEAN_TARGETS=DISABLED
HARDWARE_TYPE=all
PROCESS_NAME=/system/bin/xtwifi-client
PROCESS_ARGUMENT=
PROCESS_STATE=ENABLED
PROCESS_GROUPS=wifi inet gps rfs_shared system
PREMIUM_FEATURE=1
IZAT_FEATURE_MASK=0xf0f
PLATFORMS=all
BASEBAND=all
LEAN_TARGETS=DISABLED
HARDWARE_TYPE=all
PROCESS_NAME=/system/vendor/bin/slim_daemon
PROCESS_ARGUMENT=
PROCESS_STATE=ENABLED
PROCESS_GROUPS=gps qcom_diag can
PREMIUM_FEATURE=1
IZAT_FEATURE_MASK=0xf0
PLATFORMS=all
BASEBAND=all
LEAN_TARGETS=DISABLED
HARDWARE_TYPE=all

View file

@ -1,51 +0,0 @@
#*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
#
# LOWI Config file
#
# GENERAL DESCRIPTION
# This file contains the config params for LOWI
#
# Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
# All Rights Reserved.
# Qualcomm Atheros Confidential and Proprietary.
#
# Export of this technology or software is regulated by the U.S. Government.
# Diversion contrary to U.S. law prohibited.
#=============================================================================*/
# X86 ONLY - UBUNTU:
# Copy this file in the same directory where the executable is
# The RSSI threshold used in the RTT outlier detection in half decibels. Default value recommended by the
# system team currently is -140 (corresponding to -70 dB).
LOWI_RSSI_THRESHOLD_FOR_RTT = -140
# Number of measurment per AP for RTS/CTS
LOWI_RTS_CTS_NUM_MEAS = 5
# Maximum Number of Outstanding Requests supported
LOWI_MAX_OUTSTANDING_REQUEST = 255
# Maximum number of records in Cache
LOWI_MAX_NUM_CACHE_RECORDS = 200
# Default threshold before issuing another fresh scan (ms)
LOWI_FRESH_SCAN_THRESHOLD = 500
# Timeout in case no result is reported by the driver (seconds)
LOWI_NO_RESULT_WAIT_TOLERANCE = 10
# Use Fake Wifi driver. Only valid for engineering builds
LOWI_USE_FAKE_WIFI_DRIVER = 0
# Use ROME Wifi driver. Only valid for engineering builds
# Will be removed later only for development support
LOWI_USE_ROME_WIFI_DRIVER = 0
# Use LOWI LP.
# When enabled the Discovery Request will be routed to LOWI-LP
LOWI_USE_LOWI_LP = 1
# Log level
# EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100
LOWI_LOG_LEVEL = 2

View file

@ -1,67 +0,0 @@
################################
# Sensor Settings
################################
#The following parameters are optional.
#Internal defaults support MEMS sensors
#native to most handset devices.
#Device specific sensor characterization
#for improved performance is possible as
#described in SAP application notes.
#GYRO_BIAS_RANDOM_WALK=
#ACCEL_RANDOM_WALK_SPECTRAL_DENSITY=
#ANGLE_RANDOM_WALK_SPECTRAL_DENSITY=
#RATE_RANDOM_WALK_SPECTRAL_DENSITY=
#VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY=
# Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0)
# used in loc_eng_reinit
SENSOR_ACCEL_BATCHES_PER_SEC=2
SENSOR_ACCEL_SAMPLES_PER_BATCH=5
SENSOR_GYRO_BATCHES_PER_SEC=2
SENSOR_GYRO_SAMPLES_PER_BATCH=5
# Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0)
SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4
SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25
SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4
SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25
# Sensor Control Mode (0=AUTO, 1=FORCE_ON)
# used in loc_eng_reinit
SENSOR_CONTROL_MODE=0
# Enable or Disable Sensors for GPS use (0=Enable, 1=Disable)
# used in loc_eng_reinit
SENSOR_USAGE=0
# Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK)
SENSOR_PROVIDER=1
# Bit mask used to define which sensor algorithms are used.
# Setting each bit has the following definition:
# 0x1 - DISABLE_INS_POSITIONING_FILTER
# 0x0 - ENABLE_INS_POSITIONING_FILTER
SENSOR_ALGORITHM_CONFIG_MASK=0x1
#Vehicle Network Provider configuration
#Service configuration strings
#The number before colon in VN_X items defines version of the format of the rest of the string
#VN_ACCEL_CFG=0:5
#VN_GYRO_CFG=0:5.5
#VN_ODOMETRY_CFG=0:2,4.5
VN_ACCEL_CFG=1:128,0,12,0.0048828125,12,12,0.0048828125,24,12,0.0048828125
VN_GYRO_CFG=1:129,0,16,0.00006103515625,16,16,0.00006103515625,32,16,0.00006103515625
VN_ODOMETRY_CFG=1:130,0,1,5,6,32
#Procesors clock ratio: AP and CAN bus microcontroller
VN_PROC_CLOCK_RATIO=1.93165618815148
# Time source used by Sensor HAL
# Setting this value controls accuracy of location sensor services.
# 0 - Unknown
# 1 - CLOCK_BOOTTIME
# 2 - CLOCK_MONOTONIC
# 3 - CLOCK_REALTIME
# 4 - CLOCK_BOOTTIME using Alarm timer interface
NDK_PROVIDER_TIME_SOURCE=1

View file

@ -1,82 +0,0 @@
#GTP AP Project client core config file
#
#GENERAL DESCRIPTION
#This is used by client core
#
#Copyright (c) 2012-2014 Qualcomm Atheros, Inc.
#All Rights Reserved.
#Qualcomm Atheros Confidential and Proprietary.
# Log verbosity control for most of the GTP WiFi system, including native and
# Java componenets
# OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5, ALL = 100
DEBUG_GLOBAL_LOG_LEVEL = 2
# this is used at the server side to distinguish uploads from different maker/model
# default "Qualcomm"
OEM_ID_IN_REQUEST_TO_SERVER = "Qualcomm"
# this is used at the server side to distinguish uploads from different maker/model
# default "UNKNOWN"
MODEL_ID_IN_REQUEST_TO_SERVER = "UNKNOWN"
##############################################################################
# GTP-WiFi positioning config #
##############################################################################
# URL for the server position request
XT_SERVER_ROOT_URL = https://gtpa1.izatcloud.net:443/uds/v2
# size, in bytes, of the cache on device
SIZE_BYTE_TOTAL_CACHE = 5000000
# value 0: (default) use the async LOWI wifi scanner
# value 10: FAKE AP wifi scanner
WIFI_SCANNER_CHOICE = 0
##############################################################################
# XT-WiFi crowd sourcing config #
##############################################################################
# Use server suggestion for crowd sourcing configuration
ENABLE_SERVER_SUGGESTION_FOR_CROWD_SOURCING = 1
# Maximum number of APs to be collected for upload
NUM_MAX_AP_PER_UPLOAD = 16383
# Number of minutes between upload: 24 hours
INTERVAL_MIN_UPLOAD = 1440
# Number of minutes between forced upload: 5 days
INTERVAL_MIN_FORCED_UPLOAD = 7200
# The minimum time between two collected AP data sets in seconds
INTERVAL_SEC_AP_SETS_COLLECT = 10
# Timeout for scan interval when phone is on: 600 seconds (10 minute)
INTERVAL_SEC_SCAN = 600
# Timeout for scan interval when phone has not continusouly on for INTERVAL_MIN_SCAN
INTERVAL_MIN_FORCED_SCAN = 480
# Maximum number of Cell DB records for upload
WWAN_MAX_CELLDB_RECORDS_PER_UPLOAD = 1000
##############################################################################
# GTP AP cell config #
##############################################################################
# This item specifies the RIL server name.
# This configure item can not be removed in Android target.
XTRAT_WWAN_LITE_LOC_RIL_SERVER_NAME = "OS-Agent"
# Maximum total number of SNA records cached in mobile storage.
# Max allowed value is 10000
# Min value is 100
XTRAT_WWAN_LITE_MAX_DL_SNA = 10000
# Maximum total number of BSA records cached in mobile storage.
# Max allowed value is 65000
# Min value is 100
XTRAT_WWAN_LITE_MAX_DL_BSA = 65000
##############################################################################
# Qualcomm Network Location Provider config #
##############################################################################
# Accuracy Threshold for NLP position. Position exceeds thsi threshold will be filtered out.
# Default is 25000 meters.
LARGE_ACCURACY_THRESHOLD_TO_FILTER_NLP_POSITION = 25000

View file

@ -1,32 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libgnsspps
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := \
libutils \
libcutils \
libgps.utils \
liblog
LOCAL_SRC_FILES += \
gnsspps.c
LOCAL_CFLAGS += \
-fno-short-enums \
-D_ANDROID_
LOCAL_COPY_HEADERS_TO:= libgnsspps/
LOCAL_COPY_HEADERS:= \
gnsspps.h
## Includes
LOCAL_C_INCLUDES := \
$(TARGET_OUT_HEADERS)/gps.utils \
$(TARGET_OUT_HEADERS)/libloc_pla
include $(BUILD_SHARED_LIBRARY)

View file

@ -1,35 +0,0 @@
AM_CFLAGS = \
$(LOCPLA_CFLAGS) \
-I./
ACLOCAL_AMFLAGS = -I m4
libgnsspps_la_SOURCES = \
gnsspps.c
if USE_GLIB
libgnsspps_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
libgnsspps_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
libgnsspps_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
else
libgnsspps_la_CFLAGS = $(AM_CFLAGS)
libgnsspps_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
libgnsspps_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
endif
libgnsspps_la_LIBADD = -lstdc++
library_include_HEADERS = \
gnsspps.h
#Create and Install libraries
lib_LTLIBRARIES = libgnsspps.la
library_includedir = $(pkgincludedir)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gnsspps.pc
EXTRA_DIST = $(pkgconfig_DATA)

View file

@ -1,60 +0,0 @@
# configure.ac -- Autoconf script for gps lbs-core
#
# Process this file with autoconf to produce a configure script
# Requires autoconf tool later than 2.61
AC_PREREQ(2.61)
# Initialize the gps lbs-core package version 1.0.0
AC_INIT([gnsspps],1.0.0)
# Does not strictly follow GNU Coding standards
AM_INIT_AUTOMAKE([foreign])
# Disables auto rebuilding of configure, Makefile.ins
AM_MAINTAINER_MODE
# Verifies the --srcdir is correct by checking for the path
AC_CONFIG_SRCDIR([Makefile.am])
# defines some macros variable to be included by source
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_LIBTOOL
AC_PROG_CXX
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_AWK
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
PKG_PROG_PKG_CONFIG
# Checks for libraries.
PKG_CHECK_MODULES([LOCPLA], [loc-pla])
AC_SUBST([LOCPLA_CFLAGS])
AC_SUBST([LOCPLA_LIBS])
AC_ARG_WITH([glib],
AC_HELP_STRING([--with-glib],
[enable glib, building HLOS systems which use glib]))
if (test "x${with_glib}" = "xyes"); then
AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
AC_MSG_ERROR(GThread >= 2.16 is required))
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
AC_MSG_ERROR(GLib >= 2.16 is required))
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
fi
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
AC_CONFIG_FILES([ \
Makefile \
gnsspps.pc
])
AC_OUTPUT

View file

@ -1,194 +0,0 @@
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundatoin, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <platform_lib_log_util.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <pthread.h>
#include <timepps.h>
#include <linux/types.h>
//DRsync kernel timestamp
static struct timespec drsyncKernelTs = {0,0};
//DRsync userspace timestamp
static struct timespec drsyncUserTs = {0,0};
//flag to stop fetching timestamp
static int isActive = 0;
static pps_handle handle;
static pthread_mutex_t ts_lock;
/* checks the PPS source and opens it */
int check_device(char *path, pps_handle *handle)
{
int ret;
/* Try to find the source by using the supplied "path" name */
ret = open(path, O_RDWR);
if (ret < 0)
{
LOC_LOGV("%s:%d unable to open device %s", __func__, __LINE__, path);
return ret;
}
/* Open the PPS source */
ret = pps_create(ret, handle);
if (ret < 0)
{
LOC_LOGV( "%s:%d cannot create a PPS source from device %s", __func__, __LINE__, path);
return -1;
}
return 0;
}
/* fetches the timestamp from the PPS source */
int read_pps(pps_handle *handle)
{
struct timespec timeout;
pps_info infobuf;
int ret;
// 3sec timeout
timeout.tv_sec = 3;
timeout.tv_nsec = 0;
ret = pps_fetch(*handle, PPS_TSFMT_TSPEC, &infobuf,&timeout);
if (ret < 0 && ret !=-EINTR)
{
LOC_LOGV("%s:%d pps_fetch() error %d", __func__, __LINE__, ret);
return -1;
}
pthread_mutex_lock(&ts_lock);
drsyncKernelTs.tv_sec = infobuf.tv_sec;
drsyncKernelTs.tv_nsec = infobuf.tv_nsec;
ret = clock_gettime(CLOCK_BOOTTIME,&drsyncUserTs);
pthread_mutex_unlock(&ts_lock);
if(ret != 0)
{
LOC_LOGV("%s:%d clock_gettime() error",__func__,__LINE__);
}
return 0;
}
#ifdef __cplusplus
extern "C" {
#endif
/* infinitely calls read_pps() */
void *thread_handle(void *input)
{
int ret;
if(input != NULL)
{
LOC_LOGV("%s:%d Thread Input is present", __func__, __LINE__);
}
while(isActive)
{
ret = read_pps(&handle);
if (ret == -1 && errno != ETIMEDOUT )
{
LOC_LOGV("%s:%d Could not fetch PPS source", __func__, __LINE__);
}
}
return NULL;
}
/* opens the device and fetches from PPS source */
int initPPS(char *devname)
{
int ret,pid;
pthread_t thread;
isActive = 1;
ret = check_device(devname, &handle);
if (ret < 0)
{
LOC_LOGV("%s:%d Could not find PPS source", __func__, __LINE__);
return 0;
}
pthread_mutex_init(&ts_lock,NULL);
pid = pthread_create(&thread,NULL,&thread_handle,NULL);
if(pid != 0)
{
LOC_LOGV("%s:%d Could not create thread in InitPPS", __func__, __LINE__);
return 0;
}
return 1;
}
/* stops fetching and closes the device */
void deInitPPS()
{
pthread_mutex_lock(&ts_lock);
isActive = 0;
pthread_mutex_unlock(&ts_lock);
pthread_mutex_destroy(&ts_lock);
pps_destroy(handle);
}
/* retrieves DRsync kernel timestamp,DRsync userspace timestamp
and updates current timestamp */
/* Returns:
* 1. @Param out DRsync kernel timestamp
* 2. @Param out DRsync userspace timestamp
* 3. @Param out current timestamp
*/
int getPPS(struct timespec *fineKernelTs ,struct timespec *currentTs,
struct timespec *fineUserTs)
{
int ret;
pthread_mutex_lock(&ts_lock);
fineKernelTs->tv_sec = drsyncKernelTs.tv_sec;
fineKernelTs->tv_nsec = drsyncKernelTs.tv_nsec;
fineUserTs->tv_sec = drsyncUserTs.tv_sec;
fineUserTs->tv_nsec = drsyncUserTs.tv_nsec;
ret = clock_gettime(CLOCK_BOOTTIME,currentTs);
pthread_mutex_unlock(&ts_lock);
if(ret != 0)
{
LOC_LOGV("%s:%d clock_gettime() error",__func__,__LINE__);
return 0;
}
return 1;
}
#ifdef __cplusplus
}
#endif

View file

@ -1,45 +0,0 @@
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundatoin, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _GNSSPPS_H
#define _GNSSPPS_H
#ifdef __cplusplus
extern "C" {
#endif
/* opens the device and fetches from PPS source */
int initPPS(char *devname);
/* updates the fine time stamp */
int getPPS(struct timespec *current_ts, struct timespec *current_boottime, struct timespec *last_boottime);
/* stops fetching and closes the device */
void deInitPPS();
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,10 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: gnsspps
Description: QTI GPS drplugin-client
Version: @VERSION
Libs: -L${libdir} -lgnsspps
Cflags: -I${includedir}/gnsspps

View file

@ -1,106 +0,0 @@
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundatoin, nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <errno.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/pps.h>
#ifndef _TIMEPPS_H
#define _TIMEPPS_H
#ifdef __cplusplus
extern "C" {
#endif
/* time of assert event */
typedef struct timespec pps_info;
/* represents pps source */
typedef int pps_handle;
/* Open the PPS source */
static __inline int pps_create(int source, pps_handle *handle)
{
int ret;
struct pps_kparams dummy;
if (!handle)
{
errno = EINVAL;
return -1;
}
/* check if current device is valid pps */
ret = ioctl(source, PPS_GETPARAMS, &dummy);
if (ret)
{
errno = EOPNOTSUPP;
return -1;
}
*handle = source;
return 0;
}
/* close the pps source */
static __inline int pps_destroy(pps_handle handle)
{
return close(handle);
}
/*reads timestamp from pps device*/
static __inline int pps_fetch(pps_handle handle, const int tsformat,
pps_info *ppsinfobuf,
const struct timespec *timeout)
{
struct pps_fdata fdata;
int ret;
if (tsformat != PPS_TSFMT_TSPEC)
{
errno = EINVAL;
return -1;
}
if (timeout)
{
fdata.timeout.sec = timeout->tv_sec;
fdata.timeout.nsec = timeout->tv_nsec;
fdata.timeout.flags = ~PPS_TIME_INVALID;
}
else
{
fdata.timeout.flags = PPS_TIME_INVALID;
}
ret = ioctl(handle, PPS_FETCH, &fdata);
ppsinfobuf->tv_sec = fdata.info.assert_tu.sec;
ppsinfobuf->tv_nsec = fdata.info.assert_tu.nsec;
return ret;
}
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,10 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: loc-hal
Description: QTI GPS Loc HAL
Version: @VERSION
Libs: -L${libdir} -lgps_utils_so -lloc_core -lloc_eng_so -lgps_default_so -lloc_ds_api -lloc_api_v02
Cflags: -I${includedir} -I${includedir}/loc-hal/utils -I${includedir}/loc-hal/core -I${includedir}/loc-hal

View file

@ -1,13 +0,0 @@
LOCAL_PATH := $(call my-dir)
# add RPC dirs if RPC is available
ifneq ($(TARGET_NO_RPC),true)
GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api-rpc-50001/
endif #TARGET_NO_RPC
GPS_DIR_LIST += $(LOCAL_PATH)/libloc_api_50001/
#call the subfolders
include $(addsuffix Android.mk, $(GPS_DIR_LIST))

View file

@ -1,133 +0,0 @@
AM_CFLAGS = \
-I./ \
-I../core \
-I./libloc_api_50001 \
-I../utils \
$(LOCPLA_CFLAGS) \
-fno-short-enums \
-D__func__=__PRETTY_FUNCTION__ \
-DTARGET_USES_QCOM_BSP
libloc_eng_so_la_h_sources = \
loc_eng_dmn_conn_glue_msg.h \
loc_eng_dmn_conn_glue_pipe.h \
loc_eng_dmn_conn.h \
loc_eng_dmn_conn_handler.h \
loc_eng_dmn_conn_thread_helper.h
libloc_eng_so_la_SOURCES = \
libloc_api_50001/loc_eng.cpp \
libloc_api_50001/loc_eng_agps.cpp \
libloc_api_50001/loc_eng_xtra.cpp \
libloc_api_50001/loc_eng_ni.cpp \
libloc_api_50001/loc_eng_log.cpp \
libloc_api_50001/loc_eng_nmea.cpp \
libloc_api_50001/LocEngAdapter.cpp \
libloc_api_50001/loc_eng_dmn_conn.cpp \
libloc_api_50001/loc_eng_dmn_conn_handler.cpp \
libloc_api_50001/loc_eng_dmn_conn_thread_helper.c \
libloc_api_50001/loc_eng_dmn_conn_glue_msg.c \
libloc_api_50001/loc_eng_dmn_conn_glue_pipe.c
libloc_eng_so_la_SOURCES += libloc_eng_so_la_h_sources
if USE_GLIB
libloc_eng_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
libloc_eng_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
libloc_eng_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
else
libloc_eng_so_la_CFLAGS = $(AM_CFLAGS)
libloc_eng_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
libloc_eng_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
endif
libloc_eng_so_la_LIBADD = -lstdc++ -ldl -llog $(LOCPLA_LIBS) ../utils/libgps_utils_so.la ../core/libloc_core.la
libgps_default_so_la_SOURCES = \
libloc_api_50001/loc.cpp \
libloc_api_50001/gps.c
if USE_GLIB
libgps_default_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
libgps_default_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
libgps_default_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
else
libgps_default_so_la_CFLAGS = $(AM_CFLAGS)
libgps_default_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
libgps_default_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
endif
libgps_default_so_la_LIBADD = -lstdc++ -llog $(LOCPLA_LIBS) ../utils/libgps_utils_so.la ../core/libloc_core.la -ldl libloc_eng_so.la
libloc_ds_api_CFLAGS = \
$(QMIF_CFLAGS) \
$(QMI_CFLAGS) \
$(DATA_CFLAGS) \
-I$(WORKSPACE)/qcom-opensource/location/loc_api/ds_api
libloc_ds_api_la_SOURCES = \
$(WORKSPACE)/qcom-opensource/location/loc_api/ds_api/ds_client.c
if USE_GLIB
libloc_ds_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(libloc_ds_api_CFLAGS) @GLIB_CFLAGS@
libloc_ds_api_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
libloc_ds_api_la_LDFLAGS += -Wl,--export-dynamic
libloc_ds_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(libloc_ds_api_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
else
libloc_ds_api_la_CFLAGS = $(AM_CFLAGS) $(libloc_ds_api_CFLAGS)
libloc_ds_api_la_LDFLAGS = -lstdc++ -lpthread -Wl,--export-dynamic -shared -version-info 1:0:0
libloc_ds_api_la_LDFLAGS += -Wl,--export-dynamic
libloc_ds_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) $(libloc_ds_api_CFLAGS)
endif
libloc_ds_api_la_LIBADD = -lstdc++ $(QMIF_LIBS) -lqmiservices -ldsi_netctrl $(LOCPLA_LIBS) ../utils/libgps_utils_so.la
#libloc_ds_api_la_LIBADD = -lstdc++ $(QMIF_LIBS) -lqmiservices $(LOCPLA_LIBS) ../utils/libgps_utils_so.la
libloc_api_v02_CFLAGS = \
$(QMIF_CFLAGS) \
-I$(WORKSPACE)/qcom-opensource/location/loc_api/ds_api \
-I$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02
libloc_api_v02_la_SOURCES = \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/LocApiV02.cpp \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_v02_log.c \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_v02_client.c \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_sync_req.c \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/location_service_v02.c
if USE_GLIB
libloc_api_v02_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(libloc_api_v02_CFLAGS) @GLIB_CFLAGS@
libloc_api_v02_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
libloc_api_v02_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(libloc_api_v02_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
else
libloc_api_v02_la_CFLAGS = $(AM_CFLAGS) $(libloc_api_v02_CFLAGS)
libloc_api_v02_la_LDFLAGS = -lstdc++ -lpthread -shared -version-info 1:0:0
libloc_api_v02_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) $(libloc_api_v02_CFLAGS)
endif
libloc_api_v02_la_CXXFLAGS = -std=c++0x
libloc_api_v02_la_LIBADD = -lstdc++ -lqmi_cci -lqmi_common_so $(QMIF_LIBS) $(LOCPLA_LIBS) ../core/libloc_core.la ../utils/libgps_utils_so.la libloc_ds_api.la
library_include_HEADERS = \
libloc_api_50001/LocEngAdapter.h \
libloc_api_50001/loc.h \
libloc_api_50001/loc_eng.h \
libloc_api_50001/loc_eng_xtra.h \
libloc_api_50001/loc_eng_ni.h \
libloc_api_50001/loc_eng_agps.h \
libloc_api_50001/loc_eng_msg.h \
libloc_api_50001/loc_eng_log.h \
$(WORKSPACE)/qcom-opensource/location/loc_api/ds_api/ds_client.h \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/location_service_v02.h \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_v02_log.h \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_v02_client.h \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_api_sync_req.h \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/LocApiV02.h \
$(WORKSPACE)/qcom-opensource/location/loc_api/loc_api_v02/loc_util_log.h
library_includedir = $(pkgincludedir)
#Create and Install libraries
lib_LTLIBRARIES = libloc_eng_so.la libgps_default_so.la libloc_ds_api.la libloc_api_v02.la

View file

@ -1,3 +0,0 @@
ifeq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION),50001)
include $(call all-subdir-makefiles)
endif

View file

@ -1,60 +0,0 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
RPC_INC:=rpc_inc
source_files:= \
src/loc_api_rpc_glue.c \
src/loc_api_sync_call.c \
src/loc_apicb_appinit.c \
src/loc_api_fixup.c \
src/loc_api_log.c \
src/LocApiRpc.cpp
LOCAL_SRC_FILES:= $(source_files)
LOCAL_CFLAGS:=-fno-short-enums
LOCAL_CFLAGS+=-DDEBUG -DUSE_QCOM_AUTO_RPC -DUSE_QCOM_AUTO_RPC
LOCAL_CFLAGS+=$(GPS_FEATURES)
# for loc_api_fixup.c
LOCAL_CFLAGS+=-DADD_XDR_FLOAT -DADD_XDR_BOOL
LOCAL_SHARED_LIBRARIES:= \
librpc \
libutils \
libcutils \
libcommondefs \
libgps.utils \
libloc_core
LOCAL_STATIC_LIBRARIES := \
libloc_api_rpcgen
LOCAL_PRELINK_MODULE:= false
LOCAL_C_INCLUDES:= \
$(LOCAL_PATH) \
$(LOCAL_PATH)/rpc_inc \
$(TARGET_OUT_HEADERS)/gps.utils \
$(TARGET_OUT_HEADERS)/libloc_core \
$(TARGET_OUT_HEADERS)/loc_api/rpcgen/inc \
$(TARGET_OUT_HEADERS)/libcommondefs/rpcgen/inc \
$(TARGET_OUT_HEADERS)/librpc \
$(TARGET_OUT_HEADERS)/libloc-rpc/rpc_inc \
$(TOP)/hardware/msm7k/librpc
LOCAL_COPY_HEADERS_TO:= libloc_api-rpc-qc/$(RPC_INC)
LOCAL_COPY_HEADERS:= \
$(RPC_INC)/loc_api_rpc_glue.h \
$(RPC_INC)/loc_api_fixup.h \
$(RPC_INC)/loc_api_sync_call.h \
$(RPC_INC)/loc_apicb_appinit.h \
$(RPC_INC)/LocApiRpc.h
LOCAL_MODULE:= libloc_api-rpc-qc
LOCAL_MODULE_OWNER := qcom
LOCAL_MODULE_TAGS := optional
include $(BUILD_SHARED_LIBRARY)

View file

@ -1,46 +0,0 @@
AM_CFLAGS = \
-I../../../utils \
-I../../../platform_lib_abstractions \
-I./rpc_inc \
-I../libloc_api-rpc-stub/inc \
-I../../libloc_api_50001 \
$(MSM7K_CFLAGS) \
-DUSE_QCOM_AUTO_RPC
requiredlibs = \
../../../utils/libgps_utils_so.la \
$(MSM7K_LIBS)
h_sources = \
rpc_inc/loc_api_rpc_glue.h \
rpc_inc/loc_api_fixup.h \
rpc_inc/loc_api_sync_call.h \
rpc_inc/loc_apicb_appinit.h \
c_sources = \
src/loc_api_rpc_glue.c \
src/loc_api_sync_call.c \
src/loc_apicb_appinit.c \
src/loc_api_fixup.c \
src/loc_api_log.c \
src/LocApiRpcAdapter.cpp \
library_includedir = $(pkgincludedir)/libloc_api-rpc-50001/libloc_api-rpc-glue/rpc_inc
library_include_HEADERS = $(h_sources)
libloc_api_rpc_qc_la_SOURCES = $(c_sources) $(h_sources)
if USE_GLIB
libloc_api_rpc_qc_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
libloc_api_rpc_qc_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
libloc_api_rpc_qc_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
else
libloc_api_rpc_qc_la_CFLAGS = $(AM_CFLAGS)
libloc_api_rpc_qc_la_LDFLAGS = -lpthread -shared -version-info 1:0:0
libloc_api_rpc_qc_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
endif
libloc_api_rpc_qc_la_LIBADD = $(requiredlibs) -lstdc++
#Create and Install Libraries
lib_LTLIBRARIES = libloc_api_rpc_qc.la

View file

@ -1,142 +0,0 @@
/* Copyright (c) 2011,2014, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef LOC_API_RPC_H
#define LOC_API_RPC_H
#include <rpc/rpc.h>
#include <loc_api_rpcgen_common_rpc.h>
#include <loc_api_rpc_glue.h>
#include <LocApiBase.h>
#include <loc_log.h>
using namespace loc_core;
class LocApiRpc : public LocApiBase {
protected:
// RPC communication establishment
rpc_loc_client_handle_type client_handle;
private:
int dataEnableLastSet;
char apnLastSet[MAX_APN_LEN];
static const LOC_API_ADAPTER_EVENT_MASK_T maskAll;
static const rpc_loc_event_mask_type locBits[];
static rpc_loc_event_mask_type convertMask(LOC_API_ADAPTER_EVENT_MASK_T mask);
static rpc_loc_lock_e_type convertGpsLockMask(LOC_GPS_LOCK_MASK lockMask);
static enum loc_api_adapter_err convertErr(int rpcErr);
static GpsNiEncodingType convertNiEncodingType(int loc_encoding);
static int NIEventFillVerfiyType(GpsNiNotification &notif,
rpc_loc_ni_notify_verify_e_type notif_priv);
void reportPosition(const rpc_loc_parsed_position_s_type *location_report_ptr);
void reportSv(const rpc_loc_gnss_info_s_type *gnss_report_ptr);
void reportStatus(const rpc_loc_status_event_s_type *status_report_ptr);
void reportNmea(const rpc_loc_nmea_report_s_type *nmea_report_ptr);
void ATLEvent(const rpc_loc_server_request_s_type *server_request_ptr);
void NIEvent(const rpc_loc_ni_event_s_type *ni_req_ptr);
protected:
virtual enum loc_api_adapter_err
open(LOC_API_ADAPTER_EVENT_MASK_T mask);
virtual enum loc_api_adapter_err
close();
LocApiRpc(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask);
public:
static LocApiRpc* createLocApiRpc(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask);
~LocApiRpc();
virtual int locEventCB(rpc_loc_client_handle_type client_handle,
rpc_loc_event_mask_type loc_event,
const rpc_loc_event_payload_u_type* loc_event_payload);
void locRpcGlobalCB(CLIENT* clnt, enum rpc_reset_event event);
// RPC adapter interface implementations
virtual enum loc_api_adapter_err
startFix(const LocPosMode& posMode);
virtual enum loc_api_adapter_err
stopFix();
virtual enum loc_api_adapter_err
setPositionMode(const LocPosMode& mode);
inline virtual enum loc_api_adapter_err
enableData(int enable) { return enableData(enable, false); }
virtual enum loc_api_adapter_err
enableData(int enable, boolean force);
virtual enum loc_api_adapter_err
setTime(GpsUtcTime time, int64_t timeReference, int uncertainty);
virtual enum loc_api_adapter_err
injectPosition(double latitude, double longitude, float accuracy);
virtual enum loc_api_adapter_err
deleteAidingData(GpsAidingData f);
virtual enum loc_api_adapter_err
informNiResponse(GpsUserResponseType userResponse, const void* passThroughData);
inline virtual enum loc_api_adapter_err
setAPN(char* apn, int len) { return setAPN(apn, len, false); }
virtual enum loc_api_adapter_err
setAPN(char* apn, int len, boolean force);
virtual enum loc_api_adapter_err
setServer(const char* url, int len);
virtual enum loc_api_adapter_err
setServer(unsigned int ip, int port, LocServerType type);
virtual enum loc_api_adapter_err
setXtraData(char* data, int length);
virtual enum loc_api_adapter_err
requestXtraServer();
virtual enum loc_api_adapter_err
atlOpenStatus(int handle, int is_succ, char* apn, AGpsBearerType bear, AGpsType agpsType);
virtual enum loc_api_adapter_err
atlCloseStatus(int handle, int is_succ);
virtual enum loc_api_adapter_err
setSUPLVersion(uint32_t version);
virtual void setInSession(bool inSession);
/*Values for lock
1 = Do not lock any position sessions
2 = Lock MI position sessions
3 = Lock MT position sessions
4 = Lock all position sessions
*/
virtual int setGpsLock(LOC_GPS_LOCK_MASK lock);
/*
Returns
Current value of GPS Lock on success
-1 on failure
*/
virtual int getGpsLock(void);
};
extern "C" LocApiBase* getLocApi(const MsgTask* msgTask,
LOC_API_ADAPTER_EVENT_MASK_T exMask,
ContextBase *context);
#endif //LOC_API_RPC_H

Some files were not shown because too many files have changed in this diff Show more