├── Android.mk ├── BoardConfig.mk ├── audio ├── acdb │ ├── QRD_Bluetooth_cal.acdb │ ├── QRD_General_cal.acdb │ ├── QRD_Global_cal.acdb │ ├── QRD_Handset_cal.acdb │ ├── QRD_Hdmi_cal.acdb │ ├── QRD_Headset_cal.acdb │ ├── QRD_Speaker_cal.acdb │ └── workspaceFile.qwsp ├── audio_platform_info.xml ├── audio_policy.conf └── mixer_paths.xml ├── bluetooth └── bdroid_buildcfg.h ├── board-info.txt ├── board ├── bluetooth.mk ├── dexopt.mk ├── filesystem.mk ├── kernel.mk ├── lights.mk ├── qcom-camera.mk ├── qcom-cne.mk ├── qcom-gps.mk ├── qcom-wlan.mk ├── recovery.mk └── sepolicy.mk ├── camera ├── Android.mk ├── CleanSpec.mk ├── MODULE_LICENSE_BSD ├── QCamera │ ├── Android.mk │ ├── HAL │ │ ├── Android.mk │ │ ├── core │ │ │ ├── Android.mk │ │ │ ├── inc │ │ │ │ ├── QCameraHAL.h │ │ │ │ ├── QCameraHWI.h │ │ │ │ ├── QCameraHWI_Mem.h │ │ │ │ └── QCameraStream.h │ │ │ └── src │ │ │ │ ├── QCameraHAL.cpp │ │ │ │ ├── QCameraHWI.cpp │ │ │ │ ├── QCameraHWI_Mem.cpp │ │ │ │ ├── QCameraHWI_Parm.cpp │ │ │ │ ├── QCameraHWI_Preview.cpp │ │ │ │ ├── QCameraHWI_Rdi.cpp │ │ │ │ ├── QCameraHWI_Record.cpp │ │ │ │ ├── QCameraHWI_Still.cpp │ │ │ │ ├── QCameraParameters.cpp │ │ │ │ └── QCameraStream.cpp │ │ ├── test │ │ │ └── Android.mk │ │ ├── usbcamcore │ │ │ ├── inc │ │ │ │ ├── QCameraMjpegDecode.h │ │ │ │ ├── QCameraUsbParm.h │ │ │ │ ├── QCameraUsbPriv.h │ │ │ │ └── QualcommUsbCamera.h │ │ │ └── src │ │ │ │ ├── QCameraMjpegDecode.cpp │ │ │ │ ├── QCameraUsbParm.cpp │ │ │ │ └── QualcommUsbCamera.cpp │ │ └── wrapper │ │ │ ├── QualcommCamera.cpp │ │ │ └── QualcommCamera.h │ ├── HAL2 │ │ ├── Android.mk │ │ ├── core │ │ │ ├── Android.mk │ │ │ ├── inc │ │ │ │ ├── QCameraHAL.h │ │ │ │ ├── QCameraHWI.h │ │ │ │ ├── QCameraParameters.h │ │ │ │ ├── QCameraStream.h │ │ │ │ └── QCamera_Intf.h │ │ │ └── src │ │ │ │ ├── QCameraHAL.cpp │ │ │ │ ├── QCameraHWI.cpp │ │ │ │ ├── QCameraHWI_Metatags.cpp │ │ │ │ ├── QCameraStream.cpp │ │ │ │ └── QCameraStream_Preview.cpp │ │ ├── test │ │ │ └── Android.mk │ │ └── wrapper │ │ │ ├── QualcommCamera.cpp │ │ │ └── QualcommCamera.h │ └── stack │ │ ├── Android.mk │ │ ├── common │ │ └── cam_list.h │ │ ├── mm-camera-interface │ │ ├── Android.mk │ │ ├── inc │ │ │ ├── mm_camera.h │ │ │ ├── mm_camera_dbg.h │ │ │ ├── mm_camera_interface.h │ │ │ └── mm_camera_sock.h │ │ └── src │ │ │ ├── mm_camera.c │ │ │ ├── mm_camera_channel.c │ │ │ ├── mm_camera_data.c │ │ │ ├── mm_camera_helper.c │ │ │ ├── mm_camera_interface.c │ │ │ ├── mm_camera_sock.c │ │ │ ├── mm_camera_stream.c │ │ │ └── mm_camera_thread.c │ │ ├── mm-camera-test │ │ ├── Android.mk │ │ ├── inc │ │ │ ├── mm_qcamera_app.h │ │ │ ├── mm_qcamera_display_dimensions.h │ │ │ ├── mm_qcamera_main_menu.h │ │ │ └── mm_qcamera_unit_test.h │ │ └── src │ │ │ ├── mm_qcamera_app.c │ │ │ ├── mm_qcamera_display.c │ │ │ ├── mm_qcamera_dual_test.c │ │ │ ├── mm_qcamera_main_menu.c │ │ │ ├── mm_qcamera_pp.c │ │ │ ├── mm_qcamera_preview.c │ │ │ ├── mm_qcamera_rdi.c │ │ │ ├── mm_qcamera_snapshot.c │ │ │ ├── mm_qcamera_unit_test.c │ │ │ └── mm_qcamera_video.c │ │ └── mm-jpeg-interface │ │ ├── Android.mk │ │ ├── inc │ │ ├── mm_jpeg.h │ │ ├── mm_jpeg_dbg.h │ │ └── mm_jpeg_interface.h │ │ └── src │ │ ├── mm_jpeg.c │ │ ├── mm_jpeg_interface.c │ │ └── mm_jpeg_queue.c ├── QCamera2 │ ├── Android.mk │ ├── HAL │ │ ├── Android.mk │ │ ├── QCamera2Factory.cpp │ │ ├── QCamera2Factory.h │ │ ├── QCamera2HWI.cpp │ │ ├── QCamera2HWI.h │ │ ├── QCamera2HWICallbacks.cpp │ │ ├── QCamera2Hal.cpp │ │ ├── QCameraAllocator.h │ │ ├── QCameraChannel.cpp │ │ ├── QCameraChannel.h │ │ ├── QCameraMem.cpp │ │ ├── QCameraMem.h │ │ ├── QCameraParameters.cpp │ │ ├── QCameraParameters.h │ │ ├── QCameraPostProc.cpp │ │ ├── QCameraPostProc.h │ │ ├── QCameraStateMachine.cpp │ │ ├── QCameraStateMachine.h │ │ ├── QCameraStream.cpp │ │ ├── QCameraStream.h │ │ ├── QCameraThermalAdapter.cpp │ │ ├── QCameraThermalAdapter.h │ │ ├── test │ │ │ ├── Android.mk │ │ │ ├── qcamera_test.cpp │ │ │ └── qcamera_test.h │ │ ├── tsMakeuplib │ │ │ └── include │ │ │ │ ├── ts_detectface_engine.h │ │ │ │ ├── ts_makeup_data.h │ │ │ │ ├── ts_makeup_engine.h │ │ │ │ └── ts_makeup_image.h │ │ └── wrapper │ │ │ ├── QualcommCamera.cpp │ │ │ └── QualcommCamera.h │ ├── stack │ │ ├── Android.mk │ │ ├── common │ │ │ ├── cam_intf.h │ │ │ ├── cam_list.h │ │ │ ├── cam_queue.h │ │ │ ├── cam_semaphore.h │ │ │ ├── cam_types.h │ │ │ ├── mm_camera_interface.h │ │ │ └── mm_jpeg_interface.h │ │ ├── mm-camera-interface │ │ │ ├── Android.mk │ │ │ ├── inc │ │ │ │ ├── mm_camera.h │ │ │ │ ├── mm_camera_dbg.h │ │ │ │ └── mm_camera_sock.h │ │ │ └── src │ │ │ │ ├── cam_intf.c │ │ │ │ ├── mm_camera.c │ │ │ │ ├── mm_camera_channel.c │ │ │ │ ├── mm_camera_interface.c │ │ │ │ ├── mm_camera_sock.c │ │ │ │ ├── mm_camera_stream.c │ │ │ │ └── mm_camera_thread.c │ │ ├── mm-camera-test │ │ │ ├── Android.mk │ │ │ ├── inc │ │ │ │ ├── mm_qcamera_app.h │ │ │ │ ├── mm_qcamera_commands.h │ │ │ │ ├── mm_qcamera_dbg.h │ │ │ │ ├── mm_qcamera_main_menu.h │ │ │ │ └── mm_qcamera_socket.h │ │ │ └── src │ │ │ │ ├── mm_qcamera_app.c │ │ │ │ ├── mm_qcamera_commands.c │ │ │ │ ├── mm_qcamera_dual_test.c │ │ │ │ ├── mm_qcamera_main_menu.c │ │ │ │ ├── mm_qcamera_preview.c │ │ │ │ ├── mm_qcamera_queue.c │ │ │ │ ├── mm_qcamera_rdi.c │ │ │ │ ├── mm_qcamera_reprocess.c │ │ │ │ ├── mm_qcamera_snapshot.c │ │ │ │ ├── mm_qcamera_socket.c │ │ │ │ ├── mm_qcamera_unit_test.c │ │ │ │ └── mm_qcamera_video.c │ │ └── mm-jpeg-interface │ │ │ ├── Android.mk │ │ │ ├── inc │ │ │ ├── mm_jpeg.h │ │ │ ├── mm_jpeg_dbg.h │ │ │ ├── mm_jpeg_inlines.h │ │ │ └── mm_jpeg_ionbuf.h │ │ │ ├── src │ │ │ ├── mm_jpeg.c │ │ │ ├── mm_jpeg_exif.c │ │ │ ├── mm_jpeg_interface.c │ │ │ ├── mm_jpeg_ionbuf.c │ │ │ ├── mm_jpeg_queue.c │ │ │ ├── mm_jpegdec.c │ │ │ └── mm_jpegdec_interface.c │ │ │ └── test │ │ │ ├── Android.mk │ │ │ ├── mm_jpeg_test.c │ │ │ └── mm_jpegdec_test.c │ └── util │ │ ├── QCameraCmdThread.cpp │ │ ├── QCameraCmdThread.h │ │ ├── QCameraQueue.cpp │ │ └── QCameraQueue.h ├── QCameraParameters.h ├── QCamera_Intf.h └── mm-image-codec │ ├── Android.mk │ ├── qexif │ └── qexif.h │ └── qomx_core │ ├── Android.mk │ ├── QOMX_JpegExtensions.h │ ├── qomx_core.c │ └── qomx_core.h ├── cm.dependencies ├── cm.mk ├── configs ├── data │ ├── dsi_config.xml │ ├── netmgr_config.xml │ └── qmi_config.xml ├── media_codecs_performance.xml └── media_profiles.xml ├── crackling-releasekey.x509.pem ├── device.mk ├── display ├── Android.mk ├── pp_calib_data_booyi_OTM1287_720p_video_mode_dsi_panel.xml └── synaptics_dsx_fw_update_boyi.bin ├── extract-files.sh ├── full_crackling.mk ├── gps ├── Android.mk ├── core │ ├── Android.mk │ ├── ContextBase.cpp │ ├── ContextBase.h │ ├── LBSProxyBase.h │ ├── LocAdapterBase.cpp │ ├── LocAdapterBase.h │ ├── LocAdapterProxyBase.h │ ├── LocApiBase.cpp │ ├── LocApiBase.h │ ├── LocDualContext.cpp │ ├── LocDualContext.h │ ├── UlpProxyBase.h │ ├── gps_extended.h │ ├── gps_extended_c.h │ ├── loc_core_log.cpp │ └── loc_core_log.h ├── flp.conf ├── gps.conf ├── izat.conf ├── loc_api │ ├── Android.mk │ ├── ds_api │ │ ├── Android.mk │ │ ├── ds_client.c │ │ └── ds_client.h │ ├── libloc_api_50001 │ │ ├── Android.mk │ │ ├── LocEngAdapter.cpp │ │ ├── LocEngAdapter.h │ │ ├── Makefile.am │ │ ├── gps.c │ │ ├── loc.cpp │ │ ├── loc.h │ │ ├── loc_eng.cpp │ │ ├── loc_eng.h │ │ ├── loc_eng_agps.cpp │ │ ├── loc_eng_agps.h │ │ ├── loc_eng_dmn_conn.cpp │ │ ├── loc_eng_dmn_conn.h │ │ ├── loc_eng_dmn_conn_glue_msg.c │ │ ├── loc_eng_dmn_conn_glue_msg.h │ │ ├── loc_eng_dmn_conn_glue_pipe.c │ │ ├── loc_eng_dmn_conn_glue_pipe.h │ │ ├── loc_eng_dmn_conn_handler.cpp │ │ ├── loc_eng_dmn_conn_handler.h │ │ ├── loc_eng_dmn_conn_thread_helper.c │ │ ├── loc_eng_dmn_conn_thread_helper.h │ │ ├── loc_eng_log.cpp │ │ ├── loc_eng_log.h │ │ ├── loc_eng_msg.h │ │ ├── loc_eng_ni.cpp │ │ ├── loc_eng_ni.h │ │ ├── loc_eng_nmea.cpp │ │ ├── loc_eng_nmea.h │ │ ├── loc_eng_xtra.cpp │ │ └── loc_eng_xtra.h │ └── loc_api_v02 │ │ ├── Android.mk │ │ ├── LocApiV02.cpp │ │ ├── LocApiV02.h │ │ ├── Makefile.am │ │ ├── loc_api_sync_req.c │ │ ├── loc_api_sync_req.h │ │ ├── loc_api_v02_client.c │ │ ├── loc_api_v02_client.h │ │ ├── loc_api_v02_log.c │ │ ├── loc_api_v02_log.h │ │ ├── loc_util_log.h │ │ ├── location_service_v02.c │ │ └── location_service_v02.h ├── quipc.conf ├── sap.conf └── utils │ ├── Android.mk │ ├── LocHeap.cpp │ ├── LocHeap.h │ ├── LocSharedLock.h │ ├── LocThread.cpp │ ├── LocThread.h │ ├── LocTimer.cpp │ ├── LocTimer.h │ ├── Makefile.am │ ├── MsgTask.cpp │ ├── MsgTask.h │ ├── linked_list.c │ ├── linked_list.h │ ├── loc_cfg.cpp │ ├── loc_cfg.h │ ├── loc_log.cpp │ ├── loc_log.h │ ├── loc_misc_utils.cpp │ ├── loc_misc_utils.h │ ├── loc_target.cpp │ ├── loc_target.h │ ├── loc_timer.h │ ├── log_util.h │ ├── msg_q.c │ ├── msg_q.h │ └── platform_lib_abstractions │ ├── elapsed_millis_since_boot.cpp │ ├── platform_lib_includes.h │ ├── platform_lib_macros.h │ └── platform_lib_time.h ├── keylayout ├── gpio-keys.kl └── qpnp_pon.kl ├── liblight ├── Android.mk ├── NOTICE └── lights.c ├── overlay ├── frameworks │ └── base │ │ └── core │ │ └── res │ │ └── res │ │ ├── values │ │ ├── cm_strings.xml │ │ └── config.xml │ │ └── xml │ │ └── power_profile.xml └── packages │ ├── apps │ ├── Mms │ │ └── res │ │ │ └── xml │ │ │ └── mms_config.xml │ └── Settings │ │ └── res │ │ └── values │ │ └── bools.xml │ └── services │ └── Telephony │ └── res │ └── values │ └── config.xml ├── product ├── android.mk ├── browser.mk ├── display.mk ├── init.mk ├── keylayouts.mk ├── lights.mk ├── media.mk ├── partitions.mk ├── qcom-audio.mk ├── qcom-camera.mk ├── qcom-cne.mk ├── qcom-gps.mk ├── qcom-radio.mk ├── qcom-wifi.mk ├── recovery.mk ├── sensors.mk ├── touchscreen.mk └── usb.mk ├── proprietary-files-qc.txt ├── proprietary-files.txt ├── rootdir ├── Android.mk └── etc │ ├── fstab.qcom │ └── init.target.rc ├── sensors ├── Android.mk ├── algo │ └── common │ │ ├── common_wrapper.c │ │ └── compass │ │ ├── AKFS_AOC.c │ │ ├── AKFS_AOC.h │ │ ├── AKFS_Configure.h │ │ ├── AKFS_Decomp.c │ │ ├── AKFS_Decomp.h │ │ ├── AKFS_Device.c │ │ ├── AKFS_Device.h │ │ ├── AKFS_Direction.c │ │ ├── AKFS_Direction.h │ │ ├── AKFS_Math.h │ │ ├── AKFS_VNorm.c │ │ ├── AKFS_VNorm.h │ │ ├── NOTICE │ │ └── README.md ├── bst │ ├── Android.mk │ ├── daemon │ │ ├── Android.mk │ │ ├── algo │ │ │ ├── inc │ │ │ │ ├── BsxFusionLibrary.h │ │ │ │ ├── BsxLibraryCalibConstants.h │ │ │ │ ├── BsxLibraryConstants.h │ │ │ │ ├── BsxLibraryDataTypes.h │ │ │ │ ├── BsxLibraryErrorConstants.h │ │ │ │ ├── cust.h │ │ │ │ └── feature.h │ │ │ └── lib │ │ │ │ ├── bosch_lib32 │ │ │ │ ├── NOTICE │ │ │ │ └── libalgobsx.a │ │ │ │ └── bosch_lib64 │ │ │ │ └── libalgobsx.a │ │ ├── inc │ │ │ ├── algo.h │ │ │ ├── algo_adapter.h │ │ │ ├── bs_log.h │ │ │ ├── channel.h │ │ │ ├── configure.h │ │ │ ├── configure_hw.h │ │ │ ├── event_handler.h │ │ │ ├── hw_cntl.h │ │ │ ├── hw_def.h │ │ │ ├── options.h │ │ │ ├── sensor_cfg.h │ │ │ ├── sensor_data_type.h │ │ │ ├── sensor_def.h │ │ │ ├── sensor_hw.h │ │ │ ├── sensor_priv.h │ │ │ ├── sensor_provider.h │ │ │ ├── sensord.h │ │ │ ├── trace.h │ │ │ ├── util_input_dev.h │ │ │ ├── util_misc.h │ │ │ ├── util_sysfs.h │ │ │ └── util_time.h │ │ └── src │ │ │ ├── algo │ │ │ ├── Android.mk │ │ │ ├── algo_adapter.c │ │ │ ├── algo_data_log.h │ │ │ ├── algo_if.h │ │ │ └── algo_init.c │ │ │ ├── channel_a.c │ │ │ ├── channel_cntl.c │ │ │ ├── channel_g.c │ │ │ ├── channel_geom_rv.c │ │ │ ├── channel_gest_flip.c │ │ │ ├── channel_grv.c │ │ │ ├── channel_gu.c │ │ │ ├── channel_m.c │ │ │ ├── channel_mu.c │ │ │ ├── channel_o.c │ │ │ ├── channel_sgm.c │ │ │ ├── channel_stc.c │ │ │ ├── channel_std.c │ │ │ ├── channel_vg.c │ │ │ ├── channel_vla.c │ │ │ ├── channel_vrv.c │ │ │ ├── channels.c │ │ │ ├── event_handler.c │ │ │ ├── hw │ │ │ ├── Android.mk │ │ │ ├── a │ │ │ │ ├── Android.mk │ │ │ │ ├── axis_remap_a.c │ │ │ │ ├── hw_cntl_a.c │ │ │ │ ├── hw_if_a.h │ │ │ │ └── hw_info_a.h │ │ │ ├── g │ │ │ │ ├── Android.mk │ │ │ │ ├── axis_remap_g.c │ │ │ │ ├── hw_cntl_g.c │ │ │ │ ├── hw_if_g.h │ │ │ │ └── hw_info_g.h │ │ │ ├── hw_cntl.c │ │ │ ├── hw_if.h │ │ │ ├── hw_info.h │ │ │ └── m │ │ │ │ ├── Android.mk │ │ │ │ ├── axis_remap_m.c │ │ │ │ ├── hw_cntl_m.c │ │ │ │ ├── hw_if_m.h │ │ │ │ └── hw_info_m.h │ │ │ ├── lib │ │ │ ├── util_input_dev.c │ │ │ ├── util_misc.c │ │ │ ├── util_sysfs.c │ │ │ └── util_time.c │ │ │ ├── main.c │ │ │ ├── misc.c │ │ │ ├── sensor_cfg.c │ │ │ ├── sensor_fusion.c │ │ │ ├── sensor_provider.c │ │ │ └── trace.c │ ├── hal │ │ ├── Android.mk │ │ ├── BstSensor.cpp │ │ ├── BstSensor.h │ │ ├── BstSensorAccel.cpp │ │ ├── BstSensorAccel.h │ │ ├── BstSensorDataType.h │ │ ├── BstSensorExt.cpp │ │ ├── BstSensorExt.h │ │ ├── BstSensorInfo.cpp │ │ ├── BstSensorInfo.h │ │ ├── BstSensorPressure.cpp │ │ ├── BstSensorPressure.h │ │ ├── BstSensorPriv.h │ │ ├── BstSensorType.h │ │ ├── InputEventReader.cpp │ │ ├── InputEventReader.h │ │ ├── LightSensor.cpp │ │ ├── LightSensor.h │ │ ├── ProximitySensor.cpp │ │ ├── ProximitySensor.h │ │ ├── SensorBase.cpp │ │ ├── SensorBase.h │ │ ├── TargetPlatform.h │ │ ├── sensors.cpp │ │ └── sensors.h │ ├── tools │ │ ├── buildversion.mk │ │ ├── cm_build.sh │ │ ├── config.mk │ │ ├── cppcheck_daemon.sh │ │ ├── cppcheck_hal.sh │ │ ├── cppcheck_suppress_daemon.lst │ │ ├── get_hal_version.bat │ │ ├── get_sensord_data.bat │ │ ├── get_sensord_log.bat │ │ ├── get_sensord_version.bat │ │ ├── install.bat │ │ ├── l8150_config.mk │ │ ├── l8720_config.mk │ │ └── options.mk │ └── version │ │ ├── version.c │ │ └── version.h └── calibration │ ├── AccelCalib │ ├── Android.mk │ ├── AndroidManifest.xml │ ├── res │ │ └── values │ │ │ └── strings.xml │ └── src │ │ └── com │ │ └── cyngn │ │ └── cracklingacc │ │ └── HintReceiver.java │ ├── Android.mk │ └── accelcal.c ├── sepolicy ├── file_contexts ├── sensors.te └── system_server.te ├── setup-makefiles.sh ├── system.prop └── wifi ├── WCNSS_cfg.dat ├── WCNSS_qcom_cfg.ini └── WCNSS_qcom_wlan_nv.bin /Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2015 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | LOCAL_PATH := $(call my-dir) 17 | 18 | ifeq ($(TARGET_DEVICE), crackling) 19 | 20 | include $(call all-makefiles-under,$(LOCAL_PATH)) 21 | 22 | include $(CLEAR_VARS) 23 | 24 | # Create a link for the WCNSS config file, which ends up as a writable 25 | # version in /data/misc/wifi 26 | $(shell mkdir -p $(TARGET_OUT)/etc/firmware/wlan/prima; \ 27 | ln -sf /data/misc/wifi/WCNSS_qcom_cfg.ini \ 28 | $(TARGET_OUT)/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini) 29 | 30 | endif 31 | -------------------------------------------------------------------------------- /BoardConfig.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | include device/cyanogen/msm8916-common/BoardConfigCommon.mk 17 | 18 | include device/wileyfox/crackling/board/*.mk 19 | 20 | TARGET_BOARD_INFO_FILE := device/wileyfox/crackling/board-info.txt 21 | 22 | # inherit from proprietary files 23 | -include vendor/wileyfox/crackling/BoardConfigVendor.mk 24 | -------------------------------------------------------------------------------- /audio/acdb/QRD_Bluetooth_cal.acdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/audio/acdb/QRD_Bluetooth_cal.acdb -------------------------------------------------------------------------------- /audio/acdb/QRD_General_cal.acdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/audio/acdb/QRD_General_cal.acdb -------------------------------------------------------------------------------- /audio/acdb/QRD_Global_cal.acdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/audio/acdb/QRD_Global_cal.acdb -------------------------------------------------------------------------------- /audio/acdb/QRD_Handset_cal.acdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/audio/acdb/QRD_Handset_cal.acdb -------------------------------------------------------------------------------- /audio/acdb/QRD_Hdmi_cal.acdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/audio/acdb/QRD_Hdmi_cal.acdb -------------------------------------------------------------------------------- /audio/acdb/QRD_Headset_cal.acdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/audio/acdb/QRD_Headset_cal.acdb -------------------------------------------------------------------------------- /audio/acdb/QRD_Speaker_cal.acdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/audio/acdb/QRD_Speaker_cal.acdb -------------------------------------------------------------------------------- /audio/acdb/workspaceFile.qwsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /audio/audio_platform_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /bluetooth/bdroid_buildcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _BDROID_BUILDCFG_H 18 | #define _BDROID_BUILDCFG_H 19 | 20 | #define BTM_DEF_LOCAL_NAME "Wileyfox Swift" 21 | #define BLUETOOTH_QTI_SW TRUE 22 | #define BLE_VND_INCLUDED TRUE 23 | #endif 24 | -------------------------------------------------------------------------------- /board-info.txt: -------------------------------------------------------------------------------- 1 | require board=CRACKLING 2 | -------------------------------------------------------------------------------- /board/bluetooth.mk: -------------------------------------------------------------------------------- 1 | # Bluetooth 2 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/wileyfox/crackling/bluetooth 3 | -------------------------------------------------------------------------------- /board/dexopt.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(HOST_OS),linux) 2 | ifeq ($(TARGET_BUILD_VARIANT),user) 3 | ifeq ($(WITH_DEXPREOPT),) 4 | WITH_DEXPREOPT := true 5 | WITH_DEXPREOPT_BOOT_IMG_ONLY ?= true 6 | endif 7 | endif 8 | endif 9 | -------------------------------------------------------------------------------- /board/filesystem.mk: -------------------------------------------------------------------------------- 1 | # Partitions 2 | BOARD_FLASH_BLOCK_SIZE := 131072 3 | BOARD_BOOTIMAGE_PARTITION_SIZE := 33553920 4 | BOARD_CACHEIMAGE_PARTITION_SIZE := 157285888 5 | BOARD_PERSISTIMAGE_PARTITION_SIZE := 33553920 6 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33553920 7 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612224 8 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 13295385600 9 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 10 | -------------------------------------------------------------------------------- /board/kernel.mk: -------------------------------------------------------------------------------- 1 | # Kernel 2 | BOARD_KERNEL_TAGS_OFFSET := 0x00000100 3 | BOARD_RAMDISK_OFFSET := 0x01000000 4 | TARGET_KERNEL_CONFIG := cyanogenmod_crackling-64_defconfig 5 | -------------------------------------------------------------------------------- /board/lights.mk: -------------------------------------------------------------------------------- 1 | # Lights 2 | TARGET_PROVIDES_LIBLIGHT := true 3 | -------------------------------------------------------------------------------- /board/qcom-camera.mk: -------------------------------------------------------------------------------- 1 | # Camera 2 | BOARD_CAMERA_SENSORS := s5k5e2_olq5f19 s5k3m2_olqba20 3 | TARGET_USE_VENDOR_CAMERA_EXT := true 4 | USE_DEVICE_SPECIFIC_CAMERA := true 5 | -------------------------------------------------------------------------------- /board/qcom-cne.mk: -------------------------------------------------------------------------------- 1 | # CNE 2 | BOARD_USES_QCNE := true 3 | TARGET_LDPRELOAD := libNimsWrap.so 4 | -------------------------------------------------------------------------------- /board/qcom-gps.mk: -------------------------------------------------------------------------------- 1 | # GPS 2 | TARGET_NO_RPC := true 3 | USE_DEVICE_SPECIFIC_GPS := true 4 | -------------------------------------------------------------------------------- /board/qcom-wlan.mk: -------------------------------------------------------------------------------- 1 | # Wifi 2 | CONFIG_EAP_PROXY := qmi 3 | CONFIG_EAP_PROXY_DUAL_SIM := true 4 | -------------------------------------------------------------------------------- /board/recovery.mk: -------------------------------------------------------------------------------- 1 | # Recovery 2 | TARGET_RECOVERY_FSTAB := device/wileyfox/crackling/rootdir/etc/fstab.qcom 3 | -------------------------------------------------------------------------------- /board/sepolicy.mk: -------------------------------------------------------------------------------- 1 | # SELinux 2 | BOARD_SEPOLICY_DIRS += \ 3 | device/wileyfox/crackling/sepolicy 4 | -------------------------------------------------------------------------------- /camera/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(call my-dir),$(call project-path-for,qcom-camera)) 2 | MM_V4L2_DRIVER_LIST += msm8960 3 | MM_V4L2_DRIVER_LIST += msm8974 4 | MM_V4L2_DRIVER_LIST += msm8226 5 | MM_V4L2_DRIVER_LIST += msm8610 6 | MM_V4L2_DRIVER_LIST += msm_bronze 7 | MM_V4L2_DRIVER_LIST += msm8916 8 | MM_V4L2_DRIVER_LIST += msm8909 9 | LOCAL_32_BIT_ONLY := true 10 | ifeq ($(call is-board-platform-in-list,$(MM_V4L2_DRIVER_LIST)),true) 11 | ifneq ($(BUILD_TINY_ANDROID),true) 12 | include $(call all-subdir-makefiles) 13 | endif 14 | endif 15 | endif 16 | -------------------------------------------------------------------------------- /camera/CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # If you don't need to do a full clean build but would like to touch 17 | # a file or delete some intermediate files, add a clean step to the end 18 | # of the list. These steps will only be run once, if they haven't been 19 | # run before. 20 | # 21 | # E.g.: 22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 24 | # 25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 26 | # files that are missing or have been moved. 27 | # 28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 29 | # Use $(OUT_DIR) to refer to the "out" directory. 30 | # 31 | # If you need to re-do something that's already mentioned, just copy 32 | # the command and add it to the bottom of the list. E.g., if a change 33 | # that you made last week required touching a file and a change you 34 | # made today requires touching the same file, just copy the old 35 | # touch step and add it to the end of the list. 36 | # 37 | # ************************************************ 38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 39 | # ************************************************ 40 | 41 | # For example: 42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 46 | 47 | $(call add-clean-step, find $(OUT_DIR) -name "camera.msm8916*" -print0 | xargs -0 rm -rf) 48 | -------------------------------------------------------------------------------- /camera/MODULE_LICENSE_BSD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/camera/MODULE_LICENSE_BSD -------------------------------------------------------------------------------- /camera/QCamera/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm arm64)) 2 | # include $(call all-subdir-makefiles) 3 | endif 4 | -------------------------------------------------------------------------------- /camera/QCamera/HAL/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(LOCAL_PATH)/core/Android.mk 3 | #include $(LOCAL_PATH)/test/Android.mk 4 | -------------------------------------------------------------------------------- /camera/QCamera/HAL/core/inc/QCameraHAL.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (c) 2011-2012 The Linux Foundation. All rights reserved. 3 | ** 4 | ** Not a Contribution, Apache license notifications and license are retained 5 | ** for attribution purposes only. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | #ifndef ANDROID_HARDWARE_QCAMERA_HAL_H 21 | #define ANDROID_HARDWARE_QCAMERA_HAL_H 22 | 23 | 24 | #include "QCameraHWI.h" 25 | 26 | extern "C" { 27 | #include 28 | } 29 | namespace android { 30 | 31 | /* HAL should return NULL if it fails to open camera hardware. */ 32 | extern "C" void * 33 | QCameraHAL_openCameraHardware(int cameraId, int mode); 34 | extern "C" int HAL_getNumberOfCameras(); 35 | extern "C" void HAL_getCameraInfo(int cameraId, struct CameraInfo* cameraInfo); 36 | 37 | }; // namespace android 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /camera/QCamera/HAL/test/Android.mk: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /camera/QCamera/HAL/usbcamcore/inc/QCameraMjpegDecode.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef __QCAMERA_MJPEG_DECODE_H 30 | #define __QCAMERA_MJPEG_DECODE_H 31 | 32 | typedef int MJPEGD_ERR; 33 | #define MJPEGD_NO_ERROR 0 34 | #define MJPEGD_ERROR -1 35 | #define MJPEGD_INSUFFICIENT_MEM -2 36 | 37 | MJPEGD_ERR mjpegDecoderInit(void**); 38 | 39 | MJPEGD_ERR mjpegDecoderDestroy(void* mjpegd); 40 | 41 | MJPEGD_ERR mjpegDecode( 42 | void* mjpegd, 43 | char* mjpegBuffer, 44 | int mjpegBufferSize, 45 | char* outputYptr, 46 | char* outputUVptr, 47 | int outputFormat); 48 | 49 | #endif /* __QCAMERA_MJPEG_DECODE_H */ 50 | -------------------------------------------------------------------------------- /camera/QCamera/HAL2/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(LOCAL_PATH)/core/Android.mk 3 | #include $(LOCAL_PATH)/test/Android.mk 4 | -------------------------------------------------------------------------------- /camera/QCamera/HAL2/core/inc/QCameraHAL.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright (c) 2011 The Linux Foundation. All rights reserved. 3 | ** 4 | ** Licensed under the Apache License, Version 2.0 (the "License"); 5 | ** you may not use this file except in compliance with the License. 6 | ** You may obtain a copy of the License at 7 | ** 8 | ** http://www.apache.org/licenses/LICENSE-2.0 9 | ** 10 | ** Unless required by applicable law or agreed to in writing, software 11 | ** distributed under the License is distributed on an "AS IS" BASIS, 12 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ** See the License for the specific language governing permissions and 14 | ** limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_QCAMERA_HAL_H 18 | #define ANDROID_HARDWARE_QCAMERA_HAL_H 19 | 20 | 21 | #include "QCameraHWI.h" 22 | 23 | extern "C" { 24 | #include 25 | } 26 | namespace android { 27 | 28 | /* HAL should return NULL if it fails to open camera hardware. */ 29 | extern "C" void * 30 | QCameraHAL_openCameraHardware(int cameraId, int mode); 31 | extern "C" int HAL_getNumberOfCameras(); 32 | extern "C" int HAL_getCameraInfo(int cameraId, struct camera_info* cameraInfo); 33 | extern "C" status_t getStaticInfo(camera_metadata_t **info, 34 | mm_camera_vtbl_t *camera_vtbl, bool sizeRequest); 35 | extern "C" status_t constructDefaultRequest(int request_template, 36 | camera_metadata_t **info, bool sizeRequest); 37 | 38 | }; // namespace android 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /camera/QCamera/HAL2/test/Android.mk: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /camera/QCamera/stack/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(LOCAL_PATH)/mm-camera-interface/Android.mk 3 | include $(LOCAL_PATH)/mm-jpeg-interface/Android.mk 4 | include $(LOCAL_PATH)/mm-camera-test/Android.mk 5 | -------------------------------------------------------------------------------- /camera/QCamera/stack/common/cam_list.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | /* This file is a slave copy from /vendor/qcom/propreitary/mm-cammera/common, 31 | * Please do not modify it directly here. */ 32 | 33 | #ifndef __CAMLIST_H 34 | #define __CAMLIST_H 35 | 36 | #include 37 | 38 | #define member_of(ptr, type, member) ({ \ 39 | const typeof(((type *)0)->member) *__mptr = (ptr); \ 40 | (type *)((char *)__mptr - offsetof(type,member));}) 41 | 42 | struct cam_list { 43 | struct cam_list *next, *prev; 44 | }; 45 | 46 | static inline void cam_list_init(struct cam_list *ptr) 47 | { 48 | ptr->next = ptr; 49 | ptr->prev = ptr; 50 | } 51 | 52 | static inline void cam_list_add_tail_node(struct cam_list *item, 53 | struct cam_list *head) 54 | { 55 | struct cam_list *prev = head->prev; 56 | 57 | head->prev = item; 58 | item->next = head; 59 | item->prev = prev; 60 | prev->next = item; 61 | } 62 | 63 | static inline void cam_list_del_node(struct cam_list *ptr) 64 | { 65 | struct cam_list *prev = ptr->prev; 66 | struct cam_list *next = ptr->next; 67 | 68 | next->prev = ptr->prev; 69 | prev->next = ptr->next; 70 | ptr->next = ptr; 71 | ptr->prev = ptr; 72 | } 73 | 74 | #endif /* __CAMLIST_H */ 75 | -------------------------------------------------------------------------------- /camera/QCamera/stack/mm-camera-interface/Android.mk: -------------------------------------------------------------------------------- 1 | #ifeq ($(call is-board-platform,msm8960),true) 2 | OLD_LOCAL_PATH := $(LOCAL_PATH) 3 | LOCAL_PATH := $(call my-dir) 4 | 5 | include $(CLEAR_VARS) 6 | 7 | MM_CAM_FILES := \ 8 | src/mm_camera_interface.c \ 9 | src/mm_camera_stream.c \ 10 | src/mm_camera_channel.c \ 11 | src/mm_camera.c \ 12 | src/mm_camera_thread.c \ 13 | src/mm_camera_data.c \ 14 | src/mm_camera_sock.c \ 15 | src/mm_camera_helper.c 16 | 17 | ifeq ($(strip $(TARGET_USES_ION)),true) 18 | LOCAL_CFLAGS += -DUSE_ION 19 | endif 20 | 21 | LOCAL_CFLAGS += -D_ANDROID_ 22 | LOCAL_COPY_HEADERS_TO := mm-camera-interface 23 | LOCAL_COPY_HEADERS := inc/mm_camera_interface.h 24 | LOCAL_COPY_HEADERS += ../common/cam_list.h 25 | 26 | LOCAL_C_INCLUDES := \ 27 | $(LOCAL_PATH)/inc \ 28 | $(LOCAL_PATH)/../common \ 29 | $(LOCAL_PATH)/../../../ \ 30 | $(TARGET_OUT_HEADERS)/mm-camera \ 31 | $(TARGET_OUT_HEADERS)/mm-camera/common 32 | 33 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 34 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media 35 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 36 | 37 | # (BEGIN) Need to remove later once dependency on jpeg removed 38 | LOCAL_C_INCLUDES += \ 39 | $(TARGET_OUT_HEADERS)/mm-still \ 40 | $(TARGET_OUT_HEADERS)/mm-still/jpeg \ 41 | $(TARGET_OUT_HEADERS)/mm-core/omxcore \ 42 | $(TARGET_OUT_HEADERS)/mm-still/mm-omx 43 | # (END) Need to remove later once dependency on jpeg removed 44 | 45 | LOCAL_C_INCLUDES+= $(call project-path-for,qcom-media)/mm-core/inc 46 | LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/socket.h 47 | LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/un.h 48 | 49 | LOCAL_SRC_FILES := $(MM_CAM_FILES) 50 | LOCAL_MODULE := libmmcamera_interface 51 | LOCAL_32_BIT_ONLY := true 52 | LOCAL_PRELINK_MODULE := false 53 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog 54 | LOCAL_MODULE_TAGS := optional 55 | 56 | # (BEGIN) Need to remove later once dependency on jpeg removed 57 | # LOCAL_SHARED_LIBRARIES += libmmjpeg_interface 58 | # (END) Need to remove later once dependency on jpeg removed 59 | 60 | include $(BUILD_SHARED_LIBRARY) 61 | 62 | LOCAL_PATH := $(OLD_LOCAL_PATH) 63 | #endif 64 | -------------------------------------------------------------------------------- /camera/QCamera/stack/mm-camera-interface/inc/mm_camera_sock.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef __MM_CAMERA_SOCKET_H__ 31 | #define __MM_CAMERA_SOCKET_H__ 32 | 33 | #include 34 | 35 | typedef enum { 36 | MM_CAMERA_SOCK_TYPE_UDP, 37 | MM_CAMERA_SOCK_TYPE_TCP, 38 | } mm_camera_sock_type_t; 39 | 40 | int mm_camera_socket_create(int cam_id, mm_camera_sock_type_t sock_type); 41 | 42 | int mm_camera_socket_sendmsg( 43 | int fd, 44 | void *msg, 45 | uint32_t buf_size, 46 | int sendfd); 47 | 48 | int mm_camera_socket_recvmsg( 49 | int fd, 50 | void *msg, 51 | uint32_t buf_size, 52 | int *rcvdfd); 53 | 54 | void mm_camera_socket_close(int fd); 55 | 56 | #endif /*__MM_CAMERA_SOCKET_H__*/ 57 | 58 | -------------------------------------------------------------------------------- /camera/QCamera/stack/mm-camera-interface/src/mm_camera_helper.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include "mm_camera_dbg.h" 38 | 39 | /*============================================================ 40 | FUNCTION mm_camera_dump_image 41 | DESCRIPTION: 42 | ==============================================================*/ 43 | int mm_camera_dump_image(void *addr, uint32_t size, char *filename) 44 | { 45 | int file_fd = open(filename, O_RDWR | O_CREAT, 0777); 46 | 47 | if (file_fd < 0) { 48 | CDBG_HIGH("%s: cannot open file\n", __func__); 49 | return -1; 50 | } else 51 | write(file_fd, addr, size); 52 | close(file_fd); 53 | CDBG("%s: %s, size=%d\n", __func__, filename, size); 54 | return 0; 55 | } 56 | -------------------------------------------------------------------------------- /camera/QCamera/stack/mm-camera-interface/src/mm_camera_interface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/camera/QCamera/stack/mm-camera-interface/src/mm_camera_interface.c -------------------------------------------------------------------------------- /camera/QCamera/stack/mm-camera-test/Android.mk: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH:=$(call my-dir) 3 | include $(CLEAR_VARS) 4 | 5 | ifeq ($(call is-board-platform,msm8960),true) 6 | LOCAL_CFLAGS:= \ 7 | -DAMSS_VERSION=$(AMSS_VERSION) \ 8 | $(mmcamera_debug_defines) \ 9 | $(mmcamera_debug_cflags) \ 10 | $(USE_SERVER_TREE) 11 | 12 | LOCAL_CFLAGS += -include $(TARGET_OUT_INTERMEDIATES)/include/mm-camera/camera_defs_i.h 13 | LOCAL_CFLAGS += -include $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/linux/msm_ion.h 14 | 15 | ifeq ($(strip $(TARGET_USES_ION)),true) 16 | LOCAL_CFLAGS += -DUSE_ION 17 | endif 18 | 19 | LOCAL_CFLAGS += -D_ANDROID_ 20 | 21 | LOCAL_SRC_FILES:= \ 22 | src/mm_qcamera_main_menu.c \ 23 | src/mm_qcamera_display.c \ 24 | src/mm_qcamera_app.c \ 25 | src/mm_qcamera_snapshot.c \ 26 | src/mm_qcamera_video.c \ 27 | src/mm_qcamera_preview.c \ 28 | src/mm_qcamera_rdi.c \ 29 | src/mm_qcamera_unit_test.c \ 30 | src/mm_qcamera_dual_test.c \ 31 | src/mm_qcamera_pp.c 32 | 33 | LOCAL_C_INCLUDES:=$(LOCAL_PATH)/inc 34 | LOCAL_C_INCLUDES+= \ 35 | $(TARGET_OUT_INTERMEDIATES)/include/mm-still/jpeg \ 36 | $(TARGET_OUT_INTERMEDIATES)/include/mm-camera \ 37 | $(LOCAL_PATH)/../mm-camera-interface/inc \ 38 | $(LOCAL_PATH)/../mm-jpeg-interface/inc \ 39 | $(LOCAL_PATH)/../common \ 40 | $(LOCAL_PATH)/../../../ \ 41 | 42 | LOCAL_C_INCLUDES+= $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media 43 | LOCAL_C_INCLUDES+= $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 44 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 45 | 46 | ifeq ($(call is-board-platform,msm8960),true) 47 | LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_CP_MM_HEAP_ID 48 | else 49 | LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_CAMERA_HEAP_ID 50 | endif 51 | 52 | LOCAL_SHARED_LIBRARIES:= \ 53 | libcutils libdl 54 | 55 | LOCAL_MODULE:= mm-qcamera-app 56 | LOCAL_32_BIT_ONLY := true 57 | 58 | LOCAL_MODULE_TAGS := optional 59 | 60 | include $(BUILD_EXECUTABLE) 61 | endif 62 | 63 | LOCAL_PATH := $(OLD_LOCAL_PATH) 64 | -------------------------------------------------------------------------------- /camera/QCamera/stack/mm-camera-test/inc/mm_qcamera_display_dimensions.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | 31 | #ifndef __MM_QCAMERA_DISPLAY_DIMENSIONS__ 32 | #define __MM_QCAMERA_DISPLAY_DIMENSIONS__ 33 | 34 | #define PREVIEW_WIDTH 800 35 | #define PREVIEW_HEIGHT 480 36 | #define DISPLAY_WIDTH 800 37 | #define DISPLAY_HEIGHT 480 38 | #define THUMBNAIL_WIDTH 192 39 | #define THUMBNAIL_HEIGHT 144 40 | #define PICTURE_WIDTH 1280 41 | #define PICTURE_HEIGHT 960 42 | 43 | #endif /* __MM_QCAMERA_DISPLAY_DIMENSIONS__ */ 44 | -------------------------------------------------------------------------------- /camera/QCamera/stack/mm-camera-test/inc/mm_qcamera_unit_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef __MM_QCAMERA_APP_UNIT_TEST_H__ 31 | #define __MM_QCAMERA_APP_UNIT_TEST_H__ 32 | 33 | #include "camera.h" 34 | #include "mm_qcamera_main_menu.h" 35 | #include "mm_camera_interface.h" 36 | #include "mm_qcamera_app.h" 37 | 38 | typedef int (*mm_app_test_t) (mm_camera_app_t *cam_apps); 39 | typedef struct { 40 | mm_app_test_t f; 41 | int r; 42 | } mm_app_tc_t; 43 | 44 | #endif 45 | 46 | /* __MM_QCAMERA_APP_UNIT_TEST_H__ */ 47 | -------------------------------------------------------------------------------- /camera/QCamera/stack/mm-jpeg-interface/Android.mk: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH := $(call my-dir) 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_CFLAGS+= -D_ANDROID_ 6 | LOCAL_COPY_HEADERS_TO := mm-camera-interface 7 | LOCAL_COPY_HEADERS = inc/mm_jpeg_interface.h 8 | 9 | LOCAL_C_INCLUDES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 10 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media 11 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 12 | 13 | LOCAL_C_INCLUDES += \ 14 | $(LOCAL_PATH)/inc \ 15 | $(LOCAL_PATH)/../common \ 16 | $(LOCAL_PATH)/../../../ \ 17 | $(TARGET_OUT_HEADERS)/mm-still \ 18 | $(TARGET_OUT_HEADERS)/mm-still/jpeg \ 19 | $(TARGET_OUT_HEADERS)/mm-core/omxcore \ 20 | $(TARGET_OUT_HEADERS)/mm-still/mm-omx 21 | 22 | ifeq ($(strip $(TARGET_USES_ION)),true) 23 | LOCAL_CFLAGS += -DUSE_ION 24 | endif 25 | 26 | LOCAL_SRC_FILES := \ 27 | src/mm_jpeg_queue.c \ 28 | src/mm_jpeg.c \ 29 | src/mm_jpeg_interface.c 30 | 31 | LOCAL_MODULE := libmmjpeg_interface 32 | LOCAL_32_BIT_ONLY := true 33 | LOCAL_PRELINK_MODULE := false 34 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog libmmstillomx libimage-jpeg-enc-omx-comp 35 | LOCAL_MODULE_TAGS := optional 36 | 37 | include $(BUILD_SHARED_LIBRARY) 38 | 39 | LOCAL_PATH := $(OLD_LOCAL_PATH) 40 | -------------------------------------------------------------------------------- /camera/QCamera2/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_32_BIT_ONLY := true 2 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm arm64)) 3 | include $(call all-subdir-makefiles) 4 | endif 5 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/QCamera2Factory.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef __QCAMERA2FACTORY_H__ 31 | #define __QCAMERA2FACTORY_H__ 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | #include "QCamera2HWI.h" 38 | 39 | namespace qcamera { 40 | 41 | class QCamera2Factory 42 | { 43 | public: 44 | QCamera2Factory(); 45 | virtual ~QCamera2Factory(); 46 | 47 | static int get_number_of_cameras(); 48 | static int get_camera_info(int camera_id, struct camera_info *info); 49 | 50 | private: 51 | int getNumberOfCameras(); 52 | int getCameraInfo(int camera_id, struct camera_info *info); 53 | int cameraDeviceOpen(int camera_id, struct hw_device_t **hw_device); 54 | static int camera_device_open(const struct hw_module_t *module, const char *id, 55 | struct hw_device_t **hw_device); 56 | 57 | public: 58 | static struct hw_module_methods_t mModuleMethods; 59 | 60 | private: 61 | int mNumOfCameras; 62 | }; 63 | 64 | }; /*namespace qcamera*/ 65 | 66 | extern camera_module_t HAL_MODULE_INFO_SYM; 67 | 68 | #endif /* ANDROID_HARDWARE_QUALCOMM_CAMERA_H */ 69 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/QCamera2Hal.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2015, The Linux Foundataion. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #include "QCamera2Factory.h" 31 | 32 | static hw_module_t camera_common = { 33 | tag: HARDWARE_MODULE_TAG, 34 | module_api_version: CAMERA_MODULE_API_VERSION_1_0, 35 | hal_api_version: HARDWARE_HAL_API_VERSION, 36 | id: CAMERA_HARDWARE_MODULE_ID, 37 | name: "QCamera Module", 38 | author: "Qualcomm Innovation Center Inc", 39 | methods: &qcamera::QCamera2Factory::mModuleMethods, 40 | dso: NULL, 41 | reserved: {0}, 42 | }; 43 | 44 | camera_module_t HAL_MODULE_INFO_SYM = { 45 | common: camera_common, 46 | get_number_of_cameras: qcamera::QCamera2Factory::get_number_of_cameras, 47 | get_camera_info: qcamera::QCamera2Factory::get_camera_info, 48 | #ifndef USE_JB_MR1 49 | set_callbacks: NULL, 50 | #endif 51 | //#ifdef USE_VENDOR_CAMERA_EXT 52 | get_vendor_tag_ops: NULL, 53 | #ifndef USE_KK_CODE 54 | open_legacy: NULL, 55 | set_torch_mode: NULL, 56 | init: NULL, 57 | #endif 58 | reserved: {0} 59 | //#endif 60 | }; 61 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/QCameraAllocator.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2014, The Linux Foundataion. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef __QCAMERA_ALLOCATOR__ 31 | #define __QCAMERA_ALLOCATOR__ 32 | 33 | extern "C" { 34 | #include 35 | } 36 | 37 | namespace qcamera { 38 | 39 | class QCameraMemory; 40 | class QCameraHeapMemory; 41 | 42 | class QCameraAllocator { 43 | public: 44 | virtual QCameraMemory *allocateStreamBuf(cam_stream_type_t stream_type, 45 | size_t size, int stride, int scanline, uint8_t &bufferCnt) = 0; 46 | virtual int32_t allocateMoreStreamBuf(QCameraMemory *mem_obj, 47 | size_t size, uint8_t &bufferCnt) = 0; 48 | virtual QCameraHeapMemory *allocateStreamInfoBuf(cam_stream_type_t stream_type) = 0; 49 | virtual ~QCameraAllocator() {} 50 | }; 51 | 52 | }; /* namespace qcamera */ 53 | #endif /* __QCAMERA_ALLOCATOR__ */ 54 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/test/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_SRC_FILES:= \ 6 | qcamera_test.cpp \ 7 | 8 | LOCAL_SHARED_LIBRARIES:= \ 9 | libdl \ 10 | libui \ 11 | libutils \ 12 | libcutils \ 13 | libbinder \ 14 | libmedia \ 15 | libui \ 16 | libgui \ 17 | libcamera_client \ 18 | libskia \ 19 | libstagefright \ 20 | libstagefright_foundation \ 21 | 22 | ifneq ($(call is-platform-sdk-version-at-least,18),true) 23 | 24 | LOCAL_SHARED_LIBRARIES += \ 25 | libmedia_native \ 26 | 27 | LOCAL_CFLAGS += -DUSE_JB_MR1 28 | 29 | endif 30 | 31 | ifneq ($(call is-platform-sdk-version-at-least,20),true) 32 | LOCAL_CFLAGS += -DUSE_KK_CODE 33 | endif 34 | 35 | LOCAL_C_INCLUDES += \ 36 | frameworks/base/include/ui \ 37 | frameworks/base/include/surfaceflinger \ 38 | frameworks/base/include/camera \ 39 | frameworks/base/include/media \ 40 | external/skia/include/core \ 41 | external/skia/include/images \ 42 | $(call project-path-for,qcom-display)/libgralloc \ 43 | frameworks/av/include/media/stagefright \ 44 | frameworks/native/include/media/openmax \ 45 | 46 | LOCAL_MODULE:= camera_test 47 | LOCAL_32_BIT_ONLY := true 48 | LOCAL_MODULE_TAGS:= tests 49 | 50 | LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter 51 | LOCAL_CFLAGS += -O0 52 | 53 | include $(BUILD_EXECUTABLE) 54 | 55 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/tsMakeuplib/include/ts_makeup_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014,2015 Thundersoft Corporation 3 | * All rights Reserved 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | #ifndef __TS_MAKEUP_DATA_H__ 18 | #define __TS_MAKEUP_DATA_H__ 19 | 20 | #define TS_OK (0x00000000) //Successful 21 | #define TS_ERROR_PARAM (0x00000001) //Parameters error 22 | #define TS_ERROR_IO (0x00000002) //Input or output error 23 | #define TS_ERROR_INTERNAL (0x00000003) //Internal error 24 | #define TS_NO_MEMORY (0x00000004) //No memory error 25 | 26 | 27 | /** 28 | * Data struct : rectangle 29 | */ 30 | typedef struct __tag_tsrect 31 | { 32 | long left; 33 | long top; 34 | long right; 35 | long bottom; 36 | } TSRect; 37 | 38 | /** 39 | * Data struct : point 40 | */ 41 | typedef struct __tag_tsmakeuppoint 42 | { 43 | long x; 44 | long y; 45 | } TSPoint; 46 | 47 | 48 | #endif // __TS_MAKEUP_DATA_H__ 49 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/tsMakeuplib/include/ts_makeup_image.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014,2015 Thundersoft Corporation 3 | * All rights Reserved 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | #ifndef __TS_MAKEUP_IMGAGE_H__ 18 | #define __TS_MAKEUP_IMGAGE_H__ 19 | 20 | /** 21 | * Data struct : TSMakeupData 22 | */ 23 | typedef struct __tag_tsmakeupdata 24 | { 25 | int frameWidth; //NV21 Frame width.MUST > 0. 26 | int frameHeight; //NV21 Frame height. MUST > 0. 27 | unsigned char *yBuf; //NV21 Y buffer pointer.MUST not null. 28 | unsigned char *uvBuf; //NV21 UV buffer pointer.MUST not null. 29 | }TSMakeupData; 30 | 31 | 32 | #endif // __TS_MAKEUP_IMGAGE_H__ 33 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(LOCAL_PATH)/mm-camera-interface/Android.mk 3 | include $(LOCAL_PATH)/mm-jpeg-interface/Android.mk 4 | include $(LOCAL_PATH)/mm-jpeg-interface/test/Android.mk 5 | include $(LOCAL_PATH)/mm-camera-test/Android.mk 6 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-camera-interface/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(call is-vendor-board-platform,QCOM),true) 2 | OLD_LOCAL_PATH := $(LOCAL_PATH) 3 | LOCAL_PATH := $(call my-dir) 4 | 5 | include $(CLEAR_VARS) 6 | 7 | MM_CAM_FILES := \ 8 | src/mm_camera_interface.c \ 9 | src/mm_camera.c \ 10 | src/mm_camera_channel.c \ 11 | src/mm_camera_stream.c \ 12 | src/mm_camera_thread.c \ 13 | src/mm_camera_sock.c \ 14 | src/cam_intf.c 15 | 16 | ifeq ($(strip $(TARGET_USES_ION)),true) 17 | LOCAL_CFLAGS += -DUSE_ION 18 | endif 19 | 20 | ifeq ($(call is-board-platform-in-list,msm8974 msm8916 msm8226 msm8610 msm8909),true) 21 | LOCAL_CFLAGS += -DVENUS_PRESENT 22 | endif 23 | 24 | LOCAL_CFLAGS += -D_ANDROID_ 25 | LOCAL_COPY_HEADERS_TO := mm-camera-interface 26 | LOCAL_COPY_HEADERS += ../common/cam_intf.h 27 | LOCAL_COPY_HEADERS += ../common/cam_types.h 28 | 29 | LOCAL_C_INCLUDES := \ 30 | $(LOCAL_PATH)/inc \ 31 | $(LOCAL_PATH)/../common 32 | 33 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 34 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media 35 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 36 | 37 | LOCAL_C_INCLUDES += $(call project-path-for,qcom-media)/mm-core/inc 38 | ifeq ($(call is-platform-sdk-version-at-least,20),true) 39 | LOCAL_C_INCLUDES += system/media/camera/include 40 | endif 41 | 42 | ifneq ($(call is-platform-sdk-version-at-least,17),true) 43 | LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/socket.h 44 | LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/un.h 45 | endif 46 | 47 | LOCAL_CFLAGS += -Wall -Wextra -Werror 48 | 49 | LOCAL_SRC_FILES := $(MM_CAM_FILES) 50 | 51 | LOCAL_MODULE := libmmcamera_interface 52 | LOCAL_32_BIT_ONLY := true 53 | LOCAL_PRELINK_MODULE := false 54 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog 55 | LOCAL_MODULE_TAGS := optional 56 | 57 | include $(BUILD_SHARED_LIBRARY) 58 | 59 | LOCAL_PATH := $(OLD_LOCAL_PATH) 60 | endif 61 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-camera-interface/inc/mm_camera_sock.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef __MM_CAMERA_SOCKET_H__ 31 | #define __MM_CAMERA_SOCKET_H__ 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | typedef enum { 39 | MM_CAMERA_SOCK_TYPE_UDP, 40 | MM_CAMERA_SOCK_TYPE_TCP, 41 | } mm_camera_sock_type_t; 42 | 43 | typedef union { 44 | struct sockaddr addr; 45 | struct sockaddr_un addr_un; 46 | } mm_camera_sock_addr_t; 47 | 48 | int mm_camera_socket_create(int cam_id, mm_camera_sock_type_t sock_type); 49 | 50 | int mm_camera_socket_sendmsg( 51 | int fd, 52 | void *msg, 53 | size_t buf_size, 54 | int sendfd); 55 | 56 | int mm_camera_socket_recvmsg( 57 | int fd, 58 | void *msg, 59 | uint32_t buf_size, 60 | int *rcvdfd); 61 | 62 | void mm_camera_socket_close(int fd); 63 | 64 | #endif /*__MM_CAMERA_SOCKET_H__*/ 65 | 66 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-camera-interface/src/cam_intf.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #include "cam_intf.h" 31 | 32 | void *POINTER_OF_PARAM(cam_intf_parm_type_t PARAM_ID, 33 | void *table_ptr) 34 | { 35 | parm_buffer_new_t *TABLE_PTR = (parm_buffer_new_t *)table_ptr; 36 | void *tmp_p; 37 | size_t j = 0, i = TABLE_PTR->num_entry; 38 | tmp_p = (void *) &TABLE_PTR->entry[0]; 39 | parm_entry_type_new_t *curr_param = (parm_entry_type_new_t *) tmp_p; 40 | 41 | for (j = 0; j < i; j++) { 42 | if (PARAM_ID == curr_param->entry_type) { 43 | return (void *)&curr_param->data[0]; 44 | } 45 | curr_param = GET_NEXT_PARAM(curr_param, parm_entry_type_new_t); 46 | } 47 | tmp_p = (void *) &TABLE_PTR->entry[0]; 48 | curr_param = (parm_entry_type_new_t *) tmp_p; 49 | return (void *)&curr_param->data[0]; //should not be coming here 50 | //this is just to prevent a crash 51 | //for the caller 52 | } 53 | 54 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-jpeg-interface/Android.mk: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH := $(call my-dir) 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_CFLAGS+= -D_ANDROID_ 6 | LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter 7 | 8 | LOCAL_C_INCLUDES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 9 | LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include/media 10 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 11 | 12 | LOCAL_C_INCLUDES += \ 13 | frameworks/native/include/media/openmax \ 14 | $(LOCAL_PATH)/inc \ 15 | $(LOCAL_PATH)/../common \ 16 | $(LOCAL_PATH)/../../../ \ 17 | $(LOCAL_PATH)/../../../mm-image-codec/qexif \ 18 | $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 19 | 20 | ifeq ($(strip $(TARGET_USES_ION)),true) 21 | LOCAL_CFLAGS += -DUSE_ION 22 | endif 23 | 24 | 25 | ifeq ($(call is-board-platform-in-list, msm8974),true) 26 | LOCAL_CFLAGS+= -DMM_JPEG_CONCURRENT_SESSIONS_COUNT=2 27 | else 28 | LOCAL_CFLAGS+= -DMM_JPEG_CONCURRENT_SESSIONS_COUNT=1 29 | endif 30 | 31 | ifeq ($(call is-board-platform-in-list, msm8610),true) 32 | LOCAL_CFLAGS+= -DLOAD_ADSP_RPC_LIB 33 | endif 34 | 35 | LOCAL_SRC_FILES := \ 36 | src/mm_jpeg_queue.c \ 37 | src/mm_jpeg_exif.c \ 38 | src/mm_jpeg.c \ 39 | src/mm_jpeg_interface.c \ 40 | src/mm_jpeg_ionbuf.c \ 41 | src/mm_jpegdec_interface.c \ 42 | src/mm_jpegdec.c 43 | 44 | LOCAL_MODULE := libmmjpeg_interface 45 | LOCAL_32_BIT_ONLY := true 46 | LOCAL_PRELINK_MODULE := false 47 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog libqomx_core 48 | LOCAL_MODULE_TAGS := optional 49 | 50 | include $(BUILD_SHARED_LIBRARY) 51 | 52 | LOCAL_PATH := $(OLD_LOCAL_PATH) 53 | -------------------------------------------------------------------------------- /camera/mm-image-codec/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm arm64)) 2 | include $(call all-subdir-makefiles) 3 | endif 4 | -------------------------------------------------------------------------------- /camera/mm-image-codec/qomx_core/Android.mk: -------------------------------------------------------------------------------- 1 | OMX_CORE_PATH := $(call my-dir) 2 | 3 | # ------------------------------------------------------------------------------ 4 | # Make the shared library (libqomx_core) 5 | # ------------------------------------------------------------------------------ 6 | 7 | include $(CLEAR_VARS) 8 | LOCAL_PATH := $(OMX_CORE_PATH) 9 | LOCAL_MODULE_TAGS := optional 10 | 11 | omx_core_defines:= -Werror \ 12 | -g -O0 13 | 14 | LOCAL_CFLAGS := $(omx_core_defines) 15 | 16 | OMX_HEADER_DIR := frameworks/native/include/media/openmax 17 | 18 | LOCAL_C_INCLUDES := $(OMX_HEADER_DIR) 19 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../qexif 20 | 21 | LOCAL_SRC_FILES := qomx_core.c 22 | 23 | LOCAL_MODULE := libqomx_core 24 | LOCAL_32_BIT_ONLY := true 25 | LOCAL_PRELINK_MODULE := false 26 | LOCAL_SHARED_LIBRARIES := libcutils libdl 27 | 28 | include $(BUILD_SHARED_LIBRARY) 29 | -------------------------------------------------------------------------------- /cm.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "android_device_cyanogen_msm8916-common", 4 | "target_path": "device/cyanogen/msm8916-common" 5 | },{ 6 | "repository": "android_kernel_cyanogen_msm8916", 7 | "target_path": "kernel/cyanogen/msm8916" 8 | } 9 | ] 10 | -------------------------------------------------------------------------------- /cm.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 The CyanogenMod Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | $(call inherit-product, device/wileyfox/crackling/full_crackling.mk) 16 | 17 | # Inherit some common CM stuff. 18 | $(call inherit-product, vendor/cm/config/common_full_phone.mk) 19 | 20 | # Must define platform variant before including any common things 21 | TARGET_BOARD_PLATFORM_VARIANT := msm8916 22 | 23 | PRODUCT_NAME := cm_crackling 24 | BOARD_VENDOR := wileyfox 25 | PRODUCT_DEVICE := crackling 26 | 27 | PRODUCT_GMS_CLIENTID_BASE := android-wileyfox 28 | 29 | PRODUCT_MANUFACTURER := Wileyfox 30 | PRODUCT_MODEL := Wileyfox Swift 31 | 32 | PRODUCT_BRAND := Wileyfox 33 | TARGET_VENDOR := wileyfox 34 | TARGET_VENDOR_PRODUCT_NAME := Swift 35 | TARGET_VENDOR_DEVICE_NAME := crackling 36 | -------------------------------------------------------------------------------- /crackling-releasekey.x509.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIID3TCCAsWgAwIBAgIJALjOvufOpe/zMA0GCSqGSIb3DQEBBQUAMIGEMQswCQYD 3 | VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEW 4 | MBQGA1UECgwNQ3lhbm9nZW4gSW5jLjEbMBkGA1UECwwSUmVsZWFzZSBNYW5hZ2Vt 5 | ZW50MRkwFwYDVQQDDBBDeWFub2dlbiBSZWxlYXNlMB4XDTE1MDcxMzE2NTMzOVoX 6 | DTQyMTEyODE2NTMzOVowgYQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApXYXNoaW5n 7 | dG9uMRAwDgYDVQQHDAdTZWF0dGxlMRYwFAYDVQQKDA1DeWFub2dlbiBJbmMuMRsw 8 | GQYDVQQLDBJSZWxlYXNlIE1hbmFnZW1lbnQxGTAXBgNVBAMMEEN5YW5vZ2VuIFJl 9 | bGVhc2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgVxERtKpKPu2e 10 | B0mzTdAJ59Z+tkZFGWgdjP7yssPb4B6UyDCLAQWi55jvd5n64o85cqpPv0wxB5qH 11 | 91+EhF/VZQRmC968bL4cJruBAmI0DfWXjTqwU92e1D+ZdxjO1O0OFUc4SaA87Lrz 12 | EKlvUPgxU6EBULCtMdaFGEKV7U2SYMlJFe8dNbKuXvG5fHhVlNHFYkFtCqLipVyM 13 | 8CxghnR3dUlAQ8b5WhMmEG9wiZLjV3ZyUtTIIYKUIBRCCbnoT4ou705AueJGyN8O 14 | SlQlqvNqWP6oFeAOPP/9NqjEMZRZhuef+0jhb/AI95yXhZkkcIbR+m9FY9j0TixY 15 | pxclVcC/AgMBAAGjUDBOMB0GA1UdDgQWBBRLw6IafNY+2PJM2pWGAkeyerSOPjAf 16 | BgNVHSMEGDAWgBRLw6IafNY+2PJM2pWGAkeyerSOPjAMBgNVHRMEBTADAQH/MA0G 17 | CSqGSIb3DQEBBQUAA4IBAQAJJfPLPb3Y+cY5zXh22P6lOhxN0+b7pYxrsd8nD8z2 18 | QSwVaKaFyas66Oxo2/jsBtRfBkGVaqirX8TA5rpVzrVbRG+tarGouuKWN+KiIvcU 19 | Ck0l9dllEvJ/B/O1fTS63FwyvL3l6eRozKCUShW0/dSsUvlAOuh5Q34CqkDB/hwE 20 | EPywEg19deYnnTpoRD5PZm5Uw2PfeFwrjXgTMEnqxh1LsxJeH/78ZLnU5An8uSm1 21 | lOJHby92RU1HxAqfn1wrbJjJ2pojcwHhg4ISLkyuKXEguVUnZGKGrm8AgzPq+c7z 22 | 5X8iGgQWv/PxyUZ+5kWmc9db2WUtFAnGMnCXSQ2+xevi 23 | -----END CERTIFICATE----- 24 | -------------------------------------------------------------------------------- /device.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # Inherit from msm8916-common 18 | $(call inherit-product, device/cyanogen/msm8916-common/msm8916.mk) 19 | 20 | # Overlay 21 | DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay 22 | 23 | # Include package config fragments 24 | include $(LOCAL_PATH)/product/*.mk 25 | 26 | $(call inherit-product-if-exists, vendor/wileyfox/crackling/crackling-vendor.mk) 27 | -------------------------------------------------------------------------------- /display/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := pp_calib_data_booyi_OTM1287_720p_video_mode_dsi_panel.xml 5 | LOCAL_MODULE_TAGS := optional 6 | LOCAL_MODULE_CLASS := ETC 7 | LOCAL_SRC_FILES := pp_calib_data_booyi_OTM1287_720p_video_mode_dsi_panel.xml 8 | include $(BUILD_PREBUILT) 9 | 10 | -------------------------------------------------------------------------------- /display/synaptics_dsx_fw_update_boyi.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/display/synaptics_dsx_fw_update_boyi.bin -------------------------------------------------------------------------------- /extract-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | set -e 19 | 20 | DEVICE=crackling 21 | VENDOR=wileyfox 22 | 23 | # Load extractutils and do some sanity checks 24 | MY_DIR="${BASH_SOURCE%/*}" 25 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi 26 | 27 | CM_ROOT="$MY_DIR"/../../.. 28 | 29 | HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh 30 | if [ ! -f "$HELPER" ]; then 31 | echo "Unable to find helper script at $HELPER" 32 | exit 1 33 | fi 34 | . "$HELPER" 35 | 36 | if [ $# -eq 0 ]; then 37 | SRC=adb 38 | else 39 | if [ $# -eq 1 ]; then 40 | SRC=$1 41 | else 42 | echo "$0: bad number of arguments" 43 | echo "" 44 | echo "usage: $0 [PATH_TO_EXPANDED_ROM]" 45 | echo "" 46 | echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" 47 | echo "the device using adb pull." 48 | exit 1 49 | fi 50 | fi 51 | 52 | # Initialize the helper 53 | setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" 54 | 55 | extract "$MY_DIR"/proprietary-files-qc.txt "$SRC" 56 | extract "$MY_DIR"/proprietary-files.txt "$SRC" 57 | 58 | "$MY_DIR"/setup-makefiles.sh 59 | -------------------------------------------------------------------------------- /full_crackling.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2015 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # Inherit from those products. Most specific first. 18 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) 19 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) 20 | 21 | # Inherit from crackling device 22 | $(call inherit-product, device/wileyfox/crackling/device.mk) 23 | 24 | # Device identifier. This must come after all inclusions 25 | PRODUCT_DEVICE := crackling 26 | PRODUCT_NAME := full_crackling 27 | PRODUCT_BRAND := wileyfox 28 | PRODUCT_MODEL := CRACKLING 29 | PRODUCT_MANUFACTURER := wileyfox 30 | 31 | -------------------------------------------------------------------------------- /gps/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH := $(call my-dir) 18 | 19 | include $(call all-subdir-makefiles,$(LOCAL_PATH)) 20 | -------------------------------------------------------------------------------- /gps/core/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BUILD_TINY_ANDROID),true) 2 | 3 | LOCAL_PATH := $(call my-dir) 4 | 5 | include $(CLEAR_VARS) 6 | 7 | LOCAL_MODULE := libloc_core 8 | LOCAL_MODULE_OWNER := qcom 9 | 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | ifeq ($(TARGET_DEVICE),apq8026_lw) 13 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 14 | else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true) 15 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 16 | endif 17 | 18 | ifeq ($(QCPATH),) 19 | LOCAL_CFLAGS += -DOSS_BUILD 20 | endif 21 | 22 | LOCAL_SHARED_LIBRARIES := \ 23 | libutils \ 24 | libcutils \ 25 | libgps.utils \ 26 | libdl 27 | 28 | LOCAL_SRC_FILES += \ 29 | LocApiBase.cpp \ 30 | LocAdapterBase.cpp \ 31 | ContextBase.cpp \ 32 | LocDualContext.cpp \ 33 | loc_core_log.cpp 34 | 35 | LOCAL_CFLAGS += \ 36 | -fno-short-enums \ 37 | -D_ANDROID_ 38 | 39 | LOCAL_C_INCLUDES:= \ 40 | $(TARGET_OUT_HEADERS)/gps.utils \ 41 | $(TARGET_OUT_HEADERS)/libflp 42 | 43 | LOCAL_COPY_HEADERS_TO:= libloc_core/ 44 | LOCAL_COPY_HEADERS:= \ 45 | LocApiBase.h \ 46 | LocAdapterBase.h \ 47 | ContextBase.h \ 48 | LocDualContext.h \ 49 | LBSProxyBase.h \ 50 | UlpProxyBase.h \ 51 | gps_extended_c.h \ 52 | gps_extended.h \ 53 | loc_core_log.h \ 54 | LocAdapterProxyBase.h 55 | 56 | LOCAL_PRELINK_MODULE := false 57 | 58 | include $(BUILD_SHARED_LIBRARY) 59 | 60 | endif # not BUILD_TINY_ANDROID 61 | -------------------------------------------------------------------------------- /gps/core/loc_core_log.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef LOC_CORE_LOG_H 31 | #define LOC_CORE_LOG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" 35 | { 36 | #endif 37 | 38 | #include 39 | #include 40 | 41 | const char* loc_get_gps_status_name(GpsStatusValue gps_status); 42 | const char* loc_get_position_mode_name(GpsPositionMode mode); 43 | const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur); 44 | const char* loc_get_aiding_data_mask_names(GpsAidingData data); 45 | const char* loc_get_agps_type_name(AGpsType type); 46 | const char* loc_get_ni_type_name(GpsNiType type); 47 | const char* loc_get_ni_response_name(GpsUserResponseType response); 48 | const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding); 49 | const char* loc_get_agps_bear_name(AGpsBearerType bear); 50 | const char* loc_get_server_type_name(LocServerType type); 51 | const char* loc_get_position_sess_status_name(enum loc_sess_status status); 52 | const char* loc_get_agps_status_name(AGpsStatusValue status); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif /* LOC_CORE_LOG_H */ 59 | -------------------------------------------------------------------------------- /gps/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCHING SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=40 16 | 17 | ################################### 18 | # FLP BATCHING SESSION TIMEOUT 19 | ################################### 20 | # Duration with which batch session timeout 21 | # happens in milliseconds. If not specified 22 | # or set to zero, batching session timeout 23 | # defaults to 20 seconds by the modem. 24 | # BATCH_SESSION_TIMEOUT=20000 25 | 26 | ################################### 27 | # FLP CAPABILITIES BIT MASK 28 | ################################### 29 | # GEOFENCE = 0x01 30 | # BATCHING = 0x02 31 | # default = GEOFENCE | BATCHING 32 | CAPABILITIES=0x03 33 | 34 | ################################### 35 | # FLP BATCHING ACCURACY 36 | ################################### 37 | # Set to one of the defined values below 38 | # to define the accuracy of batching. 39 | # If not specified, accuracy defaults 40 | # to LOW. 41 | # FLP BATCHING ACCURACY values: 42 | # Low accuracy = 0 43 | # Medium accuracy = 1 44 | # High accuracy = 2 45 | ACCURACY=0 46 | 47 | ################################### 48 | # FLP GEOFENCE RESPONSIVENESS 49 | ################################### 50 | # If set to one of the defined values below, 51 | # it will override the responsiveness for 52 | # FLP geofence, which implements the fused 53 | # location API. If not set to a value defined 54 | # below, which is default, it will not 55 | # override the responsivness. 56 | # FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE Values: 57 | # 1: LOW responsiveness 58 | # 2: MEDIUM responsiveness 59 | # 3: HIGH responsiveness 60 | FLP_GEOFENCE_RESPONSIVENESS_OVERRIDE = 0 61 | -------------------------------------------------------------------------------- /gps/loc_api/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH := $(call my-dir) 18 | 19 | include $(call all-subdir-makefiles,$(LOCAL_PATH)) 20 | -------------------------------------------------------------------------------- /gps/loc_api/ds_api/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(QCPATH),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libloc_ds_api 9 | 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | LOCAL_SHARED_LIBRARIES := \ 13 | libutils \ 14 | libcutils \ 15 | libqmi_cci \ 16 | libqmi_common_so \ 17 | libgps.utils \ 18 | libdsi_netctrl \ 19 | libqmiservices 20 | 21 | LOCAL_SRC_FILES += \ 22 | ds_client.c 23 | 24 | LOCAL_CFLAGS += \ 25 | -fno-short-enums \ 26 | -D_ANDROID_ 27 | 28 | LOCAL_COPY_HEADERS_TO:= libloc_ds_api/ 29 | 30 | LOCAL_COPY_HEADERS:= \ 31 | ds_client.h 32 | 33 | LOCAL_LDFLAGS += -Wl,--export-dynamic 34 | 35 | ## Includes 36 | LOCAL_C_INCLUDES := \ 37 | $(TARGET_OUT_HEADERS)/libloc_eng \ 38 | $(TARGET_OUT_HEADERS)/qmi-framework/inc \ 39 | $(TARGET_OUT_HEADERS)/qmi/inc \ 40 | $(TARGET_OUT_HEADERS)/gps.utils \ 41 | $(TARGET_OUT_HEADERS)/data/inc 42 | 43 | 44 | LOCAL_PRELINK_MODULE := false 45 | 46 | include $(BUILD_SHARED_LIBRARY) 47 | 48 | endif # not BUILD_TINY_ANDROID 49 | endif # QCPATH 50 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BUILD_TINY_ANDROID),true) 2 | #Compile this library only for builds with the latest modem image 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libloc_eng 9 | LOCAL_MODULE_OWNER := qcom 10 | 11 | LOCAL_MODULE_TAGS := optional 12 | 13 | LOCAL_SHARED_LIBRARIES := \ 14 | libutils \ 15 | libcutils \ 16 | libdl \ 17 | liblog \ 18 | libloc_core \ 19 | libgps.utils 20 | 21 | LOCAL_SRC_FILES += \ 22 | loc_eng.cpp \ 23 | loc_eng_agps.cpp \ 24 | loc_eng_xtra.cpp \ 25 | loc_eng_ni.cpp \ 26 | loc_eng_log.cpp \ 27 | loc_eng_nmea.cpp \ 28 | LocEngAdapter.cpp 29 | 30 | LOCAL_SRC_FILES += \ 31 | loc_eng_dmn_conn.cpp \ 32 | loc_eng_dmn_conn_handler.cpp \ 33 | loc_eng_dmn_conn_thread_helper.c \ 34 | loc_eng_dmn_conn_glue_msg.c \ 35 | loc_eng_dmn_conn_glue_pipe.c 36 | 37 | LOCAL_CFLAGS += \ 38 | -fno-short-enums \ 39 | -D_ANDROID_ 40 | 41 | ifeq ($(QCPATH),) 42 | LOCAL_CFLAGS += -DOSS_BUILD 43 | endif 44 | 45 | LOCAL_C_INCLUDES:= \ 46 | $(TARGET_OUT_HEADERS)/gps.utils \ 47 | $(TARGET_OUT_HEADERS)/libloc_core \ 48 | $(LOCAL_PATH) \ 49 | $(TARGET_OUT_HEADERS)/libflp 50 | 51 | LOCAL_COPY_HEADERS_TO:= libloc_eng/ 52 | LOCAL_COPY_HEADERS:= \ 53 | LocEngAdapter.h \ 54 | loc.h \ 55 | loc_eng.h \ 56 | loc_eng_xtra.h \ 57 | loc_eng_ni.h \ 58 | loc_eng_agps.h \ 59 | loc_eng_msg.h \ 60 | loc_eng_log.h 61 | 62 | LOCAL_PRELINK_MODULE := false 63 | 64 | include $(BUILD_SHARED_LIBRARY) 65 | 66 | include $(CLEAR_VARS) 67 | 68 | LOCAL_MODULE := gps.$(TARGET_BOARD_PLATFORM) 69 | LOCAL_MODULE_OWNER := qcom 70 | 71 | LOCAL_MODULE_TAGS := optional 72 | 73 | ## Libs 74 | 75 | LOCAL_SHARED_LIBRARIES := \ 76 | libutils \ 77 | libcutils \ 78 | liblog \ 79 | libloc_eng \ 80 | libloc_core \ 81 | libgps.utils \ 82 | libdl 83 | 84 | ifneq ($(filter $(TARGET_DEVICE), apq8084 msm8960), false) 85 | endif 86 | 87 | LOCAL_SRC_FILES += \ 88 | loc.cpp \ 89 | gps.c 90 | 91 | LOCAL_CFLAGS += \ 92 | -fno-short-enums \ 93 | -D_ANDROID_ \ 94 | 95 | ifeq ($(TARGET_USES_QCOM_BSP), true) 96 | LOCAL_CFLAGS += -DTARGET_USES_QCOM_BSP 97 | endif 98 | 99 | ifeq ($(QCPATH),) 100 | LOCAL_CFLAGS += -DOSS_BUILD 101 | endif 102 | 103 | ## Includes 104 | LOCAL_C_INCLUDES:= \ 105 | $(TARGET_OUT_HEADERS)/gps.utils \ 106 | $(TARGET_OUT_HEADERS)/libloc_core \ 107 | $(TARGET_OUT_HEADERS)/libflp 108 | 109 | LOCAL_PRELINK_MODULE := false 110 | LOCAL_MODULE_RELATIVE_PATH := hw 111 | 112 | include $(BUILD_SHARED_LIBRARY) 113 | 114 | endif # not BUILD_TINY_ANDROID 115 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | -I../../utils \ 3 | -I../../platform_lib_abstractions \ 4 | -fno-short-enums \ 5 | -DFEATURE_GNSS_BIT_API 6 | 7 | libloc_adapter_so_la_SOURCES = loc_eng_log.cpp LocEngAdapter.cpp 8 | 9 | if USE_GLIB 10 | libloc_adapter_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 11 | libloc_adapter_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 12 | libloc_adapter_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 13 | else 14 | libloc_adapter_so_la_CFLAGS = $(AM_CFLAGS) 15 | libloc_adapter_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0 16 | libloc_adapter_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 17 | endif 18 | libloc_adapter_so_la_LIBADD = -lstdc++ -lcutils ../../utils/libgps_utils_so.la 19 | 20 | 21 | libloc_eng_so_la_SOURCES = \ 22 | loc_eng.cpp \ 23 | loc_eng_agps.cpp \ 24 | loc_eng_xtra.cpp \ 25 | loc_eng_ni.cpp \ 26 | loc_eng_log.cpp \ 27 | loc_eng_dmn_conn.cpp \ 28 | loc_eng_dmn_conn_handler.cpp \ 29 | loc_eng_dmn_conn_thread_helper.c \ 30 | loc_eng_dmn_conn_glue_msg.c \ 31 | loc_eng_dmn_conn_glue_pipe.c 32 | 33 | 34 | if USE_GLIB 35 | libloc_eng_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 36 | libloc_eng_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 37 | libloc_eng_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 38 | else 39 | libloc_eng_so_la_CFLAGS = $(AM_CFLAGS) 40 | libloc_eng_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0 41 | libloc_eng_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 42 | endif 43 | 44 | libloc_eng_so_la_LIBADD = -lstdc++ -lcutils -ldl ../../utils/libgps_utils_so.la libloc_adapter_so.la 45 | 46 | 47 | libgps_default_so_la_SOURCES = \ 48 | loc.cpp \ 49 | gps.c 50 | 51 | if USE_GLIB 52 | libgps_default_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 53 | libgps_default_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 54 | libgps_default_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 55 | else 56 | libgps_default_so_la_CFLAGS = $(AM_CFLAGS) 57 | libgps_default_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0 58 | libgps_default_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 59 | endif 60 | 61 | libgps_default_so_la_LIBADD = -lstdc++ -lcutils ../../utils/libgps_utils_so.la -ldl libloc_eng_so.la 62 | 63 | library_include_HEADERS = \ 64 | LocEngAdapter.h \ 65 | loc.h \ 66 | loc_eng.h \ 67 | loc_eng_xtra.h \ 68 | loc_eng_ni.h \ 69 | loc_eng_agps.h \ 70 | loc_eng_msg.h \ 71 | loc_eng_log.h 72 | 73 | library_includedir = $(pkgincludedir)/libloc_api_50001 74 | 75 | #Create and Install libraries 76 | lib_LTLIBRARIES = libloc_adapter_so.la libloc_eng_so.la libgps_default_so.la 77 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011,2014 The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef __LOC_H__ 31 | #define __LOC_H__ 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif /* __cplusplus */ 36 | 37 | #include 38 | #include 39 | #include 40 | #include 41 | 42 | #define XTRA_DATA_MAX_SIZE 100000 /*bytes*/ 43 | 44 | typedef void (*loc_location_cb_ext) (UlpLocation* location, void* locExt); 45 | typedef void (*loc_sv_status_cb_ext) (GpsSvStatus* sv_status, void* svExt); 46 | typedef void* (*loc_ext_parser)(void* data); 47 | 48 | typedef struct { 49 | loc_location_cb_ext location_cb; 50 | gps_status_callback status_cb; 51 | loc_sv_status_cb_ext sv_status_cb; 52 | gps_nmea_callback nmea_cb; 53 | gps_set_capabilities set_capabilities_cb; 54 | gps_acquire_wakelock acquire_wakelock_cb; 55 | gps_release_wakelock release_wakelock_cb; 56 | gps_create_thread create_thread_cb; 57 | loc_ext_parser location_ext_parser; 58 | loc_ext_parser sv_ext_parser; 59 | gps_request_utc_time request_utc_time_cb; 60 | } LocCallbacks; 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif /* __cplusplus */ 65 | 66 | #endif //__LOC_H__ 67 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_msg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | #ifndef LOC_ENG_DMN_CONN_GLUE_MSG_H 30 | #define LOC_ENG_DMN_CONN_GLUE_MSG_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif /* __cplusplus */ 35 | 36 | 37 | #include 38 | #include "loc_eng_dmn_conn_glue_pipe.h" 39 | 40 | int loc_eng_dmn_conn_glue_msgget(const char * q_path, int mode); 41 | int loc_eng_dmn_conn_glue_msgremove(const char * q_path, int msgqid); 42 | int loc_eng_dmn_conn_glue_msgsnd(int msgqid, const void * msgp, size_t msgsz); 43 | int loc_eng_dmn_conn_glue_msgrcv(int msgqid, void *msgp, size_t msgsz); 44 | int loc_eng_dmn_conn_glue_msgflush(int msgqid); 45 | int loc_eng_dmn_conn_glue_msgunblock(int msgqid); 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif /* __cplusplus */ 50 | 51 | #endif /* LOC_ENG_DMN_CONN_GLUE_MSG_H */ 52 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_dmn_conn_glue_pipe.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | #ifndef LOC_ENG_DMN_CONN_GLUE_PIPE_H 30 | #define LOC_ENG_DMN_CONN_GLUE_PIPE_H 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif /* __cplusplus */ 35 | 36 | #include 37 | 38 | int loc_eng_dmn_conn_glue_pipeget(const char * pipe_name, int mode); 39 | int loc_eng_dmn_conn_glue_piperemove(const char * pipe_name, int fd); 40 | int loc_eng_dmn_conn_glue_pipewrite(int fd, const void * buf, size_t sz); 41 | int loc_eng_dmn_conn_glue_piperead(int fd, void * buf, size_t sz); 42 | 43 | int loc_eng_dmn_conn_glue_pipeflush(int fd); 44 | int loc_eng_dmn_conn_glue_pipeunblock(int fd); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif /* __cplusplus */ 49 | 50 | #endif /* LOC_ENG_DMN_CONN_GLUE_PIPE_H */ 51 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_log.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #define LOG_NDDEBUG 0 31 | #define LOG_TAG "LocSvc_eng" 32 | 33 | #include "loc_log.h" 34 | #include "loc_eng_log.h" 35 | 36 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_log.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef LOC_ENG_LOG_H 31 | #define LOC_ENG_LOG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" 35 | { 36 | #endif 37 | 38 | #include 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif /* LOC_ENG_LOG_H */ 45 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_nmea.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef LOC_ENG_NMEA_H 31 | #define LOC_ENG_NMEA_H 32 | 33 | #include 34 | #include 35 | 36 | #define NMEA_SENTENCE_MAX_LENGTH 200 37 | 38 | void loc_eng_nmea_send(char *pNmea, int length, loc_eng_data_s_type *loc_eng_data_p); 39 | int loc_eng_nmea_put_checksum(char *pNmea, int maxSize); 40 | void loc_eng_nmea_generate_sv(loc_eng_data_s_type *loc_eng_data_p, const GnssSvStatus &svStatus, const GpsLocationExtended &locationExtended); 41 | void loc_eng_nmea_generate_pos(loc_eng_data_s_type *loc_eng_data_p, const UlpLocation &location, const GpsLocationExtended &locationExtended, unsigned char generate_nmea); 42 | 43 | #endif // LOC_ENG_NMEA_H 44 | -------------------------------------------------------------------------------- /gps/loc_api/libloc_api_50001/loc_eng_xtra.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009,2011 The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef LOC_ENG_XTRA_H 31 | #define LOC_ENG_XTRA_H 32 | 33 | #include 34 | 35 | // Module data 36 | typedef struct 37 | { 38 | // loc_eng_ioctl_cb_data_s_type ioctl_cb_data; 39 | gps_xtra_download_request download_request_cb; 40 | report_xtra_server report_xtra_server_cb; 41 | 42 | // XTRA data buffer 43 | char *xtra_data_for_injection; // NULL if no pending data 44 | int xtra_data_len; 45 | } loc_eng_xtra_data_s_type; 46 | 47 | #endif // LOC_ENG_XTRA_H 48 | -------------------------------------------------------------------------------- /gps/loc_api/loc_api_v02/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(QCPATH),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libloc_api_v02 9 | 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | ifeq ($(TARGET_DEVICE),apq8026_lw) 13 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 14 | else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true) 15 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 16 | endif 17 | 18 | LOCAL_SHARED_LIBRARIES := \ 19 | libutils \ 20 | libcutils \ 21 | libqmi_cci \ 22 | libqmi_common_so \ 23 | libloc_core \ 24 | libgps.utils \ 25 | libdl 26 | 27 | LOCAL_SRC_FILES = \ 28 | LocApiV02.cpp \ 29 | loc_api_v02_log.c \ 30 | loc_api_v02_client.c \ 31 | loc_api_sync_req.c \ 32 | location_service_v02.c 33 | 34 | LOCAL_CFLAGS += \ 35 | -fno-short-enums \ 36 | -D_ANDROID_ 37 | 38 | LOCAL_COPY_HEADERS_TO:= libloc_api_v02/ 39 | 40 | LOCAL_COPY_HEADERS:= \ 41 | location_service_v02.h \ 42 | loc_api_v02_log.h \ 43 | loc_api_v02_client.h \ 44 | loc_api_sync_req.h \ 45 | LocApiV02.h \ 46 | loc_util_log.h 47 | 48 | 49 | ## Includes 50 | LOCAL_C_INCLUDES := \ 51 | $(TARGET_OUT_HEADERS)/libloc_core \ 52 | $(TARGET_OUT_HEADERS)/qmi-framework/inc \ 53 | $(TARGET_OUT_HEADERS)/qmi/inc \ 54 | $(TARGET_OUT_HEADERS)/gps.utils \ 55 | $(TARGET_OUT_HEADERS)/libloc_ds_api 56 | 57 | LOCAL_PRELINK_MODULE := false 58 | 59 | include $(BUILD_SHARED_LIBRARY) 60 | 61 | endif # not BUILD_TINY_ANDROID 62 | endif # QCPATH 63 | -------------------------------------------------------------------------------- /gps/loc_api/loc_api_v02/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | ${QMIF_CFLAGS} \ 3 | -I../../utils \ 4 | -I../../platform_lib_abstractions \ 5 | -I../libloc_api_50001 6 | 7 | requiredlibs = \ 8 | ${QMIF_LIBS} \ 9 | ../libloc_api_50001/libloc_adapter_so.la \ 10 | ../../utils/libgps_utils_so.la 11 | 12 | h_sources = LocApiV02Adapter.h \ 13 | loc_util_log.h \ 14 | location_service_v02.h \ 15 | loc_api_sync_req.h \ 16 | loc_api_v02_client.h \ 17 | loc_api_v02_log.h 18 | 19 | c_sources = LocApiV02Adapter.cpp \ 20 | loc_api_v02_log.c \ 21 | loc_api_v02_client.c \ 22 | loc_api_sync_req.c \ 23 | location_service_v02.c 24 | 25 | library_includedir = $(pkgincludedir) 26 | library_include_HEADERS = $(h_sources) 27 | 28 | libloc_api_la_SOURCES = $(c_sources) $(h_sources) 29 | 30 | if USE_GLIB 31 | libloc_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 32 | libloc_api_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 33 | libloc_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 34 | else 35 | libloc_api_la_CFLAGS = $(AM_CFLAGS) 36 | libloc_api_la_LDFLAGS = -shared -version-info 1:0:0 37 | libloc_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 38 | endif 39 | 40 | libloc_api_la_LIBADD = $(requiredlibs) -lstdc++ 41 | 42 | lib_LTLIBRARIES = libloc_api.la 43 | -------------------------------------------------------------------------------- /gps/loc_api/loc_api_v02/loc_api_v02_log.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef LOC_API_V02_LOG_H 31 | #define LOC_API_V02_LOG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" 35 | { 36 | #endif 37 | 38 | #include 39 | #include 40 | 41 | const char* loc_get_v02_event_name(uint32_t event); 42 | const char* loc_get_v02_client_status_name(locClientStatusEnumType status); 43 | const char* loc_get_v02_qmi_status_name(qmiLocStatusEnumT_v02 status); 44 | 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* LOC_API_V02_LOG_H */ 51 | -------------------------------------------------------------------------------- /gps/quipc.conf: -------------------------------------------------------------------------------- 1 | # X86 ONLY - UBUNTU: 2 | # Set QUIPC_CONF_PATH environment variable to indicate the path of this file, e.g: 3 | # export QUIPC_CONF_PATH="/usr2/arahmat/quipc.conf" 4 | 5 | # URL for QUIPS server (N3) 6 | QUIPS_SERVER_URL = https://n3.indoor.izat-location.net/quipsds/LookupService 7 | 8 | # URL for RAS server 9 | RAS_SERVER_URL = https://r1.indoor.izat-location.net/ras/DeviceRegistration 10 | 11 | # Password for secured MSAP-enabled AP 12 | SSID_PWD = qu1pspsk 13 | -------------------------------------------------------------------------------- /gps/sap.conf: -------------------------------------------------------------------------------- 1 | ################################ 2 | # Sensor Settings 3 | ################################ 4 | #The following parameters are optional. 5 | #Internal defaults support MEMS sensors 6 | #native to most handset devices. 7 | #Device specific sensor characterization 8 | #for improved performance is possible as 9 | #described in SAP application notes. 10 | #GYRO_BIAS_RANDOM_WALK= 11 | #ACCEL_RANDOM_WALK_SPECTRAL_DENSITY= 12 | #ANGLE_RANDOM_WALK_SPECTRAL_DENSITY= 13 | #RATE_RANDOM_WALK_SPECTRAL_DENSITY= 14 | #VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY= 15 | 16 | # Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0) 17 | # used in loc_eng_reinit 18 | SENSOR_ACCEL_BATCHES_PER_SEC=2 19 | SENSOR_ACCEL_SAMPLES_PER_BATCH=5 20 | SENSOR_GYRO_BATCHES_PER_SEC=2 21 | SENSOR_GYRO_SAMPLES_PER_BATCH=5 22 | # Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0) 23 | SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4 24 | SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25 25 | SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4 26 | SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25 27 | 28 | # Sensor Control Mode (0=AUTO, 1=FORCE_ON) 29 | # used in loc_eng_reinit 30 | SENSOR_CONTROL_MODE=0 31 | 32 | # Enable or Disable Sensors for GPS use (0=Enable, 1=Disable) 33 | # used in loc_eng_reinit 34 | SENSOR_USAGE=0 35 | 36 | # Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK) 37 | SENSOR_PROVIDER=1 38 | 39 | # Bit mask used to define which sensor algorithms are used. 40 | # Setting each bit has the following definition: 41 | # 0x1 - DISABLE_INS_POSITIONING_FILTER 42 | # 0x0 - ENABLE_INS_POSITIONING_FILTER 43 | SENSOR_ALGORITHM_CONFIG_MASK=0x0 44 | 45 | # Time source used by Sensor HAL 46 | # Setting this value controls accuracy of location sensor services. 47 | # 0 - Unknown 48 | # 1 - CLOCK_BOOTTIME 49 | # 2 - CLOCK_MONOTONIC 50 | # 3 - CLOCK_REALTIME 51 | # 4 - CLOCK_BOOTTIME using Alarm timer interface 52 | NDK_PROVIDER_TIME_SOURCE=1 53 | 54 | -------------------------------------------------------------------------------- /gps/utils/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BUILD_TINY_ANDROID),true) 2 | #Compile this library only for builds with the latest modem image 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | ## Libs 9 | LOCAL_SHARED_LIBRARIES := \ 10 | libutils \ 11 | libcutils \ 12 | liblog 13 | 14 | LOCAL_SRC_FILES += \ 15 | loc_log.cpp \ 16 | loc_cfg.cpp \ 17 | msg_q.c \ 18 | linked_list.c \ 19 | loc_target.cpp \ 20 | platform_lib_abstractions/elapsed_millis_since_boot.cpp \ 21 | LocHeap.cpp \ 22 | LocTimer.cpp \ 23 | LocThread.cpp \ 24 | MsgTask.cpp \ 25 | loc_misc_utils.cpp 26 | 27 | LOCAL_CFLAGS += \ 28 | -fno-short-enums \ 29 | -D_ANDROID_ \ 30 | -std=c++11 31 | 32 | ifeq ($(TARGET_BUILD_VARIANT),user) 33 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 34 | endif 35 | 36 | LOCAL_LDFLAGS += -Wl,--export-dynamic 37 | 38 | ## Includes 39 | LOCAL_C_INCLUDES:= \ 40 | $(LOCAL_PATH)/platform_lib_abstractions 41 | 42 | LOCAL_COPY_HEADERS_TO:= gps.utils/ 43 | LOCAL_COPY_HEADERS:= \ 44 | loc_log.h \ 45 | loc_cfg.h \ 46 | log_util.h \ 47 | linked_list.h \ 48 | msg_q.h \ 49 | MsgTask.h \ 50 | LocHeap.h \ 51 | LocThread.h \ 52 | LocTimer.h \ 53 | loc_target.h \ 54 | loc_timer.h \ 55 | LocSharedLock.h \ 56 | platform_lib_abstractions/platform_lib_includes.h \ 57 | platform_lib_abstractions/platform_lib_time.h \ 58 | platform_lib_abstractions/platform_lib_macros.h \ 59 | loc_misc_utils.h 60 | 61 | LOCAL_MODULE := libgps.utils 62 | LOCAL_CLANG := false 63 | 64 | LOCAL_MODULE_TAGS := optional 65 | 66 | LOCAL_PRELINK_MODULE := false 67 | 68 | include $(BUILD_SHARED_LIBRARY) 69 | endif # not BUILD_TINY_ANDROID 70 | -------------------------------------------------------------------------------- /gps/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -Wundef \ 2 | -MD \ 3 | -Wno-trigraphs \ 4 | -g -O0 \ 5 | -fno-inline \ 6 | -fno-short-enums \ 7 | -fpic \ 8 | -I../platform_lib_abstractions 9 | 10 | libgps_utils_so_la_h_sources = log_util.h \ 11 | msg_q.h \ 12 | linked_list.h \ 13 | loc_cfg.h \ 14 | loc_log.h \ 15 | ../platform_lib_abstractions/platform_lib_includes.h \ 16 | ../platform_lib_abstractions/platform_lib_time.h \ 17 | ../platform_lib_abstractions/platform_lib_macros.h 18 | 19 | libgps_utils_so_la_c_sources = linked_list.c \ 20 | msg_q.c \ 21 | loc_cfg.cpp \ 22 | loc_log.cpp \ 23 | ../platform_lib_abstractions/elapsed_millis_since_boot.cpp 24 | 25 | library_includedir = $(pkgincludedir)/utils 26 | 27 | library_include_HEADERS = $(libgps_utils_so_la_h_sources) 28 | 29 | libgps_utils_so_la_SOURCES = $(libgps_utils_so_la_c_sources) 30 | 31 | if USE_GLIB 32 | libgps_utils_so_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 33 | libgps_utils_so_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 34 | libgps_utils_so_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 35 | else 36 | libgps_utils_so_la_CFLAGS = $(AM_CFLAGS) 37 | libgps_utils_so_la_LDFLAGS = -lpthread -shared -version-info 1:0:0 38 | libgps_utils_so_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 39 | endif 40 | 41 | libgps_utils_so_la_LIBADD = -lstdc++ -lcutils 42 | 43 | #Create and Install libraries 44 | lib_LTLIBRARIES = libgps_utils_so.la 45 | -------------------------------------------------------------------------------- /gps/utils/platform_lib_abstractions/elapsed_millis_since_boot.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #include 30 | #include 31 | #include "platform_lib_time.h" 32 | 33 | int64_t systemTime(int clock) 34 | { 35 | struct timeval t; 36 | t.tv_sec = t.tv_usec = 0; 37 | gettimeofday(&t, NULL); 38 | return t.tv_sec*1000000LL + t.tv_usec; 39 | } 40 | 41 | 42 | int64_t elapsedMillisSinceBoot() 43 | { 44 | int64_t t_us = systemTime(0); 45 | return (int64_t) t_us / 1000LL; 46 | } 47 | -------------------------------------------------------------------------------- /gps/utils/platform_lib_abstractions/platform_lib_includes.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef _PLATFORM_LIB_INCLUDES_H_ 30 | #define _PLATFORM_LIB_INCLUDES_H_ 31 | 32 | #include "platform_lib_time.h" 33 | #include "platform_lib_macros.h" 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /gps/utils/platform_lib_abstractions/platform_lib_time.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef _PLATFORM_LIB_TIME_H_ 30 | #define _PLATFORM_LIB_TIME_H_ 31 | 32 | int64_t systemTime(int clock); 33 | int64_t elapsedMillisSinceBoot(); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /keylayout/gpio-keys.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | 27 | key 115 VOLUME_UP WAKE_DROPPED 28 | key 114 VOLUME_DOWN WAKE_DROPPED 29 | -------------------------------------------------------------------------------- /keylayout/qpnp_pon.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | 27 | key 116 POWER WAKE_DROPPED 28 | -------------------------------------------------------------------------------- /liblight/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2008 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | LOCAL_PATH:= $(call my-dir) 16 | # HAL module implemenation stored in 17 | # hw/..so 18 | include $(CLEAR_VARS) 19 | 20 | LOCAL_SRC_FILES := lights.c 21 | LOCAL_MODULE_RELATIVE_PATH := hw 22 | LOCAL_SHARED_LIBRARIES := liblog 23 | LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdlights\" 24 | LOCAL_MODULE := lights.$(TARGET_BOARD_PLATFORM) 25 | LOCAL_MODULE_TAGS := optional 26 | 27 | include $(BUILD_SHARED_LIBRARY) 28 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/cm_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml/power_profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 63 4 | 261 5 | 93.5 6 | 3.6 7 | 1.7 8 | 131 9 | 100 10 | 24 11 | 63 12 | 159 13 | 4 14 | 46 15 | 16 | 3.9 17 | 2.8 18 | 19 | 20 | 200000 21 | 400000 22 | 533333 23 | 800000 24 | 998000 25 | 1094400 26 | 1190400 27 | 28 | 29 | 151 30 | 169 31 | 177 32 | 195 33 | 259 34 | 307 35 | 353 36 | 37 | 1.6 38 | 2500 39 | 40 | -------------------------------------------------------------------------------- /overlay/packages/apps/Mms/res/xml/mms_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | http://ua-profiles.cyngn.com/crackling/crackling-1016c1298e.rdf 20 | 21 | 22 | 23 | Wileyfox-Swift/1.0 24 | 25 | 26 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/bools.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | fluence 20 | 21 | 24 | 25 | dualmic 26 | none 27 | 28 | 29 | -------------------------------------------------------------------------------- /product/android.mk: -------------------------------------------------------------------------------- 1 | # First api level, device has been commercially launched 2 | PRODUCT_PROPERTY_OVERRIDES += \ 3 | ro.product.first_api_level=22 4 | -------------------------------------------------------------------------------- /product/browser.mk: -------------------------------------------------------------------------------- 1 | # Gello 2 | PRODUCT_PACKAGES += \ 3 | Gello 4 | -------------------------------------------------------------------------------- /product/display.mk: -------------------------------------------------------------------------------- 1 | # Boot animation 2 | TARGET_SCREEN_HEIGHT := 1280 3 | TARGET_SCREEN_WIDTH := 720 4 | 5 | # Panel 6 | PRODUCT_PACKAGES += \ 7 | pp_calib_data_booyi_OTM1287_720p_video_mode_dsi_panel.xml 8 | 9 | # Screen density 10 | PRODUCT_PROPERTY_OVERRIDES += \ 11 | ro.sf.lcd_density=320 12 | 13 | PRODUCT_AAPT_CONFIG := normal 14 | PRODUCT_AAPT_PREF_CONFIG := xhdpi 15 | 16 | $(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk) 17 | $(call inherit-product, frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk) 18 | -------------------------------------------------------------------------------- /product/init.mk: -------------------------------------------------------------------------------- 1 | # Init scripts 2 | PRODUCT_PACKAGES += \ 3 | fstab.qcom \ 4 | init.target.rc 5 | -------------------------------------------------------------------------------- /product/keylayouts.mk: -------------------------------------------------------------------------------- 1 | # Keylayout 2 | PRODUCT_COPY_FILES += \ 3 | $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ 4 | $(LOCAL_PATH)/keylayout/qpnp_pon.kl:system/usr/keylayout/qpnp_pon.kl 5 | -------------------------------------------------------------------------------- /product/lights.mk: -------------------------------------------------------------------------------- 1 | # Lights 2 | PRODUCT_PACKAGES += \ 3 | lights.msm8916 4 | -------------------------------------------------------------------------------- /product/media.mk: -------------------------------------------------------------------------------- 1 | # Media 2 | PRODUCT_COPY_FILES += \ 3 | $(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml \ 4 | $(LOCAL_PATH)/configs/media_codecs_performance.xml:system/etc/media_codecs_performance.xml 5 | -------------------------------------------------------------------------------- /product/partitions.mk: -------------------------------------------------------------------------------- 1 | # Factory reset protection 2 | PRODUCT_PROPERTY_OVERRIDES += \ 3 | ro.frp.pst=/dev/block/bootdevice/by-name/frp 4 | -------------------------------------------------------------------------------- /product/qcom-audio.mk: -------------------------------------------------------------------------------- 1 | # Audio 2 | PRODUCT_COPY_FILES += \ 3 | $(LOCAL_PATH)/audio/acdb/QRD_Bluetooth_cal.acdb:system/etc/acdbdata/QRD/QRD_Bluetooth_cal.acdb \ 4 | $(LOCAL_PATH)/audio/acdb/QRD_General_cal.acdb:system/etc/acdbdata/QRD/QRD_General_cal.acdb \ 5 | $(LOCAL_PATH)/audio/acdb/QRD_Global_cal.acdb:system/etc/acdbdata/QRD/QRD_Global_cal.acdb \ 6 | $(LOCAL_PATH)/audio/acdb/QRD_Handset_cal.acdb:system/etc/acdbdata/QRD/QRD_Handset_cal.acdb \ 7 | $(LOCAL_PATH)/audio/acdb/QRD_Hdmi_cal.acdb:system/etc/acdbdata/QRD/QRD_Hdmi_cal.acdb \ 8 | $(LOCAL_PATH)/audio/acdb/QRD_Headset_cal.acdb:system/etc/acdbdata/QRD/QRD_Headset_cal.acdb \ 9 | $(LOCAL_PATH)/audio/acdb/QRD_Speaker_cal.acdb:system/etc/acdbdata/QRD/QRD_Speaker_cal.acdb \ 10 | $(LOCAL_PATH)/audio/audio_platform_info.xml:system/etc/audio_platform_info.xml \ 11 | $(LOCAL_PATH)/audio/audio_policy.conf:system/etc/audio_policy.conf \ 12 | $(LOCAL_PATH)/audio/mixer_paths.xml:system/etc/mixer_paths_qrd_skui.xml 13 | 14 | # Permissions 15 | PRODUCT_COPY_FILES += \ 16 | frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ 17 | 18 | # Properties 19 | PRODUCT_PROPERTY_OVERRIDES += \ 20 | ro.qc.sdk.audio.fluencetype=fluence \ 21 | persist.audio.fluence.voicecall=true \ 22 | persist.audio.fluence.voicerec=false \ 23 | persist.audio.fluence.speaker=false 24 | -------------------------------------------------------------------------------- /product/qcom-camera.mk: -------------------------------------------------------------------------------- 1 | # Camera 2 | PRODUCT_PACKAGES += \ 3 | camera.msm8916 \ 4 | libmm-qcamera \ 5 | Snap 6 | 7 | # Permissions 8 | PRODUCT_COPY_FILES += \ 9 | frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ 10 | frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml 11 | 12 | # Properties 13 | PRODUCT_PROPERTY_OVERRIDES += \ 14 | persist.camera.cpp.duplication=false \ 15 | persist.camera.hal.debug.mask=0 16 | -------------------------------------------------------------------------------- /product/qcom-cne.mk: -------------------------------------------------------------------------------- 1 | # CNE 2 | PRODUCT_PROPERTY_OVERRIDES += \ 3 | persist.cne.feature=1 4 | -------------------------------------------------------------------------------- /product/qcom-gps.mk: -------------------------------------------------------------------------------- 1 | # GPS 2 | PRODUCT_PACKAGES += \ 3 | gps.msm8916 4 | 5 | PRODUCT_COPY_FILES += \ 6 | $(LOCAL_PATH)/gps/flp.conf:system/etc/flp.conf \ 7 | $(LOCAL_PATH)/gps/gps.conf:system/etc/gps.conf \ 8 | $(LOCAL_PATH)/gps/izat.conf:system/etc/izat.conf \ 9 | $(LOCAL_PATH)/gps/quipc.conf:system/etc/quipc.conf \ 10 | $(LOCAL_PATH)/gps/sap.conf:system/etc/sap.conf 11 | 12 | # Permissions 13 | PRODUCT_COPY_FILES += \ 14 | frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml 15 | 16 | # Properties 17 | PRODUCT_PROPERTY_OVERRIDES += \ 18 | persist.gps.qc_nlp_in_use=1 \ 19 | persist.loc.nlp_name=com.qualcomm.location \ 20 | ro.gps.agps_provider=1 21 | -------------------------------------------------------------------------------- /product/qcom-radio.mk: -------------------------------------------------------------------------------- 1 | # Properties 2 | PRODUCT_PROPERTY_OVERRIDES += \ 3 | persist.radio.multisim.config=dsds \ 4 | persist.radio.custom_ecc=1 \ 5 | persist.radio.ecc_hard_1=998 \ 6 | persist.radio.ecc_hard_count=1 \ 7 | rild.libpath=/system/vendor/lib64/libril-qc-qmi-1.so \ 8 | ro.telephony.default_network=9,9 9 | 10 | # RIL 11 | ifeq ($(QCPATH),) 12 | PRODUCT_COPY_FILES += \ 13 | $(LOCAL_PATH)/configs/data/netmgr_config.xml:system/etc/data/netmgr_config.xml \ 14 | $(LOCAL_PATH)/configs/data/qmi_config.xml:system/etc/data/qmi_config.xml \ 15 | $(LOCAL_PATH)/configs/data/dsi_config.xml:system/etc/data/dsi_config.xml 16 | endif 17 | -------------------------------------------------------------------------------- /product/qcom-wifi.mk: -------------------------------------------------------------------------------- 1 | # Wifi 2 | PRODUCT_COPY_FILES += \ 3 | $(LOCAL_PATH)/wifi/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \ 4 | $(LOCAL_PATH)/wifi/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \ 5 | $(LOCAL_PATH)/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin 6 | -------------------------------------------------------------------------------- /product/recovery.mk: -------------------------------------------------------------------------------- 1 | # Recovery 2 | PRODUCT_EXTRA_RECOVERY_KEYS += \ 3 | $(LOCAL_PATH)/crackling-releasekey 4 | -------------------------------------------------------------------------------- /product/sensors.mk: -------------------------------------------------------------------------------- 1 | # Sensors 2 | PRODUCT_PACKAGES += \ 3 | accelcal \ 4 | AccCalibration \ 5 | sensord \ 6 | sensors.msm8916 7 | 8 | # Permissions 9 | PRODUCT_COPY_FILES += \ 10 | frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \ 11 | frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ 12 | frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \ 13 | frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ 14 | frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ 15 | frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml 16 | -------------------------------------------------------------------------------- /product/touchscreen.mk: -------------------------------------------------------------------------------- 1 | # Touchscreen 2 | PRODUCT_COPY_FILES += \ 3 | $(LOCAL_PATH)/display/synaptics_dsx_fw_update_boyi.bin:system/etc/firmware/synaptics_dsx_fw_update_boyi.bin 4 | -------------------------------------------------------------------------------- /product/usb.mk: -------------------------------------------------------------------------------- 1 | # USB ID 2 | ADDITIONAL_DEFAULT_PROPERTIES += \ 3 | ro.usb.id.midi=90BA \ 4 | ro.usb.id.midi_adb=90BB \ 5 | ro.usb.id.mtp=2281 \ 6 | ro.usb.id.mtp_adb=2282 \ 7 | ro.usb.id.ptp=2284 \ 8 | ro.usb.id.ptp_adb=2283 \ 9 | ro.usb.id.ums=2286 \ 10 | ro.usb.id.ums_adb=2285 \ 11 | ro.usb.vid=2970 12 | -------------------------------------------------------------------------------- /proprietary-files.txt: -------------------------------------------------------------------------------- 1 | # Signed Venus (media) firmware 2 | etc/firmware/venus.b00 3 | etc/firmware/venus.b01 4 | etc/firmware/venus.b02 5 | etc/firmware/venus.b03 6 | etc/firmware/venus.b04 7 | etc/firmware/venus.mbn 8 | etc/firmware/venus.mdt 9 | -------------------------------------------------------------------------------- /rootdir/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | # Init scripts 4 | 5 | include $(CLEAR_VARS) 6 | LOCAL_MODULE := fstab.qcom 7 | LOCAL_MODULE_TAGS := optional eng 8 | LOCAL_MODULE_CLASS := ETC 9 | LOCAL_SRC_FILES := etc/fstab.qcom 10 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 11 | include $(BUILD_PREBUILT) 12 | 13 | include $(CLEAR_VARS) 14 | LOCAL_MODULE := init.target.rc 15 | LOCAL_MODULE_TAGS := optional eng 16 | LOCAL_MODULE_CLASS := ETC 17 | LOCAL_SRC_FILES := etc/init.target.rc 18 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 19 | include $(BUILD_PREBUILT) 20 | -------------------------------------------------------------------------------- /rootdir/etc/fstab.qcom: -------------------------------------------------------------------------------- 1 | # Android fstab file. 2 | # The filesystem that contains the filesystem checker binary (typically /system) cannot 3 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK 4 | 5 | /dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait 6 | /dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,check,formattable,encryptable=footer,length=-16384 7 | /dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,check,formattable 8 | /dev/block/bootdevice/by-name/persist /persist ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait 9 | /dev/block/bootdevice/by-name/boot /boot emmc defaults defaults 10 | /dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults 11 | /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults 12 | /dev/block/bootdevice/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait 13 | 14 | /devices/soc.0/7864900.sdhci/mmc_host* auto auto defaults voldmanaged=sdcard1:auto,noemulatedsd,encryptable=userdata 15 | /devices/platform/msm_hsusb* auto auto defaults voldmanaged=usbdisk:auto 16 | -------------------------------------------------------------------------------- /sensors/Android.mk: -------------------------------------------------------------------------------- 1 | #BOSCH bst sensors HAL 2 | include $(all-subdir-makefiles) 3 | -------------------------------------------------------------------------------- /sensors/algo/common/compass/AKFS_AOC.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef AKFS_INC_AOC_H 19 | #define AKFS_INC_AOC_H 20 | 21 | #include "AKFS_Device.h" 22 | 23 | /***** Constant definition ****************************************************/ 24 | #define AKFS_HBUF_SIZE 20 25 | #define AKFS_HOBUF_SIZE 4 26 | #define AKFS_HR_TH 10 27 | #define AKFS_HO_TH 0.15 28 | 29 | /***** Macro definition *******************************************************/ 30 | 31 | /***** Type declaration *******************************************************/ 32 | typedef struct _AKFS_AOC_VAR{ 33 | AKFVEC hbuf[AKFS_HBUF_SIZE]; 34 | AKFVEC hobuf[AKFS_HOBUF_SIZE]; 35 | AKFLOAT hraoc; 36 | } AKFS_AOC_VAR; 37 | 38 | /***** Prototype of function **************************************************/ 39 | AKLIB_C_API_START 40 | int16 AKFS_AOC( 41 | AKFS_AOC_VAR *haocv, 42 | const AKFVEC *hdata, 43 | AKFVEC *ho 44 | ); 45 | 46 | void AKFS_InitAOC( 47 | AKFS_AOC_VAR *haocv 48 | ); 49 | 50 | AKLIB_C_API_END 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /sensors/algo/common/compass/AKFS_Configure.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef AKFS_INC_CONFIG_H 19 | #define AKFS_INC_CONFIG_H 20 | 21 | /***** Language configuration *************************************************/ 22 | #if defined(__cplusplus) 23 | #define AKLIB_C_API_START extern "C" { 24 | #define AKLIB_C_API_END } 25 | #else 26 | #define AKLIB_C_API_START 27 | #define AKLIB_C_API_END 28 | #endif 29 | 30 | /*! If following line is commented in, double type is used for floating point 31 | calculation */ 32 | /* 33 | #define AKFS_PRECISION_DOUBLE 34 | */ 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /sensors/algo/common/compass/AKFS_Decomp.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #include "AKFS_Decomp.h" 19 | #include "AKFS_Device.h" 20 | 21 | /******************************************************************************/ 22 | /*! Convert from sensor local data unit to micro tesla, then buffer the data. 23 | @return #AKFS_SUCCESS on success. Otherwise the return value is #AKFS_ERROR. 24 | @param[in] mag 25 | @param[in] status 26 | @param[in] asa 27 | @param[in] nhdata 28 | @param[out] hdata 29 | */ 30 | int16 AKFS_Decomp( 31 | const int16 mag[3], 32 | const int16 status, 33 | const uint8vec *asa, 34 | const int16 nhdata, 35 | AKFVEC hdata[] 36 | ) 37 | { 38 | /* put st1 and st2 value */ 39 | if (AKM_ST_ERROR(status)) { 40 | return AKFS_ERROR; 41 | } 42 | 43 | /* magnetic */ 44 | AKFS_BufShift(nhdata, 1, hdata); 45 | hdata[0].u.x = AKM_HDATA_CONVERTER(mag[0], asa->u.x) * AKM_SENSITIVITY; 46 | hdata[0].u.y = AKM_HDATA_CONVERTER(mag[1], asa->u.y) * AKM_SENSITIVITY; 47 | hdata[0].u.z = AKM_HDATA_CONVERTER(mag[2], asa->u.z) * AKM_SENSITIVITY; 48 | 49 | return AKFS_SUCCESS; 50 | } 51 | 52 | -------------------------------------------------------------------------------- /sensors/algo/common/compass/AKFS_Decomp.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef AKFS_INC_DECOMP_H 19 | #define AKFS_INC_DECOMP_H 20 | 21 | #include "AKFS_Device.h" 22 | 23 | /***** Constant definition ****************************************************/ 24 | #if defined(AKM_DEVICE_AK8963) 25 | #define AKM_SENSITIVITY 0.15f 26 | #define AKM_ST_ERROR(st) (((st)&0x19) != 0x11) 27 | #define AKM_HDATA_CONVERTER(data, asa) \ 28 | (AKFLOAT)(((data)*(((asa)/256.0f) + 0.5f))) 29 | 30 | #elif defined(AKM_DEVICE_AK8975) 31 | #define AKM_SENSITIVITY 0.3f 32 | #define AKM_ST_ERROR(st) (((st)&0x09) != 0x01) 33 | #define AKM_HDATA_CONVERTER(data, asa) \ 34 | (AKFLOAT)(((data)*(((asa)/256.0f) + 0.5f))) 35 | 36 | #elif defined(AKM_DEVICE_AK09911) 37 | #define AKM_SENSITIVITY 0.6f 38 | #define AKM_ST_ERROR(st) (((st)&0x09) != 0x01) 39 | #define AKM_HDATA_CONVERTER(data, asa) \ 40 | (AKFLOAT)(((data)*(((asa)/128.0f) + 1.0f))) 41 | 42 | #endif 43 | 44 | 45 | /***** Type declaration *******************************************************/ 46 | 47 | /***** Prototype of function **************************************************/ 48 | AKLIB_C_API_START 49 | int16 AKFS_Decomp( 50 | const int16 mag[3], 51 | const int16 status, 52 | const uint8vec *asa, 53 | const int16 nhdata, 54 | AKFVEC hdata[] 55 | ); 56 | AKLIB_C_API_END 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /sensors/algo/common/compass/AKFS_Direction.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef AKFS_INC_DIRECTION_H 19 | #define AKFS_INC_DIRECTION_H 20 | 21 | #include "AKFS_Device.h" 22 | 23 | /***** Prototype of function **************************************************/ 24 | AKLIB_C_API_START 25 | int16 AKFS_Direction( 26 | const int16 nhvec, 27 | const AKFVEC hvec[], 28 | const int16 hnave, 29 | const int16 navec, 30 | const AKFVEC avec[], 31 | const int16 anave, 32 | AKFLOAT *azimuth, 33 | AKFLOAT *pitch, 34 | AKFLOAT *roll 35 | ); 36 | AKLIB_C_API_END 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /sensors/algo/common/compass/AKFS_Math.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef AKFS_INC_MATH_H 19 | #define AKFS_INC_MATH_H 20 | 21 | #include 22 | #include "AKFS_Configure.h" 23 | 24 | /***** Constant definition ****************************************************/ 25 | #define AKFS_PI 3.141592654f 26 | #define RAD2DEG(rad) ((rad)*180.0f/AKFS_PI) 27 | 28 | /***** Macro definition *******************************************************/ 29 | 30 | #ifdef AKFS_PRECISION_DOUBLE 31 | #define AKFS_SIN(x) sin(x) 32 | #define AKFS_COS(x) cos(x) 33 | #define AKFS_ASIN(x) asin(x) 34 | #define AKFS_ACOS(x) acos(x) 35 | #define AKFS_ATAN2(y, x) atan2((y), (x)) 36 | #define AKFS_SQRT(x) sqrt(x) 37 | #else 38 | #define AKFS_SIN(x) sinf(x) 39 | #define AKFS_COS(x) cosf(x) 40 | #define AKFS_ASIN(x) asinf(x) 41 | #define AKFS_ACOS(x) acosf(x) 42 | #define AKFS_ATAN2(y, x) atan2f((y), (x)) 43 | #define AKFS_SQRT(x) sqrtf(x) 44 | #endif 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /sensors/algo/common/compass/AKFS_VNorm.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * 3 | * Copyright (C) 2012 Asahi Kasei Microdevices Corporation, Japan 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | ******************************************************************************/ 18 | #ifndef AKFS_INC_VNORM_H 19 | #define AKFS_INC_VNORM_H 20 | 21 | #include "AKFS_Device.h" 22 | 23 | /***** Prototype of function **************************************************/ 24 | AKLIB_C_API_START 25 | int16 AKFS_VbNorm( 26 | const int16 ndata, 27 | const AKFVEC vdata[], 28 | const int16 nbuf, 29 | const AKFVEC *o, 30 | const AKFVEC *s, 31 | const AKFLOAT tgt, 32 | const int16 nvec, 33 | AKFVEC vvec[] 34 | ); 35 | 36 | int16 AKFS_VbAve( 37 | const int16 nvec, 38 | const AKFVEC vvec[], 39 | const int16 nave, 40 | AKFVEC *vave 41 | ); 42 | 43 | AKLIB_C_API_END 44 | 45 | #endif 46 | 47 | -------------------------------------------------------------------------------- /sensors/algo/common/compass/README.md: -------------------------------------------------------------------------------- 1 | AK8975/AK8963/AK09911 Sensor Daemon for Android. 2 | ========= 3 | Compass Control Program for Android Open Source Project 4 | 5 | ## NOTICE 6 | 1. Asahi Kasei Microdevices Corporation ("AKM") is pleased to make available to you the source codes of the Electronic Compass Control Program ("Software") for download from this website at no charge. By downloading the Software, you expressly assume all risk and liability associated with downloading and using the Software. 7 | 8 | 2. AKM PROVIDES THE SOFTWARE AND THIS DOWNLOADING SERVICE "AS IS" WITHOUT WARRANTY OF ANY KIND AND ALL SUCH WARRANTIES, EXPRESS OR IMPLIED, ARE HEREBY DISCLAIMED, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ACCURACY, AVAILABILITY, OR NON-INFRINGEMENT. YOU ACKNOWLEDGE THAT AKM IS NOT OBLIGATED TO PROVIDE AND DOES NOT PROVIDE ANY SUPPORT OR ASSISTANCE WITH RESPECT TO THE SOFTWARE. 9 | 10 | 3. This downloading service shall not affect nor extend any warranty or disclaimer which AKM makes in each of AKM's products in which the Software works with. 11 | 12 | 4. This NOTICE shall be governed by and interpreted under the laws of Japan. All disputes arising out of or under this NOTICE shall be subject to under the exclusive and agreed jurisdiction of the Tokyo District Court as the court of first instance. 13 | 14 | ## About 15 | This software is developed by Asahi Kasei Microdevices Corporation ("AKM") to provide compatible daemon program, it is known as akmd2 in many production Android phones. 16 | 17 | This software consists from two parts, one is Sensor Control Program (i.e. akmd2) and Sensor HAL (sensors.*.so). Sensor Control Program gets magnetic sensor data form the AKM's compass IC, then estimate offset and calculate azimuth, pitch and roll angle. This behavior is quite similar to the original one. We aimed to develop a compatible daemon software. 18 | 19 | This software may help people who wants to study how to control AKM's magnetic sensor on Android. 20 | 21 | ## License 22 | The license for all code in this source code is specified in the NOTICE file. Please, refer to this file for further details. 23 | 24 | ## Build 25 | To build this project, uncomment your desired device from the top of Android.mk file. 26 | 27 | vi $(YOUR_ENV)/AK8975_FS/Android.mk 28 | 29 | For example, if you wish to have a software for AK8975, please uncomment the following line. 30 | 31 | export AKMD_DEVICE_TYPE=8975 32 | 33 | Type 'mm -B', then you will get two binary files, **akmdfs** and **sensors.default.so**. 34 | 35 | -------------------------------------------------------------------------------- /sensors/bst/Android.mk: -------------------------------------------------------------------------------- 1 | include $(all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /sensors/bst/daemon/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(TARGET_SIMULATOR),true) 2 | 3 | LOCAL_PATH := $(call my-dir) 4 | REAL_LOCAL_PATH:=$(LOCAL_PATH) 5 | include $(CLEAR_VARS) 6 | 7 | LOCAL_INCLUDES += $(LOCAL_PATH) 8 | 9 | LOCAL_SRC_FILES :=\ 10 | ../version/version.c\ 11 | src/main.c\ 12 | src/misc.c\ 13 | src/trace.c\ 14 | src/sensor_cfg.c\ 15 | src/event_handler.c\ 16 | src/lib/util_misc.c\ 17 | src/lib/util_time.c\ 18 | src/lib/util_sysfs.c\ 19 | src/lib/util_input_dev.c\ 20 | src/channel_cntl.c\ 21 | src/channel_a.c\ 22 | src/channel_g.c\ 23 | src/channel_m.c\ 24 | src/channel_o.c\ 25 | src/channel_vg.c\ 26 | src/channel_vla.c\ 27 | src/channel_vrv.c\ 28 | src/channel_grv.c\ 29 | src/channel_gu.c\ 30 | src/channel_mu.c\ 31 | src/channel_geom_rv.c\ 32 | src/channel_stc.c\ 33 | src/channel_std.c\ 34 | src/channel_sgm.c\ 35 | src/channels.c\ 36 | src/sensor_provider.c\ 37 | src/sensor_fusion.c\ 38 | src/hw/hw_cntl.c 39 | 40 | LOCAL_C_INCLUDES += $(LOCAL_PATH)\ 41 | $(LOCAL_PATH)/inc\ 42 | $(LOCAL_PATH)/../version\ 43 | $(LOCAL_PATH)/algo/inc\ 44 | $(LOCAL_PATH)/src/algo\ 45 | $(LOCAL_PATH)/src/hw\ 46 | 47 | ifeq (arm,$(TARGET_ARCH)) 48 | LOCAL_LDFLAGS += $(LOCAL_PATH)/algo/lib/bosch_lib32/libalgobsx.a 49 | else 50 | LOCAL_LDFLAGS += $(LOCAL_PATH)/algo/lib/bosch_lib64/libalgobsx.a 51 | endif 52 | 53 | LOCAL_LDLIBS := -llog 54 | LOCAL_SHARED_LIBRARIES += liblog libcutils libc libm 55 | #LOCAL_STATIC_LIBRARIES += libalgobsx 56 | 57 | include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \ 58 | src/algo\ 59 | src/hw/a\ 60 | src/hw/m\ 61 | src/hw/g\ 62 | )) 63 | 64 | -include $(LOCAL_PATH)/src/hw/Android.mk 65 | 66 | LOCAL_MODULE_TAGS := optional 67 | ifneq (,$(sensord_suffix)) 68 | LOCAL_MODULE = sensord.$(sensord_suffix) 69 | else 70 | LOCAL_MODULE = sensord 71 | endif 72 | 73 | include $(LOCAL_PATH)/../tools/l8150_config.mk 74 | 75 | include $(LOCAL_PATH)/../tools/options.mk 76 | include $(LOCAL_PATH)/../tools/buildversion.mk 77 | 78 | ifeq (true, $(flip_gesture_support)) 79 | LOCAL_SRC_FILES += src/channel_gest_flip.c 80 | LOCAL_CFLAGS += -D__FLIP_GESTURE__ 81 | endif 82 | 83 | LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES) 84 | include $(BUILD_EXECUTABLE) 85 | 86 | endif # TARGET_SIMULATOR != true 87 | -------------------------------------------------------------------------------- /sensors/bst/daemon/algo/inc/BsxLibraryErrorConstants.h: -------------------------------------------------------------------------------- 1 | #ifndef __BSXLIBRARYERRORCONSTANTS_H__ 2 | #define __BSXLIBRARYERRORCONSTANTS_H__ 3 | /*! 4 | * @section LICENCE 5 | * 6 | * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | * 20 | * 21 | * @file bsxlibraryerrorconstants.h 22 | * @date 2013/02/12 created 23 | * 24 | * @brief 25 | * This file provides error constants definition 26 | * 27 | * @detail 28 | * bsxlibraryerrorconstants - file provides errors constants definition used for parsing errors returned by library 29 | * 30 | */ 31 | 32 | /************************************************************************************************************/ 33 | /* INCLUDES */ 34 | /************************************************************************************************************/ 35 | 36 | #include "BsxLibraryDataTypes.h" 37 | 38 | /************************************************************************************************************/ 39 | /* CONSTANT DEFINITIONS */ 40 | /************************************************************************************************************/ 41 | 42 | /** \def Internal States Defintion */ 43 | 44 | #define BSX_STATE_ERROR (1) 45 | #define BSX_STATE_OK (0) 46 | #define BSX_STATE_PARAMETEROUTOFRANGE (-1) 47 | #define BSX_STATE_DIVIDEBYZERO (-2) 48 | #define BSX_STATE_NOTSUPPORTED (-3) 49 | 50 | #endif 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /sensors/bst/daemon/algo/inc/cust.h: -------------------------------------------------------------------------------- 1 | #ifndef __ALGO_CUST_H 2 | #define __ALGO_CUST_H 3 | 4 | /*! 5 | * @section LICENCE 6 | * 7 | * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | * 21 | 22 | * 23 | * @file cust.h 24 | * @date 2011/08/12 created 25 | * 26 | * @brief 27 | * This file provides the configuration paramters constants definition for algorithm 28 | * 29 | * @detail 30 | * 31 | * 32 | */ 33 | 34 | 35 | 36 | #define ALGO_CUST_A_ADV_FILT_COEF 20 37 | #define ALGO_CUST_A_ADV_FILT_NL 4 38 | 39 | #define ALGO_CUST_M_ADV_FILT_COEF 20 40 | #define ALGO_CUST_M_ADV_FILT_NL 5 41 | 42 | #define ALGO_CUST_COMPASS_HEADING_SENSITIVITY 4 43 | #define ALGO_CUST_NDOF_ORI_CORRECT_SPEED 1 44 | #define ALGO_CUST_MAG_FILT_MODE 1 45 | #define ALGO_CUST_MAG_CALIB_ACC_SENSITIVITY 0 46 | #define ALGO_CUST_MAG_CALIB_SPEED 5 47 | #define ALGO_CUST_COMPASS_MAG_CALIB_ACC_AUTO_REC_MODE 0 48 | #define ALGO_CUST_MAG_CALIB_PROCESS_NOISE_1 0.009f 49 | #define ALGO_CUST_MAG_CALIB_PROCESS_NOISE_2 0.009f 50 | #define ALGO_CUST_MAG_CALIB_PROCESS_NOISE_3 0.009f 51 | #define ALGO_CUST_MAG_CALIB_PROCESS_NOISE_4 0.081f 52 | #define ALGO_CUST_COMPASS_ACC_FILT_ACC_BASE_COEF 0.4f 53 | #define ALGO_CUST_COMPASS_ACC_FILT_ACC_DYN_COEF 0.1f 54 | 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /sensors/bst/daemon/algo/inc/feature.h: -------------------------------------------------------------------------------- 1 | #ifndef __ALGO_FEATURE_H 2 | #define __ALGO_FEATURE_H 3 | /*! 4 | * @section LICENCE 5 | * 6 | * (C) Copyright 2011~2014 Bosch Sensortec GmbH All Rights Reserved 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | * 20 | 21 | * 22 | * @file feature.h 23 | * @date 2011/08/12 created 24 | * 25 | * @brief 26 | * This file provides the algorithm specific festure definition 27 | * 28 | * @detail 29 | * 30 | * 31 | */ 32 | 33 | 34 | 35 | #define ALGO_SPT_NO_SCALE_MAG 36 | #define ALGO_SPT_ADV_PRE_FILTER 0 37 | 38 | #define ALGO_SPT_NO_AXIS_REMAP 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /sensors/bst/daemon/algo/lib/bosch_lib32/NOTICE: -------------------------------------------------------------------------------- 1 | # STOPSHIP Need notice / license text 2 | 3 | b/19712688 4 | -------------------------------------------------------------------------------- /sensors/bst/daemon/algo/lib/bosch_lib32/libalgobsx.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/sensors/bst/daemon/algo/lib/bosch_lib32/libalgobsx.a -------------------------------------------------------------------------------- /sensors/bst/daemon/algo/lib/bosch_lib64/libalgobsx.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/sensors/bst/daemon/algo/lib/bosch_lib64/libalgobsx.a -------------------------------------------------------------------------------- /sensors/bst/daemon/src/algo/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_SRC_FILES +=\ 2 | src/algo/algo_init.c\ 3 | src/algo/algo_adapter.c 4 | 5 | LOCAL_C_INCLUDES +=\ 6 | $(LOCAL_PATH)/src/algo 7 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/channel_geom_rv.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * @section LICENSE 3 | * 4 | * (C) Copyright 2011~2015 Bosch Sensortec GmbH All Rights Reserved 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | 19 | * 20 | * @file channel_geom_rv.c 21 | * @date "Tue Nov 25 17:33:16 2014 +0800" 22 | * @commit "4841ca7" 23 | * 24 | * @brief 25 | * 26 | * @detail 27 | * 28 | */ 29 | 30 | 31 | #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__ 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | #define LOG_TAG_MODULE "" 47 | #include "sensord.h" 48 | 49 | int get_data_geom_rv(void *pbuf, int n) 50 | { 51 | struct exchange *pmsg = (struct exchange *)pbuf; 52 | 53 | UNUSED_PARAM(n); 54 | algo_get_proc_data_geom_rv(&pmsg->data); 55 | 56 | return 1; 57 | } 58 | /*! 59 | * @brief This function is to initialize the Game Rotation Vector Sensor 60 | * 61 | * @param channel structure 62 | * 63 | * @return 0 success, -1 fail 64 | */ 65 | int channel_init_geom_rv(struct channel *ch) 66 | { 67 | int usecase_id; 68 | 69 | if (NULL == ch) 70 | { 71 | return -1; 72 | } 73 | 74 | usecase_id = algo_get_current_usecase(); 75 | 76 | if (usecase_id == -1) 77 | { 78 | PERR("unknown usecase id!"); 79 | return -1; 80 | } 81 | /*if magnetic field sensor isn't enalbe then grv won't be available*/ 82 | if (usecase_id == ALGO_FUSION_MODE_IMU) 83 | { 84 | ch->cfg.availability = UNAVAILABLE; 85 | } 86 | else 87 | { 88 | ch->cfg.no_delay = 0; 89 | ch->cfg.interval_min = CFG_DELAY_GEOM_RV_MIN; 90 | ch->cfg.interval_max = CFG_DELAY_GEOM_RV_MAX; 91 | ch->cfg.dep_hw = CFG_HW_DEP_GEOM; 92 | } 93 | return 0; 94 | } 95 | #endif 96 | 97 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/channel_grv.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * @section LICENSE 3 | * 4 | * (C) Copyright 2011~2015 Bosch Sensortec GmbH All Rights Reserved 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | 19 | * 20 | * @file channel_grv.c 21 | * @date "Mon Oct 27 16:36:05 2014 +0800" 22 | * @commit "566ce5a" 23 | * 24 | * @brief 25 | * 26 | * @detail 27 | * 28 | */ 29 | 30 | 31 | #ifdef __UNCALIBRATED_VIRTUAL_SENSOR_SUPPORT__ 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | #define LOG_TAG_MODULE "" 47 | #include "sensord.h" 48 | 49 | int get_data_grv(void *pbuf, int n) 50 | { 51 | struct exchange *pmsg = (struct exchange *)pbuf; 52 | 53 | UNUSED_PARAM(n); 54 | algo_get_proc_data_grv(&pmsg->data); 55 | 56 | return 1; 57 | } 58 | /*! 59 | * @brief This function is to initialize the Game Rotation Vector Sensor 60 | * 61 | * @param channel structure 62 | * 63 | * @return 0 success, -1 fail 64 | */ 65 | int channel_init_grv(struct channel *ch) 66 | { 67 | int usecase_id; 68 | 69 | if (NULL == ch) 70 | { 71 | return -1; 72 | } 73 | 74 | usecase_id = algo_get_current_usecase(); 75 | 76 | if (usecase_id == -1) 77 | { 78 | PERR("unknown usecase id!"); 79 | return -1; 80 | } 81 | /*if gyro sensor isn't enalbe then grv won't be available*/ 82 | if (usecase_id == ALGO_FUSION_MODE_COMPASS || usecase_id == ALGO_FUSION_MODE_M4G) 83 | { 84 | ch->cfg.availability = UNAVAILABLE; 85 | } 86 | else 87 | { 88 | ch->cfg.no_delay = 0; 89 | ch->cfg.interval_min = CFG_DELAY_GRV_MIN; 90 | ch->cfg.interval_max = CFG_DELAY_GRV_MAX; 91 | ch->cfg.dep_hw = CFG_HW_DEP_GRV; 92 | } 93 | return 0; 94 | } 95 | #endif 96 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/channel_gu.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * @section LICENSE 3 | * 4 | * (C) Copyright 2011~2015 Bosch Sensortec GmbH All Rights Reserved 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | 19 | * 20 | * @file channel_gu.c 21 | * @date "Mon Oct 27 16:36:05 2014 +0800" 22 | * @commit "566ce5a" 23 | * 24 | * @brief 25 | * 26 | * @detail 27 | * 28 | */ 29 | 30 | 31 | #ifdef __UNCALIBRATED_VIRTUAL_SENSOR_SUPPORT__ 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | #define LOG_TAG_MODULE "" 47 | #include "sensord.h" 48 | 49 | int get_data_gu(void *pbuf, int n) 50 | { 51 | struct exchange *pmsg = (struct exchange *)pbuf; 52 | 53 | UNUSED_PARAM(n); 54 | algo_get_proc_data_gu(&pmsg->data); 55 | 56 | return 1; 57 | } 58 | /*! 59 | * @brief This function is to initialize the Gyroscope Uncalibrated Sensor 60 | * 61 | * @param channel structure 62 | * 63 | * @return 0 success, -1 fail 64 | */ 65 | int channel_init_gu(struct channel *ch) 66 | { 67 | int usecase_id; 68 | 69 | if (NULL == ch) 70 | { 71 | return -1; 72 | } 73 | usecase_id = algo_get_current_usecase(); 74 | if (usecase_id == -1) 75 | { 76 | PERR("unknown usecase id!"); 77 | return -1; 78 | } 79 | /*if hw gyro sensors is not enabled, gu won't be available*/ 80 | if (usecase_id == ALGO_FUSION_MODE_COMPASS || usecase_id == ALGO_FUSION_MODE_M4G) 81 | { 82 | ch->cfg.availability = UNAVAILABLE; 83 | } 84 | else 85 | { 86 | ch->cfg.no_delay = 0; 87 | ch->cfg.interval_min = CFG_DELAY_GU_MIN; 88 | ch->cfg.interval_max = CFG_DELAY_GU_MAX; 89 | ch->cfg.dep_hw = CFG_HW_DEP_GU; 90 | } 91 | return 0; 92 | } 93 | #endif 94 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/channel_mu.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * @section LICENSE 3 | * 4 | * (C) Copyright 2011~2015 Bosch Sensortec GmbH All Rights Reserved 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | 19 | * 20 | * @file channel_mu.c 21 | * @date "Mon Oct 27 16:36:05 2014 +0800" 22 | * @commit "566ce5a" 23 | * 24 | * @brief 25 | * 26 | * @detail 27 | * 28 | */ 29 | 30 | 31 | #ifdef __UNCALIBRATED_VIRTUAL_SENSOR_SUPPORT__ 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | #define LOG_TAG_MODULE "" 47 | #include "sensord.h" 48 | 49 | int get_data_mu(void *pbuf, int n) 50 | { 51 | struct exchange *pmsg = (struct exchange *)pbuf; 52 | 53 | UNUSED_PARAM(n); 54 | algo_get_proc_data_mu(&pmsg->data); 55 | 56 | return 1; 57 | } 58 | 59 | /*! 60 | * @brief This function is to initialize the Magnetic Field Uncalibrated Sensor 61 | * 62 | * @param channel structure 63 | * 64 | * @return 0 success, -1 fail 65 | */ 66 | int channel_init_mu(struct channel *ch) 67 | { 68 | int usecase_id; 69 | 70 | if (NULL == ch) 71 | { 72 | return -1; 73 | } 74 | 75 | usecase_id = algo_get_current_usecase(); 76 | 77 | if (usecase_id == -1) 78 | { 79 | PERR("unknown usecase id!"); 80 | return -1; 81 | } 82 | /*if mag sensor is not enabled, mu won't be available*/ 83 | if (usecase_id == ALGO_FUSION_MODE_IMU) 84 | { 85 | ch->cfg.availability = UNAVAILABLE; 86 | } 87 | else 88 | { 89 | ch->cfg.no_delay = 0; 90 | ch->cfg.interval_min = CFG_DELAY_MU_MIN; 91 | ch->cfg.interval_max = CFG_DELAY_MU_MAX; 92 | ch->cfg.dep_hw = CFG_HW_DEP_MU; 93 | } 94 | return 0; 95 | } 96 | #endif 97 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/channel_sgm.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * @section LICENSE 3 | * 4 | * (C) Copyright 2011~2015 Bosch Sensortec GmbH All Rights Reserved 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | 19 | * 20 | * @file channel_sgm.c 21 | * @date "Thu Jul 10 13:02:33 2014 +0800" 22 | * @commit "3a5abf7" 23 | * 24 | * @brief 25 | * This file implements a virtual signicant sensor, initialize and get data 26 | * 27 | */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #define LOG_TAG_MODULE "" 44 | #include "sensord.h" 45 | 46 | int channel_sgm_get_data(void *pbuf, int n) 47 | { 48 | struct exchange *pmsg = (struct exchange *)pbuf; 49 | 50 | UNUSED_PARAM(n); 51 | 52 | return algo_get_proc_data_sgm(&pmsg->data);; 53 | } 54 | 55 | 56 | int channel_sgm_init(struct channel *ch) 57 | { 58 | ch->cfg.interval_min = CFG_DELAY_A_MIN; 59 | ch->cfg.interval_max = CFG_DELAY_A_MAX; 60 | ch->cfg.dep_hw = CFG_HW_DEP_A; 61 | 62 | return 0; 63 | } 64 | 65 | int channel_sgm_enable(struct channel *ch, int en) 66 | { 67 | if (NULL == ch) 68 | { 69 | return -1; 70 | } 71 | 72 | (void)algo_set_opmode(SENSOR_TYPE_SW_SIGNIFICANT_MOTION,en); 73 | 74 | return 0; 75 | } 76 | 77 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/channel_stc.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * @section LICENSE 3 | * 4 | * (C) Copyright 2011~2015 Bosch Sensortec GmbH All Rights Reserved 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | 19 | * 20 | * @file channel_stc.c 21 | * @date "Tue Nov 25 17:33:16 2014 +0800" 22 | * @commit "4841ca7" 23 | * 24 | * @brief 25 | * 26 | * @detail 27 | * 28 | */ 29 | 30 | 31 | #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_0__ 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | #define LOG_TAG_MODULE "" 47 | #include "sensord.h" 48 | 49 | int get_data_stc(void *pbuf, int n) 50 | { 51 | struct exchange *pmsg = (struct exchange *)pbuf; 52 | 53 | UNUSED_PARAM(n); 54 | return algo_get_proc_data_stc(&pmsg->data); 55 | } 56 | /*! 57 | * @brief This function is to initialize the Step Counter 58 | * 59 | * @param channel structure 60 | * 61 | * @return 0 success, -1 fail 62 | */ 63 | int channel_init_stc(struct channel *ch) 64 | { 65 | if (NULL == ch) 66 | { 67 | return -1; 68 | } 69 | 70 | ch->cfg.no_delay = 0; 71 | ch->cfg.interval_min = CFG_DELAY_STC_MIN; 72 | ch->cfg.interval_max = CFG_DELAY_STC_MAX; 73 | ch->cfg.dep_hw = CFG_HW_DEP_STC; 74 | 75 | return 0; 76 | } 77 | 78 | int channel_stc_enable(struct channel *ch, int en) 79 | { 80 | if (NULL == ch) 81 | { 82 | return -1; 83 | } 84 | 85 | (void)algo_set_opmode(SENSOR_TYPE_STC, en); 86 | 87 | return 0; 88 | } 89 | 90 | 91 | #endif 92 | 93 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/channel_std.c: -------------------------------------------------------------------------------- 1 | /*! 2 | * @section LICENSE 3 | * 4 | * (C) Copyright 2011~2015 Bosch Sensortec GmbH All Rights Reserved 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | 19 | * 20 | * @file channel_std.c 21 | * @date "Tue Nov 25 17:33:16 2014 +0800" 22 | * @commit "4841ca7" 23 | * 24 | * @brief 25 | * 26 | * @detail 27 | * 28 | */ 29 | 30 | 31 | #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_0__ 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | 46 | #define LOG_TAG_MODULE "" 47 | #include "sensord.h" 48 | 49 | int get_data_std(void *pbuf, int n) 50 | { 51 | struct exchange *pmsg = (struct exchange *)pbuf; 52 | 53 | UNUSED_PARAM(n); 54 | 55 | return algo_get_proc_data_std(&pmsg->data); 56 | } 57 | /*! 58 | * @brief This function is to initialize the Step Counter 59 | * 60 | * @param channel structure 61 | * 62 | * @return 0 success, -1 fail 63 | */ 64 | int channel_init_std(struct channel *ch) 65 | { 66 | 67 | if (NULL == ch) 68 | { 69 | return -1; 70 | } 71 | 72 | ch->cfg.no_delay = 0; 73 | ch->cfg.interval_min = CFG_DELAY_STD_MIN; 74 | ch->cfg.interval_max = CFG_DELAY_STD_MAX; 75 | ch->cfg.dep_hw = CFG_HW_DEP_STD; 76 | 77 | return 0; 78 | } 79 | 80 | int channel_std_enable(struct channel *ch, int en) 81 | { 82 | if (NULL == ch) 83 | { 84 | return -1; 85 | } 86 | 87 | (void)algo_set_opmode(SENSOR_TYPE_STD, en); 88 | 89 | return 0; 90 | } 91 | 92 | 93 | #endif 94 | 95 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/hw/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_CFLAGS += -D HW_ID_A=HW_ID_A_BMC056 2 | LOCAL_CFLAGS += -D HW_ID_M=HW_ID_M_BMC056 3 | LOCAL_CFLAGS += -D HW_ID_G=HW_ID_G_BMG160 4 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/hw/a/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_SRC_FILES +=\ 2 | src/hw/a/hw_cntl_a.c\ 3 | src/hw/a/axis_remap_a.c 4 | 5 | 6 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/hw/a/\ 7 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/hw/g/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_SRC_FILES +=\ 2 | src/hw/g/hw_cntl_g.c\ 3 | src/hw/g/axis_remap_g.c 4 | 5 | 6 | LOCAL_C_INCLUDES +=\ 7 | $(LOCAL_PATH)/src/hw/g\ 8 | -------------------------------------------------------------------------------- /sensors/bst/daemon/src/hw/m/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_SRC_FILES +=\ 2 | src/hw/m/hw_cntl_m.c\ 3 | src/hw/m/axis_remap_m.c 4 | 5 | 6 | LOCAL_C_INCLUDES +=\ 7 | $(LOCAL_PATH)/src/hw/m\ 8 | -------------------------------------------------------------------------------- /sensors/bst/hal/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2008 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | 16 | LOCAL_PATH := $(call my-dir) 17 | 18 | REAL_LOCAL_PATH := $(LOCAL_PATH) 19 | 20 | ifneq ($(TARGET_SIMULATOR),true) 21 | 22 | # HAL module implemenation, not prelinked, and stored in 23 | # hw/..so 24 | include $(CLEAR_VARS) 25 | 26 | ifeq ($(origin TARGET_BOARD_PLATFORM), undefined) 27 | LOCAL_MODULE := sensors.default 28 | else 29 | LOCAL_MODULE := sensors.$(TARGET_BOARD_PLATFORM) 30 | endif 31 | 32 | ifdef TARGET_2ND_ARCH 33 | LOCAL_MODULE_RELATIVE_PATH := hw 34 | else 35 | LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw 36 | endif 37 | 38 | LOCAL_MODULE_TAGS := optional 39 | 40 | LOCAL_CFLAGS :=\ 41 | -D LOG_TAG=\"bsthal\"\ 42 | -Wall 43 | 44 | LOCAL_SRC_FILES :=\ 45 | ../version/version.c\ 46 | BstSensor.cpp\ 47 | sensors.cpp\ 48 | InputEventReader.cpp\ 49 | SensorBase.cpp\ 50 | LightSensor.cpp\ 51 | ProximitySensor.cpp\ 52 | BstSensorInfo.cpp 53 | 54 | LOCAL_C_INCLUDES = $(LOCAL_PATH)/../version 55 | 56 | #LOCAL_SHARED_LIBRARIES := liblog libcutils 57 | LOCAL_SHARED_LIBRARIES := libcutils 58 | LOCAL_PRELINK_MODULE := false 59 | 60 | include $(LOCAL_PATH)/../tools/l8150_config.mk 61 | 62 | include $(LOCAL_PATH)/../tools/options.mk 63 | include $(LOCAL_PATH)/../tools/buildversion.mk 64 | 65 | ifeq (true, $(bmp_support)) 66 | LOCAL_SRC_FILES += BstSensorPressure.cpp 67 | endif 68 | 69 | ifeq (true, $(bst_extend_sensor_support)) 70 | LOCAL_SRC_FILES += BstSensorExt.cpp 71 | endif 72 | 73 | ifeq (true, $(hybrid_hal)) 74 | LOCAL_SRC_FILES += BstSensorAccel.cpp 75 | endif 76 | 77 | include $(BUILD_SHARED_LIBRARY) 78 | 79 | endif # !TARGET_SIMULATOR 80 | -------------------------------------------------------------------------------- /sensors/bst/hal/BstSensorType.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef __BST_SENSOR_TYPE_H 18 | #define __BST_SENSOR_TYPE_H 19 | 20 | /* Google defined sensor, used in Android 4.3: 20 21 | BST extend sensor through fusion, start at 24 22 | BST extend sensor based on BMA interrupt 23 | But Significant motion sensor is Google standard sensor 24 | */ 25 | enum 26 | { 27 | BST_SENSOR_TYPE_NONSTD_START = 24-1, 28 | BST_SENSOR_TYPE_GEST_FLIP, 29 | BSTEXT_SENSOR_TYPE_SW_SGM, 30 | #ifdef __DOUBLE_TAP_SENSOR_SUPPORT__ 31 | BSTEXT_SENSOR_TYPE_DOUBLE_TAP, 32 | #endif 33 | BST_SENSOR_TYPE_NONSTD_END 34 | }; 35 | 36 | #endif // __BST_SENSOR_TYPE_H -------------------------------------------------------------------------------- /sensors/bst/hal/InputEventReader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | 28 | #include "InputEventReader.h" 29 | 30 | #include "TargetPlatform.h" 31 | 32 | /*****************************************************************************/ 33 | 34 | struct input_event; 35 | 36 | InputEventCircularReader::InputEventCircularReader(size_t numEvents) 37 | : mBuffer(new input_event[numEvents * 2]), 38 | mBufferEnd(mBuffer + numEvents), 39 | mHead(mBuffer), 40 | mCurr(mBuffer), 41 | mFreeSpace(numEvents) 42 | { 43 | } 44 | 45 | InputEventCircularReader::~InputEventCircularReader() 46 | { 47 | delete [] mBuffer; 48 | } 49 | 50 | ssize_t InputEventCircularReader::fill(int fd) 51 | { 52 | size_t numEventsRead = 0; 53 | if (mFreeSpace) { 54 | const ssize_t nread = read(fd, mHead, mFreeSpace * sizeof(input_event)); 55 | if (nread<0 || nread % sizeof(input_event)) { 56 | // we got a partial event!! 57 | return nread<0 ? -errno : -EINVAL; 58 | } 59 | 60 | numEventsRead = nread / sizeof(input_event); 61 | if (numEventsRead) { 62 | mHead += numEventsRead; 63 | mFreeSpace -= numEventsRead; 64 | if (mHead > mBufferEnd) { 65 | size_t s = mHead - mBufferEnd; 66 | memcpy(mBuffer, mBufferEnd, s * sizeof(input_event)); 67 | mHead = mBuffer + s; 68 | } 69 | } 70 | } 71 | 72 | return numEventsRead; 73 | } 74 | 75 | ssize_t InputEventCircularReader::readEvent(input_event const** events) const 76 | { 77 | *events = mCurr; 78 | ssize_t available = (mBufferEnd - mBuffer) - mFreeSpace; 79 | return available ? 1 : 0; 80 | } 81 | 82 | void InputEventCircularReader::next() 83 | { 84 | mCurr++; 85 | mFreeSpace++; 86 | if (mCurr >= mBufferEnd) { 87 | mCurr = mBuffer; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /sensors/bst/hal/InputEventReader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_INPUT_EVENT_READER_H 18 | #define ANDROID_INPUT_EVENT_READER_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | /*****************************************************************************/ 26 | 27 | struct input_event; 28 | 29 | class InputEventCircularReader 30 | { 31 | struct input_event* const mBuffer; 32 | struct input_event* const mBufferEnd; 33 | struct input_event* mHead; 34 | struct input_event* mCurr; 35 | ssize_t mFreeSpace; 36 | 37 | public: 38 | InputEventCircularReader(size_t numEvents); 39 | ~InputEventCircularReader(); 40 | ssize_t fill(int fd); 41 | ssize_t readEvent(input_event const** events) const; 42 | void next(); 43 | }; 44 | 45 | /*****************************************************************************/ 46 | 47 | #endif // ANDROID_INPUT_EVENT_READER_H 48 | -------------------------------------------------------------------------------- /sensors/bst/hal/LightSensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_LIGHT_SENSOR_H 18 | #define ANDROID_LIGHT_SENSOR_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "SensorBase.h" 26 | #include "InputEventReader.h" 27 | 28 | /*****************************************************************************/ 29 | 30 | struct input_event; 31 | 32 | class LightSensor : public SensorBase { 33 | int mEnabled; 34 | InputEventCircularReader mInputReader; 35 | sensors_event_t mPendingEvent; 36 | #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__ 37 | uint32_t mPendingFlushFinishEvent; 38 | #endif 39 | bool mHasPendingEvent; 40 | char input_sysfs_path[PATH_MAX]; 41 | int input_sysfs_path_len; 42 | int sensor_index; 43 | 44 | int setInitialState(); 45 | 46 | public: 47 | LightSensor(); 48 | LightSensor(char *name); 49 | virtual ~LightSensor(); 50 | virtual int readEvents(sensors_event_t* data, int count); 51 | virtual bool hasPendingEvents() const; 52 | virtual int setDelay(int32_t handle, int64_t ns); 53 | virtual int enable(int32_t handle, int enabled); 54 | virtual float convertEvent(int value); 55 | 56 | #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__ 57 | virtual int batch(int handle, int flags, int64_t period_ns, int64_t timeout); 58 | virtual int flush(int handle); 59 | #endif 60 | }; 61 | 62 | /*****************************************************************************/ 63 | 64 | #endif // ANDROID_LIGHT_SENSOR_H 65 | -------------------------------------------------------------------------------- /sensors/bst/hal/ProximitySensor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_PROXIMITY_SENSOR_H 18 | #define ANDROID_PROXIMITY_SENSOR_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "sensors.h" 26 | #include "SensorBase.h" 27 | #include "InputEventReader.h" 28 | 29 | /*****************************************************************************/ 30 | 31 | struct input_event; 32 | 33 | class ProximitySensor : public SensorBase { 34 | int mEnabled; 35 | InputEventCircularReader mInputReader; 36 | sensors_event_t mPendingEvent; 37 | bool mHasPendingEvent; 38 | #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__ 39 | uint32_t mPendingFlushFinishEvent; 40 | #endif 41 | char input_sysfs_path[PATH_MAX]; 42 | int input_sysfs_path_len; 43 | int sensor_index; 44 | 45 | int setInitialState(); 46 | float indexToValue(size_t index) const; 47 | 48 | public: 49 | ProximitySensor(); 50 | ProximitySensor(char *name); 51 | virtual ~ProximitySensor(); 52 | virtual int readEvents(sensors_event_t* data, int count); 53 | virtual bool hasPendingEvents() const; 54 | virtual int enable(int32_t handle, int enabled); 55 | 56 | #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__ 57 | virtual int batch(int handle, int flags, int64_t period_ns, int64_t timeout); 58 | virtual int flush(int handle); 59 | #endif 60 | }; 61 | 62 | /*****************************************************************************/ 63 | 64 | #endif // ANDROID_PROXIMITY_SENSOR_H 65 | -------------------------------------------------------------------------------- /sensors/bst/hal/SensorBase.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_SENSOR_BASE_H 18 | #define ANDROID_SENSOR_BASE_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | 26 | /*****************************************************************************/ 27 | 28 | struct sensors_event_t; 29 | 30 | class SensorBase { 31 | protected: 32 | const char* dev_name; 33 | const char* data_name; 34 | char input_name[PATH_MAX]; 35 | int dev_fd; 36 | int data_fd; 37 | 38 | int openInput(const char* inputName); 39 | static int64_t getTimestamp(); 40 | 41 | 42 | static int64_t timevalToNano(timeval const& t) { 43 | return t.tv_sec*1000000000LL + t.tv_usec*1000; 44 | } 45 | 46 | int open_device(); 47 | int close_device(); 48 | 49 | public: 50 | SensorBase( 51 | const char* dev_name, 52 | const char* data_name); 53 | 54 | virtual ~SensorBase(); 55 | 56 | virtual int readEvents(sensors_event_t* data, int count) = 0; 57 | virtual bool hasPendingEvents() const; 58 | virtual int getFd() const; 59 | virtual int setDelay(int32_t handle, int64_t ns); 60 | virtual int enable(int32_t handle, int enabled) = 0; 61 | #if __HAL_VER__ >= __SENSORS_DEVICE_API_VERSION_1_1__ 62 | virtual int batch(int handle, int flags, int64_t period_ns, int64_t timeout) = 0; 63 | virtual int flush(int handle) = 0; 64 | #endif 65 | }; 66 | 67 | /*****************************************************************************/ 68 | 69 | #endif // ANDROID_SENSOR_BASE_H 70 | -------------------------------------------------------------------------------- /sensors/bst/hal/TargetPlatform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef __TARGET_PLATFORM_H 18 | #define __TARGET_PLATFORM_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | #include 31 | #include 32 | 33 | #include 34 | 35 | __BEGIN_DECLS 36 | 37 | __END_DECLS 38 | 39 | #endif // __TARGET_PLATFORM_H 40 | -------------------------------------------------------------------------------- /sensors/bst/tools/buildversion.mk: -------------------------------------------------------------------------------- 1 | BUILD_DATE=$(shell date +'%Y-%m-%d %H:%M:%S') 2 | BUILD_NUM=$(shell cat $(BUILD_NUMBER_FILE)) 3 | VERSION_PATH=$(REAL_LOCAL_PATH)/../version 4 | 5 | $(LOCAL_PATH)/../version/version.c:$(LOCAL_PATH)/../version/version.h 6 | 7 | $(LOCAL_PATH)/../version/version.h: 8 | @echo ============================== 9 | @echo " daemon version : $(DAEMON_VERSION)" 10 | @echo " hal version : $(HAL_VERSION)" 11 | @echo " build date : $(BUILD_DATE)" 12 | @echo " use case : $(usecase)" 13 | @echo ============================== 14 | @mkdir $(VERSION_PATH) -p 15 | @echo "/*" > $(VERSION_PATH)/version.c 16 | @echo " * This file is automatic generated," >> $(VERSION_PATH)/version.c 17 | @echo " * please do not make modification" >> $(VERSION_PATH)/version.c 18 | @echo " */" >> $(VERSION_PATH)/version.c 19 | @echo "" >> $(VERSION_PATH)/version.c 20 | @echo "static const char daemon_version_str[] = \"$(DAEMON_VERSION)\";" >> $(VERSION_PATH)/version.c 21 | @echo "static const char hal_version_str[] = \"$(HAL_VERSION)\";" >> $(VERSION_PATH)/version.c 22 | @echo "static const char date_str[] = \"$(BUILD_DATE)\";" >> $(VERSION_PATH)/version.c 23 | @echo "const char* get_daemon_version(void)" >> $(VERSION_PATH)/version.c 24 | @echo "{" >> $(VERSION_PATH)/version.c 25 | @echo " return daemon_version_str;" >> $(VERSION_PATH)/version.c 26 | @echo "}" >> $(VERSION_PATH)/version.c 27 | @echo "const char* get_hal_version(void)" >> $(VERSION_PATH)/version.c 28 | @echo "{" >> $(VERSION_PATH)/version.c 29 | @echo " return hal_version_str;" >> $(VERSION_PATH)/version.c 30 | @echo "}" >> $(VERSION_PATH)/version.c 31 | @echo "const char* get_build_date(void)" >> $(VERSION_PATH)/version.c 32 | @echo "{" >> $(VERSION_PATH)/version.c 33 | @echo " return date_str;" >> $(VERSION_PATH)/version.c 34 | @echo "}" >> $(VERSION_PATH)/version.c 35 | @echo "" >> $(VERSION_PATH)/version.c 36 | @echo "/*" > $(VERSION_PATH)/version.h 37 | @echo " * This file is automatic generated," >> $(VERSION_PATH)/version.h 38 | @echo " * please do not make modification" >> $(VERSION_PATH)/version.h 39 | @echo " */" >> $(VERSION_PATH)/version.h 40 | @echo "" >> $(VERSION_PATH)/version.h 41 | @echo "#ifdef __cplusplus" >> $(VERSION_PATH)/version.h 42 | @echo "extern \"C\" {" >> $(VERSION_PATH)/version.h 43 | @echo "#endif" >> $(VERSION_PATH)/version.h 44 | @echo "const char* get_daemon_version(void);" >> $(VERSION_PATH)/version.h 45 | @echo "const char* get_hal_version(void);" >> $(VERSION_PATH)/version.h 46 | @echo "const char* get_build_date(void);" >> $(VERSION_PATH)/version.h 47 | @echo "#ifdef __cplusplus" >> $(VERSION_PATH)/version.h 48 | @echo "};" >> $(VERSION_PATH)/version.h 49 | @echo "#endif" >> $(VERSION_PATH)/version.h 50 | 51 | -------------------------------------------------------------------------------- /sensors/bst/tools/cm_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ANDROID_ROOT=/share/cm/cm9 4 | ANDROID_VENDOR_BOSCH=$ANDROID_ROOT/vendor/bosch 5 | BIN_OUTPUT=bin_cm 6 | PRODUCT=n7000 7 | 8 | rm $ANDROID_ROOT/out/target/product/$PRODUCT/system/bin/sensord* 9 | rm $ANDROID_ROOT/out/target/product/$PRODUCT/symbols/system/lib/hw/sensors*\ 10 | 11 | rm $ANDROID_VENDOR_BOSCH -rf 12 | rm $BIN_OUTPUT -rf 13 | mkdir -p $BIN_OUTPUT 14 | 15 | mkdir $ANDROID_VENDOR_BOSCH 16 | cp daemon -fr $ANDROID_VENDOR_BOSCH/ 17 | cp hal -fr $ANDROID_VENDOR_BOSCH/ 18 | cp tools -rf $ANDROID_VENDOR_BOSCH/ 19 | cp Android.mk -fr $ANDROID_VENDOR_BOSCH/ 20 | 21 | pushd $ANDROID_ROOT 22 | . build/envsetup.sh 23 | breakfast $PRODUCT 24 | popd 25 | 26 | pushd $ANDROID_VENDOR_BOSCH 27 | 28 | mm -B bmc=bmc056 bmg=bmg160 29 | ret=$? 30 | if [ $ret != 0 ]; then 31 | exit $ret 32 | fi 33 | 34 | mm -B bmc=bmc056 bmg=bmg160 debug_trace_level=information sensord_suffix=debug 35 | ret=$? 36 | if [ $ret != 0 ]; then 37 | exit $ret 38 | fi 39 | 40 | mm -B bmc=bmc056 bmg=bmg160 debug_data_log=true sensord_suffix=ld 41 | ret=$? 42 | if [ $ret != 0 ]; then 43 | exit $ret 44 | fi 45 | 46 | mm -B bmc=bmc056 bmg=bmg160 debug_data_log=true scheduling_timestamp_calibrated=true sensor_timestamp_scheduling=true sensord_suffix=ts_cali.ld 47 | ret=$? 48 | if [ $ret != 0 ]; then 49 | exit $ret 50 | fi 51 | 52 | mm -B bmc=bmc056 bmg=bmg160 debug_data_log=true sensor_timestamp_scheduling=true sensord_suffix=ts_sched.ld 53 | ret=$? 54 | if [ $ret != 0 ]; then 55 | exit $ret 56 | fi 57 | 58 | popd 59 | 60 | cp $ANDROID_ROOT/out/target/product/$PRODUCT/system/bin/sensord* \ 61 | $BIN_OUTPUT/ 62 | 63 | cp $ANDROID_ROOT/out/target/product/$PRODUCT/symbols/system/lib/hw/sensors.exynos4.so\ 64 | $BIN_OUTPUT/sensors.default.so 65 | 66 | cp ./tools/install.bat $BIN_OUTPUT/ 67 | cp ./tools/get_sensord_log.bat $BIN_OUTPUT/ 68 | cp ./tools/get_sensord_data.bat $BIN_OUTPUT/ 69 | cp ./tools/get_hal_version.bat $BIN_OUTPUT/ 70 | cp ./tools/get_sensord_version.bat $BIN_OUTPUT/ 71 | cp ./daemon/spec $BIN_OUTPUT/ -rf 72 | 73 | echo ================================================= 74 | echo static analysis 75 | ./tools/cppcheck_daemon.sh $ANDROID_VENDOR_BOSCH/daemon 76 | if [ $? != 0 ] ; then 77 | exit $? 78 | fi 79 | 80 | ./tools/cppcheck_hal.sh $ANDROID_VENDOR_BOSCH/hal 81 | if [ $? != 0 ] ; then 82 | exit $? 83 | fi 84 | 85 | echo build success! 86 | -------------------------------------------------------------------------------- /sensors/bst/tools/cppcheck_daemon.sh: -------------------------------------------------------------------------------- 1 | if [ "$1" == "" ] ; then 2 | echo "usage: $0 daemon_path" 3 | exit 1 4 | fi 5 | 6 | DIR_SCRIPT=$PWD/$(dirname $0) 7 | 8 | cd $1 9 | 10 | cppcheck -v --error-exitcode=255 --enable=all --inconclusive --std=posix --suppress=variableScope --quiet \ 11 | --suppressions-list="$DIR_SCRIPT/cppcheck_suppress_daemon.lst"\ 12 | -I .\ 13 | -I ../version\ 14 | -I ./algo/inc\ 15 | -I ./inc\ 16 | -I ./src/algo\ 17 | -I ./src/hw\ 18 | -I ./src/hw/a\ 19 | -I ./src/hw/m\ 20 | -I ./src/hw/g\ 21 | -i ./src/hw/g-mpu3050\ 22 | -i ./src/hw/g-itg3200\ 23 | -D USHRT_MAX=0XFFFF\ 24 | -D INT_MAX=0X7FFFFFFF\ 25 | --template='{file}:{line},{severity},[{id}],{message}'\ 26 | . 27 | 28 | ret=$? 29 | if [ $ret != 0 ]; then 30 | echo "cppcheck detected errors: $ret" 31 | exit $ret 32 | fi 33 | 34 | echo "$1 passed static analysis by cppcheck!" 35 | -------------------------------------------------------------------------------- /sensors/bst/tools/cppcheck_hal.sh: -------------------------------------------------------------------------------- 1 | if [ "$1" == "" ] ; then 2 | echo "usage: $0 hal_path" 3 | exit 1 4 | fi 5 | 6 | cd $1 7 | 8 | cppcheck -v --error-exitcode=255 --enable=all --inconclusive --std=posix --suppress=variableScope --quiet \ 9 | -i sensors.cpp\ 10 | -i SensorBase.cpp\ 11 | -i LightSensor.cpp\ 12 | -i ProximitySensor.cpp\ 13 | -i InputEventReader.cpp\ 14 | -i PressureSensor.cpp\ 15 | --template='{file}:{line},{severity},[{id}],{message}'\ 16 | -D BST_SENSOR_PLACE_A=0\ 17 | . 18 | 19 | ret=$? 20 | if [ $ret != 0 ]; then 21 | echo "cppcheck detected errors: $ret" 22 | exit $ret 23 | fi 24 | 25 | echo "$1 passed static analysis by cppcheck!" 26 | -------------------------------------------------------------------------------- /sensors/bst/tools/cppcheck_suppress_daemon.lst: -------------------------------------------------------------------------------- 1 | unusedFunction:src/algo/algo_init.c 2 | unusedFunction:src/algo-fam-2/algo_init.c 3 | -------------------------------------------------------------------------------- /sensors/bst/tools/get_hal_version.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | echo geting HAL version... 3 | adb remount 4 | adb logcat -s bsthal:I 5 | -------------------------------------------------------------------------------- /sensors/bst/tools/get_sensord_data.bat: -------------------------------------------------------------------------------- 1 | echo retreiving sensor data log... 2 | adb remount 3 | adb shell mkdir data/misc/sensor/tmp 4 | adb shell mv data/misc/sensor/sensor_data_*.log data/misc/sensor/tmp/ 5 | adb shell "cd data/misc/sensor/tmp;for file in *; do mv \"$file\" `echo $file | sed -e 's/ */_/g' -e 's/:/-/g'`; done" 6 | adb pull data/misc/sensor/tmp . 7 | adb shell mv data/misc/sensor/tmp/* data/misc/sensor/ 8 | adb shell rmdir data/misc/sensor/tmp 9 | pause 10 | -------------------------------------------------------------------------------- /sensors/bst/tools/get_sensord_log.bat: -------------------------------------------------------------------------------- 1 | echo "retreiving sensord.log..." 2 | adb pull data/misc/sensor/sensord.log 3 | pause 4 | -------------------------------------------------------------------------------- /sensors/bst/tools/get_sensord_version.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | echo geting sensord version... 3 | adb remount 4 | adb shell head -n 10 data/misc/sensor/sensord.log 5 | pause 6 | -------------------------------------------------------------------------------- /sensors/bst/tools/install.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | set acc_name=bma255 3 | set gyro_name=bmg160 4 | set mag_name=bmm050 5 | set usecase=ndof 6 | set REAL_LOCAL_PATH=. 7 | set axis_config=samsung_note 8 | 9 | rem specify the suffix name of sensord, 10 | rem ex. if want to use "sensord.ld" 11 | rem set suffix as ld will install the sensord.ld instead of "sensord" 12 | set sensord_suffix= 13 | 14 | 15 | 16 | echo ===================================================== 17 | echo installing for %acc_name% %mag_name% %gyro_name%... 18 | adb remount 19 | adb shell rm /system/etc/sensor/* 20 | adb shell rm /data/misc/sensor/* 21 | adb shell rm /system/lib/hw/sensors.* 22 | echo ================================== 23 | echo installing spec... 24 | adb push %REAL_LOCAL_PATH%/spec/accel_spec_%acc_name%.txt /system/etc/sensor/accel_spec.txt 25 | adb push %REAL_LOCAL_PATH%/spec/mag_spec_%mag_name%.txt /system/etc/sensor/mag_spec.txt 26 | adb push %REAL_LOCAL_PATH%/spec/gyro_spec_%gyro_name%.txt /system/etc/sensor/gyro_spec.txt 27 | adb push %REAL_LOCAL_PATH%/spec/usecase_%usecase%.txt /system/etc/sensor/ 28 | adb push %REAL_LOCAL_PATH%/spec/softiron_matrix.txt /system/etc/sensor/ 29 | adb push %REAL_LOCAL_PATH%/spec/axis_cfg_%axis_config%.txt /system/etc/sensor/sensord_cfg_axis 30 | echo ================================== 31 | echo installing sensord and sensors.so 32 | if exist "libsensors.default.so" ( 33 | move /Y libsensors.default.so sensors.default.so 34 | ) 35 | if defined sensord_suffix ( 36 | echo installing sensord.%sensord_suffix% 37 | adb push %REAL_LOCAL_PATH%/sensord.%sensord_suffix% /system/bin/sensord 38 | ) else ( 39 | adb push %REAL_LOCAL_PATH%/sensord /system/bin/sensord 40 | ) 41 | adb shell chmod 0777 system/bin/sensord 42 | adb push %REAL_LOCAL_PATH%/sensors.default.so system/lib/hw/ 43 | adb push %REAL_LOCAL_PATH%/sensors.default.so system/lib/hw/sensors.exynos4.so 44 | echo ================================== 45 | echo rebooting system 46 | adb reboot 47 | pause 48 | -------------------------------------------------------------------------------- /sensors/bst/version/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is automatic generated, 3 | * please do not make modification 4 | */ 5 | 6 | static const char daemon_version_str[] = "3.0.37"; 7 | static const char hal_version_str[] = "3.0.15"; 8 | static const char date_str[] = "2016-02-13 02:03:07"; 9 | const char* get_daemon_version(void) 10 | { 11 | return daemon_version_str; 12 | } 13 | const char* get_hal_version(void) 14 | { 15 | return hal_version_str; 16 | } 17 | const char* get_build_date(void) 18 | { 19 | return date_str; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /sensors/bst/version/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is automatic generated, 3 | * please do not make modification 4 | */ 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | const char* get_daemon_version(void); 10 | const char* get_hal_version(void); 11 | const char* get_build_date(void); 12 | #ifdef __cplusplus 13 | }; 14 | #endif 15 | -------------------------------------------------------------------------------- /sensors/calibration/AccelCalib/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:=$(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_CERTIFICATE := platform 5 | LOCAL_PRIVILEGED_MODULE := true 6 | 7 | LOCAL_MODULE_TAGS := optional 8 | 9 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 10 | 11 | LOCAL_PACKAGE_NAME := AccCalibration 12 | 13 | include $(BUILD_PACKAGE) 14 | -------------------------------------------------------------------------------- /sensors/calibration/AccelCalib/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /sensors/calibration/AccelCalib/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Accelerometer Calibration 4 | Accelerometer was recalibrated 5 | 6 | -------------------------------------------------------------------------------- /sensors/calibration/AccelCalib/src/com/cyngn/cracklingacc/HintReceiver.java: -------------------------------------------------------------------------------- 1 | package com.cyngn.cracklingacc; 2 | 3 | import static com.android.internal.telephony.TelephonyIntents.SECRET_CODE_ACTION; 4 | 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.content.BroadcastReceiver; 8 | import android.os.SystemProperties; 9 | import android.util.Log; 10 | import android.view.KeyEvent; 11 | import android.widget.Toast; 12 | 13 | import com.cyngn.cracklingacc.R; 14 | 15 | 16 | public class HintReceiver extends BroadcastReceiver { 17 | 18 | private static final String SECRET_CODE_PREFIX = "android_secret_code://"; 19 | 20 | private static final String CALIB_MODE = "22235"; 21 | public HintReceiver() { 22 | } 23 | 24 | @Override 25 | public void onReceive(Context context, Intent intent) { 26 | SystemProperties.set("sys.sensors.acc","calibrate"); 27 | Toast.makeText(context, R.string.acc_calibration_complete, Toast.LENGTH_LONG).show(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /sensors/calibration/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 The CyanogenMod project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | 16 | LOCAL_PATH:= $(call my-dir) 17 | 18 | include $(CLEAR_VARS) 19 | 20 | LOCAL_MODULE_TAGS := optional 21 | 22 | LOCAL_SRC_FILES := accelcal.c 23 | 24 | LOCAL_PRELINK_MODULE := false 25 | 26 | LOCAL_MODULE := accelcal 27 | 28 | include $(BUILD_EXECUTABLE) 29 | 30 | include $(call all-makefiles-under,$(LOCAL_PATH)) 31 | -------------------------------------------------------------------------------- /sensors/calibration/accelcal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | int main() { 23 | FILE *f1, *f2, *f3; 24 | int calibvals[3]; 25 | 26 | 27 | f1 = fopen("/sys/devices/virtual/bst/ACC/fast_calibration_x","w"); 28 | if (f1 == NULL) return -1; 29 | f2 = fopen("/sys/devices/virtual/bst/ACC/fast_calibration_y","w"); 30 | if (f2 == NULL) return -1; 31 | f3 = fopen("/sys/devices/virtual/bst/ACC/fast_calibration_z","w"); 32 | if (f3 == NULL) return -1; 33 | 34 | fprintf(f1,"3"); 35 | fprintf(f2,"3"); 36 | fprintf(f3,"1"); 37 | 38 | fclose(f1); 39 | fclose(f2); 40 | fclose(f3); 41 | 42 | f1 = fopen("/sys/devices/virtual/bst/ACC/offset_x","r"); 43 | if (f1 == NULL) return -1; 44 | f2 = fopen("/sys/devices/virtual/bst/ACC/offset_y","r"); 45 | if (f2 == NULL) return -1; 46 | f3 = fopen("/sys/devices/virtual/bst/ACC/offset_z","r"); 47 | if (f3 == NULL) return -1; 48 | 49 | fscanf(f1,"%d",&calibvals[0]); 50 | fscanf(f2,"%d",&calibvals[1]); 51 | fscanf(f3,"%d",&calibvals[2]); 52 | 53 | fclose(f1); 54 | fclose(f2); 55 | fclose(f3); 56 | 57 | f1 = fopen("/data/misc/sensor/fast_calib_a","w"); 58 | if (f1 == NULL) return -2; 59 | fprintf(f1,"%d,%d,%d",calibvals[0],calibvals[1],calibvals[2]); 60 | fclose(f1); 61 | 62 | return 0; 63 | } 64 | -------------------------------------------------------------------------------- /sepolicy/file_contexts: -------------------------------------------------------------------------------- 1 | /system/bin/sensord u:object_r:sensors_exec:s0 2 | /system/bin/accelcal u:object_r:sensors_exec:s0 3 | /data/misc/sensor(/.*)? u:object_r:sensors_data_file:s0 4 | -------------------------------------------------------------------------------- /sepolicy/sensors.te: -------------------------------------------------------------------------------- 1 | allow sensors sensors_data_file:fifo_file create_file_perms; 2 | allow sensors sysfs:file rw_file_perms; 3 | allow sensors input_device:dir r_dir_perms; 4 | allow sensors input_device:chr_file r_file_perms; 5 | 6 | -------------------------------------------------------------------------------- /sepolicy/system_server.te: -------------------------------------------------------------------------------- 1 | allow system_server sensors_data_file:dir r_dir_perms; 2 | allow system_server sensors_data_file:file rw_file_perms; 3 | allow system_server sensors_data_file:fifo_file rw_file_perms; 4 | -------------------------------------------------------------------------------- /setup-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | set -e 19 | 20 | # Required! 21 | DEVICE=crackling 22 | VENDOR=wileyfox 23 | 24 | # Load extractutils and do some sanity checks 25 | MY_DIR="${BASH_SOURCE%/*}" 26 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi 27 | 28 | CM_ROOT="$MY_DIR"/../../.. 29 | 30 | HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh 31 | if [ ! -f "$HELPER" ]; then 32 | echo "Unable to find helper script at $HELPER" 33 | exit 1 34 | fi 35 | . "$HELPER" 36 | 37 | # Initialize the helper 38 | setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT" 39 | 40 | # Copyright headers and guards 41 | write_headers 42 | 43 | # The standard blobs 44 | write_makefiles "$MY_DIR"/proprietary-files.txt 45 | 46 | # Qualcomm BSP blobs - we put a conditional around here 47 | # in case the BSP is actually being built 48 | printf '\n%s\n' "ifeq (\$(QCPATH),)" >> "$PRODUCTMK" 49 | printf '\n%s\n' "ifeq (\$(QCPATH),)" >> "$ANDROIDMK" 50 | 51 | write_makefiles "$MY_DIR"/proprietary-files-qc.txt 52 | 53 | echo "endif" >> "$PRODUCTMK" 54 | 55 | cat << EOF >> "$ANDROIDMK" 56 | endif 57 | 58 | \$(shell mkdir -p \$(PRODUCT_OUT)/system/vendor/lib/egl && pushd \$(PRODUCT_OUT)/system/vendor/lib > /dev/null && ln -s egl/libEGL_adreno.so libEGL_adreno.so && popd > /dev/null) 59 | \$(shell mkdir -p \$(PRODUCT_OUT)/system/vendor/lib64/egl && pushd \$(PRODUCT_OUT)/system/vendor/lib64 > /dev/null && ln -s egl/libEGL_adreno.so libEGL_adreno.so && popd > /dev/null) 60 | EOF 61 | 62 | # We are done! 63 | write_footers 64 | 65 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # Latest hardware revision supported 2 | ro.product.model.platform=1 3 | -------------------------------------------------------------------------------- /wifi/WCNSS_cfg.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/wifi/WCNSS_cfg.dat -------------------------------------------------------------------------------- /wifi/WCNSS_qcom_wlan_nv.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_wileyfox_crackling/488ab5585d0d208c5ba9b5b8baa40542dfd53c62/wifi/WCNSS_qcom_wlan_nv.bin --------------------------------------------------------------------------------