diff options
| author | Ethan Chen <intervigil@gmail.com> | 2013-12-05 21:18:30 -0800 |
|---|---|---|
| committer | Ethan Chen <intervigil@gmail.com> | 2014-01-23 17:29:41 -0800 |
| commit | 2e4c9107b0098a44f3f581e3598a7e46ba37b79e (patch) | |
| tree | 4c8c0dc7957204b24e54e3c0077de9ed6506a08f | |
| parent | 9b4c73e15319cd8e57510bd367219af013d524f2 (diff) | |
n1: move common pieces to apq8064-common
153 files changed, 16 insertions, 28054 deletions
@@ -20,17 +20,4 @@ ifeq ($(TARGET_DEVICE),n1) include $(call all-makefiles-under,$(LOCAL_PATH)) -include $(CLEAR_VARS) - -# Create firmware links -FIRMWARE_IMAGES := acdb.mbn apps.mbn dsp1.mbn dsp2.mbn dsp3.mbn dsps.b00 dsps.b01 dsps.b02 dsps.b03 dsps.b04 dsps.b05 dsps.mdt efs1.mbn efs2.mbn efs3.mbn mdm_acdb.img mobicore.b00 mobicore.b01 mobicore.b02 mobicore.b03 mobicore.mdt q6.b00 q6.b01 q6.b03 q6.b04 q6.b05 q6.b06 q6.mdt rpm.mbn sbl1.mbn sbl2.mbn tzapps.b00 tzapps.b01 tzapps.b02 tzapps.b03 tzapps.mdt wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b05 wcnss.mdt -FIRMWARE_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(FIRMWARE_IMAGES))) -$(FIRMWARE_SYMLINKS): $(LOCAL_INSTALLED_MODULE) - @echo "Firmware link: $@" - @mkdir -p $(dir $@) - @rm -rf $@ - $(hide) ln -sf /firmware/image/$(notdir $@) $@ - -ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_SYMLINKS) - endif diff --git a/BoardConfig.mk b/BoardConfig.mk index 215710b..70dab93 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -14,107 +14,22 @@ # limitations under the License. # -BOARD_VENDOR := oppo - -# Bootloader -TARGET_BOOTLOADER_BOARD_NAME := MSM8960 -TARGET_NO_BOOTLOADER := true -TARGET_NO_RADIOIMAGE := true - -# Platform -TARGET_BOARD_PLATFORM := msm8960 - -# Architecture -TARGET_ARCH := arm -TARGET_ARCH_VARIANT := armv7-a-neon -TARGET_ARCH_VARIANT_CPU := cortex-a9 -TARGET_CPU_ABI := armeabi-v7a -TARGET_CPU_ABI2 := armeabi -TARGET_CPU_SMP := true -TARGET_CPU_VARIANT := krait -TARGET_USE_KRAIT_BIONIC_OPTIMIZATION := true +# inherit from common apq8064 +-include device/oppo/apq8064-common/BoardConfigCommon.mk # Kernel -BOARD_KERNEL_BASE := 0x80200000 -BOARD_KERNEL_PAGESIZE := 2048 -BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=qcom lpj=67677 user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 zcache androidboot.selinux=permissive -BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 TARGET_KERNEL_CONFIG := cyanogenmod_n1_defconfig -TARGET_KERNEL_SOURCE := kernel/oppo/n1 - -# Flags -COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DQCOM_BSP -DNO_SECURE_DISCARD - -# QCOM hardware -BOARD_USES_QCOM_HARDWARE := true -TARGET_USES_QCOM_BSP := true -TARGET_ENABLE_QC_AV_ENHANCEMENTS := true -TARGET_QCOM_AUDIO_VARIANT := caf -TARGET_QCOM_DISPLAY_VARIANT := caf -TARGET_QCOM_MEDIA_VARIANT := caf -BOARD_USES_QC_TIME_SERVICES := true -TARGET_NO_RPC := true - -# Audio -BOARD_HAVE_NEW_QCOM_CSDCLIENT := true -BOARD_HAVE_CSD_FAST_CALL_SWITCH := true -BOARD_USES_ALSA_AUDIO := true -BOARD_USES_LEGACY_ALSA_AUDIO := true -BOARD_USES_FLUENCE_FOR_VOIP := true -BOARD_USES_FLUENCE_INCALL := true -BOARD_USES_SEPERATED_AUDIO_INPUT := true -BOARD_USES_SEPERATED_VOICE_SPEAKER := true -TARGET_USES_QCOM_COMPRESSED_AUDIO := true # Bluetooth -BOARD_HAVE_BLUETOOTH := true -BOARD_HAVE_BLUETOOTH_QCOM := true BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/oppo/n1/bluetooth # Camera COMMON_GLOBAL_CFLAGS += -DDISABLE_HW_ID_MATCH_CHECK -DNEEDS_VECTORIMPL_SYMBOLS BOARD_FIX_FACE_DETECTION_SCORE := true -USE_DEVICE_SPECIFIC_CAMERA := true - -# Graphics -BOARD_EGL_CFG := device/oppo/n1/configs/egl.cfg -USE_OPENGL_RENDERER := true -TARGET_DISPLAY_USE_RETIRE_FENCE := true -TARGET_USES_C2D_COMPOSITION := true -TARGET_USES_ION := true -OVERRIDE_RS_DRIVER := libRSDriver_adreno.so -HAVE_ADRENO_SOURCE:= false -NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 - - -# Lights -TARGET_PROVIDES_LIBLIGHT := true - -# Power -TARGET_USES_CM_POWERHAL := true - -# Radio -BOARD_PROVIDES_LIBRIL := true -TARGET_ADDITIONAL_BOOTCLASSPATH := qcnvitems:qcrilhook # Tuning BOARD_HARDWARE_CLASS := device/oppo/n1/cmhw -# Webkit -ENABLE_WEBGL := true -TARGET_FORCE_CPU_UPLOAD := true - -# Wifi -BOARD_HAS_QCOM_WLAN := true -BOARD_WLAN_DEVICE := qcwcn -WPA_SUPPLICANT_VERSION := VER_0_8_X -BOARD_WPA_SUPPLICANT_DRIVER := NL80211 -BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn -BOARD_HOSTAPD_DRIVER := NL80211 -BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn -WIFI_DRIVER_FW_PATH_STA := "sta" -WIFI_DRIVER_FW_PATH_AP := "ap" - # Filesystem BOARD_BOOTIMAGE_PARTITION_SIZE := 10485760 BOARD_CACHEIMAGE_PARTITION_SIZE := 536870912 @@ -122,49 +37,8 @@ BOARD_PERSISTIMAGE_PARTITION_SIZE := 8388608 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 10485760 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824 BOARD_USERDATAIMAGE_PARTITION_SIZE := 3221209088 # 3221209088 - 16384 for crypto footer -BOARD_FLASH_BLOCK_SIZE := 131072 - -# The partition used as /storage/sdcard0 is at #29 -BOARD_VOLD_MAX_PARTITIONS := 30 # TARGET_BOOTIMG_SIGNED := true -TARGET_USERIMAGES_USE_EXT4 := true -BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 -BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4 - -# Recovery -ifeq ($(WITH_SIMPLE_RECOVERY),true) - PRODUCT_EXTRA_RECOVERY_KEYS += vendor/extra/recovery_keys/OPPO_N1 - TARGET_RECOVERY_FSTAB := device/oppo/n1/recovery.fstab -else - TARGET_RECOVERY_FSTAB := device/oppo/n1/rootdir/etc/fstab.qcom -endif -TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" -BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\" -BOARD_HAS_NO_SELECT_BUTTON := true -BOARD_RECOVERY_SWIPE := true - -# SELinux -BOARD_SEPOLICY_DIRS += device/oppo/n1/sepolicy -BOARD_SEPOLICY_UNION += \ - app.te \ - bluetooth.te \ - device.te \ - domain.te \ - drmserver.te \ - file.te \ - file_contexts \ - hci_init.te \ - init_shell.te \ - keystore.te \ - mediaserver.te \ - kickstart.te \ - nfc.te \ - rild.te \ - surfaceflinger.te \ - system.te \ - ueventd.te \ - wpa.te TARGET_RELEASETOOLS_EXTENSIONS := device/oppo/n1 diff --git a/audio/audio_policy.conf b/audio/audio_policy.conf deleted file mode 100644 index 9e0becb..0000000 --- a/audio/audio_policy.conf +++ /dev/null @@ -1,101 +0,0 @@ -# Global configuration section: lists input and output devices always present on the device -# as well as the output device selected by default. -# Devices are designated by a string that corresponds to the enum in audio.h - -global_configuration { - attached_output_devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE - default_output_device AUDIO_DEVICE_OUT_SPEAKER - attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_REMOTE_SUBMIX -} - -# audio hardware module section: contains descriptors for all audio hw modules present on the -# device. Each hw module node is named after the corresponding hw module library base name. -# For instance, "primary" corresponds to audio.primary.<device>.so. -# The "primary" module is mandatory and must include at least one output with -# AUDIO_OUTPUT_FLAG_PRIMARY flag. -# Each module descriptor contains one or more output profile descriptors and zero or more -# input profile descriptors. Each profile lists all the parameters supported by a given output -# or input stream category. -# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding -# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n". - -audio_hw_modules { - primary { - outputs { - hdmi { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 - channel_masks dynamic - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_AUX_DIGITAL - flags AUDIO_OUTPUT_FLAG_DIRECT - } - primary { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX|AUDIO_DEVICE_OUT_ALL_A2DP|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_ALL_USB - flags AUDIO_OUTPUT_FLAG_PRIMARY - } - lpa { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_ALL_A2DP|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_ALL_USB|AUDIO_DEVICE_OUT_FM_TX - flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_LPA - } - voip_rx { - sampling_rates 8000|16000 - channel_masks AUDIO_CHANNEL_OUT_MONO - formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_ALL_USB|AUDIO_DEVICE_OUT_ALL_SCO - flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX - } - tunnel { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1 - formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_AMR_WB_PLUS - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_ALL_A2DP|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_ALL_USB|AUDIO_DEVICE_OUT_FM_TX - flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_TUNNEL - } - fast { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_ALL_A2DP|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_ALL_USB|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM_TX - flags AUDIO_OUTPUT_FLAG_FAST - } - } - inputs { - primary { - sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 - channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_5POINT1|AUDIO_CHANNEL_IN_VOICE_CALL_MONO|AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO|AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO - formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_WB - devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_AUX_DIGITAL|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_PROXY|AUDIO_DEVICE_IN_FM_RX|AUDIO_DEVICE_IN_FM_RX_A2DP|AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET|AUDIO_DEVICE_IN_COMMUNICATION - } - voip_tx { - sampling_rates 8000|16000 - channel_masks AUDIO_CHANNEL_IN_MONO - formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB - devices AUDIO_DEVICE_IN_COMMUNICATION - } - } - } - r_submix { - outputs { - submix { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_OUT_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX - } - } - inputs { - submix { - sampling_rates 44100|48000 - channel_masks AUDIO_CHANNEL_IN_STEREO - formats AUDIO_FORMAT_PCM_16_BIT - devices AUDIO_DEVICE_IN_REMOTE_SUBMIX - } - } - } -} diff --git a/audio/snd_soc_msm_2x_Fusion3 b/audio/snd_soc_msm_2x_Fusion3 deleted file mode 100644 index 8ab19c4..0000000 --- a/audio/snd_soc_msm_2x_Fusion3 +++ /dev/null @@ -1,7262 +0,0 @@ -# Master file for snd_soc_msm tabla 2.0 sound card -# Lists all use case verbs -SectionUseCase."HiFi" { -Comment "Music playback use case" -SectionVerb - Name "HiFi" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiSpeaker FM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiFM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiHDMI" - - EnableSequence - 'HDMI Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiHDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 -EndSection - -SectionVerb - Name "HiFiBT SCO Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiBT SCO WB Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiPROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiPROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiUSB PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiUSB PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiPROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiUSB PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiPROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiPROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiPROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiPROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFiPROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection -} -SectionUseCase."HiFi2" { -Comment "Music playback use case for MM2 FE" -SectionVerb - Name "HiFi2" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2Speaker FM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2FM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2HDMI" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2HDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2HDMI SPDIF" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - 'SEC_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - 'SEC_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2BT SCO Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2BT SCO WB Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Speaker" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Earpiece" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Headphones" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF ANC Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Speaker Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Speaker ANC Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection -} -SectionUseCase."HiFi Low Power" { -Comment "LPA use case" -SectionVerb - Name "HiFi Low Power" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerSpeaker FM Tx" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - 'INTERNAL_FM_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - 'INTERNAL_FM_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerFM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerHDMI" - - EnableSequence - 'HDMI Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerHDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerBT SCO Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerBT SCO WB Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerPROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerPROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerUSB PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerUSB PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerPROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerUSB PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerPROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerPROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerPROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerPROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionVerb - Name "HiFi Low PowerPROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection -} -SectionUseCase."HiFi2" { -Comment "Music playback use case for MM2 FE" -SectionVerb - Name "HiFi2" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2Speaker FM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2FM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2HDMI" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2HDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 -EndSection - -SectionVerb - Name "HiFi2HDMI SPDIF" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - 'SEC_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - 'SEC_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2BT SCO Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2BT SCO WB Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Speaker" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Earpiece" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Headphones" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF ANC Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Speaker Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2SPDIF Speaker ANC Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionVerb - Name "HiFi2PROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection -} -SectionUseCase."HiFi Rec" { -Comment "Recording use case" -SectionVerb - Name "HiFi Rec" - - EnableSequence - 'MultiMedia1 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFi RecBT SCO Tx" - - EnableSequence - 'MultiMedia1 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFi RecBT SCO WB Tx" - - EnableSequence - 'MultiMedia1 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFi RecPROXY Tx" - - EnableSequence - 'MultiMedia1 Mixer AFE_PCM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer AFE_PCM_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFi RecUSB PROXY Tx" - - EnableSequence - 'MultiMedia1 Mixer AFE_PCM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer AFE_PCM_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionVerb - Name "HiFi RecSSR QMIC" - - EnableSequence - 'MultiMedia1 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection -} -SectionUseCase."HiFi Rec Compressed" { -Comment "HiFi Rec Compressed use case" -SectionVerb - Name "HiFi Rec Compressed" - - EnableSequence - 'MultiMedia4 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia4 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 9 - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi Rec CompressedMI2S" - - EnableSequence - 'MultiMedia4 Mixer MI2S_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia4 Mixer MI2S_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 9 - PlaybackPCM 9 - -EndSection -} -SectionUseCase."Voice Call" { -Comment "Voice Call use case" -SectionVerb - Name "Voice Call" - - EnableSequence - 'STUB_RX Mixer Voice Stub':1:1 - 'Voice Stub Tx Mixer STUB_TX_HL':1:1 - 'Voice Stub Tx Mixer STUB_1_TX_HL':1:1 - EndSequence - - DisableSequence - 'STUB_RX Mixer Voice Stub':1:0 - 'Voice Stub Tx Mixer STUB_TX_HL':1:0 - 'Voice Stub Tx Mixer STUB_1_TX_HL':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionVerb - Name "Voice CallHDMI" - - EnableSequence - 'Voice Stub Tx Mixer SLIM_3_TX':1:0 - 'HDMI_RX_Voice Mixer Voice Stub':1:0 - 'HDMI_RX Port Mixer SLIM_3_TX':1:0 - 'Voice Stub Tx Mixer STUB_TX_HL':1:0 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionVerb - Name "Voice CallHDMI Tx" - - EnableSequence - 'Voice Stub Tx Mixer SLIM_3_TX':1:1 - 'HDMI_RX_Voice Mixer Voice Stub':1:1 - 'HDMI_RX Port Mixer SLIM_3_TX':1:1 - 'Voice Stub Tx Mixer STUB_TX_HL':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionVerb - Name "Voice CallBT SCO Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Internal BTSCO SampleRate':1:8000 - 'Voice Stub Tx Mixer INTERNAL_BT_SCO_TX':1:0 - 'SLIMBUS_1_RX Mixer Voice Stub':1:0 - 'Voice Stub Tx Mixer SLIM_1_TX':1:0 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_1_RX Port Mixer INTERNAL_BT_SCO_TX':1:0 - 'INTERNAL_BT_SCO_RX Port Mixer SLIM_1_TX':1:0 - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_3_RX Port Mixer INTERNAL_BT_SCO_RX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionVerb - Name "Voice CallBT SCO Tx" - - EnableSequence - 'Internal BTSCO SampleRate':1:8000 - 'Voice Stub Tx Mixer INTERNAL_BT_SCO_TX':1:1 - 'SLIMBUS_1_RX Mixer Voice Stub':1:1 - 'Voice Stub Tx Mixer SLIM_1_TX':1:1 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_1_RX Port Mixer INTERNAL_BT_SCO_TX':1:1 - 'INTERNAL_BT_SCO_RX Port Mixer SLIM_1_TX':1:1 - 'SLIM_3_RX Channels':0:One - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_3_RX Port Mixer INTERNAL_BT_SCO_RX':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionVerb - Name "Voice CallBT SCO WB Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Internal BTSCO SampleRate':1:8000 - 'Voice Stub Tx Mixer INTERNAL_BT_SCO_TX':1:0 - 'SLIMBUS_1_RX Mixer Voice Stub':1:0 - 'Voice Stub Tx Mixer SLIM_1_TX':1:0 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_1_RX Port Mixer INTERNAL_BT_SCO_TX':1:0 - 'INTERNAL_BT_SCO_RX Port Mixer SLIM_1_TX':1:0 - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_3_RX Port Mixer INTERNAL_BT_SCO_RX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionVerb - Name "Voice CallBT SCO WB Tx" - - EnableSequence - 'Internal BTSCO SampleRate':1:16000 - 'Voice Stub Tx Mixer INTERNAL_BT_SCO_TX':1:1 - 'SLIMBUS_1_RX Mixer Voice Stub':1:1 - 'Voice Stub Tx Mixer SLIM_1_TX':1:1 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_1_RX Port Mixer INTERNAL_BT_SCO_TX':1:1 - 'INTERNAL_BT_SCO_RX Port Mixer SLIM_1_TX':1:1 - 'SLIM_3_RX Channels':0:One - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_3_RX Port Mixer INTERNAL_BT_SCO_RX':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionVerb - Name "Voice CallUSB PROXY Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Voice Stub Tx Mixer AFE_PCM_TX':1:0 - 'SLIMBUS_1_RX Mixer Voice Stub':1:0 - 'Voice Stub Tx Mixer SLIM_1_TX':1:0 - 'AFE_PCM_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_1_RX Port Mixer AFE_PCM_TX':1:0 - 'AFE_PCM_RX Port Mixer SLIM_1_TX':1:0 - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_3_RX Port Mixer AFE_PCM_RX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionVerb - Name "Voice CallUSB PROXY Tx" - - EnableSequence - 'Voice Stub Tx Mixer AFE_PCM_TX':1:1 - 'SLIMBUS_1_RX Mixer Voice Stub':1:1 - 'Voice Stub Tx Mixer SLIM_1_TX':1:1 - 'AFE_PCM_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_1_RX Port Mixer AFE_PCM_TX':1:1 - 'AFE_PCM_RX Port Mixer SLIM_1_TX':1:1 - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_3_RX Port Mixer AFE_PCM_RX':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -} -SectionUseCase."Voice Call IP" { -Comment "VOIP Call use case" -SectionVerb - Name "Voice Call IP" - - EnableSequence - 'SLIM_0_RX_Voice Mixer Voip':1:1 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:1 - EndSequence - - DisableSequence - 'SLIM_0_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionVerb - Name "Voice Call IPHDMI Tx" - - EnableSequence - 'HDMI_RX_Voice Mixer Voip':1:1 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionVerb - Name "Voice Call IPBT SCO Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Internal BTSCO SampleRate':1:8000 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionVerb - Name "Voice Call IPBT SCO Tx" - - EnableSequence - 'Internal BTSCO SampleRate':1:8000 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voip':1:1 - 'Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionVerb - Name "Voice Call IPBT SCO WB Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Internal BTSCO SampleRate':1:8000 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionVerb - Name "Voice Call IPBT SCO WB Tx" - - EnableSequence - 'Internal BTSCO SampleRate':1:16000 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voip':1:1 - 'Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionVerb - Name "Voice Call IPHDMI" - - EnableSequence - EndSequence - - DisableSequence - 'HDMI_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionVerb - Name "Voice Call IPFM Tx" - - EnableSequence - EndSequence - - DisableSequence - 'SLIM_0_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection -} -SectionUseCase."FM Digital Radio" { -Comment "FM Radio use case" -SectionVerb - Name "FM Digital Radio" - - EnableSequence - 'Internal FM RX Volume':1:0 - 'SLIMBUS_0_RX Port Mixer INTERNAL_FM_TX':1:1 - 'SLIMBUS_DL_HL Switch':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Port Mixer INTERNAL_FM_TX':1:0 - 'SLIMBUS_DL_HL Switch':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 6 - -EndSection - -SectionVerb - Name "FM Digital RadioPROXY Rx" - - EnableSequence - 'Internal FM RX Volume':1:0 - 'AFE_PCM_RX Port Mixer INTERNAL_FM_TX':1:1 - 'PCM_RX_DL_HL Switch':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Port Mixer INTERNAL_FM_TX':1:0 - 'PCM_RX_DL_HL Switch':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 6 - -EndSection - -SectionVerb - Name "FM Digital RadioPROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 6 - -EndSection - - -SectionVerb - Name "FM Digital RadioUSB PROXY Rx" - - EnableSequence - 'Internal FM RX Volume':1:0 - 'AFE_PCM_RX Port Mixer INTERNAL_FM_TX':1:1 - 'PCM_RX_DL_HL Switch':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Port Mixer INTERNAL_FM_TX':1:0 - 'PCM_RX_DL_HL Switch':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 6 - -EndSection - -SectionVerb - Name "FM Digital RadioUSB PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 6 - -EndSection -} -SectionUseCase."FM REC" { -Comment "FM Recording use case" -SectionVerb - Name "FM REC" - - EnableSequence - 'MultiMedia1 Mixer INTERNAL_FM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer INTERNAL_FM_TX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 0 - CapturePCM 0 - -EndSection -} -SectionUseCase."FM A2DP REC" { -Comment "FM A2DP playback use case" -SectionVerb - Name "FM A2DP REC" - - EnableSequence - 'MultiMedia2 Mixer INTERNAL_FM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia2 Mixer INTERNAL_FM_TX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 1 - CapturePCM 1 - -EndSection -} -SectionUseCase."Incall REC" { -Comment "Voice Recording use case" -SectionVerb - Name "Incall REC" - - EnableSequence - 'MultiMedia1 Mixer SLIM_4_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer SLIM_4_TX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 0 - CapturePCM 0 - -EndSection -} -SectionUseCase."HiFi Tunnel" { -Comment "Tunnel mode playback use case" -SectionVerb - Name "HiFi Tunnel" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelSpeaker FM Tx" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - 'INTERNAL_FM_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - 'INTERNAL_FM_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelFM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelHDMI" - - EnableSequence - 'HDMI Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelHDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelBT SCO Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelBT SCO WB Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelPROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelUSB PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelPROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelUSB PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelPROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelPROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelPROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelPROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionVerb - Name "HiFi TunnelPROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection -} -SectionUseCase."ADSP testfwk" { -Comment "ADSP testfwk use case" - -SectionVerb - Name "ADSP testfwk" - - EnableSequence - 'SLIMBUS_DL_HL Switch':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_DL_HL Switch':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 5 - -EndSection -} - -SectionUseCase."HiFi Lowlatency Rec" { -Comment "Recording use case" -SectionVerb - Name "HiFi Lowlatency Rec" - - EnableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi Lowlatency RecBT SCO Tx" - - EnableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi Lowlatency RecBT SCO WB Tx" - - EnableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi Lowlatency RecPROXY Rx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi Lowlatency RecPROXY Tx" - - EnableSequence - 'MultiMedia5 Mixer AFE_PCM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer AFE_PCM_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi Lowlatency RecUSB PROXY Rx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi Lowlatency RecUSB PROXY Tx" - - EnableSequence - 'MultiMedia5 Mixer AFE_PCM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer AFE_PCM_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi Lowlatency RecSSR QMIC" - - EnableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection -} - -SectionUseCase."HiFi Lowlatency" { -Comment "LowLatnecy mode playback use case" -SectionVerb - Name "HiFi Lowlatency" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - CapturePCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencySpeaker FM Tx" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyFM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyHDMI" - - EnableSequence - 'HDMI Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyHDMI SPDIF" - - EnableSequence - 'HDMI Mixer MultiMedia5':1:1 - 'SEC_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia4':1:0 - 'SEC_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyHDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyBT SCO Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyBT SCO WB Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyPROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyPROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyUSB PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyUSB PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencySPDIF" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencySPDIF Speaker" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - - -SectionVerb - Name "HiFi LowlatencySPDIF Earpiece" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - - -SectionVerb - Name "HiFi LowlatencySPDIF Headphones" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - - -SectionVerb - Name "HiFi LowlatencySPDIF ANC Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencySPDIF Speaker Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencySPDIF Speaker ANC Headset" - - EnableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SEC_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyPROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyUSB PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection - -SectionVerb - Name "HiFi LowlatencyPROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection -SectionVerb - Name "HiFi LowlatencyPROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection -SectionVerb - Name "HiFi LowlatencyPROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection -SectionVerb - Name "HiFi LowlatencyPROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection -SectionVerb - Name "HiFi LowlatencyPROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 14 - -EndSection -} - -SectionDevice - Name "Earpiece" - Comment "Handset Rx device" - - EnableSequence - 'SLIM_0_RX Channels':0:One - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'EAR PA Gain':0:POS_6_DB - 'DAC1 Switch':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'RX1 Digital Volume':1:68 - EndSequence - - DisableSequence - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'DAC1 Switch':1:0 - 'SLIM TX3 MUX':0:ZERO - EndSequence - - ACDBID 7:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "Voice Earpiece" - Comment "Handset Rx device" - - EnableSequence - 'SLIM_0_RX Channels':0:One - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'EAR PA Gain':0:POS_6_DB - 'DAC1 Switch':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'IIR1 Band1':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band2':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band3':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band4':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band5':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Enable Band1':1:1 - 'IIR1 Enable Band2':1:1 - 'IIR1 Enable Band3':1:1 - 'IIR1 Enable Band4':1:1 - 'IIR1 Enable Band5':1:1 - 'RX1 MIX2 INP1':0:IIR1 - 'RX1 Digital Volume':1:72 - 'RX1 HPF Switch':1:1 - EndSequence - - DisableSequence - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'DAC1 Switch':1:0 - 'SLIM TX3 MUX':0:ZERO - 'IIR1 Enable Band1':1:0 - 'IIR1 Enable Band2':1:0 - 'IIR1 Enable Band3':1:0 - 'IIR1 Enable Band4':1:0 - 'IIR1 Enable Band5':1:0 - 'IIR1 Band1':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band2':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band3':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band4':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band5':2:0x0 0x0 0x0 0x0 0x0 - 'RX1 MIX2 INP1':0:ZERO - 'RX1 HPF Switch':1:0 - EndSequence - - ACDBID 7:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "HAC Earpiece" - Comment "Handset Rx device for Hearing AID" - - EnableSequence - 'SLIM_0_RX Channels':0:One - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX1 Digital Volume':1:68 - 'EAR PA Gain':0:POS_2_DB - 'DAC1 Switch':1:1 - 'SLIM TX3 MUX':0:RMIX1 - EndSequence - - DisableSequence - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX1 Digital Volume':1:68 - 'DAC1 Switch':1:0 - 'SLIM TX3 MUX':0:ZERO - EndSequence - - ACDBID 60:1 - -EndSection - -SectionDevice - Name "TTY Handset Rx" - Comment "TTY HCO Handset Rx device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:One - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'EAR PA Gain':0:POS_2_DB - 'DAC1 Switch':1:1 - 'RX1 Digital Volume':1:68 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'DAC1 Switch':1:0 - EndSequence - - ACDBID 37:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "ANC Handset" - Comment "ANC Handset Rx device" - - EnableSequence - 'ANC Function':0:ON - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:One - 'MICBIAS1 CAPLESS Switch':1:1 - 'MICBIAS3 CAPLESS Switch':1:1 - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'EAR PA Gain':0:POS_6_DB - 'DAC1 Switch':1:1 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'RX1 Digital Volume':1:72 - 'ANC Slot':1:4 - 'ANC1 MUX':0:ADC4 - 'ADC4 Volume':1:50 - 'ANC1 FB MUX':0:EAR_HPH_L - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'DAC1 Switch':1:0 - 'ANC Slot':1:0 - 'ANC1 MUX':0:ZERO - 'ADC4 Volume':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'SLIM TX3 MUX':0:ZERO - 'ANC Function':0:OFF - EndSequence - - ACDBID 7:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "Speaker" - Comment "Speaker Rx device" - - EnableSequence - 'SLIM_0_RX Channels':0:One - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX4 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'SLIM TX3 MUX':0:RMIX3 - 'RX3 Digital Volume':1:68 - 'RX4 Digital Volume':1:68 - EndSequence - - DisableSequence - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'SLIM TX3 MUX':0:ZERO - EndSequence - - ACDBID 15:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "Voice Speaker" - Comment "Speaker for voice call" - - EnableSequence - 'SLIM_0_RX Channels':0:One - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX4 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'SLIM TX3 MUX':0:RMIX3 - 'RX3 Digital Volume':1:68 - 'RX4 Digital Volume':1:68 - EndSequence - - DisableSequence - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'SLIM TX3 MUX':0:ZERO - EndSequence - - ACDBID 15:1 - -EndSection - -SectionDevice - Name "Headphones" - Comment "Headset Rx device" - - EnableSequence - 'SLIM_0_RX Channels':0:Two - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:75 - 'HPHR Volume':1:75 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - 'RX1 Digital Volume':1:68 - 'RX2 Digital Volume':1:68 - 'HPH_L_DAC1':1:1 - 'HPH_L_DAC2':1:1 - EndSequence - - DisableSequence - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'HPH_L_DAC1':1:0 - 'HPH_L_DAC2':1:0 - EndSequence - - ACDBID 10:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "Voice Headphones" - Comment "Headset Rx device for voice call" - - EnableSequence - 'SLIM_0_RX Channels':0:Two - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:100 - 'HPHR Volume':1:100 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - 'IIR1 Band1':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band2':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band3':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band4':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band5':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Enable Band1':1:1 - 'IIR1 Enable Band2':1:1 - 'IIR1 Enable Band3':1:1 - 'IIR1 Enable Band4':1:1 - 'IIR1 Enable Band5':1:1 - 'RX1 MIX2 INP1':0:IIR1 - 'RX2 MIX2 INP1':0:IIR1 - 'RX1 Digital Volume':1:68 - 'RX2 Digital Volume':1:68 - 'HPH_L_DAC1':1:1 - 'HPH_L_DAC2':1:1 - EndSequence - - DisableSequence - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'IIR1 Enable Band1':1:0 - 'IIR1 Enable Band2':1:0 - 'IIR1 Enable Band3':1:0 - 'IIR1 Enable Band4':1:0 - 'IIR1 Enable Band5':1:0 - 'IIR1 Band1':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band2':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band3':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band4':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band5':2:0x0 0x0 0x0 0x0 0x0 - 'RX1 MIX2 INP1':0:ZERO - 'RX2 MIX2 INP1':0:ZERO - 'HPH_L_DAC1':1:0 - 'HPH_L_DAC2':1:0 - EndSequence - - ACDBID 10:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Speaker Headset" - Comment "Speaker Headset Rx combo device" - - EnableSequence - 'SLIM_0_RX Channels':0:One - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX4 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX1 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:60 - 'HPHR Volume':1:60 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - 'RX1 Digital Volume':1:66 - 'RX2 Digital Volume':1:66 - 'RX3 Digital Volume':1:68 - 'RX4 Digital Volume':1:68 - 'HPH_L_DAC1':1:1 - 'HPH_L_DAC2':1:1 - EndSequence - - DisableSequence - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'HPH_L_DAC1':1:0 - 'HPH_L_DAC2':1:0 - EndSequence - - ACDBID 10:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "Speaker ANC Headset" - Comment "Speaker ANC Headset Rx combo device" - - EnableSequence - 'ANC Function':0:ON - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'MICBIAS3 CAPLESS Switch':1:1 - 'MICBIAS1 CAPLESS Switch':1:1 - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX5 MIX1 INP1':0:RX2 - 'RX5 MIX1 INP2':0:RX7 - 'RX4 DSM MUX':0:DSM_INV - 'RX6 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT2 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'LINEOUT4 Volume':1:66 - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:70 - 'HPHR Volume':1:70 - 'RX1 Digital Volume':1:68 - 'RX2 Digital Volume':1:68 - 'ANC Slot':1:0 - 'ANC1 FB MUX':0:EAR_HPH_L - 'ANC1 MUX':0:ADC4 - 'ANC2 MUX':0:ADC3 - 'ADC3 Volume':1:85 - 'ADC4 Volume':1:85 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - 'RX3 Digital Volume':1:68 - 'RX4 Digital Volume':1:68 - 'RX5 Digital Volume':1:68 - 'RX6 Digital Volume':1:68 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX5 MIX1 INP1':0:ZERO - 'RX5 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'RX6 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT2 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'LINEOUT4 Volume':1:0 - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'ANC1 MUX':0:ZERO - 'ANC2 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'MICBIAS3 CAPLESS Switch':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'ANC Function':0:OFF - EndSequence - - ACDBID 26:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "ANC Headset" - Comment "ANC Headset Rx device" - - EnableSequence - 'ANC Function':0:ON - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'MICBIAS3 CAPLESS Switch':1:1 - 'MICBIAS1 CAPLESS Switch':1:1 - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:70 - 'HPHR Volume':1:70 - 'RX1 Digital Volume':1:68 - 'RX2 Digital Volume':1:68 - 'ANC Slot':1:0 - 'ANC1 FB MUX':0:EAR_HPH_L - 'ANC1 MUX':0:ADC4 - 'ANC2 MUX':0:ADC3 - 'ADC3 Volume':1:85 - 'ADC4 Volume':1:85 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'ANC1 MUX':0:ZERO - 'ANC2 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'MICBIAS3 CAPLESS Switch':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'ANC Function':0:OFF - EndSequence - - ACDBID 26:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "Voice ANC Headset" - Comment "ANC Headset Rx device for voice call" - - EnableSequence - 'ANC Function':0:ON - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'MICBIAS3 CAPLESS Switch':1:1 - 'MICBIAS1 CAPLESS Switch':1:1 - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:70 - 'HPHR Volume':1:70 - 'RX1 Digital Volume':1:68 - 'RX2 Digital Volume':1:68 - 'ANC Slot':1:0 - 'ANC1 FB MUX':0:EAR_HPH_L - 'ANC1 MUX':0:ADC4 - 'ANC2 MUX':0:ADC3 - 'ADC3 Volume':1:85 - 'ADC4 Volume':1:85 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - 'IIR1 Band1':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band2':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band3':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band4':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Band5':2:0x10000000 0x0 0x0 0x0 0x0 - 'IIR1 Enable Band1':1:1 - 'IIR1 Enable Band2':1:1 - 'IIR1 Enable Band3':1:1 - 'IIR1 Enable Band4':1:1 - 'IIR1 Enable Band5':1:1 - 'RX1 MIX2 INP1':0:IIR1 - 'RX2 MIX2 INP1':0:IIR1 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'ANC1 MUX':0:ZERO - 'ANC2 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'MICBIAS3 CAPLESS Switch':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'IIR1 Enable Band1':1:0 - 'IIR1 Enable Band2':1:0 - 'IIR1 Enable Band3':1:0 - 'IIR1 Enable Band4':1:0 - 'IIR1 Enable Band5':1:0 - 'IIR1 Band1':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band2':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band3':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band4':2:0x0 0x0 0x0 0x0 0x0 - 'IIR1 Band5':2:0x0 0x0 0x0 0x0 0x0 - 'RX1 MIX2 INP1':0:ZERO - 'RX2 MIX2 INP1':0:ZERO - 'ANC Function':0:OFF - EndSequence - - ACDBID 26:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Speaker FM Tx" - Comment "Speaker FM Tx combo device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX5 MIX1 INP1':0:RX2 - 'RX5 MIX1 INP2':0:RX7 - 'RX4 DSM MUX':0:DSM_INV - 'RX6 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT2 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'LINEOUT4 Volume':1:66 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX3 - 'SLIM TX5 MUX':0:RMIX5 - 'RX3 Digital Volume':1:68 - 'RX4 Digital Volume':1:68 - 'RX5 Digital Volume':1:68 - 'RX6 Digital Volume':1:68 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX5 MIX1 INP1':0:ZERO - 'RX5 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'RX6 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT2 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'LINEOUT4 Volume':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - EndSequence - - ACDBID 15:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Headset" - Comment "Headset Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:Two - 'SLIM TX7 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'ADC3 Volume':1:100 - 'DEC4 Volume':1:68 - 'SLIM TX8 MUX':0:DEC3 - 'DEC3 MUX':0:ADC4 - 'DEC3 Volume':1:68 - 'ADC4 Volume':1:100 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'DEC3 MUX':0:ZERO - 'DEC4 Volume':1:0 - 'DEC3 Volume':1:0 - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 8:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Voice Headset" - Comment "Headset Tx device for Voice call" - - EnableSequence - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC8 - 'DEC8 MUX':0:ADC2 - 'ADC2 Volume':1:100 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'DEC8 MUX':0:ZERO - 'ADC2 Volume':1:0 - EndSequence - - ACDBID 8:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "HeadsetVM Tx" - Comment "Headset Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC8 - 'DEC8 MUX':0:ADC2 - 'ADC2 Volume':1:100 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'DEC8 MUX':0:ZERO - 'ADC2 Volume':1:0 - EndSequence - - ACDBID 8:2 - -EndSection - -SectionDevice - Name "Handset" - Comment "Handset Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'ADC3 Volume':1:100 - 'DEC4 Volume':1:68 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'DEC4 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - 'IIR1 INP1 Volume':1:0 - 'IIR1 INP1 MUX':0:ZERO - EndSequence - - ACDBID 4:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "HandsetVM Tx" - Comment "Handset Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:ADC1 - 'DEC7 Volume':1:60 - 'ADC1 Volume':1:100 - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'DEC7 Volume':1:60 - 'ADC1 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - ACDBID 4:2 - -EndSection - -SectionDevice - Name "Camcorder Tx" - Comment "Camcorder Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:Two - 'SLIM TX8 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'ADC3 Volume':1:100 - 'DEC4 Volume':1:68 - 'SLIM TX7 MUX':0:DEC3 - 'DEC3 MUX':0:ADC4 - 'ADC4 Volume':1:100 - 'DEC3 Volume':1:68 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'DEC3 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'DEC4 Volume':1:0 - 'DEC3 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 34:2 - -EndSection - -SectionDevice - Name "Voice Recognition" - Comment "Voice Recognition Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:Two - 'SLIM TX7 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'ADC3 Volume':1:100 - 'DEC4 Volume':1:68 - 'SLIM TX8 MUX':0:DEC3 - 'DEC3 MUX':0:ADC4 - 'ADC4 Volume':1:100 - 'DEC3 Volume':1:68 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'DEC3 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'DEC4 Volume':1:0 - 'DEC3 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 51:2 - -EndSection - -SectionDevice - Name "TTY Handset Analog Tx" - Comment "TTY Handset Analog Tx device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:ADC1 - 'ADC1 Volume':1:100 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'ADC1 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 36:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Line" - Comment "Speaker Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:Two - 'SLIM TX7 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'ADC3 Volume':1:100 - 'DEC4 Volume':1:68 - 'SLIM TX8 MUX':0:DEC3 - 'DEC3 MUX':0:ADC4 - 'ADC4 Volume':1:100 - 'DEC3 Volume':1:68 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'DEC3 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'DEC4 Volume':1:0 - 'DEC3 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 51:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "AANC Line" - Comment "Speaker Tx device for AANC" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'AIF1_CAP Mixer SLIM TX8':1:1 - 'AIF1_CAP Mixer SLIM TX9':1:1 - 'SLIM_0_TX Channels':0:Three - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:DMIC1 - 'SLIM TX8 MUX':0:DEC9 - 'DEC9 MUX':0:DMIC4 - 'SLIM TX9 MUX':0:DEC6 - 'DEC6 MUX':0:DMIC6 - 'MICBIAS1 CAPLESS Switch':1:1 - 'MICBIAS3 CAPLESS Switch':1:1 - 'MICBIAS4 CAPLESS Switch':1:1 - 'IIR1 INP1 Volume':1:50 - 'IIR1 INP1 MUX':0:DEC7 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'AIF1_CAP Mixer SLIM TX8':1:0 - 'AIF1_CAP Mixer SLIM TX9':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC9 MUX':0:ZERO - 'SLIM TX9 MUX':0:ZERO - 'DEC6 MUX':0:ZERO - 'IIR1 INP1 Volume':1:0 - 'IIR1 INP1 MUX':0:ZERO - EndSequence - - ACDBID 48:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Voice Line" - Comment "Speaker Tx device for voice call" - - EnableSequence - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'DEC4 Volume':1:70 - 'ADC3 Volume':1:100 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'DEC4 Volume':1:68 - 'ADC3 Volume':1:100 - EndSequence - - ACDBID 11:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "TTY Handset Tx" - Comment "TTY VCO Handset Tx device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:DMIC1 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 36:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "HDMI Tx" - Comment "HDMI Tx device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:DMIC1 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 4:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - - Name "QMIC" - Comment "Quad mic device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'AIF1_CAP Mixer SLIM TX8':1:1 - 'AIF1_CAP Mixer SLIM TX9':1:1 - 'AIF1_CAP Mixer SLIM TX10':1:1 - 'SLIM_0_TX Channels':0:Four - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:DMIC1 - 'SLIM TX8 MUX':0:DEC8 - 'DEC8 MUX':0:DMIC2 - 'SLIM TX9 MUX':0:DEC10 - 'DEC10 MUX':0:DMIC3 - 'SLIM TX10 MUX':0:DEC9 - 'DEC9 MUX':0:DMIC4 - 'MICBIAS1 CAPLESS Switch':1:1 - 'MICBIAS3 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'AIF1_CAP Mixer SLIM TX8':1:0 - 'AIF1_CAP Mixer SLIM TX9':1:0 - 'AIF1_CAP Mixer SLIM TX10':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC8 MUX':0:ZERO - 'SLIM TX9 MUX':0:ZERO - 'DEC9 MUX':0:ZERO - 'SLIM TX10 MUX':0:ZERO - 'DEC10 MUX':0:ZERO - 'MICBIAS1 CAPLESS Switch':1:0 - 'MICBIAS3 CAPLESS Switch':1:0 - EndSequence - - ACDBID 19:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "DMIC Broadside" - Comment "Dual MIC Broadside Tx device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'AIF1_CAP Mixer SLIM TX8':1:1 - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:DMIC1 - 'SLIM TX8 MUX':0:DEC8 - 'DEC8 MUX':0:DMIC2 - 'MICBIAS1 CAPLESS Switch':1:1 - 'SLIM_0_TX Channels':0:Two - 'IIR1 INP1 Volume':1:50 - 'IIR1 INP1 MUX':0:DEC7 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'AIF1_CAP Mixer SLIM TX8':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC8 MUX':0:ZERO - 'MICBIAS1 CAPLESS Switch':1:0 - 'IIR1 INP1 Volume':1:0 - 'IIR1 INP1 MUX':0:ZERO - EndSequence - - ACDBID 5:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "DMIC Endfire" - Comment "Dual MIC Endfire Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:Two - 'SLIM TX7 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'ADC3 Volume':1:80 - 'DEC4 Volume':1:68 - 'SLIM TX8 MUX':0:DEC3 - 'DEC3 MUX':0:ADC4 - 'DEC3 Volume':1:68 - 'ADC4 Volume':1:80 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'DEC3 MUX':0:ZERO - 'DEC4 Volume':1:0 - 'DEC3 Volume':1:0 - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 51:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "AANC DMIC Endfire" - Comment "Dual MIC Endfire Tx device for AANC" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'AIF1_CAP Mixer SLIM TX8':1:1 - 'AIF1_CAP Mixer SLIM TX9':1:1 - 'SLIM TX7 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'SLIM TX8 MUX':0:DEC3 - 'DEC3 MUX':0:ADC4 - 'SLIM TX9 MUX':0:DEC2 - 'DEC2 MUX':0:ADC5 - 'ADC3 Volume':1:100 - 'ADC4 Volume':1:100 - 'ADC5 Volume':1:100 - 'MICBIAS1 CAPLESS Switch':1:1 - 'MICBIAS3 CAPLESS Switch':1:1 - 'MICBIAS4 CAPLESS Switch':1:1 - 'SLIM_0_TX Channels':0:Three - 'IIR1 INP1 Volume':1:50 - 'IIR1 INP1 MUX':0:DEC7 - 'ADC5 COUPLING':1:0 - 'DEC2 Volume':1:68 - 'DEC3 Volume':1:68 - 'DEC4 Volume':1:68 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'AIF1_CAP Mixer SLIM TX8':1:0 - 'AIF1_CAP Mixer SLIM TX9':1:0 - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'ADC5 Volume':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC3 MUX':0:ZERO - 'SLIM TX9 MUX':0:ZERO - 'DEC2 MUX':0:ZERO - 'IIR1 INP1 Volume':1:0 - 'IIR1 INP1 MUX':0:ZERO - EndSequence - - ACDBID 65:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Speaker DMIC Broadside" - Comment "Dual MIC Broadside Tx device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'AIF1_CAP Mixer SLIM TX8':1:1 - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:DMIC1 - 'SLIM TX8 MUX':0:DEC8 - 'DEC8 MUX':0:DMIC2 - 'MICBIAS1 CAPLESS Switch':1:1 - 'SLIM_0_TX Channels':0:Two - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'AIF1_CAP Mixer SLIM TX8':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC8 MUX':0:ZERO - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 12:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Speaker DMIC Endfire" - Comment "Dual MIC Endfire Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC3 - 'DEC3 MUX':0:ADC4 - 'DEC3 Volume':1:68 - 'ADC4 Volume':1:100 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'DEC3 MUX':0:ZERO - 'DEC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - 'IIR1 INP1 Volume':1:0 - 'IIR1 INP1 MUX':0:ZERO - EndSequence - - ACDBID 52:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Handset DMIC Stereo" - Comment "Handset Dual MIC Stereo Tx device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'AIF1_CAP Mixer SLIM TX8':1:1 - 'SLIM TX7 MUX':0:DEC7 - 'DEC7 MUX':0:DMIC1 - 'SLIM TX8 MUX':0:DEC10 - 'DEC10 MUX':0:DMIC3 - 'MICBIAS1 CAPLESS Switch':1:1 - 'MICBIAS3 CAPLESS Switch':1:1 - 'SLIM_0_TX Channels':0:Two - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'AIF1_CAP Mixer SLIM TX8':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC10 MUX':0:ZERO - 'MICBIAS1 CAPLESS Switch':1:0 - 'MICBIAS3 CAPLESS Switch':1:0 - EndSequence - - ACDBID 34:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Speaker DMIC Stereo" - Comment "Speaker Dual MIC Stereo Tx device" - - EnableSequence - 'SLIM_0_TX Channels':0:Two - 'SLIM TX7 MUX':0:DEC4 - 'DEC4 MUX':0:ADC3 - 'ADC3 Volume':1:100 - 'DEC4 Volume':1:68 - 'SLIM TX8 MUX':0:DEC3 - 'DEC3 MUX':0:ADC4 - 'ADC4 Volume':1:100 - 'DEC3 Volume':1:68 - 'MICBIAS1 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'SLIM TX7 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC4 MUX':0:ZERO - 'DEC3 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'DEC4 Volume':1:0 - 'DEC3 Volume':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - EndSequence - - ACDBID 51:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "TTY Headset Rx" - Comment "TTY Headset Rx device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'TTY Mode':0:VCO - 'SLIM_0_RX Channels':0:One - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'HPHL DAC Switch':1:1 - 'HPHL Volume':1:80 - 'RX1 Digital Volume':1:68 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'TTY Mode':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHL Volume':1:0 - EndSequence - - ACDBID 17:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "TTY Headset Tx" - Comment "TTY Headset Tx device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'TTY Mode':0:HCO - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC8 - 'DEC8 MUX':0:ADC2 - 'ADC2 Volume':1:100 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'TTY Mode':0:ZERO - 'SLIM TX7 MUX':0:ZERO - 'DEC8 MUX':0:ZERO - 'ADC2 Volume':1:0 - EndSequence - - ACDBID 16:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "TTY Full Rx" - Comment "TTY Full Rx device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'TTY Mode':0:FULL - 'SLIM_0_RX Channels':0:One - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'HPHL DAC Switch':1:1 - 'HPHL Volume':1:80 - 'RX1 Digital Volume':1:68 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'TTY Mode':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHL Volume':1:0 - EndSequence - - ACDBID 17:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "TTY Full Tx" - Comment "TTY Full Tx device" - - EnableSequence - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'SLIM_0_TX Channels':0:One - 'SLIM TX7 MUX':0:DEC8 - 'DEC8 MUX':0:ADC2 - 'ADC2 Volume':1:100 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC8 MUX':0:ZERO - 'ADC2 Volume':1:0 - EndSequence - - ACDBID 16:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "BT SCO Rx" - Comment "BT SCO Rx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 22:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "BT SCO Tx" - Comment "BT SCO Tx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 21:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "BT SCO WB Rx" - Comment "BT SCO Rx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 22:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "BT SCO WB Tx" - Comment "BT SCO Tx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 21:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "HDMI" - Comment "HDMI Rx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 18:1 - EffectsMixerCTL "SRS TruMedia HDMI" - -EndSection - - -SectionDevice - Name "HDMI Speaker" - Comment "HDMI Speaker Rx device" - - EnableSequence - 'SLIM_0_RX Channels':0:One - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX4 DSM MUX':0:DSM_INV - 'RX3 Digital Volume':1:68 - 'LINEOUT1 Volume':1:100 - 'LINEOUT3 Volume':1:100 - 'SLIM TX3 MUX':0:RMIX3 - EndSequence - - DisableSequence - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'RX3 Digital Volume':1:68 - 'LINEOUT1 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'SLIM TX3 MUX':0:ZERO - EndSequence - - ACDBID 14:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "FM Tx" - Comment "FM Tx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 0:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "PROXY Rx" - Comment "PROXY Rx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 20:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "PROXY Tx" - Comment "PROXY Tx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 0:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "USB PROXY Rx" - Comment "USB PROXY Rx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 22:1 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "USB PROXY Tx" - Comment "PROXY Tx device" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 21:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "SSR QMIC" - Comment "Quad mic device for Surround Sound Recording" - - EnableSequence - 'SLIM_0_TX Channels':0:Four - 'AIF1_CAP Mixer SLIM TX7':1:1 - 'AIF1_CAP Mixer SLIM TX8':1:1 - 'AIF1_CAP Mixer SLIM TX9':1:1 - 'AIF1_CAP Mixer SLIM TX10':1:1 - 'SLIM TX7 MUX':0:DEC9 - 'DEC9 MUX':0:DMIC4 - 'SLIM TX8 MUX':0:DEC10 - 'DEC10 MUX':0:DMIC3 - 'SLIM TX9 MUX':0:DEC7 - 'DEC7 MUX':0:DMIC1 - 'SLIM TX10 MUX':0:DEC6 - 'DEC6 MUX':0:DMIC6 - 'MICBIAS1 CAPLESS Switch':1:1 - 'MICBIAS3 CAPLESS Switch':1:1 - 'MICBIAS4 CAPLESS Switch':1:1 - EndSequence - - DisableSequence - 'AIF1_CAP Mixer SLIM TX7':1:0 - 'AIF1_CAP Mixer SLIM TX8':1:0 - 'AIF1_CAP Mixer SLIM TX9':1:0 - 'AIF1_CAP Mixer SLIM TX10':1:0 - 'SLIM TX7 MUX':0:ZERO - 'DEC9 MUX':0:ZERO - 'SLIM TX8 MUX':0:ZERO - 'DEC10 MUX':0:ZERO - 'SLIM TX9 MUX':0:ZERO - 'DEC7 MUX':0:ZERO - 'SLIM TX10 MUX':0:ZERO - 'DEC6 MUX':0:ZERO - 'MICBIAS1 CAPLESS Switch':1:0 - 'MICBIAS3 CAPLESS Switch':1:0 - 'MICBIAS4 CAPLESS Switch':1:0 - EndSequence - - ACDBID 46:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "Dummy Tx" - Comment "Dummy Tx device, not a physical device just for routing" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - ACDBID 0:2 - EffectsMixerCTL "SRS TruMedia" - -EndSection - -SectionDevice - Name "PROXY Rx Earpiece" - Comment "PROXY Rx + Handset Rx device combo device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:One - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'EAR PA Gain':0:POS_2_DB - 'DAC1 Switch':1:1 - 'SLIM TX3 MUX':0:RMIX1 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'DAC1 Switch':1:0 - 'SLIM TX3 MUX':0:ZERO - EndSequence - - ACDBID 7:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "PROXY Rx Speaker" - Comment "PROXY Rx + Speaker Rx device combo device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX5 MIX1 INP1':0:RX2 - 'RX5 MIX1 INP2':0:RX7 - 'RX4 DSM MUX':0:DSM_INV - 'RX6 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT2 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'LINEOUT4 Volume':1:66 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX3 - 'SLIM TX5 MUX':0:RMIX5 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX5 MIX1 INP1':0:ZERO - 'RX5 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'RX6 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT2 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'LINEOUT4 Volume':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - EndSequence - - ACDBID 15:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "USB PROXY Rx Speaker" - Comment "USB PROXY Rx + Speaker Rx device combo device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX5 MIX1 INP1':0:RX2 - 'RX5 MIX1 INP2':0:RX7 - 'RX4 DSM MUX':0:DSM_INV - 'RX6 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT2 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'LINEOUT4 Volume':1:66 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX3 - 'SLIM TX5 MUX':0:RMIX5 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX5 MIX1 INP1':0:ZERO - 'RX5 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'RX6 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT2 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'LINEOUT4 Volume':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - EndSequence - - ACDBID 22:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "PROXY Rx Headphones" - Comment "PROXY Rx + Headphone Rx device combo device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:80 - 'HPHR Volume':1:80 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - 'RX1 Digital Volume':1:68 - 'RX2 Digital Volume':1:68 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'RX1 Digital Volume':1:0 - 'RX2 Digital Volume':1:0 - EndSequence - - ACDBID 10:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "PROXY Rx Speaker Headset" - Comment "PROXY Rx + Speaker Headset Rx combo device" - - EnableSequence - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX5 MIX1 INP1':0:RX2 - 'RX5 MIX1 INP2':0:RX7 - 'RX4 DSM MUX':0:DSM_INV - 'RX6 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT2 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'LINEOUT4 Volume':1:66 - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:80 - 'HPHR Volume':1:80 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX5 MIX1 INP1':0:ZERO - 'RX5 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'RX6 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT2 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'LINEOUT4 Volume':1:0 - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - EndSequence - - ACDBID 10:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "PROXY Rx Speaker ANC Headset" - Comment "PROXY Rx + Speaker ANC Headset Rx combo device" - - EnableSequence - 'ANC Function':0:ON - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'MICBIAS3 CAPLESS Switch':1:1 - 'MICBIAS1 CAPLESS Switch':1:1 - 'RX3 MIX1 INP1':0:RX1 - 'RX3 MIX1 INP2':0:RX6 - 'RX5 MIX1 INP1':0:RX2 - 'RX5 MIX1 INP2':0:RX7 - 'RX4 DSM MUX':0:DSM_INV - 'RX6 DSM MUX':0:DSM_INV - 'LINEOUT1 Volume':1:66 - 'LINEOUT2 Volume':1:66 - 'LINEOUT3 Volume':1:66 - 'LINEOUT4 Volume':1:66 - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:70 - 'HPHR Volume':1:70 - 'RX1 Digital Volume':1:65 - 'RX2 Digital Volume':1:65 - 'ANC Slot':1:0 - 'ANC1 FB MUX':0:EAR_HPH_L - 'ANC1 MUX':0:ADC4 - 'ANC2 MUX':0:ADC3 - 'ADC3 Volume':1:85 - 'ADC4 Volume':1:85 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX3 MIX1 INP1':0:ZERO - 'RX3 MIX1 INP2':0:ZERO - 'RX5 MIX1 INP1':0:ZERO - 'RX5 MIX1 INP2':0:ZERO - 'RX4 DSM MUX':0:CIC_OUT - 'RX6 DSM MUX':0:CIC_OUT - 'LINEOUT1 Volume':1:0 - 'LINEOUT2 Volume':1:0 - 'LINEOUT3 Volume':1:0 - 'LINEOUT4 Volume':1:0 - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'RX1 Digital Volume':1:0 - 'RX2 Digital Volume':1:0 - 'ANC1 MUX':0:ZERO - 'ANC2 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'MICBIAS3 CAPLESS Switch':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'ANC Function':0:OFF - EndSequence - - ACDBID 26:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionDevice - Name "PROXY Rx ANC Headset" - Comment "PROXY Rx ANC Headset Rx device combo device" - - EnableSequence - 'ANC Function':0:ON - 'SLIM RX1 MUX':0:AIF1_PB - 'SLIM RX6 MUX':0:AIF2_PB - 'SLIM RX2 MUX':0:AIF1_PB - 'SLIM RX7 MUX':0:AIF2_PB - 'SLIM_0_RX Channels':0:Two - 'MICBIAS3 CAPLESS Switch':1:1 - 'MICBIAS1 CAPLESS Switch':1:1 - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'HPHL Volume':1:70 - 'HPHR Volume':1:70 - 'RX1 Digital Volume':1:65 - 'RX2 Digital Volume':1:65 - 'ANC Slot':1:0 - 'ANC1 FB MUX':0:EAR_HPH_L - 'ANC1 MUX':0:ADC4 - 'ANC2 MUX':0:ADC3 - 'ADC3 Volume':1:85 - 'ADC4 Volume':1:85 - 'AIF3_CAP Mixer SLIM TX3':1:1 - 'AIF3_CAP Mixer SLIM TX5':1:1 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - EndSequence - - DisableSequence - 'SLIM RX1 MUX':0:ZERO - 'SLIM RX6 MUX':0:ZERO - 'SLIM RX2 MUX':0:ZERO - 'SLIM RX7 MUX':0:ZERO - 'RX1 MIX1 INP1':0:ZERO - 'RX1 MIX1 INP2':0:ZERO - 'RX2 MIX1 INP1':0:ZERO - 'RX2 MIX1 INP2':0:ZERO - 'HPHL DAC Switch':1:0 - 'HPHR DAC Switch':1:0 - 'HPHL Volume':1:0 - 'HPHR Volume':1:0 - 'RX1 Digital Volume':1:0 - 'RX2 Digital Volume':1:0 - 'ANC1 MUX':0:ZERO - 'ANC2 MUX':0:ZERO - 'ADC3 Volume':1:0 - 'ADC4 Volume':1:0 - 'MICBIAS3 CAPLESS Switch':1:0 - 'MICBIAS1 CAPLESS Switch':1:0 - 'AIF3_CAP Mixer SLIM TX3':1:0 - 'AIF3_CAP Mixer SLIM TX5':1:0 - 'SLIM TX3 MUX':0:ZERO - 'SLIM TX5 MUX':0:ZERO - 'ANC Function':0:OFF - EndSequence - - ACDBID 26:1 - EffectsMixerCTL "SRS TruMedia" - EC_REF_RXMixerCTL "SLIM_RX" - -EndSection - -SectionModifier - Name "Play Music" - Comment "Modifier for music playback" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicHeadphones" - Comment "Modifier for music playback via headphone" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - 'SLIM_0_RX Channels':0:Two - 'RX1 MIX1 INP1':0:RX1 - 'RX1 MIX1 INP2':0:RX6 - 'RX2 MIX1 INP1':0:RX2 - 'RX2 MIX1 INP2':0:RX7 - 'HPHL DAC Switch':1:1 - 'HPHR DAC Switch':1:1 - 'RX1 Digital Volume':1:68 - 'RX2 Digital Volume':1:68 - 'HPHL Volume':1:50 - 'HPHR Volume':1:50 - 'SLIM TX3 MUX':0:RMIX1 - 'SLIM TX5 MUX':0:RMIX2 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicSpeaker FM Tx" - Comment "Modifier for music playback" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicFM Tx" - Comment "Modifier for music playback on FM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicHDMI" - Comment "Modifier for music playback on HDMI" - - EnableSequence - 'HDMI Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicHDMI Speaker" - Comment "Modifier for music playback on HDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicBT SCO Rx" - Comment "Modifier for music playback" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicBT SCO WB Rx" - Comment "Modifier for music playback" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicPROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicUSB PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play FM" - - EnableSequence - 'Internal FM RX Volume':1:0 - 'SLIMBUS_0_RX Port Mixer INTERNAL_FM_TX':1:1 - 'SLIMBUS_DL_HL Switch':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Port Mixer INTERNAL_FM_TX':1:0 - 'SLIMBUS_DL_HL Switch':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 6 - -EndSection - -SectionModifier - Name "Play FMPROXY Rx" - - EnableSequence - 'Internal FM RX Volume':1:0 - 'AFE_PCM_RX Port Mixer INTERNAL_FM_TX':1:1 - 'PCM_RX_DL_HL Switch':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Port Mixer INTERNAL_FM_TX':1:0 - 'PCM_RX_DL_HL Switch':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 6 - -EndSection - -SectionModifier - Name "Play FMUSB PROXY Rx" - - EnableSequence - 'Internal FM RX Volume':1:0 - 'AFE_PCM_RX Port Mixer INTERNAL_FM_TX':1:1 - 'PCM_RX_DL_HL Switch':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Port Mixer INTERNAL_FM_TX':1:0 - 'PCM_RX_DL_HL Switch':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 5 - CapturePCM 6 - -EndSection - -SectionModifier - Name "Play Music2" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Play Music2Speaker FM Tx" - Comment "Modifier for music playback" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Play Music2FM Tx" - Comment "Modifier for music playback on FM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Play Music2HDMI" - Comment "Modifier for music playback on HDMI" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Play Music2HDMI Speaker" - Comment "Modifier for music playback on HDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Play Music2HDMI SPDIF" - Comment "Modifier for music playback on HDMI SPDIF" - - EnableSequence - 'HDMI Mixer MultiMedia2':1:1 - 'SEC_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia2':1:0 - 'SEC_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Play Music2BT SCO Rx" - Comment "Modifier for music playback" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Play Music2BT SCO WB Rx" - Comment "Modifier for music playback" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Play Music2PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia2':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 1 - PlaybackPCM 1 - -EndSection - -SectionModifier - Name "Capture FM" - - EnableSequence - 'MultiMedia1 Mixer INTERNAL_FM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer INTERNAL_FM_TX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 0 - CapturePCM 0 - -EndSection - -SectionModifier - Name "Play LPA" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPASpeaker FM Tx" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - 'INTERNAL_FM_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - 'INTERNAL_FM_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAFM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAHDMI" - - EnableSequence - 'HDMI Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAHDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPABT SCO Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPABT SCO WB Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAPROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAUSB PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Capture Music" - - EnableSequence - 'MultiMedia1 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Capture MusicBT SCO Tx" - - EnableSequence - 'MultiMedia1 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Capture MusicBT SCO WB Tx" - - EnableSequence - 'MultiMedia1 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Capture Music Compressed" - - EnableSequence - 'MultiMedia4 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia4 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 9 - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Capture Music CompressedMI2S" - - EnableSequence - 'MultiMedia4 Mixer MI2S_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia4 Mixer MI2S_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 9 - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play Voice" - - EnableSequence - 'STUB_RX Mixer Voice Stub':1:1 - 'Voice Stub Tx Mixer STUB_TX_HL':1:1 - 'Voice Stub Tx Mixer STUB_1_TX_HL':1:1 - EndSequence - - DisableSequence - 'STUB_RX Mixer Voice Stub':1:0 - 'Voice Stub Tx Mixer STUB_TX_HL':1:0 - 'Voice Stub Tx Mixer STUB_1_TX_HL':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceHDMI" - - EnableSequence - EndSequence - - DisableSequence - 'Voice Stub Tx Mixer SLIM_3_TX':1:0 - 'HDMI_RX_Voice Mixer Voice Stub':1:0 - 'HDMI_RX Port Mixer SLIM_3_TX':1:0 - 'Voice Stub Tx Mixer STUB_TX_HL':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceHDMI Tx" - - EnableSequence - 'Voice Stub Tx Mixer SLIM_3_TX':1:1 - 'HDMI_RX_Voice Mixer Voice Stub':1:1 - 'HDMI_RX Port Mixer SLIM_3_TX':1:1 - 'Voice Stub Tx Mixer STUB_TX_HL':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceHDMI" - - EnableSequence - EndSequence - - DisableSequence - 'Voice Stub Tx Mixer SLIM_3_TX':1:0 - 'HDMI_RX_Voice Mixer Voice Stub':1:0 - 'HDMI_RX Port Mixer SLIM_3_TX':1:0 - 'Voice Stub Tx Mixer STUB_TX_HL':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceHDMI Tx" - - EnableSequence - 'Voice Stub Tx Mixer SLIM_3_TX':1:1 - 'HDMI_RX_Voice Mixer Voice Stub':1:1 - 'HDMI_RX Port Mixer SLIM_3_TX':1:1 - 'Voice Stub Tx Mixer STUB_TX_HL':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceBT SCO Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Internal BTSCO SampleRate':1:8000 - 'Voice Stub Tx Mixer INTERNAL_BT_SCO_TX':1:0 - 'SLIMBUS_1_RX Mixer Voice Stub':1:0 - 'Voice Stub Tx Mixer SLIM_1_TX':1:0 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_1_RX Port Mixer INTERNAL_BT_SCO_TX':1:0 - 'INTERNAL_BT_SCO_RX Port Mixer SLIM_1_TX':1:0 - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_3_RX Port Mixer INTERNAL_BT_SCO_RX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceBT SCO Tx" - - EnableSequence - 'Internal BTSCO SampleRate':1:8000 - 'Voice Stub Tx Mixer INTERNAL_BT_SCO_TX':1:1 - 'SLIMBUS_1_RX Mixer Voice Stub':1:1 - 'Voice Stub Tx Mixer SLIM_1_TX':1:1 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_1_RX Port Mixer INTERNAL_BT_SCO_TX':1:1 - 'INTERNAL_BT_SCO_RX Port Mixer SLIM_1_TX':1:1 - 'SLIM_3_RX Channels':0:One - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_3_RX Port Mixer INTERNAL_BT_SCO_RX':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceBT SCO WB Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Internal BTSCO SampleRate':1:8000 - 'Voice Stub Tx Mixer INTERNAL_BT_SCO_TX':1:0 - 'SLIMBUS_1_RX Mixer Voice Stub':1:0 - 'Voice Stub Tx Mixer SLIM_1_TX':1:0 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_1_RX Port Mixer INTERNAL_BT_SCO_TX':1:0 - 'INTERNAL_BT_SCO_RX Port Mixer SLIM_1_TX':1:0 - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_3_RX Port Mixer INTERNAL_BT_SCO_RX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceBT SCO WB Tx" - - EnableSequence - 'Internal BTSCO SampleRate':1:16000 - 'Voice Stub Tx Mixer INTERNAL_BT_SCO_TX':1:1 - 'SLIMBUS_1_RX Mixer Voice Stub':1:1 - 'Voice Stub Tx Mixer SLIM_1_TX':1:1 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_1_RX Port Mixer INTERNAL_BT_SCO_TX':1:1 - 'INTERNAL_BT_SCO_RX Port Mixer SLIM_1_TX':1:1 - 'SLIM_3_RX Channels':0:One - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_3_RX Port Mixer INTERNAL_BT_SCO_RX':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceUSB PROXY Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Voice Stub Tx Mixer AFE_PCM_TX':1:0 - 'SLIMBUS_1_RX Mixer Voice Stub':1:0 - 'Voice Stub Tx Mixer SLIM_1_TX':1:0 - 'AFE_PCM_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_1_RX Port Mixer AFE_PCM_TX':1:0 - 'AFE_PCM_RX Port Mixer SLIM_1_TX':1:0 - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:0 - 'SLIMBUS_3_RX Port Mixer AFE_PCM_RX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Play VoiceUSB PROXY Tx" - - EnableSequence - 'Voice Stub Tx Mixer AFE_PCM_TX':1:1 - 'SLIMBUS_1_RX Mixer Voice Stub':1:1 - 'Voice Stub Tx Mixer SLIM_1_TX':1:1 - 'AFE_PCM_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_1_RX Port Mixer AFE_PCM_TX':1:1 - 'AFE_PCM_RX Port Mixer SLIM_1_TX':1:1 - 'SLIMBUS_3_RX_Voice Mixer Voice Stub':1:1 - 'SLIMBUS_3_RX Port Mixer AFE_PCM_RX':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 12 - CapturePCM 12 - -EndSection - -SectionModifier - Name "Capture Voice" - - EnableSequence - 'MultiMedia1 Mixer SLIM_4_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer SLIM_4_TX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 0 - CapturePCM 0 - -EndSection - -SectionModifier - Name "Capture A2DP FM" - - EnableSequence - 'MultiMedia2 Mixer INTERNAL_FM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia2 Mixer INTERNAL_FM_TX':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 1 - CapturePCM 1 - -EndSection - -SectionModifier - Name "Play VOIP" - - EnableSequence - 'SLIM_0_RX_Voice Mixer Voip':1:1 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:1 - EndSequence - - DisableSequence - 'SLIM_0_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionModifier - Name "Play VOIPBT SCO Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Internal BTSCO SampleRate':1:8000 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionModifier - Name "Play VOIPBT SCO Tx" - - EnableSequence - 'Internal BTSCO SampleRate':1:8000 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voip':1:1 - 'Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionModifier - Name "Play VOIPBT SCO WB Rx" - - EnableSequence - EndSequence - - DisableSequence - 'Internal BTSCO SampleRate':1:8000 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionModifier - Name "Play VOIPBT SCO WB Tx" - - EnableSequence - 'Internal BTSCO SampleRate':1:16000 - 'INTERNAL_BT_SCO_RX_Voice Mixer Voip':1:1 - 'Voip_Tx Mixer INTERNAL_BT_SCO_TX_Voip':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionModifier - Name "Play VOIPHDMI" - - EnableSequence - EndSequence - - DisableSequence - 'HDMI_RX_Voice Mixer Voip':1:0 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionModifier - Name "Play VOIPHDMI Tx" - - EnableSequence - 'HDMI_RX_Voice Mixer Voip':1:1 - 'Voip_Tx Mixer SLIM_0_TX_Voip':1:1 - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - PlaybackPCM 3 - CapturePCM 3 - -EndSection - -SectionModifier - Name "Capture MusicPROXY Tx" - - EnableSequence - 'MultiMedia1 Mixer AFE_PCM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer AFE_PCM_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Capture MusicUSB PROXY Tx" - - EnableSequence - 'MultiMedia1 Mixer AFE_PCM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer AFE_PCM_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicPROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicUSB PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play LPAPROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play LPAUSB PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play FMPROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play FMUSB PROXY Tx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Capture MusicPROXY Rx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Capture MusicUSB PROXY Rx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Capture MusicSSR QMIC" - - EnableSequence - 'MultiMedia1 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia1 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play Tunnel" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelSpeaker FM Tx" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - 'INTERNAL_FM_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - 'INTERNAL_FM_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelFM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelHDMI" - - EnableSequence - 'HDMI Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelHDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelBT SCO Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelBT SCO WB Rx" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelPROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelUSB PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play Lowlatency Music" - Comment "Modifier for Lowlatency music playback" - - EnableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play Lowlatency MusicSpeaker FM Tx" - Comment "Modifier for Lowlatency music playback" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play Lowlatency MusicFM Tx" - Comment "Modifier for Lowlatency music playback on FM Tx" - - EnableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'INTERNAL_FM_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play Lowlatency MusicHDMI" - Comment "Modifier for music playback on HDMI" - - EnableSequence - 'HDMI Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play Lowlatency MusicHDMI Speaker" - Comment "Modifier for music playback on HDMI Speaker" - - EnableSequence - 'HDMI Mixer MultiMedia5':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia5':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 -EndSection - -SectionModifier - Name "Play Lowlatency MusicHDMI SPDIF" - Comment "Modifier for music playback on HDMI SPDIF" - - EnableSequence - 'HDMI Mixer MultiMedia5':1:1 - 'SEC_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'HDMI Mixer MultiMedia5':1:0 - 'SEC_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play Lowlatency MusicBT SCO Rx" - Comment "Modifier for music playback" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play Lowlatency MusicBT SCO WB Rx" - Comment "Modifier for music playback" - - EnableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'INTERNAL_BT_SCO_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play Lowlatency MusicPROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play Lowlatency MusicUSB PROXY Rx" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia5':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency Music" - - EnableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency MusicBT SCO Tx" - - EnableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency MusicBT SCO WB Tx" - - EnableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency Music" - - EnableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency MusicBT SCO WB Tx" - - EnableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer INTERNAL_BT_SCO_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency MusicPROXY Rx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency MusicUSB PROXY Rx" - - EnableSequence - EndSequence - - DisableSequence - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency MusicPROXY Tx" - - EnableSequence - 'MultiMedia5 Mixer AFE_PCM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer AFE_PCM_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency MusicUSB PROXY Tx" - - EnableSequence - 'MultiMedia5 Mixer AFE_PCM_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer AFE_PCM_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Capture Lowlatency MusicSSR QMIC" - - EnableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:1 - EndSequence - - DisableSequence - 'MultiMedia5 Mixer SLIM_0_TX':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 14 - PlaybackPCM 14 - -EndSection - -SectionModifier - Name "Play MusicPROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicUSB PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicPROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicPROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicPROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicPROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play MusicPROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia1':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia1':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 0 - -EndSection - -SectionModifier - Name "Play LPAPROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAUSB PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAPROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAPROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAPROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAPROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionModifier - Name "Play LPAPROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia3':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia3':1:0 - EndSequence - - # ALSA PCMs - CapturePCM 0 - PlaybackPCM 4 - -EndSection - -SectionModifier - - Name "Play TunnelPROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - - Name "Play TunnelUSB PROXY Rx Speaker" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelPROXY Rx Earpiece" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play Tunnel TunnelPROXY Rx Headphones" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelPROXY Rx ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelPROXY Rx Speaker Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection - -SectionModifier - Name "Play TunnelPROXY Rx Speaker ANC Headset" - - EnableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:1 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:1 - EndSequence - - DisableSequence - 'AFE_PCM_RX Audio Mixer MultiMedia4':1:0 - 'SLIMBUS_0_RX Audio Mixer MultiMedia4':1:0 - EndSequence - - # ALSA PCMs - PlaybackPCM 9 - -EndSection -# End of master file diff --git a/charger/Android.mk b/charger/Android.mk deleted file mode 100644 index bd88bf6..0000000 --- a/charger/Android.mk +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2011 The Android Open Source Project - -ifneq ($(BUILD_TINY_ANDROID),true) - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - charger.c - -LOCAL_CFLAGS += -DCHARGER_ENABLE_SUSPEND - -LOCAL_MODULE := charger_n1 -LOCAL_MODULE_TAGS := optional -LOCAL_FORCE_STATIC_EXECUTABLE := true -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN) -LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED) - -LOCAL_C_INCLUDES := bootable/recovery - -LOCAL_STATIC_LIBRARIES := libminui libpixelflinger_static libpng -LOCAL_STATIC_LIBRARIES += libsuspend -LOCAL_STATIC_LIBRARIES += libz libstdc++ libcutils liblog libm libc - -include $(BUILD_EXECUTABLE) - -define _add-n1-charger-image -include $$(CLEAR_VARS) -LOCAL_MODULE := device_oppo_n1_charger_$(notdir $(1)) -LOCAL_MODULE_STEM := $(notdir $(1)) -_img_modules += $$(LOCAL_MODULE) -LOCAL_SRC_FILES := $1 -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $$(TARGET_ROOT_OUT)/res/images/charger -include $$(BUILD_PREBUILT) -endef - -_img_modules := -_images := -$(foreach _img, $(call find-subdir-subdir-files, "images", "*.png"), \ - $(eval $(call _add-n1-charger-image,$(_img)))) - -include $(CLEAR_VARS) -LOCAL_MODULE := charger_res_images_n1 -LOCAL_MODULE_TAGS := optional -LOCAL_REQUIRED_MODULES := $(_img_modules) -include $(BUILD_PHONY_PACKAGE) - -_add-charger-image := -_img_modules := - -endif diff --git a/charger/charger.c b/charger/charger.c deleted file mode 100644 index c75cb43..0000000 --- a/charger/charger.c +++ /dev/null @@ -1,1391 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -//#define DEBUG_UEVENTS -#define CHARGER_KLOG_LEVEL 6 - -#include <dirent.h> -#include <errno.h> -#include <fcntl.h> -#include <linux/input.h> -#include <stdbool.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/poll.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <sys/un.h> -#include <time.h> -#include <unistd.h> - -#include <sys/socket.h> -#include <linux/netlink.h> - -#include <cutils/android_reboot.h> -#include <cutils/klog.h> -#include <cutils/list.h> -#include <cutils/misc.h> -#include <cutils/uevent.h> - -#ifdef CHARGER_ENABLE_SUSPEND -#include <suspend/autosuspend.h> -#endif - -#include "minui/minui.h" - -#include <pthread.h> -#include <linux/android_alarm.h> -#include <linux/rtc.h> - -#ifndef max -#define max(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#ifndef min -#define min(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) - -#define MSEC_PER_SEC (1000LL) -#define NSEC_PER_MSEC (1000000LL) - -#define BATTERY_UNKNOWN_TIME (2 * MSEC_PER_SEC) -#define POWER_ON_KEY_TIME (2 * MSEC_PER_SEC) -#define UNPLUGGED_SHUTDOWN_TIME (2 * MSEC_PER_SEC) - -#define BATTERY_FULL_THRESH 95 - -#define BACKLIGHT_TOGGLE_PATH "/sys/class/leds/lcd-backlight/brightness" - -#define LAST_KMSG_PATH "/proc/last_kmsg" -#define LAST_KMSG_MAX_SZ (32 * 1024) - -#if 1 -#define LOGE(x...) do { KLOG_ERROR("charger", x); } while (0) -#define LOGI(x...) do { KLOG_INFO("charger", x); } while (0) -#define LOGV(x...) do { KLOG_DEBUG("charger", x); } while (0) -#else -#define LOG_NDEBUG 0 -#define LOG_TAG "charger" -#include <cutils/log.h> -#endif - -#define SYS_POWER_STATE "/sys/power/state" - -struct key_state { - bool pending; - bool down; - int64_t timestamp; -}; - -struct power_supply { - struct listnode list; - char name[256]; - char type[32]; - bool online; - bool valid; - char cap_path[PATH_MAX]; -}; - -struct frame { - const char *name; - int disp_time; - int min_capacity; - bool level_only; - - gr_surface surface; -}; - -struct animation { - bool run; - - struct frame *frames; - int cur_frame; - int num_frames; - - int cur_cycle; - int num_cycles; - - /* current capacity being animated */ - int capacity; -}; - -struct charger { - int64_t next_screen_transition; - int64_t next_key_check; - int64_t next_pwr_check; - - struct key_state keys[KEY_MAX + 1]; - int uevent_fd; - - struct listnode supplies; - int num_supplies; - int num_supplies_online; - - struct animation *batt_anim; - gr_surface surf_unknown; - - struct power_supply *battery; -}; - -struct uevent { - const char *action; - const char *path; - const char *subsystem; - const char *ps_name; - const char *ps_type; - const char *ps_online; -}; - -static struct frame batt_anim_frames[] = { - { - .name = "charger/battery_00", - .disp_time = 250, - .min_capacity = 0, - }, - { - .name = "charger/battery_01", - .disp_time = 250, - .min_capacity = 1, - }, - { - .name = "charger/battery_02", - .disp_time = 250, - .min_capacity = 4, - }, - { - .name = "charger/battery_03", - .disp_time = 250, - .min_capacity = 8, - }, - { - .name = "charger/battery_04", - .disp_time = 250, - .min_capacity = 12, - }, - { - .name = "charger/battery_05", - .disp_time = 250, - .min_capacity = 16, - }, - { - .name = "charger/battery_06", - .disp_time = 250, - .min_capacity = 20, - }, - { - .name = "charger/battery_07", - .disp_time = 250, - .min_capacity = 24, - }, - { - .name = "charger/battery_08", - .disp_time = 250, - .min_capacity = 28, - }, - { - .name = "charger/battery_09", - .disp_time = 250, - .min_capacity = 32, - }, - { - .name = "charger/battery_10", - .disp_time = 250, - .min_capacity = 36, - }, - { - .name = "charger/battery_11", - .disp_time = 250, - .min_capacity = 40, - }, - { - .name = "charger/battery_12", - .disp_time = 250, - .min_capacity = 44, - }, - { - .name = "charger/battery_13", - .disp_time = 250, - .min_capacity = 48, - }, - { - .name = "charger/battery_13", - .disp_time = 250, - .min_capacity = 52, - }, - { - .name = "charger/battery_14", - .disp_time = 250, - .min_capacity = 56, - }, - { - .name = "charger/battery_15", - .disp_time = 250, - .min_capacity = 60, - }, - { - .name = "charger/battery_16", - .disp_time = 250, - .min_capacity = 64, - }, - { - .name = "charger/battery_17", - .disp_time = 250, - .min_capacity = 68, - }, - { - .name = "charger/battery_18", - .disp_time = 250, - .min_capacity = 72, - }, - { - .name = "charger/battery_19", - .disp_time = 250, - .min_capacity = 76, - }, - { - .name = "charger/battery_20", - .disp_time = 250, - .min_capacity = 80, - }, - { - .name = "charger/battery_21", - .disp_time = 250, - .min_capacity = 84, - }, - { - .name = "charger/battery_22", - .disp_time = 250, - .min_capacity = 88, - }, - { - .name = "charger/battery_23", - .disp_time = 250, - .min_capacity = 92, - }, - { - .name = "charger/battery_24", - .disp_time = 250, - .min_capacity = 96, - }, - { - .name = "charger/battery_25", - .disp_time = 250, - .min_capacity = 99, - }, -}; - -static struct animation battery_animation = { - .frames = batt_anim_frames, - .num_frames = ARRAY_SIZE(batt_anim_frames), - .num_cycles = 5, -}; - -static struct charger charger_state = { - .batt_anim = &battery_animation, -}; - -static int char_width; -static int char_height; - -/*On certain targets the FBIOBLANK ioctl does not turn off the - * backlight. In those cases we need to manually toggle it on/off - */ -static int set_backlight(int toggle) -{ - int fd; - char buffer[10]; - - memset(buffer, '\0', sizeof(buffer)); - fd = open(BACKLIGHT_TOGGLE_PATH, O_RDWR); - if (fd < 0) { - LOGE("Could not open backlight node : %s", strerror(errno)); - goto cleanup; - } - if (toggle) { - LOGI("Enabling backlight"); - snprintf(buffer, sizeof(int), "%d\n", 100); - } else { - LOGI("Disabling backlight"); - snprintf(buffer, sizeof(int), "%d\n", 0); - } - if (write(fd, buffer,strlen(buffer)) < 0) { - LOGE("Could not write to backlight node : %s", strerror(errno)); - goto cleanup; - } -cleanup: - if (fd >= 0) - close(fd); - return 0; -} -/* current time in milliseconds */ -static int64_t curr_time_ms(void) -{ - struct timespec tm; - clock_gettime(CLOCK_MONOTONIC, &tm); - return tm.tv_sec * MSEC_PER_SEC + (tm.tv_nsec / NSEC_PER_MSEC); -} - -static void clear_screen(void) -{ - gr_color(0, 0, 0, 255); - gr_fill(0, 0, gr_fb_width(), gr_fb_height()); -}; - -#define MAX_KLOG_WRITE_BUF_SZ 256 - -static void dump_last_kmsg(void) -{ - char *buf; - char *ptr; - unsigned sz = 0; - int len; - - LOGI("\n"); - LOGI("*************** LAST KMSG ***************\n"); - LOGI("\n"); - buf = load_file(LAST_KMSG_PATH, &sz); - if (!buf || !sz) { - LOGI("last_kmsg not found. Cold reset?\n"); - goto out; - } - - len = min(sz, LAST_KMSG_MAX_SZ); - ptr = buf + (sz - len); - - while (len > 0) { - int cnt = min(len, MAX_KLOG_WRITE_BUF_SZ); - char yoink; - char *nl; - - nl = memrchr(ptr, '\n', cnt - 1); - if (nl) - cnt = nl - ptr + 1; - - yoink = ptr[cnt]; - ptr[cnt] = '\0'; - klog_write(6, "<6>%s", ptr); - ptr[cnt] = yoink; - - len -= cnt; - ptr += cnt; - } - - free(buf); - -out: - LOGI("\n"); - LOGI("************* END LAST KMSG *************\n"); - LOGI("\n"); -} - -static int read_file(const char *path, char *buf, size_t sz) -{ - int fd; - size_t cnt; - - fd = open(path, O_RDONLY, 0); - if (fd < 0) - goto err; - - cnt = read(fd, buf, sz - 1); - if (cnt <= 0) - goto err; - buf[cnt] = '\0'; - if (buf[cnt - 1] == '\n') { - cnt--; - buf[cnt] = '\0'; - } - - close(fd); - return cnt; - -err: - if (fd >= 0) - close(fd); - return -1; -} - -static int read_file_int(const char *path, int *val) -{ - char buf[32]; - int ret; - int tmp; - char *end; - - ret = read_file(path, buf, sizeof(buf)); - if (ret < 0) - return -1; - - tmp = strtol(buf, &end, 0); - if (end == buf || - ((end < buf+sizeof(buf)) && (*end != '\n' && *end != '\0'))) - goto err; - - *val = tmp; - return 0; - -err: - return -1; -} - -static int write_file(const char *path, char *buf, size_t sz) -{ - int fd; - size_t cnt; - - fd = open(path, O_WRONLY, 0); - if (fd < 0) - goto err; - - cnt = write(fd, buf, sz); - if (cnt <= 0) - goto err; - - close(fd); - return cnt; - -err: - if (fd >= 0) - close(fd); - return -1; -} - -static int get_battery_capacity(struct charger *charger) -{ - int ret; - int batt_cap = -1; - - if (!charger->battery) - return -1; - - ret = read_file_int(charger->battery->cap_path, &batt_cap); - if (ret < 0 || batt_cap > 100) { - batt_cap = -1; - } - - return batt_cap; -} - -static struct power_supply *find_supply(struct charger *charger, - const char *name) -{ - struct listnode *node; - struct power_supply *supply; - - list_for_each(node, &charger->supplies) { - supply = node_to_item(node, struct power_supply, list); - if (!strncmp(name, supply->name, sizeof(supply->name))) - return supply; - } - return NULL; -} - -static struct power_supply *add_supply(struct charger *charger, - const char *name, const char *type, - const char *path, bool online) -{ - struct power_supply *supply; - - supply = calloc(1, sizeof(struct power_supply)); - if (!supply) - return NULL; - - strlcpy(supply->name, name, sizeof(supply->name)); - strlcpy(supply->type, type, sizeof(supply->type)); - snprintf(supply->cap_path, sizeof(supply->cap_path), - "/sys/%s/capacity", path); - supply->online = online; - list_add_tail(&charger->supplies, &supply->list); - charger->num_supplies++; - LOGV("... added %s %s %d\n", supply->name, supply->type, online); - return supply; -} - -static void remove_supply(struct charger *charger, struct power_supply *supply) -{ - if (!supply) - return; - list_remove(&supply->list); - charger->num_supplies--; - free(supply); -} - -#ifdef CHARGER_ENABLE_SUSPEND -static int request_suspend(bool enable) -{ - if (enable) - return autosuspend_enable(); - else - return autosuspend_disable(); -} -#else -static int request_suspend(bool enable) -{ - return 0; -} -#endif - -static void parse_uevent(const char *msg, struct uevent *uevent) -{ - uevent->action = ""; - uevent->path = ""; - uevent->subsystem = ""; - uevent->ps_name = ""; - uevent->ps_online = ""; - uevent->ps_type = ""; - - /* currently ignoring SEQNUM */ - while (*msg) { -#ifdef DEBUG_UEVENTS - LOGV("uevent str: %s\n", msg); -#endif - if (!strncmp(msg, "ACTION=", 7)) { - msg += 7; - uevent->action = msg; - } else if (!strncmp(msg, "DEVPATH=", 8)) { - msg += 8; - uevent->path = msg; - } else if (!strncmp(msg, "SUBSYSTEM=", 10)) { - msg += 10; - uevent->subsystem = msg; - } else if (!strncmp(msg, "POWER_SUPPLY_NAME=", 18)) { - msg += 18; - uevent->ps_name = msg; - } else if (!strncmp(msg, "POWER_SUPPLY_ONLINE=", 20)) { - msg += 20; - uevent->ps_online = msg; - } else if (!strncmp(msg, "POWER_SUPPLY_TYPE=", 18)) { - msg += 18; - uevent->ps_type = msg; - } - - /* advance to after the next \0 */ - while (*msg++) - ; - } - - LOGV("event { '%s', '%s', '%s', '%s', '%s', '%s' }\n", - uevent->action, uevent->path, uevent->subsystem, - uevent->ps_name, uevent->ps_type, uevent->ps_online); -} - -static void process_ps_uevent(struct charger *charger, struct uevent *uevent) -{ - int online; - char ps_type[32]; - struct power_supply *supply = NULL; - int i; - bool was_online = false; - bool battery = false; - - if (uevent->ps_type[0] == '\0') { - char *path; - int ret; - - if (uevent->path[0] == '\0') - return; - ret = asprintf(&path, "/sys/%s/type", uevent->path); - if (ret <= 0) - return; - ret = read_file(path, ps_type, sizeof(ps_type)); - free(path); - if (ret < 0) - return; - } else { - strlcpy(ps_type, uevent->ps_type, sizeof(ps_type)); - } - - if (!strncmp(ps_type, "Battery", 7)) - battery = true; - - online = atoi(uevent->ps_online); - supply = find_supply(charger, uevent->ps_name); - if (supply) { - was_online = supply->online; - supply->online = online; - } - - if (!strcmp(uevent->action, "add")) { - if (!supply) { - supply = add_supply(charger, uevent->ps_name, ps_type, uevent->path, - online); - if (!supply) { - LOGE("cannot add supply '%s' (%s %d)\n", uevent->ps_name, - uevent->ps_type, online); - return; - } - /* only pick up the first battery for now */ - if (battery && !charger->battery) - charger->battery = supply; - } else { - LOGE("supply '%s' already exists..\n", uevent->ps_name); - } - } else if (!strcmp(uevent->action, "remove")) { - if (supply) { - if (charger->battery == supply) - charger->battery = NULL; - remove_supply(charger, supply); - supply = NULL; - } - } else if (!strcmp(uevent->action, "change")) { - if (!supply) { - LOGE("power supply '%s' not found ('%s' %d)\n", - uevent->ps_name, ps_type, online); - } - } else { - return; - } - - /* allow battery to be managed in the supply list but make it not - * contribute to online power supplies. */ - if (!battery) { - if (was_online && !online) - charger->num_supplies_online--; - else if (supply && !was_online && online) - charger->num_supplies_online++; - } - LOGI("power supply %s (%s) %s (action=%s num_online=%d num_supplies=%d)\n", - uevent->ps_name, ps_type, battery ? "" : online ? "online" : "offline", - uevent->action, charger->num_supplies_online, charger->num_supplies); -} - -static void process_uevent(struct charger *charger, struct uevent *uevent) -{ - if (!strcmp(uevent->subsystem, "power_supply")) - process_ps_uevent(charger, uevent); -} - -#define UEVENT_MSG_LEN 1024 -static int handle_uevent_fd(struct charger *charger, int fd) -{ - char msg[UEVENT_MSG_LEN+2]; - int n; - - if (fd < 0) - return -1; - - while (true) { - struct uevent uevent; - - n = uevent_kernel_multicast_recv(fd, msg, UEVENT_MSG_LEN); - if (n <= 0) - break; - if (n >= UEVENT_MSG_LEN) /* overflow -- discard */ - continue; - - msg[n] = '\0'; - msg[n+1] = '\0'; - - parse_uevent(msg, &uevent); - process_uevent(charger, &uevent); - } - - return 0; -} - -static int uevent_callback(int fd, short revents, void *data) -{ - struct charger *charger = data; - - if (!(revents & POLLIN)) - return -1; - return handle_uevent_fd(charger, fd); -} - -/* force the kernel to regenerate the change events for the existing - * devices, if valid */ -static void do_coldboot(struct charger *charger, DIR *d, const char *event, - bool follow_links, int max_depth) -{ - struct dirent *de; - int dfd, fd; - - dfd = dirfd(d); - - fd = openat(dfd, "uevent", O_WRONLY); - if (fd >= 0) { - write(fd, event, strlen(event)); - close(fd); - handle_uevent_fd(charger, charger->uevent_fd); - } - - while ((de = readdir(d)) && max_depth > 0) { - DIR *d2; - - LOGV("looking at '%s'\n", de->d_name); - - if ((de->d_type != DT_DIR && !(de->d_type == DT_LNK && follow_links)) || - de->d_name[0] == '.') { - LOGV("skipping '%s' type %d (depth=%d follow=%d)\n", - de->d_name, de->d_type, max_depth, follow_links); - continue; - } - LOGV("can descend into '%s'\n", de->d_name); - - fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY); - if (fd < 0) { - LOGE("cannot openat %d '%s' (%d: %s)\n", dfd, de->d_name, - errno, strerror(errno)); - continue; - } - - d2 = fdopendir(fd); - if (d2 == 0) - close(fd); - else { - LOGV("opened '%s'\n", de->d_name); - do_coldboot(charger, d2, event, follow_links, max_depth - 1); - closedir(d2); - } - } -} - -static void coldboot(struct charger *charger, const char *path, - const char *event) -{ - char str[256]; - - LOGV("doing coldboot '%s' in '%s'\n", event, path); - DIR *d = opendir(path); - if (d) { - snprintf(str, sizeof(str), "%s\n", event); - do_coldboot(charger, d, str, true, 1); - closedir(d); - } -} - -static int draw_text(const char *str, int x, int y) -{ - int str_len_px = gr_measure(str); - - if (x < 0) - x = (gr_fb_width() - str_len_px) / 2; - if (y < 0) - y = (gr_fb_height() - char_height) / 2; - gr_text(x, y, str, 0); - - return y + char_height; -} - -static void android_green(void) -{ - gr_color(0xa4, 0xc6, 0x39, 255); -} - -static void draw_capacity(struct charger *charger) -{ - char cap_str[64]; - int x, y; - int str_len_px; - - snprintf(cap_str, sizeof(cap_str), "%d%%", charger->batt_anim->capacity); - str_len_px = gr_measure(cap_str); - x = (gr_fb_width() - str_len_px) / 2; - y = (gr_fb_height() + char_height) / 2; - android_green(); - gr_text(x, y, cap_str, 0); -} - -/* returns the last y-offset of where the surface ends */ -static int draw_surface_centered(struct charger *charger, gr_surface surface) -{ - int w; - int h; - int x; - int y; - - w = gr_get_width(surface); - h = gr_get_height(surface); - x = (gr_fb_width() - w) / 2 ; - y = (gr_fb_height() - h) / 2 ; - - LOGV("drawing surface %dx%d+%d+%d\n", w, h, x, y); - gr_blit(surface, 0, 0, w, h, x, y); - return y + h; -} - -static void draw_unknown(struct charger *charger) -{ - int y; - if (charger->surf_unknown) { - draw_surface_centered(charger, charger->surf_unknown); - } else { - android_green(); - y = draw_text("Charging!", -1, -1); - draw_text("?\?/100", -1, y + 25); - } -} - -static void draw_battery(struct charger *charger) -{ - struct animation *batt_anim = charger->batt_anim; - struct frame *frame = &batt_anim->frames[batt_anim->cur_frame]; - - if (batt_anim->num_frames != 0) { - draw_surface_centered(charger, frame->surface); - LOGV("drawing frame #%d name=%s min_cap=%d time=%d\n", - batt_anim->cur_frame, frame->name, frame->min_capacity, - frame->disp_time); - } -} - -static void redraw_screen(struct charger *charger) -{ - struct animation *batt_anim = charger->batt_anim; - - clear_screen(); - - /* try to display *something* */ - if (batt_anim->capacity < 0 || batt_anim->num_frames == 0) - draw_unknown(charger); - else { - draw_battery(charger); - draw_capacity(charger); - } - gr_flip(); -} - -static void kick_animation(struct animation *anim) -{ - anim->run = true; -} - -static void reset_animation(struct animation *anim) -{ - anim->cur_cycle = 0; - anim->cur_frame = 0; - anim->run = false; -} - -static void update_screen_state(struct charger *charger, int64_t now) -{ - struct animation *batt_anim = charger->batt_anim; - int cur_frame; - int disp_time; - - if (!batt_anim->run || now < charger->next_screen_transition) - return; - - /* animation is over, blank screen and leave */ - if (batt_anim->cur_cycle == batt_anim->num_cycles) { - reset_animation(batt_anim); - charger->next_screen_transition = -1; - set_backlight(false); - gr_fb_blank(true); - - LOGV("[%lld] animation done\n", now); - if (charger->num_supplies_online > 0) - request_suspend(true); - return; - } - - disp_time = batt_anim->frames[batt_anim->cur_frame].disp_time; - - /* animation starting, set up the animation */ - if (batt_anim->cur_frame == 0) { - int batt_cap; - int ret; - - LOGV("[%lld] animation starting\n", now); - batt_cap = get_battery_capacity(charger); - if (batt_cap >= 0 && batt_anim->num_frames != 0) { - int i; - - /* find first frame given current capacity */ - for (i = 1; i < batt_anim->num_frames; i++) { - if (batt_cap < batt_anim->frames[i].min_capacity) - break; - } - batt_anim->cur_frame = i - 1; - - /* show the first frame for twice as long */ - disp_time = batt_anim->frames[batt_anim->cur_frame].disp_time * 2; - } - - batt_anim->capacity = batt_cap; - } - - /* unblank the screen on first cycle */ - if (batt_anim->cur_cycle == 0) { - gr_fb_blank(false); - set_backlight(true); - } - - - /* draw the new frame (@ cur_frame) */ - redraw_screen(charger); - - /* if we don't have anim frames, we only have one image, so just bump - * the cycle counter and exit - */ - if (batt_anim->num_frames == 0 || batt_anim->capacity < 0) { - LOGV("[%lld] animation missing or unknown battery status\n", now); - charger->next_screen_transition = now + BATTERY_UNKNOWN_TIME; - batt_anim->cur_cycle++; - return; - } - - /* schedule next screen transition */ - charger->next_screen_transition = now + disp_time; - - /* advance frame cntr to the next valid frame - * if necessary, advance cycle cntr, and reset frame cntr - */ - batt_anim->cur_frame++; - - /* if the frame is used for level-only, that is only show it when it's - * the current level, skip it during the animation. - */ - while (batt_anim->cur_frame < batt_anim->num_frames && - batt_anim->frames[batt_anim->cur_frame].level_only) - batt_anim->cur_frame++; - if (batt_anim->cur_frame >= batt_anim->num_frames) { - batt_anim->cur_cycle++; - batt_anim->cur_frame = 0; - - /* don't reset the cycle counter, since we use that as a signal - * in a test above to check if animation is over - */ - } -} - -static int set_key_callback(int code, int value, void *data) -{ - struct charger *charger = data; - int64_t now = curr_time_ms(); - int down = !!value; - - if (code > KEY_MAX) - return -1; - - /* ignore events that don't modify our state */ - if (charger->keys[code].down == down) - return 0; - - /* only record the down even timestamp, as the amount - * of time the key spent not being pressed is not useful */ - if (down) - charger->keys[code].timestamp = now; - charger->keys[code].down = down; - charger->keys[code].pending = true; - if (down) { - LOGV("[%lld] key[%d] down\n", now, code); - } else { - int64_t duration = now - charger->keys[code].timestamp; - int64_t secs = duration / 1000; - int64_t msecs = duration - secs * 1000; - LOGV("[%lld] key[%d] up (was down for %lld.%lldsec)\n", now, - code, secs, msecs); - } - - return 0; -} - -static void update_input_state(struct charger *charger, - struct input_event *ev) -{ - if (ev->type != EV_KEY) - return; - set_key_callback(ev->code, ev->value, charger); -} - -static void set_next_key_check(struct charger *charger, - struct key_state *key, - int64_t timeout) -{ - int64_t then = key->timestamp + timeout; - - if (charger->next_key_check == -1 || then < charger->next_key_check) - charger->next_key_check = then; -} - -static void process_key(struct charger *charger, int code, int64_t now) -{ - struct animation *batt_anim = charger->batt_anim; - struct key_state *key = &charger->keys[code]; - int64_t next_key_check; - - if (code == KEY_POWER) { - if (key->down) { - int64_t reboot_timeout = key->timestamp + POWER_ON_KEY_TIME; - if (now >= reboot_timeout) { - LOGI("[%lld] rebooting\n", now); - android_reboot(ANDROID_RB_RESTART, 0, 0); - } else { - /* if the key is pressed but timeout hasn't expired, - * make sure we wake up at the right-ish time to check - */ - set_next_key_check(charger, key, POWER_ON_KEY_TIME); - } - } else { - /* if the power key got released, force screen state cycle */ - if (key->pending) { - if (!batt_anim->run) { - request_suspend(false); - kick_animation(charger->batt_anim); - } else { - reset_animation(batt_anim); - charger->next_screen_transition = -1; - gr_fb_blank(true); - set_backlight(false); - if (charger->num_supplies_online > 0) - request_suspend(true); - } - } - } - } else { - if (key->pending) { - request_suspend(false); - kick_animation(charger->batt_anim); - } - } - - key->pending = false; -} - -static void handle_input_state(struct charger *charger, int64_t now) -{ - process_key(charger, KEY_POWER, now); - process_key(charger, KEY_HOME, now); - process_key(charger, KEY_HOMEPAGE, now); - - if (charger->next_key_check != -1 && now > charger->next_key_check) - charger->next_key_check = -1; -} - -static void handle_power_supply_state(struct charger *charger, int64_t now) -{ - if (charger->num_supplies_online == 0) { - request_suspend(false); - if (charger->next_pwr_check == -1) { - charger->next_pwr_check = now + UNPLUGGED_SHUTDOWN_TIME; - LOGI("[%lld] device unplugged: shutting down in %lld (@ %lld)\n", - now, UNPLUGGED_SHUTDOWN_TIME, charger->next_pwr_check); - } else if (now >= charger->next_pwr_check) { - LOGI("[%lld] shutting down\n", now); - android_reboot(ANDROID_RB_POWEROFF, 0, 0); - } else { - /* otherwise we already have a shutdown timer scheduled */ - } - } else { - /* online supply present, reset shutdown timer if set */ - if (charger->next_pwr_check != -1) { - LOGI("[%lld] device plugged in: shutdown cancelled\n", now); - kick_animation(charger->batt_anim); - } - charger->next_pwr_check = -1; - } -} - -static void wait_next_event(struct charger *charger, int64_t now) -{ - int64_t next_event = INT64_MAX; - int64_t timeout; - struct input_event ev; - int ret; - - LOGV("[%lld] next screen: %lld next key: %lld next pwr: %lld\n", now, - charger->next_screen_transition, charger->next_key_check, - charger->next_pwr_check); - - if (charger->next_screen_transition != -1) - next_event = charger->next_screen_transition; - if (charger->next_key_check != -1 && charger->next_key_check < next_event) - next_event = charger->next_key_check; - if (charger->next_pwr_check != -1 && charger->next_pwr_check < next_event) - next_event = charger->next_pwr_check; - - if (next_event != -1 && next_event != INT64_MAX) - timeout = max(0, next_event - now); - else - timeout = -1; - LOGV("[%lld] blocking (%lld)\n", now, timeout); - ret = ev_wait((int)timeout); - if (!ret) - ev_dispatch(); -} - -static int input_callback(int fd, short revents, void *data) -{ - struct charger *charger = data; - struct input_event ev; - int ret; - - ret = ev_get_input(fd, revents, &ev); - if (ret) - return -1; - update_input_state(charger, &ev); - return 0; -} - -static void event_loop(struct charger *charger) -{ - int ret; - - while (true) { - int64_t now = curr_time_ms(); - - LOGV("[%lld] event_loop()\n", now); - handle_input_state(charger, now); - handle_power_supply_state(charger, now); - - /* do screen update last in case any of the above want to start - * screen transitions (animations, etc) - */ - update_screen_state(charger, now); - - wait_next_event(charger, now); - } -} - -static int alarm_open_alm_dev() -{ - int fd; - - fd = open("/dev/alarm", O_RDWR); - if(fd < 0 ) - LOGE("Can't open alarm devfs node\n"); - - return fd; -} - -static void alarm_close_alm_dev(int fd) -{ - close(fd); -} - -static int alarm_open_rtc_dev() -{ - int fd; - - fd = open("/dev/rtc0", O_RDWR); - if (fd < 0 ) - LOGE("Can't open rtc devfs node\n"); - - return fd; -} - -static void alarm_close_rtc_dev(int fd) -{ - close(fd); -} - -static int alarm_set_reboot_time(int fd, int type, time_t secs) -{ - struct timespec ts; - ts.tv_sec = secs; - ts.tv_nsec = 0; - int ret; - - ret = ioctl(fd, ANDROID_ALARM_SET(type), &ts); - if (ret < 0) - LOGE("Unable to set reboot time to %d\n", secs); - return ret; -} - -static int alarm_get_alm_time(int fd, time_t *secs) -{ - struct tm alm_tm; - int ret; - - ret = ioctl(fd, RTC_ALM_READ, &alm_tm); - if (ret < 0) { - LOGE("Unable to get alarm time\n"); - goto err; - } - - *secs = mktime(&alm_tm) + alm_tm.tm_gmtoff; - if (*secs < 0) { - LOGE("Invalid alarm seconds = %ld\n", *secs); - goto err; - } - - return 0; - -err: - return -1; -} - -static int alarm_get_rtc_time(int fd, time_t *secs) -{ - struct tm rtc_tm; - int ret; - - ret = ioctl(fd, RTC_RD_TIME, &rtc_tm); - if (ret < 0) { - LOGE("Unable to get rtc time\n"); - goto err; - } - - *secs = mktime(&rtc_tm) + rtc_tm.tm_gmtoff; - if (*secs < 0) { - LOGE("Invalid rtc seconds = %ld\n", *secs); - goto err; - } - - return 0; - -err: - return -1; -} - -static int alarm_wait(int fd) -{ - int ret = 0; - - do { - ret = ioctl(fd, ANDROID_ALARM_WAIT); - } while (ret < 0 && errno == EINTR); - - if (ret < 0) { - LOGE("Unable to wait on alarm\n"); - return 0; - } - - return ret; -} - -static void alarm_reboot() -{ - android_reboot(ANDROID_RB_RESTART, 0, 0); -} - -void *alarm_thread(void *p) -{ - int alm_fd, rtc_fd, ret; - time_t g_alm_secs, g_rtc_secs, s_rb_secs; - - rtc_fd = alarm_open_rtc_dev(); - if (rtc_fd < 0) - goto rtc_err; - - ret = alarm_get_alm_time(rtc_fd, &g_alm_secs); - if (ret < 0 || !g_alm_secs) - goto rtc_err; - - ret = alarm_get_rtc_time(rtc_fd, &g_rtc_secs); - if (ret < 0) - goto rtc_err; - - s_rb_secs = g_alm_secs - g_rtc_secs; - if (s_rb_secs <= 0) - goto rtc_err; - - alm_fd = alarm_open_alm_dev(); - if (alm_fd < 0) - goto rtc_err; - - ret = alarm_set_reboot_time(alm_fd, - ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP, - s_rb_secs); - if (ret < 0) - goto alm_err; - - ret = alarm_wait(alm_fd); - if (ret) { - LOGI("Exit from power off charging, reboot the phone!\n"); - alarm_reboot(); - } - -alm_err: - alarm_close_alm_dev(alm_fd); - -rtc_err: - alarm_close_rtc_dev(rtc_fd); - - LOGE("Exit from alarm thread\n"); - return NULL; -} - -void alarm_thread_create() -{ - pthread_t tid; - int ret; - - ret = pthread_create(&tid, NULL, alarm_thread, NULL); - if (ret < 0) - LOGE("Create alarm thread failed\n"); -} - -int main(int argc, char **argv) -{ - int ret; - struct charger *charger = &charger_state; - int64_t now = curr_time_ms() - 1; - int fd; - int i; - - list_init(&charger->supplies); - - klog_init(); - klog_set_level(CHARGER_KLOG_LEVEL); - - dump_last_kmsg(); - - alarm_thread_create(); - - LOGI("--------------- STARTING CHARGER MODE ---------------\n"); - - gr_init(); - gr_font_size(&char_width, &char_height); - - ev_init(input_callback, charger); - - fd = uevent_open_socket(64*1024, true); - if (fd >= 0) { - fcntl(fd, F_SETFL, O_NONBLOCK); - ev_add_fd(fd, uevent_callback, charger); - } - charger->uevent_fd = fd; - coldboot(charger, "/sys/class/power_supply", "add"); - - ret = res_create_surface("charger/battery_fail", &charger->surf_unknown); - if (ret < 0) { - LOGE("Cannot load image\n"); - charger->surf_unknown = NULL; - } - - for (i = 0; i < charger->batt_anim->num_frames; i++) { - struct frame *frame = &charger->batt_anim->frames[i]; - - ret = res_create_surface(frame->name, &frame->surface); - if (ret < 0) { - LOGE("Cannot load image %s\n", frame->name); - /* TODO: free the already allocated surfaces... */ - charger->batt_anim->num_frames = 0; - charger->batt_anim->num_cycles = 1; - break; - } - } - - ev_sync_key_state(set_key_callback, charger); - - set_backlight(false); - gr_fb_blank(true); - - charger->next_screen_transition = now - 1; - charger->next_key_check = -1; - charger->next_pwr_check = -1; - reset_animation(charger->batt_anim); - kick_animation(charger->batt_anim); - - event_loop(charger); - - return 0; -} diff --git a/charger/images/battery_00.png b/charger/images/battery_00.png Binary files differdeleted file mode 100644 index cfc9b92..0000000 --- a/charger/images/battery_00.png +++ /dev/null diff --git a/charger/images/battery_01.png b/charger/images/battery_01.png Binary files differdeleted file mode 100644 index 083355e..0000000 --- a/charger/images/battery_01.png +++ /dev/null diff --git a/charger/images/battery_02.png b/charger/images/battery_02.png Binary files differdeleted file mode 100644 index d2ada50..0000000 --- a/charger/images/battery_02.png +++ /dev/null diff --git a/charger/images/battery_03.png b/charger/images/battery_03.png Binary files differdeleted file mode 100644 index 895cd41..0000000 --- a/charger/images/battery_03.png +++ /dev/null diff --git a/charger/images/battery_04.png b/charger/images/battery_04.png Binary files differdeleted file mode 100644 index 361cbb9..0000000 --- a/charger/images/battery_04.png +++ /dev/null diff --git a/charger/images/battery_05.png b/charger/images/battery_05.png Binary files differdeleted file mode 100644 index f6dce2f..0000000 --- a/charger/images/battery_05.png +++ /dev/null diff --git a/charger/images/battery_06.png b/charger/images/battery_06.png Binary files differdeleted file mode 100644 index fb87d41..0000000 --- a/charger/images/battery_06.png +++ /dev/null diff --git a/charger/images/battery_07.png b/charger/images/battery_07.png Binary files differdeleted file mode 100644 index 92bfe62..0000000 --- a/charger/images/battery_07.png +++ /dev/null diff --git a/charger/images/battery_08.png b/charger/images/battery_08.png Binary files differdeleted file mode 100644 index ba91aeb..0000000 --- a/charger/images/battery_08.png +++ /dev/null diff --git a/charger/images/battery_09.png b/charger/images/battery_09.png Binary files differdeleted file mode 100644 index 85749a7..0000000 --- a/charger/images/battery_09.png +++ /dev/null diff --git a/charger/images/battery_10.png b/charger/images/battery_10.png Binary files differdeleted file mode 100644 index b94d166..0000000 --- a/charger/images/battery_10.png +++ /dev/null diff --git a/charger/images/battery_11.png b/charger/images/battery_11.png Binary files differdeleted file mode 100644 index 3cc47fb..0000000 --- a/charger/images/battery_11.png +++ /dev/null diff --git a/charger/images/battery_12.png b/charger/images/battery_12.png Binary files differdeleted file mode 100644 index 2dc5713..0000000 --- a/charger/images/battery_12.png +++ /dev/null diff --git a/charger/images/battery_13.png b/charger/images/battery_13.png Binary files differdeleted file mode 100644 index 95b6424..0000000 --- a/charger/images/battery_13.png +++ /dev/null diff --git a/charger/images/battery_14.png b/charger/images/battery_14.png Binary files differdeleted file mode 100644 index bc8f4a8..0000000 --- a/charger/images/battery_14.png +++ /dev/null diff --git a/charger/images/battery_15.png b/charger/images/battery_15.png Binary files differdeleted file mode 100644 index a3e1066..0000000 --- a/charger/images/battery_15.png +++ /dev/null diff --git a/charger/images/battery_16.png b/charger/images/battery_16.png Binary files differdeleted file mode 100644 index 02c55ef..0000000 --- a/charger/images/battery_16.png +++ /dev/null diff --git a/charger/images/battery_17.png b/charger/images/battery_17.png Binary files differdeleted file mode 100644 index 47dd57c..0000000 --- a/charger/images/battery_17.png +++ /dev/null diff --git a/charger/images/battery_18.png b/charger/images/battery_18.png Binary files differdeleted file mode 100644 index c48be91..0000000 --- a/charger/images/battery_18.png +++ /dev/null diff --git a/charger/images/battery_19.png b/charger/images/battery_19.png Binary files differdeleted file mode 100644 index d730d41..0000000 --- a/charger/images/battery_19.png +++ /dev/null diff --git a/charger/images/battery_20.png b/charger/images/battery_20.png Binary files differdeleted file mode 100644 index 8455686..0000000 --- a/charger/images/battery_20.png +++ /dev/null diff --git a/charger/images/battery_21.png b/charger/images/battery_21.png Binary files differdeleted file mode 100644 index 44e6b62..0000000 --- a/charger/images/battery_21.png +++ /dev/null diff --git a/charger/images/battery_22.png b/charger/images/battery_22.png Binary files differdeleted file mode 100644 index e854568..0000000 --- a/charger/images/battery_22.png +++ /dev/null diff --git a/charger/images/battery_23.png b/charger/images/battery_23.png Binary files differdeleted file mode 100644 index 6ec6800..0000000 --- a/charger/images/battery_23.png +++ /dev/null diff --git a/charger/images/battery_24.png b/charger/images/battery_24.png Binary files differdeleted file mode 100644 index 68ff02a..0000000 --- a/charger/images/battery_24.png +++ /dev/null diff --git a/charger/images/battery_25.png b/charger/images/battery_25.png Binary files differdeleted file mode 100644 index 1bef262..0000000 --- a/charger/images/battery_25.png +++ /dev/null diff --git a/charger/images/battery_charge.png b/charger/images/battery_charge.png Binary files differdeleted file mode 100644 index dbc448a..0000000 --- a/charger/images/battery_charge.png +++ /dev/null diff --git a/charger/images/battery_fail.png b/charger/images/battery_fail.png Binary files differdeleted file mode 100644 index 4fcbfa2..0000000 --- a/charger/images/battery_fail.png +++ /dev/null diff --git a/configpanel/Android.mk b/configpanel/Android.mk deleted file mode 100644 index ca6f25c..0000000 --- a/configpanel/Android.mk +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright (C) 2013 The CyanogenMod Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_CERTIFICATE := platform -LOCAL_PACKAGE_NAME := ConfigPanel - -include $(BUILD_PACKAGE) diff --git a/configpanel/AndroidManifest.xml b/configpanel/AndroidManifest.xml deleted file mode 100644 index 2a44408..0000000 --- a/configpanel/AndroidManifest.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - android:sharedUserId="android.uid.system" - package="com.cyanogenmod.settings.device" - android:versionCode="5" - android:versionName="2.3" > - - <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> - <uses-permission android:name="android.permission.BLUETOOTH"/> - <uses-permission android:name="android.permission.INJECT_EVENTS"/> - <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/> - - <uses-sdk - android:minSdkVersion="18" - android:targetSdkVersion="18" /> - - <application> - - <!-- stub to ensure its loaded - DO NOT REMOVE --> - <activity android:name=".KeyHandler"/> - - <service android:name=".OclickService" /> - <activity android:launchMode="singleTop" android:name=".BluetoothInputSettings" android:icon="@drawable/app_icon" - android:label="@string/oclick_panel_title"> - <intent-filter> - <action android:name="com.cyanogenmod.action.LAUNCH_BLUETOOTH_INPUT_SETTINGS" /> - </intent-filter> - <meta-data - android:name="com.android.settings.title" - android:resource="@string/oclick_panel_title"/> - <meta-data - android:name="com.android.settings.summary" - android:resource="@string/oclick_panel_summary"/> - </activity> - - <activity android:name=".TouchscreenGestureSettings" android:icon="@drawable/app_icon" - android:label="@string/screen_gestures_panel_title"> - <intent-filter> - <action android:name="com.cyanogenmod.action.LAUNCH_TOUCHSCREEN_GESTURE_SETTINGS" /> - </intent-filter> - <meta-data - android:name="com.android.settings.title" - android:resource="@string/screen_gestures_panel_title"/> - <meta-data - android:name="com.android.settings.summary" - android:resource="@string/screen_gestures_panel_summary"/> - </activity> - - <activity android:name=".GesturePadSettings" android:icon="@drawable/app_icon" - android:label="@string/backpad_panel_title"> - <intent-filter> - <action android:name="com.cyanogenmod.action.LAUNCH_GESTURE_PAD_SETTINGS" /> - </intent-filter> - <meta-data - android:name="com.android.settings.title" - android:resource="@string/backpad_panel_title"/> - <meta-data - android:name="com.android.settings.summary" - android:resource="@string/backpad_panel_summary"/> - </activity> - - <receiver android:name=".Startup" > - <intent-filter> - <action android:name="android.intent.action.BOOT_COMPLETED" /> - <action android:name="cyanogenmod.intent.action.GESTURE_CAMERA" /> - </intent-filter> - </receiver> - <receiver android:name=".BluetoothReceiver" > - <intent-filter> - <action android:name="android.bluetooth.device.action.ACL_CONNECTED" /> - <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED" /> - </intent-filter> - </receiver> - </application> - -</manifest> diff --git a/configpanel/res/drawable-hdpi/app_icon.png b/configpanel/res/drawable-hdpi/app_icon.png Binary files differdeleted file mode 100644 index 4101773..0000000 --- a/configpanel/res/drawable-hdpi/app_icon.png +++ /dev/null diff --git a/configpanel/res/drawable-hdpi/locator_icon.png b/configpanel/res/drawable-hdpi/locator_icon.png Binary files differdeleted file mode 100644 index 544bd1b..0000000 --- a/configpanel/res/drawable-hdpi/locator_icon.png +++ /dev/null diff --git a/configpanel/res/drawable-mdpi/app_icon.png b/configpanel/res/drawable-mdpi/app_icon.png Binary files differdeleted file mode 100644 index 912cfcd..0000000 --- a/configpanel/res/drawable-mdpi/app_icon.png +++ /dev/null diff --git a/configpanel/res/drawable-mdpi/locator_icon.png b/configpanel/res/drawable-mdpi/locator_icon.png Binary files differdeleted file mode 100644 index 93d5b0a..0000000 --- a/configpanel/res/drawable-mdpi/locator_icon.png +++ /dev/null diff --git a/configpanel/res/drawable-xhdpi/app_icon.png b/configpanel/res/drawable-xhdpi/app_icon.png Binary files differdeleted file mode 100644 index fa09f61..0000000 --- a/configpanel/res/drawable-xhdpi/app_icon.png +++ /dev/null diff --git a/configpanel/res/drawable-xhdpi/locator_icon.png b/configpanel/res/drawable-xhdpi/locator_icon.png Binary files differdeleted file mode 100644 index 74d3428..0000000 --- a/configpanel/res/drawable-xhdpi/locator_icon.png +++ /dev/null diff --git a/configpanel/res/drawable-xxhdpi/app_icon.png b/configpanel/res/drawable-xxhdpi/app_icon.png Binary files differdeleted file mode 100644 index 9865d9d..0000000 --- a/configpanel/res/drawable-xxhdpi/app_icon.png +++ /dev/null diff --git a/configpanel/res/drawable-xxhdpi/locator_icon.png b/configpanel/res/drawable-xxhdpi/locator_icon.png Binary files differdeleted file mode 100644 index 9f33e54..0000000 --- a/configpanel/res/drawable-xxhdpi/locator_icon.png +++ /dev/null diff --git a/configpanel/res/values-cs/strings.xml b/configpanel/res/values-cs/strings.xml deleted file mode 100644 index 61bc464..0000000 --- a/configpanel/res/values-cs/strings.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="backpad_panel_title">Nastavení O-Touch</string> - <string name="backpad_panel_summary">Možnosti nastavení O-Touch</string> - <string name="touchpad_enable_title">Povolit O-Touch</string> - <string name="touchpad_enable_summary">Zadní touchpad použít k ovládání telefonu</string> - <string name="touchpad_long_press_title">Dlouhý dotyk spustí fotoaparát</string> - <string name="touchpad_long_press_summary">Dlouhý dotyk na touchpadu provede spuštění aplikace fotoaparátu</string> - <string name="touchpad_double_tap_title">Dvojitý dotyk pořídí fotografii</string> - <string name="touchpad_double_tap_summary">Pokud je aktivní fotoaparát, dvojitým dotykem pořídíte forografii</string> - <string name="screen_gestures_panel_title">Rychlá gesta</string> - <string name="screen_gestures_panel_summary">Povolit gesta při vypnuté obrazovce</string> - <string name="touchscreen_double_tap_gesture_title">Probudit zařízení</string> - <string name="touchscreen_double_tap_gesture_summary">Dvojitý dotyk probudí zařízení</string> - <string name="touchscreen_camera_gesture_title">Fotoaparát</string> - <string name="touchscreen_camera_gesture_summary">Načrtnutím kruhu bude spuštěn fotoaparát</string> - <string name="touchscreen_music_gesture_title">Hudba</string> - <string name="touchscreen_flashlight_gesture_title">Svítilna</string> - <string name="touchscreen_flashlight_gesture_summary">Načrtnutím \'V\' dojde k přepnutí stavu svítilny</string> - <string name="touchscreen_music_gesture_summary">Použij gesta k ovládání přehrávání hudby\n - \u2022 Dvěma prsty svisle - přehrávat/pozastavit\n - \u2022 Načrtnutím šipky vlevo - předchozí stopa\n - \u2022 Načrtnutím šipky vpravo - následující stopa</string> - <string name="oclick_panel_title">Nastavení O-Click</string> - <string name="oclick_panel_summary">Možnosti nastavení zařízení O-Click</string> - <string name="oclick_connect_string">Připojit</string> - <string name="oclick_disconnect_string">Odpojit</string> - <string name="oclick_dialog_connecting_message">Pokus o zpárování</string> - <string name="oclick_take_snapshot_title">Dálková spoušť fotoaparátu</string> - <string name="oclick_take_snapshot_summary">Jedním dotykem pořídíte fotografii</string> - <string name="oclick_find_my_phone_title">Poloha telefonu</string> - <string name="oclick_find_my_phone_summary">Dvojitým dotykem zjistíte polohu telefonu</string> - <string name="oclick_fence_title">Upozornění při vzdálení</string> - <string name="oclick_fence_summary">Upozornit, pokud není telefon v blízkosti</string> - <string name="oclick_disconnect_alert_title">Upozornění, pokud mimo dosah</string> - <string name="oclick_disconnect_alert_summary">Upozornit, pokud je telefon mimo dosah</string> - <string name="alert_category_title">Upozornění</string> - <string name="action_category_title">Akce</string> -</resources> diff --git a/configpanel/res/values-da/strings.xml b/configpanel/res/values-da/strings.xml deleted file mode 100644 index fffa9db..0000000 --- a/configpanel/res/values-da/strings.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="backpad_panel_title">Indstillinger for O-Touch</string> - <string name="backpad_panel_summary">Konfigurér O-Touch</string> - <string name="touchpad_enable_title">Aktivér O-Touch</string> - <string name="touchpad_enable_summary">Brug O-Touch for at navigere telefonen</string> - <string name="touchpad_long_press_title">Langt tryk for at starte kamera</string> - <string name="touchpad_long_press_summary">Langt tryk på O-Touch vil starte kameraet</string> - <string name="touchpad_double_tap_title">Dobbelttryk for billede</string> - <string name="touchpad_double_tap_summary">Dobbelttryk for at tage et billede, når kameraet er åbent</string> - <string name="screen_gestures_panel_title">Bevægelsesgenveje</string> - <string name="screen_gestures_panel_summary">Brug bevægelser, når skærmen er slukket</string> - <string name="touchscreen_double_tap_gesture_title">Væk enhed</string> - <string name="touchscreen_double_tap_gesture_summary">Dobbelttryk for at vække enheden</string> - <string name="touchscreen_camera_gesture_title">Kamera</string> - <string name="touchscreen_camera_gesture_summary">Tegn en cirkel for at aktivere kamera</string> - <string name="touchscreen_music_gesture_title">Musik</string> - <string name="touchscreen_flashlight_gesture_title">Lommelygte</string> - <string name="touchscreen_flashlight_gesture_summary">Tegn et \'V\' for at tænde lommelygte</string> - <string name="touchscreen_music_gesture_summary">Brug bevægelser til at styre musikafspilning \n - • To fingre vertikalt for afspil/pause\n - • Tegn venstrepil for forrige spor\n - • Tegn højrepil for næste spor</string> - <string name="oclick_panel_title">Indstillinger for O-Click</string> - <string name="oclick_panel_summary">Konfigurér O-Click-enheden</string> - <string name="oclick_connect_string">Forbind</string> - <string name="oclick_disconnect_string">Afbryd</string> - <string name="oclick_dialog_title">O-Click</string> - <string name="oclick_dialog_connecting_message">Forsøger at parre\u2026</string> - <string name="oclick_take_snapshot_title">Fjernudløser til kamera</string> - <string name="oclick_take_snapshot_summary">Enkeltklik for at tage billede</string> - <string name="oclick_find_my_phone_title">Find telefonen</string> - <string name="oclick_find_my_phone_summary">Dobbeltklik for at finde telefonen</string> - <string name="oclick_fence_title">Afstandsadvarsel</string> - <string name="oclick_fence_summary">Advarsel, når telefonen er langt væk fra OClick</string> - <string name="oclick_disconnect_alert_title">Rækkevidde-advarsel</string> - <string name="oclick_disconnect_alert_summary">Advarsel, når telefonen er udenfor OClicks rækkevidde</string> - <string name="alert_category_title">Advarsler</string> - <string name="action_category_title">Handlinger</string> -</resources> diff --git a/configpanel/res/values-de/strings.xml b/configpanel/res/values-de/strings.xml deleted file mode 100644 index b3cbc84..0000000 --- a/configpanel/res/values-de/strings.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="backpad_panel_title">O-Touch-Einstellungen</string> - <string name="backpad_panel_summary">O-Touch konfigurieren</string> - <string name="touchpad_enable_title">O-Touch aktivieren</string> - <string name="touchpad_enable_summary">Rückseitiges Touchpad zur Steuerung des Telefons</string> - <string name="touchpad_long_press_title">Lange drücken zum Starten der Kamera</string> - <string name="touchpad_long_press_summary">Langes Drücken des Touchpads startet die Kamera-App</string> - <string name="touchpad_double_tap_title">Auslösen durch doppeltes Tippen</string> - <string name="touchpad_double_tap_summary">In der Kamera-App Bilder durch doppeltes Tippen aufnehmen</string> - <string name="screen_gestures_panel_title">Gesten-Steuerung</string> - <string name="screen_gestures_panel_summary">Steuerung durch Gesten bei ausgeschaltetem Display</string> - <string name="touchscreen_double_tap_gesture_title">Gerät aufwecken</string> - <string name="touchscreen_double_tap_gesture_summary">Gerät durch doppeltes Tippen aufwecken</string> - <string name="touchscreen_camera_gesture_title">Kamera</string> - <string name="touchscreen_camera_gesture_summary">Kreis zeichen, um die Kamera-App zu starten</string> - <string name="touchscreen_flashlight_gesture_title">Taschenlampe</string> - <string name="touchscreen_flashlight_gesture_summary">\'V\' zeichen, um die Taschenlampe ein-/auszuschalten</string> - <string name="touchscreen_music_gesture_title">Musik</string> - <string name="touchscreen_music_gesture_summary">Musikwiedergabe durch Gesten steuern \n - • Zwei Finger vertikal für Play/Pause\n - • Pfeil nach links für vorherigen Titel\n - • Pfeil nach rechts für nächsten Titel</string> - <string name="oclick_panel_title">O-Click-Einstellungen</string> - <string name="oclick_panel_summary">O-Click konfigurieren</string> - <string name="oclick_connect_string">Verbinden</string> - <string name="oclick_disconnect_string">Trennen</string> - <string name="oclick_dialog_title">O-Click</string> - <string name="oclick_dialog_connecting_message">Kopplung wird durchgeführt\u2026</string> - <string name="oclick_take_snapshot_title">Kamera-Fernauslöser</string> - <string name="oclick_take_snapshot_summary">Einfach-Klick zum Auslösen</string> - <string name="oclick_find_my_phone_title">Telefon-Finder</string> - <string name="oclick_find_my_phone_summary">Doppel-Klick um das Telefon zu lokalisieren</string> - <string name="oclick_fence_title">Entfernungsalarm</string> - <string name="oclick_fence_summary">Alarmieren, wenn Telefon nicht in der Nähe ist</string> - <string name="oclick_disconnect_alert_title">Reichweitenalarm</string> - <string name="oclick_disconnect_alert_summary">Alarmieren, wenn Reichweite verlassen wird</string> - <string name="alert_category_title">Alarme</string> - <string name="action_category_title">Aktionen</string> -</resources> diff --git a/configpanel/res/values-el/strings.xml b/configpanel/res/values-el/strings.xml deleted file mode 100644 index 2ae680f..0000000 --- a/configpanel/res/values-el/strings.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <string name="backpad_panel_title">Ρυθμίσεις O-Touch</string> - <string name="backpad_panel_summary">Ρύθμιση O-Touch</string> - - <string name="touchpad_enable_title">Ενεργοποίηση O-Touch</string> - <string name="touchpad_enable_summary">Πίσω επιφάνεια αφής για πλοήγηση στο τηλέφωνο</string> - <string name="touchpad_long_press_title">Πίεση για άνοιγμα φωτογρ. μηχανής</string> - <string name="touchpad_long_press_summary">Παρατεταμένη πίεση στην επιφάνεια αφής θα ανοίγει την φωτογρ. μηχανή</string> - <string name="touchpad_double_tap_title">Διπλό χτύπημα για λήψη</string> - <string name="touchpad_double_tap_summary">Ενώ είστε στην κάμερα, χτυπήστε ελαφρά δύο φορές για λήψη φωτογραφίας</string> - - <string name="screen_gestures_panel_title">Συντομεύσεις χειρονομιών</string> - <string name="screen_gestures_panel_summary">Χρήση χειρονομιών ενώ η οθόνη είναι ανενεργή</string> - - <string name="touchscreen_double_tap_gesture_title">Αφύπνιση συσκευής</string> - <string name="touchscreen_double_tap_gesture_summary">Διπλό χτύπημα για αφύπνιση της συσκευής</string> - <string name="touchscreen_camera_gesture_title">Φωτογρ. μηχανή</string> - <string name="touchscreen_camera_gesture_summary">Σχεδιάστε έναν κύκλο για εκκίνηση της φωτογρ. μηχανής</string> - <string name="touchscreen_music_gesture_title">Μουσική</string> - <string name="touchscreen_flashlight_gesture_title">Φακός</string> - <string name="touchscreen_flashlight_gesture_summary">Σχεδιάστε ένα \'V\' για ενεργοποίηση του φακού</string> - <string name="touchscreen_music_gesture_summary">Χρήση χειρονομιών για τον έλεγχο αναπαραγωγής μουσικής \n - • Δύο δάχτυλα κάθετα για αναπαραγωγή/παύση\n - • Σχεδιάστε βελάκι προς τα αριστερά για προηγούμενο κομμάτι\n - • Σχεδιάστε βελάκι προς τα δεξιά για επόμενο κομμάτι</string> - - <string name="oclick_panel_title">Ρυθμίσεις O-Click</string> - <string name="oclick_panel_summary">Ρύθμιση συσκευής O-Click</string> - - <string name="oclick_connect_string">Σύνδεση</string> - <string name="oclick_disconnect_string">Αποσύνδεση</string> - <string name="oclick_dialog_title">O-Click</string> - <string name="oclick_dialog_connecting_message">Προσπάθεια σύζευξης</string> - - <string name="oclick_take_snapshot_title">Απομακρυσμένο κλείστρο</string> - <string name="oclick_take_snapshot_summary">Μονό κλικ για λήψη φωτογραφίας</string> - <string name="oclick_find_my_phone_title">Εντοπισμός τηλεφώνου</string> - <string name="oclick_find_my_phone_summary">Διπλό κλικ για εντοπισμό του τηλεφώνου</string> - <string name="oclick_fence_title">Συναγερμός εγγύτητας</string> - <string name="oclick_fence_summary">Ειδοποίηση όταν δεν είναι κοντά στο τηλέφωνο</string> - <string name="oclick_disconnect_alert_title">Συναγερμός εκτός εμβέλειας</string> - <string name="oclick_disconnect_alert_summary">Ειδοποίηση όταν είναι εκτός εμβέλειας</string> - - <string name="alert_category_title">Συναγερμοί</string> - <string name="action_category_title">Λειτουργίες</string> -</resources> diff --git a/configpanel/res/values-es/strings.xml b/configpanel/res/values-es/strings.xml deleted file mode 100644 index e114d3d..0000000 --- a/configpanel/res/values-es/strings.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="backpad_panel_title">Ajustes O-Touch</string> - <string name="backpad_panel_summary">Configurar O-Touch</string> - <string name="touchpad_enable_title">Habilitar O-Touch</string> - <string name="touchpad_enable_summary">Panel táctil trasero para navegar por el teléfono</string> - <string name="touchpad_long_press_title">Pulsación prolongada para lanzar la cámara</string> - <string name="touchpad_long_press_summary">Una pulsación prolongada en el panel táctil lanzará la aplicación Cámara</string> - <string name="touchpad_double_tap_title">Doble toque para capturar imagen</string> - <string name="touchpad_double_tap_summary">Cuando este en la aplicación Cámara, un doble toque realizará una captura de imagen</string> - <string name="screen_gestures_panel_title">Atajos gestuales</string> - <string name="screen_gestures_panel_summary">Habilitar gestos mientras la pantalla este apagada</string> - <string name="touchscreen_double_tap_gesture_title">Despertar dispositivo</string> - <string name="touchscreen_double_tap_gesture_summary">Un doble toque despertará el dispositivo</string> - <string name="touchscreen_camera_gesture_title">Cámara</string> - <string name="touchscreen_camera_gesture_summary">Dibujar un círculo para activar la cámara</string> - <string name="touchscreen_music_gesture_title">Música</string> - <string name="touchscreen_music_gesture_summary">Utilizar gestos para controlar la reproducción de música \n - • Deslice 2 dedos verticalmente para reproducir/pausar\n - • Dibuje una fecha a la izquierda para retroceder\n - • Dibuje una fecha a la izquierda para avanzar</string> - <string name="touchscreen_flashlight_gesture_title">Luz de flash</string> - <string name="touchscreen_flashlight_gesture_summary">Dibuja una \'V\' para conmutar la luz de flash</string> - <string name="oclick_panel_title">Ajustes O-Click</string> - <string name="oclick_panel_summary">Configurar dispositivo O-Click</string> - <string name="oclick_connect_string">Conectar</string> - <string name="oclick_disconnect_string">Desconectar</string> - <string name="oclick_dialog_connecting_message">Intentando vincular</string> -</resources> diff --git a/configpanel/res/values-it/strings.xml b/configpanel/res/values-it/strings.xml deleted file mode 100644 index 5d762a2..0000000 --- a/configpanel/res/values-it/strings.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="backpad_panel_title">Impostazioni O-Touch</string> - <string name="backpad_panel_summary">Configura O-Touch</string> - <string name="touchpad_enable_title">Attiva O-Touch</string> - <string name="touchpad_enable_summary">Touchpad posteriore per navigazione telefono</string> - <string name="touchpad_long_press_title">Pressione prolungata avvia fotocamera</string> - <string name="touchpad_long_press_summary">Premere a lungo il touchpad avvierà l\'applicazione della fotocamera</string> - <string name="touchpad_double_tap_title">Doppio tocco per scattare</string> - <string name="touchpad_double_tap_summary">Quando la fotocamera è avviata, tocca due volte per scattare foto</string> - <string name="screen_gestures_panel_title">Gesture scorciatoie</string> - <string name="screen_gestures_panel_summary">Usa le gesture mentre lo schermo è spento</string> - <string name="touchscreen_double_tap_gesture_title">Risveglia dispositivo</string> - <string name="touchscreen_double_tap_gesture_summary">Doppio tocco per attivare il dispositivo</string> - <string name="touchscreen_camera_gesture_title">Fotocamera</string> - <string name="touchscreen_camera_gesture_summary">Disegnare un cerchio per attivare la fotocamera</string> - <string name="touchscreen_music_gesture_title">Musica</string> - <string name="touchscreen_flashlight_gesture_title">Torcia</string> - <string name="touchscreen_flashlight_gesture_summary">Disegna una \'V\' per attivare la torcia</string> - <string name="touchscreen_music_gesture_summary">Usa le gesture per controllare la riproduzione musicale\n - \u2022 Due dita in verticale per riprodurre/mettere in pausa\n - \u2022 Disegna una freccia rivolta a sinistra per la traccia precedente\n - \u2022 Disegna una freccia rivolta a destra per la traccia successiva</string> - <string name="oclick_panel_title">Impostazioni O-Click</string> - <string name="oclick_panel_summary">Configura dispositivo O-Click</string> - <string name="oclick_connect_string">Connetti</string> - <string name="oclick_disconnect_string">Disconnetti</string> - <string name="oclick_dialog_connecting_message">Tentativo di accoppiamento</string> - <string name="oclick_take_snapshot_title">Scatto fotocamera a distanza</string> - <string name="oclick_take_snapshot_summary">Singolo click per scattare la foto</string> - <string name="oclick_find_my_phone_title">Localizzatore telefono</string> - <string name="oclick_find_my_phone_summary">Doppio tocco per trovare il telefono</string> - <string name="oclick_fence_title">Allarme di prossimità</string> - <string name="oclick_fence_summary">Avvisa quando non si è vicini al telefono</string> - <string name="oclick_disconnect_alert_title">Allarme fuori portata</string> - <string name="oclick_disconnect_alert_summary">Avvisa quando si è fuori dalla portata</string> - <string name="alert_category_title">Allarmi</string> - <string name="action_category_title">Azioni</string> -</resources> diff --git a/configpanel/res/values-nl/strings.xml b/configpanel/res/values-nl/strings.xml deleted file mode 100644 index 8906605..0000000 --- a/configpanel/res/values-nl/strings.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="backpad_panel_title">Instellingen O-Touch</string> - <string name="backpad_panel_summary">O-Touch instellen</string> - <string name="touchpad_enable_title">O-Touch inschakelen</string> - <string name="touchpad_enable_summary">Touchpad aan achterkant voor navigeren</string> - <string name="touchpad_long_press_title">Lang aanraken voor camera</string> - <string name="touchpad_long_press_summary">Touchpad lang aanraken start de camera-app</string> - <string name="touchpad_double_tap_title">Dubbeltikken voor opname</string> - <string name="touchpad_double_tap_summary">In camera dubbeltikken om een foto te nemen</string> - <string name="screen_gestures_panel_title">Gebarensnelkoppelingen</string> - <string name="screen_gestures_panel_summary">Gebaren gebruiken als het scherm uit is</string> - <string name="touchscreen_double_tap_gesture_title">Ontwaken</string> - <string name="touchscreen_double_tap_gesture_summary">Dubbeltikken om apparaat te ontwaken</string> - <string name="touchscreen_camera_gesture_title">Camera</string> - <string name="touchscreen_camera_gesture_summary">Cirkel tekenen om camera te openen</string> - <string name="touchscreen_music_gesture_title">Muziek</string> - <string name="touchscreen_flashlight_gesture_title">Zaklamp</string> - <string name="touchscreen_flashlight_gesture_summary">Een \'V\' tekenen voor zaklamp</string> - <string name="touchscreen_music_gesture_summary">Gebaren gebruiken om muziek te bedienen \n - • Twee vingers verticaal voor afspelen/pauzeren\n - • Pijl links tekenen voor vorig nummer\n - • Pijl rechts tekenen voor volgend nummer</string> - <string name="oclick_panel_title">Instellingen O-Click</string> - <string name="oclick_panel_summary">O-Click-apparaat instellen</string> - <string name="oclick_connect_string">Verbinding maken</string> - <string name="oclick_disconnect_string">Verbinding verbreken</string> - <string name="oclick_dialog_title">O-Click</string> - <string name="oclick_dialog_connecting_message">Poging tot koppelen</string> - <string name="oclick_take_snapshot_title">Sluiterknop op afstand</string> - <string name="oclick_take_snapshot_summary">Eén klik om een foto te nemen</string> - <string name="oclick_find_my_phone_title">Telefoon lokaliseren</string> - <string name="oclick_find_my_phone_summary">Dubbelklikken om telefoon op te zoeken</string> - <string name="oclick_fence_title">Waarschuwing niet dichtbij</string> - <string name="oclick_fence_summary">Melden wanneer ver weg van de telefoon</string> - <string name="oclick_disconnect_alert_title">Waarschuwing buiten bereik</string> - <string name="oclick_disconnect_alert_summary">Melden wanneer buiten bereik</string> - <string name="alert_category_title">Waarschuwingen</string> - <string name="action_category_title">Acties</string> -</resources> diff --git a/configpanel/res/values-ru/strings.xml b/configpanel/res/values-ru/strings.xml deleted file mode 100644 index 5e807ef..0000000 --- a/configpanel/res/values-ru/strings.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="backpad_panel_title">Настройки O-Touch</string> - <string name="backpad_panel_summary">Изменение параметров O-Touch</string> - <string name="touchpad_enable_title">Включить O-Touch</string> - <string name="touchpad_enable_summary">Сенсорная панель на задней стороне телефона</string> - <string name="touchpad_long_press_title">Долгое нажатие для запуска камеры</string> - <string name="touchpad_long_press_summary">Удерживайте сенсорную панель для запуска приложения «Камера»</string> - <string name="touchpad_double_tap_title">Двойное нажатие для съёмки</string> - <string name="touchpad_double_tap_summary">В приложении «Камера» дважды нажмите на сенсорную панель, чтобы сделать снимок</string> - <string name="screen_gestures_panel_title">Включить жесты</string> - <string name="screen_gestures_panel_summary">Разрешить использование жестов при выключенном экране</string> - <string name="touchscreen_double_tap_gesture_title">Включение устройства</string> - <string name="touchscreen_double_tap_gesture_summary">Нажмите дважды для включения экрана</string> - <string name="touchscreen_camera_gesture_title">Камера</string> - <string name="touchscreen_camera_gesture_summary">Нарисуйте круг для запуска камеры</string> - <string name="touchscreen_music_gesture_title">Музыка</string> - <string name="touchscreen_flashlight_gesture_title">Фонарик</string> - <string name="touchscreen_flashlight_gesture_summary">Нарисуйте букву «V» для включения или выключения фонарика</string> - <string name="touchscreen_music_gesture_summary">Используйте жесты для управления плеером: \n - • Проведите двумя пальцами вверх или вниз для воспроизведения или паузы\n - • Нарисуйте стрелку влево для перехода к предыдущему треку\n - • Нарисуйте стрелку вправо для перехода к следующему треку</string> - <string name="oclick_panel_title">Настройки O-Click</string> - <string name="oclick_panel_summary">Изменение параметров брелока O-Click</string> - <string name="oclick_connect_string">Подключить</string> - <string name="oclick_disconnect_string">Отключить</string> - <string name="oclick_dialog_connecting_message">Выполняется установка соединения</string> - <string name="oclick_take_snapshot_title">Удалённый спуск затвора</string> - <string name="oclick_take_snapshot_summary">Нажмите один раз, чтобы сделать снимок</string> - <string name="oclick_find_my_phone_title">Поиск телефона</string> - <string name="oclick_find_my_phone_summary">Нажмите дважды, чтобы найти телефон</string> - <string name="oclick_fence_title">Предупреждение при удалении</string> - <string name="oclick_fence_summary">Сигнализировать, когда брелок находится не рядом с телефоном</string> - <string name="oclick_disconnect_alert_title">Предупреждение при потере соединения</string> - <string name="oclick_disconnect_alert_summary">Сигнализировать, когда соединение с устройством потеряно</string> - <string name="alert_category_title">Предупреждения</string> - <string name="action_category_title">Действия</string> -</resources> diff --git a/configpanel/res/values-sk/strings.xml b/configpanel/res/values-sk/strings.xml deleted file mode 100644 index 20ebd49..0000000 --- a/configpanel/res/values-sk/strings.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="backpad_panel_title">Nastavenia O-Touch</string> - <string name="backpad_panel_summary">Možnosti nastavenia O-Touch</string> - <string name="touchpad_enable_title">Povoliť O-Touch</string> - <string name="touchpad_enable_summary">Použiť zadný touchpad k ovládaniu telefónu</string> - <string name="touchpad_long_press_title">Dlhé stlačenie spustí fotoaparát</string> - <string name="touchpad_long_press_summary">Dlhé stlačenie na touchpad spustí aplikáciu fotoaparátu</string> - <string name="touchpad_double_tap_title">Dvojklikom zosnímať fotografiu</string> - <string name="touchpad_double_tap_summary">Dvojklikom zosnímate fotografiu, ak ste vo fotoaparáte</string> - <string name="screen_gestures_panel_title">Skratky pomocou gést</string> - <string name="screen_gestures_panel_summary">Používať gestá pri vypnutej obrazovke</string> - <string name="touchscreen_double_tap_gesture_title">Prebudiť zariadenie</string> - <string name="touchscreen_double_tap_gesture_summary">Dvojklikom prebudíte zariadenie</string> - <string name="touchscreen_camera_gesture_title">Fotoaparát</string> - <string name="touchscreen_camera_gesture_summary">Nakreslením kruhu spustíte fotoaparát</string> - <string name="touchscreen_music_gesture_title">Hudba</string> - <string name="touchscreen_flashlight_gesture_title">Svietidlo</string> - <string name="touchscreen_flashlight_gesture_summary">Nakreslením \'V\' spustíte svietidlo</string> - <string name="touchscreen_music_gesture_summary">Používať gestá pre ovládanie prehrávania hudby \n - • Dva prsty zvisle - prehrať/pozastaviť\n - • Nakreslenie šípky doľava - predchádzajúca stopa\n - • Nakreslenie šípky doprava - nasledujúca stopa</string> - <string name="oclick_panel_title">Nastavenia O-Click</string> - <string name="oclick_panel_summary">Možnosti nastavenia zariadenia O-Click</string> - <string name="oclick_connect_string">Pripojiť</string> - <string name="oclick_disconnect_string">Odpojiť</string> - <string name="oclick_dialog_title">O-Click</string> - <string name="oclick_dialog_connecting_message">Pokus o spárovanie</string> - <string name="oclick_take_snapshot_title">Diaľková uzávierka fotoaparátu</string> - <string name="oclick_take_snapshot_summary">Kliknutím zosnímate fotografiu</string> - <string name="oclick_find_my_phone_title">Vyhľadávač telefónu</string> - <string name="oclick_find_my_phone_summary">Dvojitým kliknutím vyhľadáte telefón</string> - <string name="oclick_fence_title">Výstraha ohľadom vzdialenosti</string> - <string name="oclick_fence_summary">Upozorniť, ak nie je blízko pri telefóne</string> - <string name="oclick_disconnect_alert_title">Výstraha ohľadom nedostupnosti</string> - <string name="oclick_disconnect_alert_summary">Upozorniť, ak je mimo dosahu</string> - <string name="alert_category_title">Výstrahy</string> - <string name="action_category_title">Akcie</string> -</resources> diff --git a/configpanel/res/values/strings.xml b/configpanel/res/values/strings.xml deleted file mode 100644 index 739062f..0000000 --- a/configpanel/res/values/strings.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <!-- O-Touch settings --> - <string name="backpad_panel_title">O-Touch settings</string> - <string name="backpad_panel_summary">Configure O-Touch</string> - - <string name="touchpad_enable_title">Enable O-Touch</string> - <string name="touchpad_enable_summary">Rear touchpad to navigate the phone</string> - <string name="touchpad_long_press_title">Long press to launch camera</string> - <string name="touchpad_long_press_summary">Long press on the touchpad will launch the camera application</string> - <string name="touchpad_double_tap_title">Double tap to capture</string> - <string name="touchpad_double_tap_summary">While in camera, double tap to capture image</string> - - <!-- Gesture shortcuts --> - <string name="screen_gestures_panel_title">Gesture shortcuts</string> - <string name="screen_gestures_panel_summary">Use gestures while the screen is off</string> - - <string name="touchscreen_double_tap_gesture_title">Wake device</string> - <string name="touchscreen_double_tap_gesture_summary">Double tap to wake the device</string> - <string name="touchscreen_camera_gesture_title">Camera</string> - <string name="touchscreen_camera_gesture_summary">Draw a circle to activate camera</string> - <string name="touchscreen_music_gesture_title">Music</string> - <string name="touchscreen_flashlight_gesture_title">Flashlight</string> - <string name="touchscreen_flashlight_gesture_summary">Draw a \'V\' to toggle flashlight</string> - <string name="touchscreen_music_gesture_summary">Use gestures to control music playback \n - • Two fingers vertically to play/pause\n - • Draw left arrow for previous track\n - • Draw right arrow for next track</string> - - <!-- O-Click settings --> - <string name="oclick_panel_title">O-Click settings</string> - <string name="oclick_panel_summary">Configure O-Click device</string> - - <string name="oclick_connect_string">Connect</string> - <string name="oclick_disconnect_string">Disconnect</string> - <string name="oclick_dialog_title">O-Click</string> - <string name="oclick_dialog_connecting_message">Attempting to pair</string> - - <string name="oclick_take_snapshot_title">Remote camera shutter</string> - <string name="oclick_take_snapshot_summary">Single click to take picture</string> - <string name="oclick_find_my_phone_title">Phone locator</string> - <string name="oclick_find_my_phone_summary">Double click to find phone</string> - <string name="oclick_fence_title">Proximity alert</string> - <string name="oclick_fence_summary">Alert when not near phone</string> - <string name="oclick_disconnect_alert_title">Out of range alert</string> - <string name="oclick_disconnect_alert_summary">Alert when outside of reach</string> - - <string name="alert_category_title">Alerts</string> - <string name="action_category_title">Actions</string> -</resources> diff --git a/configpanel/res/xml/gesture_panel b/configpanel/res/xml/gesture_panel deleted file mode 100644 index 7b7308c..0000000 --- a/configpanel/res/xml/gesture_panel +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - - <CheckBoxPreference - android:key="touchpad_enable_state" - android:title="@string/touchpad_enable_title" - android:summary="@string/touchpad_enable_summary" /> - - <CheckBoxPreference - android:dependency="touchpad_enable_state" - android:key="touchpad_enable_doubletap" - android:title="@string/touchpad_double_tap_title" - android:summary="@string/touchpad_double_tap_summary" /> - - <CheckBoxPreference - android:dependency="touchpad_enable_state" - android:key="touchpad_enable_longpress" - android:title="@string/touchpad_long_press_title" - android:summary="@string/touchpad_long_press_summary" /> - -</PreferenceScreen> diff --git a/configpanel/res/xml/oclick_panel.xml b/configpanel/res/xml/oclick_panel.xml deleted file mode 100644 index 6e14eab..0000000 --- a/configpanel/res/xml/oclick_panel.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - - <Preference - android:key="oclick_connect" /> - - <PreferenceCategory - android:key="oclick_action_category" - android:enabled="false" - android:title="@string/action_category_title"> - - <CheckBoxPreference - android:defaultValue="true" - android:key="oclick_take_snapshot" - android:title="@string/oclick_take_snapshot_title" - android:summary="@string/oclick_take_snapshot_summary" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="oclick_find_my_phone" - android:title="@string/oclick_find_my_phone_title" - android:summary="@string/oclick_find_my_phone_summary" /> - - </PreferenceCategory> - - <PreferenceCategory - android:key="oclick_alert_category" - android:enabled="false" - android:title="@string/alert_category_title"> - - <CheckBoxPreference - android:defaultValue="true" - android:key="oclick_fence" - android:title="@string/oclick_fence_title" - android:summary="@string/oclick_fence_summary" /> - - <CheckBoxPreference - android:defaultValue="true" - android:key="oclick_disconnect_alert" - android:title="@string/oclick_disconnect_alert_title" - android:summary="@string/oclick_disconnect_alert_summary" /> - - </PreferenceCategory> - -</PreferenceScreen> diff --git a/configpanel/res/xml/touchscreen_panel b/configpanel/res/xml/touchscreen_panel deleted file mode 100644 index f2459ae..0000000 --- a/configpanel/res/xml/touchscreen_panel +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - - <CheckBoxPreference - android:key="touchscreen_gesture_double_tap" - android:title="@string/touchscreen_double_tap_gesture_title" - android:summary="@string/touchscreen_double_tap_gesture_summary" /> - - <CheckBoxPreference - android:key="touchscreen_gesture_camera" - android:title="@string/touchscreen_camera_gesture_title" - android:summary="@string/touchscreen_camera_gesture_summary" /> - - <CheckBoxPreference - android:key="touchscreen_gesture_music" - android:title="@string/touchscreen_music_gesture_title" - android:summary="@string/touchscreen_music_gesture_summary" /> - - <CheckBoxPreference - android:key="touchscreen_gesture_flashlight" - android:title="@string/touchscreen_flashlight_gesture_title" - android:summary="@string/touchscreen_flashlight_gesture_summary" /> - -</PreferenceScreen> diff --git a/configpanel/src/com/cyanogenmod/settings/device/BluetoothInputSettings.java b/configpanel/src/com/cyanogenmod/settings/device/BluetoothInputSettings.java deleted file mode 100644 index 3cf9cce..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/BluetoothInputSettings.java +++ /dev/null @@ -1,167 +0,0 @@ -package com.cyanogenmod.settings.device; - -import android.app.Activity; -import android.app.AlertDialog; -import android.app.ProgressDialog; -import android.bluetooth.BluetoothAdapter; -import android.bluetooth.BluetoothDevice; -import android.bluetooth.BluetoothDevicePicker; -import android.bluetooth.BluetoothGatt; -import android.bluetooth.BluetoothManager; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.IntentFilter; -import android.media.Ringtone; -import android.media.RingtoneManager; -import android.net.Uri; -import android.os.Bundle; -import android.os.Handler; -import android.preference.Preference; -import android.preference.Preference.OnPreferenceChangeListener; -import android.preference.PreferenceActivity; -import android.preference.PreferenceScreen; -import android.view.MenuItem; -import android.widget.Toast; - -import com.cyanogenmod.settings.device.utils.Constants; - -@SuppressWarnings("deprecation") -public class BluetoothInputSettings extends PreferenceActivity implements OnPreferenceChangeListener { - - static final String PROCESS_COMMAND_ACTION = "process_command"; - static final String COMMAND_KEY = "command"; - - private static final int BLUETOOTH_REQUEST_CODE = 1; - private static final int BLUETOOTH_PICKER_CODE = 2; - private static final String sOclickActionsCategory = "oclick_action_category"; - private static final String sOclickAlertCategory = "oclick_alert_category"; - private static final String sOclickConnectPreference = "oclick_connect"; - - private ProgressDialog mProgressDialog; - EventReceiver mReceiver; - boolean mConnected; - Ringtone mRingtone; - - class EventReceiver extends BroadcastReceiver { - @Override - public void onReceive(Context context, Intent intent) { - int commandKey = intent.getIntExtra(COMMAND_KEY, -1); - switch (commandKey) { - case BluetoothGatt.STATE_CONNECTED: - if (mProgressDialog != null) { - setConnectedState(true); - mProgressDialog.dismiss(); - Toast.makeText(context, "O-click connected", Toast.LENGTH_SHORT).show(); - } - break; - case BluetoothGatt.STATE_DISCONNECTED: - setConnectedState(false); - break; - } - } - } - - void setConnectedState(boolean enable) { - mConnected = enable; - findPreference(sOclickActionsCategory).setEnabled(enable); - findPreference(sOclickAlertCategory).setEnabled(enable); - findPreference(sOclickConnectPreference).setTitle(enable ? - R.string.oclick_disconnect_string : R.string.oclick_connect_string); - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - addPreferencesFromResource(R.xml.oclick_panel); - mReceiver = new EventReceiver(); - setConnectedState(OclickService.isConnectedToOclick); - getActionBar().setDisplayHomeAsUpEnabled(true); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - // Respond to the action bar's Up/Home button - case android.R.id.home: - finish(); - return true; - } - return super.onOptionsItemSelected(item); - } - - private boolean isBluetoothOn() { - BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); - BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter(); - return (bluetoothAdapter != null && bluetoothAdapter.isEnabled()); - } - - private void startBluetootDevicePicker() { - // Start bluetooth device picker - Intent i = new Intent(BluetoothDevicePicker.ACTION_LAUNCH); - i.putExtra(BluetoothDevicePicker.EXTRA_LAUNCH_PACKAGE, getPackageName()); - i.putExtra(BluetoothDevicePicker.EXTRA_LAUNCH_CLASS, BluetoothReceiver.class.getName()); - startActivityForResult(i, BLUETOOTH_PICKER_CODE); - } - - @Override - public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, - Preference preference) { - if (!preference.getKey().equals(Constants.OCLICK_CONNECT_KEY)) { - return super.onPreferenceTreeClick(preferenceScreen, preference); - } - if (mConnected) { - Intent i = new Intent(this, OclickService.class); - stopService(i); - setConnectedState(false); - } else { - if (!isBluetoothOn()) { - Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); - startActivityForResult(enableBtIntent, BLUETOOTH_REQUEST_CODE); - } else { - startBluetootDevicePicker(); - } - } - return true; - } - - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - return true; - } - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - if ((requestCode == BLUETOOTH_REQUEST_CODE) && (resultCode == Activity.RESULT_OK)) { - // Start bluetooth device picker - startBluetootDevicePicker(); - } else if (requestCode == BLUETOOTH_PICKER_CODE && isBluetoothOn()) { - String dialogTitle = this.getString(R.string.oclick_dialog_title); - String dialogMessage = this.getString(R.string.oclick_dialog_connecting_message); - mProgressDialog = ProgressDialog.show(this, dialogTitle, dialogMessage, true); - new Handler().postDelayed(new Runnable() { - @Override - public void run() { - if (mProgressDialog != null) { - mProgressDialog.dismiss(); - } - } - }, 10000); - } - } - - @Override - protected void onResume() { - super.onResume(); - IntentFilter filter = new IntentFilter(); - filter.addAction(PROCESS_COMMAND_ACTION); - registerReceiver(mReceiver, filter); - } - - @Override - protected void onPause() { - super.onPause(); - unregisterReceiver(mReceiver); - } -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/BluetoothReceiver.java b/configpanel/src/com/cyanogenmod/settings/device/BluetoothReceiver.java deleted file mode 100644 index 45d7f61..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/BluetoothReceiver.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.cyanogenmod.settings.device; - -import android.bluetooth.BluetoothDevice; -import android.bluetooth.BluetoothDevicePicker; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.text.TextUtils; - -public class BluetoothReceiver extends BroadcastReceiver { - @Override - public void onReceive(final Context context, final Intent intent) { - String action = intent.getAction(); - if (action.equals(BluetoothDevice.ACTION_ACL_CONNECTED) - || action.equals(BluetoothDevicePicker.ACTION_DEVICE_SELECTED)) { - if (!intent.hasExtra(BluetoothDevice.EXTRA_DEVICE)) { - return; - } - BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); - if (device == null || TextUtils.isEmpty(device.getName())) { - return; - } - String deviceName = device.getName().toLowerCase(); - if (deviceName.contains("oppo b") || deviceName.equals("o-click")) { - Intent i = new Intent(context, OclickService.class); - i.putExtra(BluetoothDevice.EXTRA_DEVICE, device); - context.startService(i); - } - } - } -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/GesturePadSettings.java b/configpanel/src/com/cyanogenmod/settings/device/GesturePadSettings.java deleted file mode 100644 index 650f2e1..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/GesturePadSettings.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.cyanogenmod.settings.device; - -import com.cyanogenmod.settings.device.utils.Constants; -import com.cyanogenmod.settings.device.utils.NodePreferenceActivity; - -import android.os.Bundle; -import android.os.IBinder; -import android.os.ServiceManager; -import android.preference.Preference; -import android.service.gesture.IGestureService; - -public class GesturePadSettings extends NodePreferenceActivity { - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - addPreferencesFromResource(R.xml.gesture_panel); - - Preference p = findPreference(Constants.TOUCHPAD_DOUBLETAP_KEY); - p.setOnPreferenceChangeListener(this); - p = findPreference(Constants.TOUCHPAD_LONGPRESS_KEY); - p.setOnPreferenceChangeListener(this); - } - - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - if (preference.getKey().equals(Constants.TOUCHPAD_DOUBLETAP_KEY)) { - IBinder b = ServiceManager.getService("gesture"); - IGestureService sInstance = IGestureService.Stub.asInterface(b); - Startup.toggleDoubleTap(this, sInstance, (Boolean) newValue); - return true; - } else if (preference.getKey().equals(Constants.TOUCHPAD_LONGPRESS_KEY)) { - IBinder b = ServiceManager.getService("gesture"); - IGestureService sInstance = IGestureService.Stub.asInterface(b); - Startup.toggleLongPress(this, sInstance, (Boolean) newValue); - return true; - } - return super.onPreferenceChange(preference, newValue); - } -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/KeyHandler.java b/configpanel/src/com/cyanogenmod/settings/device/KeyHandler.java deleted file mode 100644 index 940bf31..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/KeyHandler.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.cyanogenmod.settings.device; - -import android.app.ActivityManagerNative; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.hardware.input.InputManager; -import android.media.IAudioService; -import android.os.PowerManager; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.os.SystemClock; -import android.os.UserHandle; -import android.util.Log; -import android.view.InputDevice; -import android.view.KeyCharacterMap; -import android.view.KeyEvent; - -import com.android.internal.os.DeviceKeyHandler; -import com.android.internal.util.cm.NavigationRingHelpers; -import com.android.internal.util.cm.TorchConstants; - -public class KeyHandler implements DeviceKeyHandler { - - private static final String TAG = KeyHandler.class.getSimpleName(); - - // Supported scancodes - private static final int FLIP_CAMERA_SCANCODE = 249; - private static final int GESTURE_CIRCLE_SCANCODE = 250; - private static final int GESTURE_SWIPE_DOWN_SCANCODE = 251; - private static final int GESTURE_V_SCANCODE = 252; - private static final int GESTURE_LTR_SCANCODE = 253; - private static final int GESTURE_GTR_SCANCODE = 254; - - private final Context mContext; - private final PowerManager mPowerManager; - private static final IntentFilter TORCH_STATE_FILTER = - new IntentFilter(TorchConstants.ACTION_STATE_CHANGED); - - public KeyHandler(Context context) { - mContext = context; - mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); - } - - public boolean handleKeyEvent(KeyEvent event) { - if (event.getAction() != KeyEvent.ACTION_UP && event.getScanCode() != FLIP_CAMERA_SCANCODE) { - return false; - } - boolean consumed = false; - switch(event.getScanCode()) { - case FLIP_CAMERA_SCANCODE: - if (event.getAction() == KeyEvent.ACTION_UP) { - break; - } - case GESTURE_CIRCLE_SCANCODE: - wakeUpDismissKeyguard(); - Intent intent = new Intent(Intent.ACTION_CAMERA_BUTTON, null); - intent.putExtra(Intent.EXTRA_KEY_EVENT, event); - mContext.sendOrderedBroadcastAsUser(intent, UserHandle.CURRENT_OR_SELF, - null, null, null, 0, null, null); - consumed = true; - break; - case GESTURE_SWIPE_DOWN_SCANCODE: - dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE); - consumed = true; - break; - case GESTURE_V_SCANCODE: - if (NavigationRingHelpers.isTorchAvailable(mContext)) { - Intent torchIntent = new Intent(TorchConstants.ACTION_TOGGLE_STATE); - mContext.sendBroadcast(torchIntent); - if (!isTorchActive()) { - wakeUpDismissKeyguard(); - Intent i = TorchConstants.INTENT_LAUNCH_APP; - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - mContext.startActivity(i); - } - } - consumed = true; - break; - case GESTURE_LTR_SCANCODE: - dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_PREVIOUS); - consumed = true; - break; - case GESTURE_GTR_SCANCODE: - dispatchMediaKeyWithWakeLockToAudioService(KeyEvent.KEYCODE_MEDIA_NEXT); - consumed = true; - break; - } - return consumed; - } - - private void triggerVirtualKeypress(final int keyCode) { - InputManager im = InputManager.getInstance(); - long now = SystemClock.uptimeMillis(); - - final KeyEvent downEvent = new KeyEvent(now, now, KeyEvent.ACTION_DOWN, - keyCode, 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, - KeyEvent.FLAG_FROM_SYSTEM, InputDevice.SOURCE_KEYBOARD); - final KeyEvent upEvent = KeyEvent.changeAction(downEvent, KeyEvent.ACTION_UP); - - im.injectInputEvent(downEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); - im.injectInputEvent(upEvent, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); - } - - private void wakeUpDismissKeyguard() { - try { - ActivityManagerNative.getDefault().dismissKeyguardOnNextActivity(); - mPowerManager.wakeUp(SystemClock.uptimeMillis()); - } catch (RemoteException e) { - } - - } - - private boolean isTorchActive() { - Intent stateIntent = mContext.registerReceiver(null, TORCH_STATE_FILTER); - boolean active = stateIntent != null - && stateIntent.getIntExtra(TorchConstants.EXTRA_CURRENT_STATE, 0) != 0; - return active; - } - - private IAudioService getAudioService() { - IAudioService audioService = IAudioService.Stub.asInterface( - ServiceManager.checkService(Context.AUDIO_SERVICE)); - if (audioService == null) { - Log.w(TAG, "Unable to find IAudioService interface."); - } - return audioService; - } - - private void dispatchMediaKeyWithWakeLockToAudioService(int keycode) { - if (ActivityManagerNative.isSystemReady()) { - IAudioService audioService = getAudioService(); - if (audioService != null) { - try { - KeyEvent event = new KeyEvent(SystemClock.uptimeMillis(), - SystemClock.uptimeMillis(), KeyEvent.ACTION_DOWN, keycode, 0); - audioService.dispatchMediaKeyEventUnderWakelock(event); - event = KeyEvent.changeAction(event, KeyEvent.ACTION_UP); - audioService.dispatchMediaKeyEventUnderWakelock(event); - } catch (RemoteException e) { - Log.e(TAG, "dispatchMediaKeyEvent threw exception " + e); - } - } - } - } -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/OclickService.java b/configpanel/src/com/cyanogenmod/settings/device/OclickService.java deleted file mode 100644 index 8db58ae..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/OclickService.java +++ /dev/null @@ -1,290 +0,0 @@ -package com.cyanogenmod.settings.device; - -import java.util.Set; -import java.util.UUID; - -import android.app.Notification; -import android.app.NotificationManager; -import android.app.PendingIntent; -import android.app.Service; -import android.bluetooth.BluetoothAdapter; -import android.bluetooth.BluetoothDevice; -import android.bluetooth.BluetoothGatt; -import android.bluetooth.BluetoothGattCallback; -import android.bluetooth.BluetoothGattCharacteristic; -import android.bluetooth.BluetoothGattService; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SharedPreferences; -import android.content.SharedPreferences.OnSharedPreferenceChangeListener; -import android.hardware.input.InputManager; -import android.media.Ringtone; -import android.media.RingtoneManager; -import android.net.Uri; -import android.os.Handler; -import android.os.IBinder; -import android.os.SystemClock; -import android.preference.PreferenceManager; -import android.util.Log; -import android.view.InputDevice; -import android.view.KeyCharacterMap; -import android.view.KeyEvent; - -import com.cyanogenmod.settings.device.utils.Constants; - -public class OclickService extends Service implements OnSharedPreferenceChangeListener { - - private static final String TAG = OclickService.class.getSimpleName(); - private static final UUID sTriggerServiceUUID = UUID.fromString("0000ffe0-0000-1000-8000-00805f9b34fb"); - private static final UUID sTriggerCharacteristicUUIDv1 = UUID.fromString("0000ffe1-0000-1000-8000-00805f9b34fb"); - private static final UUID sTriggerCharacteristicUUIDv2 = UUID.fromString("f000ffe1-0451-4000-b000-000000000000"); - - private static final UUID sImmediateAlertServiceUUID = UUID.fromString("00001802-0000-1000-8000-00805f9b34fb"); //0-2 - private static final UUID sImmediateAlertCharacteristicUUID = UUID.fromString("00002a06-0000-1000-8000-00805f9b34fb"); - - private static final UUID sLinkLossServiceUUID = UUID.fromString("00001803-0000-1000-8000-00805f9b34fb"); // 0-3 - private static final UUID sLinkLossCharacteristicUUID = UUID.fromString("00002a06-0000-1000-8000-00805f9b34fb"); - - // private static final UUID sControllCharacteristicUUIDv1 = UUID.fromString("0000aa01-0000-1000-8000-00805f9b34fb"); - // private static final UUID sControllCharacteristicUUIDv2 = UUID.fromString("f000ffe2-0451-4000-b000-000000000000"); - - public static final String CANCEL_ALERT_PHONE = "cancel_alert_phone"; - - private BluetoothGatt mBluetoothGatt; - private Handler mHandler; - boolean mAlerting; - private Handler mRssiPoll = new Handler(); - private BluetoothDevice mOClickDevice; - - public static boolean isConnectedToOclick = false; - - @Override - public IBinder onBind(Intent intent) { - return null; - } - - private void sendCommand(int command) { - Log.d(TAG, "sendCommand : " + command); - Intent i = new Intent(BluetoothInputSettings.PROCESS_COMMAND_ACTION); - i.putExtra(BluetoothInputSettings.COMMAND_KEY, command); - sendBroadcast(i); - } - - private BluetoothGattCallback mGattCallback = new BluetoothGattCallback() { - - @Override - public void onConnectionStateChange(BluetoothGatt gatt, int status, final int newState) { - Log.d(TAG, "onConnectionStateChange " + status + " " + newState); - if (newState == BluetoothGatt.STATE_CONNECTED) { - mBluetoothGatt = gatt; - isConnectedToOclick = true; - gatt.discoverServices(); - } else if (newState == BluetoothGatt.STATE_DISCONNECTED) { - isConnectedToOclick = false; - stopSelf(); - } - sendCommand(newState); - } - - @Override - public void onServicesDiscovered(final BluetoothGatt gatt, int status) { - Log.d(TAG, "onServicesDiscovered " + status); - - // Register trigger notification (Used for camera/alarm) - BluetoothGattService service = gatt.getService(sTriggerServiceUUID); - BluetoothGattCharacteristic trigger = service.getCharacteristic(sTriggerCharacteristicUUIDv1); - - if (trigger == null) { - trigger = service.getCharacteristic(sTriggerCharacteristicUUIDv2); - } - gatt.setCharacteristicNotification(trigger, true); - - toggleRssiListener(); - - boolean alert = Constants.isPreferenceEnabled(getBaseContext(), Constants.OCLICK_DISCONNECT_ALERT_KEY, true); - service = mBluetoothGatt.getService(sLinkLossServiceUUID); - trigger = service.getCharacteristic(sLinkLossCharacteristicUUID); - byte[] value = new byte[1]; - value[0] = (byte) (alert ? 2 : 0); - trigger.setValue(value); - mBluetoothGatt.writeCharacteristic(trigger); - } - - @Override - public void onCharacteristicWrite(BluetoothGatt gatt, - BluetoothGattCharacteristic characteristic, int status) { - if (characteristic.getService().getUuid().equals(OclickService.sLinkLossServiceUUID)) { - Log.d(TAG, characteristic.getUuid() + " : " + characteristic.getValue()[0]); - BluetoothGattService service2 = mBluetoothGatt.getService(sImmediateAlertServiceUUID); - BluetoothGattCharacteristic trigger2 = service2.getCharacteristic(sImmediateAlertCharacteristicUUID); - byte[] values = new byte[1]; - values[0] = (byte) 0; - trigger2.setValue(values); - mBluetoothGatt.writeCharacteristic(trigger2); - } - } - - @Override - public void onReliableWriteCompleted(BluetoothGatt gatt, int status) { - Log.d(TAG, "onReliableWriteCompleted : " + status); - } - - @Override - public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) { - Log.d(TAG, "Characteristic changed " + characteristic.getUuid()); - - if (mTapPending) { - NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - - if (mRingtone.isPlaying()) { - Log.d(TAG, "Stopping ring alarm"); - mRingtone.stop(); - notificationManager.cancel(0); - return; - } - - Log.d(TAG, "Executing ring alarm"); - - mRingtone.play(); - mHandler.removeCallbacks(mSingleTapRunnable); - - Notification.Builder builder = new Notification.Builder(OclickService.this); - builder.setSmallIcon(R.drawable.locator_icon); - builder.setContentTitle("O-Click phone locator"); - builder.setContentText("Locator alert is playing. Tap to dismiss"); - builder.setAutoCancel(true); - builder.setOngoing(true); - - PendingIntent resultPendingIntent = PendingIntent.getBroadcast(getBaseContext(), 0, new Intent(CANCEL_ALERT_PHONE), 0); - builder.setContentIntent(resultPendingIntent); - notificationManager.notify(0, builder.build()); - - mTapPending = false; - return; - } - Log.d(TAG, "Setting single tap runnable"); - mTapPending = true; - mHandler.postDelayed(mSingleTapRunnable, 1500); - } - - - @Override - public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) { - Log.d(TAG, "Rssi value : " + rssi); - byte[] value = new byte[1]; - BluetoothGattCharacteristic charS = gatt.getService(sImmediateAlertServiceUUID) - .getCharacteristic(sImmediateAlertCharacteristicUUID); - if (rssi < -90 && !mAlerting) { - value[0] = 2; - charS.setValue(value); - mBluetoothGatt.writeCharacteristic(charS); - mAlerting = true; - } else if (rssi > -90 && mAlerting) { - value[0] = 0; - mAlerting = false; - charS.setValue(value); - mBluetoothGatt.writeCharacteristic(charS); - } - } - - }; - - boolean mTapPending = false; - - private Runnable mSingleTapRunnable = new Runnable() { - @Override - public void run() { - long now = SystemClock.uptimeMillis(); - InputManager im = InputManager.getInstance(); - im.injectInputEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, - KeyEvent.KEYCODE_CAMERA, 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, - InputDevice.SOURCE_KEYBOARD), InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); - im.injectInputEvent(new KeyEvent(now, now, KeyEvent.ACTION_UP,KeyEvent.KEYCODE_CAMERA, - 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD), - InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); - mTapPending = false; - - } - }; - private Ringtone mRingtone; - - private void toggleRssiListener() { - boolean fence = Constants.isPreferenceEnabled(getBaseContext(), Constants.OCLICK_FENCE_KEY, true); - mRssiPoll.removeCallbacksAndMessages(null); - if (fence) { - Log.d(TAG, "Enabling rssi listener"); - mRssiPoll.postDelayed(new Runnable() { - @Override - public void run() { - mBluetoothGatt.readRemoteRssi(); - mRssiPoll.postDelayed(this, 2000); - } - }, 100); - } - } - - @Override - public void onCreate() { - mHandler = new Handler(); - PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this); - IntentFilter filter = new IntentFilter(); - filter.addAction(CANCEL_ALERT_PHONE); - registerReceiver(mReceiver, filter); - Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM); - mRingtone = RingtoneManager.getRingtone(getApplicationContext(), notification); - } - - AlarmCancel mReceiver = new AlarmCancel(); - class AlarmCancel extends BroadcastReceiver { - @Override - public void onReceive(Context context, Intent intent) { - if (intent.getAction().equals(CANCEL_ALERT_PHONE)) { - if (mRingtone.isPlaying()) { - mRingtone.stop(); - } - } - } - }; - - @Override - public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, - String key) { - if (key.equals(Constants.OCLICK_FENCE_KEY)) { - toggleRssiListener(); - } else if (key.equals(Constants.OCLICK_DISCONNECT_ALERT_KEY)) { - boolean alert = Constants.isPreferenceEnabled(getBaseContext(), Constants.OCLICK_DISCONNECT_ALERT_KEY, true); - BluetoothGattService service = mBluetoothGatt.getService(sLinkLossServiceUUID); - BluetoothGattCharacteristic trigger = service.getCharacteristic(sLinkLossCharacteristicUUID); - byte[] value = new byte[1]; - value[0] = (byte) (alert ? 2 : 0); - trigger.setValue(value); - mBluetoothGatt.writeCharacteristic(trigger); - } - } - - @Override - public int onStartCommand(Intent intent, int flags, int startId) { - Log.d(TAG, "onstartCommand"); - if (intent != null && mBluetoothGatt == null) { - mOClickDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); - if (mOClickDevice == null) { - Log.e(TAG, "No bluetooth device provided"); - stopSelf(); - } - mOClickDevice.connectGatt(getBaseContext(), false, mGattCallback); - } - return Service.START_REDELIVER_INTENT; - } - - @Override - public void onDestroy() { - Log.d(TAG, "Service being killed"); - mRssiPoll.removeCallbacksAndMessages(null); - mBluetoothGatt.disconnect(); - mBluetoothGatt.close(); - PreferenceManager.getDefaultSharedPreferences(this).unregisterOnSharedPreferenceChangeListener(this); - unregisterReceiver(mReceiver); - } -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/Startup.java b/configpanel/src/com/cyanogenmod/settings/device/Startup.java deleted file mode 100644 index 503355e..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/Startup.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.cyanogenmod.settings.device; - -import android.app.PendingIntent; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.hardware.input.InputManager; -import android.os.IBinder; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.os.SystemClock; -import android.os.UserHandle; -import android.service.gesture.IGestureService; -import android.view.InputDevice; -import android.view.InputEvent; -import android.view.KeyCharacterMap; -import android.view.KeyEvent; - -import com.cyanogenmod.settings.device.utils.Constants; -import com.cyanogenmod.settings.device.utils.FileUtils; - -public class Startup extends BroadcastReceiver { - @Override - public void onReceive(final Context context, final Intent intent) { - if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { - // Restore nodes to saved preference values - for (String pref : Constants.sNodePreferenceMap.keySet()) { - boolean defaultValue = Constants.sNodeDefaultMap.get(pref).booleanValue(); - boolean value = Constants.isPreferenceEnabled(context, pref, defaultValue); - String node = Constants.sNodePreferenceMap.get(pref); - FileUtils.writeLine(node, value ? "1" : "0"); - } - - IBinder b = ServiceManager.getService("gesture"); - IGestureService sInstance = IGestureService.Stub.asInterface(b); - - // Set longPress event - toggleLongPress(context, sInstance, Constants.isPreferenceEnabled( - context, Constants.TOUCHPAD_LONGPRESS_KEY, false)); - - // Set doubleTap event - toggleDoubleTap(context, sInstance, Constants.isPreferenceEnabled( - context, Constants.TOUCHPAD_DOUBLETAP_KEY, false)); - } else if (intent.getAction().equals("cyanogenmod.intent.action.GESTURE_CAMERA")) { - long now = SystemClock.uptimeMillis(); - sendInputEvent(new KeyEvent(now, now, KeyEvent.ACTION_DOWN, - KeyEvent.KEYCODE_CAMERA, 0, 0, - KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD)); - sendInputEvent(new KeyEvent(now, now, KeyEvent.ACTION_UP,KeyEvent.KEYCODE_CAMERA, - 0, 0, KeyCharacterMap.VIRTUAL_KEYBOARD, 0, 0, InputDevice.SOURCE_KEYBOARD)); - } - } - - public static void toggleDoubleTap(Context context, IGestureService gestureService, boolean enable) { - PendingIntent pendingIntent = null; - if (enable) { - Intent doubleTapIntent = new Intent("cyanogenmod.intent.action.GESTURE_CAMERA", null); - pendingIntent = PendingIntent.getBroadcastAsUser( - context, 0, doubleTapIntent, 0, UserHandle.CURRENT); - } - try { - gestureService.setOnDoubleClickPendingIntent(pendingIntent); - } catch (RemoteException e) { - e.printStackTrace(); - } - } - - public static void toggleLongPress(Context context, IGestureService gestureService, boolean enable) { - PendingIntent pendingIntent = null; - if (enable) { - Intent longPressIntent = new Intent(Intent.ACTION_CAMERA_BUTTON, null); - pendingIntent = PendingIntent.getBroadcastAsUser( - context, 0, longPressIntent, 0, UserHandle.CURRENT); - } - try { - gestureService.setOnLongPressPendingIntent(pendingIntent); - } catch (RemoteException e) { - e.printStackTrace(); - } - } - - private void sendInputEvent(InputEvent event) { - InputManager inputManager = InputManager.getInstance(); - inputManager.injectInputEvent(event, - InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); - } -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java b/configpanel/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java deleted file mode 100644 index e20c7cf..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/TouchscreenGestureSettings.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.cyanogenmod.settings.device; - -import com.cyanogenmod.settings.device.utils.NodePreferenceActivity; - -import android.os.Bundle; - -public class TouchscreenGestureSettings extends NodePreferenceActivity { - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - addPreferencesFromResource(R.xml.touchscreen_panel); - } - -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/utils/Constants.java b/configpanel/src/com/cyanogenmod/settings/device/utils/Constants.java deleted file mode 100644 index 25c2e05..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/utils/Constants.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.cyanogenmod.settings.device.utils; - -import java.util.HashMap; -import java.util.Map; - -import android.content.Context; -import android.content.SharedPreferences; -import android.preference.PreferenceManager; - -public class Constants { - - // Preference keys - public static final String TOUCHPAD_STATE_KEY = "touchpad_enable_state"; - public static final String TOUCHPAD_LONG_PRESS_STATE_KEY = "touchpad_long_click_state"; - public static final String TOUCHPAD_DOUBLE_CLICK_STATE_KEY = "touchpad_double_tap_state"; - public static final String TOUCHPAD_DOUBLETAP_KEY = "touchpad_enable_doubletap"; - public static final String TOUCHPAD_LONGPRESS_KEY = "touchpad_enable_longpress"; - public static final String OCLICK_CONNECT_KEY = "oclick_connect"; - public static final String OCLICK_SNAPSHOT_KEY = "oclick_take_snapshot"; - public static final String OCLICK_FIND_PHONE_KEY = "oclick_find_my_phone"; - public static final String OCLICK_FENCE_KEY = "oclick_fence"; - public static final String OCLICK_DISCONNECT_ALERT_KEY = "oclick_disconnect_alert"; - public static final String TOUCHSCREEN_DOUBLE_TAP_GESTURE_KEY = "touchscreen_gesture_double_tap"; - public static final String TOUCHSCREEN_CAMERA_GESTURE_KEY = "touchscreen_gesture_camera"; - public static final String TOUCHSCREEN_MUSIC_GESTURE_KEY = "touchscreen_gesture_music"; - public static final String TOUCHSCREEN_FLASHLIGHT_GESTURE_KEY = "touchscreen_gesture_flashlight"; - - // Proc nodes - public static final String TOUCH_PAD_NODE = "/proc/touchpad/enable"; - public static final String TOUCHSCREEN_DOUBLE_TAP_NODE = "/proc/touchpanel/double_tap_enable"; - public static final String TOUCHSCREEN_CAMERA_NODE = "/proc/touchpanel/camera_enable"; - public static final String TOUCHSCREEN_MUSIC_NODE = "/proc/touchpanel/music_enable"; - public static final String TOUCHSCREEN_FLASHLIGHT_NODE = "/proc/touchpanel/flashlight_enable"; - - // Proc nodes default values - public static final boolean TOUCH_PAD_DEFAULT = false; - public static final boolean TOUCHSCREEN_DOUBLE_TAP_DEFAULT = true; - public static final boolean TOUCHSCREEN_CAMERA_DEFAULT = true; - public static final boolean TOUCHSCREEN_MUSIC_DEFAULT = true; - public static final boolean TOUCHSCREEN_FLASHLIGHT_DEFAULT = true; - - // Holds <preference_key> -> <proc_node> mapping - public static final Map<String, String> sNodePreferenceMap = new HashMap<String, String>(); - - // Holds <preference_key> -> <default_values> mapping - public static final Map<String, Boolean> sNodeDefaultMap = new HashMap<String, Boolean>(); - - static { - sNodePreferenceMap.put(TOUCHPAD_STATE_KEY, TOUCH_PAD_NODE); - sNodePreferenceMap.put(TOUCHSCREEN_DOUBLE_TAP_GESTURE_KEY, TOUCHSCREEN_DOUBLE_TAP_NODE); - sNodePreferenceMap.put(TOUCHSCREEN_CAMERA_GESTURE_KEY, TOUCHSCREEN_CAMERA_NODE); - sNodePreferenceMap.put(TOUCHSCREEN_MUSIC_GESTURE_KEY, TOUCHSCREEN_MUSIC_NODE); - sNodePreferenceMap.put(TOUCHSCREEN_FLASHLIGHT_GESTURE_KEY, TOUCHSCREEN_FLASHLIGHT_NODE); - - sNodeDefaultMap.put(TOUCHPAD_STATE_KEY, TOUCH_PAD_DEFAULT); - sNodeDefaultMap.put(TOUCHSCREEN_DOUBLE_TAP_GESTURE_KEY, TOUCHSCREEN_DOUBLE_TAP_DEFAULT); - sNodeDefaultMap.put(TOUCHSCREEN_CAMERA_GESTURE_KEY, TOUCHSCREEN_CAMERA_DEFAULT); - sNodeDefaultMap.put(TOUCHSCREEN_MUSIC_GESTURE_KEY, TOUCHSCREEN_MUSIC_DEFAULT); - sNodeDefaultMap.put(TOUCHSCREEN_FLASHLIGHT_GESTURE_KEY, TOUCHSCREEN_FLASHLIGHT_DEFAULT); - } - - public static boolean isPreferenceEnabled(Context context, String key, boolean defaultValue) { - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); - return preferences.getBoolean(key, defaultValue); - } -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/utils/FileUtils.java b/configpanel/src/com/cyanogenmod/settings/device/utils/FileUtils.java deleted file mode 100644 index d5912e0..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/utils/FileUtils.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2013 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.cyanogenmod.settings.device.utils; - -import android.util.Log; - -import java.io.BufferedReader; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.IOException; - -public final class FileUtils { - private static final String TAG = "FileUtils"; - - private FileUtils() { - // this class is not supposed to be instantiated - } - - /** - * Reads the first line of text from the given file - */ - public static String readOneLine(String fileName) { - String line = null; - BufferedReader reader = null; - - try { - reader = new BufferedReader(new FileReader(fileName), 512); - line = reader.readLine(); - } catch (IOException e) { - Log.e(TAG, "Could not read from file " + fileName, e); - } finally { - try { - if (reader != null) { - reader.close(); - } - } catch (IOException e) { - // ignored, not much we can do anyway - } - } - - return line; - } - - /** - * Writes the given value into the given file - * - * @return true on success, false on failure - */ - public static boolean writeLine(String fileName, String value) { - try { - FileOutputStream fos = new FileOutputStream(fileName); - fos.write(value.getBytes()); - fos.flush(); - fos.close(); - } catch (IOException e) { - Log.e(TAG, "Could not write to file " + fileName, e); - return false; - } - - return true; - } -} diff --git a/configpanel/src/com/cyanogenmod/settings/device/utils/NodePreferenceActivity.java b/configpanel/src/com/cyanogenmod/settings/device/utils/NodePreferenceActivity.java deleted file mode 100644 index 99a6617..0000000 --- a/configpanel/src/com/cyanogenmod/settings/device/utils/NodePreferenceActivity.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.cyanogenmod.settings.device.utils; - - -import android.os.Bundle; -import android.preference.CheckBoxPreference; -import android.preference.Preference; -import android.preference.Preference.OnPreferenceChangeListener; -import android.preference.PreferenceActivity; -import android.text.TextUtils; -import android.view.MenuItem; - - -public class NodePreferenceActivity extends PreferenceActivity implements OnPreferenceChangeListener { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getActionBar().setDisplayHomeAsUpEnabled(true); - } - - - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - String node = Constants.sNodePreferenceMap.get(preference.getKey()); - if (!TextUtils.isEmpty(node)) { - Boolean value = (Boolean) newValue; - FileUtils.writeLine(node, value ? "1" : "0"); - return true; - } - return false; - } - - - @Override - public void addPreferencesFromResource(int preferencesResId) { - super.addPreferencesFromResource(preferencesResId); - // Initialize node preferences - for (String pref : Constants.sNodePreferenceMap.keySet()) { - CheckBoxPreference b = (CheckBoxPreference) findPreference(pref); - if (b == null) continue; - b.setOnPreferenceChangeListener(this); - String node = Constants.sNodePreferenceMap.get(pref); - String curNodeValue = FileUtils.readOneLine(node); - b.setChecked(curNodeValue.equals("1")); - } - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch (item.getItemId()) { - // Respond to the action bar's Up/Home button - case android.R.id.home: - finish(); - return true; - } - return super.onOptionsItemSelected(item); - } -} diff --git a/configs/egl.cfg b/configs/egl.cfg deleted file mode 100644 index 2a11ba2..0000000 --- a/configs/egl.cfg +++ /dev/null @@ -1,2 +0,0 @@ -0 0 android -0 1 adreno diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml deleted file mode 100644 index 56d6b8d..0000000 --- a/configs/media_codecs.xml +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2012-2013, The Linux Foundation. All rights reserved. - Not a contribution. - - Copyright (C) 2012 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<MediaCodecs> - <Encoders> - <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" /> - <MediaCodec name="OMX.qcom.audio.encoder.evrc" type="audio/evrc" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports" /> - </MediaCodec> - <MediaCodec name="OMX.google.flac.encoder" type="audio/flac"/> - <MediaCodec name="OMX.qcom.audio.encoder.qcelp13" type="audio/qcelp" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports" /> - </MediaCodec> - <MediaCodec name="AACEncoder" type="audio/mp4a-latm" /> - <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" /> - <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" /> - <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="requires-loaded-to-idle-after-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="requires-loaded-to-idle-after-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="requires-loaded-to-idle-after-allocation"/> - </MediaCodec> - - <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" /> - </Encoders> - <Decoders> - <!-- Audio Hardware --> - <MediaCodec name="OMX.qcom.audio.decoder.wma" type="audio/x-ms-wma" > - <Quirk name="requires-global-flush" /> - <Quirk name="requires-wma-pro-component" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.audio.decoder.wmaLossLess" type="audio/x-ms-wma" > - <Quirk name="requires-global-flush" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.audio.decoder.wma10Pro" type="audio/x-ms-wma" > - <Quirk name="requires-global-flush" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.audio.decoder.amrwbplus" type="audio/amr-wb-plus" > - </MediaCodec> - <!-- Audio Software --> - <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" /> - <MediaCodec name="OMX.google.gsm.decoder" type="audio/gsm" /> - <MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg" /> - <MediaCodec name="MP3Decoder" type="audio/mpeg" /> - <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" /> - <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" /> - <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" /> - <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw" /> - <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw" /> - <MediaCodec name="OMX.qcom.audio.decoder.Qcelp13" type="audio/qcelp" > - <Quirk name="requires-global-flush" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.audio.decoder.evrc" type="audio/evrc" > - <Quirk name="requires-global-flush" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.decoder.vc1" type="video/x-ms-wmv" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports" /> - <Quirk name="defers-output-buffer-allocation" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.decoder.divx" type="video/divx" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports" /> - <Quirk name="defers-output-buffer-allocation" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.decoder.divx311" type="video/divx311" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports" /> - <Quirk name="defers-output-buffer-allocation" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.decoder.divx4" type="video/divx4" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports" /> - <Quirk name="defers-output-buffer-allocation" /> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="defers-output-buffer-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="defers-output-buffer-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="defers-output-buffer-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" > - <Quirk name="requires-allocate-on-input-ports" /> - <Quirk name="requires-allocate-on-output-ports"/> - <Quirk name="defers-output-buffer-allocation"/> - </MediaCodec> - <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" /> - <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" /> - <MediaCodec name="OMX.google.h264.decoder" type="video/avc" /> - <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" /> - <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" /> - </Decoders> -</MediaCodecs> diff --git a/configs/nfcee_access.xml b/configs/nfcee_access.xml deleted file mode 100644 index c5b4569..0000000 --- a/configs/nfcee_access.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - -<signer android:signature="308203fe308202e6a003020102020900f2455c28029a1705300d06092a864886f70d0101050500305d310b300906035504061302434e3111300f060355040813085368616e676861693111300f060355040713085368616e67686169310c300a060355040a13034e5850310c300a060355040b13034e5850310c300a060355040313034e5850301e170d3133303930333132353035385a170d3431303131393132353035385a305d310b300906035504061302434e3111300f060355040813085368616e676861693111300f060355040713085368616e67686169310c300a060355040a13034e5850310c300a060355040b13034e5850310c300a060355040313034e585030820120300d06092a864886f70d01010105000382010d00308201080282010100c3800fc6e4e9809b7930280cc48e687c51739e837418fc3760fad42d5e6cd27cb510b5d459d9c76258cc95acc2a445ea104ce91d589f0773dd47041ed007f7bd258c07ee0650158dec977a01c0c09419d738a53c3e4de3f2af2e7fc7d00dbce5984b31c298ad25eec190079727e5fbf65c79da0075840b2acc20bd73ce5b86d6e2fbd99cbe90783470e47e45cd66535178bd27c0a2655e7232c902a114a93bcae66fbe71284fcd5b1083c8bf01f1255acf7bf47f35de670ccde27e8c5dafe231edb614ff94604ff45eda9ccac084254a1819d65a016b1b5a725729dce73196f8b1298ca4f9579f3ce054b2c96397d28a64f52d027dd811d7bb375160a12ab55b020103a381c23081bf301d0603551d0e0416041422cd93b4043f16f9aba0bf2a5a48bcac61dab59e30818f0603551d23048187308184801422cd93b4043f16f9aba0bf2a5a48bcac61dab59ea161a45f305d310b300906035504061302434e3111300f060355040813085368616e676861693111300f060355040713085368616e67686169310c300a060355040a13034e5850310c300a060355040b13034e5850310c300a060355040313034e5850820900f2455c28029a1705300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100172adb9a27787545815f779e4b800f7e5b56a052ea113786b94ff186ce54f45765593f3be35050da707e661fd6ba557a75119efbc07a8b49148c9b3bf32c42d61d6265f003dbb5f9df3a37030ecaeaca454ed4b7ceba5c994cd5d552ef21c34cdbc8a0353f57dd009f8b8f8b0013dceabce6779cc15b4b157d1fa4c2a33d493744154670958acd786eaa3db0008f588a65e84c7f358b018f7d4fabd8cbd4f8c2fb9e289faf114d4c21a20f3caa23e10bb9e1a71f1c4df90abcba3cd1f39ad105b5b1a1b87095192b2f5feb4a6a32d63a11eb1c9cedb5597e2e12445a9c3a793370f3e16f14a14323479352159f01410b4a16702f9ee8b8f40c67d8a5d2a17f17" -> - <package android:name="com.nxp.nfceeapi.service" /> -</signer> - - <signer android:signature="308203ae30820296a003020102020450459256300d06092a864886f70d0101050500308198310b300906035504061302434e31123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e312e302c060355040a13255269636820486f75736520476c6f62616c20546563686e6f6c6f677920436f2e2c204c746431143012060355040b130b456e67696e656572696e67311c301a0603550403131372696368686f757365676c6f62616c2e636f6d301e170d3132303930343035333230365a170d3334303833303035333230365a308198310b300906035504061302434e31123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e312e302c060355040a13255269636820486f75736520476c6f62616c20546563686e6f6c6f677920436f2e2c204c746431143012060355040b130b456e67696e656572696e67311c301a0603550403131372696368686f757365676c6f62616c2e636f6d30820122300d06092a864886f70d01010105000382010f003082010a0282010100ac9b3e1579a5aa8bb8e4287945e795530b9601d9e6b7a013ed06277b0c0ba7a46098f55b82a6dcd8f8a3df4b8bf0b5986fa8940a51aec95fb8859dc1c8c0f4ad34cb3f37fb3f44d96fc3af3e9ef690200b9419b3d2b3286f50016c85f2d7bf47d7e06c5bdc2b57bc5d708d904ab978fc9e96d338bff51e23eb2feb0a8a56568d46533574be985b6d6ace9b568c7cb019db63fd73e515bfd8d35e21afa2ed92c64e1719f74f5f14b1a275d18bee6aa3f126bb387ea6314ea3a356b4bb65db32bf9b9e289236b30812ce89f6f79d8bd254f070f0c316e39d22d4034811cffdaa5104a971afb1ef90205ef8ee9da574d4e3cad45f34be5e40b45b28fe19f32e4fff0203010001300d06092a864886f70d010105050003820101003ec33aa2fa0aca7a2cf9951ecc89341df2d5862c67f13ef355325a77bb9bd2c79e4120126e80c6c0cd556ec1a681f3118a8047456b3d30b58f585c599853f1ba4deb70730cce8e85ff47dc46c3c442bedc125c292303bcb2e8eaa627ef2fd42d0bd70fa0ec2d051e0318a1bf329bc875f2c51c2d87750bff892ca0d27028901446b318b62d32fe8c4eda4f422b4f1eb28364bb4cab6281c3023149d8f9847db2efb1977ac6500a414a5eeac2de5d208eb76f3dbde51afafa37348d7d765a0111e945dc8cd4565464500408be92fd89b807e4c6fa899b740b99b9f476ecfe701b1c4060e1b4e36d493a67c55f896977eec8613d847b06dd98936db98560cd325e" /> - - <signer android:signature="308203ae30820296a003020102020450459170300d06092a864886f70d0101050500308198310b300906035504061302434e31123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e312e302c060355040a13255269636820486f75736520476c6f62616c20546563686e6f6c6f677920436f2e2c204c746431143012060355040b130b456e67696e656572696e67311c301a0603550403131372696368686f757365676c6f62616c2e636f6d301e170d3132303930343035323831365a170d3334303833303035323831365a308198310b300906035504061302434e31123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e312e302c060355040a13255269636820486f75736520476c6f62616c20546563686e6f6c6f677920436f2e2c204c746431143012060355040b130b456e67696e656572696e67311c301a0603550403131372696368686f757365676c6f62616c2e636f6d30820122300d06092a864886f70d01010105000382010f003082010a0282010100a97823afdfe14e242a00320ef06ee9b4d9933162d0e5d5ba8c0772bc1feb8dc126bbb3593253c33ebe4e5a9c725bd3b5777f783f51a0e474dbed76d2d3f0c80e66f717da4a01356d4d83531ad2037290f3b2d6cc6a8896cb9f5048f2fd19df2faa3d0b15759e5ca10f1e4e16a7dd2e3c9eeda9a0a34c50b2ba5258ae815581cd253a4444d51d5ceb209e76da6434208c43fe3447b63d19866fda7a26c7c72a97c20f789614581c6f3d94db58ecb6b449f6a085d62a8bb2d660e92ec8c0f2bf76a6c8c8d3a6239d8cb38d7383e13f0c4c15de4a58a51fab2dfb3d10664e1e55ec2ea180285b2c363e21c42696fb38840a4bb3601fd77d09527e2c45644363a2a90203010001300d06092a864886f70d010105050003820101007503a365ecd79316787fec6ef427244f2c7a54537a1bc3191258f40e0ee67ad3c28dc4fea7ff0581dbd76df096ed24740fbfda4ac16ed05e2888fbf347c5f4003cef9545cc1d46587323b41e9843d1062ac338a40caf3002056cf06495c7aaf1a11ccc4537df6bc3724261d019e295bba7a16d7bd47f6acdf72ed4eb1dcb2280d80de0567a48f453d0c1543849f203c52486cc95d17cd97d9e8dfd04f7d237664b1d7356a9440a79e908977b799dd58799edfaa5a6810efc4c4041c0ccee452e711719bf78f28594f31843271296399b990ece20ebea9145cc64bad769d639975dcf72054ab303eba95d76733422b88b7e649c2bca26aeacd5583c44cb644e4f" /> - -</resources> diff --git a/configs/nfcee_access_debug.xml b/configs/nfcee_access_debug.xml deleted file mode 100644 index a96a2d1..0000000 --- a/configs/nfcee_access_debug.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <!-- Applications granted NFCEE access on userdebug/eng builds - - See packages/apps/Nfc/etc/sample_nfcee_access.xml for full documentation. - --> - - <!-- Google Wallet dev signature --> - <signer android:signature="3082044c30820334a003020102020900de7695041d7650c0300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303332345a170d3338303830393031303332345a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100e6ff3defe92aa10d71eb0fa6408bc036b7e243eeed68a6a4763dc7a52a31757cdac61fe510bb73c716e4000104265b347fcecef4c42bf1e1379dd0a876f028227fbbc1f9bdd5d713b2f6a935a379d2cba9c96f92d2d0787c11f1eb19548008a6a072b34b91836cfa0ae1276780e9007530166986a11c9cef46cef7c704806dde9431fb60284d120ab0e7de1d633f07687d468c51139afffdc6bc9a207ca904b8be1da0aa7b4e97756f43606488be5cae3c68e8bb7942cdf51607c930a2fcda655b75d0759cba89ad06e739bd0ba29b1f404296c2c0a85a847f5ab0d067c6c3ec9c49212042ac63a7e53b546c65b46080b4e3e680e23e1f77cfe7f6de744b1a65020103a381dc3081d9301d0603551d0e04160414a2e89064b05d08865c34db930a9d840050117aec3081a90603551d230481a130819e8014a2e89064b05d08865c34db930a9d840050117aeca17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900de7695041d7650c0300c0603551d13040530030101ff300d06092a864886f70d010105050003820101003771870ce87c3c52ea84899230c6e962d94b4d5f1293c25d88261541fd90b5555d1285cef3b8312c3f5df691a8aae04cb981b305e427fd1d2d9e1987e1d29078f13c8452990f1821980263d8d4bd36519348d8d8ba26d8b99fbf09f5fd3ebb0ea3c2f0c9376f1e1fca76f3a6a405429d081b752a7a90b756e9ab44da41abc8e1e8f88ac2758da743fb73e650719a57840ccb6b7add21b99fc681e456e1872c223d5c074adf55f6abda268c2d8b64ea0a8845eecd968f92b493127e75c753c3ff30cbc678b51c9f52961472f17da20a0dc6274aa2463434c1a9b614df697d8ff5ca8101e7a25c7db3fb055d65569c04b01d389cabba57b3a1703ec2e74a88d334" /> - - <!-- Google wallet release signature --> - <signer android:signature="3082044c30820334a003020102020900a8cd17c93da5d990300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303635335a170d3338303830393031303635335a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100c30f88add9b492096a2c586a5a9a80356bfa026958f8ff0c5dfaf59f49268ad870dee821a53e1f5b170fc96245a3c982a7cb4527053be35e34f396d24b2291ec0c528d6e26927465e06875ea621f7ff98c40e3345b204907cc9354743acdaace65565f48ba74cd4121cdc876df3522badb095c20d934c56a3e5c393ee5f0e02f8fe0621f918d1f35a82489252c6fa6b63392a7686b3e48612d06a9cf6f49bff11d5d96289c9dfe14ac5762439697dd29eafdb9810de3263513a905ac8e8eaf20907e46750a5ab7bf9a77262f47b03f5a3c6e6d7b51343f69c7f725f70bcc1b4ad592250b705a86e6e83ee2ae37fe5701bcbdb26feefdfff60f6a5bdfb5b64793020103a381dc3081d9301d0603551d0e041604141ccece0eea4dc1121fc7515f0d0a0c72e08cc96d3081a90603551d230481a130819e80141ccece0eea4dc1121fc7515f0d0a0c72e08cc96da17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900a8cd17c93da5d990300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100a470c728e1d31b06d9af6ae768b565046c57806b9843724931d75d4ca10c321520d33ccfed2aa65462234c9ef9b6f910cc676b99cb7f9895d6c06763574fbb78331275dc5cf38fbaa918d7938c051ffba2ade8f303cde8d9e68a048d1fdb9e7c9f2a49b222c68fff422bf15569b85eeeedb04aa30873dbe64b9c9e74f8f2c2f6c40124aaa8d1780d18512b540add28b3e9581971a4170dd868cf5f31e44712b2c23bb51037d7ef9f87a6e5bdb35e2ceb6bb022636c17a56a96bc7a50258c0bd2ed7b31555a18452e17321a0d52838c82f63f742d74ff79586a5cbb7faf7198a84bcf744310e9e927597f00a23dd00660800c2238d90b2fb372dfdbba75bd852e" /> - - <!-- Platform dev-keys signature --> - <signer android:signature="308204a830820390a003020102020900bcdfe81405d5c69e300d06092a864886f70d0101050500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3131303931393230303634325a170d3339303230343230303634325a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100ef7a8a34d8151d0479a239903261fe5026c520d5d88cd65920c98e096d2770f49636da9ffc4e80c472b05bd62a435f8266912aa2a34a18f6f4856f9ef52c10b88c267627136726823e8f3389b051ba92920e10bbaae0e38879efbe681b05863b655d81a6f3b75a85eb230b38b23ea4ef56f2161ff01652ae2049881adbe60d3bf8b5386a81f7404c0cf0c111c0a35ab0a9760426e4af12add73327ec433e047e3517f47a2d3674c2b819354d56eb7fd6c9aa67dd05b4bb1ca8a7e1946c2494e9364ea677a25481ac81f434bff3dd56e93e59fccef0e24a753461cd1cf15f22b62251d07416057ac5ca3e03a24f7f4eca876bacc5a1828acbde04c5cfdb608c47020103a381fc3081f9301d0603551d0e0416041402f997668541fa74693bea699a5766893a362a5d3081c90603551d230481c13081be801402f997668541fa74693bea699a5766893a362a5da1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900bcdfe81405d5c69e300c0603551d13040530030101ff300d06092a864886f70d0101050500038201010047d6fb32cadeae4444c379b3441ff9ba10990c23d10472c54fb7ebd9c33b2a173836337e1c175c980847a8894f6a99782e9c2e2133629254295fe52749f93ec1e39d213dd06d0ba99de3b6b5d4d856fafe74e08113b7b23a1b56f4918ed41218a03b9564456480b665200267d3770a9463db413c6a47bd81d725cb7d39c9d0941693c59cbe727d40415f0815c3c8363fb8fa2e028ceeb3bbfbc6b119db5b72f0edb0bb417bfcbf74d9fa069de22afe56a50bcde7ea1078749bb9ec0adc0e6de045641ee3a82c576645160b4ab9710d3cb3201f23957da8de9084c0bec93ad1c8c2054195f13c926db07c8bdf15673acf6d791ec1d3a0d7e1b3470447acd95873" /> - -</resources> diff --git a/configs/sec_config b/configs/sec_config deleted file mode 100644 index 62e5097..0000000 --- a/configs/sec_config +++ /dev/null @@ -1,5 +0,0 @@ -/* IPC Security Config */ -/* <GPS QMI Service ID - 16>:<GPS QMI Instance ID - all instances>:<Client Group ID> */ -16:4294967295:1000:3004 -/* Allow SS CTL service to be used by system and net_raw processes */ -43:4294967295:1000:3004 diff --git a/configs/thermal-engine-8064.conf b/configs/thermal-engine-8064.conf deleted file mode 100644 index 77e2d72..0000000 --- a/configs/thermal-engine-8064.conf +++ /dev/null @@ -1,38 +0,0 @@ -sampling 5000 - -[CPU0_MONITOR] -algo_type monitor -sensor cpu0 -sampling 1000 -thresholds 90000 100000 110000 115000 120000 -thresholds_clr 85000 95000 105000 110000 115000 -actions battery battery battery battery shutdown -action_info 0 1 2 3 5000 - -[CPU1_MONITOR] -algo_type monitor -sensor cpu1 -sampling 1000 -thresholds 120000 -thresholds_clr 115000 -actions shutdown -action_info 5000 - -[CPU2_MONITOR] -algo_type monitor -sensor cpu2 -sampling 1000 -thresholds 120000 -thresholds_clr 115000 -actions shutdown -action_info 5000 - -[CPU3_MONITOR] -algo_type monitor -sensor cpu3 -sampling 1000 -thresholds 120000 -thresholds_clr 115000 -actions shutdown -action_info 5000 - diff --git a/configs/thermald-8064.conf b/configs/thermald-8064.conf deleted file mode 100644 index 66763ec..0000000 --- a/configs/thermald-8064.conf +++ /dev/null @@ -1,92 +0,0 @@ -sampling 5000 - -[pa_therm0] -sampling 5000 -thresholds 55 -thresholds_clr 50 -actions none -action_info 0 - -[tsens_tz_sensor0] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions gpu+cpu gpu+cpu cpu cpu cpu cpu cpu shutdown -action_info 400000000+1728000 320000000+1566000 1134000 918000 702000 486000 384000 5000 - -[tsens_tz_sensor1] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions gpu+cpu gpu+cpu cpu cpu cpu cpu cpu shutdown -action_info 400000000+1728000 320000000+1566000 1134000 918000 702000 486000 384000 5000 - -[tsens_tz_sensor2] -sampling 2000 -thresholds 55 60 65 69 85 120 -thresholds_clr 50 55 60 65 75 115 -actions gpu+cpu gpu+cpu cpu cpu cpu shutdown -action_info 400000000+1728000 320000000+1566000 1134000 702000 384000 5000 - -[tsens_tz_sensor3] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions cpu cpu cpu cpu cpu cpu cpu shutdown -action_info 1728000 1566000 1134000 918000 702000 486000 384000 5000 - -[tsens_tz_sensor4] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions cpu cpu cpu cpu cpu cpu cpu shutdown -action_info 1728000 1566000 1134000 918000 702000 486000 384000 5000 - -[tsens_tz_sensor5] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions cpu cpu cpu cpu cpu cpu cpu shutdown -action_info 1728000 1566000 1134000 918000 702000 486000 384000 5000 - -[tsens_tz_sensor6] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions cpu cpu cpu cpu cpu cpu cpu shutdown -action_info 1728000 1566000 1134000 918000 702000 486000 384000 5000 - -[tsens_tz_sensor7] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions cpu+battery cpu+battery cpu+battery cpu+battery cpu+battery cpu+battery cpu+battery shutdown -action_info 1728000+0 1566000+0 1134000+1 918000+1 702000+2 486000+2 384000+3 5000 - -[tsens_tz_sensor8] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions cpu cpu cpu cpu cpu cpu cpu shutdown -action_info 1728000 1566000 1134000 918000 702000 486000 384000 5000 - -[tsens_tz_sensor9] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions cpu cpu cpu cpu cpu cpu cpu shutdown -action_info 1728000 1566000 1134000 918000 702000 486000 384000 5000 - -[tsens_tz_sensor10] -sampling 2000 -thresholds 55 60 65 69 75 87 95 120 -thresholds_clr 50 55 60 65 69 75 87 115 -actions cpu cpu cpu cpu cpu cpu cpu shutdown -action_info 1728000 1566000 1134000 918000 702000 486000 384000 5000 - -[pm8821_tz] -thresholds 107 -thresholds_clr 103 -actions cpu -action_info 918000 - diff --git a/conn_init/Android.mk b/conn_init/Android.mk deleted file mode 100644 index 52c0f57..0000000 --- a/conn_init/Android.mk +++ /dev/null @@ -1,87 +0,0 @@ -# -# Copyright 2012 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -ifneq ($(filter n1,$(TARGET_DEVICE)),) - -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := libwfcu -LOCAL_SRC_FILES := wfc_util_fctrl.c \ - wfc_util_common.c -LOCAL_CFLAGS := -Wall \ - -Werror -LOCAL_CFLAGS += -DCONFIG_LGE_WLAN_WIFI_PATCH -ifeq ($(BOARD_HAS_QCOM_WLAN), true) -LOCAL_SRC_FILES += wfc_util_qcom.c -LOCAL_CFLAGS += -DCONFIG_LGE_WLAN_QCOM_PATCH -LOCAL_CFLAGS += -DWLAN_CHIP_VERSION_WCNSS -endif -LOCAL_SHARED_LIBRARIES := libcutils liblog -LOCAL_PRELINK_MODULE := false -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := qcom -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := conn_init.c -LOCAL_SHARED_LIBRARIES := libcutils liblog -LOCAL_SHARED_LIBRARIES += libwfcu -LOCAL_CFLAGS += -Wall -Werror -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_PATH := $(TARGET_OUT)/bin -LOCAL_MODULE := conn_init -LOCAL_MODULE_OWNER := qcom - -# Make sure the symlinks get created as well. -LOCAL_REQUIRED_MODULES := WCNSS_qcom_cfg.ini WCNSS_qcom_wlan_nv.bin -include $(BUILD_EXECUTABLE) - -include $(CLEAR_VARS) -LOCAL_MODULE := WCNSS_qcom_cfg.ini -LOCAL_MODULE_CLASS := FAKE -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := qcom -include $(BUILD_SYSTEM)/base_rules.mk -$(LOCAL_BUILT_MODULE): TARGET := /data/misc/wifi/$(LOCAL_MODULE) -$(LOCAL_BUILT_MODULE): SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/prima/$(LOCAL_MODULE) -$(LOCAL_BUILT_MODULE): - $(hide) echo "Symlink: $(SYMLINK) -> $(TARGET)" - $(hide) mkdir -p $(dir $@) - $(hide) mkdir -p $(dir $(SYMLINK)) - $(hide) rm -rf $@ - $(hide) rm -rf $(SYMLINK) - $(hide) ln -sf $(TARGET) $(SYMLINK) - $(hide) touch $@ - -include $(CLEAR_VARS) -LOCAL_MODULE := WCNSS_qcom_wlan_nv.bin -LOCAL_MODULE_CLASS := FAKE -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := qcom -include $(BUILD_SYSTEM)/base_rules.mk -$(LOCAL_BUILT_MODULE): TARGET := /data/misc/wifi/$(LOCAL_MODULE) -$(LOCAL_BUILT_MODULE): SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/prima/$(LOCAL_MODULE) -$(LOCAL_BUILT_MODULE): - $(hide) echo "Symlink: $(SYMLINK) -> $(TARGET)" - $(hide) mkdir -p $(dir $@) - $(hide) mkdir -p $(dir $(SYMLINK)) - $(hide) rm -rf $@ - $(hide) rm -rf $(SYMLINK) - $(hide) ln -sf $(TARGET) $(SYMLINK) - $(hide) touch $@ - -endif diff --git a/conn_init/NOTICE b/conn_init/NOTICE deleted file mode 100644 index 33ff961..0000000 --- a/conn_init/NOTICE +++ /dev/null @@ -1,190 +0,0 @@ - - Copyright (c) 2005-2012, The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/conn_init/conn_init.c b/conn_init/conn_init.c deleted file mode 100644 index 6c0d835..0000000 --- a/conn_init/conn_init.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include <stdio.h> -#include <string.h> -#include <unistd.h> - -#include "wfc_util_log.h" -#include "cutils/properties.h" - -extern int wfc_util_qcom_check_config(unsigned char *nv_mac_addr); -extern void wfc_util_atoh(char *pAsciiString, int szAsciiString, unsigned char *pHexaBuff, int szHexaBuff); - -static int wifi_check_qcom_cfg_files() -{ - char raw[6]; - char mac[6]; - - memset(raw, 0, 6); - memset(mac, 0, 6); - - // Read MAC String - FILE *fp = NULL; - int n = 0; - - fp = fopen("/data/opponvitems/4678", "r"); - if (fp == NULL) { - wfc_util_qcom_check_config((unsigned char *)raw); - return 0; - - } else { - - n = fread(raw, 6, 1, fp); - fclose(fp); - - // swap bytes - mac[0] = raw[5]; - mac[1] = raw[4]; - mac[2] = raw[3]; - mac[3] = raw[2]; - mac[4] = raw[1]; - mac[5] = raw[0]; - - wfc_util_qcom_check_config((unsigned char *)mac); - } - return 1; -} - -int main(void) -{ - wifi_check_qcom_cfg_files(); - - return 0; -} diff --git a/conn_init/wfc_util_common.c b/conn_init/wfc_util_common.c deleted file mode 100644 index b149920..0000000 --- a/conn_init/wfc_util_common.c +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> - -#include "wfc_util_log.h" - -#define WFC_UTIL_RANDOM_MAC_HEADER "001122" - -void wfc_util_htoa(unsigned char *pHexaBuff, int szHexaBuff, char *pAsciiStringBuff, int szAsciiStringBuff) -{ - int i, j; - char hex_table[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'A', 'B', 'C', 'D', 'E', 'F'}; - - if ((szHexaBuff*2) > szAsciiStringBuff) { - wfc_util_log_error("wfc_util_htoa : not enough buffer size(%d)", szAsciiStringBuff); - return; - } - - memset(pAsciiStringBuff, 0, szAsciiStringBuff); - - /* for (i = szHexaBuff-1, j = 0; i >= 0; i--, j += 2) { */ - for (i = 0, j = 0; i < szHexaBuff; i++, j += 2) { - /*pAsciiStringBuff[j] = hex_table[(pHexaBuff[i] >> 4) & 0x0F]; - */ - pAsciiStringBuff[j] = hex_table[pHexaBuff[i] >> 4]; - pAsciiStringBuff[j + 1] = hex_table[pHexaBuff[i] & 0x0F]; - } - - return; -} - -void wfc_util_atoh(char *pAsciiString, int szAsciiString, unsigned char *pHexaBuff, int szHexaBuff) -{ - int i, pos; - char temp; - - if ( 0!=(szAsciiString%2) || (szHexaBuff*2) < szAsciiString) { - wfc_util_log_error("wfc_util_atoh : not enough buffer size(%d)", szHexaBuff); - return; - } - - memset(pHexaBuff, 0, szHexaBuff); - - for (i=0 ; i<szAsciiString ; i++) { - - /* pos = (szAsciiString - i - 1) / 2; */ - pos = i / 2; - temp = pAsciiString[i]; - - if (temp >= '0' && temp <= '9') { - temp = temp - '0'; - } else if ( temp >= 'a' && temp <= 'f' ) { - temp = temp - 'a' + 10; - } else if ( temp >= 'A' && temp <= 'F' ) { - temp = temp - 'A' + 10; - } else { - temp = 0; - } - - if (0==i%2) { - pHexaBuff[pos] = temp<<4; - } else { - pHexaBuff[pos] |= temp; - } - } - - return; -} - -/* - * wfc_util_is_random_mac - * - * return : it will return 1 if [mac_add] is same with WFC_UTIL_RANDOM_MAC_HEADER - * or will return 0 if not. - */ -int wfc_util_is_random_mac(char *mac_add) -{ - if(0 == strncmp(mac_add, WFC_UTIL_RANDOM_MAC_HEADER, 6)) { - return 1; - } - - return 0; -} - -/* - * wfc_util_random_mac - * - * Create random MAC address - * - * return : void - */ -void wfc_util_random_mac(unsigned char* mac_addr) -{ - unsigned long int rand_mac; - - if(NULL == mac_addr) { - wfc_util_log_error("wfc_util_random_mac : buffer is NULL"); - return; - } - - /* Create random MAC address: offset 3, 4 and 5 */ - srandom(time(NULL)); - rand_mac=random(); - - #ifndef WFC_UTIL_RANDOM_MAC_HEADER - mac_addr[0] = (unsigned char)0x00; - mac_addr[1] = (unsigned char)0x11; - mac_addr[2] = (unsigned char)0x22; - #else /* WFC_UTIL_RANDOM_MAC_HEADER */ - wfc_util_atoh(WFC_UTIL_RANDOM_MAC_HEADER, 6, mac_addr, 3); - #endif /* WFC_UTIL_RANDOM_MAC_HEADER */ - mac_addr[3] = (unsigned char)rand_mac; - mac_addr[4] = (unsigned char)(rand_mac >> 8); - mac_addr[5] = (unsigned char)(rand_mac >> 16); - - return; -} diff --git a/conn_init/wfc_util_common.h b/conn_init/wfc_util_common.h deleted file mode 100644 index c91f899..0000000 --- a/conn_init/wfc_util_common.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __WFC_UTIL_COMMON_H__ -#define __WFC_UTIL_COMMON_H__ - -/* - * wfc_util_htoa - * - * return : void - */ -extern void wfc_util_htoa(unsigned char *pHexaBuff, int szHexaBuff, char *pAsciiStringBuff, int szAsciiStringBuff); - -/* - * wfc_util_atoh - * - * return : void - */ -extern void wfc_util_atoh(char *pAsciiString, int szAsciiString, unsigned char *pHexaBuff, int szHexaBuff); - -/* - * wfc_util_is_random_mac - * - * return : it will return 1 if [mac_add] is same with WFC_UTIL_RANDOM_MAC_HEADER - * or will return 0 if not. - */ -extern int wfc_util_is_random_mac(char *mac_add); - -/* - * wfc_util_random_mac - * - * Create random MAC address - * - * return : void - */ -void wfc_util_random_mac(unsigned char* mac_addr); - -#endif diff --git a/conn_init/wfc_util_fctrl.c b/conn_init/wfc_util_fctrl.c deleted file mode 100644 index 13a82f1..0000000 --- a/conn_init/wfc_util_fctrl.c +++ /dev/null @@ -1,664 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <fcntl.h> -#include <unistd.h> -#include <errno.h> -#include <sys/stat.h> -#include <sys/types.h> - -#include "wfc_util_log.h" - -/* -static void wfc_util_printf(char *pSPointer, int length) -{ - char *pPrintBuff = NULL; - - if( NULL == pSPointer || 0 >= length ) { - wfc_util_log_error("wfc_util_printf : unvalid parameters"); - return; - } - - wfc_util_log_error("wfc_util_printf : lenght is (%d)", length); - pPrintBuff = malloc(length+1); - - if( NULL != pPrintBuff ) { - memset( pPrintBuff, 0, (length+1) ); - memcpy(pPrintBuff, pSPointer, length); - - wfc_util_log_error("wfc_util_printf : %s", pPrintBuff); - - free(pPrintBuff); - } else { - wfc_util_log_error("wfc_util_printf : can not malloc(%d)", (length+1)); - } - return; -} -*/ - -static void wfc_util_finsert_new_string(int fd, char **ppReadedBuff, char *pNewStringValue, char *pEndOfCfg) -{ - off_t sz_file; - int sz_backupBuff = 0; - char *pReadBuff = NULL, *pBackupBuff = NULL; - char *pSPointer = NULL, *pETagPointer = NULL; - - if( 0 == fd || NULL == pNewStringValue || 0 == strlen(pNewStringValue) ) { - wfc_util_log_error("wfc_util_finsert_new_string : unvalid parameters"); - return; - } - - if( NULL == ppReadedBuff) { - // TODO: - return; - } else { - pReadBuff = *ppReadedBuff; - } - - /* - * find END TAG string - */ - pETagPointer = strstr(pReadBuff, pEndOfCfg); - pSPointer = pETagPointer - 1; - - /* - * calcurate file size and size of the tail of file - */ - sz_file = lseek( fd, 0, SEEK_END ); - sz_backupBuff = (int)sz_file - (pETagPointer - pReadBuff); - - /* - * prefare the buffer to store the tail of file - */ - pBackupBuff = malloc(sz_backupBuff); - - if( NULL != pBackupBuff ) { - /* - * copy the tail of file. - */ - memset( pBackupBuff, 0, sz_backupBuff ); - memcpy( pBackupBuff, pETagPointer, sz_backupBuff ); - - /* - * write new string. - */ - lseek( fd, (int)(pSPointer-pReadBuff), SEEK_SET ); - write( fd, pNewStringValue, strlen(pNewStringValue)); - - /* - * update pETagPointer. - */ - pETagPointer = pSPointer + strlen(pNewStringValue); - - /* - * write the tail of file. - */ - lseek( fd, (int)(pETagPointer-pReadBuff), SEEK_SET ); - write( fd, pBackupBuff, sz_backupBuff ); - - ftruncate(fd, sz_file + strlen(pNewStringValue) - 1); /* we use "-1" becasue of "pSPointer = pETagPointer - 1"*/ - - free(pBackupBuff); - - /* - * make new *ppReadedBuff - */ - if( NULL != ppReadedBuff) { - // TODO: - } - } else { - wfc_util_log_error("wfc_util_finsert_new_string : can not malloc(%d)", sz_backupBuff); - } - - return; -} - -static void wfc_util_fupdate_string(int fd, char **ppReadedBuff, - char *pETagPointer, char *pSValuePointer, char *pNewValueString) -{ - off_t sz_file; - int sz_newReadBuff = 0; - char *pReadBuff = NULL, *pNewReadBuff = NULL, *pCurReadBuff = NULL; - - if( 0 == fd ) { - wfc_util_log_error("wfc_util_fupdate_string : unvalid parameters"); - return; - } - - if( NULL == ppReadedBuff) { - // TODO: - return; - } else { - pReadBuff = *ppReadedBuff; - } - - /* - * calcurate file size and new file size - */ - sz_file = lseek( fd, 0, SEEK_END ); - sz_newReadBuff = (int)sz_file - (int)(pETagPointer - pSValuePointer) + strlen(pNewValueString); - - /* - * prefare the buffer to read file - */ - pNewReadBuff = malloc(sz_newReadBuff); - - if( NULL != pNewReadBuff ) { - /* - * copy buffer - */ - memset( pNewReadBuff, 0, sz_file ); - pCurReadBuff = pNewReadBuff; - memcpy( pNewReadBuff, pReadBuff, (int)(pSValuePointer-pReadBuff) ); - pCurReadBuff += (int)(pSValuePointer-pReadBuff); - - /* - * copy new value string - */ - memcpy( pCurReadBuff, pNewValueString, strlen(pNewValueString)); - pCurReadBuff += strlen(pNewValueString); - - /* - * copy the remained buffer - */ - memcpy( pCurReadBuff, pETagPointer, ((int)(sz_file) - (int)(pETagPointer - pReadBuff) + 1)); - - /* - * write file and update the file size - */ - lseek( fd, 0, SEEK_SET ); - write( fd, pNewReadBuff, sz_newReadBuff); - ftruncate(fd, sz_newReadBuff); - - free(pNewReadBuff); - } else { - wfc_util_log_error("wfc_util_fupdate_string : can not malloc(%d)", (int)sz_newReadBuff); - } - - return; -} - -/* - * wfc_util_fset_buffer - * - * return : void - */ -void wfc_util_fset_buffer(char *pFileName, int positionStart, unsigned char *pNewValue, int newValueLength) -{ - int fd; - off_t sz_file; - char *pReadBuff = NULL; - - fd = open( pFileName, O_RDWR ); - - if( fd >= 0 ) { - /* - * calcurate file size - */ - sz_file = lseek( fd, 0, SEEK_END ); - - /* - * prefare the buffer to read file - */ - pReadBuff = malloc(sz_file + 1); // null terminated - - if( NULL != pReadBuff ) { - /* - * read file - */ - memset( pReadBuff, 0, sz_file + 1); - lseek( fd, 0, SEEK_SET ); - read( fd, pReadBuff, sz_file ); - - if(sz_file >= (positionStart+newValueLength)) { - lseek( fd, positionStart, SEEK_SET ); - write( fd, pNewValue, newValueLength ); - } else { - /* - * insert with new length value buffer - */ - wfc_util_log_error("wfc_util_fset_buffer : file size(%d) is less than to write position(%d)", (int)sz_file, (positionStart+newValueLength)); - // TODO: - } - - free(pReadBuff); - } else { - wfc_util_log_error("wfc_util_fset_buffer : can not malloc(%d)", (int)sz_file); - } - - if ( -1 == fsync( fd ) ) { - wfc_util_log_error("wfc_util_fset_buffer : fail to fsync()"); - } - - close( fd ); - } else { - wfc_util_log_error("wfc_util_fset_buffer : can not open file"); - } - - return; -} - -/* - * wfc_util_fget_buffer - * - * return : it will return the length of the stored buffer value if procedure is success - * or will return 0 if not. - */ -int wfc_util_fget_buffer(char *pFileName, int positionStart, int lengthToRead, unsigned char *pValueBuff, int buffLength) -{ - int result = 0; - int fd; - off_t sz_file; - char *pReadBuff = NULL; - char *pSValuePointer = NULL, *pETagPointer = NULL; - - fd = open( pFileName, O_RDONLY ); - - if( fd >= 0 ) { - /* - * calcurate file size - */ - sz_file = lseek( fd, 0, SEEK_END ); - - if(sz_file >= (positionStart+lengthToRead)) { - /* - * prefare the buffer to read file - */ - pReadBuff = malloc(sz_file + 1); // null terminated - - if( NULL != pReadBuff ) { - /* - * read file - */ - memset( pReadBuff, 0, sz_file + 1 ); - lseek( fd, 0, SEEK_SET ); - read( fd, pReadBuff, sz_file ); - - /* - * calculate the start buffer pointer - */ - pSValuePointer = pReadBuff + positionStart; - - /* - * calculate the end buffer pointer - */ - pETagPointer = pSValuePointer + lengthToRead; - - /* - * read the string value - */ - if( buffLength >= (int)(pETagPointer-pSValuePointer) ) { - memset( pValueBuff, 0, buffLength ); - memcpy( pValueBuff, pSValuePointer, (int)(pETagPointer-pSValuePointer) ); - result = (int)(pETagPointer-pSValuePointer); - } else { - wfc_util_log_error("wfc_util_fget_buffer : not enough string value buffer(%d)", (int)(pETagPointer-pSValuePointer)); - } - - free(pReadBuff); - } else { - wfc_util_log_error("wfc_util_fget_buffer : can not malloc(%d)", (int)sz_file); - } - } else { - wfc_util_log_error("wfc_util_fget_buffer : file size(%d) is less than to read position(%d)", (int)sz_file, (positionStart+lengthToRead)); - } - close( fd ); - } else { - wfc_util_log_error("wfc_util_fget_buffer : can not open file"); - } - - return result; -} - -/* - * wfc_util_fset_string - * - * The following format string will be added or updated to the file pFileName. - * [pSTagString][pNewValueString][pETagString] - * - * pFileName : file name and path - * pEndOfCfg : tag string to notify the end of configuration file - * pSTagString : tag string to notify purpose of the value - * pETagString : tag string to notify the end of the value - * pNewValueString : string to set for pSTagString - * - * return : void - */ -void wfc_util_fset_string(char *pFileName, char *pEndOfCfg, char *pSTagString, char *pETagString, char *pNewValueString) -{ - int fd; - off_t sz_file; - int sz_NewValueBuff = 0; - char *pReadBuff = NULL, *pNewValueBuff = NULL; - char *pSPointer = NULL, *pETagPointer = NULL, *pSValuePointer = NULL; - - fd = open( pFileName, O_RDWR ); - - if( fd >= 0 ) { - /* - * calcurate file size - */ - sz_file = lseek( fd, 0, SEEK_END ); - - /* - * prefare the buffer to read file - */ - if (sz_file > 0) - pReadBuff = malloc(sz_file + 1); // null terminated - - if( NULL != pReadBuff ) { - /* - * read file - */ - memset( pReadBuff, 0x00, sz_file + 1); - if(lseek(fd, 0, SEEK_SET) != 0) { - wfc_util_log_error("lseek failure"); - } - read( fd, pReadBuff, sz_file ); - - /* WBT fix, make sure it is terminated with \0 */ - pReadBuff[sz_file] = '\0'; - - /* - * find TAG string - */ - pSPointer = strstr(pReadBuff, pSTagString); - - if(NULL != pSPointer) { - /* - * find END OF LINE string - */ - pETagPointer = strstr(pSPointer, pETagString); - - if(NULL != pETagPointer) { - /* - * write the new string value - */ - pSValuePointer = pSPointer+strlen(pSTagString); - if(strlen(pNewValueString) == (unsigned int)(pETagPointer-pSValuePointer)) { - lseek( fd, (int)(pSValuePointer-pReadBuff), SEEK_SET ); - write( fd, pNewValueString, strlen(pNewValueString)); - } else { - /* - * insert with new length value string - */ - wfc_util_fupdate_string(fd, &pReadBuff, pETagPointer, pSValuePointer, pNewValueString); - } - } else { - wfc_util_log_error("wfc_util_fset_string : can not find End TAG"); - } - } else { - /* - * "\n""[Start TAG][String Value][End TAG]""\n" - */ - sz_NewValueBuff = strlen(pSTagString) + - strlen(pNewValueString) + - strlen(pETagString) + - 2 + 1; - pNewValueBuff = malloc( sz_NewValueBuff); - - if( NULL != pNewValueBuff ) { - /* - * prefare the new string to insert - */ - memset( pNewValueBuff, 0, sz_NewValueBuff ); - sprintf( pNewValueBuff, "%c%s%s%s%c", '\n', pSTagString, pNewValueString, pETagString,'\n' ); - - /* - * insert new string to the file - */ - wfc_util_finsert_new_string(fd, &pReadBuff, pNewValueBuff, pEndOfCfg); - - free( pNewValueBuff ); - } else { - wfc_util_log_error("wfc_util_fset_string : can not malloc(%d)", (int)sz_file); - } - } - - free(pReadBuff); - } else { - wfc_util_log_error("wfc_util_fset_string : can not malloc(%d)", (int)sz_file); - } - - if ( -1 == fsync( fd ) ) { - wfc_util_log_error("wfc_util_fset_string : fail to fsync()"); - } - - close( fd ); - } else { - wfc_util_log_error("wfc_util_fset_string : can not open file"); - } - - return; -} - -/* - * wfc_util_fget_string - * - * Read value from the following format string in the file pFileName. - * [pSTagString][string value to read][pETagString] - * - * pFileName : file name and path - * pEndOfCfg : tag string to notify the end of configuration file - * pSTagString : tag string to notify purpose of the value - * pETagString : tag string to notify the end of the value - * pValueStringBuff : string buffer to get string value - * stringBuffLength : the length of pValueStringBuff - * - * return : it will return the length of the stored string value if procedure is success - * or will return 0 if not. - */ -int wfc_util_fget_string(char *pFileName, char *pEndOfCfg, char *pSTagString, char *pETagString, char *pValueStringBuff, int stringBuffLength) -{ - int result = 0; - int fd; - off_t sz_file; - char *pReadBuff = NULL; - char *pSPointer = NULL, *pETagPointer = NULL, *pSValuePointer = NULL; - - /* unused parameter*/ - pEndOfCfg = pEndOfCfg; - - fd = open( pFileName, O_RDONLY ); - - if( fd >= 0 ) { - /* - * calcurate file size - */ - sz_file = lseek( fd, 0, SEEK_END ); - - /* - * prefare the buffer to read file - */ - if (sz_file > 0) // skip when value is 0 - pReadBuff = malloc(sz_file + 1); - - if( NULL != pReadBuff ) { - /* - * read file - */ - memset( pReadBuff, 0, sz_file + 1); - if(lseek(fd, 0, SEEK_SET) != 0) { - wfc_util_log_error("lseek failure"); - } - read( fd, pReadBuff, sz_file ); - - /* WBT fix, make sure it is terminated with \0 */ - pReadBuff[sz_file] = '\0'; - - /* - * find TAG string - */ - pSPointer = strstr( pReadBuff, pSTagString ); - - if( NULL != pSPointer ) { - /* - * find END OF LINE string - */ - pETagPointer = strstr(pSPointer, pETagString); - - if( NULL != pETagPointer ) { - /* - * read the string value - */ - pSValuePointer = pSPointer+strlen(pSTagString); - if( stringBuffLength >= (int)(pETagPointer-pSValuePointer) ) { - memset( pValueStringBuff, 0, stringBuffLength ); - memcpy( pValueStringBuff, pSValuePointer, (int)(pETagPointer-pSValuePointer) ); - result = (int)(pETagPointer-pSValuePointer); - } else { - wfc_util_log_error("wfc_util_fget_string : not enough string value buffer(%d)", (int)(pETagPointer-pSValuePointer)); - } - } else { - wfc_util_log_error("wfc_util_fget_string : can not find End TAG"); - } - } else { - wfc_util_log_error("wfc_util_fget_string : can not find Start TAG"); - } - free(pReadBuff); - } else { - wfc_util_log_error("wfc_util_fget_string : can not malloc(%d)", (int)sz_file); - } - close( fd ); - } else { - wfc_util_log_error("wfc_util_fget_string : can not open file"); - } - - return result; -} - -/* - * wfc_util_ffile_check - * - * check whether pDestFName file exist or not - * - * pFileName : file name and path - * access_mode : R_OK | W_OK | X_OK | F_OK - * - * return : it will return 0 if the file exist - * or will return -1 if not. - */ -int wfc_util_ffile_check(char *pDestFName, int access_mode) -{ - struct stat st; - - if (access(pDestFName, access_mode) == 0) { - if( stat( pDestFName, &st ) < 0 ) { - wfc_util_log_error("Cannot stat the file \"%s\": %s", pDestFName, strerror(errno)); - return -1; - } - //check if config file has some data or is it empty due to previous errors - if( st.st_size ) { - return 0; - } - } else { - wfc_util_log_error("Cannot access \"%s\": %s", pDestFName, strerror(errno)); - } - - return -1; -} - -/* - * wfc_util_ffile_check_copy - * - * check whether pDestFName file exist if not it will copy from pSourceFName file - * - * return : it will return 0 if procedure is success - * or will return -1 if not. - */ -int wfc_util_ffile_check_copy(char *pDestFName, char *pSourceFName, mode_t mode, uid_t uID, gid_t gID) -{ -#define WFC_BUFFER_SIZE 2048 - char buf[WFC_BUFFER_SIZE] = {0}; // Null terminated - int srcfd, destfd; - int nread; - struct stat st; - - if (access(pDestFName, R_OK|W_OK) == 0) { - if( stat( pDestFName, &st ) < 0 ) { - wfc_util_log_error("Cannot stat the file \"%s\": %s", pDestFName, strerror(errno)); - return -1; - } - //check if config file has some data or is it empty due to previous errors - if( st.st_size ) { - return 0; - } - //else continue to write the config from default template. - } else if (errno != ENOENT) { - wfc_util_log_error("Cannot access \"%s\": %s", pDestFName, strerror(errno)); - return -1; - } - - srcfd = open(pSourceFName, O_RDONLY); - if (srcfd < 0) { - wfc_util_log_error("Cannot open \"%s\": %s", pSourceFName, strerror(errno)); - return -1; - } - - destfd = open(pDestFName, O_CREAT|O_WRONLY, mode); - if (destfd < 0) { - close(srcfd); - wfc_util_log_error("Cannot create \"%s\": %s", pDestFName, strerror(errno)); - return -1; - } - - while ((nread = read(srcfd, buf, WFC_BUFFER_SIZE-1)) != 0) { - if (nread < 0) { - wfc_util_log_error("Error reading \"%s\": %s", pSourceFName, strerror(errno)); - close(srcfd); - close(destfd); - unlink(pDestFName); - return -1; - } - // WBT fix, according to manual, the number of bytes read can't be bigger than read_size. I don't know why WBT complains for this. - if (nread < WFC_BUFFER_SIZE) - buf[nread] = '\0'; - else { - buf[WFC_BUFFER_SIZE-1] = '\0'; - nread = WFC_BUFFER_SIZE-1; - } - write(destfd, buf, nread); - } - - close(destfd); - close(srcfd); - - /* remove this code because of permission problem when it is accessed from "atd" having system permission. */ - { - #ifndef CONFIG_LGE_WLAN_WIFI_PATCH - uid_t uid = getuid(); - gid_t gid = getgid(); - wfc_util_log_error("Error changing group ownership (%d) of %s to %d: %s", gid, pDestFName, gID, strerror(errno)); - if (0 == uid) { - #endif /* CONFIG_LGE_WLAN_WIFI_PATCH */ - if (chown(pDestFName, uID, gID) < 0) { - wfc_util_log_error("Error changing group ownership of %s to %d: %s", pDestFName, gID, strerror(errno)); - unlink(pDestFName); - return -1; - } - #ifndef CONFIG_LGE_WLAN_WIFI_PATCH - } else { - wfc_util_log_error("wfc_util_ffile_check_copy : we can not excute chown[uid = %d, gid = %d]", uid, getgid()); - } - #endif /* CONFIG_LGE_WLAN_WIFI_PATCH */ - } - - return 0; -} - diff --git a/conn_init/wfc_util_fctrl.h b/conn_init/wfc_util_fctrl.h deleted file mode 100644 index 5c49899..0000000 --- a/conn_init/wfc_util_fctrl.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __WFC_UTIL_FCTRL_H__ -#define __WFC_UTIL_FCTRL_H__ - -/* - * wfc_util_fset_buffer - * - * return : void - */ -void wfc_util_fset_buffer(char *pFileName, int positionStart, unsigned char *pNewValue, int newValueLength); - -/* - * wfc_util_fget_buffer - * - * return : it will return the length of the stored buffer value if procedure is success - * or will return 0 if not. - */ -extern int wfc_util_fget_buffer(char *pFileName, int positionStart, int lengthToRead, unsigned char *pValueBuff, int buffLength); - -/* - * wfc_util_fset_string - * - * The following format string will be added or updated to the file pFileName. - * [pSTagString][pNewValueString][pETagString] - * - * pFileName : file name and path - * pEndOfCfg : tag string to notify the end of configuration file - * pSTagString : tag string to notify purpose of the value - * pETagString : tag string to notify the end of the value - * pNewValueString : string to set for pSTagString - * - * return : void - */ -extern void wfc_util_fset_string(char *pFileName, char *pEndOfCfg, char *pSTagString, char *pETagString, char *pNewValueString); - -/* - * wfc_util_fget_string - * - * Read value from the following format string in the file pFileName. - * [pSTagString][string value to read][pETagString] - * - * pFileName : file name and path - * pEndOfCfg : tag string to notify the end of configuration file - * pSTagString : tag string to notify purpose of the value - * pETagString : tag string to notify the end of the value - * pValueStringBuff : string buffer to get string value - * stringBuffLength : the length of pValueStringBuff - * - * return : it will return the length of the stored string value if procedure is success - * or will return 0 if not. - */ -extern int wfc_util_fget_string(char *pFileName, char *pEndOfCfg, char *pSTagString, char *pETagString, char *pValueStringBuff, int stringBuffLength); - -/* - * wfc_util_ffile_check - * - * check whether pDestFName file exist or not - * - * pFileName : file name and path - * access_mode : R_OK | W_OK | X_OK | F_OK - * - * return : it will return 0 if the file exist - * or will return -1 if not. - */ -extern int wfc_util_ffile_check(char *pDestFName, int access_mode); - -/* - * wfc_util_ffile_check_copy - * - * check whether pDestFName file exist if not it will copy from pSourceFName file - * - * return : it will return 0 if procedure is success - * or will return -1 if not. - */ -extern int wfc_util_ffile_check_copy(char *pDestFName, char *pSourceFName, mode_t mode, uid_t uID, gid_t gID); - -#endif diff --git a/conn_init/wfc_util_log.h b/conn_init/wfc_util_log.h deleted file mode 100644 index fcc4239..0000000 --- a/conn_init/wfc_util_log.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __WFC_UTIL_LOG_H__ -#define __WFC_UTIL_LOG_H__ - -#ifdef ANDROID -#define LOG_TAG "WifiUtil" -#include <cutils/log.h> - -#define wfc_util_log_info(...) ALOGI(__VA_ARGS__) -#define wfc_util_log_error(...) ALOGE(__VA_ARGS__) -#else /* ANDROID */ -#define wfc_util_log_info(...) printf(__VA_ARGS__);printf("\n") -#define wfc_util_log_error(...) printf(__VA_ARGS__);printf("\n") -#endif /* ANDROID */ - -#endif - diff --git a/conn_init/wfc_util_main.c b/conn_init/wfc_util_main.c deleted file mode 100644 index 01e1c86..0000000 --- a/conn_init/wfc_util_main.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <getopt.h> -#include "wfc_util_fctrl.h" -#include "wfc_util_common.h" - -#ifdef WLAN_CHIP_VERSION_WCNSS -#ifndef WFC_UTIL_CFG_FILE_NAME -#define WFC_UTIL_CFG_FILE_NAME "./WCNSS_qcom_cfg.ini" -#endif -#ifndef WFC_UTIL_NV_BIN_FILE_NAME -#define WFC_UTIL_NV_BIN_FILE_NAME "./WCNSS_qcom_wlan_nv.bin" -#endif -#else /* WLAN_CHIP_VERSION_WCN1314 */ -#ifndef WFC_UTIL_CFG_FILE_NAME -#define WFC_UTIL_CFG_FILE_NAME "./WCN1314_qcom_cfg.ini" -#endif -#ifndef WFC_UTIL_NV_BIN_FILE_NAME -#define WFC_UTIL_NV_BIN_FILE_NAME "./WCN1314_qcom_wlan_nv.bin" -#endif -#endif /* WLAN_CHIP_VERSION_XXXX */ -#define WFC_UTIL_CFG_TAG_END_OF_CFG "END" -#define WFC_UTIL_CFG_TAG_MAC_ADDRESS "NetworkAddress=" -#define WFC_UTIL_CFG_TAG_AP_MAC_ADDRESS "gAPMacAddr=" -#define WFC_UTIL_CFG_TAG_END_OF_LINE "\n" -#define WFC_UTIL_CFG_LENGHT_MAC (6) -#define WFC_UTIL_CFG_LENGHT_MAC_STRING (WFC_UTIL_CFG_LENGHT_MAC*2) - -/* - * persist/WCNSS_qcom_wlan_nv.bin - * - * typedef PACKED_PRE struct PACKED_POST - * { - * //always ensure fields are aligned to 32-bit boundaries - * tANI_U16 productId; - * tANI_U8 productBands; - * tANI_U8 wlanNvRevId; - * - * tANI_U8 numOfTxChains; - * tANI_U8 numOfRxChains; - * tANI_U8 macAddr[NV_FIELD_MAC_ADDR_SIZE]; - * tANI_U8 mfgSN[NV_FIELD_MFG_SN_SIZE]; - * } sNvFields; - */ -#define WFC_UTIL_NV_BIN_HEADER_LENGTH (4) -#define WFC_UTIL_NV_BIN_POS_PRODUCT_ID (WFC_UTIL_NV_BIN_HEADER_LENGTH + 0) -#define WFC_UTIL_NV_BIN_POS_PRODUCT_BAND (WFC_UTIL_NV_BIN_HEADER_LENGTH + 2) -#define WFC_UTIL_NV_BIN_POS_MAC_ADDR (WFC_UTIL_NV_BIN_HEADER_LENGTH + 6) - -int main(int argc, char **argv) -{ - int ret = 0; - char mac_add_buff[WFC_UTIL_CFG_LENGHT_MAC_STRING+1]; - unsigned char mac_add_buff_2[WFC_UTIL_CFG_LENGHT_MAC] = {0x88, 0xcd, 0xba, 0x0c, 0x90, 0x00}; - unsigned char mac_add_buff_3[WFC_UTIL_CFG_LENGHT_MAC] = {0x00, 0x90, 0x0c, 0xba, 0xcd, 0x88}; - - printf("wfc_util_main is started\n"); - - if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_MAC_ADDRESS, - WFC_UTIL_CFG_TAG_END_OF_LINE, - mac_add_buff, - WFC_UTIL_CFG_LENGHT_MAC_STRING+1)) { - printf("wfc_util_main : %s%s\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS, mac_add_buff); - } else { - printf("wfc_util_main : %s is not found\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS); - } - - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_AP_MAC_ADDRESS, - WFC_UTIL_CFG_TAG_END_OF_LINE, - "00900cbacd88"); - - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_MAC_ADDRESS, - WFC_UTIL_CFG_TAG_END_OF_LINE, - "00900cbacd88"); - - if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_MAC_ADDRESS, - WFC_UTIL_CFG_TAG_END_OF_LINE, - mac_add_buff, - WFC_UTIL_CFG_LENGHT_MAC_STRING+1)) { - printf("wfc_util_main : %s%s\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS, mac_add_buff); - - wfc_util_atoh(mac_add_buff, strlen(mac_add_buff), mac_add_buff_2, WFC_UTIL_CFG_LENGHT_MAC); - printf("wfc_util_main : %s%02x:%02x:%02x:%02x:%02x:%02x\n", - WFC_UTIL_CFG_TAG_MAC_ADDRESS, - mac_add_buff_2[0], mac_add_buff_2[1], mac_add_buff_2[2], - mac_add_buff_2[3], mac_add_buff_2[4], mac_add_buff_2[5]); - - wfc_util_htoa(mac_add_buff_2, WFC_UTIL_CFG_LENGHT_MAC, mac_add_buff, WFC_UTIL_CFG_LENGHT_MAC_STRING); - printf("wfc_util_main : %s%s\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS, mac_add_buff); - - } else { - printf("wfc_util_main : %s is not found\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS); - } - - wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - WFC_UTIL_NV_BIN_POS_MAC_ADDR, - mac_add_buff_3, - WFC_UTIL_CFG_LENGHT_MAC); - - if(0 < wfc_util_fget_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - WFC_UTIL_NV_BIN_POS_MAC_ADDR, - 6, - mac_add_buff_2, - WFC_UTIL_CFG_LENGHT_MAC)) { - printf("wfc_util_main : wfc_util_fget_buffer[%02x:%02x:%02x:%02x:%02x:%02x]\n", - mac_add_buff_2[0], mac_add_buff_2[1], mac_add_buff_2[2], - mac_add_buff_2[3], mac_add_buff_2[4], mac_add_buff_2[5]); - } else { - printf("wfc_util_main : %s is not found\n", WFC_UTIL_CFG_TAG_MAC_ADDRESS); - } - - return ret; -} - diff --git a/conn_init/wfc_util_qcom.c b/conn_init/wfc_util_qcom.c deleted file mode 100644 index 431ca87..0000000 --- a/conn_init/wfc_util_qcom.c +++ /dev/null @@ -1,704 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifdef CONFIG_LGE_WLAN_QCOM_PATCH - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "wfc_util_log.h" -#include "wfc_util_fctrl.h" -#include "wfc_util_common.h" - -#include "cutils/properties.h" - -#include "private/android_filesystem_config.h" - -#define WFC_UTIL_FEAUTRE_COPY_NV_BIN - -#ifdef WLAN_CHIP_VERSION_WCNSS -#ifndef WFC_UTIL_CFG_FILE_NAME -#define WFC_UTIL_CFG_FILE_NAME "/data/misc/wifi/WCNSS_qcom_cfg.ini" -#endif -#ifndef WFC_UTIL_CFG_TEMPFILE_NAME -#define WFC_UTIL_CFG_TEMPFILE_NAME "/system/etc/wifi/WCNSS_qcom_cfg.ini" -#endif -#else /* WLAN_CHIP_VERSION_WCN1314 */ -#ifndef WFC_UTIL_CFG_FILE_NAME -#define WFC_UTIL_CFG_FILE_NAME "/data/misc/wifi/WCN1314_qcom_cfg.ini" -#endif -#ifndef WFC_UTIL_CFG_TEMPFILE_NAME -#define WFC_UTIL_CFG_TEMPFILE_NAME "/system/etc/wifi/WCN1314_qcom_cfg.ini" -#endif -#endif /* WLAN_CHIP_VERSION_XXXX */ - -#ifdef WFC_UTIL_FEAUTRE_COPY_NV_BIN -#ifdef WLAN_CHIP_VERSION_WCNSS -#ifndef WFC_UTIL_NV_BIN_TEMPFILE_NAME -#define WFC_UTIL_NV_BIN_TEMPFILE_NAME "/system/etc/wifi/WCNSS_qcom_wlan_nv.bin" -#endif -#ifndef WFC_UTIL_NV_BIN_FILE_NAME -#define WFC_UTIL_NV_BIN_FILE_NAME "/data/misc/wifi/WCNSS_qcom_wlan_nv.bin" -#endif -#else /* WLAN_CHIP_VERSION_WCN1314 */ -#ifndef WFC_UTIL_NV_BIN_TEMPFILE_NAME -#define WFC_UTIL_NV_BIN_TEMPFILE_NAME "/persist/WCN1314_qcom_wlan_nv.bin" -#endif -#ifndef WFC_UTIL_NV_BIN_FILE_NAME -#define WFC_UTIL_NV_BIN_FILE_NAME "/data/misc/wifi/WCN1314_qcom_wlan_nv.bin" -#endif -#endif /* WLAN_CHIP_VERSION_XXXX */ -#else /* WFC_UTIL_FEAUTRE_COPY_NV_BIN */ -#ifndef WFC_UTIL_NV_BIN_FILE_NAME -#ifdef WLAN_CHIP_VERSION_WCNSS -#define WFC_UTIL_NV_BIN_FILE_NAME "/persist/WCNSS_qcom_wlan_nv.bin" -#else /* WLAN_CHIP_VERSION_WCN1314 */ -#define WFC_UTIL_NV_BIN_FILE_NAME "/persist/WCN1314_qcom_wlan_nv.bin" -#endif /* WLAN_CHIP_VERSION_XXXX */ -#endif -#endif /* WFC_UTIL_FEAUTRE_COPY_NV_BIN */ - -#define WFC_UTIL_CFG_TAG_END_OF_CFG "END" -/* - * Station Mode MAC Address - */ -#ifdef WLAN_CHIP_VERSION_WCNSS -#define WFC_UTIL_CFG_TAG_MAC_ADDRESS "Intf0MacAddress=" -#define WFC_UTIL_CFG_TAG_P2P_ADDRESS "Intf1MacAddress=" -#else /* WLAN_CHIP_VERSION_WCN1314 */ -#define WFC_UTIL_CFG_TAG_MAC_ADDRESS "NetworkAddress=" -#endif /* WLAN_CHIP_VERSION_XXXX */ -/* - * AP Mode MAC Address - */ -#define WFC_UTIL_CFG_TAG_AP_MAC_ADDRESS "gAPMacAddr=" - -/* - * Idle Mode Power Save enable/disable for OTA test - */ -#define WFC_UTIL_CFG_TAG_IDLE_MODE_POWER_SAVE "gEnableImps=" - -/* - * Beacon Mode Power Save enable/disable for OTA test - */ -#define WFC_UTIL_CFG_TAG_POWER_SAVE "gEnableBmps=" - -/* - * L2 roaming on/off for OTA test - */ -#define WFC_UTIL_CFG_TAG_L2Roaming "gEnableHandoff=" - -/* - * Heartbeat24 changing for OtA test - */ -#define WFC_UTIL_CFG_TAG_HEARTBEAT24 "gHeartbeat24=" - -/* - * TAG for end of line - */ -#define WFC_UTIL_CFG_TAG_END_OF_LINE "\n" - -#define WFC_UTIL_CFG_LENGHT_MAC (6) -#define WFC_UTIL_CFG_LENGHT_MAC_STRING (WFC_UTIL_CFG_LENGHT_MAC*2) - -/* - * persist/WCNSS_qcom_wlan_nv.bin - * - * NV validity bitmap (4 bytes) - * { - * Bit 0 - Regulatory domain tables - * Bit 1 - Fields(including product ID, product bands, number of Tx/Rx chains, MAC address, manufacturing board number) - * Bit 2 - Optimal power per rate table - * Bit 3 - Default regulatory domain and country code - * Bit 4:31 - Reserved; always 0 - * } - * - * typedef PACKED_PRE struct PACKED_POST - * { - * //always ensure fields are aligned to 32-bit boundaries - * tANI_U16 productId; - * tANI_U8 productBands; //0: 0.4 GHz, 1: 2.4+5.0 GHz, 2: 5.0 GHz - * tANI_U8 wlanNvRevId; //0: WCN1312, 1: WCN1314, 2: PRIMA - * - * tANI_U8 numOfTxChains; - * tANI_U8 numOfRxChains; - * tANI_U8 macAddr[NV_FIELD_MAC_ADDR_SIZE]; - * tANI_U8 mfgSN[NV_FIELD_MFG_SN_SIZE]; - * } sNvFields; - */ -#define WFC_UTIL_NV_BIN_HEADER_LENGTH (4) -#define WFC_UTIL_NV_BIN_POS_PRODUCT_ID (WFC_UTIL_NV_BIN_HEADER_LENGTH + 0) -#define WFC_UTIL_NV_BIN_POS_MAC_ADDR (WFC_UTIL_NV_BIN_HEADER_LENGTH + 6) - -#ifdef WLAN_CHIP_VERSION_WCNSS -/* refer to prima/CORE/WDA/src/wlan_nv.c */ -static unsigned char nvFilelds_default[6] = {0, 0, /* productId */ - 1, /* productBands */ - 2, /* wlanNvRevId */ - 1, /* numOfTxChains */ - 2}; /* numOfRxChains */ -#else /* WLAN_CHIP_VERSION_WCN1314 */ -static unsigned char nvFilelds_default[6] = {1, 0, /* productId */ - 1, /* productBands */ - 1, /* wlanNvRevId */ - 1, /* numOfTxChains */ - 1}; /* numOfRxChains */ -#endif /* WLAN_CHIP_VERSION_XXXX */ - -/* - * wfc_util_qcom_is_default_mac - * - * - * - * return : it will return 1 if mac_add is default mac address, - * 2 if mac_add is RFT mac address - * or 0 if not. - */ -static int wfc_util_qcom_is_default_mac(char *mac_add) -{ -#define WFC_UTIL_CFG_DEFAULT_MAC_RFT "00900CBACD88" -#define WFC_UTIL_CFG_DEFAULT_MAC_00 "000000000000" -#define WFC_UTIL_CFG_DEFAULT_MAC_FF "FFFFFFFFFFFF" -#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I0 "000AF58989FF" -#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I1 "000AF58989FE" -#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I2 "000AF58989FD" -#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I3 "000AF58989FC" -#define WFC_UTIL_CFG_DEFAULT_MAC_QCOM_AP "000AF58989EF" - - int i, sZarray=0; - /* - * default mac address array - */ - char mac_add_buff[][WFC_UTIL_CFG_LENGHT_MAC_STRING+1] = { - {WFC_UTIL_CFG_DEFAULT_MAC_00}, - {WFC_UTIL_CFG_DEFAULT_MAC_FF}, - {WFC_UTIL_CFG_DEFAULT_MAC_QCOM_I0} - }; - - sZarray = sizeof(mac_add_buff) / sizeof(mac_add_buff[0]); - - for(i=0; i<sZarray ;i++) { - if(0 == strncmp(mac_add, mac_add_buff[i], WFC_UTIL_CFG_LENGHT_MAC_STRING)) { - wfc_util_log_error("This is default MAC address [%s]", mac_add_buff[i]); - return 1; - } - } - - /* - if(1 == wfc_util_is_random_mac(mac_add)) { - wfc_util_log_error("This is Random MAC address"); - return 1; - } - */ - - if(0 == strncmp(mac_add, WFC_UTIL_CFG_DEFAULT_MAC_RFT, WFC_UTIL_CFG_LENGHT_MAC_STRING)) { - wfc_util_log_error("This is RFT MAC address [%s]", WFC_UTIL_CFG_DEFAULT_MAC_RFT); - return 2; - } - - return 0; -} - -static void wfc_util_qcom_write_mac(char *mac_add) -{ - /* - * Station Mode MAC Address - */ - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_MAC_ADDRESS, - WFC_UTIL_CFG_TAG_END_OF_LINE, - mac_add); - - /* - * P2P Mode MAC Address - */ - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_P2P_ADDRESS, - WFC_UTIL_CFG_TAG_END_OF_LINE, - mac_add); - - /* - * AP Mode MAC Address - */ - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_AP_MAC_ADDRESS, - WFC_UTIL_CFG_TAG_END_OF_LINE, - mac_add); - - return; -} - -/* - * When OTA is enabled, power save mode and L2 roaming trigger should be off - */ -static void wfc_util_qcom_write_ota_enable(void) -{ -/* - * write Beacon Mode Power Save off and L2 Roaming off - */ - char *PowerSaveOff = "0"; - //char *L2RoamingOff = "0"; - char *Heartbeat24 = "120"; - - char string_buff[5]; - - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_IDLE_MODE_POWER_SAVE, - WFC_UTIL_CFG_TAG_END_OF_LINE, - PowerSaveOff); - - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_POWER_SAVE, - WFC_UTIL_CFG_TAG_END_OF_LINE, - PowerSaveOff); - -/* We don't need to change this becasue the default value of WFC_UTIL_CFG_TAG_L2Roaming is 0. - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_L2Roaming, - WFC_UTIL_CFG_TAG_END_OF_LINE, - L2RoamingOff); -*/ - - if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_HEARTBEAT24, - WFC_UTIL_CFG_TAG_END_OF_LINE, - string_buff, - 5)) { - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_HEARTBEAT24, - WFC_UTIL_CFG_TAG_END_OF_LINE, - Heartbeat24); - } else { - wfc_util_log_error("%s is not exist", WFC_UTIL_CFG_TAG_HEARTBEAT24); - } - - return; -} - -/* - * When OTA is enabled, power save mode and L2 roaming trigger should be off - */ -static void wfc_util_qcom_write_ota_disable(void) -{ -/* - * write Beacon Mode Power Save on and L2 Roaming on - */ - char *PowerSaveOff = "1"; - //char *L2RoamingOff = "1"; - char *Heartbeat24 = "40"; - - char string_buff[5]; - - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_IDLE_MODE_POWER_SAVE, - WFC_UTIL_CFG_TAG_END_OF_LINE, - PowerSaveOff); - - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_POWER_SAVE, - WFC_UTIL_CFG_TAG_END_OF_LINE, - PowerSaveOff); - -/* We don't need to change this becasue the default value of WFC_UTIL_CFG_TAG_L2Roaming is 0. - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_L2Roaming, - WFC_UTIL_CFG_TAG_END_OF_LINE, - L2RoamingOff); -*/ - - if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_HEARTBEAT24, - WFC_UTIL_CFG_TAG_END_OF_LINE, - string_buff, - 5)) { - wfc_util_fset_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_HEARTBEAT24, - WFC_UTIL_CFG_TAG_END_OF_LINE, - Heartbeat24); - } else { - wfc_util_log_error("%s is not exist", WFC_UTIL_CFG_TAG_HEARTBEAT24); - } - - return; -} - -static void wfc_util_qcom_write_mac_to_bin(unsigned char *mac_add) -{ - unsigned char nvValidityBitmap[WFC_UTIL_NV_BIN_HEADER_LENGTH]; - - if(0 != wfc_util_ffile_check(WFC_UTIL_NV_BIN_FILE_NAME, - F_OK|R_OK|W_OK)) { - wfc_util_log_error("We don't access file [%s]", WFC_UTIL_NV_BIN_FILE_NAME); - return; - } - - memset(nvValidityBitmap, 0, WFC_UTIL_NV_BIN_HEADER_LENGTH); - - /* - * Write RFT MAC Address - */ - wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - WFC_UTIL_NV_BIN_POS_MAC_ADDR, - mac_add, - WFC_UTIL_CFG_LENGHT_MAC); - - wfc_util_log_error("write mac1"); - - /* - * Write RFT MAC Address P2P - */ - wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - WFC_UTIL_NV_BIN_POS_MAC_ADDR + 6, - mac_add, - WFC_UTIL_CFG_LENGHT_MAC); - wfc_util_log_error("write mac2"); - - /* - * Read NV validity bitmap - */ - if (0 < wfc_util_fget_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - 0, - WFC_UTIL_NV_BIN_HEADER_LENGTH, - nvValidityBitmap, - WFC_UTIL_NV_BIN_HEADER_LENGTH)){ - /* - * Check whether Fields bit(Bit 1) is set - */ - if (0x02 & nvValidityBitmap[0]) { - wfc_util_log_info("We don't need to write the default value for NvFilelds"); - } else { - /* - * Update the Fields bit(Bit 1) - */ - nvValidityBitmap[0] |= 0x02; - wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - 0, - nvValidityBitmap, - WFC_UTIL_NV_BIN_HEADER_LENGTH); - - /* - * Write the default value for NvFilelds - */ - wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - WFC_UTIL_NV_BIN_POS_PRODUCT_ID, - nvFilelds_default, - 6); - } - } else { - wfc_util_log_error("Read Fail nvValidityBitmap"); - } - - return; -} - -/* - * wfc_util_qcom_reset_mac_to_bin - * - * reset the mac address of nv bin file - * - * return : void - */ -static void wfc_util_qcom_reset_mac_to_bin(void) -{ - unsigned char mac_addr[WFC_UTIL_CFG_LENGHT_MAC]; - - if(0 != wfc_util_ffile_check(WFC_UTIL_NV_BIN_FILE_NAME, - F_OK|R_OK|W_OK)) { - wfc_util_log_error("We don't access file [%s]", WFC_UTIL_NV_BIN_FILE_NAME); - return; - } - - if(0 < wfc_util_fget_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - WFC_UTIL_NV_BIN_POS_MAC_ADDR, - WFC_UTIL_CFG_LENGHT_MAC, - mac_addr, - WFC_UTIL_CFG_LENGHT_MAC)) { - if(0x00 == mac_addr[0] && 0x00 == mac_addr[1] && 0x00 == mac_addr[2] && - 0x00 == mac_addr[3] && 0x00 == mac_addr[4] && 0x00 == mac_addr[5]) - { - return; - } - } - - memset(mac_addr, 0, WFC_UTIL_CFG_LENGHT_MAC); - - wfc_util_fset_buffer(WFC_UTIL_NV_BIN_FILE_NAME, - WFC_UTIL_NV_BIN_POS_MAC_ADDR, - mac_addr, - WFC_UTIL_CFG_LENGHT_MAC); - - return; -} - -static int wfc_util_qcom_write_mac_process(unsigned char *nv_mac_addr, char *mac_add_buff) -{ - char nv_mac_add_buff[WFC_UTIL_CFG_LENGHT_MAC_STRING+1]; - int is_default_nv_mac = 0; - int is_same_mac = -1; - - if (NULL == nv_mac_addr) { - return 0; - } - - wfc_util_htoa(nv_mac_addr, WFC_UTIL_CFG_LENGHT_MAC, - nv_mac_add_buff, WFC_UTIL_CFG_LENGHT_MAC_STRING+1); - - is_default_nv_mac = wfc_util_qcom_is_default_mac(nv_mac_add_buff); - - is_same_mac = strncmp(mac_add_buff, nv_mac_add_buff, WFC_UTIL_CFG_LENGHT_MAC_STRING); - - /* - * 1. nv mac address is not a default mac address - * 2. same with mac address of config file - */ - if (((!is_default_nv_mac) && (0==is_same_mac)) || - /* - * 1. nv mac address is RFT mac address - * 2. same with mac address of config file - */ - ((2==is_default_nv_mac) && (0==is_same_mac)) - ) { - return 1; - } - /* - * 1. nv mac address not a default mac address excepting RFT mac address - * 2. does not same with mac address of config file - */ - else if ((1!=is_default_nv_mac) && (0!=is_same_mac)) { - wfc_util_log_error("Change %s%s", WFC_UTIL_CFG_TAG_MAC_ADDRESS, nv_mac_add_buff); - /* - * Update MAC address - */ - wfc_util_qcom_write_mac(nv_mac_add_buff); - -#ifdef WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN - /* - * Write RFT MAC address to nv.bin - */ - if (2==is_default_nv_mac) { - wfc_util_qcom_write_mac_to_bin(nv_mac_addr); - /* - * reset mac address of nv.bin if nv_mac_addr is not RFT mac address - */ - } else { - wfc_util_qcom_reset_mac_to_bin(); - } -#else /* WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN */ - /* - * Write MAC address to nv.bin - */ - wfc_util_qcom_write_mac_to_bin(nv_mac_addr); -#endif /* WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN */ - - return 1; - } - - return 0; -} - -static void wfc_util_qcom_create_random_mac(void) -{ - unsigned char random_mac_addr[WFC_UTIL_CFG_LENGHT_MAC]; - char mac_add_buff[WFC_UTIL_CFG_LENGHT_MAC_STRING+1]; - - wfc_util_log_info("wfc_util_qcom_create_random_mac"); - - wfc_util_random_mac(random_mac_addr); - - wfc_util_htoa(random_mac_addr, WFC_UTIL_CFG_LENGHT_MAC, mac_add_buff, WFC_UTIL_CFG_LENGHT_MAC_STRING+1); - - wfc_util_qcom_write_mac(mac_add_buff); - -#ifdef WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN - wfc_util_qcom_reset_mac_to_bin(); -#else /* WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN */ - wfc_util_qcom_write_mac_to_bin(random_mac_addr); -#endif /* WFC_UTIL_FEATURE_DO_NOT_WRITE_MAC_TO_BIN */ - - return; -} - -/* - * wfc_util_qcom_check_config - * - * check the qcom wlan driver config file - * - * return : it will return 0 if procedure is success - * or will return -1 if not. - */ -int wfc_util_qcom_check_config(unsigned char *nv_mac_addr) -{ - char mac_add_buff[WFC_UTIL_CFG_LENGHT_MAC_STRING+1]; - - /* make sure driver config file exists */ - if(0 > wfc_util_ffile_check_copy(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TEMPFILE_NAME, - 0660, - AID_SYSTEM, - /* we use "radio" for gid to access from "rild" for AT cmd. */ - AID_WIFI/*AID_WIFI*/)) { - wfc_util_log_error("Fail to Access [%s]", WFC_UTIL_CFG_FILE_NAME); - return -1; - } - -#ifdef WFC_UTIL_FEAUTRE_COPY_NV_BIN - char nv_bin_tempfile_name[50]; - - sprintf(nv_bin_tempfile_name, "/system/etc/wifi/WCNSS_qcom_wlan_nv.bin"); - wfc_util_log_error("nv bin : %s", nv_bin_tempfile_name); - - if(0 > wfc_util_ffile_check_copy(WFC_UTIL_NV_BIN_FILE_NAME, - nv_bin_tempfile_name, - 0660, - AID_SYSTEM, - /* we use "radio" for gid to access from "rild" for AT cmd. */ - AID_WIFI/*AID_WIFI*/)) { - wfc_util_log_error("Fail to Access [%s]", WFC_UTIL_NV_BIN_FILE_NAME); - return -1; - } -#endif /* WFC_UTIL_FEAUTRE_COPY_NV_BIN */ - - /* - * Read MAC address from config file - */ - if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - WFC_UTIL_CFG_TAG_MAC_ADDRESS, - WFC_UTIL_CFG_TAG_END_OF_LINE, - mac_add_buff, - WFC_UTIL_CFG_LENGHT_MAC_STRING+1)) { - wfc_util_log_info("%s%s", WFC_UTIL_CFG_TAG_MAC_ADDRESS, mac_add_buff); - - /* - * Write nv mac address - */ - if (1 != wfc_util_qcom_write_mac_process(nv_mac_addr, mac_add_buff)) { - /* - * Check whether this is default mac address or not - */ - if (wfc_util_qcom_is_default_mac(mac_add_buff)) { - /* - * Create random MAC address - */ - wfc_util_qcom_create_random_mac(); - } - } - } else { - wfc_util_log_error("%s does not have mac address", WFC_UTIL_CFG_FILE_NAME); - - memset( mac_add_buff, 0, WFC_UTIL_CFG_LENGHT_MAC_STRING+1 ); - - /* - * Write nv mac address - */ - if (1 != wfc_util_qcom_write_mac_process(nv_mac_addr, mac_add_buff)) { - /* - * Create random MAC address - */ - wfc_util_qcom_create_random_mac(); - } - } - - return 0; -} - -/* - * wfc_util_qcom_reset_mac - * - * reset the mac address of config file - * - * return : void - */ -void wfc_util_qcom_reset_mac(void) -{ - wfc_util_qcom_write_mac("000000000000"); - - wfc_util_qcom_reset_mac_to_bin(); - - return; -} - -/* - * wfc_util_qcom_ota_enable - * - * enable ota mode by reconfiguring BMPS and L2Roaming - * - * return : int (boolean) - */ -int wfc_util_qcom_ota_enable(void) -{ - wfc_util_qcom_write_ota_enable(); - return 1; -} - -/* - * wfc_util_qcom_ota_disable - * - * disable ota mode by reconfiguring BMPS and L2Roaming - * - * return : int (boolean) - */ -int wfc_util_qcom_ota_disable(void) -{ - wfc_util_qcom_write_ota_disable(); - return 1; -} - -/* - * wfc_util_qcom_checkt_roaming_off - * - * Check L2Roaming configuration - * - * return : int (boolean) - */ -int wfc_util_qcom_checkt_roaming_off(void) -{ - char string_buff[5]; - /* - * check whether OTA test is enabled or not. - */ - if(0 < wfc_util_fget_string(WFC_UTIL_CFG_FILE_NAME, - WFC_UTIL_CFG_TAG_END_OF_CFG, - //WFC_UTIL_CFG_TAG_L2Roaming, - WFC_UTIL_CFG_TAG_POWER_SAVE, - WFC_UTIL_CFG_TAG_END_OF_LINE, - string_buff, - 5)) { - //wfc_util_log_info("%s%s", WFC_UTIL_CFG_TAG_L2Roaming, string_buff); - wfc_util_log_info("%s%s", WFC_UTIL_CFG_TAG_POWER_SAVE, string_buff); - if(0 == strncmp(string_buff, "0", 1)) { - return 1; - } - } - return 0; -} - -#endif /* CONFIG_LGE_WLAN_QCOM_PATCH */ - diff --git a/conn_init/wfc_util_qcom.h b/conn_init/wfc_util_qcom.h deleted file mode 100644 index 1bd4cc1..0000000 --- a/conn_init/wfc_util_qcom.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2012 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __WFC_UTIL_QCOM_H__ -#define __WFC_UTIL_QCOM_H__ - -#ifdef CONFIG_LGE_WLAN_QCOM_PATCH -/* - * wfc_util_qcom_check_config - * - * check the qcom wlan driver config file - * - * return : it will return 0 if procedure is success - * or will return -1 if not. - */ -extern int wfc_util_qcom_check_config(unsigned char *nv_mac_addr); - -/* - * wfc_util_qcom_reset_mac - * - * reset the mac address of config file - * - * return : void - */ -extern void wfc_util_qcom_reset_mac(void); - -/* - * wfc_util_qcom_ota_enable/disable - * - * enable OTA mode for Wi-Fi related certificiation - * - * return : int (boolean) - */ -extern int wfc_util_qcom_ota_enable(void); -extern int wfc_util_qcom_ota_disable(void); -extern int wfc_util_qcom_checkt_roaming_off(void); -#endif /* CONFIG_LGE_WLAN_QCOM_PATCH */ -#endif - diff --git a/libril/MODULE_LICENSE_APACHE2 b/device-proprietary-files.txt index e69de29..e69de29 100644 --- a/libril/MODULE_LICENSE_APACHE2 +++ b/device-proprietary-files.txt diff --git a/extract-files.sh b/extract-files.sh index 63d3359..2ef0476 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,28 +1,7 @@ -#!/bin/bash +#!/bin/sh -VENDOR=oppo -DEVICE=n1 +set -e -BASE=../../../vendor/$VENDOR/$DEVICE/proprietary -rm -rf $BASE/* - -for FILE in `egrep -v '(^#|^$)' proprietary-files.txt`; do - OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS - FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"` - DEST=${PARSING_ARRAY[1]} - if [ -z $DEST ] - then - DEST=$FILE - fi - DIR=`dirname $FILE` - if [ ! -d $BASE/$DIR ]; then - mkdir -p $BASE/$DIR - fi - # Try CM target first - adb pull /system/$DEST $BASE/$DEST - # if file does not exist try OEM target - if [ "$?" != "0" ] - then - adb pull /system/$FILE $BASE/$DEST - fi -done +export DEVICE=n1 +export VENDOR=oppo +./../apq8064-common/extract-files.sh $@ diff --git a/gps/gps.conf b/gps/gps.conf deleted file mode 100644 index 2dc30e6..0000000 --- a/gps/gps.conf +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef VENDOR_EDIT -#//DuYuanHua@OnLineRD.AirService.GPS, 2012/10/19, Modify for XTRA2 support -#XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin -#XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin -#XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin -#else /* VENDOR_EDIT */ -XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin -XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin -XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin -#endif /* VENDOR_EDIT */ - - - -# Error Estimate -# _SET = 1 -# _CLEAR = 0 -ERR_ESTIMATE=0 - -#Test -NTP_SERVER=time.gpsonextra.net -#Asia -# NTP_SERVER=asia.pool.ntp.org -#Europe -# NTP_SERVER=europe.pool.ntp.org -#North America -# NTP_SERVER=north-america.pool.ntp.org - -# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info -# 4 - Debug, 5 - Verbose -DEBUG_LEVEL = 3 - -# Intermediate position report, 1=enable, 0=disable -INTERMEDIATE_POS=0 - -# supl version 1.0 -SUPL_VER=0x10000 - -# GPS Capabilities bit mask -# SCHEDULING = 1 -# MSB = 2 -# MSA = 4 -# ON_DEMAND_TIME = 0x10 -# GEOFENCE = 0x20 -# default = MSA | MSB | SCHEDULING | ULP | ON_DEMAND_TIME -CAPABILITIES=0x36 - -# Accuracy threshold for intermediate positions -# less accurate positions are ignored, 0 for passing all positions -# ACCURACY_THRES=5000 - -################################ -##### AGPS server settings ##### -################################ - -# FOR SUPL SUPPORT, set the following -# SUPL_HOST=supl.host.com or IP -# SUPL_PORT=1234 - -# FOR C2K PDE SUPPORT, set the following -# C2K_HOST=c2k.pde.com or IP -# C2K_PORT=1234 - -#################################### -# LTE Positioning Profile Settings -#################################### -# 0: Enable RRLP on LTE(Default) -# 1: Enable LPP_User_Plane on LTE -# 2: Enable LPP_Control_Plane -# 3: Enable both LPP_User_Plane and LPP_Control_Plane -LPP_PROFILE = 0 - -################################ -# EXTRA SETTINGS -################################ -# NMEA provider (1=Modem Processor, 0=Application Processor) -NMEA_PROVIDER=0 - -################################################## -# Select Positioning Protocol on A-GLONASS system -################################################## -# 0x1: RRC CPlane -# 0x2: RRLP UPlane -# 0x4: LLP Uplane -A_GLONASS_POS_PROTOCOL_SELECT = 0 diff --git a/gps/izat.conf b/gps/izat.conf deleted file mode 100644 index 856784c..0000000 --- a/gps/izat.conf +++ /dev/null @@ -1,13 +0,0 @@ -################################ -# EXTRA SETTINGS -################################ -# Enable or Disable Wiper (1=Enable, 0=Disable) -ENABLE_WIPER=1 - -################################ -# Indoor Positioning Settings -################################ -# 0: QUIPC disabled, 1: QUIPC enabled, 2: forced QUIPC only -QUIPC_ENABLED = 0 - - diff --git a/gps/sap.conf b/gps/sap.conf deleted file mode 100644 index 7adadea..0000000 --- a/gps/sap.conf +++ /dev/null @@ -1,42 +0,0 @@ -################################ -# Sensor Settings -################################ - -# Needs to be set explicitly based on sensor -# There is no default value. -# used in loc_eng_reinit -#GYRO_BIAS_RANDOM_WALK= -#ACCEL_RANDOM_WALK_SPECTRAL_DENSITY= -#ANGLE_RANDOM_WALK_SPECTRAL_DENSITY= -#RATE_RANDOM_WALK_SPECTRAL_DENSITY= -#VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY= - -# Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0) -# used in loc_eng_reinit -SENSOR_ACCEL_BATCHES_PER_SEC=2 -SENSOR_ACCEL_SAMPLES_PER_BATCH=5 -SENSOR_GYRO_BATCHES_PER_SEC=2 -SENSOR_GYRO_SAMPLES_PER_BATCH=5 -# Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0) -SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4 -SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25 -SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4 -SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25 - -# Sensor Control Mode (0=AUTO, 1=FORCE_ON) -# used in loc_eng_reinit -SENSOR_CONTROL_MODE=0 - -# Enable or Disable Sensors for GPS use (0=Enable, 1=Disable) -# used in loc_eng_reinit -SENSOR_USAGE=0 - -# Choose GSIFF sensor provider (1=DSPS, 2=Android NDK) -SENSOR_PROVIDER=1 - -# Bit mask used to define which sensor algorithms are used. -# Setting each bit has the following definition: -# 0x1 - DISABLE_INS_POSITIONING_FILTER -# 0x0 - ENABLE_INS_POSITIONING_FILTER -SENSOR_ALGORITHM_CONFIG_MASK=0x0 - diff --git a/liblight/Android.mk b/liblight/Android.mk deleted file mode 100644 index 947d2c1..0000000 --- a/liblight/Android.mk +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2013 The CyanogenMod Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH:= $(call my-dir) -# HAL module implemenation stored in -# hw/<COPYPIX_HARDWARE_MODULE_ID>.<ro.board.platform>.so -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := lights.c -LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw -LOCAL_SHARED_LIBRARIES := liblog libcutils - -LOCAL_MODULE := lights.msm8960 -LOCAL_MODULE_TAGS := optional - -include $(BUILD_SHARED_LIBRARY) diff --git a/liblight/NOTICE b/liblight/NOTICE deleted file mode 100644 index 7340b9e..0000000 --- a/liblight/NOTICE +++ /dev/null @@ -1,190 +0,0 @@ - - Copyright (c) 2008, The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/liblight/lights.c b/liblight/lights.c deleted file mode 100644 index f65495b..0000000 --- a/liblight/lights.c +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (C) 2013 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#define LOG_NDEBUG 0 -#define LOG_TAG "lights" - -#include <cutils/log.h> - -#include <stdlib.h> -#include <stdint.h> -#include <string.h> -#include <unistd.h> -#include <errno.h> -#include <fcntl.h> -#include <pthread.h> - -#include <sys/ioctl.h> -#include <sys/types.h> - -#include <hardware/lights.h> - -/******************************************************************************/ - -static pthread_once_t g_init = PTHREAD_ONCE_INIT; -static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER; -static struct light_state_t g_notification; -static struct light_state_t g_battery; -static struct light_state_t g_attention; - -const char *const LCD_FILE - = "/sys/class/leds/lcd-backlight/brightness"; - -const char *const BUTTONS_FILE - = "/sys/class/leds/button-backlight/brightness"; - -/** - * device methods - */ - -void init_g_lock(void) -{ - // init the mutex - pthread_mutex_init(&g_lock, NULL); -} - -static int -write_int(const char *path, int value) -{ - int fd; - static int already_warned = 0; - - fd = open(path, O_RDWR); - if (fd >= 0) { - char buffer[20]; - int bytes = sprintf(buffer, "%d\n", value); - int amt = write(fd, buffer, bytes); - close(fd); - return amt == -1 ? -errno : 0; - } else { - if (already_warned == 0) { - ALOGE("write_int failed to open %s\n", path); - already_warned = 1; - } - return -errno; - } -} - -static int -read_int(const char *path) -{ - int fd; - fd = open(path, O_RDONLY); - if (fd >= 0) { - char buffer[5] = {0}; - read(fd, buffer, 5); - close(fd); - - return atoi(buffer); - } else { - ALOGE("Error reading path %s", path); - return 0; - } -} - -static int -rgb_to_brightness(const struct light_state_t *state) -{ - int color = state->color & 0x00ffffff; - return ((77*((color>>16)&0x00ff)) - + (150*((color>>8)&0x00ff)) + (29*(color&0x00ff))) >> 8; -} - -static int -set_light_backlight(struct light_device_t *dev, - const struct light_state_t *state) -{ - int err = 0; - int brightness = rgb_to_brightness(state); - - pthread_mutex_lock(&g_lock); - - err = write_int(LCD_FILE, brightness); - - pthread_mutex_unlock(&g_lock); - - return err; -} - -static int -set_light_buttons(struct light_device_t *dev, - const struct light_state_t *state) -{ - int err = 0; - int brightness = rgb_to_brightness(state); - - pthread_mutex_lock(&g_lock); - - err = write_int(BUTTONS_FILE, brightness); - - pthread_mutex_unlock(&g_lock); - - return err; -} - -/** Close the lights device */ -static int -close_lights(struct light_device_t *dev) -{ - if (dev) { - free(dev); - } - return 0; -} - - -/******************************************************************************/ - -/** - * module methods - */ - -/** Open a new instance of a lights device using name */ -static int open_lights(const struct hw_module_t *module, const char *name, - struct hw_device_t **device) -{ - int (*set_light)(struct light_device_t *dev, - const struct light_state_t *state); - - if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) - set_light = set_light_backlight; - else if (0 == strcmp(LIGHT_ID_BUTTONS, name)) - set_light = set_light_buttons; - else - return -EINVAL; - - pthread_once(&g_init, init_g_lock); - - struct light_device_t *dev = malloc(sizeof(struct light_device_t)); - memset(dev, 0, sizeof(*dev)); - - dev->common.tag = HARDWARE_DEVICE_TAG; - dev->common.version = 0; - dev->common.module = (struct hw_module_t*)module; - dev->common.close = (int (*)(struct hw_device_t*))close_lights; - dev->set_light = set_light; - - *device = (struct hw_device_t*)dev; - return 0; -} - -static struct hw_module_methods_t lights_module_methods = { - .open = open_lights, -}; - -/* - * The lights Module - */ -struct hw_module_t HAL_MODULE_INFO_SYM = { - .tag = HARDWARE_MODULE_TAG, - .version_major = 1, - .version_minor = 0, - .id = LIGHTS_HARDWARE_MODULE_ID, - .name = "N1 Lights Module", - .author = "The CyanogenMod Project", - .methods = &lights_module_methods, -}; diff --git a/libril/Android.mk b/libril/Android.mk deleted file mode 100644 index 7551f4b..0000000 --- a/libril/Android.mk +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2006 The Android Open Source Project - -ifeq ($(BOARD_PROVIDES_LIBRIL),true) -ifeq ($(BOARD_VENDOR),oppo) -ifeq ($(TARGET_DEVICE),n1) - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - ril.cpp \ - ril_event.cpp - -LOCAL_SHARED_LIBRARIES := \ - liblog \ - libutils \ - libbinder \ - libcutils \ - libhardware_legacy \ - librilutils - -LOCAL_CFLAGS := - -LOCAL_MODULE:= libril - -LOCAL_LDLIBS += -lpthread - -include $(BUILD_SHARED_LIBRARY) - - -# For RdoServD which needs a static library -# ========================================= -ifneq ($(ANDROID_BIONIC_TRANSITION),) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - ril.cpp - -LOCAL_STATIC_LIBRARIES := \ - libutils_static \ - libcutils \ - librilutils_static - -LOCAL_CFLAGS := - -LOCAL_MODULE:= libril_static - -LOCAL_LDLIBS += -lpthread - -include $(BUILD_STATIC_LIBRARY) -endif # ANDROID_BIONIC_TRANSITION - -endif -endif -endif - diff --git a/libril/NOTICE b/libril/NOTICE deleted file mode 100644 index c5b1efa..0000000 --- a/libril/NOTICE +++ /dev/null @@ -1,190 +0,0 @@ - - Copyright (c) 2005-2008, The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/libril/ril.cpp b/libril/ril.cpp deleted file mode 100755 index 675a6fc..0000000 --- a/libril/ril.cpp +++ /dev/null @@ -1,4080 +0,0 @@ -/* //device/libs/telephony/ril.cpp -** -** Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. -** Not a Contribution -** Copyright 2006, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -#define LOG_TAG "RILC" - -#include <hardware_legacy/power.h> - -#include "telephony/ril.h" -#include "telephony/ril_cdma_sms.h" -#include <cutils/sockets.h> -#include <cutils/jstring.h> -#include "telephony/record_stream.h" -#include <utils/Log.h> -#include <utils/SystemClock.h> -#include <pthread.h> -#include <binder/Parcel.h> -#include <cutils/jstring.h> - -#include <sys/types.h> -#include <sys/limits.h> -#include <pwd.h> - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <unistd.h> -#include <fcntl.h> -#include <time.h> -#include <errno.h> -#include <assert.h> -#include <ctype.h> -#include <alloca.h> -#include <sys/un.h> -#include <assert.h> -#include <netinet/in.h> -#include <cutils/properties.h> - -#include <ril_event.h> - -namespace android { - -#define PHONE_PROCESS "radio" - -#define SOCKET_NAME_RIL "rild" -#define SOCKET_NAME_RIL_DEBUG "rild-debug" - -#define ANDROID_WAKE_LOCK_NAME "radio-interface" - - -#define PROPERTY_RIL_IMPL "gsm.version.ril-impl" - -// match with constant in RIL.java -#define MAX_COMMAND_BYTES (8 * 1024) - -// Basically: memset buffers that the client library -// shouldn't be using anymore in an attempt to find -// memory usage issues sooner. -#define MEMSET_FREED 1 - -#define NUM_ELEMS(a) (sizeof (a) / sizeof (a)[0]) - -#define MIN(a,b) ((a)<(b) ? (a) : (b)) - -/* Constants for response types */ -#define RESPONSE_SOLICITED 0 -#define RESPONSE_UNSOLICITED 1 - -/* Negative values for private RIL errno's */ -#define RIL_ERRNO_INVALID_RESPONSE -1 - -// request, response, and unsolicited msg print macro -#define PRINTBUF_SIZE 8096 - -// Enable RILC log -#define RILC_LOG 0 - -#if RILC_LOG - #define startRequest sprintf(printBuf, "(") - #define closeRequest sprintf(printBuf, "%s)", printBuf) - #define printRequest(token, req) \ - RLOGD("[%04d]> %s %s", token, requestToString(req), printBuf) - - #define startResponse sprintf(printBuf, "%s {", printBuf) - #define closeResponse sprintf(printBuf, "%s}", printBuf) - #define printResponse RLOGD("%s", printBuf) - - #define clearPrintBuf printBuf[0] = 0 - #define removeLastChar printBuf[strlen(printBuf)-1] = 0 - #define appendPrintBuf(x...) sprintf(printBuf, x) -#else - #define startRequest - #define closeRequest - #define printRequest(token, req) - #define startResponse - #define closeResponse - #define printResponse - #define clearPrintBuf - #define removeLastChar - #define appendPrintBuf(x...) -#endif - -enum WakeType {DONT_WAKE, WAKE_PARTIAL}; - -typedef struct { - int requestNumber; - void (*dispatchFunction) (Parcel &p, struct RequestInfo *pRI); - int(*responseFunction) (Parcel &p, void *response, size_t responselen); -} CommandInfo; - -typedef struct { - int requestNumber; - int (*responseFunction) (Parcel &p, void *response, size_t responselen); - WakeType wakeType; -} UnsolResponseInfo; - -typedef struct RequestInfo { - int32_t token; //this is not RIL_Token - CommandInfo *pCI; - struct RequestInfo *p_next; - char cancelled; - char local; // responses to local commands do not go back to command process -} RequestInfo; - -typedef struct UserCallbackInfo { - RIL_TimedCallback p_callback; - void *userParam; - struct ril_event event; - struct UserCallbackInfo *p_next; -} UserCallbackInfo; - -extern "C" -char rild[MAX_SOCKET_NAME_LENGTH] = SOCKET_NAME_RIL; -/*******************************************************************/ - -RIL_RadioFunctions s_callbacks = {0, NULL, NULL, NULL, NULL, NULL}; -static int s_registerCalled = 0; - -static pthread_t s_tid_dispatch; -static pthread_t s_tid_reader; -static int s_started = 0; - -static int s_fdListen = -1; -static int s_fdCommand = -1; -static int s_fdDebug = -1; - -static int s_fdWakeupRead; -static int s_fdWakeupWrite; - -static struct ril_event s_commands_event; -static struct ril_event s_wakeupfd_event; -static struct ril_event s_listen_event; -static struct ril_event s_wake_timeout_event; -static struct ril_event s_debug_event; - - -static const struct timeval TIMEVAL_WAKE_TIMEOUT = {1,0}; - -static pthread_mutex_t s_pendingRequestsMutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_mutex_t s_writeMutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_mutex_t s_startupMutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t s_startupCond = PTHREAD_COND_INITIALIZER; - -static pthread_mutex_t s_dispatchMutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t s_dispatchCond = PTHREAD_COND_INITIALIZER; - -static RequestInfo *s_pendingRequests = NULL; - -static RequestInfo *s_toDispatchHead = NULL; -static RequestInfo *s_toDispatchTail = NULL; - -static UserCallbackInfo *s_last_wake_timeout_info = NULL; - -static void *s_lastNITZTimeData = NULL; -static size_t s_lastNITZTimeDataSize; - -#if RILC_LOG - static char printBuf[PRINTBUF_SIZE]; -#endif - -/*******************************************************************/ - -static void dispatchVoid (Parcel& p, RequestInfo *pRI); -static void dispatchString (Parcel& p, RequestInfo *pRI); -static void dispatchStrings (Parcel& p, RequestInfo *pRI); -static void dispatchInts (Parcel& p, RequestInfo *pRI); -static void dispatchDial (Parcel& p, RequestInfo *pRI); -static void dispatchSIM_IO (Parcel& p, RequestInfo *pRI); -static void dispatchCallForward(Parcel& p, RequestInfo *pRI); -static void dispatchRaw(Parcel& p, RequestInfo *pRI); -static void dispatchSmsWrite (Parcel &p, RequestInfo *pRI); -static void dispatchDataCall (Parcel& p, RequestInfo *pRI); -static void dispatchVoiceRadioTech (Parcel& p, RequestInfo *pRI); -static void dispatchSetInitialAttachApn (Parcel& p, RequestInfo *pRI); -static void dispatchCdmaSubscriptionSource (Parcel& p, RequestInfo *pRI); - -static void dispatchCdmaSms(Parcel &p, RequestInfo *pRI); -static void dispatchImsSms(Parcel &p, RequestInfo *pRI); -static void dispatchImsCdmaSms(Parcel &p, RequestInfo *pRI, uint8_t retry, int32_t messageRef); -static void dispatchImsGsmSms(Parcel &p, RequestInfo *pRI, uint8_t retry, int32_t messageRef); -static void dispatchCdmaSmsAck(Parcel &p, RequestInfo *pRI); -static void dispatchGsmBrSmsCnf(Parcel &p, RequestInfo *pRI); -static void dispatchCdmaBrSmsCnf(Parcel &p, RequestInfo *pRI); -static void dispatchRilCdmaSmsWriteArgs(Parcel &p, RequestInfo *pRI); -static void dispatchUiccSubscripton(Parcel &p, RequestInfo *pRI); -static int responseInts(Parcel &p, void *response, size_t responselen); -static int responseStrings(Parcel &p, void *response, size_t responselen); -static int responseString(Parcel &p, void *response, size_t responselen); -static int responseVoid(Parcel &p, void *response, size_t responselen); -static int responseCallList(Parcel &p, void *response, size_t responselen); -static int responseSMS(Parcel &p, void *response, size_t responselen); -static int responseSIM_IO(Parcel &p, void *response, size_t responselen); -static int responseCallForwards(Parcel &p, void *response, size_t responselen); -static int responseDataCallList(Parcel &p, void *response, size_t responselen); -static int responseSetupDataCall(Parcel &p, void *response, size_t responselen); -static int responseRaw(Parcel &p, void *response, size_t responselen); -static int responseSsn(Parcel &p, void *response, size_t responselen); -static int responseSimStatus(Parcel &p, void *response, size_t responselen); -static int responseGsmBrSmsCnf(Parcel &p, void *response, size_t responselen); -static int responseCdmaBrSmsCnf(Parcel &p, void *response, size_t responselen); -static int responseCdmaSms(Parcel &p, void *response, size_t responselen); -static int responseCellList(Parcel &p, void *response, size_t responselen); -static int responseCdmaInformationRecords(Parcel &p,void *response, size_t responselen); -static int responseRilSignalStrength(Parcel &p,void *response, size_t responselen); -static int responseCallRing(Parcel &p, void *response, size_t responselen); -static int responseCdmaSignalInfoRecord(Parcel &p,void *response, size_t responselen); -static int responseCdmaCallWaiting(Parcel &p,void *response, size_t responselen); -static int responseSimRefresh(Parcel &p, void *response, size_t responselen); -static int responseCellInfoList(Parcel &p, void *response, size_t responselen); -static int responseGetDataCallProfile(Parcel &p, void *response, size_t responselen); -static int responseSSData(Parcel &p, void *response, size_t responselen); - -static int decodeVoiceRadioTechnology (RIL_RadioState radioState); -static int decodeCdmaSubscriptionSource (RIL_RadioState radioState); -static RIL_RadioState processRadioState(RIL_RadioState newRadioState); - -static bool isServiceTypeCfQuery(RIL_SsServiceType serType, RIL_SsRequestType reqType); -extern "C" const char * requestToString(int request); -extern "C" const char * failCauseToString(RIL_Errno); -extern "C" const char * callStateToString(RIL_CallState); -extern "C" const char * radioStateToString(RIL_RadioState); - -#ifdef RIL_SHLIB -extern "C" void RIL_onUnsolicitedResponse(int unsolResponse, void *data, - size_t datalen); -#endif - -static UserCallbackInfo * internalRequestTimedCallback - (RIL_TimedCallback callback, void *param, - const struct timeval *relativeTime); - -/** Index == requestNumber */ -static CommandInfo s_commands[] = { -#include "ril_commands.h" -}; - -static UnsolResponseInfo s_unsolResponses[] = { -#include "ril_unsol_commands.h" -}; - -/* For older RILs that do not support new commands RIL_REQUEST_VOICE_RADIO_TECH and - RIL_UNSOL_VOICE_RADIO_TECH_CHANGED messages, decode the voice radio tech from - radio state message and store it. Every time there is a change in Radio State - check to see if voice radio tech changes and notify telephony - */ -int voiceRadioTech = -1; - -/* For older RILs that do not support new commands RIL_REQUEST_GET_CDMA_SUBSCRIPTION_SOURCE - and RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED messages, decode the subscription - source from radio state and store it. Every time there is a change in Radio State - check to see if subscription source changed and notify telephony - */ -int cdmaSubscriptionSource = -1; - -/* For older RILs that do not send RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, decode the - SIM/RUIM state from radio state and store it. Every time there is a change in Radio State, - check to see if SIM/RUIM status changed and notify telephony - */ -int simRuimStatus = -1; - -static char * RIL_getRilSocketName() { - return rild; -} - -extern "C" -void RIL_setRilSocketName(char * s) { - strncpy(rild, s, MAX_SOCKET_NAME_LENGTH); -} - -static char * -strdupReadString(Parcel &p) { - size_t stringlen; - const char16_t *s16; - - s16 = p.readString16Inplace(&stringlen); - - return strndup16to8(s16, stringlen); -} - -static void writeStringToParcel(Parcel &p, const char *s) { - char16_t *s16; - size_t s16_len; - s16 = strdup8to16(s, &s16_len); - p.writeString16(s16, s16_len); - free(s16); -} - - -static void -memsetString (char *s) { - if (s != NULL) { - memset (s, 0, strlen(s)); - } -} - -void nullParcelReleaseFunction (const uint8_t* data, size_t dataSize, - const size_t* objects, size_t objectsSize, - void* cookie) { - // do nothing -- the data reference lives longer than the Parcel object -} - -/** - * To be called from dispatch thread - * Issue a single local request, ensuring that the response - * is not sent back up to the command process - */ -static void -issueLocalRequest(int request, void *data, int len) { - RequestInfo *pRI; - int ret; - - pRI = (RequestInfo *)calloc(1, sizeof(RequestInfo)); - - pRI->local = 1; - pRI->token = 0xffffffff; // token is not used in this context - pRI->pCI = &(s_commands[request]); - - ret = pthread_mutex_lock(&s_pendingRequestsMutex); - assert (ret == 0); - - pRI->p_next = s_pendingRequests; - s_pendingRequests = pRI; - - ret = pthread_mutex_unlock(&s_pendingRequestsMutex); - assert (ret == 0); - - RLOGD("C[locl]> %s", requestToString(request)); - - s_callbacks.onRequest(request, data, len, pRI); -} - - - -static int -processCommandBuffer(void *buffer, size_t buflen) { - Parcel p; - status_t status; - int32_t request; - int32_t token; - RequestInfo *pRI; - int ret; - - p.setData((uint8_t *) buffer, buflen); - - // status checked at end - status = p.readInt32(&request); - status = p.readInt32 (&token); - - if (status != NO_ERROR) { - RLOGE("invalid request block"); - return 0; - } - - if (request < 1 || request >= (int32_t)NUM_ELEMS(s_commands)) { - RLOGE("unsupported request code %d token %d", request, token); - // FIXME this should perhaps return a response - return 0; - } - - - pRI = (RequestInfo *)calloc(1, sizeof(RequestInfo)); - - pRI->token = token; - pRI->pCI = &(s_commands[request]); - - ret = pthread_mutex_lock(&s_pendingRequestsMutex); - assert (ret == 0); - - pRI->p_next = s_pendingRequests; - s_pendingRequests = pRI; - - ret = pthread_mutex_unlock(&s_pendingRequestsMutex); - assert (ret == 0); - -/* sLastDispatchedToken = token; */ - - pRI->pCI->dispatchFunction(p, pRI); - - return 0; -} - -static void -invalidCommandBlock (RequestInfo *pRI) { - RLOGE("invalid command block for token %d request %s", - pRI->token, requestToString(pRI->pCI->requestNumber)); -} - -/** Callee expects NULL */ -static void -dispatchVoid (Parcel& p, RequestInfo *pRI) { - clearPrintBuf; - printRequest(pRI->token, pRI->pCI->requestNumber); - s_callbacks.onRequest(pRI->pCI->requestNumber, NULL, 0, pRI); -} - -/** Callee expects const char * */ -static void -dispatchString (Parcel& p, RequestInfo *pRI) { - status_t status; - size_t datalen; - size_t stringlen; - char *string8 = NULL; - - string8 = strdupReadString(p); - - startRequest; - appendPrintBuf("%s%s", printBuf, string8); - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, string8, - sizeof(char *), pRI); - -#ifdef MEMSET_FREED - memsetString(string8); -#endif - - free(string8); - return; -invalid: - invalidCommandBlock(pRI); - return; -} - -/** Callee expects const char ** */ -static void -dispatchStrings (Parcel &p, RequestInfo *pRI) { - int32_t countStrings; - status_t status; - size_t datalen; - char **pStrings; - - status = p.readInt32 (&countStrings); - - if (status != NO_ERROR) { - goto invalid; - } - - startRequest; - if (countStrings == 0) { - // just some non-null pointer - pStrings = (char **)alloca(sizeof(char *)); - datalen = 0; - } else if (((int)countStrings) == -1) { - pStrings = NULL; - datalen = 0; - } else { - datalen = sizeof(char *) * countStrings; - - pStrings = (char **)alloca(datalen); - - for (int i = 0 ; i < countStrings ; i++) { - pStrings[i] = strdupReadString(p); - appendPrintBuf("%s%s,", printBuf, pStrings[i]); - } - } - removeLastChar; - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, pStrings, datalen, pRI); - - if (pStrings != NULL) { - for (int i = 0 ; i < countStrings ; i++) { -#ifdef MEMSET_FREED - memsetString (pStrings[i]); -#endif - free(pStrings[i]); - } - -#ifdef MEMSET_FREED - memset(pStrings, 0, datalen); -#endif - } - - return; -invalid: - invalidCommandBlock(pRI); - return; -} - -/** Callee expects const int * */ -static void -dispatchInts (Parcel &p, RequestInfo *pRI) { - int32_t count; - status_t status; - size_t datalen; - int *pInts; - - status = p.readInt32 (&count); - - if (status != NO_ERROR || count == 0) { - goto invalid; - } - - datalen = sizeof(int) * count; - pInts = (int *)alloca(datalen); - - startRequest; - for (int i = 0 ; i < count ; i++) { - int32_t t; - - status = p.readInt32(&t); - pInts[i] = (int)t; - appendPrintBuf("%s%d,", printBuf, t); - - if (status != NO_ERROR) { - goto invalid; - } - } - removeLastChar; - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, const_cast<int *>(pInts), - datalen, pRI); - -#ifdef MEMSET_FREED - memset(pInts, 0, datalen); -#endif - - return; -invalid: - invalidCommandBlock(pRI); - return; -} - - -/** - * Callee expects const RIL_SMS_WriteArgs * - * Payload is: - * int32_t status - * String pdu - */ -static void -dispatchSmsWrite (Parcel &p, RequestInfo *pRI) { - RIL_SMS_WriteArgs args; - int32_t t; - status_t status; - - memset (&args, 0, sizeof(args)); - - status = p.readInt32(&t); - args.status = (int)t; - - args.pdu = strdupReadString(p); - - if (status != NO_ERROR || args.pdu == NULL) { - goto invalid; - } - - args.smsc = strdupReadString(p); - - startRequest; - appendPrintBuf("%s%d,%s,smsc=%s", printBuf, args.status, - (char*)args.pdu, (char*)args.smsc); - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, &args, sizeof(args), pRI); - -#ifdef MEMSET_FREED - memsetString (args.pdu); -#endif - - free (args.pdu); - -#ifdef MEMSET_FREED - memset(&args, 0, sizeof(args)); -#endif - - return; -invalid: - invalidCommandBlock(pRI); - return; -} - -/** - * Callee expects const RIL_Dial * - * Payload is: - * String address - * int32_t clir - */ -static void -dispatchDial (Parcel &p, RequestInfo *pRI) { - RIL_Dial dial; - RIL_UUS_Info uusInfo; - int32_t sizeOfDial; - int32_t t; - int32_t uusPresent; - status_t status; - - memset (&dial, 0, sizeof(dial)); - - dial.address = strdupReadString(p); - - status = p.readInt32(&t); - dial.clir = (int)t; - - if (status != NO_ERROR || dial.address == NULL) { - goto invalid; - } - - if (s_callbacks.version < 3) { // Remove when partners upgrade to version 3 - uusPresent = 0; - sizeOfDial = sizeof(dial) - sizeof(RIL_UUS_Info *); - } else { - status = p.readInt32(&uusPresent); - - if (status != NO_ERROR) { - goto invalid; - } - - if (uusPresent == 0) { - dial.uusInfo = NULL; - } else { - int32_t len; - - memset(&uusInfo, 0, sizeof(RIL_UUS_Info)); - - status = p.readInt32(&t); - uusInfo.uusType = (RIL_UUS_Type) t; - - status = p.readInt32(&t); - uusInfo.uusDcs = (RIL_UUS_DCS) t; - - status = p.readInt32(&len); - if (status != NO_ERROR) { - goto invalid; - } - - // The java code writes -1 for null arrays - if (((int) len) == -1) { - uusInfo.uusData = NULL; - len = 0; - } else { - uusInfo.uusData = (char*) p.readInplace(len); - } - - uusInfo.uusLength = len; - dial.uusInfo = &uusInfo; - } - sizeOfDial = sizeof(dial); - } - - startRequest; - appendPrintBuf("%snum=%s,clir=%d", printBuf, dial.address, dial.clir); - if (uusPresent) { - appendPrintBuf("%s,uusType=%d,uusDcs=%d,uusLen=%d", printBuf, - dial.uusInfo->uusType, dial.uusInfo->uusDcs, - dial.uusInfo->uusLength); - } - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, &dial, sizeOfDial, pRI); - -#ifdef MEMSET_FREED - memsetString (dial.address); -#endif - - free (dial.address); - -#ifdef MEMSET_FREED - memset(&uusInfo, 0, sizeof(RIL_UUS_Info)); - memset(&dial, 0, sizeof(dial)); -#endif - - return; -invalid: - invalidCommandBlock(pRI); - return; -} - -/** - * Callee expects const RIL_SIM_IO * - * Payload is: - * int32_t command - * int32_t fileid - * String path - * int32_t p1, p2, p3 - * String data - * String pin2 - * String aidPtr - */ -static void -dispatchSIM_IO (Parcel &p, RequestInfo *pRI) { - union RIL_SIM_IO { - RIL_SIM_IO_v6 v6; - RIL_SIM_IO_v5 v5; - } simIO; - - int32_t t; - int size; - status_t status; - - memset (&simIO, 0, sizeof(simIO)); - - // note we only check status at the end - - status = p.readInt32(&t); - simIO.v6.command = (int)t; - - status = p.readInt32(&t); - simIO.v6.fileid = (int)t; - - simIO.v6.path = strdupReadString(p); - - status = p.readInt32(&t); - simIO.v6.p1 = (int)t; - - status = p.readInt32(&t); - simIO.v6.p2 = (int)t; - - status = p.readInt32(&t); - simIO.v6.p3 = (int)t; - - simIO.v6.data = strdupReadString(p); - simIO.v6.pin2 = strdupReadString(p); - simIO.v6.aidPtr = strdupReadString(p); - - startRequest; - appendPrintBuf("%scmd=0x%X,efid=0x%X,path=%s,%d,%d,%d,%s,pin2=%s,aid=%s", printBuf, - simIO.v6.command, simIO.v6.fileid, (char*)simIO.v6.path, - simIO.v6.p1, simIO.v6.p2, simIO.v6.p3, - (char*)simIO.v6.data, (char*)simIO.v6.pin2, simIO.v6.aidPtr); - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - if (status != NO_ERROR) { - goto invalid; - } - - size = (s_callbacks.version < 6) ? sizeof(simIO.v5) : sizeof(simIO.v6); - s_callbacks.onRequest(pRI->pCI->requestNumber, &simIO, size, pRI); - -#ifdef MEMSET_FREED - memsetString (simIO.v6.path); - memsetString (simIO.v6.data); - memsetString (simIO.v6.pin2); - memsetString (simIO.v6.aidPtr); -#endif - - free (simIO.v6.path); - free (simIO.v6.data); - free (simIO.v6.pin2); - free (simIO.v6.aidPtr); - -#ifdef MEMSET_FREED - memset(&simIO, 0, sizeof(simIO)); -#endif - - return; -invalid: - invalidCommandBlock(pRI); - return; -} - -/** - * Callee expects const RIL_CallForwardInfo * - * Payload is: - * int32_t status/action - * int32_t reason - * int32_t serviceCode - * int32_t toa - * String number (0 length -> null) - * int32_t timeSeconds - */ -static void -dispatchCallForward(Parcel &p, RequestInfo *pRI) { - RIL_CallForwardInfo cff; - int32_t t; - status_t status; - - memset (&cff, 0, sizeof(cff)); - - // note we only check status at the end - - status = p.readInt32(&t); - cff.status = (int)t; - - status = p.readInt32(&t); - cff.reason = (int)t; - - status = p.readInt32(&t); - cff.serviceClass = (int)t; - - status = p.readInt32(&t); - cff.toa = (int)t; - - cff.number = strdupReadString(p); - - status = p.readInt32(&t); - cff.timeSeconds = (int)t; - - if (status != NO_ERROR) { - goto invalid; - } - - // special case: number 0-length fields is null - - if (cff.number != NULL && strlen (cff.number) == 0) { - cff.number = NULL; - } - - startRequest; - appendPrintBuf("%sstat=%d,reason=%d,serv=%d,toa=%d,%s,tout=%d", printBuf, - cff.status, cff.reason, cff.serviceClass, cff.toa, - (char*)cff.number, cff.timeSeconds); - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, &cff, sizeof(cff), pRI); - -#ifdef MEMSET_FREED - memsetString(cff.number); -#endif - - free (cff.number); - -#ifdef MEMSET_FREED - memset(&cff, 0, sizeof(cff)); -#endif - - return; -invalid: - invalidCommandBlock(pRI); - return; -} - - -static void -dispatchRaw(Parcel &p, RequestInfo *pRI) { - int32_t len; - status_t status; - const void *data; - uint8_t *ptr; - uint32_t header; - - status = p.readInt32(&len); - - if (status != NO_ERROR) { - goto invalid; - } - - // The java code writes -1 for null arrays - if (((int)len) == -1) { - data = NULL; - len = 0; - } - - data = p.readInplace(len); - - /* Handle rewriting RAW OEM request to Oppo NV PROCESS request */ - if (len > 4) { - ptr = (uint8_t *) data; - header = *((uint32_t *) ptr); - /* Magic header set by the NvProcess app */ - if (header == 0x44332211) { - RLOGI("%s: Rewriting to FACTORY_MODE_NV_PROCESS request", __func__); - data = ptr + 4; - len = 2; - pRI->pCI->requestNumber = RIL_REQUEST_FACTORY_MODE_NV_PROCESS; - } - } - - startRequest; - appendPrintBuf("%sraw_size=%d", printBuf, len); - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, const_cast<void *>(data), len, pRI); - - return; -invalid: - invalidCommandBlock(pRI); - return; -} - -static status_t -constructCdmaSms(Parcel &p, RequestInfo *pRI, RIL_CDMA_SMS_Message& rcsm) { - int32_t t; - uint8_t ut; - status_t status; - int32_t digitCount; - int digitLimit; - - memset(&rcsm, 0, sizeof(rcsm)); - - status = p.readInt32(&t); - rcsm.uTeleserviceID = (int) t; - - status = p.read(&ut,sizeof(ut)); - rcsm.bIsServicePresent = (uint8_t) ut; - - status = p.readInt32(&t); - rcsm.uServicecategory = (int) t; - - status = p.readInt32(&t); - rcsm.sAddress.digit_mode = (RIL_CDMA_SMS_DigitMode) t; - - status = p.readInt32(&t); - rcsm.sAddress.number_mode = (RIL_CDMA_SMS_NumberMode) t; - - status = p.readInt32(&t); - rcsm.sAddress.number_type = (RIL_CDMA_SMS_NumberType) t; - - status = p.readInt32(&t); - rcsm.sAddress.number_plan = (RIL_CDMA_SMS_NumberPlan) t; - - status = p.read(&ut,sizeof(ut)); - rcsm.sAddress.number_of_digits= (uint8_t) ut; - - digitLimit= MIN((rcsm.sAddress.number_of_digits), RIL_CDMA_SMS_ADDRESS_MAX); - for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { - status = p.read(&ut,sizeof(ut)); - rcsm.sAddress.digits[digitCount] = (uint8_t) ut; - } - - status = p.readInt32(&t); - rcsm.sSubAddress.subaddressType = (RIL_CDMA_SMS_SubaddressType) t; - - status = p.read(&ut,sizeof(ut)); - rcsm.sSubAddress.odd = (uint8_t) ut; - - status = p.read(&ut,sizeof(ut)); - rcsm.sSubAddress.number_of_digits = (uint8_t) ut; - - digitLimit= MIN((rcsm.sSubAddress.number_of_digits), RIL_CDMA_SMS_SUBADDRESS_MAX); - for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { - status = p.read(&ut,sizeof(ut)); - rcsm.sSubAddress.digits[digitCount] = (uint8_t) ut; - } - - status = p.readInt32(&t); - rcsm.uBearerDataLen = (int) t; - - digitLimit= MIN((rcsm.uBearerDataLen), RIL_CDMA_SMS_BEARER_DATA_MAX); - for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { - status = p.read(&ut, sizeof(ut)); - rcsm.aBearerData[digitCount] = (uint8_t) ut; - } - - if (status != NO_ERROR) { - return status; - } - - startRequest; - appendPrintBuf("%suTeleserviceID=%d, bIsServicePresent=%d, uServicecategory=%d, \ - sAddress.digit_mode=%d, sAddress.Number_mode=%d, sAddress.number_type=%d, ", - printBuf, rcsm.uTeleserviceID,rcsm.bIsServicePresent,rcsm.uServicecategory, - rcsm.sAddress.digit_mode, rcsm.sAddress.number_mode,rcsm.sAddress.number_type); - closeRequest; - - printRequest(pRI->token, pRI->pCI->requestNumber); - - return status; -} - -static void -dispatchCdmaSms(Parcel &p, RequestInfo *pRI) { - RIL_CDMA_SMS_Message rcsm; - - ALOGD("dispatchCdmaSms"); - if (NO_ERROR != constructCdmaSms(p, pRI, rcsm)) { - goto invalid; - } - - s_callbacks.onRequest(pRI->pCI->requestNumber, &rcsm, sizeof(rcsm),pRI); - -#ifdef MEMSET_FREED - memset(&rcsm, 0, sizeof(rcsm)); -#endif - - return; - -invalid: - invalidCommandBlock(pRI); - return; -} - -static void -dispatchImsCdmaSms(Parcel &p, RequestInfo *pRI, uint8_t retry, int32_t messageRef) { - RIL_IMS_SMS_Message rism; - RIL_CDMA_SMS_Message rcsm; - - ALOGD("dispatchImsCdmaSms: retry=%d, messageRef=%d", retry, messageRef); - - if (NO_ERROR != constructCdmaSms(p, pRI, rcsm)) { - goto invalid; - } - memset(&rism, 0, sizeof(rism)); - rism.tech = RADIO_TECH_3GPP2; - rism.retry = retry; - rism.messageRef = messageRef; - rism.message.cdmaMessage = &rcsm; - - s_callbacks.onRequest(pRI->pCI->requestNumber, &rism, - sizeof(RIL_RadioTechnologyFamily)+sizeof(uint8_t)+sizeof(int32_t) - +sizeof(rcsm),pRI); - -#ifdef MEMSET_FREED - memset(&rcsm, 0, sizeof(rcsm)); - memset(&rism, 0, sizeof(rism)); -#endif - - return; - -invalid: - invalidCommandBlock(pRI); - return; -} - -static void -dispatchImsGsmSms(Parcel &p, RequestInfo *pRI, uint8_t retry, int32_t messageRef) { - RIL_IMS_SMS_Message rism; - int32_t countStrings; - status_t status; - size_t datalen; - char **pStrings; - ALOGD("dispatchImsGsmSms: retry=%d, messageRef=%d", retry, messageRef); - - status = p.readInt32 (&countStrings); - - if (status != NO_ERROR) { - goto invalid; - } - - memset(&rism, 0, sizeof(rism)); - rism.tech = RADIO_TECH_3GPP; - rism.retry = retry; - rism.messageRef = messageRef; - - startRequest; - appendPrintBuf("%sformat=%d,", printBuf, rism.format); - if (countStrings == 0) { - // just some non-null pointer - pStrings = (char **)alloca(sizeof(char *)); - datalen = 0; - } else if (((int)countStrings) == -1) { - pStrings = NULL; - datalen = 0; - } else { - datalen = sizeof(char *) * countStrings; - - pStrings = (char **)alloca(datalen); - - for (int i = 0 ; i < countStrings ; i++) { - pStrings[i] = strdupReadString(p); - appendPrintBuf("%s%s,", printBuf, pStrings[i]); - } - } - removeLastChar; - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - rism.message.gsmMessage = pStrings; - s_callbacks.onRequest(pRI->pCI->requestNumber, &rism, - sizeof(RIL_RadioTechnologyFamily)+sizeof(uint8_t)+sizeof(int32_t) - +datalen, pRI); - - if (pStrings != NULL) { - for (int i = 0 ; i < countStrings ; i++) { -#ifdef MEMSET_FREED - memsetString (pStrings[i]); -#endif - free(pStrings[i]); - } - -#ifdef MEMSET_FREED - memset(pStrings, 0, datalen); -#endif - } - -#ifdef MEMSET_FREED - memset(&rism, 0, sizeof(rism)); -#endif - return; -invalid: - ALOGE("dispatchImsGsmSms invalid block"); - invalidCommandBlock(pRI); - return; -} - -static void -dispatchImsSms(Parcel &p, RequestInfo *pRI) { - int32_t t; - status_t status = p.readInt32(&t); - RIL_RadioTechnologyFamily format; - uint8_t retry; - int32_t messageRef; - - ALOGD("dispatchImsSms"); - if (status != NO_ERROR) { - goto invalid; - } - format = (RIL_RadioTechnologyFamily) t; - - // read retry field - status = p.read(&retry,sizeof(retry)); - if (status != NO_ERROR) { - goto invalid; - } - // read messageRef field - status = p.read(&messageRef,sizeof(messageRef)); - if (status != NO_ERROR) { - goto invalid; - } - - if (RADIO_TECH_3GPP == format) { - dispatchImsGsmSms(p, pRI, retry, messageRef); - } else if (RADIO_TECH_3GPP2 == format) { - dispatchImsCdmaSms(p, pRI, retry, messageRef); - } else { - ALOGE("requestImsSendSMS invalid format value =%d", format); - } - - return; - -invalid: - invalidCommandBlock(pRI); - return; -} - -static void -dispatchCdmaSmsAck(Parcel &p, RequestInfo *pRI) { - RIL_CDMA_SMS_Ack rcsa; - int32_t t; - status_t status; - int32_t digitCount; - - memset(&rcsa, 0, sizeof(rcsa)); - - status = p.readInt32(&t); - rcsa.uErrorClass = (RIL_CDMA_SMS_ErrorClass) t; - - status = p.readInt32(&t); - rcsa.uSMSCauseCode = (int) t; - - if (status != NO_ERROR) { - goto invalid; - } - - startRequest; - appendPrintBuf("%suErrorClass=%d, uTLStatus=%d, ", - printBuf, rcsa.uErrorClass, rcsa.uSMSCauseCode); - closeRequest; - - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, &rcsa, sizeof(rcsa),pRI); - -#ifdef MEMSET_FREED - memset(&rcsa, 0, sizeof(rcsa)); -#endif - - return; - -invalid: - invalidCommandBlock(pRI); - return; -} - -static void -dispatchGsmBrSmsCnf(Parcel &p, RequestInfo *pRI) { - int32_t t; - status_t status; - int32_t num; - - status = p.readInt32(&num); - if (status != NO_ERROR) { - goto invalid; - } - - { - RIL_GSM_BroadcastSmsConfigInfo gsmBci[num]; - RIL_GSM_BroadcastSmsConfigInfo *gsmBciPtrs[num]; - - startRequest; - for (int i = 0 ; i < num ; i++ ) { - gsmBciPtrs[i] = &gsmBci[i]; - - status = p.readInt32(&t); - gsmBci[i].fromServiceId = (int) t; - - status = p.readInt32(&t); - gsmBci[i].toServiceId = (int) t; - - status = p.readInt32(&t); - gsmBci[i].fromCodeScheme = (int) t; - - status = p.readInt32(&t); - gsmBci[i].toCodeScheme = (int) t; - - status = p.readInt32(&t); - gsmBci[i].selected = (uint8_t) t; - - appendPrintBuf("%s [%d: fromServiceId=%d, toServiceId =%d, \ - fromCodeScheme=%d, toCodeScheme=%d, selected =%d]", printBuf, i, - gsmBci[i].fromServiceId, gsmBci[i].toServiceId, - gsmBci[i].fromCodeScheme, gsmBci[i].toCodeScheme, - gsmBci[i].selected); - } - closeRequest; - - if (status != NO_ERROR) { - goto invalid; - } - - s_callbacks.onRequest(pRI->pCI->requestNumber, - gsmBciPtrs, - num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *), - pRI); - -#ifdef MEMSET_FREED - memset(gsmBci, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo)); - memset(gsmBciPtrs, 0, num * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)); -#endif - } - - return; - -invalid: - invalidCommandBlock(pRI); - return; -} - -static void -dispatchCdmaBrSmsCnf(Parcel &p, RequestInfo *pRI) { - int32_t t; - status_t status; - int32_t num; - - status = p.readInt32(&num); - if (status != NO_ERROR) { - goto invalid; - } - - { - RIL_CDMA_BroadcastSmsConfigInfo cdmaBci[num]; - RIL_CDMA_BroadcastSmsConfigInfo *cdmaBciPtrs[num]; - - startRequest; - for (int i = 0 ; i < num ; i++ ) { - cdmaBciPtrs[i] = &cdmaBci[i]; - - status = p.readInt32(&t); - cdmaBci[i].service_category = (int) t; - - status = p.readInt32(&t); - cdmaBci[i].language = (int) t; - - status = p.readInt32(&t); - cdmaBci[i].selected = (uint8_t) t; - - appendPrintBuf("%s [%d: service_category=%d, language =%d, \ - entries.bSelected =%d]", printBuf, i, cdmaBci[i].service_category, - cdmaBci[i].language, cdmaBci[i].selected); - } - closeRequest; - - if (status != NO_ERROR) { - goto invalid; - } - - s_callbacks.onRequest(pRI->pCI->requestNumber, - cdmaBciPtrs, - num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *), - pRI); - -#ifdef MEMSET_FREED - memset(cdmaBci, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo)); - memset(cdmaBciPtrs, 0, num * sizeof(RIL_CDMA_BroadcastSmsConfigInfo *)); -#endif - } - - return; - -invalid: - invalidCommandBlock(pRI); - return; -} - -static void dispatchRilCdmaSmsWriteArgs(Parcel &p, RequestInfo *pRI) { - RIL_CDMA_SMS_WriteArgs rcsw; - int32_t t; - uint32_t ut; - uint8_t uct; - status_t status; - int32_t digitCount; - - memset(&rcsw, 0, sizeof(rcsw)); - - status = p.readInt32(&t); - rcsw.status = t; - - status = p.readInt32(&t); - rcsw.message.uTeleserviceID = (int) t; - - status = p.read(&uct,sizeof(uct)); - rcsw.message.bIsServicePresent = (uint8_t) uct; - - status = p.readInt32(&t); - rcsw.message.uServicecategory = (int) t; - - status = p.readInt32(&t); - rcsw.message.sAddress.digit_mode = (RIL_CDMA_SMS_DigitMode) t; - - status = p.readInt32(&t); - rcsw.message.sAddress.number_mode = (RIL_CDMA_SMS_NumberMode) t; - - status = p.readInt32(&t); - rcsw.message.sAddress.number_type = (RIL_CDMA_SMS_NumberType) t; - - status = p.readInt32(&t); - rcsw.message.sAddress.number_plan = (RIL_CDMA_SMS_NumberPlan) t; - - status = p.read(&uct,sizeof(uct)); - rcsw.message.sAddress.number_of_digits = (uint8_t) uct; - - for(digitCount = 0 ; digitCount < RIL_CDMA_SMS_ADDRESS_MAX; digitCount ++) { - status = p.read(&uct,sizeof(uct)); - rcsw.message.sAddress.digits[digitCount] = (uint8_t) uct; - } - - status = p.readInt32(&t); - rcsw.message.sSubAddress.subaddressType = (RIL_CDMA_SMS_SubaddressType) t; - - status = p.read(&uct,sizeof(uct)); - rcsw.message.sSubAddress.odd = (uint8_t) uct; - - status = p.read(&uct,sizeof(uct)); - rcsw.message.sSubAddress.number_of_digits = (uint8_t) uct; - - for(digitCount = 0 ; digitCount < RIL_CDMA_SMS_SUBADDRESS_MAX; digitCount ++) { - status = p.read(&uct,sizeof(uct)); - rcsw.message.sSubAddress.digits[digitCount] = (uint8_t) uct; - } - - status = p.readInt32(&t); - rcsw.message.uBearerDataLen = (int) t; - - for(digitCount = 0 ; digitCount < RIL_CDMA_SMS_BEARER_DATA_MAX; digitCount ++) { - status = p.read(&uct, sizeof(uct)); - rcsw.message.aBearerData[digitCount] = (uint8_t) uct; - } - - if (status != NO_ERROR) { - goto invalid; - } - - startRequest; - appendPrintBuf("%sstatus=%d, message.uTeleserviceID=%d, message.bIsServicePresent=%d, \ - message.uServicecategory=%d, message.sAddress.digit_mode=%d, \ - message.sAddress.number_mode=%d, \ - message.sAddress.number_type=%d, ", - printBuf, rcsw.status, rcsw.message.uTeleserviceID, rcsw.message.bIsServicePresent, - rcsw.message.uServicecategory, rcsw.message.sAddress.digit_mode, - rcsw.message.sAddress.number_mode, - rcsw.message.sAddress.number_type); - closeRequest; - - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, &rcsw, sizeof(rcsw),pRI); - -#ifdef MEMSET_FREED - memset(&rcsw, 0, sizeof(rcsw)); -#endif - - return; - -invalid: - invalidCommandBlock(pRI); - return; - -} - -// For backwards compatibility in RIL_REQUEST_SETUP_DATA_CALL. -// Version 4 of the RIL interface adds a new PDP type parameter to support -// IPv6 and dual-stack PDP contexts. When dealing with a previous version of -// RIL, remove the parameter from the request. -static void dispatchDataCall(Parcel& p, RequestInfo *pRI) { - // In RIL v3, REQUEST_SETUP_DATA_CALL takes 6 parameters. - const int numParamsRilV3 = 6; - - // The first bytes of the RIL parcel contain the request number and the - // serial number - see processCommandBuffer(). Copy them over too. - int pos = p.dataPosition(); - - int numParams = p.readInt32(); - if (s_callbacks.version < 4 && numParams > numParamsRilV3) { - Parcel p2; - p2.appendFrom(&p, 0, pos); - p2.writeInt32(numParamsRilV3); - for(int i = 0; i < numParamsRilV3; i++) { - p2.writeString16(p.readString16()); - } - p2.setDataPosition(pos); - dispatchStrings(p2, pRI); - } else { - p.setDataPosition(pos); - dispatchStrings(p, pRI); - } -} - -// For backwards compatibility with RILs that dont support RIL_REQUEST_VOICE_RADIO_TECH. -// When all RILs handle this request, this function can be removed and -// the request can be sent directly to the RIL using dispatchVoid. -static void dispatchVoiceRadioTech(Parcel& p, RequestInfo *pRI) { - RIL_RadioState state = s_callbacks.onStateRequest(); - - if ((RADIO_STATE_UNAVAILABLE == state) || (RADIO_STATE_OFF == state)) { - RIL_onRequestComplete(pRI, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0); - } - - // RILs that support RADIO_STATE_ON should support this request. - if (RADIO_STATE_ON == state) { - dispatchVoid(p, pRI); - return; - } - - // For Older RILs, that do not support RADIO_STATE_ON, assume that they - // will not support this new request either and decode Voice Radio Technology - // from Radio State - voiceRadioTech = decodeVoiceRadioTechnology(state); - - if (voiceRadioTech < 0) - RIL_onRequestComplete(pRI, RIL_E_GENERIC_FAILURE, NULL, 0); - else - RIL_onRequestComplete(pRI, RIL_E_SUCCESS, &voiceRadioTech, sizeof(int)); -} - -// For backwards compatibility in RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE:. -// When all RILs handle this request, this function can be removed and -// the request can be sent directly to the RIL using dispatchVoid. -static void dispatchCdmaSubscriptionSource(Parcel& p, RequestInfo *pRI) { - RIL_RadioState state = s_callbacks.onStateRequest(); - - if ((RADIO_STATE_UNAVAILABLE == state) || (RADIO_STATE_OFF == state)) { - RIL_onRequestComplete(pRI, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0); - } - - // RILs that support RADIO_STATE_ON should support this request. - if (RADIO_STATE_ON == state) { - dispatchVoid(p, pRI); - return; - } - - // For Older RILs, that do not support RADIO_STATE_ON, assume that they - // will not support this new request either and decode CDMA Subscription Source - // from Radio State - cdmaSubscriptionSource = decodeCdmaSubscriptionSource(state); - - if (cdmaSubscriptionSource < 0) - RIL_onRequestComplete(pRI, RIL_E_GENERIC_FAILURE, NULL, 0); - else - RIL_onRequestComplete(pRI, RIL_E_SUCCESS, &cdmaSubscriptionSource, sizeof(int)); -} - -static void dispatchSetInitialAttachApn(Parcel &p, RequestInfo *pRI) -{ - RIL_InitialAttachApn pf; - int32_t t; - status_t status; - - memset(&pf, 0, sizeof(pf)); - - pf.apn = strdupReadString(p); - pf.protocol = strdupReadString(p); - - status = p.readInt32(&t); - pf.authtype = (int) t; - - pf.username = strdupReadString(p); - pf.password = strdupReadString(p); - - startRequest; - appendPrintBuf("%sapn=%s, protocol=%s, auth_type=%d, username=%s, password=%s", - printBuf, pf.apn, pf.protocol, pf.auth_type, pf.username, pf.password); - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - if (status != NO_ERROR) { - goto invalid; - } - s_callbacks.onRequest(pRI->pCI->requestNumber, &pf, sizeof(pf), pRI); - -#ifdef MEMSET_FREED - memsetString(pf.apn); - memsetString(pf.protocol); - memsetString(pf.username); - memsetString(pf.password); -#endif - - free(pf.apn); - free(pf.protocol); - free(pf.username); - free(pf.password); - -#ifdef MEMSET_FREED - memset(&pf, 0, sizeof(pf)); -#endif - - return; -invalid: - invalidCommandBlock(pRI); - return; -} - -static void dispatchUiccSubscripton(Parcel &p, RequestInfo *pRI) { - RIL_SelectUiccSub uicc_sub; - status_t status; - int32_t t; - memset(&uicc_sub, 0, sizeof(uicc_sub)); - - status = p.readInt32(&t); - if (status != NO_ERROR) { - goto invalid; - } - uicc_sub.slot = (int) t; - - status = p.readInt32(&t); - if (status != NO_ERROR) { - goto invalid; - } - uicc_sub.app_index = (int) t; - - status = p.readInt32(&t); - if (status != NO_ERROR) { - goto invalid; - } - uicc_sub.sub_type = (RIL_SubscriptionType) t; - - status = p.readInt32(&t); - if (status != NO_ERROR) { - goto invalid; - } - uicc_sub.act_status = (RIL_UiccSubActStatus) t; - - startRequest; - appendPrintBuf("slot=%d, app_index=%d, act_status = %d", uicc_sub.slot, uicc_sub.app_index, - uicc_sub.act_status); - RLOGD("dispatchUiccSubscription, slot=%d, app_index=%d, act_status = %d", uicc_sub.slot, - uicc_sub.app_index, uicc_sub.act_status); - closeRequest; - printRequest(pRI->token, pRI->pCI->requestNumber); - - s_callbacks.onRequest(pRI->pCI->requestNumber, &uicc_sub, sizeof(uicc_sub), pRI); - -#ifdef MEMSET_FREED - memset(&uicc_sub, 0, sizeof(uicc_sub)); -#endif - return; - -invalid: - invalidCommandBlock(pRI); - return; -} - -static int -blockingWrite(int fd, const void *buffer, size_t len) { - size_t writeOffset = 0; - const uint8_t *toWrite; - - toWrite = (const uint8_t *)buffer; - - while (writeOffset < len) { - ssize_t written; - do { - written = write (fd, toWrite + writeOffset, - len - writeOffset); - } while (written < 0 && ((errno == EINTR) || (errno == EAGAIN))); - - if (written >= 0) { - writeOffset += written; - } else { // written < 0 - RLOGE ("RIL Response: unexpected error on write errno:%d", errno); - close(fd); - return -1; - } - } - - return 0; -} - -static int -sendResponseRaw (const void *data, size_t dataSize) { - int fd = s_fdCommand; - int ret; - uint32_t header; - - if (s_fdCommand < 0) { - return -1; - } - - if (dataSize > MAX_COMMAND_BYTES) { - RLOGE("RIL: packet larger than %u (%u)", - MAX_COMMAND_BYTES, (unsigned int )dataSize); - - return -1; - } - - pthread_mutex_lock(&s_writeMutex); - - header = htonl(dataSize); - - ret = blockingWrite(fd, (void *)&header, sizeof(header)); - - if (ret < 0) { - pthread_mutex_unlock(&s_writeMutex); - return ret; - } - - ret = blockingWrite(fd, data, dataSize); - - if (ret < 0) { - pthread_mutex_unlock(&s_writeMutex); - return ret; - } - - pthread_mutex_unlock(&s_writeMutex); - - return 0; -} - -static int -sendResponse (Parcel &p) { - printResponse; - return sendResponseRaw(p.data(), p.dataSize()); -} - -/** response is an int* pointing to an array of ints*/ - -static int -responseInts(Parcel &p, void *response, size_t responselen) { - int numInts; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - if (responselen % sizeof(int) != 0) { - RLOGE("invalid response length %d expected multiple of %d\n", - (int)responselen, (int)sizeof(int)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - int *p_int = (int *) response; - - numInts = responselen / sizeof(int *); - p.writeInt32 (numInts); - - /* each int*/ - startResponse; - for (int i = 0 ; i < numInts ; i++) { - appendPrintBuf("%s%d,", printBuf, p_int[i]); - p.writeInt32(p_int[i]); - } - removeLastChar; - closeResponse; - - return 0; -} - -/** response is a char **, pointing to an array of char *'s - The parcel will begin with the version */ -static int responseStringsWithVersion(int version, Parcel &p, void *response, size_t responselen) { - p.writeInt32(version); - return responseStrings(p, response, responselen); -} - -/** response is a char **, pointing to an array of char *'s */ -static int responseStrings(Parcel &p, void *response, size_t responselen) { - int numStrings; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - if (responselen % sizeof(char *) != 0) { - RLOGE("invalid response length %d expected multiple of %d\n", - (int)responselen, (int)sizeof(char *)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (response == NULL) { - p.writeInt32 (0); - } else { - char **p_cur = (char **) response; - - numStrings = responselen / sizeof(char *); - p.writeInt32 (numStrings); - - /* each string*/ - startResponse; - for (int i = 0 ; i < numStrings ; i++) { - appendPrintBuf("%s%s,", printBuf, (char*)p_cur[i]); - writeStringToParcel (p, p_cur[i]); - } - removeLastChar; - closeResponse; - } - return 0; -} - - -/** - * NULL strings are accepted - * FIXME currently ignores responselen - */ -static int responseString(Parcel &p, void *response, size_t responselen) { - /* one string only */ - startResponse; - appendPrintBuf("%s%s", printBuf, (char*)response); - closeResponse; - - writeStringToParcel(p, (const char *)response); - - return 0; -} - -static int responseVoid(Parcel &p, void *response, size_t responselen) { - startResponse; - removeLastChar; - return 0; -} - -static int responseCallList(Parcel &p, void *response, size_t responselen) { - int num; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen % sizeof (RIL_Call *) != 0) { - RLOGE("invalid response length %d expected multiple of %d\n", - (int)responselen, (int)sizeof (RIL_Call *)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - startResponse; - /* number of call info's */ - num = responselen / sizeof(RIL_Call *); - p.writeInt32(num); - - for (int i = 0 ; i < num ; i++) { - RIL_Call *p_cur = ((RIL_Call **) response)[i]; - /* each call info */ - p.writeInt32(p_cur->state); - p.writeInt32(p_cur->index); - p.writeInt32(p_cur->toa); - p.writeInt32(p_cur->isMpty); - p.writeInt32(p_cur->isMT); - p.writeInt32(p_cur->als); - p.writeInt32(p_cur->isVoice); - p.writeInt32(p_cur->isVoicePrivacy); - writeStringToParcel(p, p_cur->number); - p.writeInt32(p_cur->numberPresentation); - writeStringToParcel(p, p_cur->name); - p.writeInt32(p_cur->namePresentation); - // Remove when partners upgrade to version 3 - if ((s_callbacks.version < 3) || (p_cur->uusInfo == NULL || p_cur->uusInfo->uusData == NULL)) { - p.writeInt32(0); /* UUS Information is absent */ - } else { - RIL_UUS_Info *uusInfo = p_cur->uusInfo; - p.writeInt32(1); /* UUS Information is present */ - p.writeInt32(uusInfo->uusType); - p.writeInt32(uusInfo->uusDcs); - p.writeInt32(uusInfo->uusLength); - p.write(uusInfo->uusData, uusInfo->uusLength); - } - appendPrintBuf("%s[id=%d,%s,toa=%d,", - printBuf, - p_cur->index, - callStateToString(p_cur->state), - p_cur->toa); - appendPrintBuf("%s%s,%s,als=%d,%s,%s,", - printBuf, - (p_cur->isMpty)?"conf":"norm", - (p_cur->isMT)?"mt":"mo", - p_cur->als, - (p_cur->isVoice)?"voc":"nonvoc", - (p_cur->isVoicePrivacy)?"evp":"noevp"); - appendPrintBuf("%s%s,cli=%d,name='%s',%d]", - printBuf, - p_cur->number, - p_cur->numberPresentation, - p_cur->name, - p_cur->namePresentation); - } - removeLastChar; - closeResponse; - - return 0; -} - -static int responseSMS(Parcel &p, void *response, size_t responselen) { - if (response == NULL) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen != sizeof (RIL_SMS_Response) ) { - RLOGE("invalid response length %d expected %d", - (int)responselen, (int)sizeof (RIL_SMS_Response)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - RIL_SMS_Response *p_cur = (RIL_SMS_Response *) response; - - p.writeInt32(p_cur->messageRef); - writeStringToParcel(p, p_cur->ackPDU); - p.writeInt32(p_cur->errorCode); - - startResponse; - appendPrintBuf("%s%d,%s,%d", printBuf, p_cur->messageRef, - (char*)p_cur->ackPDU, p_cur->errorCode); - closeResponse; - - return 0; -} - -static int responseDataCallListV4(Parcel &p, void *response, size_t responselen) -{ - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen % sizeof(RIL_Data_Call_Response_v4) != 0) { - RLOGE("invalid response length %d expected multiple of %d", - (int)responselen, (int)sizeof(RIL_Data_Call_Response_v4)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - int num = responselen / sizeof(RIL_Data_Call_Response_v4); - p.writeInt32(num); - - RIL_Data_Call_Response_v4 *p_cur = (RIL_Data_Call_Response_v4 *) response; - startResponse; - int i; - for (i = 0; i < num; i++) { - p.writeInt32(p_cur[i].cid); - p.writeInt32(p_cur[i].active); - writeStringToParcel(p, p_cur[i].type); - // apn is not used, so don't send. - writeStringToParcel(p, p_cur[i].address); - appendPrintBuf("%s[cid=%d,%s,%s,%s],", printBuf, - p_cur[i].cid, - (p_cur[i].active==0)?"down":"up", - (char*)p_cur[i].type, - (char*)p_cur[i].address); - } - removeLastChar; - closeResponse; - - return 0; -} - -static int responseDataCallList(Parcel &p, void *response, size_t responselen) -{ - // Write version - p.writeInt32(s_callbacks.version); - - if (s_callbacks.version < 5) { - return responseDataCallListV4(p, response, responselen); - } else { - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen % sizeof(RIL_Data_Call_Response_v6) != 0) { - RLOGE("invalid response length %d expected multiple of %d", - (int)responselen, (int)sizeof(RIL_Data_Call_Response_v6)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - int num = responselen / sizeof(RIL_Data_Call_Response_v6); - p.writeInt32(num); - - RIL_Data_Call_Response_v6 *p_cur = (RIL_Data_Call_Response_v6 *) response; - startResponse; - int i; - for (i = 0; i < num; i++) { - p.writeInt32((int)p_cur[i].status); - p.writeInt32(p_cur[i].suggestedRetryTime); - p.writeInt32(p_cur[i].cid); - p.writeInt32(p_cur[i].active); - writeStringToParcel(p, p_cur[i].type); - writeStringToParcel(p, p_cur[i].ifname); - writeStringToParcel(p, p_cur[i].addresses); - writeStringToParcel(p, p_cur[i].dnses); - writeStringToParcel(p, p_cur[i].gateways); - appendPrintBuf("%s[status=%d,retry=%d,cid=%d,%s,%s,%s,%s,%s,%s],", printBuf, - p_cur[i].status, - p_cur[i].suggestedRetryTime, - p_cur[i].cid, - (p_cur[i].active==0)?"down":"up", - (char*)p_cur[i].type, - (char*)p_cur[i].ifname, - (char*)p_cur[i].addresses, - (char*)p_cur[i].dnses, - (char*)p_cur[i].gateways); - } - removeLastChar; - closeResponse; - } - - return 0; -} - -static int responseSetupDataCall(Parcel &p, void *response, size_t responselen) -{ - if (s_callbacks.version < 5) { - return responseStringsWithVersion(s_callbacks.version, p, response, responselen); - } else { - return responseDataCallList(p, response, responselen); - } -} - -static int responseRaw(Parcel &p, void *response, size_t responselen) { - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL with responselen != 0"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - // The java code reads -1 size as null byte array - if (response == NULL) { - p.writeInt32(-1); - } else { - p.writeInt32(responselen); - p.write(response, responselen); - } - - return 0; -} - - -static int responseSIM_IO(Parcel &p, void *response, size_t responselen) { - if (response == NULL) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen != sizeof (RIL_SIM_IO_Response) ) { - RLOGE("invalid response length was %d expected %d", - (int)responselen, (int)sizeof (RIL_SIM_IO_Response)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - RIL_SIM_IO_Response *p_cur = (RIL_SIM_IO_Response *) response; - p.writeInt32(p_cur->sw1); - p.writeInt32(p_cur->sw2); - writeStringToParcel(p, p_cur->simResponse); - - startResponse; - appendPrintBuf("%ssw1=0x%X,sw2=0x%X,%s", printBuf, p_cur->sw1, p_cur->sw2, - (char*)p_cur->simResponse); - closeResponse; - - - return 0; -} - -static int responseCallForwards(Parcel &p, void *response, size_t responselen) { - int num; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen % sizeof(RIL_CallForwardInfo *) != 0) { - RLOGE("invalid response length %d expected multiple of %d", - (int)responselen, (int)sizeof(RIL_CallForwardInfo *)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - /* number of call info's */ - num = responselen / sizeof(RIL_CallForwardInfo *); - p.writeInt32(num); - - startResponse; - for (int i = 0 ; i < num ; i++) { - RIL_CallForwardInfo *p_cur = ((RIL_CallForwardInfo **) response)[i]; - - p.writeInt32(p_cur->status); - p.writeInt32(p_cur->reason); - p.writeInt32(p_cur->serviceClass); - p.writeInt32(p_cur->toa); - writeStringToParcel(p, p_cur->number); - p.writeInt32(p_cur->timeSeconds); - appendPrintBuf("%s[%s,reason=%d,cls=%d,toa=%d,%s,tout=%d],", printBuf, - (p_cur->status==1)?"enable":"disable", - p_cur->reason, p_cur->serviceClass, p_cur->toa, - (char*)p_cur->number, - p_cur->timeSeconds); - } - removeLastChar; - closeResponse; - - return 0; -} - -static int responseSsn(Parcel &p, void *response, size_t responselen) { - if (response == NULL) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen != sizeof(RIL_SuppSvcNotification)) { - RLOGE("invalid response length was %d expected %d", - (int)responselen, (int)sizeof (RIL_SuppSvcNotification)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - RIL_SuppSvcNotification *p_cur = (RIL_SuppSvcNotification *) response; - p.writeInt32(p_cur->notificationType); - p.writeInt32(p_cur->code); - p.writeInt32(p_cur->index); - p.writeInt32(p_cur->type); - writeStringToParcel(p, p_cur->number); - - startResponse; - appendPrintBuf("%s%s,code=%d,id=%d,type=%d,%s", printBuf, - (p_cur->notificationType==0)?"mo":"mt", - p_cur->code, p_cur->index, p_cur->type, - (char*)p_cur->number); - closeResponse; - - return 0; -} - -static int responseCellList(Parcel &p, void *response, size_t responselen) { - int num; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen % sizeof (RIL_NeighboringCell *) != 0) { - RLOGE("invalid response length %d expected multiple of %d\n", - (int)responselen, (int)sizeof (RIL_NeighboringCell *)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - startResponse; - /* number of records */ - num = responselen / sizeof(RIL_NeighboringCell *); - p.writeInt32(num); - - for (int i = 0 ; i < num ; i++) { - RIL_NeighboringCell *p_cur = ((RIL_NeighboringCell **) response)[i]; - - p.writeInt32(p_cur->rssi); - writeStringToParcel (p, p_cur->cid); - - appendPrintBuf("%s[cid=%s,rssi=%d],", printBuf, - p_cur->cid, p_cur->rssi); - } - removeLastChar; - closeResponse; - - return 0; -} - -/** - * Marshall the signalInfoRecord into the parcel if it exists. - */ -static void marshallSignalInfoRecord(Parcel &p, - RIL_CDMA_SignalInfoRecord &p_signalInfoRecord) { - p.writeInt32(p_signalInfoRecord.isPresent); - p.writeInt32(p_signalInfoRecord.signalType); - p.writeInt32(p_signalInfoRecord.alertPitch); - p.writeInt32(p_signalInfoRecord.signal); -} - -static int responseCdmaInformationRecords(Parcel &p, - void *response, size_t responselen) { - int num; - char* string8 = NULL; - int buffer_lenght; - RIL_CDMA_InformationRecord *infoRec; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen != sizeof (RIL_CDMA_InformationRecords)) { - RLOGE("invalid response length %d expected multiple of %d\n", - (int)responselen, (int)sizeof (RIL_CDMA_InformationRecords *)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - RIL_CDMA_InformationRecords *p_cur = - (RIL_CDMA_InformationRecords *) response; - num = MIN(p_cur->numberOfInfoRecs, RIL_CDMA_MAX_NUMBER_OF_INFO_RECS); - - startResponse; - p.writeInt32(num); - - for (int i = 0 ; i < num ; i++) { - infoRec = &p_cur->infoRec[i]; - p.writeInt32(infoRec->name); - switch (infoRec->name) { - case RIL_CDMA_EXTENDED_DISPLAY_INFO_REC: - if (infoRec->rec.display.alpha_len > - CDMA_ALPHA_INFO_BUFFER_LENGTH) { - RLOGE("invalid display info response length %d \ - expected not more than %d\n", - (int)infoRec->rec.display.alpha_len, - CDMA_ALPHA_INFO_BUFFER_LENGTH); - return RIL_ERRNO_INVALID_RESPONSE; - } - // Write as a byteArray - p.writeInt32(infoRec->rec.display.alpha_len); - p.write(infoRec->rec.display.alpha_buf, - infoRec->rec.display.alpha_len); - break; - case RIL_CDMA_DISPLAY_INFO_REC: - if (infoRec->rec.display.alpha_len > - CDMA_ALPHA_INFO_BUFFER_LENGTH) { - RLOGE("invalid display info response length %d \ - expected not more than %d\n", - (int)infoRec->rec.display.alpha_len, - CDMA_ALPHA_INFO_BUFFER_LENGTH); - return RIL_ERRNO_INVALID_RESPONSE; - } - string8 = (char*) malloc((infoRec->rec.display.alpha_len + 1) - * sizeof(char) ); - for (int i = 0 ; i < infoRec->rec.display.alpha_len ; i++) { - string8[i] = infoRec->rec.display.alpha_buf[i]; - } - string8[(int)infoRec->rec.display.alpha_len] = '\0'; - writeStringToParcel(p, (const char*)string8); - free(string8); - string8 = NULL; - break; - case RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC: - case RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC: - case RIL_CDMA_CONNECTED_NUMBER_INFO_REC: - if (infoRec->rec.number.len > CDMA_NUMBER_INFO_BUFFER_LENGTH) { - RLOGE("invalid display info response length %d \ - expected not more than %d\n", - (int)infoRec->rec.number.len, - CDMA_NUMBER_INFO_BUFFER_LENGTH); - return RIL_ERRNO_INVALID_RESPONSE; - } - string8 = (char*) malloc((infoRec->rec.number.len + 1) - * sizeof(char) ); - for (int i = 0 ; i < infoRec->rec.number.len; i++) { - string8[i] = infoRec->rec.number.buf[i]; - } - string8[(int)infoRec->rec.number.len] = '\0'; - writeStringToParcel(p, (const char*)string8); - free(string8); - string8 = NULL; - p.writeInt32(infoRec->rec.number.number_type); - p.writeInt32(infoRec->rec.number.number_plan); - p.writeInt32(infoRec->rec.number.pi); - p.writeInt32(infoRec->rec.number.si); - break; - case RIL_CDMA_SIGNAL_INFO_REC: - p.writeInt32(infoRec->rec.signal.isPresent); - p.writeInt32(infoRec->rec.signal.signalType); - p.writeInt32(infoRec->rec.signal.alertPitch); - p.writeInt32(infoRec->rec.signal.signal); - - appendPrintBuf("%sisPresent=%X, signalType=%X, \ - alertPitch=%X, signal=%X, ", - printBuf, (int)infoRec->rec.signal.isPresent, - (int)infoRec->rec.signal.signalType, - (int)infoRec->rec.signal.alertPitch, - (int)infoRec->rec.signal.signal); - removeLastChar; - break; - case RIL_CDMA_REDIRECTING_NUMBER_INFO_REC: - if (infoRec->rec.redir.redirectingNumber.len > - CDMA_NUMBER_INFO_BUFFER_LENGTH) { - RLOGE("invalid display info response length %d \ - expected not more than %d\n", - (int)infoRec->rec.redir.redirectingNumber.len, - CDMA_NUMBER_INFO_BUFFER_LENGTH); - return RIL_ERRNO_INVALID_RESPONSE; - } - string8 = (char*) malloc((infoRec->rec.redir.redirectingNumber - .len + 1) * sizeof(char) ); - for (int i = 0; - i < infoRec->rec.redir.redirectingNumber.len; - i++) { - string8[i] = infoRec->rec.redir.redirectingNumber.buf[i]; - } - string8[(int)infoRec->rec.redir.redirectingNumber.len] = '\0'; - writeStringToParcel(p, (const char*)string8); - free(string8); - string8 = NULL; - p.writeInt32(infoRec->rec.redir.redirectingNumber.number_type); - p.writeInt32(infoRec->rec.redir.redirectingNumber.number_plan); - p.writeInt32(infoRec->rec.redir.redirectingNumber.pi); - p.writeInt32(infoRec->rec.redir.redirectingNumber.si); - p.writeInt32(infoRec->rec.redir.redirectingReason); - break; - case RIL_CDMA_LINE_CONTROL_INFO_REC: - p.writeInt32(infoRec->rec.lineCtrl.lineCtrlPolarityIncluded); - p.writeInt32(infoRec->rec.lineCtrl.lineCtrlToggle); - p.writeInt32(infoRec->rec.lineCtrl.lineCtrlReverse); - p.writeInt32(infoRec->rec.lineCtrl.lineCtrlPowerDenial); - - appendPrintBuf("%slineCtrlPolarityIncluded=%d, \ - lineCtrlToggle=%d, lineCtrlReverse=%d, \ - lineCtrlPowerDenial=%d, ", printBuf, - (int)infoRec->rec.lineCtrl.lineCtrlPolarityIncluded, - (int)infoRec->rec.lineCtrl.lineCtrlToggle, - (int)infoRec->rec.lineCtrl.lineCtrlReverse, - (int)infoRec->rec.lineCtrl.lineCtrlPowerDenial); - removeLastChar; - break; - case RIL_CDMA_T53_CLIR_INFO_REC: - p.writeInt32((int)(infoRec->rec.clir.cause)); - - appendPrintBuf("%scause%d", printBuf, infoRec->rec.clir.cause); - removeLastChar; - break; - case RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC: - p.writeInt32(infoRec->rec.audioCtrl.upLink); - p.writeInt32(infoRec->rec.audioCtrl.downLink); - - appendPrintBuf("%supLink=%d, downLink=%d, ", printBuf, - infoRec->rec.audioCtrl.upLink, - infoRec->rec.audioCtrl.downLink); - removeLastChar; - break; - case RIL_CDMA_T53_RELEASE_INFO_REC: - // TODO(Moto): See David Krause, he has the answer:) - RLOGE("RIL_CDMA_T53_RELEASE_INFO_REC: return INVALID_RESPONSE"); - return RIL_ERRNO_INVALID_RESPONSE; - default: - RLOGE("Incorrect name value"); - return RIL_ERRNO_INVALID_RESPONSE; - } - } - closeResponse; - - return 0; -} - -static int responseRilSignalStrength(Parcel &p, - void *response, size_t responselen) { - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen >= sizeof (RIL_SignalStrength_v5)) { - RIL_SignalStrength_v6 *p_cur = ((RIL_SignalStrength_v6 *) response); - - p.writeInt32(p_cur->GW_SignalStrength.signalStrength); - p.writeInt32(p_cur->GW_SignalStrength.bitErrorRate); - p.writeInt32(p_cur->CDMA_SignalStrength.dbm); - p.writeInt32(p_cur->CDMA_SignalStrength.ecio); - p.writeInt32(p_cur->EVDO_SignalStrength.dbm); - p.writeInt32(p_cur->EVDO_SignalStrength.ecio); - p.writeInt32(p_cur->EVDO_SignalStrength.signalNoiseRatio); - if (responselen >= sizeof (RIL_SignalStrength_v6)) { - /* - * Fixup LTE for backwards compatibility - */ - if (s_callbacks.version <= 6) { - // signalStrength: -1 -> 99 - if (p_cur->LTE_SignalStrength.signalStrength == -1) { - p_cur->LTE_SignalStrength.signalStrength = 99; - } - // rsrp: -1 -> INT_MAX all other negative value to positive. - // So remap here - if (p_cur->LTE_SignalStrength.rsrp == -1) { - p_cur->LTE_SignalStrength.rsrp = INT_MAX; - } else if (p_cur->LTE_SignalStrength.rsrp < -1) { - p_cur->LTE_SignalStrength.rsrp = -p_cur->LTE_SignalStrength.rsrp; - } - // rsrq: -1 -> INT_MAX - if (p_cur->LTE_SignalStrength.rsrq == -1) { - p_cur->LTE_SignalStrength.rsrq = INT_MAX; - } - // Not remapping rssnr is already using INT_MAX - - // cqi: -1 -> INT_MAX - if (p_cur->LTE_SignalStrength.cqi == -1) { - p_cur->LTE_SignalStrength.cqi = INT_MAX; - } - } - p.writeInt32(p_cur->LTE_SignalStrength.signalStrength); - p.writeInt32(p_cur->LTE_SignalStrength.rsrp); - p.writeInt32(p_cur->LTE_SignalStrength.rsrq); - p.writeInt32(p_cur->LTE_SignalStrength.rssnr); - p.writeInt32(p_cur->LTE_SignalStrength.cqi); - } else { - p.writeInt32(99); - p.writeInt32(INT_MAX); - p.writeInt32(INT_MAX); - p.writeInt32(INT_MAX); - p.writeInt32(INT_MAX); - } - - startResponse; - appendPrintBuf("%s[signalStrength=%d,bitErrorRate=%d,\ - CDMA_SS.dbm=%d,CDMA_SSecio=%d,\ - EVDO_SS.dbm=%d,EVDO_SS.ecio=%d,\ - EVDO_SS.signalNoiseRatio=%d,\ - LTE_SS.signalStrength=%d,LTE_SS.rsrp=%d,LTE_SS.rsrq=%d,\ - LTE_SS.rssnr=%d,LTE_SS.cqi=%d]", - printBuf, - p_cur->GW_SignalStrength.signalStrength, - p_cur->GW_SignalStrength.bitErrorRate, - p_cur->CDMA_SignalStrength.dbm, - p_cur->CDMA_SignalStrength.ecio, - p_cur->EVDO_SignalStrength.dbm, - p_cur->EVDO_SignalStrength.ecio, - p_cur->EVDO_SignalStrength.signalNoiseRatio, - p_cur->LTE_SignalStrength.signalStrength, - p_cur->LTE_SignalStrength.rsrp, - p_cur->LTE_SignalStrength.rsrq, - p_cur->LTE_SignalStrength.rssnr, - p_cur->LTE_SignalStrength.cqi); - closeResponse; - - } else { - RLOGE("invalid response length"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - return 0; -} - -static int responseCallRing(Parcel &p, void *response, size_t responselen) { - if ((response == NULL) || (responselen == 0)) { - return responseVoid(p, response, responselen); - } else { - return responseCdmaSignalInfoRecord(p, response, responselen); - } -} - -static int responseCdmaSignalInfoRecord(Parcel &p, void *response, size_t responselen) { - if (response == NULL || responselen == 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen != sizeof (RIL_CDMA_SignalInfoRecord)) { - RLOGE("invalid response length %d expected sizeof (RIL_CDMA_SignalInfoRecord) of %d\n", - (int)responselen, (int)sizeof (RIL_CDMA_SignalInfoRecord)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - startResponse; - - RIL_CDMA_SignalInfoRecord *p_cur = ((RIL_CDMA_SignalInfoRecord *) response); - marshallSignalInfoRecord(p, *p_cur); - - appendPrintBuf("%s[isPresent=%d,signalType=%d,alertPitch=%d\ - signal=%d]", - printBuf, - p_cur->isPresent, - p_cur->signalType, - p_cur->alertPitch, - p_cur->signal); - - closeResponse; - return 0; -} - -static int responseCdmaCallWaiting(Parcel &p, void *response, - size_t responselen) { - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen < sizeof(RIL_CDMA_CallWaiting_v6)) { - RLOGW("Upgrade to ril version %d\n", RIL_VERSION); - } - - RIL_CDMA_CallWaiting_v6 *p_cur = ((RIL_CDMA_CallWaiting_v6 *) response); - - writeStringToParcel(p, p_cur->number); - p.writeInt32(p_cur->numberPresentation); - writeStringToParcel(p, p_cur->name); - marshallSignalInfoRecord(p, p_cur->signalInfoRecord); - - if (responselen >= sizeof(RIL_CDMA_CallWaiting_v6)) { - p.writeInt32(p_cur->number_type); - p.writeInt32(p_cur->number_plan); - } else { - p.writeInt32(0); - p.writeInt32(0); - } - - startResponse; - appendPrintBuf("%snumber=%s,numberPresentation=%d, name=%s,\ - signalInfoRecord[isPresent=%d,signalType=%d,alertPitch=%d\ - signal=%d,number_type=%d,number_plan=%d]", - printBuf, - p_cur->number, - p_cur->numberPresentation, - p_cur->name, - p_cur->signalInfoRecord.isPresent, - p_cur->signalInfoRecord.signalType, - p_cur->signalInfoRecord.alertPitch, - p_cur->signalInfoRecord.signal, - p_cur->number_type, - p_cur->number_plan); - closeResponse; - - return 0; -} - -static int responseSimRefresh(Parcel &p, void *response, size_t responselen) { - if (response == NULL && responselen != 0) { - RLOGE("responseSimRefresh: invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - startResponse; - if (s_callbacks.version == 7) { - RIL_SimRefreshResponse_v7 *p_cur = ((RIL_SimRefreshResponse_v7 *) response); - p.writeInt32(p_cur->result); - p.writeInt32(p_cur->ef_id); - writeStringToParcel(p, p_cur->aid); - - appendPrintBuf("%sresult=%d, ef_id=%d, aid=%s", - printBuf, - p_cur->result, - p_cur->ef_id, - p_cur->aid); - } else { - int *p_cur = ((int *) response); - p.writeInt32(p_cur[0]); - p.writeInt32(p_cur[1]); - writeStringToParcel(p, NULL); - - appendPrintBuf("%sresult=%d, ef_id=%d", - printBuf, - p_cur[0], - p_cur[1]); - } - closeResponse; - - return 0; -} - -static int responseCellInfoList(Parcel &p, void *response, size_t responselen) -{ - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen % sizeof(RIL_CellInfo) != 0) { - RLOGE("invalid response length %d expected multiple of %d", - (int)responselen, (int)sizeof(RIL_CellInfo)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - int num = responselen / sizeof(RIL_CellInfo); - p.writeInt32(num); - - RIL_CellInfo *p_cur = (RIL_CellInfo *) response; - startResponse; - int i; - for (i = 0; i < num; i++) { - appendPrintBuf("%s[%d: type=%d,registered=%d,timeStampType=%d,timeStamp=%lld", printBuf, i, - p_cur->cellInfoType, p_cur->registered, p_cur->timeStampType, p_cur->timeStamp); - p.writeInt32((int)p_cur->cellInfoType); - p.writeInt32(p_cur->registered); - p.writeInt32(p_cur->timeStampType); - p.writeInt64(p_cur->timeStamp); - switch(p_cur->cellInfoType) { - case RIL_CELL_INFO_TYPE_GSM: { - appendPrintBuf("%s GSM id: mcc=%d,mnc=%d,lac=%d,cid=%d,", printBuf, - p_cur->CellInfo.gsm.cellIdentityGsm.mcc, - p_cur->CellInfo.gsm.cellIdentityGsm.mnc, - p_cur->CellInfo.gsm.cellIdentityGsm.lac, - p_cur->CellInfo.gsm.cellIdentityGsm.cid); - appendPrintBuf("%s gsmSS: ss=%d,ber=%d],", printBuf, - p_cur->CellInfo.gsm.signalStrengthGsm.signalStrength, - p_cur->CellInfo.gsm.signalStrengthGsm.bitErrorRate); - - p.writeInt32(p_cur->CellInfo.gsm.cellIdentityGsm.mcc); - p.writeInt32(p_cur->CellInfo.gsm.cellIdentityGsm.mnc); - p.writeInt32(p_cur->CellInfo.gsm.cellIdentityGsm.lac); - p.writeInt32(p_cur->CellInfo.gsm.cellIdentityGsm.cid); - p.writeInt32(p_cur->CellInfo.gsm.signalStrengthGsm.signalStrength); - p.writeInt32(p_cur->CellInfo.gsm.signalStrengthGsm.bitErrorRate); - break; - } - case RIL_CELL_INFO_TYPE_WCDMA: { - appendPrintBuf("%s WCDMA id: mcc=%d,mnc=%d,lac=%d,cid=%d,psc=%d,", printBuf, - p_cur->CellInfo.wcdma.cellIdentityWcdma.mcc, - p_cur->CellInfo.wcdma.cellIdentityWcdma.mnc, - p_cur->CellInfo.wcdma.cellIdentityWcdma.lac, - p_cur->CellInfo.wcdma.cellIdentityWcdma.cid, - p_cur->CellInfo.wcdma.cellIdentityWcdma.psc); - appendPrintBuf("%s wcdmaSS: ss=%d,ber=%d],", printBuf, - p_cur->CellInfo.wcdma.signalStrengthWcdma.signalStrength, - p_cur->CellInfo.wcdma.signalStrengthWcdma.bitErrorRate); - - p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.mcc); - p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.mnc); - p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.lac); - p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.cid); - p.writeInt32(p_cur->CellInfo.wcdma.cellIdentityWcdma.psc); - p.writeInt32(p_cur->CellInfo.wcdma.signalStrengthWcdma.signalStrength); - p.writeInt32(p_cur->CellInfo.wcdma.signalStrengthWcdma.bitErrorRate); - break; - } - case RIL_CELL_INFO_TYPE_CDMA: { - appendPrintBuf("%s CDMA id: nId=%d,sId=%d,bsId=%d,long=%d,lat=%d", printBuf, - p_cur->CellInfo.cdma.cellIdentityCdma.networkId, - p_cur->CellInfo.cdma.cellIdentityCdma.systemId, - p_cur->CellInfo.cdma.cellIdentityCdma.basestationId, - p_cur->CellInfo.cdma.cellIdentityCdma.longitude, - p_cur->CellInfo.cdma.cellIdentityCdma.latitude); - - p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.networkId); - p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.systemId); - p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.basestationId); - p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.longitude); - p.writeInt32(p_cur->CellInfo.cdma.cellIdentityCdma.latitude); - - appendPrintBuf("%s cdmaSS: dbm=%d ecio=%d evdoSS: dbm=%d,ecio=%d,snr=%d", printBuf, - p_cur->CellInfo.cdma.signalStrengthCdma.dbm, - p_cur->CellInfo.cdma.signalStrengthCdma.ecio, - p_cur->CellInfo.cdma.signalStrengthEvdo.dbm, - p_cur->CellInfo.cdma.signalStrengthEvdo.ecio, - p_cur->CellInfo.cdma.signalStrengthEvdo.signalNoiseRatio); - - p.writeInt32(p_cur->CellInfo.cdma.signalStrengthCdma.dbm); - p.writeInt32(p_cur->CellInfo.cdma.signalStrengthCdma.ecio); - p.writeInt32(p_cur->CellInfo.cdma.signalStrengthEvdo.dbm); - p.writeInt32(p_cur->CellInfo.cdma.signalStrengthEvdo.ecio); - p.writeInt32(p_cur->CellInfo.cdma.signalStrengthEvdo.signalNoiseRatio); - break; - } - case RIL_CELL_INFO_TYPE_LTE: { - appendPrintBuf("%s LTE id: mcc=%d,mnc=%d,ci=%d,pci=%d,tac=%d", printBuf, - p_cur->CellInfo.lte.cellIdentityLte.mcc, - p_cur->CellInfo.lte.cellIdentityLte.mnc, - p_cur->CellInfo.lte.cellIdentityLte.ci, - p_cur->CellInfo.lte.cellIdentityLte.pci, - p_cur->CellInfo.lte.cellIdentityLte.tac); - - p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.mcc); - p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.mnc); - p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.ci); - p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.pci); - p.writeInt32(p_cur->CellInfo.lte.cellIdentityLte.tac); - - appendPrintBuf("%s lteSS: ss=%d,rsrp=%d,rsrq=%d,rssnr=%d,cqi=%d,ta=%d", printBuf, - p_cur->CellInfo.lte.signalStrengthLte.signalStrength, - p_cur->CellInfo.lte.signalStrengthLte.rsrp, - p_cur->CellInfo.lte.signalStrengthLte.rsrq, - p_cur->CellInfo.lte.signalStrengthLte.rssnr, - p_cur->CellInfo.lte.signalStrengthLte.cqi, - p_cur->CellInfo.lte.signalStrengthLte.timingAdvance); - p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.signalStrength); - p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.rsrp); - p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.rsrq); - p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.rssnr); - p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.cqi); - p.writeInt32(p_cur->CellInfo.lte.signalStrengthLte.timingAdvance); - break; - } - } - p_cur += 1; - } - removeLastChar; - closeResponse; - - return 0; -} - -static int responseSSData(Parcel &p, void *response, size_t responselen) { - RLOGD("In responseSSData"); - int num; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen != sizeof(RIL_StkCcUnsolSsResponse)) { - RLOGE("invalid response length %d, expected %d", - (int)responselen, (int)sizeof(RIL_StkCcUnsolSsResponse)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - startResponse; - RIL_StkCcUnsolSsResponse *p_cur = (RIL_StkCcUnsolSsResponse *) response; - p.writeInt32(p_cur->serviceType); - p.writeInt32(p_cur->requestType); - p.writeInt32(p_cur->teleserviceType); - p.writeInt32(p_cur->serviceClass); - p.writeInt32(p_cur->result); - - if (isServiceTypeCfQuery(p_cur->serviceType, p_cur->requestType)) { - RLOGD("responseSSData CF type, num of Cf elements %d", p_cur->cfData.numValidIndexes); - if (p_cur->cfData.numValidIndexes > NUM_SERVICE_CLASSES) { - RLOGE("numValidIndexes is greater than max value %d, " - "truncating it to max value", NUM_SERVICE_CLASSES); - p_cur->cfData.numValidIndexes = NUM_SERVICE_CLASSES; - } - /* number of call info's */ - p.writeInt32(p_cur->cfData.numValidIndexes); - - for (int i = 0; i < p_cur->cfData.numValidIndexes; i++) { - RIL_CallForwardInfo cf = p_cur->cfData.cfInfo[i]; - - p.writeInt32(cf.status); - p.writeInt32(cf.reason); - p.writeInt32(cf.serviceClass); - p.writeInt32(cf.toa); - writeStringToParcel(p, cf.number); - p.writeInt32(cf.timeSeconds); - appendPrintBuf("%s[%s,reason=%d,cls=%d,toa=%d,%s,tout=%d],", printBuf, - (cf.status==1)?"enable":"disable", cf.reason, cf.serviceClass, cf.toa, - (char*)cf.number, cf.timeSeconds); - RLOGD("Data: %d,reason=%d,cls=%d,toa=%d,num=%s,tout=%d],", cf.status, - cf.reason, cf.serviceClass, cf.toa, (char*)cf.number, cf.timeSeconds); - } - } else { - p.writeInt32 (SS_INFO_MAX); - - /* each int*/ - for (int i = 0; i < SS_INFO_MAX; i++) { - appendPrintBuf("%s%d,", printBuf, p_cur->ssInfo[i]); - RLOGD("Data: %d",p_cur->ssInfo[i]); - p.writeInt32(p_cur->ssInfo[i]); - } - } - removeLastChar; - closeResponse; - - return 0; -} - -static bool isServiceTypeCfQuery(RIL_SsServiceType serType, RIL_SsRequestType reqType) { - if ((reqType == SS_INTERROGATION) && - (serType == SS_CFU || - serType == SS_CF_BUSY || - serType == SS_CF_NO_REPLY || - serType == SS_CF_NOT_REACHABLE || - serType == SS_CF_ALL || - serType == SS_CF_ALL_CONDITIONAL)) { - return true; - } - return false; -} - -static void triggerEvLoop() { - int ret; - if (!pthread_equal(pthread_self(), s_tid_dispatch)) { - /* trigger event loop to wakeup. No reason to do this, - * if we're in the event loop thread */ - do { - ret = write (s_fdWakeupWrite, " ", 1); - } while (ret < 0 && errno == EINTR); - } -} - -static void rilEventAddWakeup(struct ril_event *ev) { - ril_event_add(ev); - triggerEvLoop(); -} - -static void sendSimStatusAppInfo(Parcel &p, int num_apps, RIL_AppStatus appStatus[]) { - p.writeInt32(num_apps); - startResponse; - for (int i = 0; i < num_apps; i++) { - p.writeInt32(appStatus[i].app_type); - p.writeInt32(appStatus[i].app_state); - p.writeInt32(appStatus[i].perso_substate); - writeStringToParcel(p, (const char*)(appStatus[i].aid_ptr)); - writeStringToParcel(p, (const char*) - (appStatus[i].app_label_ptr)); - p.writeInt32(appStatus[i].pin1_replaced); - p.writeInt32(appStatus[i].pin1); - p.writeInt32(appStatus[i].pin2); - appendPrintBuf("%s[app_type=%d,app_state=%d,perso_substate=%d,\ - aid_ptr=%s,app_label_ptr=%s,pin1_replaced=%d,pin1=%d,pin2=%d],", - printBuf, - appStatus[i].app_type, - appStatus[i].app_state, - appStatus[i].perso_substate, - appStatus[i].aid_ptr, - appStatus[i].app_label_ptr, - appStatus[i].pin1_replaced, - appStatus[i].pin1, - appStatus[i].pin2); - } - closeResponse; -} - -static int responseSimStatus(Parcel &p, void *response, size_t responselen) { - int i; - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen == sizeof (RIL_CardStatus_v6)) { - RIL_CardStatus_v6 *p_cur = ((RIL_CardStatus_v6 *) response); - - p.writeInt32(p_cur->card_state); - p.writeInt32(p_cur->universal_pin_state); - p.writeInt32(p_cur->gsm_umts_subscription_app_index); - p.writeInt32(p_cur->cdma_subscription_app_index); - p.writeInt32(p_cur->ims_subscription_app_index); - - sendSimStatusAppInfo(p, p_cur->num_applications, p_cur->applications); - } else if (responselen == sizeof (RIL_CardStatus_v5)) { - RIL_CardStatus_v5 *p_cur = ((RIL_CardStatus_v5 *) response); - - p.writeInt32(p_cur->card_state); - p.writeInt32(p_cur->universal_pin_state); - p.writeInt32(p_cur->gsm_umts_subscription_app_index); - p.writeInt32(p_cur->cdma_subscription_app_index); - p.writeInt32(-1); - - sendSimStatusAppInfo(p, p_cur->num_applications, p_cur->applications); - } else { - RLOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected\n"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - return 0; -} - -static int responseGsmBrSmsCnf(Parcel &p, void *response, size_t responselen) { - int num = responselen / sizeof(RIL_GSM_BroadcastSmsConfigInfo *); - p.writeInt32(num); - - startResponse; - RIL_GSM_BroadcastSmsConfigInfo **p_cur = - (RIL_GSM_BroadcastSmsConfigInfo **) response; - for (int i = 0; i < num; i++) { - p.writeInt32(p_cur[i]->fromServiceId); - p.writeInt32(p_cur[i]->toServiceId); - p.writeInt32(p_cur[i]->fromCodeScheme); - p.writeInt32(p_cur[i]->toCodeScheme); - p.writeInt32(p_cur[i]->selected); - - appendPrintBuf("%s [%d: fromServiceId=%d, toServiceId=%d, \ - fromCodeScheme=%d, toCodeScheme=%d, selected =%d]", - printBuf, i, p_cur[i]->fromServiceId, p_cur[i]->toServiceId, - p_cur[i]->fromCodeScheme, p_cur[i]->toCodeScheme, - p_cur[i]->selected); - } - closeResponse; - - return 0; -} - -static int responseCdmaBrSmsCnf(Parcel &p, void *response, size_t responselen) { - RIL_CDMA_BroadcastSmsConfigInfo **p_cur = - (RIL_CDMA_BroadcastSmsConfigInfo **) response; - - int num = responselen / sizeof (RIL_CDMA_BroadcastSmsConfigInfo *); - p.writeInt32(num); - - startResponse; - for (int i = 0 ; i < num ; i++ ) { - p.writeInt32(p_cur[i]->service_category); - p.writeInt32(p_cur[i]->language); - p.writeInt32(p_cur[i]->selected); - - appendPrintBuf("%s [%d: srvice_category=%d, language =%d, \ - selected =%d], ", - printBuf, i, p_cur[i]->service_category, p_cur[i]->language, - p_cur[i]->selected); - } - closeResponse; - - return 0; -} - -static int responseCdmaSms(Parcel &p, void *response, size_t responselen) { - int num; - int digitCount; - int digitLimit; - uint8_t uct; - void* dest; - - RLOGD("Inside responseCdmaSms"); - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - if (responselen != sizeof(RIL_CDMA_SMS_Message)) { - RLOGE("invalid response length was %d expected %d", - (int)responselen, (int)sizeof(RIL_CDMA_SMS_Message)); - return RIL_ERRNO_INVALID_RESPONSE; - } - - RIL_CDMA_SMS_Message *p_cur = (RIL_CDMA_SMS_Message *) response; - p.writeInt32(p_cur->uTeleserviceID); - p.write(&(p_cur->bIsServicePresent),sizeof(uct)); - p.writeInt32(p_cur->uServicecategory); - p.writeInt32(p_cur->sAddress.digit_mode); - p.writeInt32(p_cur->sAddress.number_mode); - p.writeInt32(p_cur->sAddress.number_type); - p.writeInt32(p_cur->sAddress.number_plan); - p.write(&(p_cur->sAddress.number_of_digits), sizeof(uct)); - digitLimit= MIN((p_cur->sAddress.number_of_digits), RIL_CDMA_SMS_ADDRESS_MAX); - for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { - p.write(&(p_cur->sAddress.digits[digitCount]),sizeof(uct)); - } - - p.writeInt32(p_cur->sSubAddress.subaddressType); - p.write(&(p_cur->sSubAddress.odd),sizeof(uct)); - p.write(&(p_cur->sSubAddress.number_of_digits),sizeof(uct)); - digitLimit= MIN((p_cur->sSubAddress.number_of_digits), RIL_CDMA_SMS_SUBADDRESS_MAX); - for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { - p.write(&(p_cur->sSubAddress.digits[digitCount]),sizeof(uct)); - } - - digitLimit= MIN((p_cur->uBearerDataLen), RIL_CDMA_SMS_BEARER_DATA_MAX); - p.writeInt32(p_cur->uBearerDataLen); - for(digitCount =0 ; digitCount < digitLimit; digitCount ++) { - p.write(&(p_cur->aBearerData[digitCount]), sizeof(uct)); - } - - startResponse; - appendPrintBuf("%suTeleserviceID=%d, bIsServicePresent=%d, uServicecategory=%d, \ - sAddress.digit_mode=%d, sAddress.number_mode=%d, sAddress.number_type=%d, ", - printBuf, p_cur->uTeleserviceID,p_cur->bIsServicePresent,p_cur->uServicecategory, - p_cur->sAddress.digit_mode, p_cur->sAddress.number_mode,p_cur->sAddress.number_type); - closeResponse; - - return 0; -} - -/* response is the count and the list of RIL_DataCallProfileInfo */ -static int responseGetDataCallProfile(Parcel &p, void *response, size_t responselen) { - int num = 0; - - RLOGD("[OMH>]> %d", responselen); - - if (response == NULL && responselen != 0) { - RLOGE("invalid response: NULL"); - return RIL_ERRNO_INVALID_RESPONSE; - } - - RLOGD("[OMH>]> processing response"); - - /* number of profile info's */ - num = *((int *) response); - if (num > (responselen / sizeof(RIL_DataCallProfileInfo))) { - num = responselen / sizeof(RIL_DataCallProfileInfo); - } - p.writeInt32(num); - - RIL_DataCallProfileInfo *p_cur = ((RIL_DataCallProfileInfo *) ((int *)response + 1)); - - startResponse; - for (int i = 0 ; i < num ; i++) { - p.writeInt32(p_cur->profileId); - p.writeInt32(p_cur->priority); - appendPrintBuf("%s[profileId=%d,priority=%d],", printBuf, - p_cur->profileId, p_cur->priority); - p_cur++; - } - removeLastChar; - closeResponse; - - return 0; -} - -/** - * A write on the wakeup fd is done just to pop us out of select() - * We empty the buffer here and then ril_event will reset the timers on the - * way back down - */ -static void processWakeupCallback(int fd, short flags, void *param) { - char buff[16]; - int ret; - - RLOGV("processWakeupCallback"); - - /* empty our wakeup socket out */ - do { - ret = read(s_fdWakeupRead, &buff, sizeof(buff)); - } while (ret > 0 || (ret < 0 && errno == EINTR)); -} - -static void onCommandsSocketClosed() { - int ret; - RequestInfo *p_cur; - - /* mark pending requests as "cancelled" so we dont report responses */ - - ret = pthread_mutex_lock(&s_pendingRequestsMutex); - assert (ret == 0); - - p_cur = s_pendingRequests; - - for (p_cur = s_pendingRequests - ; p_cur != NULL - ; p_cur = p_cur->p_next - ) { - p_cur->cancelled = 1; - } - - ret = pthread_mutex_unlock(&s_pendingRequestsMutex); - assert (ret == 0); -} - -static void processCommandsCallback(int fd, short flags, void *param) { - RecordStream *p_rs; - void *p_record; - size_t recordlen; - int ret; - - assert(fd == s_fdCommand); - - p_rs = (RecordStream *)param; - - for (;;) { - /* loop until EAGAIN/EINTR, end of stream, or other error */ - ret = record_stream_get_next(p_rs, &p_record, &recordlen); - - if (ret == 0 && p_record == NULL) { - /* end-of-stream */ - break; - } else if (ret < 0) { - break; - } else if (ret == 0) { /* && p_record != NULL */ - processCommandBuffer(p_record, recordlen); - } - } - - if (ret == 0 || !(errno == EAGAIN || errno == EINTR)) { - /* fatal error or end-of-stream */ - if (ret != 0) { - RLOGE("error on reading command socket errno:%d\n", errno); - } else { - RLOGW("EOS. Closing command socket."); - } - - close(s_fdCommand); - s_fdCommand = -1; - - ril_event_del(&s_commands_event); - - record_stream_free(p_rs); - - /* start listening for new connections again */ - rilEventAddWakeup(&s_listen_event); - - onCommandsSocketClosed(); - } -} - - -static void onNewCommandConnect() { - // Inform we are connected and the ril version - int rilVer = s_callbacks.version; - RIL_onUnsolicitedResponse(RIL_UNSOL_RIL_CONNECTED, - &rilVer, sizeof(rilVer)); - - // implicit radio state changed - RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, - NULL, 0); - - // Send last NITZ time data, in case it was missed - if (s_lastNITZTimeData != NULL) { - sendResponseRaw(s_lastNITZTimeData, s_lastNITZTimeDataSize); - - free(s_lastNITZTimeData); - s_lastNITZTimeData = NULL; - } - - // Get version string - if (s_callbacks.getVersion != NULL) { - const char *version; - version = s_callbacks.getVersion(); - RLOGI("RIL Daemon version: %s\n", version); - - property_set(PROPERTY_RIL_IMPL, version); - } else { - RLOGI("RIL Daemon version: unavailable\n"); - property_set(PROPERTY_RIL_IMPL, "unavailable"); - } - -} - -static void listenCallback (int fd, short flags, void *param) { - int ret; - int err; - int is_phone_socket; - RecordStream *p_rs; - - struct sockaddr_un peeraddr; - socklen_t socklen = sizeof (peeraddr); - - struct ucred creds; - socklen_t szCreds = sizeof(creds); - - struct passwd *pwd = NULL; - - assert (s_fdCommand < 0); - assert (fd == s_fdListen); - - s_fdCommand = accept(s_fdListen, (sockaddr *) &peeraddr, &socklen); - - if (s_fdCommand < 0 ) { - RLOGE("Error on accept() errno:%d", errno); - /* start listening for new connections again */ - rilEventAddWakeup(&s_listen_event); - return; - } - - /* check the credential of the other side and only accept socket from - * phone process - */ - errno = 0; - is_phone_socket = 0; - - err = getsockopt(s_fdCommand, SOL_SOCKET, SO_PEERCRED, &creds, &szCreds); - - if (err == 0 && szCreds > 0) { - errno = 0; - pwd = getpwuid(creds.uid); - if (pwd != NULL) { - if (strcmp(pwd->pw_name, PHONE_PROCESS) == 0) { - is_phone_socket = 1; - } else { - RLOGE("RILD can't accept socket from process %s", pwd->pw_name); - } - } else { - RLOGE("Error on getpwuid() errno: %d", errno); - } - } else { - RLOGD("Error on getsockopt() errno: %d", errno); - } - - if ( !is_phone_socket ) { - RLOGE("RILD must accept socket from %s", PHONE_PROCESS); - - close(s_fdCommand); - s_fdCommand = -1; - - onCommandsSocketClosed(); - - /* start listening for new connections again */ - rilEventAddWakeup(&s_listen_event); - - return; - } - - ret = fcntl(s_fdCommand, F_SETFL, O_NONBLOCK); - - if (ret < 0) { - RLOGE ("Error setting O_NONBLOCK errno:%d", errno); - } - - RLOGI("libril: new connection"); - - p_rs = record_stream_new(s_fdCommand, MAX_COMMAND_BYTES); - - ril_event_set (&s_commands_event, s_fdCommand, 1, - processCommandsCallback, p_rs); - - rilEventAddWakeup (&s_commands_event); - - onNewCommandConnect(); -} - -static void freeDebugCallbackArgs(int number, char **args) { - for (int i = 0; i < number; i++) { - if (args[i] != NULL) { - free(args[i]); - } - } - free(args); -} - -static void debugCallback (int fd, short flags, void *param) { - int acceptFD, option; - struct sockaddr_un peeraddr; - socklen_t socklen = sizeof (peeraddr); - int data; - unsigned int qxdm_data[6]; - const char *deactData[1] = {"1"}; - char *actData[1]; - RIL_Dial dialData; - int hangupData[1] = {1}; - int number; - char **args; - - acceptFD = accept (fd, (sockaddr *) &peeraddr, &socklen); - - if (acceptFD < 0) { - RLOGE ("error accepting on debug port: %d\n", errno); - return; - } - - if (recv(acceptFD, &number, sizeof(int), 0) != sizeof(int)) { - RLOGE ("error reading on socket: number of Args: \n"); - return; - } - args = (char **) malloc(sizeof(char*) * number); - - for (int i = 0; i < number; i++) { - int len; - if (recv(acceptFD, &len, sizeof(int), 0) != sizeof(int)) { - RLOGE ("error reading on socket: Len of Args: \n"); - freeDebugCallbackArgs(i, args); - return; - } - // +1 for null-term - args[i] = (char *) malloc((sizeof(char) * len) + 1); - if (recv(acceptFD, args[i], sizeof(char) * len, 0) - != (int)sizeof(char) * len) { - RLOGE ("error reading on socket: Args[%d] \n", i); - freeDebugCallbackArgs(i, args); - return; - } - char * buf = args[i]; - buf[len] = 0; - } - - switch (atoi(args[0])) { - case 0: - RLOGI ("Connection on debug port: issuing reset."); - issueLocalRequest(RIL_REQUEST_RESET_RADIO, NULL, 0); - break; - case 1: - RLOGI ("Connection on debug port: issuing radio power off."); - data = 0; - issueLocalRequest(RIL_REQUEST_RADIO_POWER, &data, sizeof(int)); - // Close the socket - close(s_fdCommand); - s_fdCommand = -1; - break; - case 2: - RLOGI ("Debug port: issuing unsolicited voice network change."); - RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED, - NULL, 0); - break; - case 3: - RLOGI ("Debug port: QXDM log enable."); - qxdm_data[0] = 65536; // head.func_tag - qxdm_data[1] = 16; // head.len - qxdm_data[2] = 1; // mode: 1 for 'start logging' - qxdm_data[3] = 32; // log_file_size: 32megabytes - qxdm_data[4] = 0; // log_mask - qxdm_data[5] = 8; // log_max_fileindex - issueLocalRequest(RIL_REQUEST_OEM_HOOK_RAW, qxdm_data, - 6 * sizeof(int)); - break; - case 4: - RLOGI ("Debug port: QXDM log disable."); - qxdm_data[0] = 65536; - qxdm_data[1] = 16; - qxdm_data[2] = 0; // mode: 0 for 'stop logging' - qxdm_data[3] = 32; - qxdm_data[4] = 0; - qxdm_data[5] = 8; - issueLocalRequest(RIL_REQUEST_OEM_HOOK_RAW, qxdm_data, - 6 * sizeof(int)); - break; - case 5: - RLOGI("Debug port: Radio On"); - data = 1; - issueLocalRequest(RIL_REQUEST_RADIO_POWER, &data, sizeof(int)); - sleep(2); - // Set network selection automatic. - issueLocalRequest(RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC, NULL, 0); - break; - case 6: - RLOGI("Debug port: Setup Data Call, Apn :%s\n", args[1]); - actData[0] = args[1]; - issueLocalRequest(RIL_REQUEST_SETUP_DATA_CALL, &actData, - sizeof(actData)); - break; - case 7: - RLOGI("Debug port: Deactivate Data Call"); - issueLocalRequest(RIL_REQUEST_DEACTIVATE_DATA_CALL, &deactData, - sizeof(deactData)); - break; - case 8: - RLOGI("Debug port: Dial Call"); - dialData.clir = 0; - dialData.address = args[1]; - issueLocalRequest(RIL_REQUEST_DIAL, &dialData, sizeof(dialData)); - break; - case 9: - RLOGI("Debug port: Answer Call"); - issueLocalRequest(RIL_REQUEST_ANSWER, NULL, 0); - break; - case 10: - RLOGI("Debug port: End Call"); - issueLocalRequest(RIL_REQUEST_HANGUP, &hangupData, - sizeof(hangupData)); - break; - default: - RLOGE ("Invalid request"); - break; - } - freeDebugCallbackArgs(number, args); - close(acceptFD); -} - - -static void userTimerCallback (int fd, short flags, void *param) { - UserCallbackInfo *p_info; - - p_info = (UserCallbackInfo *)param; - - p_info->p_callback(p_info->userParam); - - - // FIXME generalize this...there should be a cancel mechanism - if (s_last_wake_timeout_info != NULL && s_last_wake_timeout_info == p_info) { - s_last_wake_timeout_info = NULL; - } - - free(p_info); -} - - -static void * -eventLoop(void *param) { - int ret; - int filedes[2]; - - ril_event_init(); - - pthread_mutex_lock(&s_startupMutex); - - s_started = 1; - pthread_cond_broadcast(&s_startupCond); - - pthread_mutex_unlock(&s_startupMutex); - - ret = pipe(filedes); - - if (ret < 0) { - RLOGE("Error in pipe() errno:%d", errno); - return NULL; - } - - s_fdWakeupRead = filedes[0]; - s_fdWakeupWrite = filedes[1]; - - fcntl(s_fdWakeupRead, F_SETFL, O_NONBLOCK); - - ril_event_set (&s_wakeupfd_event, s_fdWakeupRead, true, - processWakeupCallback, NULL); - - rilEventAddWakeup (&s_wakeupfd_event); - - // Only returns on error - ril_event_loop(); - RLOGE ("error in event_loop_base errno:%d", errno); - // kill self to restart on error - kill(0, SIGKILL); - - return NULL; -} - -extern "C" void -RIL_startEventLoop(void) { - int ret; - pthread_attr_t attr; - - /* spin up eventLoop thread and wait for it to get started */ - s_started = 0; - pthread_mutex_lock(&s_startupMutex); - - pthread_attr_init (&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - ret = pthread_create(&s_tid_dispatch, &attr, eventLoop, NULL); - - while (s_started == 0) { - pthread_cond_wait(&s_startupCond, &s_startupMutex); - } - - pthread_mutex_unlock(&s_startupMutex); - - if (ret < 0) { - RLOGE("Failed to create dispatch thread errno:%d", errno); - return; - } -} - -// Used for testing purpose only. -extern "C" void RIL_setcallbacks (const RIL_RadioFunctions *callbacks) { - memcpy(&s_callbacks, callbacks, sizeof (RIL_RadioFunctions)); -} - -extern "C" void -RIL_register (const RIL_RadioFunctions *callbacks) { - int ret; - int flags; - - if (callbacks == NULL) { - RLOGE("RIL_register: RIL_RadioFunctions * null"); - return; - } - if (callbacks->version < RIL_VERSION_MIN) { - RLOGE("RIL_register: version %d is to old, min version is %d", - callbacks->version, RIL_VERSION_MIN); - return; - } - if (callbacks->version > RIL_VERSION) { - RLOGE("RIL_register: version %d is too new, max version is %d", - callbacks->version, RIL_VERSION); - return; - } - RLOGE("RIL_register: RIL version %d", callbacks->version); - - if (s_registerCalled > 0) { - RLOGE("RIL_register has been called more than once. " - "Subsequent call ignored"); - return; - } - - memcpy(&s_callbacks, callbacks, sizeof (RIL_RadioFunctions)); - - s_registerCalled = 1; - - // Little self-check - - for (int i = 0; i < (int)NUM_ELEMS(s_commands); i++) { - assert(i == s_commands[i].requestNumber); - } - - for (int i = 0; i < (int)NUM_ELEMS(s_unsolResponses); i++) { - assert(i + RIL_UNSOL_RESPONSE_BASE - == s_unsolResponses[i].requestNumber); - } - - // New rild impl calls RIL_startEventLoop() first - // old standalone impl wants it here. - - if (s_started == 0) { - RIL_startEventLoop(); - } - - // start listen socket - -#if 0 - ret = socket_local_server (SOCKET_NAME_RIL, - ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM); - - if (ret < 0) { - RLOGE("Unable to bind socket errno:%d", errno); - exit (-1); - } - s_fdListen = ret; - -#else - s_fdListen = android_get_control_socket(RIL_getRilSocketName()); - if (s_fdListen < 0) { - RLOGE("Failed to get socket %s",RIL_getRilSocketName()); - exit(-1); - } - - ret = listen(s_fdListen, 4); - - if (ret < 0) { - RLOGE("Failed to listen on control socket '%d': %s", - s_fdListen, strerror(errno)); - exit(-1); - } -#endif - - - /* note: non-persistent so we can accept only one connection at a time */ - ril_event_set (&s_listen_event, s_fdListen, false, - listenCallback, NULL); - - rilEventAddWakeup (&s_listen_event); - -#if 1 - // start debug interface socket - - char *inst = NULL; - if (strlen(RIL_getRilSocketName()) >= strlen(SOCKET_NAME_RIL)) { - inst = RIL_getRilSocketName() + strlen(SOCKET_NAME_RIL); - } - - char rildebug[MAX_DEBUG_SOCKET_NAME_LENGTH] = SOCKET_NAME_RIL_DEBUG; - if (inst != NULL) { - strncat(rildebug, inst, MAX_DEBUG_SOCKET_NAME_LENGTH); - } - - s_fdDebug = android_get_control_socket(rildebug); - if (s_fdDebug < 0) { - RLOGE("Failed to get socket : %s errno:%d", rildebug, errno); - exit(-1); - } - - ret = listen(s_fdDebug, 4); - - if (ret < 0) { - RLOGE("Failed to listen on ril debug socket '%d': %s", - s_fdDebug, strerror(errno)); - exit(-1); - } - - ril_event_set (&s_debug_event, s_fdDebug, true, - debugCallback, NULL); - - rilEventAddWakeup (&s_debug_event); -#endif - -} - -static int -checkAndDequeueRequestInfo(struct RequestInfo *pRI) { - int ret = 0; - - if (pRI == NULL) { - return 0; - } - - pthread_mutex_lock(&s_pendingRequestsMutex); - - for(RequestInfo **ppCur = &s_pendingRequests - ; *ppCur != NULL - ; ppCur = &((*ppCur)->p_next) - ) { - if (pRI == *ppCur) { - ret = 1; - - *ppCur = (*ppCur)->p_next; - break; - } - } - - pthread_mutex_unlock(&s_pendingRequestsMutex); - - return ret; -} - - -extern "C" void -RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responselen) { - RequestInfo *pRI; - int ret; - size_t errorOffset; - - pRI = (RequestInfo *)t; - - if (!checkAndDequeueRequestInfo(pRI)) { - RLOGE ("RIL_onRequestComplete: invalid RIL_Token"); - return; - } - - if (pRI->local > 0) { - // Locally issued command...void only! - // response does not go back up the command socket - RLOGD("C[locl]< %s", requestToString(pRI->pCI->requestNumber)); - - goto done; - } - - appendPrintBuf("[%04d]< %s", - pRI->token, requestToString(pRI->pCI->requestNumber)); - - if (pRI->cancelled == 0) { - Parcel p; - - p.writeInt32 (RESPONSE_SOLICITED); - p.writeInt32 (pRI->token); - errorOffset = p.dataPosition(); - - p.writeInt32 (e); - - if (response != NULL) { - // there is a response payload, no matter success or not. - ret = pRI->pCI->responseFunction(p, response, responselen); - - /* if an error occurred, rewind and mark it */ - if (ret != 0) { - p.setDataPosition(errorOffset); - p.writeInt32 (ret); - } - } - - if (e != RIL_E_SUCCESS) { - appendPrintBuf("%s fails by %s", printBuf, failCauseToString(e)); - } - - if (s_fdCommand < 0) { - RLOGD ("RIL onRequestComplete: Command channel closed"); - } - sendResponse(p); - } - -done: - free(pRI); -} - - -static void -grabPartialWakeLock() { - acquire_wake_lock(PARTIAL_WAKE_LOCK, ANDROID_WAKE_LOCK_NAME); -} - -static void -releaseWakeLock() { - release_wake_lock(ANDROID_WAKE_LOCK_NAME); -} - -/** - * Timer callback to put us back to sleep before the default timeout - */ -static void -wakeTimeoutCallback (void *param) { - // We're using "param != NULL" as a cancellation mechanism - if (param == NULL) { - //RLOGD("wakeTimeout: releasing wake lock"); - - releaseWakeLock(); - } else { - //RLOGD("wakeTimeout: releasing wake lock CANCELLED"); - } -} - -static int -decodeVoiceRadioTechnology (RIL_RadioState radioState) { - switch (radioState) { - case RADIO_STATE_SIM_NOT_READY: - case RADIO_STATE_SIM_LOCKED_OR_ABSENT: - case RADIO_STATE_SIM_READY: - return RADIO_TECH_UMTS; - - case RADIO_STATE_RUIM_NOT_READY: - case RADIO_STATE_RUIM_READY: - case RADIO_STATE_RUIM_LOCKED_OR_ABSENT: - case RADIO_STATE_NV_NOT_READY: - case RADIO_STATE_NV_READY: - return RADIO_TECH_1xRTT; - - default: - RLOGD("decodeVoiceRadioTechnology: Invoked with incorrect RadioState"); - return -1; - } -} - -static int -decodeCdmaSubscriptionSource (RIL_RadioState radioState) { - switch (radioState) { - case RADIO_STATE_SIM_NOT_READY: - case RADIO_STATE_SIM_LOCKED_OR_ABSENT: - case RADIO_STATE_SIM_READY: - case RADIO_STATE_RUIM_NOT_READY: - case RADIO_STATE_RUIM_READY: - case RADIO_STATE_RUIM_LOCKED_OR_ABSENT: - return CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM; - - case RADIO_STATE_NV_NOT_READY: - case RADIO_STATE_NV_READY: - return CDMA_SUBSCRIPTION_SOURCE_NV; - - default: - RLOGD("decodeCdmaSubscriptionSource: Invoked with incorrect RadioState"); - return -1; - } -} - -static int -decodeSimStatus (RIL_RadioState radioState) { - switch (radioState) { - case RADIO_STATE_SIM_NOT_READY: - case RADIO_STATE_RUIM_NOT_READY: - case RADIO_STATE_NV_NOT_READY: - case RADIO_STATE_NV_READY: - return -1; - case RADIO_STATE_SIM_LOCKED_OR_ABSENT: - case RADIO_STATE_SIM_READY: - case RADIO_STATE_RUIM_READY: - case RADIO_STATE_RUIM_LOCKED_OR_ABSENT: - return radioState; - default: - RLOGD("decodeSimStatus: Invoked with incorrect RadioState"); - return -1; - } -} - -static bool is3gpp2(int radioTech) { - switch (radioTech) { - case RADIO_TECH_IS95A: - case RADIO_TECH_IS95B: - case RADIO_TECH_1xRTT: - case RADIO_TECH_EVDO_0: - case RADIO_TECH_EVDO_A: - case RADIO_TECH_EVDO_B: - case RADIO_TECH_EHRPD: - return true; - default: - return false; - } -} - -/* If RIL sends SIM states or RUIM states, store the voice radio - * technology and subscription source information so that they can be - * returned when telephony framework requests them - */ -static RIL_RadioState -processRadioState(RIL_RadioState newRadioState) { - - if((newRadioState > RADIO_STATE_UNAVAILABLE) && (newRadioState < RADIO_STATE_ON)) { - int newVoiceRadioTech; - int newCdmaSubscriptionSource; - int newSimStatus; - - /* This is old RIL. Decode Subscription source and Voice Radio Technology - from Radio State and send change notifications if there has been a change */ - newVoiceRadioTech = decodeVoiceRadioTechnology(newRadioState); - if(newVoiceRadioTech != voiceRadioTech) { - voiceRadioTech = newVoiceRadioTech; - RIL_onUnsolicitedResponse (RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, - &voiceRadioTech, sizeof(voiceRadioTech)); - } - if(is3gpp2(newVoiceRadioTech)) { - newCdmaSubscriptionSource = decodeCdmaSubscriptionSource(newRadioState); - if(newCdmaSubscriptionSource != cdmaSubscriptionSource) { - cdmaSubscriptionSource = newCdmaSubscriptionSource; - RIL_onUnsolicitedResponse (RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, - &cdmaSubscriptionSource, sizeof(cdmaSubscriptionSource)); - } - } - newSimStatus = decodeSimStatus(newRadioState); - if(newSimStatus != simRuimStatus) { - simRuimStatus = newSimStatus; - RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, NULL, 0); - } - - /* Send RADIO_ON to telephony */ - newRadioState = RADIO_STATE_ON; - } - - return newRadioState; -} - -extern "C" -void RIL_onUnsolicitedResponse(int unsolResponse, void *data, - size_t datalen) -{ - int unsolResponseIndex; - int ret; - int64_t timeReceived = 0; - bool shouldScheduleTimeout = false; - RIL_RadioState newState; - - if (s_registerCalled == 0) { - // Ignore RIL_onUnsolicitedResponse before RIL_register - RLOGW("RIL_onUnsolicitedResponse called before RIL_register"); - return; - } - - unsolResponseIndex = unsolResponse - RIL_UNSOL_RESPONSE_BASE; - - if ((unsolResponseIndex < 0) - || (unsolResponseIndex >= (int32_t)NUM_ELEMS(s_unsolResponses))) { - RLOGE("unsupported unsolicited response code %d", unsolResponse); - return; - } - - // Grab a wake lock if needed for this reponse, - // as we exit we'll either release it immediately - // or set a timer to release it later. - switch (s_unsolResponses[unsolResponseIndex].wakeType) { - case WAKE_PARTIAL: - grabPartialWakeLock(); - shouldScheduleTimeout = true; - break; - - case DONT_WAKE: - default: - // No wake lock is grabed so don't set timeout - shouldScheduleTimeout = false; - break; - } - - // Mark the time this was received, doing this - // after grabing the wakelock incase getting - // the elapsedRealTime might cause us to goto - // sleep. - if (unsolResponse == RIL_UNSOL_NITZ_TIME_RECEIVED) { - timeReceived = elapsedRealtime(); - } - - appendPrintBuf("[UNSL]< %s", requestToString(unsolResponse)); - - Parcel p; - - p.writeInt32 (RESPONSE_UNSOLICITED); - p.writeInt32 (unsolResponse); - - ret = s_unsolResponses[unsolResponseIndex] - .responseFunction(p, data, datalen); - if (ret != 0) { - // Problem with the response. Don't continue; - goto error_exit; - } - - // some things get more payload - switch(unsolResponse) { - case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: - newState = processRadioState(s_callbacks.onStateRequest()); - p.writeInt32(newState); - appendPrintBuf("%s {%s}", printBuf, - radioStateToString(s_callbacks.onStateRequest())); - break; - - - case RIL_UNSOL_NITZ_TIME_RECEIVED: - // Store the time that this was received so the - // handler of this message can account for - // the time it takes to arrive and process. In - // particular the system has been known to sleep - // before this message can be processed. - p.writeInt64(timeReceived); - break; - } - - ret = sendResponse(p); - if (ret != 0 && unsolResponse == RIL_UNSOL_NITZ_TIME_RECEIVED) { - - // Unfortunately, NITZ time is not poll/update like everything - // else in the system. So, if the upstream client isn't connected, - // keep a copy of the last NITZ response (with receive time noted - // above) around so we can deliver it when it is connected - - if (s_lastNITZTimeData != NULL) { - free (s_lastNITZTimeData); - s_lastNITZTimeData = NULL; - } - - s_lastNITZTimeData = malloc(p.dataSize()); - s_lastNITZTimeDataSize = p.dataSize(); - memcpy(s_lastNITZTimeData, p.data(), p.dataSize()); - } - - // For now, we automatically go back to sleep after TIMEVAL_WAKE_TIMEOUT - // FIXME The java code should handshake here to release wake lock - - if (shouldScheduleTimeout) { - // Cancel the previous request - if (s_last_wake_timeout_info != NULL) { - s_last_wake_timeout_info->userParam = (void *)1; - } - - s_last_wake_timeout_info - = internalRequestTimedCallback(wakeTimeoutCallback, NULL, - &TIMEVAL_WAKE_TIMEOUT); - } - - // Normal exit - return; - -error_exit: - if (shouldScheduleTimeout) { - releaseWakeLock(); - } -} - -/** FIXME generalize this if you track UserCAllbackInfo, clear it - when the callback occurs -*/ -static UserCallbackInfo * -internalRequestTimedCallback (RIL_TimedCallback callback, void *param, - const struct timeval *relativeTime) -{ - struct timeval myRelativeTime; - UserCallbackInfo *p_info; - - p_info = (UserCallbackInfo *) malloc (sizeof(UserCallbackInfo)); - - p_info->p_callback = callback; - p_info->userParam = param; - - if (relativeTime == NULL) { - /* treat null parameter as a 0 relative time */ - memset (&myRelativeTime, 0, sizeof(myRelativeTime)); - } else { - /* FIXME I think event_add's tv param is really const anyway */ - memcpy (&myRelativeTime, relativeTime, sizeof(myRelativeTime)); - } - - ril_event_set(&(p_info->event), -1, false, userTimerCallback, p_info); - - ril_timer_add(&(p_info->event), &myRelativeTime); - - triggerEvLoop(); - return p_info; -} - - -extern "C" void -RIL_requestTimedCallback (RIL_TimedCallback callback, void *param, - const struct timeval *relativeTime) { - internalRequestTimedCallback (callback, param, relativeTime); -} - -const char * -failCauseToString(RIL_Errno e) { - switch(e) { - case RIL_E_SUCCESS: return "E_SUCCESS"; - case RIL_E_RADIO_NOT_AVAILABLE: return "E_RADIO_NOT_AVAILABLE"; - case RIL_E_GENERIC_FAILURE: return "E_GENERIC_FAILURE"; - case RIL_E_PASSWORD_INCORRECT: return "E_PASSWORD_INCORRECT"; - case RIL_E_SIM_PIN2: return "E_SIM_PIN2"; - case RIL_E_SIM_PUK2: return "E_SIM_PUK2"; - case RIL_E_REQUEST_NOT_SUPPORTED: return "E_REQUEST_NOT_SUPPORTED"; - case RIL_E_CANCELLED: return "E_CANCELLED"; - case RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL: return "E_OP_NOT_ALLOWED_DURING_VOICE_CALL"; - case RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW: return "E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW"; - case RIL_E_SMS_SEND_FAIL_RETRY: return "E_SMS_SEND_FAIL_RETRY"; - case RIL_E_SIM_ABSENT:return "E_SIM_ABSENT"; - case RIL_E_ILLEGAL_SIM_OR_ME:return "E_ILLEGAL_SIM_OR_ME"; -#ifdef FEATURE_MULTIMODE_ANDROID - case RIL_E_SUBSCRIPTION_NOT_AVAILABLE:return "E_SUBSCRIPTION_NOT_AVAILABLE"; - case RIL_E_MODE_NOT_SUPPORTED:return "E_MODE_NOT_SUPPORTED"; -#endif - default: return "<unknown error>"; - } -} - -const char * -radioStateToString(RIL_RadioState s) { - switch(s) { - case RADIO_STATE_OFF: return "RADIO_OFF"; - case RADIO_STATE_UNAVAILABLE: return "RADIO_UNAVAILABLE"; - case RADIO_STATE_SIM_NOT_READY: return "RADIO_SIM_NOT_READY"; - case RADIO_STATE_SIM_LOCKED_OR_ABSENT: return "RADIO_SIM_LOCKED_OR_ABSENT"; - case RADIO_STATE_SIM_READY: return "RADIO_SIM_READY"; - case RADIO_STATE_RUIM_NOT_READY:return"RADIO_RUIM_NOT_READY"; - case RADIO_STATE_RUIM_READY:return"RADIO_RUIM_READY"; - case RADIO_STATE_RUIM_LOCKED_OR_ABSENT:return"RADIO_RUIM_LOCKED_OR_ABSENT"; - case RADIO_STATE_NV_NOT_READY:return"RADIO_NV_NOT_READY"; - case RADIO_STATE_NV_READY:return"RADIO_NV_READY"; - case RADIO_STATE_ON:return"RADIO_ON"; - default: return "<unknown state>"; - } -} - -const char * -callStateToString(RIL_CallState s) { - switch(s) { - case RIL_CALL_ACTIVE : return "ACTIVE"; - case RIL_CALL_HOLDING: return "HOLDING"; - case RIL_CALL_DIALING: return "DIALING"; - case RIL_CALL_ALERTING: return "ALERTING"; - case RIL_CALL_INCOMING: return "INCOMING"; - case RIL_CALL_WAITING: return "WAITING"; - default: return "<unknown state>"; - } -} - -const char * -requestToString(int request) { -/* - cat libs/telephony/ril_commands.h \ - | egrep "^ *{RIL_" \ - | sed -re 's/\{RIL_([^,]+),[^,]+,([^}]+).+/case RIL_\1: return "\1";/' - - - cat libs/telephony/ril_unsol_commands.h \ - | egrep "^ *{RIL_" \ - | sed -re 's/\{RIL_([^,]+),([^}]+).+/case RIL_\1: return "\1";/' - -*/ - switch(request) { - case RIL_REQUEST_GET_SIM_STATUS: return "GET_SIM_STATUS"; - case RIL_REQUEST_ENTER_SIM_PIN: return "ENTER_SIM_PIN"; - case RIL_REQUEST_ENTER_SIM_PUK: return "ENTER_SIM_PUK"; - case RIL_REQUEST_ENTER_SIM_PIN2: return "ENTER_SIM_PIN2"; - case RIL_REQUEST_ENTER_SIM_PUK2: return "ENTER_SIM_PUK2"; - case RIL_REQUEST_CHANGE_SIM_PIN: return "CHANGE_SIM_PIN"; - case RIL_REQUEST_CHANGE_SIM_PIN2: return "CHANGE_SIM_PIN2"; - case RIL_REQUEST_ENTER_DEPERSONALIZATION_CODE: return "ENTER_DEPERSONALIZATION_CODE"; - case RIL_REQUEST_GET_CURRENT_CALLS: return "GET_CURRENT_CALLS"; - case RIL_REQUEST_DIAL: return "DIAL"; - case RIL_REQUEST_GET_IMSI: return "GET_IMSI"; - case RIL_REQUEST_HANGUP: return "HANGUP"; - case RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND: return "HANGUP_WAITING_OR_BACKGROUND"; - case RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND: return "HANGUP_FOREGROUND_RESUME_BACKGROUND"; - case RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE: return "SWITCH_WAITING_OR_HOLDING_AND_ACTIVE"; - case RIL_REQUEST_CONFERENCE: return "CONFERENCE"; - case RIL_REQUEST_UDUB: return "UDUB"; - case RIL_REQUEST_LAST_CALL_FAIL_CAUSE: return "LAST_CALL_FAIL_CAUSE"; - case RIL_REQUEST_SIGNAL_STRENGTH: return "SIGNAL_STRENGTH"; - case RIL_REQUEST_VOICE_REGISTRATION_STATE: return "VOICE_REGISTRATION_STATE"; - case RIL_REQUEST_DATA_REGISTRATION_STATE: return "DATA_REGISTRATION_STATE"; - case RIL_REQUEST_OPERATOR: return "OPERATOR"; - case RIL_REQUEST_RADIO_POWER: return "RADIO_POWER"; - case RIL_REQUEST_DTMF: return "DTMF"; - case RIL_REQUEST_SEND_SMS: return "SEND_SMS"; - case RIL_REQUEST_SEND_SMS_EXPECT_MORE: return "SEND_SMS_EXPECT_MORE"; - case RIL_REQUEST_SETUP_DATA_CALL: return "SETUP_DATA_CALL"; - case RIL_REQUEST_SIM_IO: return "SIM_IO"; - case RIL_REQUEST_SEND_USSD: return "SEND_USSD"; - case RIL_REQUEST_CANCEL_USSD: return "CANCEL_USSD"; - case RIL_REQUEST_GET_CLIR: return "GET_CLIR"; - case RIL_REQUEST_SET_CLIR: return "SET_CLIR"; - case RIL_REQUEST_QUERY_CALL_FORWARD_STATUS: return "QUERY_CALL_FORWARD_STATUS"; - case RIL_REQUEST_SET_CALL_FORWARD: return "SET_CALL_FORWARD"; - case RIL_REQUEST_QUERY_CALL_WAITING: return "QUERY_CALL_WAITING"; - case RIL_REQUEST_SET_CALL_WAITING: return "SET_CALL_WAITING"; - case RIL_REQUEST_SMS_ACKNOWLEDGE: return "SMS_ACKNOWLEDGE"; - case RIL_REQUEST_GET_IMEI: return "GET_IMEI"; - case RIL_REQUEST_GET_IMEISV: return "GET_IMEISV"; - case RIL_REQUEST_ANSWER: return "ANSWER"; - case RIL_REQUEST_DEACTIVATE_DATA_CALL: return "DEACTIVATE_DATA_CALL"; - case RIL_REQUEST_QUERY_FACILITY_LOCK: return "QUERY_FACILITY_LOCK"; - case RIL_REQUEST_SET_FACILITY_LOCK: return "SET_FACILITY_LOCK"; - case RIL_REQUEST_CHANGE_BARRING_PASSWORD: return "CHANGE_BARRING_PASSWORD"; - case RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE: return "QUERY_NETWORK_SELECTION_MODE"; - case RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC: return "SET_NETWORK_SELECTION_AUTOMATIC"; - case RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL: return "SET_NETWORK_SELECTION_MANUAL"; - case RIL_REQUEST_QUERY_AVAILABLE_NETWORKS : return "QUERY_AVAILABLE_NETWORKS "; - case RIL_REQUEST_DTMF_START: return "DTMF_START"; - case RIL_REQUEST_DTMF_STOP: return "DTMF_STOP"; - case RIL_REQUEST_BASEBAND_VERSION: return "BASEBAND_VERSION"; - case RIL_REQUEST_SEPARATE_CONNECTION: return "SEPARATE_CONNECTION"; - case RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE: return "SET_PREFERRED_NETWORK_TYPE"; - case RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE: return "GET_PREFERRED_NETWORK_TYPE"; - case RIL_REQUEST_GET_NEIGHBORING_CELL_IDS: return "GET_NEIGHBORING_CELL_IDS"; - case RIL_REQUEST_SET_MUTE: return "SET_MUTE"; - case RIL_REQUEST_GET_MUTE: return "GET_MUTE"; - case RIL_REQUEST_QUERY_CLIP: return "QUERY_CLIP"; - case RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE: return "LAST_DATA_CALL_FAIL_CAUSE"; - case RIL_REQUEST_DATA_CALL_LIST: return "DATA_CALL_LIST"; - case RIL_REQUEST_RESET_RADIO: return "RESET_RADIO"; - case RIL_REQUEST_OEM_HOOK_RAW: return "OEM_HOOK_RAW"; - case RIL_REQUEST_OEM_HOOK_STRINGS: return "OEM_HOOK_STRINGS"; - case RIL_REQUEST_SET_BAND_MODE: return "SET_BAND_MODE"; - case RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE: return "QUERY_AVAILABLE_BAND_MODE"; - case RIL_REQUEST_STK_GET_PROFILE: return "STK_GET_PROFILE"; - case RIL_REQUEST_STK_SET_PROFILE: return "STK_SET_PROFILE"; - case RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: return "STK_SEND_ENVELOPE_COMMAND"; - case RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE: return "STK_SEND_TERMINAL_RESPONSE"; - case RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM: return "STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM"; - case RIL_REQUEST_SCREEN_STATE: return "SCREEN_STATE"; - case RIL_REQUEST_EXPLICIT_CALL_TRANSFER: return "EXPLICIT_CALL_TRANSFER"; - case RIL_REQUEST_SET_LOCATION_UPDATES: return "SET_LOCATION_UPDATES"; - case RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE:return"CDMA_SET_SUBSCRIPTION_SOURCE"; - case RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE:return"CDMA_SET_ROAMING_PREFERENCE"; - case RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE:return"CDMA_QUERY_ROAMING_PREFERENCE"; - case RIL_REQUEST_SET_TTY_MODE:return"SET_TTY_MODE"; - case RIL_REQUEST_QUERY_TTY_MODE:return"QUERY_TTY_MODE"; - case RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE:return"CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE"; - case RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE:return"CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE"; - case RIL_REQUEST_CDMA_FLASH:return"CDMA_FLASH"; - case RIL_REQUEST_CDMA_BURST_DTMF:return"CDMA_BURST_DTMF"; - case RIL_REQUEST_CDMA_SEND_SMS:return"CDMA_SEND_SMS"; - case RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE:return"CDMA_SMS_ACKNOWLEDGE"; - case RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG:return"GSM_GET_BROADCAST_SMS_CONFIG"; - case RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG:return"GSM_SET_BROADCAST_SMS_CONFIG"; - case RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG:return "CDMA_GET_BROADCAST_SMS_CONFIG"; - case RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG:return "CDMA_SET_BROADCAST_SMS_CONFIG"; - case RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION:return "CDMA_SMS_BROADCAST_ACTIVATION"; - case RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY: return"CDMA_VALIDATE_AND_WRITE_AKEY"; - case RIL_REQUEST_CDMA_SUBSCRIPTION: return"CDMA_SUBSCRIPTION"; - case RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM: return "CDMA_WRITE_SMS_TO_RUIM"; - case RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM: return "CDMA_DELETE_SMS_ON_RUIM"; - case RIL_REQUEST_DEVICE_IDENTITY: return "DEVICE_IDENTITY"; - case RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE: return "EXIT_EMERGENCY_CALLBACK_MODE"; - case RIL_REQUEST_GET_SMSC_ADDRESS: return "GET_SMSC_ADDRESS"; - case RIL_REQUEST_SET_SMSC_ADDRESS: return "SET_SMSC_ADDRESS"; - case RIL_REQUEST_REPORT_SMS_MEMORY_STATUS: return "REPORT_SMS_MEMORY_STATUS"; - case RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING: return "REPORT_STK_SERVICE_IS_RUNNING"; - case RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE: return "CDMA_GET_SUBSCRIPTION_SOURCE"; - case RIL_REQUEST_ISIM_AUTHENTICATION: return "ISIM_AUTHENTICATION"; - case RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU: return "RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU"; - case RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS: return "RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS"; - case RIL_REQUEST_VOICE_RADIO_TECH: return "VOICE_RADIO_TECH"; - case RIL_REQUEST_WRITE_SMS_TO_SIM: return "WRITE_SMS_TO_SIM"; - case RIL_REQUEST_GET_CELL_INFO_LIST: return"GET_CELL_INFO_LIST"; - case RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE: return"SET_UNSOL_CELL_INFO_LIST_RATE"; - case RIL_REQUEST_SET_INITIAL_ATTACH_APN: return "RIL_REQUEST_SET_INITIAL_ATTACH_APN"; - case RIL_REQUEST_IMS_REGISTRATION_STATE: return "IMS_REGISTRATION_STATE"; - case RIL_REQUEST_IMS_SEND_SMS: return "IMS_SEND_SMS"; - case RIL_REQUEST_GET_DATA_CALL_PROFILE: return "GET_DATA_CALL_PROFILE"; - case RIL_REQUEST_SET_UICC_SUBSCRIPTION: return "SET_UICC_SUBSCRIPTION"; - case RIL_REQUEST_SET_DATA_SUBSCRIPTION: return "SET_DATA_SUBSCRIPTION"; - case RIL_REQUEST_FACTORY_MODE_NV_PROCESS: return "REQUEST_FACTORY_MODE_NV_PROCESS"; - case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: return "UNSOL_RESPONSE_RADIO_STATE_CHANGED"; - case RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED: return "UNSOL_RESPONSE_CALL_STATE_CHANGED"; - case RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED: return "UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED"; - case RIL_UNSOL_RESPONSE_NEW_SMS: return "UNSOL_RESPONSE_NEW_SMS"; - case RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT: return "UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT"; - case RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM: return "UNSOL_RESPONSE_NEW_SMS_ON_SIM"; - case RIL_UNSOL_ON_USSD: return "UNSOL_ON_USSD"; - case RIL_UNSOL_ON_USSD_REQUEST: return "UNSOL_ON_USSD_REQUEST(obsolete)"; - case RIL_UNSOL_NITZ_TIME_RECEIVED: return "UNSOL_NITZ_TIME_RECEIVED"; - case RIL_UNSOL_SIGNAL_STRENGTH: return "UNSOL_SIGNAL_STRENGTH"; - case RIL_UNSOL_SUPP_SVC_NOTIFICATION: return "UNSOL_SUPP_SVC_NOTIFICATION"; - case RIL_UNSOL_STK_SESSION_END: return "UNSOL_STK_SESSION_END"; - case RIL_UNSOL_STK_PROACTIVE_COMMAND: return "UNSOL_STK_PROACTIVE_COMMAND"; - case RIL_UNSOL_STK_EVENT_NOTIFY: return "UNSOL_STK_EVENT_NOTIFY"; - case RIL_UNSOL_STK_CALL_SETUP: return "UNSOL_STK_CALL_SETUP"; - case RIL_UNSOL_SIM_SMS_STORAGE_FULL: return "UNSOL_SIM_SMS_STORAGE_FUL"; - case RIL_UNSOL_SIM_REFRESH: return "UNSOL_SIM_REFRESH"; - case RIL_UNSOL_DATA_CALL_LIST_CHANGED: return "UNSOL_DATA_CALL_LIST_CHANGED"; - case RIL_UNSOL_CALL_RING: return "UNSOL_CALL_RING"; - case RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED: return "UNSOL_RESPONSE_SIM_STATUS_CHANGED"; - case RIL_UNSOL_RESPONSE_CDMA_NEW_SMS: return "UNSOL_NEW_CDMA_SMS"; - case RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS: return "UNSOL_NEW_BROADCAST_SMS"; - case RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL: return "UNSOL_CDMA_RUIM_SMS_STORAGE_FULL"; - case RIL_UNSOL_RESTRICTED_STATE_CHANGED: return "UNSOL_RESTRICTED_STATE_CHANGED"; - case RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE: return "UNSOL_ENTER_EMERGENCY_CALLBACK_MODE"; - case RIL_UNSOL_CDMA_CALL_WAITING: return "UNSOL_CDMA_CALL_WAITING"; - case RIL_UNSOL_CDMA_OTA_PROVISION_STATUS: return "UNSOL_CDMA_OTA_PROVISION_STATUS"; - case RIL_UNSOL_CDMA_INFO_REC: return "UNSOL_CDMA_INFO_REC"; - case RIL_UNSOL_OEM_HOOK_RAW: return "UNSOL_OEM_HOOK_RAW"; - case RIL_UNSOL_RINGBACK_TONE: return "UNSOL_RINGBACK_TONE"; - case RIL_UNSOL_RESEND_INCALL_MUTE: return "UNSOL_RESEND_INCALL_MUTE"; - case RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED: return "UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED"; - case RIL_UNSOL_CDMA_PRL_CHANGED: return "UNSOL_CDMA_PRL_CHANGED"; - case RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE: return "UNSOL_EXIT_EMERGENCY_CALLBACK_MODE"; - case RIL_UNSOL_RIL_CONNECTED: return "UNSOL_RIL_CONNECTED"; - case RIL_UNSOL_VOICE_RADIO_TECH_CHANGED: return "UNSOL_VOICE_RADIO_TECH_CHANGED"; - case RIL_UNSOL_CELL_INFO_LIST: return "UNSOL_CELL_INFO_LIST"; - case RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED: return "RESPONSE_IMS_NETWORK_STATE_CHANGED"; - case RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED: return "UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED"; - default: return "<unknown request>"; - } -} - -} /* namespace android */ diff --git a/libril/ril_commands.h b/libril/ril_commands.h deleted file mode 100644 index 59cee62..0000000 --- a/libril/ril_commands.h +++ /dev/null @@ -1,137 +0,0 @@ -/* //device/libs/telephony/ril_commands.h -** -** Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. -** Not a Contribution -** Copyright 2006, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - {0, NULL, NULL}, //none - {RIL_REQUEST_GET_SIM_STATUS, dispatchVoid, responseSimStatus}, - {RIL_REQUEST_ENTER_SIM_PIN, dispatchStrings, responseInts}, - {RIL_REQUEST_ENTER_SIM_PUK, dispatchStrings, responseInts}, - {RIL_REQUEST_ENTER_SIM_PIN2, dispatchStrings, responseInts}, - {RIL_REQUEST_ENTER_SIM_PUK2, dispatchStrings, responseInts}, - {RIL_REQUEST_CHANGE_SIM_PIN, dispatchStrings, responseInts}, - {RIL_REQUEST_CHANGE_SIM_PIN2, dispatchStrings, responseInts}, - {RIL_REQUEST_ENTER_DEPERSONALIZATION_CODE, dispatchStrings, responseInts}, - {RIL_REQUEST_GET_CURRENT_CALLS, dispatchVoid, responseCallList}, - {RIL_REQUEST_DIAL, dispatchDial, responseVoid}, - {RIL_REQUEST_GET_IMSI, dispatchStrings, responseString}, - {RIL_REQUEST_HANGUP, dispatchInts, responseVoid}, - {RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND, dispatchVoid, responseVoid}, - {RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND, dispatchVoid, responseVoid}, - {RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE, dispatchVoid, responseVoid}, - {RIL_REQUEST_CONFERENCE, dispatchVoid, responseVoid}, - {RIL_REQUEST_UDUB, dispatchVoid, responseVoid}, - {RIL_REQUEST_LAST_CALL_FAIL_CAUSE, dispatchVoid, responseInts}, - {RIL_REQUEST_SIGNAL_STRENGTH, dispatchVoid, responseRilSignalStrength}, - {RIL_REQUEST_VOICE_REGISTRATION_STATE, dispatchVoid, responseStrings}, - {RIL_REQUEST_DATA_REGISTRATION_STATE, dispatchVoid, responseStrings}, - {RIL_REQUEST_OPERATOR, dispatchVoid, responseStrings}, - {RIL_REQUEST_RADIO_POWER, dispatchInts, responseVoid}, - {RIL_REQUEST_DTMF, dispatchString, responseVoid}, - {RIL_REQUEST_SEND_SMS, dispatchStrings, responseSMS}, - {RIL_REQUEST_SEND_SMS_EXPECT_MORE, dispatchStrings, responseSMS}, - {RIL_REQUEST_SETUP_DATA_CALL, dispatchDataCall, responseSetupDataCall}, - {RIL_REQUEST_SIM_IO, dispatchSIM_IO, responseSIM_IO}, - {RIL_REQUEST_SEND_USSD, dispatchString, responseVoid}, - {RIL_REQUEST_CANCEL_USSD, dispatchVoid, responseVoid}, - {RIL_REQUEST_GET_CLIR, dispatchVoid, responseInts}, - {RIL_REQUEST_SET_CLIR, dispatchInts, responseVoid}, - {RIL_REQUEST_QUERY_CALL_FORWARD_STATUS, dispatchCallForward, responseCallForwards}, - {RIL_REQUEST_SET_CALL_FORWARD, dispatchCallForward, responseVoid}, - {RIL_REQUEST_QUERY_CALL_WAITING, dispatchInts, responseInts}, - {RIL_REQUEST_SET_CALL_WAITING, dispatchInts, responseVoid}, - {RIL_REQUEST_SMS_ACKNOWLEDGE, dispatchInts, responseVoid}, - {RIL_REQUEST_GET_IMEI, dispatchVoid, responseString}, - {RIL_REQUEST_GET_IMEISV, dispatchVoid, responseString}, - {RIL_REQUEST_ANSWER,dispatchVoid, responseVoid}, - {RIL_REQUEST_DEACTIVATE_DATA_CALL, dispatchStrings, responseVoid}, - {RIL_REQUEST_QUERY_FACILITY_LOCK, dispatchStrings, responseInts}, - {RIL_REQUEST_SET_FACILITY_LOCK, dispatchStrings, responseInts}, - {RIL_REQUEST_CHANGE_BARRING_PASSWORD, dispatchStrings, responseVoid}, - {RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE, dispatchVoid, responseInts}, - {RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC, dispatchVoid, responseVoid}, - {RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL, dispatchString, responseVoid}, - {RIL_REQUEST_QUERY_AVAILABLE_NETWORKS , dispatchVoid, responseStrings}, - {RIL_REQUEST_DTMF_START, dispatchString, responseVoid}, - {RIL_REQUEST_DTMF_STOP, dispatchVoid, responseVoid}, - {RIL_REQUEST_BASEBAND_VERSION, dispatchVoid, responseString}, - {RIL_REQUEST_SEPARATE_CONNECTION, dispatchInts, responseVoid}, - {RIL_REQUEST_SET_MUTE, dispatchInts, responseVoid}, - {RIL_REQUEST_GET_MUTE, dispatchVoid, responseInts}, - {RIL_REQUEST_QUERY_CLIP, dispatchVoid, responseInts}, - {RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE, dispatchVoid, responseInts}, - {RIL_REQUEST_DATA_CALL_LIST, dispatchVoid, responseDataCallList}, - {RIL_REQUEST_RESET_RADIO, dispatchVoid, responseVoid}, - {RIL_REQUEST_OEM_HOOK_RAW, dispatchRaw, responseRaw}, - {RIL_REQUEST_OEM_HOOK_STRINGS, dispatchStrings, responseStrings}, - {RIL_REQUEST_SCREEN_STATE, dispatchInts, responseVoid}, - {RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION, dispatchInts, responseVoid}, - {RIL_REQUEST_WRITE_SMS_TO_SIM, dispatchSmsWrite, responseInts}, - {RIL_REQUEST_DELETE_SMS_ON_SIM, dispatchInts, responseVoid}, - {RIL_REQUEST_SET_BAND_MODE, dispatchInts, responseVoid}, - {RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE, dispatchVoid, responseInts}, - {RIL_REQUEST_STK_GET_PROFILE, dispatchVoid, responseString}, - {RIL_REQUEST_STK_SET_PROFILE, dispatchString, responseVoid}, - {RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND, dispatchString, responseString}, - {RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE, dispatchString, responseVoid}, - {RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM, dispatchInts, responseVoid}, - {RIL_REQUEST_EXPLICIT_CALL_TRANSFER, dispatchVoid, responseVoid}, - {RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE, dispatchInts, responseVoid}, - {RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE, dispatchVoid, responseInts}, - {RIL_REQUEST_GET_NEIGHBORING_CELL_IDS, dispatchVoid, responseCellList}, - {RIL_REQUEST_SET_LOCATION_UPDATES, dispatchInts, responseVoid}, - {RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE, dispatchInts, responseVoid}, - {RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE, dispatchInts, responseVoid}, - {RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE, dispatchVoid, responseInts}, - {RIL_REQUEST_SET_TTY_MODE, dispatchInts, responseVoid}, - {RIL_REQUEST_QUERY_TTY_MODE, dispatchVoid, responseInts}, - {RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE, dispatchInts, responseVoid}, - {RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE, dispatchVoid, responseInts}, - {RIL_REQUEST_CDMA_FLASH, dispatchString, responseVoid}, - {RIL_REQUEST_CDMA_BURST_DTMF, dispatchStrings, responseVoid}, - {RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY, dispatchString, responseVoid}, - {RIL_REQUEST_CDMA_SEND_SMS, dispatchCdmaSms, responseSMS}, - {RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE, dispatchCdmaSmsAck, responseVoid}, - {RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG, dispatchVoid, responseGsmBrSmsCnf}, - {RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG, dispatchGsmBrSmsCnf, responseVoid}, - {RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION, dispatchInts, responseVoid}, - {RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG, dispatchVoid, responseCdmaBrSmsCnf}, - {RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG, dispatchCdmaBrSmsCnf, responseVoid}, - {RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION, dispatchInts, responseVoid}, - {RIL_REQUEST_CDMA_SUBSCRIPTION, dispatchVoid, responseStrings}, - {RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM, dispatchRilCdmaSmsWriteArgs, responseInts}, - {RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM, dispatchInts, responseVoid}, - {RIL_REQUEST_DEVICE_IDENTITY, dispatchVoid, responseStrings}, - {RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE, dispatchVoid, responseVoid}, - {RIL_REQUEST_GET_SMSC_ADDRESS, dispatchVoid, responseString}, - {RIL_REQUEST_SET_SMSC_ADDRESS, dispatchString, responseVoid}, - {RIL_REQUEST_REPORT_SMS_MEMORY_STATUS, dispatchInts, responseVoid}, - {RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING, dispatchVoid, responseVoid}, - {RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE, dispatchCdmaSubscriptionSource, responseInts}, - {RIL_REQUEST_ISIM_AUTHENTICATION, dispatchString, responseString}, - {RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU, dispatchStrings, responseVoid}, - {RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS, dispatchString, responseSIM_IO}, - {RIL_REQUEST_VOICE_RADIO_TECH, dispatchVoiceRadioTech, responseInts}, - {RIL_REQUEST_GET_CELL_INFO_LIST, dispatchVoid, responseCellInfoList}, - {RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE, dispatchInts, responseVoid}, - {RIL_REQUEST_SET_INITIAL_ATTACH_APN, dispatchSetInitialAttachApn, responseVoid}, - {RIL_REQUEST_IMS_REGISTRATION_STATE, dispatchVoid, responseInts}, - {RIL_REQUEST_IMS_SEND_SMS, dispatchImsSms, responseSMS}, - {RIL_REQUEST_GET_DATA_CALL_PROFILE, dispatchInts, responseGetDataCallProfile}, - {RIL_REQUEST_SET_UICC_SUBSCRIPTION, dispatchUiccSubscripton, responseVoid}, - {RIL_REQUEST_SET_DATA_SUBSCRIPTION, dispatchVoid, responseVoid}, - /* Oppo specific codes */ - {RIL_REQUEST_FACTORY_MODE_NV_PROCESS, dispatchInts, responseVoid}, diff --git a/libril/ril_event.cpp b/libril/ril_event.cpp deleted file mode 100644 index 9d2954e..0000000 --- a/libril/ril_event.cpp +++ /dev/null @@ -1,385 +0,0 @@ -/* //device/libs/telephony/ril_event.cpp -** -** Copyright 2008, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -#define LOG_TAG "RILC" - -#include <stdlib.h> -#include <unistd.h> -#include <errno.h> -#include <fcntl.h> -#include <utils/Log.h> -#include <ril_event.h> -#include <string.h> -#include <sys/time.h> -#include <time.h> - -#include <pthread.h> -static pthread_mutex_t listMutex; -#define MUTEX_ACQUIRE() pthread_mutex_lock(&listMutex) -#define MUTEX_RELEASE() pthread_mutex_unlock(&listMutex) -#define MUTEX_INIT() pthread_mutex_init(&listMutex, NULL) -#define MUTEX_DESTROY() pthread_mutex_destroy(&listMutex) - -#ifndef timeradd -#define timeradd(tvp, uvp, vvp) \ - do { \ - (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ - (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ - if ((vvp)->tv_usec >= 1000000) { \ - (vvp)->tv_sec++; \ - (vvp)->tv_usec -= 1000000; \ - } \ - } while (0) -#endif - -#ifndef timercmp -#define timercmp(a, b, op) \ - ((a)->tv_sec == (b)->tv_sec \ - ? (a)->tv_usec op (b)->tv_usec \ - : (a)->tv_sec op (b)->tv_sec) -#endif - -#ifndef timersub -#define timersub(a, b, res) \ - do { \ - (res)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (res)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ - if ((res)->tv_usec < 0) { \ - (res)->tv_usec += 1000000; \ - (res)->tv_sec -= 1; \ - } \ - } while(0); -#endif - -static fd_set readFds; -static int nfds = 0; - -static struct ril_event * watch_table[MAX_FD_EVENTS]; -static struct ril_event timer_list; -static struct ril_event pending_list; - -#define DEBUG 0 - -#if DEBUG -#define dlog(x...) RLOGD( x ) -static void dump_event(struct ril_event * ev) -{ - dlog("~~~~ Event %x ~~~~", (unsigned int)ev); - dlog(" next = %x", (unsigned int)ev->next); - dlog(" prev = %x", (unsigned int)ev->prev); - dlog(" fd = %d", ev->fd); - dlog(" pers = %d", ev->persist); - dlog(" timeout = %ds + %dus", (int)ev->timeout.tv_sec, (int)ev->timeout.tv_usec); - dlog(" func = %x", (unsigned int)ev->func); - dlog(" param = %x", (unsigned int)ev->param); - dlog("~~~~~~~~~~~~~~~~~~"); -} -#else -#define dlog(x...) do {} while(0) -#define dump_event(x) do {} while(0) -#endif - -static void getNow(struct timeval * tv) -{ -#ifdef HAVE_POSIX_CLOCKS - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - tv->tv_sec = ts.tv_sec; - tv->tv_usec = ts.tv_nsec/1000; -#else - gettimeofday(tv, NULL); -#endif -} - -static void init_list(struct ril_event * list) -{ - memset(list, 0, sizeof(struct ril_event)); - list->next = list; - list->prev = list; - list->fd = -1; -} - -static void addToList(struct ril_event * ev, struct ril_event * list) -{ - ev->next = list; - ev->prev = list->prev; - ev->prev->next = ev; - list->prev = ev; - dump_event(ev); -} - -static void removeFromList(struct ril_event * ev) -{ - dlog("~~~~ Removing event ~~~~"); - dump_event(ev); - - ev->next->prev = ev->prev; - ev->prev->next = ev->next; - ev->next = NULL; - ev->prev = NULL; -} - - -static void removeWatch(struct ril_event * ev, int index) -{ - watch_table[index] = NULL; - ev->index = -1; - - FD_CLR(ev->fd, &readFds); - - if (ev->fd+1 == nfds) { - int n = 0; - - for (int i = 0; i < MAX_FD_EVENTS; i++) { - struct ril_event * rev = watch_table[i]; - - if ((rev != NULL) && (rev->fd > n)) { - n = rev->fd; - } - } - nfds = n + 1; - dlog("~~~~ nfds = %d ~~~~", nfds); - } -} - -static void processTimeouts() -{ - dlog("~~~~ +processTimeouts ~~~~"); - MUTEX_ACQUIRE(); - struct timeval now; - struct ril_event * tev = timer_list.next; - struct ril_event * next; - - getNow(&now); - // walk list, see if now >= ev->timeout for any events - - dlog("~~~~ Looking for timers <= %ds + %dus ~~~~", (int)now.tv_sec, (int)now.tv_usec); - while ((tev != &timer_list) && (timercmp(&now, &tev->timeout, >))) { - // Timer expired - dlog("~~~~ firing timer ~~~~"); - next = tev->next; - removeFromList(tev); - addToList(tev, &pending_list); - tev = next; - } - MUTEX_RELEASE(); - dlog("~~~~ -processTimeouts ~~~~"); -} - -static void processReadReadies(fd_set * rfds, int n) -{ - dlog("~~~~ +processReadReadies (%d) ~~~~", n); - MUTEX_ACQUIRE(); - - for (int i = 0; (i < MAX_FD_EVENTS) && (n > 0); i++) { - struct ril_event * rev = watch_table[i]; - if (rev != NULL && FD_ISSET(rev->fd, rfds)) { - addToList(rev, &pending_list); - if (rev->persist == false) { - removeWatch(rev, i); - } - n--; - } - } - - MUTEX_RELEASE(); - dlog("~~~~ -processReadReadies (%d) ~~~~", n); -} - -static void firePending() -{ - dlog("~~~~ +firePending ~~~~"); - struct ril_event * ev = pending_list.next; - while (ev != &pending_list) { - struct ril_event * next = ev->next; - removeFromList(ev); - ev->func(ev->fd, 0, ev->param); - ev = next; - } - dlog("~~~~ -firePending ~~~~"); -} - -static int calcNextTimeout(struct timeval * tv) -{ - struct ril_event * tev = timer_list.next; - struct timeval now; - - getNow(&now); - - // Sorted list, so calc based on first node - if (tev == &timer_list) { - // no pending timers - return -1; - } - - dlog("~~~~ now = %ds + %dus ~~~~", (int)now.tv_sec, (int)now.tv_usec); - dlog("~~~~ next = %ds + %dus ~~~~", - (int)tev->timeout.tv_sec, (int)tev->timeout.tv_usec); - if (timercmp(&tev->timeout, &now, >)) { - timersub(&tev->timeout, &now, tv); - } else { - // timer already expired. - tv->tv_sec = tv->tv_usec = 0; - } - return 0; -} - -// Initialize internal data structs -void ril_event_init() -{ - MUTEX_INIT(); - - FD_ZERO(&readFds); - init_list(&timer_list); - init_list(&pending_list); - memset(watch_table, 0, sizeof(watch_table)); -} - -// Initialize an event -void ril_event_set(struct ril_event * ev, int fd, bool persist, ril_event_cb func, void * param) -{ - dlog("~~~~ ril_event_set %x ~~~~", (unsigned int)ev); - memset(ev, 0, sizeof(struct ril_event)); - ev->fd = fd; - ev->index = -1; - ev->persist = persist; - ev->func = func; - ev->param = param; - fcntl(fd, F_SETFL, O_NONBLOCK); -} - -// Add event to watch list -void ril_event_add(struct ril_event * ev) -{ - dlog("~~~~ +ril_event_add ~~~~"); - MUTEX_ACQUIRE(); - for (int i = 0; i < MAX_FD_EVENTS; i++) { - if (watch_table[i] == NULL) { - watch_table[i] = ev; - ev->index = i; - dlog("~~~~ added at %d ~~~~", i); - dump_event(ev); - FD_SET(ev->fd, &readFds); - if (ev->fd >= nfds) nfds = ev->fd+1; - dlog("~~~~ nfds = %d ~~~~", nfds); - break; - } - } - MUTEX_RELEASE(); - dlog("~~~~ -ril_event_add ~~~~"); -} - -// Add timer event -void ril_timer_add(struct ril_event * ev, struct timeval * tv) -{ - dlog("~~~~ +ril_timer_add ~~~~"); - MUTEX_ACQUIRE(); - - struct ril_event * list; - if (tv != NULL) { - // add to timer list - list = timer_list.next; - ev->fd = -1; // make sure fd is invalid - - struct timeval now; - getNow(&now); - timeradd(&now, tv, &ev->timeout); - - // keep list sorted - while (timercmp(&list->timeout, &ev->timeout, < ) - && (list != &timer_list)) { - list = list->next; - } - // list now points to the first event older than ev - addToList(ev, list); - } - - MUTEX_RELEASE(); - dlog("~~~~ -ril_timer_add ~~~~"); -} - -// Remove event from watch or timer list -void ril_event_del(struct ril_event * ev) -{ - dlog("~~~~ +ril_event_del ~~~~"); - MUTEX_ACQUIRE(); - - if (ev->index < 0 || ev->index >= MAX_FD_EVENTS) { - MUTEX_RELEASE(); - return; - } - - removeWatch(ev, ev->index); - - MUTEX_RELEASE(); - dlog("~~~~ -ril_event_del ~~~~"); -} - -#if DEBUG -static void printReadies(fd_set * rfds) -{ - for (int i = 0; (i < MAX_FD_EVENTS); i++) { - struct ril_event * rev = watch_table[i]; - if (rev != NULL && FD_ISSET(rev->fd, rfds)) { - dlog("DON: fd=%d is ready", rev->fd); - } - } -} -#else -#define printReadies(rfds) do {} while(0) -#endif - -void ril_event_loop() -{ - int n; - fd_set rfds; - struct timeval tv; - struct timeval * ptv; - - - for (;;) { - - // make local copy of read fd_set - memcpy(&rfds, &readFds, sizeof(fd_set)); - if (-1 == calcNextTimeout(&tv)) { - // no pending timers; block indefinitely - dlog("~~~~ no timers; blocking indefinitely ~~~~"); - ptv = NULL; - } else { - dlog("~~~~ blocking for %ds + %dus ~~~~", (int)tv.tv_sec, (int)tv.tv_usec); - ptv = &tv; - } - printReadies(&rfds); - n = select(nfds, &rfds, NULL, NULL, ptv); - printReadies(&rfds); - dlog("~~~~ %d events fired ~~~~", n); - if (n < 0) { - if (errno == EINTR) continue; - - RLOGE("ril_event: select error (%d)", errno); - // bail? - return; - } - - // Check for timeouts - processTimeouts(); - // Check for read-ready - processReadReadies(&rfds, n); - // Fire away - firePending(); - } -} diff --git a/libril/ril_event.h b/libril/ril_event.h deleted file mode 100644 index 7ba231b..0000000 --- a/libril/ril_event.h +++ /dev/null @@ -1,52 +0,0 @@ -/* //device/libs/telephony/ril_event.h -** -** Copyright 2008, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -// Max number of fd's we watch at any one time. Increase if necessary. -#define MAX_FD_EVENTS 8 - -typedef void (*ril_event_cb)(int fd, short events, void *userdata); - -struct ril_event { - struct ril_event *next; - struct ril_event *prev; - - int fd; - int index; - bool persist; - struct timeval timeout; - ril_event_cb func; - void *param; -}; - -// Initialize internal data structs -void ril_event_init(); - -// Initialize an event -void ril_event_set(struct ril_event * ev, int fd, bool persist, ril_event_cb func, void * param); - -// Add event to watch list -void ril_event_add(struct ril_event * ev); - -// Add timer event -void ril_timer_add(struct ril_event * ev, struct timeval * tv); - -// Remove event from watch list -void ril_event_del(struct ril_event * ev); - -// Event loop -void ril_event_loop(); - diff --git a/libril/ril_unsol_commands.h b/libril/ril_unsol_commands.h deleted file mode 100755 index 259bd85..0000000 --- a/libril/ril_unsol_commands.h +++ /dev/null @@ -1,59 +0,0 @@ -/* //device/libs/telephony/ril_unsol_commands.h -** -** Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. -** Not a Contribution -** Copyright 2006, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - {RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_NEW_SMS, responseString, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT, responseString, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_ON_USSD, responseStrings, WAKE_PARTIAL}, - {RIL_UNSOL_ON_USSD_REQUEST, responseVoid, DONT_WAKE}, - {RIL_UNSOL_NITZ_TIME_RECEIVED, responseString, WAKE_PARTIAL}, - {RIL_UNSOL_SIGNAL_STRENGTH, responseRilSignalStrength, DONT_WAKE}, - {RIL_UNSOL_DATA_CALL_LIST_CHANGED, responseDataCallList, WAKE_PARTIAL}, - {RIL_UNSOL_SUPP_SVC_NOTIFICATION, responseSsn, WAKE_PARTIAL}, - {RIL_UNSOL_STK_SESSION_END, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_STK_PROACTIVE_COMMAND, responseString, WAKE_PARTIAL}, - {RIL_UNSOL_STK_EVENT_NOTIFY, responseString, WAKE_PARTIAL}, - {RIL_UNSOL_STK_CALL_SETUP, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_SIM_SMS_STORAGE_FULL, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_SIM_REFRESH, responseSimRefresh, WAKE_PARTIAL}, - {RIL_UNSOL_CALL_RING, responseCallRing, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_CDMA_NEW_SMS, responseCdmaSms, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS, responseRaw, WAKE_PARTIAL}, - {RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_RESTRICTED_STATE_CHANGED, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_CDMA_CALL_WAITING, responseCdmaCallWaiting, WAKE_PARTIAL}, - {RIL_UNSOL_CDMA_OTA_PROVISION_STATUS, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_CDMA_INFO_REC, responseCdmaInformationRecords, WAKE_PARTIAL}, - {RIL_UNSOL_OEM_HOOK_RAW, responseRaw, WAKE_PARTIAL}, - {RIL_UNSOL_RINGBACK_TONE, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_RESEND_INCALL_MUTE, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_CDMA_PRL_CHANGED, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_RIL_CONNECTED, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, responseInts, WAKE_PARTIAL}, - {RIL_UNSOL_CELL_INFO_LIST, responseCellInfoList, WAKE_PARTIAL}, - {RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED, responseVoid, WAKE_PARTIAL}, - {RIL_UNSOL_ON_SS, responseSSData, WAKE_PARTIAL}, - {RIL_UNSOL_STK_CC_ALPHA_NOTIFY, responseString, WAKE_PARTIAL}, - {RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED, responseInts, WAKE_PARTIAL} diff --git a/libril/telephony/librilutils.h b/libril/telephony/librilutils.h deleted file mode 100644 index d06b3e9..0000000 --- a/libril/telephony/librilutils.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef LIBRILUTILS_H -#define LIBRILUTILS_H - -#include <stdint.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Return system time in nanos. - * - * This is a monotonicly increasing clock and - * return the same value as System.nanoTime in java. - */ -uint64_t ril_nano_time(); - -#ifdef __cplusplus -} -#endif - -#endif // LIBRILUTILS_H diff --git a/libril/telephony/record_stream.h b/libril/telephony/record_stream.h deleted file mode 100644 index 7a89ae4..0000000 --- a/libril/telephony/record_stream.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * A simple utility for reading fixed records out of a stream fd - */ - -#ifndef _LIBRIL_RECORD_STREAM_H -#define _LIBRIL_RECORD_STREAM_H - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef struct RecordStream RecordStream; - -extern RecordStream *record_stream_new(int fd, size_t maxRecordLen); -extern void record_stream_free(RecordStream *p_rs); - -extern int record_stream_get_next (RecordStream *p_rs, void ** p_outRecord, - size_t *p_outRecordLen); - -#ifdef __cplusplus -} -#endif - - -#endif /*_LIBRIL_RECORD_STREAM_H*/ - diff --git a/libril/telephony/ril.h b/libril/telephony/ril.h deleted file mode 100644 index 8999925..0000000 --- a/libril/telephony/ril.h +++ /dev/null @@ -1,4513 +0,0 @@ -/* - * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * Not a Contribution - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_RIL_H -#define ANDROID_RIL_H 1 - -#include <stdlib.h> -#include <stdint.h> -#include <telephony/ril_cdma_sms.h> -#include <telephony/ril_msim.h> -#ifndef FEATURE_UNIT_TEST -#include <sys/time.h> -#endif /* !FEATURE_UNIT_TEST */ - -#ifdef __cplusplus -extern "C" { -#endif - -#define RIL_VERSION 9 /* Current version */ -#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ - -#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 -#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 - -#define MAX_RILDS 3 -#define MAX_SOCKET_NAME_LENGTH 6 -#define MAX_CLIENT_ID_LENGTH 2 -#define MAX_DEBUG_SOCKET_NAME_LENGTH 12 -#define MAX_QEMU_PIPE_NAME_LENGTH 11 - -typedef void * RIL_Token; - -typedef enum { - RIL_E_SUCCESS = 0, - RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */ - RIL_E_GENERIC_FAILURE = 2, - RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */ - RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */ - RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */ - RIL_E_REQUEST_NOT_SUPPORTED = 6, - RIL_E_CANCELLED = 7, - RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice - call on a Class C GPRS device */ - RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device - registers in network */ - RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */ - RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription - shall be retrieved because of SIM or RUIM - card absent */ - RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified - location */ - RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */ - RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */ - RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to - illegal SIM or ME */ - RIL_E_UNUSED = 16, - RIL_E_DIAL_MODIFIED_TO_USSD = 17, /* DIAL request modified to USSD */ - RIL_E_DIAL_MODIFIED_TO_SS = 18, /* DIAL request modified to SS */ - RIL_E_DIAL_MODIFIED_TO_DIAL = 19, /* DIAL request modified to DIAL with different data */ - RIL_E_USSD_MODIFIED_TO_DIAL = 20, /* USSD request modified to DIAL */ - RIL_E_USSD_MODIFIED_TO_SS = 21, /* USSD request modified to SS */ - RIL_E_USSD_MODIFIED_TO_USSD = 22, /* USSD request modified to different USSD request */ - RIL_E_SS_MODIFIED_TO_DIAL = 23, /* SS request modified to DIAL */ - RIL_E_SS_MODIFIED_TO_USSD = 24, /* SS request modified to USSD */ - RIL_E_SS_MODIFIED_TO_SS = 25, /* SS request modified to different SS request */ - RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26 /* Subscription not supported by RIL */ -} RIL_Errno; - -typedef enum { - RIL_CALL_ACTIVE = 0, - RIL_CALL_HOLDING = 1, - RIL_CALL_DIALING = 2, /* MO call only */ - RIL_CALL_ALERTING = 3, /* MO call only */ - RIL_CALL_INCOMING = 4, /* MT call only */ - RIL_CALL_WAITING = 5 /* MT call only */ -} RIL_CallState; - -typedef enum { - RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ - RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ - /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */ - RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */ - RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network - personalization locked, or SIM absent */ - RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */ - RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */ - RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */ - RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network - personalization locked, or RUIM absent */ - RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */ - RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */ - RADIO_STATE_ON = 10 /* Radio is on */ -} RIL_RadioState; - -typedef enum { - RADIO_TECH_UNKNOWN = 0, - RADIO_TECH_GPRS = 1, - RADIO_TECH_EDGE = 2, - RADIO_TECH_UMTS = 3, - RADIO_TECH_IS95A = 4, - RADIO_TECH_IS95B = 5, - RADIO_TECH_1xRTT = 6, - RADIO_TECH_EVDO_0 = 7, - RADIO_TECH_EVDO_A = 8, - RADIO_TECH_HSDPA = 9, - RADIO_TECH_HSUPA = 10, - RADIO_TECH_HSPA = 11, - RADIO_TECH_EVDO_B = 12, - RADIO_TECH_EHRPD = 13, - RADIO_TECH_LTE = 14, - RADIO_TECH_HSPAP = 15, // HSPA+ - RADIO_TECH_GSM = 16 // Only supports voice -} RIL_RadioTechnology; - -// Do we want to split Data from Voice and the use -// RIL_RadioTechnology for get/setPreferredVoice/Data ? -typedef enum { - PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */ - PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */ - PREF_NET_TYPE_WCDMA = 2, /* WCDMA */ - PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */ - PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */ - PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */ - PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */ - PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */ - PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */ - PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */ - PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */ - PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */ - PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */ -} RIL_PreferredNetworkType; - -/* Source for cdma subscription */ -typedef enum { - CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0, - CDMA_SUBSCRIPTION_SOURCE_NV = 1 -} RIL_CdmaSubscriptionSource; - -/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ -typedef enum { - RIL_UUS_TYPE1_IMPLICIT = 0, - RIL_UUS_TYPE1_REQUIRED = 1, - RIL_UUS_TYPE1_NOT_REQUIRED = 2, - RIL_UUS_TYPE2_REQUIRED = 3, - RIL_UUS_TYPE2_NOT_REQUIRED = 4, - RIL_UUS_TYPE3_REQUIRED = 5, - RIL_UUS_TYPE3_NOT_REQUIRED = 6 -} RIL_UUS_Type; - -/* User-to-User Signaling Information data coding schemes. Possible values for - * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been - * specified in section 10.5.4.25 of 3GPP TS 24.008 */ -typedef enum { - RIL_UUS_DCS_USP = 0, /* User specified protocol */ - RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */ - RIL_UUS_DCS_X244 = 2, /* X.244 */ - RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement - convergence function */ - RIL_UUS_DCS_IA5c = 4 /* IA5 characters */ -} RIL_UUS_DCS; - -/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 - * This data is passed in RIL_ExtensionRecord and rec contains this - * structure when type is RIL_UUS_INFO_EXT_REC */ -typedef struct { - RIL_UUS_Type uusType; /* UUS Type */ - RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */ - int uusLength; /* Length of UUS Data */ - char * uusData; /* UUS Data */ -} RIL_UUS_Info; - -/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */ -typedef struct { - char isPresent; /* non-zero if signal information record is present */ - char signalType; /* as defined 3.7.5.5-1 */ - char alertPitch; /* as defined 3.7.5.5-2 */ - char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */ -} RIL_CDMA_SignalInfoRecord; - -typedef struct { - RIL_CallState state; - int index; /* Connection Index for use with, eg, AT+CHLD */ - int toa; /* type of address, eg 145 = intl */ - char isMpty; /* nonzero if is mpty call */ - char isMT; /* nonzero if call is mobile terminated */ - char als; /* ALS line indicator if available - (0 = line 1) */ - char isVoice; /* nonzero if this is is a voice call */ - char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */ - char * number; /* Remote party number */ - int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ - char * name; /* Remote party name */ - int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ - RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ -} RIL_Call; - -/* Deprecated, use RIL_Data_Call_Response_v6 */ -typedef struct { - int cid; /* Context ID, uniquely identifies this call */ - int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ - char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. - For example, "IP", "IPV6", "IPV4V6", or "PPP". */ - char * apn; /* ignored */ - char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */ -} RIL_Data_Call_Response_v4; - -/* - * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST - * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0. - */ -typedef struct { - int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ - int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry - back-off timer value RIL wants to override the one - pre-configured in FW. - The unit is miliseconds. - The value < 0 means no value is suggested. - The value 0 means retry should be done ASAP. - The value of INT_MAX(0x7fffffff) means no retry. */ - int cid; /* Context ID, uniquely identifies this call */ - int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ - char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. - For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is - PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported - such as "IP" or "IPV6" */ - char * ifname; /* The network interface name */ - char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, - e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". - May not be empty, typically 1 IPv4 or 1 IPv6 or - one of each. If the prefix length is absent the addresses - are assumed to be point to point with IPv4 having a prefix - length of 32 and IPv6 128. */ - char * dnses; /* A space-delimited list of DNS server addresses, - e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". - May be empty. */ - char * gateways; /* A space-delimited list of default gateway addresses, - e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". - May be empty in which case the addresses represent point - to point connections. */ -} RIL_Data_Call_Response_v6; - -typedef enum { - RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */ - RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */ -} RIL_RadioTechnologyFamily; - -typedef struct { - RIL_RadioTechnologyFamily tech; - unsigned char retry; /* 0 == not retry, nonzero == retry */ - int messageRef; /* Valid field if retry is set to nonzero. - Contains messageRef from RIL_SMS_Response - corresponding to failed MO SMS. - */ - - union { - /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */ - RIL_CDMA_SMS_Message* cdmaMessage; - - /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */ - char** gsmMessage; - } message; -} RIL_IMS_SMS_Message; - -typedef struct { - int messageRef; /* TP-Message-Reference for GSM, - and BearerData MessageId for CDMA - (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */ - char *ackPDU; /* or NULL if n/a */ - int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS, - 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, - -1 if unknown or not applicable*/ -} RIL_SMS_Response; - -/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */ -typedef struct { - int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ - /* 0 = "REC UNREAD" */ - /* 1 = "REC READ" */ - /* 2 = "STO UNSENT" */ - /* 3 = "STO SENT" */ - char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address, - the TP-layer length is "strlen(pdu)/2". */ - char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte - (as expected by TS 27.005) or NULL for default SMSC */ -} RIL_SMS_WriteArgs; - -/** Used by RIL_REQUEST_DIAL */ -typedef struct { - char * address; - int clir; - /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR" - * clir == 0 on "use subscription default value" - * clir == 1 on "CLIR invocation" (restrict CLI presentation) - * clir == 2 on "CLIR suppression" (allow CLI presentation) - */ - RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ -} RIL_Dial; - -typedef struct { - int command; /* one of the commands listed for TS 27.007 +CRSM*/ - int fileid; /* EF id */ - char *path; /* "pathid" from TS 27.007 +CRSM command. - Path is in hex asciii format eg "7f205f70" - Path must always be provided. - */ - int p1; - int p2; - int p3; - char *data; /* May be NULL*/ - char *pin2; /* May be NULL*/ -} RIL_SIM_IO_v5; - -typedef struct { - int command; /* one of the commands listed for TS 27.007 +CRSM*/ - int fileid; /* EF id */ - char *path; /* "pathid" from TS 27.007 +CRSM command. - Path is in hex asciii format eg "7f205f70" - Path must always be provided. - */ - int p1; - int p2; - int p3; - char *data; /* May be NULL*/ - char *pin2; /* May be NULL*/ - char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */ -} RIL_SIM_IO_v6; - -typedef struct { - int sw1; - int sw2; - char *simResponse; /* In hex string format ([a-fA-F0-9]*). */ -} RIL_SIM_IO_Response; - -/* See also com.android.internal.telephony.gsm.CallForwardInfo */ - -typedef struct { - int status; /* - * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS - * status 1 = active, 0 = not active - * - * For RIL_REQUEST_SET_CALL_FORWARD: - * status is: - * 0 = disable - * 1 = enable - * 2 = interrogate - * 3 = registeration - * 4 = erasure - */ - - int reason; /* from TS 27.007 7.11 "reason" */ - int serviceClass;/* From 27.007 +CCFC/+CLCK "class" - See table for Android mapping from - MMI service code - 0 means user doesn't input class */ - int toa; /* "type" from TS 27.007 7.11 */ - char * number; /* "number" from TS 27.007 7.11. May be NULL */ - int timeSeconds; /* for CF no reply only */ -}RIL_CallForwardInfo; - -typedef struct { - char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM. - * Upper 16 bits is LAC and lower 16 bits - * is CID (as described in TS 27.005) - * Primary Scrambling Code (as described in TS 25.331) - * in 9 bits in UMTS - * Valid values are hexadecimal 0x0000 - 0xffffffff. - */ - int rssi; /* Received RSSI in GSM, - * Level index of CPICH Received Signal Code Power in UMTS - */ -} RIL_NeighboringCell; - -/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */ -typedef enum { - CALL_FAIL_UNOBTAINABLE_NUMBER = 1, - CALL_FAIL_NORMAL = 16, - CALL_FAIL_BUSY = 17, - CALL_FAIL_CONGESTION = 34, - CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, - CALL_FAIL_CALL_BARRED = 240, - CALL_FAIL_FDN_BLOCKED = 241, - CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, - CALL_FAIL_IMEI_NOT_ACCEPTED = 243, - CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */ - CALL_FAIL_DIAL_MODIFIED_TO_SS = 245, - CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246, - CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, - CALL_FAIL_CDMA_DROP = 1001, - CALL_FAIL_CDMA_INTERCEPT = 1002, - CALL_FAIL_CDMA_REORDER = 1003, - CALL_FAIL_CDMA_SO_REJECT = 1004, - CALL_FAIL_CDMA_RETRY_ORDER = 1005, - CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, - CALL_FAIL_CDMA_PREEMPTED = 1007, - CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed - during emergency callback mode */ - CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ - CALL_FAIL_ERROR_UNSPECIFIED = 0xffff -} RIL_LastCallFailCause; - -/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ -typedef enum { - PDP_FAIL_NONE = 0, /* No error, connection ok */ - - /* an integer cause code defined in TS 24.008 - section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. - If the implementation does not have access to the exact cause codes, - then it should return one of the following values, - as the UI layer needs to distinguish these - cases for error notification and potential retries. */ - PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ - PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, - PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */ - PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ - PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ - PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ - PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, - PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ - PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ - PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, - PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ - PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* restart radio */ - PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ - PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ - PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, - PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ - - /* Not mentioned in the specification */ - PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, - PDP_FAIL_DATA_REGISTRATION_FAIL = -2, - - /* reasons for data call drop - network/modem disconnect */ - PDP_FAIL_SIGNAL_LOST = -3, - PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry - with parameters appropriate for new technology */ - PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, - powered off - no retry */ - PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered - mode was up on same APN/data profile - no retry until - tethered call is off */ - - PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */ -} RIL_DataCallFailCause; - -/* See RIL_REQUEST_SETUP_DATA_CALL */ -typedef enum { - RIL_DATA_PROFILE_DEFAULT = 0, - RIL_DATA_PROFILE_TETHERED = 1, - RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */ -} RIL_DataProfile; - -/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */ -typedef struct { - int notificationType; /* - * 0 = MO intermediate result code - * 1 = MT unsolicited result code - */ - int code; /* See 27.007 7.17 - "code1" for MO - "code2" for MT. */ - int index; /* CUG index. See 27.007 7.17. */ - int type; /* "type" from 27.007 7.17 (MT only). */ - char * number; /* "number" from 27.007 7.17 - (MT only, may be NULL). */ -} RIL_SuppSvcNotification; - -#define RIL_CARD_MAX_APPS 8 - -typedef enum { - RIL_CARDSTATE_ABSENT = 0, - RIL_CARDSTATE_PRESENT = 1, - RIL_CARDSTATE_ERROR = 2 -} RIL_CardState; - -typedef enum { - RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ - RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ - RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished - since each app can only have 1 active perso - involved */ - RIL_PERSOSUBSTATE_SIM_NETWORK = 3, - RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, - RIL_PERSOSUBSTATE_SIM_CORPORATE = 5, - RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6, - RIL_PERSOSUBSTATE_SIM_SIM = 7, - RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */ - RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9, - RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10, - RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11, - RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12, - RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13, - RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14, - RIL_PERSOSUBSTATE_RUIM_HRPD = 15, - RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16, - RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17, - RIL_PERSOSUBSTATE_RUIM_RUIM = 18, - RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */ - RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20, - RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21, - RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22, - RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23, - RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24 -} RIL_PersoSubstate; - -typedef enum { - RIL_APPSTATE_UNKNOWN = 0, - RIL_APPSTATE_DETECTED = 1, - RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ - RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ - RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at - when app_state is assigned to this value */ - RIL_APPSTATE_READY = 5 -} RIL_AppState; - -typedef enum { - RIL_PINSTATE_UNKNOWN = 0, - RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1, - RIL_PINSTATE_ENABLED_VERIFIED = 2, - RIL_PINSTATE_DISABLED = 3, - RIL_PINSTATE_ENABLED_BLOCKED = 4, - RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5 -} RIL_PinState; - -typedef enum { - RIL_APPTYPE_UNKNOWN = 0, - RIL_APPTYPE_SIM = 1, - RIL_APPTYPE_USIM = 2, - RIL_APPTYPE_RUIM = 3, - RIL_APPTYPE_CSIM = 4, - RIL_APPTYPE_ISIM = 5 -} RIL_AppType; - -typedef struct -{ - RIL_AppType app_type; - RIL_AppState app_state; - RIL_PersoSubstate perso_substate; /* applicable only if app_state == - RIL_APPSTATE_SUBSCRIPTION_PERSO */ - char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, - 0x30, 0x30, 0x30 */ - char *app_label_ptr; /* null terminated string */ - int pin1_replaced; /* applicable to USIM, CSIM & ISIM */ - RIL_PinState pin1; - RIL_PinState pin2; -} RIL_AppStatus; - -/* Deprecated, use RIL_CardStatus_v6 */ -typedef struct -{ - RIL_CardState card_state; - RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ - int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ - int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ - int num_applications; /* value <= RIL_CARD_MAX_APPS */ - RIL_AppStatus applications[RIL_CARD_MAX_APPS]; -} RIL_CardStatus_v5; - -typedef struct -{ - RIL_CardState card_state; - RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ - int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ - int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ - int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ - int num_applications; /* value <= RIL_CARD_MAX_APPS */ - RIL_AppStatus applications[RIL_CARD_MAX_APPS]; -} RIL_CardStatus_v6; - -/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH - * or as part of RIL_SimRefreshResponse_v7 - */ -typedef enum { - /* A file on SIM has been updated. data[1] contains the EFID. */ - SIM_FILE_UPDATE = 0, - /* SIM initialized. All files should be re-read. */ - SIM_INIT = 1, - /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ - SIM_RESET = 2 -} RIL_SimRefreshResult; - -typedef struct { - RIL_SimRefreshResult result; - int ef_id; /* is the EFID of the updated file if the result is */ - /* SIM_FILE_UPDATE or 0 for any other result. */ - char * aid; /* is AID(application ID) of the card application */ - /* See ETSI 102.221 8.1 and 101.220 4 */ - /* For SIM_FILE_UPDATE result it can be set to AID of */ - /* application in which updated EF resides or it can be */ - /* NULL if EF is outside of an application. */ - /* For SIM_INIT result this field is set to AID of */ - /* application that caused REFRESH */ - /* For SIM_RESET result it is NULL. */ -} RIL_SimRefreshResponse_v7; - -/* Deprecated, use RIL_CDMA_CallWaiting_v6 */ -typedef struct { - char * number; /* Remote party number */ - int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ - char * name; /* Remote party name */ - RIL_CDMA_SignalInfoRecord signalInfoRecord; -} RIL_CDMA_CallWaiting_v5; - -typedef struct { - char * number; /* Remote party number */ - int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ - char * name; /* Remote party name */ - RIL_CDMA_SignalInfoRecord signalInfoRecord; - /* Number type/Number plan required to support International Call Waiting */ - int number_type; /* 0=Unknown, 1=International, 2=National, - 3=Network specific, 4=subscriber */ - int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */ -} RIL_CDMA_CallWaiting_v6; - -/** - * Which types of Cell Broadcast Message (CBM) are to be received by the ME - * - * uFromServiceID - uToServiceID defines a range of CBM message identifiers - * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS - * and 9.4.4.2.2 for UMTS. All other values can be treated as empty - * CBM message ID. - * - * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes - * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS - * and 9.4.4.2.3 for UMTS. - * All other values can be treated as empty CBM data coding scheme. - * - * selected 0 means message types specified in <fromServiceId, toServiceId> - * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted. - * - * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and - * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG. - */ -typedef struct { - int fromServiceId; - int toServiceId; - int fromCodeScheme; - int toCodeScheme; - unsigned char selected; -} RIL_GSM_BroadcastSmsConfigInfo; - -/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */ -#define RIL_RESTRICTED_STATE_NONE 0x00 -/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */ -#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01 -/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */ -#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02 -/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/ -#define RIL_RESTRICTED_STATE_CS_ALL 0x04 -/* Block packet data access due to restriction. */ -#define RIL_RESTRICTED_STATE_PS_ALL 0x10 - -/* The status for an OTASP/OTAPA session */ -typedef enum { - CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, - CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, - CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, - CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, - CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, - CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, - CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, - CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, - CDMA_OTA_PROVISION_STATUS_COMMITTED, - CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, - CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, - CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED -} RIL_CDMA_OTA_ProvisionStatus; - -typedef struct { - int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ - int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ -} RIL_GW_SignalStrength; - -typedef struct { - int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ - int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ -} RIL_SignalStrengthWcdma; - -typedef struct { - int dbm; /* Valid values are positive integers. This value is the actual RSSI value - * multiplied by -1. Example: If the actual RSSI is -75, then this response - * value will be 75. - */ - int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied - * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value - * will be 125. - */ -} RIL_CDMA_SignalStrength; - - -typedef struct { - int dbm; /* Valid values are positive integers. This value is the actual RSSI value - * multiplied by -1. Example: If the actual RSSI is -75, then this response - * value will be 75. - */ - int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied - * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value - * will be 125. - */ - int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */ -} RIL_EVDO_SignalStrength; - -typedef struct { - int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ - int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. - * Range: 44 to 140 dBm - * INT_MAX: 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP TS 36.133 9.1.4 */ - int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. - * Range: 20 to 3 dB. - * INT_MAX: 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP TS 36.133 9.1.7 */ - int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. - * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). - * INT_MAX : 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP TS 36.101 8.1.1 */ - int cqi; /* The current Channel Quality Indicator. - * Range: 0 to 15. - * INT_MAX : 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ -} RIL_LTE_SignalStrength; - -typedef struct { - int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ - int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. - * Range: 44 to 140 dBm - * INT_MAX: 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP TS 36.133 9.1.4 */ - int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. - * Range: 20 to 3 dB. - * INT_MAX: 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP TS 36.133 9.1.7 */ - int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. - * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). - * INT_MAX : 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP TS 36.101 8.1.1 */ - int cqi; /* The current Channel Quality Indicator. - * Range: 0 to 15. - * INT_MAX : 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ - int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device. - * Approximate distance can be calculated using 300m/us * timingAdvance. - * Range: 0 to 0x7FFFFFFE - * INT_MAX : 0x7FFFFFFF denotes invalid value. - * Reference: 3GPP 36.321 section 6.1.3.5 - * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */ -} RIL_LTE_SignalStrength_v8; - -/* Deprecated, use RIL_SignalStrength_v6 */ -typedef struct { - RIL_GW_SignalStrength GW_SignalStrength; - RIL_CDMA_SignalStrength CDMA_SignalStrength; - RIL_EVDO_SignalStrength EVDO_SignalStrength; -} RIL_SignalStrength_v5; - -typedef struct { - RIL_GW_SignalStrength GW_SignalStrength; - RIL_CDMA_SignalStrength CDMA_SignalStrength; - RIL_EVDO_SignalStrength EVDO_SignalStrength; - RIL_LTE_SignalStrength LTE_SignalStrength; -} RIL_SignalStrength_v6; - -typedef struct { - RIL_GW_SignalStrength GW_SignalStrength; - RIL_CDMA_SignalStrength CDMA_SignalStrength; - RIL_EVDO_SignalStrength EVDO_SignalStrength; - RIL_LTE_SignalStrength_v8 LTE_SignalStrength; -} RIL_SignalStrength_v8; - -/** RIL_CellIdentityGsm */ -typedef struct { - int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ - int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ - int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ - int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ -} RIL_CellIdentityGsm; - -/** RIL_CellIdentityWcdma */ -typedef struct { - int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ - int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ - int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ - int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ - int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */ -} RIL_CellIdentityWcdma; - -/** RIL_CellIdentityCdma */ -typedef struct { - int networkId; /* Network Id 0..65535, INT_MAX if unknown */ - int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */ - int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */ - int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. - * It is represented in units of 0.25 seconds and ranges from -2592000 - * to 2592000, both values inclusive (corresponding to a range of -180 - * to +180 degrees). INT_MAX if unknown */ - - int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. - * It is represented in units of 0.25 seconds and ranges from -1296000 - * to 1296000, both values inclusive (corresponding to a range of -90 - * to +90 degrees). INT_MAX if unknown */ -} RIL_CellIdentityCdma; - -/** RIL_CellIdentityLte */ -typedef struct { - int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ - int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ - int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ - int pci; /* physical cell id 0..503, INT_MAX if unknown */ - int tac; /* 16-bit tracking area code, INT_MAX if unknown */ -} RIL_CellIdentityLte; - -/** RIL_CellInfoGsm */ -typedef struct { - RIL_CellIdentityGsm cellIdentityGsm; - RIL_GW_SignalStrength signalStrengthGsm; -} RIL_CellInfoGsm; - -/** RIL_CellInfoWcdma */ -typedef struct { - RIL_CellIdentityWcdma cellIdentityWcdma; - RIL_SignalStrengthWcdma signalStrengthWcdma; -} RIL_CellInfoWcdma; - -/** RIL_CellInfoCdma */ -typedef struct { - RIL_CellIdentityCdma cellIdentityCdma; - RIL_CDMA_SignalStrength signalStrengthCdma; - RIL_EVDO_SignalStrength signalStrengthEvdo; -} RIL_CellInfoCdma; - -/** RIL_CellInfoLte */ -typedef struct { - RIL_CellIdentityLte cellIdentityLte; - RIL_LTE_SignalStrength_v8 signalStrengthLte; -} RIL_CellInfoLte; - -// Must be the same as CellInfo.TYPE_XXX -typedef enum { - RIL_CELL_INFO_TYPE_GSM = 1, - RIL_CELL_INFO_TYPE_CDMA = 2, - RIL_CELL_INFO_TYPE_LTE = 3, - RIL_CELL_INFO_TYPE_WCDMA = 4, -} RIL_CellInfoType; - -// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX -typedef enum { - RIL_TIMESTAMP_TYPE_UNKNOWN = 0, - RIL_TIMESTAMP_TYPE_ANTENNA = 1, - RIL_TIMESTAMP_TYPE_MODEM = 2, - RIL_TIMESTAMP_TYPE_OEM_RIL = 3, - RIL_TIMESTAMP_TYPE_JAVA_RIL = 4, -} RIL_TimeStampType; - -typedef struct { - RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ - int registered; /* !0 if this cell is registered 0 if not registered */ - RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ - uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ - union { - RIL_CellInfoGsm gsm; - RIL_CellInfoCdma cdma; - RIL_CellInfoLte lte; - RIL_CellInfoWcdma wcdma; - } CellInfo; -} RIL_CellInfo; - -/* Names of the CDMA info records (C.S0005 section 3.7.5) */ -typedef enum { - RIL_CDMA_DISPLAY_INFO_REC, - RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC, - RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC, - RIL_CDMA_CONNECTED_NUMBER_INFO_REC, - RIL_CDMA_SIGNAL_INFO_REC, - RIL_CDMA_REDIRECTING_NUMBER_INFO_REC, - RIL_CDMA_LINE_CONTROL_INFO_REC, - RIL_CDMA_EXTENDED_DISPLAY_INFO_REC, - RIL_CDMA_T53_CLIR_INFO_REC, - RIL_CDMA_T53_RELEASE_INFO_REC, - RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC -} RIL_CDMA_InfoRecName; - -/* Display Info Rec as defined in C.S0005 section 3.7.5.1 - Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 - Note: the Extended Display info rec contains multiple records of the - form: display_tag, display_len, and display_len occurrences of the - chari field if the display_tag is not 10000000 or 10000001. - To save space, the records are stored consecutively in a byte buffer. - The display_tag, display_len and chari fields are all 1 byte. -*/ - -typedef struct { - char alpha_len; - char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH]; -} RIL_CDMA_DisplayInfoRecord; - -/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 - Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 - Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 -*/ - -typedef struct { - char len; - char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH]; - char number_type; - char number_plan; - char pi; - char si; -} RIL_CDMA_NumberInfoRecord; - -/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ -typedef enum { - RIL_REDIRECTING_REASON_UNKNOWN = 0, - RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1, - RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2, - RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9, - RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10, - RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15, - RIL_REDIRECTING_REASON_RESERVED -} RIL_CDMA_RedirectingReason; - -typedef struct { - RIL_CDMA_NumberInfoRecord redirectingNumber; - /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */ - RIL_CDMA_RedirectingReason redirectingReason; -} RIL_CDMA_RedirectingNumberInfoRecord; - -/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ -typedef struct { - char lineCtrlPolarityIncluded; - char lineCtrlToggle; - char lineCtrlReverse; - char lineCtrlPowerDenial; -} RIL_CDMA_LineControlInfoRecord; - -/* T53 CLIR Information Record */ -typedef struct { - char cause; -} RIL_CDMA_T53_CLIRInfoRecord; - -/* T53 Audio Control Information Record */ -typedef struct { - char upLink; - char downLink; -} RIL_CDMA_T53_AudioControlInfoRecord; - -typedef struct { - - RIL_CDMA_InfoRecName name; - - union { - /* Display and Extended Display Info Rec */ - RIL_CDMA_DisplayInfoRecord display; - - /* Called Party Number, Calling Party Number, Connected Number Info Rec */ - RIL_CDMA_NumberInfoRecord number; - - /* Signal Info Rec */ - RIL_CDMA_SignalInfoRecord signal; - - /* Redirecting Number Info Rec */ - RIL_CDMA_RedirectingNumberInfoRecord redir; - - /* Line Control Info Rec */ - RIL_CDMA_LineControlInfoRecord lineCtrl; - - /* T53 CLIR Info Rec */ - RIL_CDMA_T53_CLIRInfoRecord clir; - - /* T53 Audio Control Info Rec */ - RIL_CDMA_T53_AudioControlInfoRecord audioCtrl; - } rec; -} RIL_CDMA_InformationRecord; - -#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10 - -typedef struct { - char numberOfInfoRecs; - RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; -} RIL_CDMA_InformationRecords; - -/* Data Call Profile: Simple IP User Profile Parameters*/ -typedef struct { - int profileId; - int priority; /* priority. [0..255], 0 - highest */ -} RIL_DataCallProfileInfo; - -typedef enum { - SS_CFU, - SS_CF_BUSY, - SS_CF_NO_REPLY, - SS_CF_NOT_REACHABLE, - SS_CF_ALL, - SS_CF_ALL_CONDITIONAL, - SS_CLIP, - SS_CLIR, - SS_COLP, - SS_COLR, - SS_WAIT, - SS_BAOC, - SS_BAOIC, - SS_BAOIC_EXC_HOME, - SS_BAIC, - SS_BAIC_ROAMING, - SS_ALL_BARRING, - SS_OUTGOING_BARRING, - SS_INCOMING_BARRING -} RIL_SsServiceType; - -typedef enum { - SS_ACTIVATION, - SS_DEACTIVATION, - SS_INTERROGATION, - SS_REGISTRATION, - SS_ERASURE -} RIL_SsRequestType; - -typedef enum { - SS_ALL_TELE_AND_BEARER_SERVICES, - SS_ALL_TELESEVICES, - SS_TELEPHONY, - SS_ALL_DATA_TELESERVICES, - SS_SMS_SERVICES, - SS_ALL_TELESERVICES_EXCEPT_SMS -} RIL_SsTeleserviceType; - -#define SS_INFO_MAX 4 -#define NUM_SERVICE_CLASSES 7 - -typedef struct { - int numValidIndexes; /* This gives the number of valid values in cfInfo. - For example if voice is forwarded to one number and data - is forwarded to a different one then numValidIndexes will be - 2 indicating total number of valid values in cfInfo. - Similarly if all the services are forwarded to the same - number then the value of numValidIndexes will be 1. */ - - RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data - for SS request to query call - forward status. see - RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */ -} RIL_CfData; - -typedef struct { - RIL_SsServiceType serviceType; - RIL_SsRequestType requestType; - RIL_SsTeleserviceType teleserviceType; - int serviceClass; - RIL_Errno result; - - union { - int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET - RIL requests. E.g. RIL_REQUSET_GET_CLIR returns - two ints, so first two values of ssInfo[] will be - used for response if serviceType is SS_CLIR and - requestType is SS_INTERROGATION */ - - RIL_CfData cfData; - }; -} RIL_StkCcUnsolSsResponse; - -/** - * RIL_REQUEST_GET_SIM_STATUS - * - * Requests status of the SIM interface and the SIM card - * - * "data" is NULL - * - * "response" is const RIL_CardStatus_v6 * - * - * Valid errors: - * Must never fail - */ -#define RIL_REQUEST_GET_SIM_STATUS 1 - -/** - * RIL_REQUEST_ENTER_SIM_PIN - * - * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state - * - * "data" is const char ** - * ((const char **)data)[0] is PIN value - * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * - * "response" is int * - * ((int *)response)[0] is the number of retries remaining, or -1 if unknown - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * PASSWORD_INCORRECT - */ - -#define RIL_REQUEST_ENTER_SIM_PIN 2 - -/** - * RIL_REQUEST_ENTER_SIM_PUK - * - * Supplies SIM PUK and new PIN. - * - * "data" is const char ** - * ((const char **)data)[0] is PUK value - * ((const char **)data)[1] is new PIN value - * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * - * "response" is int * - * ((int *)response)[0] is the number of retries remaining, or -1 if unknown - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * PASSWORD_INCORRECT - * (PUK is invalid) - */ - -#define RIL_REQUEST_ENTER_SIM_PUK 3 - -/** - * RIL_REQUEST_ENTER_SIM_PIN2 - * - * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was - * returned as a a failure from a previous operation. - * - * "data" is const char ** - * ((const char **)data)[0] is PIN2 value - * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * - * "response" is int * - * ((int *)response)[0] is the number of retries remaining, or -1 if unknown - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * PASSWORD_INCORRECT - */ - -#define RIL_REQUEST_ENTER_SIM_PIN2 4 - -/** - * RIL_REQUEST_ENTER_SIM_PUK2 - * - * Supplies SIM PUK2 and new PIN2. - * - * "data" is const char ** - * ((const char **)data)[0] is PUK2 value - * ((const char **)data)[1] is new PIN2 value - * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * - * "response" is int * - * ((int *)response)[0] is the number of retries remaining, or -1 if unknown - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * PASSWORD_INCORRECT - * (PUK2 is invalid) - */ - -#define RIL_REQUEST_ENTER_SIM_PUK2 5 - -/** - * RIL_REQUEST_CHANGE_SIM_PIN - * - * Supplies old SIM PIN and new PIN. - * - * "data" is const char ** - * ((const char **)data)[0] is old PIN value - * ((const char **)data)[1] is new PIN value - * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * - * "response" is int * - * ((int *)response)[0] is the number of retries remaining, or -1 if unknown - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * PASSWORD_INCORRECT - * (old PIN is invalid) - * - */ - -#define RIL_REQUEST_CHANGE_SIM_PIN 6 - - -/** - * RIL_REQUEST_CHANGE_SIM_PIN2 - * - * Supplies old SIM PIN2 and new PIN2. - * - * "data" is const char ** - * ((const char **)data)[0] is old PIN2 value - * ((const char **)data)[1] is new PIN2 value - * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * - * "response" is int * - * ((int *)response)[0] is the number of retries remaining, or -1 if unknown - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * PASSWORD_INCORRECT - * (old PIN2 is invalid) - * - */ - -#define RIL_REQUEST_CHANGE_SIM_PIN2 7 - -/** - * RIL_REQUEST_ENTER_DEPERSONALIZATION_CODE - * - * Requests that personlization be deactivated - * - * "data" is const char ** - * ((const char **)(data))[0]] is personlization type - * ((const char **)(data))[1]] is depersonlization code - * - * "response" is int * - * ((int *)response)[0] is the number of retries remaining, or -1 if unknown - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * PASSWORD_INCORRECT - * (code is invalid) - */ - -#define RIL_REQUEST_ENTER_DEPERSONALIZATION_CODE 8 - -/** - * RIL_REQUEST_GET_CURRENT_CALLS - * - * Requests current call list - * - * "data" is NULL - * - * "response" must be a "const RIL_Call **" - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * (request will be made again in a few hundred msec) - */ - -#define RIL_REQUEST_GET_CURRENT_CALLS 9 - - -/** - * RIL_REQUEST_DIAL - * - * Initiate voice call - * - * "data" is const RIL_Dial * - * "response" is NULL - * - * This method is never used for supplementary service codes - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * DIAL_MODIFIED_TO_USSD - * DIAL_MODIFIED_TO_SS - * DIAL_MODIFIED_TO_DIAL - * GENERIC_FAILURE - */ -#define RIL_REQUEST_DIAL 10 - -/** - * RIL_REQUEST_GET_IMSI - * - * Get the SIM IMSI - * - * Only valid when radio state is "RADIO_STATE_ON" - * - * "data" is const char ** - * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * "response" is a const char * containing the IMSI - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_GET_IMSI 11 - -/** - * RIL_REQUEST_HANGUP - * - * Hang up a specific line (like AT+CHLD=1x) - * - * After this HANGUP request returns, RIL should show the connection is NOT - * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. - * - * "data" is an int * - * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_HANGUP 12 - -/** - * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND - * - * Hang up waiting or held (like AT+CHLD=0) - * - * After this HANGUP request returns, RIL should show the connection is NOT - * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13 - -/** - * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND - * - * Hang up waiting or held (like AT+CHLD=1) - * - * After this HANGUP request returns, RIL should show the connection is NOT - * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14 - -/** - * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE - * - * Switch waiting or holding call and active call (like AT+CHLD=2) - * - * State transitions should be is follows: - * - * If call 1 is waiting and call 2 is active, then if this re - * - * BEFORE AFTER - * Call 1 Call 2 Call 1 Call 2 - * ACTIVE HOLDING HOLDING ACTIVE - * ACTIVE WAITING HOLDING ACTIVE - * HOLDING WAITING HOLDING ACTIVE - * ACTIVE IDLE HOLDING IDLE - * IDLE IDLE IDLE IDLE - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15 -#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15 - -/** - * RIL_REQUEST_CONFERENCE - * - * Conference holding and active (like AT+CHLD=3) - - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ -#define RIL_REQUEST_CONFERENCE 16 - -/** - * RIL_REQUEST_UDUB - * - * Send UDUB (user determined used busy) to ringing or - * waiting call answer)(RIL_BasicRequest r); - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ -#define RIL_REQUEST_UDUB 17 - -/** - * RIL_REQUEST_LAST_CALL_FAIL_CAUSE - * - * Requests the failure cause code for the most recently terminated call - * - * "data" is NULL - * "response" is a "int *" - * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are - * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA - * failure reasons are derived from the possible call failure scenarios - * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard. - * - * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked - * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED) - * - * If the implementation does not have access to the exact cause codes, - * then it should return one of the values listed in RIL_LastCallFailCause, - * as the UI layer needs to distinguish these cases for tone generation or - * error notification. - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - */ -#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18 - -/** - * RIL_REQUEST_SIGNAL_STRENGTH - * - * Requests current signal strength and associated information - * - * Must succeed if radio is on. - * - * "data" is NULL - * - * "response" is a const RIL_SignalStrength * - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - */ -#define RIL_REQUEST_SIGNAL_STRENGTH 19 - -/** - * RIL_REQUEST_VOICE_REGISTRATION_STATE - * - * Request current registration state - * - * "data" is NULL - * "response" is a "char **" - * ((const char **)response)[0] is registration state 0-6, - * 0 - Not registered, MT is not currently searching - * a new operator to register - * 1 - Registered, home network - * 2 - Not registered, but MT is currently searching - * a new operator to register - * 3 - Registration denied - * 4 - Unknown - * 5 - Registered, roaming - * 10 - Same as 0, but indicates that emergency calls - * are enabled. - * 12 - Same as 2, but indicates that emergency calls - * are enabled. - * 13 - Same as 3, but indicates that emergency calls - * are enabled. - * 14 - Same as 4, but indicates that emergency calls - * are enabled. - * - * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or - * NULL if not.Valid LAC are 0x0000 - 0xffff - * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or - * NULL if not. - * Valid CID are 0x00000000 - 0xffffffff - * In GSM, CID is Cell ID (see TS 27.007) - * in 16 bits - * In UMTS, CID is UMTS Cell Identity - * (see TS 25.331) in 28 bits - * ((const char **)response)[3] indicates the available voice radio technology, - * valid values as defined by RIL_RadioTechnology. - * ((const char **)response)[4] is Base Station ID if registered on a CDMA - * system or NULL if not. Base Station ID in - * decimal format - * ((const char **)response)[5] is Base Station latitude if registered on a - * CDMA system or NULL if not. Base Station - * latitude is a decimal number as specified in - * 3GPP2 C.S0005-A v6.0. It is represented in - * units of 0.25 seconds and ranges from -1296000 - * to 1296000, both values inclusive (corresponding - * to a range of -90 to +90 degrees). - * ((const char **)response)[6] is Base Station longitude if registered on a - * CDMA system or NULL if not. Base Station - * longitude is a decimal number as specified in - * 3GPP2 C.S0005-A v6.0. It is represented in - * units of 0.25 seconds and ranges from -2592000 - * to 2592000, both values inclusive (corresponding - * to a range of -180 to +180 degrees). - * ((const char **)response)[7] is concurrent services support indicator if - * registered on a CDMA system 0-1. - * 0 - Concurrent services not supported, - * 1 - Concurrent services supported - * ((const char **)response)[8] is System ID if registered on a CDMA system or - * NULL if not. Valid System ID are 0 - 32767 - * ((const char **)response)[9] is Network ID if registered on a CDMA system or - * NULL if not. Valid System ID are 0 - 65535 - * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered - * on a CDMA or EVDO system or NULL if not. Valid values - * are 0-255. - * ((const char **)response)[11] indicates whether the current system is in the - * PRL if registered on a CDMA or EVDO system or NULL if - * not. 0=not in the PRL, 1=in the PRL - * ((const char **)response)[12] is the default Roaming Indicator from the PRL, - * if registered on a CDMA or EVDO system or NULL if not. - * Valid values are 0-255. - * ((const char **)response)[13] if registration state is 3 (Registration - * denied) this is an enumerated reason why - * registration was denied. See 3GPP TS 24.008, - * 10.5.3.6 and Annex G. - * 0 - General - * 1 - Authentication Failure - * 2 - IMSI unknown in HLR - * 3 - Illegal MS - * 4 - Illegal ME - * 5 - PLMN not allowed - * 6 - Location area not allowed - * 7 - Roaming not allowed - * 8 - No Suitable Cells in this Location Area - * 9 - Network failure - * 10 - Persistent location update reject - * 11 - PLMN not allowed - * 12 - Location area not allowed - * 13 - Roaming not allowed in this Location Area - * 15 - No Suitable Cells in this Location Area - * 17 - Network Failure - * 20 - MAC Failure - * 21 - Sync Failure - * 22 - Congestion - * 23 - GSM Authentication unacceptable - * 25 - Not Authorized for this CSG - * 32 - Service option not supported - * 33 - Requested service option not subscribed - * 34 - Service option temporarily out of order - * 38 - Call cannot be identified - * 48-63 - Retry upon entry into a new cell - * 95 - Semantically incorrect message - * 96 - Invalid mandatory information - * 97 - Message type non-existent or not implemented - * 98 - Message not compatible with protocol state - * 99 - Information element non-existent or not implemented - * 100 - Conditional IE error - * 101 - Message not compatible with protocol state - * 111 - Protocol error, unspecified - * ((const char **)response)[14] is the Primary Scrambling Code of the current - * cell as described in TS 25.331, in hexadecimal - * format, or NULL if unknown or not registered - * to a UMTS network. - * - * Please note that registration state 4 ("unknown") is treated - * as "out of service" in the Android telephony system - * - * Registration state 3 can be returned if Location Update Reject - * (with cause 17 - Network Failure) is received repeatedly from the network, - * to facilitate "managed roaming" - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20 - -/** - * RIL_REQUEST_DATA_REGISTRATION_STATE - * - * Request current DATA registration state - * - * "data" is NULL - * "response" is a "char **" - * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG - * ((const char **)response)[1] is LAC if registered or NULL if not - * ((const char **)response)[2] is CID if registered or NULL if not - * ((const char **)response)[3] indicates the available data radio technology, - * valid values as defined by RIL_RadioTechnology. - * ((const char **)response)[4] if registration state is 3 (Registration - * denied) this is an enumerated reason why - * registration was denied. See 3GPP TS 24.008, - * Annex G.6 "Additonal cause codes for GMM". - * 7 == GPRS services not allowed - * 8 == GPRS services and non-GPRS services not allowed - * 9 == MS identity cannot be derived by the network - * 10 == Implicitly detached - * 14 == GPRS services not allowed in this PLMN - * 16 == MSC temporarily not reachable - * 40 == No PDP context activated - * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be - * established using RIL_REQUEST_SETUP_DATA_CALL. - * - * The values at offsets 6..10 are optional LTE location information in decimal. - * If a value is unknown that value may be NULL. If all values are NULL, - * none need to be present. - * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code. - * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier. - * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier. - * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity. - * ((const char **)response)[10] is TADV, a 6-bit timing advance value. - * - * LAC and CID are in hexadecimal format. - * valid LAC are 0x0000 - 0xffff - * valid CID are 0x00000000 - 0x0fffffff - * - * Please note that registration state 4 ("unknown") is treated - * as "out of service" in the Android telephony system - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_DATA_REGISTRATION_STATE 21 - -/** - * RIL_REQUEST_OPERATOR - * - * Request current operator ONS or EONS - * - * "data" is NULL - * "response" is a "const char **" - * ((const char **)response)[0] is long alpha ONS or EONS - * or NULL if unregistered - * - * ((const char **)response)[1] is short alpha ONS or EONS - * or NULL if unregistered - * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) - * or NULL if unregistered - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_OPERATOR 22 - -/** - * RIL_REQUEST_RADIO_POWER - * - * Toggle radio on and off (for "airplane" mode) - * If the radio is is turned off/on the radio modem subsystem - * is expected return to an initialized state. For instance, - * any voice and data calls will be terminated and all associated - * lists emptied. - * - * "data" is int * - * ((int *)data)[0] is > 0 for "Radio On" - * ((int *)data)[0] is == 0 for "Radio Off" - * - * "response" is NULL - * - * Turn radio on if "on" > 0 - * Turn radio off if "on" == 0 - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_RADIO_POWER 23 - -/** - * RIL_REQUEST_DTMF - * - * Send a DTMF tone - * - * If the implementation is currently playing a tone requested via - * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone - * should be played instead - * - * "data" is a char * containing a single character with one of 12 values: 0-9,*,# - * "response" is NULL - * - * FIXME should this block/mute microphone? - * How does this interact with local DTMF feedback? - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START - * - */ -#define RIL_REQUEST_DTMF 24 - -/** - * RIL_REQUEST_SEND_SMS - * - * Send an SMS message - * - * "data" is const char ** - * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed - * by a length byte (as expected by TS 27.005) or NULL for default SMSC - * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string - * less the SMSC address - * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" - * - * "response" is a const RIL_SMS_Response * - * - * Based on the return error, caller decides to resend if sending sms - * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) - * and GENERIC_FAILURE means no retry (i.e. error cause is 500) - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SMS_SEND_FAIL_RETRY - * FDN_CHECK_FAILURE - * GENERIC_FAILURE - * - * FIXME how do we specify TP-Message-Reference if we need to resend? - */ -#define RIL_REQUEST_SEND_SMS 25 - - -/** - * RIL_REQUEST_SEND_SMS_EXPECT_MORE - * - * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, - * except that more messages are expected to be sent soon. If possible, - * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) - * - * "data" is const char ** - * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed - * by a length byte (as expected by TS 27.005) or NULL for default SMSC - * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string - * less the SMSC address - * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" - * - * "response" is a const RIL_SMS_Response * - * - * Based on the return error, caller decides to resend if sending sms - * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) - * and GENERIC_FAILURE means no retry (i.e. error cause is 500) - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SMS_SEND_FAIL_RETRY - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 - - -/** - * RIL_REQUEST_SETUP_DATA_CALL - * - * Setup a packet data connection. If RIL_Data_Call_Response_v6.status - * return success it is added to the list of data calls and a - * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the - * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the - * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST - * and RIL_UNSOL_DATA_CALL_LIST_CHANGED. - * - * The RIL is expected to: - * - Create one data call context. - * - Create and configure a dedicated interface for the context - * - The interface must be point to point. - * - The interface is configured with one or more addresses and - * is capable of sending and receiving packets. The prefix length - * of the addresses must be /32 for IPv4 and /128 for IPv6. - * - Must NOT change the linux routing table. - * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5] - * number of simultaneous data call contexts. - * - * "data" is a const char ** - * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2... - * for values above 2 this is RIL_RadioTechnology + 2. - * ((const char **)data)[1] is a RIL_DataProfile (support is optional) - * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will - * override the one in the profile. NULL indicates no APN overrride. - * ((const char **)data)[3] is the username for APN, or NULL - * ((const char **)data)[4] is the password for APN, or NULL - * ((const char **)data)[5] is the PAP / CHAP auth type. Values: - * 0 => PAP and CHAP is never performed. - * 1 => PAP may be performed; CHAP is never performed. - * 2 => CHAP may be performed; PAP is never performed. - * 3 => PAP / CHAP may be performed - baseband dependent. - * ((const char **)data)[6] is the connection type to request must be one of the - * PDP_type values in TS 27.007 section 10.1.1. - * For example, "IP", "IPV6", "IPV4V6", or "PPP". - * ((const char **)data)[7] Optional connection property parameters, format to be defined. - * - * "response" is a RIL_Data_Call_Response_v6 - * - * FIXME may need way to configure QoS settings - * - * Valid errors: - * SUCCESS should be returned on both success and failure of setup with - * the RIL_Data_Call_Response_v6.status containing the actual status. - * For all other errors the RIL_Data_Call_Resonse_v6 is ignored. - * - * Other errors could include: - * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, - * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED. - * - * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL - */ -#define RIL_REQUEST_SETUP_DATA_CALL 27 - - -/** - * RIL_REQUEST_SIM_IO - * - * Request SIM I/O operation. - * This is similar to the TS 27.007 "restricted SIM" operation - * where it assumes all of the EF selection will be done by the - * callee. - * - * "data" is a const RIL_SIM_IO_v6 * - * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, - * or may specify a PIN2 for operations that require a PIN2 (eg - * updating FDN records) - * - * "response" is a const RIL_SIM_IO_Response * - * - * Arguments and responses that are unused for certain - * values of "command" should be ignored or set to NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * SIM_PIN2 - * SIM_PUK2 - */ -#define RIL_REQUEST_SIM_IO 28 - -/** - * RIL_REQUEST_SEND_USSD - * - * Send a USSD message - * - * If a USSD session already exists, the message should be sent in the - * context of that session. Otherwise, a new session should be created. - * - * The network reply should be reported via RIL_UNSOL_ON_USSD - * - * Only one USSD session may exist at a time, and the session is assumed - * to exist until: - * a) The android system invokes RIL_REQUEST_CANCEL_USSD - * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code - * of "0" (USSD-Notify/no further action) or "2" (session terminated) - * - * "data" is a const char * containing the USSD request in UTF-8 format - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * FDN_CHECK_FAILURE - * USSD_MODIFIED_TO_DIAL - * USSD_MODIFIED_TO_SS - * USSD_MODIFIED_TO_USSD - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD - */ - -#define RIL_REQUEST_SEND_USSD 29 - -/** - * RIL_REQUEST_CANCEL_USSD - * - * Cancel the current USSD session if one exists - * - * "data" is null - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_CANCEL_USSD 30 - -/** - * RIL_REQUEST_GET_CLIR - * - * Gets current CLIR status - * "data" is NULL - * "response" is int * - * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 - * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - */ -#define RIL_REQUEST_GET_CLIR 31 - -/** - * RIL_REQUEST_SET_CLIR - * - * "data" is int * - * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SET_CLIR 32 - -/** - * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS - * - * "data" is const RIL_CallForwardInfo * - * - * "response" is const RIL_CallForwardInfo ** - * "response" points to an array of RIL_CallForwardInfo *'s, one for - * each distinct registered phone number. - * - * For example, if data is forwarded to +18005551212 and voice is forwarded - * to +18005559999, then two separate RIL_CallForwardInfo's should be returned - * - * If, however, both data and voice are forwarded to +18005551212, then - * a single RIL_CallForwardInfo can be returned with the service class - * set to "data + voice = 3") - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - */ -#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 - - -/** - * RIL_REQUEST_SET_CALL_FORWARD - * - * Configure call forward rule - * - * "data" is const RIL_CallForwardInfo * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SET_CALL_FORWARD 34 - - -/** - * RIL_REQUEST_QUERY_CALL_WAITING - * - * Query current call waiting state - * - * "data" is const int * - * ((const int *)data)[0] is the TS 27.007 service class to query. - * "response" is a const int * - * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" - * - * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] - * must follow, with the TS 27.007 service class bit vector of services - * for which call waiting is enabled. - * - * For example, if ((const int *)response)[0] is 1 and - * ((const int *)response)[1] is 3, then call waiting is enabled for data - * and voice and disabled for everything else - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - */ -#define RIL_REQUEST_QUERY_CALL_WAITING 35 - - -/** - * RIL_REQUEST_SET_CALL_WAITING - * - * Configure current call waiting state - * - * "data" is const int * - * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" - * ((const int *)data)[1] is the TS 27.007 service class bit vector of - * services to modify - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SET_CALL_WAITING 36 - -/** - * RIL_REQUEST_SMS_ACKNOWLEDGE - * - * Acknowledge successful or failed receipt of SMS previously indicated - * via RIL_UNSOL_RESPONSE_NEW_SMS - * - * "data" is int * - * ((int *)data)[0] is 1 on successful receipt - * (basically, AT+CNMA=1 from TS 27.005 - * is 0 on failed receipt - * (basically, AT+CNMA=2 from TS 27.005) - * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined - * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory - * capacity exceeded) and 0xFF (unspecified error) are - * reported. - * - * "response" is NULL - * - * FIXME would like request that specified RP-ACK/RP-ERROR PDU - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SMS_ACKNOWLEDGE 37 - -/** - * RIL_REQUEST_GET_IMEI - DEPRECATED - * - * Get the device IMEI, including check digit - * - * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY - * Valid when RadioState is not RADIO_STATE_UNAVAILABLE - * - * "data" is NULL - * "response" is a const char * containing the IMEI - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_GET_IMEI 38 - -/** - * RIL_REQUEST_GET_IMEISV - DEPRECATED - * - * Get the device IMEISV, which should be two decimal digits - * - * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY - * Valid when RadioState is not RADIO_STATE_UNAVAILABLE - * - * "data" is NULL - * "response" is a const char * containing the IMEISV - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_GET_IMEISV 39 - - -/** - * RIL_REQUEST_ANSWER - * - * Answer incoming call - * - * Will not be called for WAITING calls. - * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case - * instead - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_ANSWER 40 - -/** - * RIL_REQUEST_DEACTIVATE_DATA_CALL - * - * Deactivate packet data connection and remove from the - * data call list if SUCCESS is returned. Any other return - * values should also try to remove the call from the list, - * but that may not be possible. In any event a - * RIL_REQUEST_RADIO_POWER off/on must clear the list. An - * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be - * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL. - * - * "data" is const char ** - * ((char**)data)[0] indicating CID - * ((char**)data)[1] indicating Disconnect Reason - * 0 => No specific reason specified - * 1 => Radio shutdown requested - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_SETUP_DATA_CALL - */ -#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 - -/** - * RIL_REQUEST_QUERY_FACILITY_LOCK - * - * Query the status of a facility lock state - * - * "data" is const char ** - * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 - * (eg "AO" for BAOC, "SC" for SIM lock) - * ((const char **)data)[1] is the password, or "" if not required - * ((const char **)data)[2] is the TS 27.007 service class bit vector of - * services to query - * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * This is only applicable in the case of Fixed Dialing Numbers - * (FDN) requests. - * - * "response" is an int * - * ((const int *)response) 0 is the TS 27.007 service class bit vector of - * services for which the specified barring facility - * is active. "0" means "disabled for all" - * - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_QUERY_FACILITY_LOCK 42 - -/** - * RIL_REQUEST_SET_FACILITY_LOCK - * - * Enable/disable one facility lock - * - * "data" is const char ** - * - * ((const char **)data)[0] = facility string code from TS 27.007 7.4 - * (eg "AO" for BAOC) - * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" - * ((const char **)data)[2] = password - * ((const char **)data)[3] = string representation of decimal TS 27.007 - * service class bit vector. Eg, the string - * "1" means "set this facility for voice services" - * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. - * This is only applicable in the case of Fixed Dialing Numbers - * (FDN) requests. - * - * "response" is int * - * ((int *)response)[0] is the number of retries remaining, or -1 if unknown - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_SET_FACILITY_LOCK 43 - -/** - * RIL_REQUEST_CHANGE_BARRING_PASSWORD - * - * Change call barring facility password - * - * "data" is const char ** - * - * ((const char **)data)[0] = facility string code from TS 27.007 7.4 - * (eg "AO" for BAOC) - * ((const char **)data)[1] = old password - * ((const char **)data)[2] = new password - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 - -/** - * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE - * - * Query current network selectin mode - * - * "data" is NULL - * - * "response" is int * - * ((const int *)response)[0] is - * 0 for automatic selection - * 1 for manual selection - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 - -/** - * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC - * - * Specify that the network should be selected automatically - * - * "data" is NULL - * "response" is NULL - * - * This request must not respond until the new operator is selected - * and registered - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * ILLEGAL_SIM_OR_ME - * GENERIC_FAILURE - * - * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and - * no retries needed, such as illegal SIM or ME. - * Returns GENERIC_FAILURE for all other causes that might be - * fixed by retries. - * - */ -#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 - -/** - * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL - * - * Manually select a specified network. - * - * "data" is const char * specifying MCCMNC of network to select (eg "310170") - * "response" is NULL - * - * This request must not respond until the new operator is selected - * and registered - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * ILLEGAL_SIM_OR_ME - * GENERIC_FAILURE - * - * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and - * no retries needed, such as illegal SIM or ME. - * Returns GENERIC_FAILURE for all other causes that might be - * fixed by retries. - * - */ -#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47 - -/** - * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS - * - * Scans for available networks - * - * "data" is NULL - * "response" is const char ** that should be an array of n*4 strings, where - * n is the number of available networks - * For each available network: - * - * ((const char **)response)[n+0] is long alpha ONS or EONS - * ((const char **)response)[n+1] is short alpha ONS or EONS - * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) - * ((const char **)response)[n+3] is a string value of the status: - * "unknown" - * "available" - * "current" - * "forbidden" - * - * This request must not respond until the new operator is selected - * and registered - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 - -/** - * RIL_REQUEST_DTMF_START - * - * Start playing a DTMF tone. Continue playing DTMF tone until - * RIL_REQUEST_DTMF_STOP is received - * - * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, - * it should cancel the previous tone and play the new one. - * - * "data" is a char * - * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP - */ -#define RIL_REQUEST_DTMF_START 49 - -/** - * RIL_REQUEST_DTMF_STOP - * - * Stop playing a currently playing DTMF tone. - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START - */ -#define RIL_REQUEST_DTMF_STOP 50 - -/** - * RIL_REQUEST_BASEBAND_VERSION - * - * Return string value indicating baseband version, eg - * response from AT+CGMR - * - * "data" is NULL - * "response" is const char * containing version string for log reporting - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_BASEBAND_VERSION 51 - -/** - * RIL_REQUEST_SEPARATE_CONNECTION - * - * Separate a party from a multiparty call placing the multiparty call - * (less the specified party) on hold and leaving the specified party - * as the only other member of the current (active) call - * - * Like AT+CHLD=2x - * - * See TS 22.084 1.3.8.2 (iii) - * TS 22.030 6.5.5 "Entering "2X followed by send" - * TS 27.007 "AT+CHLD=2x" - * - * "data" is an int * - * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SEPARATE_CONNECTION 52 - - -/** - * RIL_REQUEST_SET_MUTE - * - * Turn on or off uplink (microphone) mute. - * - * Will only be sent while voice call is active. - * Will always be reset to "disable mute" when a new voice call is initiated - * - * "data" is an int * - * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute" - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_SET_MUTE 53 - -/** - * RIL_REQUEST_GET_MUTE - * - * Queries the current state of the uplink mute setting - * - * "data" is NULL - * "response" is an int * - * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * SS_MODIFIED_TO_DIAL - * SS_MODIFIED_TO_USSD - * SS_MODIFIED_TO_SS - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_GET_MUTE 54 - -/** - * RIL_REQUEST_QUERY_CLIP - * - * Queries the status of the CLIP supplementary service - * - * (for MMI code "*#30#") - * - * "data" is NULL - * "response" is an int * - * (int *)response)[0] is 1 for "CLIP provisioned" - * and 0 for "CLIP not provisioned" - * and 2 for "unknown, e.g. no network etc" - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ - -#define RIL_REQUEST_QUERY_CLIP 55 - -/** - * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status - * field in RIL_Data_Call_Response_v6. - * - * Requests the failure cause code for the most recently failed PDP - * context or CDMA data connection active - * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE - * - * "data" is NULL - * - * "response" is a "int *" - * ((int *)response)[0] is an integer cause code defined in TS 24.008 - * section 6.1.3.1.3 or close approximation - * - * If the implementation does not have access to the exact cause codes, - * then it should return one of the values listed in - * RIL_DataCallFailCause, as the UI layer needs to distinguish these - * cases for error notification - * and potential retries. - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE - * - * Deprecated use the status field in RIL_Data_Call_Response_v6. - */ - -#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 - -/** - * RIL_REQUEST_DATA_CALL_LIST - * - * Returns the data call list. An entry is added when a - * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a - * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied - * when RIL_REQUEST_RADIO_POWER off/on is issued. - * - * "data" is NULL - * "response" is an array of RIL_Data_Call_Response_v6 - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * - * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED - */ - -#define RIL_REQUEST_DATA_CALL_LIST 57 - -/** - * RIL_REQUEST_RESET_RADIO - DEPRECATED - * - * Request a radio reset. The RIL implementation may postpone - * the reset until after this request is responded to if the baseband - * is presently busy. - * - * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * REQUEST_NOT_SUPPORTED - */ - -#define RIL_REQUEST_RESET_RADIO 58 - -/** - * RIL_REQUEST_OEM_HOOK_RAW - * - * This request reserved for OEM-specific uses. It passes raw byte arrays - * back and forth. - * - * It can be invoked on the Java side from - * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() - * - * "data" is a char * of bytes copied from the byte[] data argument in java - * "response" is a char * of bytes that will returned via the - * caller's "response" Message here: - * (byte[])(((AsyncResult)response.obj).result) - * - * An error response here will result in - * (((AsyncResult)response.obj).result) == null and - * (((AsyncResult)response.obj).exception) being an instance of - * com.android.internal.telephony.gsm.CommandException - * - * Valid errors: - * All - */ - -#define RIL_REQUEST_OEM_HOOK_RAW 59 - -/** - * RIL_REQUEST_OEM_HOOK_STRINGS - * - * This request reserved for OEM-specific uses. It passes strings - * back and forth. - * - * It can be invoked on the Java side from - * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() - * - * "data" is a const char **, representing an array of null-terminated UTF-8 - * strings copied from the "String[] strings" argument to - * invokeOemRilRequestStrings() - * - * "response" is a const char **, representing an array of null-terminated UTF-8 - * stings that will be returned via the caller's response message here: - * - * (String[])(((AsyncResult)response.obj).result) - * - * An error response here will result in - * (((AsyncResult)response.obj).result) == null and - * (((AsyncResult)response.obj).exception) being an instance of - * com.android.internal.telephony.gsm.CommandException - * - * Valid errors: - * All - */ - -#define RIL_REQUEST_OEM_HOOK_STRINGS 60 - -/** - * RIL_REQUEST_SCREEN_STATE - * - * Indicates the current state of the screen. When the screen is off, the - * RIL should notify the baseband to suppress certain notifications (eg, - * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude) - * in an effort to conserve power. These notifications should resume when the - * screen is on. - * - * "data" is int * - * ((int *)data)[0] is == 1 for "Screen On" - * ((int *)data)[0] is == 0 for "Screen Off" - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SCREEN_STATE 61 - - -/** - * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION - * - * Enables/disables supplementary service related notifications - * from the network. - * - * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION. - * - * "data" is int * - * ((int *)data)[0] is == 1 for notifications enabled - * ((int *)data)[0] is == 0 for notifications disabled - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION. - */ -#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62 - -/** - * RIL_REQUEST_WRITE_SMS_TO_SIM - * - * Stores a SMS message to SIM memory. - * - * "data" is RIL_SMS_WriteArgs * - * - * "response" is int * - * ((const int *)response)[0] is the record index where the message is stored. - * - * Valid errors: - * SUCCESS - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_WRITE_SMS_TO_SIM 63 - -/** - * RIL_REQUEST_DELETE_SMS_ON_SIM - * - * Deletes a SMS message from SIM memory. - * - * "data" is int * - * ((int *)data)[0] is the record index of the message to delete. - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_DELETE_SMS_ON_SIM 64 - -/** - * RIL_REQUEST_SET_BAND_MODE - * - * Assign a specified band for RF configuration. - * - * "data" is int * - * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically) - * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) - * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) - * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) - * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) - * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) - * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)" - * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)" - * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)" - * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)" - * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)" - * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)" - * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)" - * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)" - * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)" - * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)" - * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)" - * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)" - * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)" - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SET_BAND_MODE 65 - -/** - * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE - * - * Query the list of band mode supported by RF. - * - * "data" is NULL - * - * "response" is int * - * "response" points to an array of int's, the int[0] is the size of array, reset is one for - * each available band mode. - * - * 0 for "unspecified" (selected by baseband automatically) - * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) - * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) - * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) - * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) - * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) - * 6 for "Cellular (800-MHz Band)" - * 7 for "PCS (1900-MHz Band)" - * 8 for "Band Class 3 (JTACS Band)" - * 9 for "Band Class 4 (Korean PCS Band)" - * 10 for "Band Class 5 (450-MHz Band)" - * 11 for "Band Class 6 (2-GMHz IMT2000 Band)" - * 12 for "Band Class 7 (Upper 700-MHz Band)" - * 13 for "Band Class 8 (1800-MHz Band)" - * 14 for "Band Class 9 (900-MHz Band)" - * 15 for "Band Class 10 (Secondary 800-MHz Band)" - * 16 for "Band Class 11 (400-MHz European PAMR Band)" - * 17 for "Band Class 15 (AWS Band)" - * 18 for "Band Class 16 (US 2.5-GHz Band)" - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_SET_BAND_MODE - */ -#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66 - -/** - * RIL_REQUEST_STK_GET_PROFILE - * - * Requests the profile of SIM tool kit. - * The profile indicates the SAT/USAT features supported by ME. - * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111 - * - * "data" is NULL - * - * "response" is a const char * containing SAT/USAT profile - * in hexadecimal format string starting with first byte of terminal profile - * - * Valid errors: - * RIL_E_SUCCESS - * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) - * RIL_E_GENERIC_FAILURE - */ -#define RIL_REQUEST_STK_GET_PROFILE 67 - -/** - * RIL_REQUEST_STK_SET_PROFILE - * - * Download the STK terminal profile as part of SIM initialization - * procedure - * - * "data" is a const char * containing SAT/USAT profile - * in hexadecimal format string starting with first byte of terminal profile - * - * "response" is NULL - * - * Valid errors: - * RIL_E_SUCCESS - * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) - * RIL_E_GENERIC_FAILURE - */ -#define RIL_REQUEST_STK_SET_PROFILE 68 - -/** - * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND - * - * Requests to send a SAT/USAT envelope command to SIM. - * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111 - * - * "data" is a const char * containing SAT/USAT command - * in hexadecimal format string starting with command tag - * - * "response" is a const char * containing SAT/USAT response - * in hexadecimal format string starting with first byte of response - * (May be NULL) - * - * Valid errors: - * RIL_E_SUCCESS - * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) - * RIL_E_GENERIC_FAILURE - */ -#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69 - -/** - * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE - * - * Requests to send a terminal response to SIM for a received - * proactive command - * - * "data" is a const char * containing SAT/USAT response - * in hexadecimal format string starting with first byte of response data - * - * "response" is NULL - * - * Valid errors: - * RIL_E_SUCCESS - * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) - * RIL_E_GENERIC_FAILURE - */ -#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70 - -/** - * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM - * - * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has - * been initialized by ME already. (We could see the call has been in the 'call - * list') So, STK application needs to accept/reject the call according as user - * operations. - * - * "data" is int * - * ((int *)data)[0] is > 0 for "accept" the call setup - * ((int *)data)[0] is == 0 for "reject" the call setup - * - * "response" is NULL - * - * Valid errors: - * RIL_E_SUCCESS - * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) - * RIL_E_GENERIC_FAILURE - */ -#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71 - -/** - * RIL_REQUEST_EXPLICIT_CALL_TRANSFER - * - * Connects the two calls and disconnects the subscriber from both calls. - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - */ -#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72 - -/** - * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE - * - * Requests to set the preferred network type for searching and registering - * (CS/PS domain, RAT, and operation mode) - * - * "data" is int * which is RIL_PreferredNetworkType - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * MODE_NOT_SUPPORTED - */ -#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 - -/** - * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE - * - * Query the preferred network type (CS/PS domain, RAT, and operation mode) - * for searching and registering - * - * "data" is NULL - * - * "response" is int * - * ((int *)reponse)[0] is == RIL_PreferredNetworkType - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE - */ -#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74 - -/** - * RIL_REQUEST_NEIGHBORING_CELL_IDS - * - * Request neighboring cell id in GSM network - * - * "data" is NULL - * "response" must be a " const RIL_NeighboringCell** " - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 - -/** - * RIL_REQUEST_SET_LOCATION_UPDATES - * - * Enables/disables network state change notifications due to changes in - * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA). - * Basically +CREG=2 vs. +CREG=1 (TS 27.007). - * - * Note: The RIL implementation should default to "updates enabled" - * when the screen is on and "updates disabled" when the screen is off. - * - * "data" is int * - * ((int *)data)[0] is == 1 for updates enabled (+CREG=2) - * ((int *)data)[0] is == 0 for updates disabled (+CREG=1) - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED - */ -#define RIL_REQUEST_SET_LOCATION_UPDATES 76 - -/** - * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE - * - * Request to set the location where the CDMA subscription shall - * be retrieved - * - * "data" is int * - * ((int *)data)[0] is == RIL_CdmaSubscriptionSource - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * SIM_ABSENT - * SUBSCRIPTION_NOT_AVAILABLE - * - * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE - */ -#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77 - -/** - * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE - * - * Request to set the roaming preferences in CDMA - * - * "data" is int * - * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL - * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL - * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 - -/** - * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE - * - * Request the actual setting of the roaming preferences in CDMA in the modem - * - * "data" is NULL - * - * "response" is int * - * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL - * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL - * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 - -/** - * RIL_REQUEST_SET_TTY_MODE - * - * Request to set the TTY mode - * - * "data" is int * - * ((int *)data)[0] is == 0 for TTY off - * ((int *)data)[0] is == 1 for TTY Full - * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) - * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SET_TTY_MODE 80 - -/** - * RIL_REQUEST_QUERY_TTY_MODE - * - * Request the setting of TTY mode - * - * "data" is NULL - * - * "response" is int * - * ((int *)response)[0] is == 0 for TTY off - * ((int *)response)[0] is == 1 for TTY Full - * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover) - * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_QUERY_TTY_MODE 81 - -/** - * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE - * - * Request to set the preferred voice privacy mode used in voice - * scrambling - * - * "data" is int * - * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) - * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82 - -/** - * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE - * - * Request the setting of preferred voice privacy mode - * - * "data" is NULL - * - * "response" is int * - * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) - * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83 - -/** - * RIL_REQUEST_CDMA_FLASH - * - * Send FLASH - * - * "data" is const char * - * ((const char *)data)[0] is a FLASH string - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_FLASH 84 - -/** - * RIL_REQUEST_CDMA_BURST_DTMF - * - * Send DTMF string - * - * "data" is const char ** - * ((const char **)data)[0] is a DTMF string - * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use - * default - * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use - * default - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_BURST_DTMF 85 - -/** - * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY - * - * Takes a 26 digit string (20 digit AKEY + 6 digit checksum). - * If the checksum is valid the 20 digit AKEY is written to NV, - * replacing the existing AKEY no matter what it was before. - * - * "data" is const char * - * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9') - * where the last 6 digits are a checksum of the - * first 20, as specified in TR45.AHAG - * "Common Cryptographic Algorithms, Revision D.1 - * Section 2.2" - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 - -/** - * RIL_REQUEST_CDMA_SEND_SMS - * - * Send a CDMA SMS message - * - * "data" is const RIL_CDMA_SMS_Message * - * - * "response" is a const RIL_SMS_Response * - * - * Based on the return error, caller decides to resend if sending sms - * fails. The CDMA error class is derived as follows, - * SUCCESS is error class 0 (no error) - * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) - * and GENERIC_FAILURE is error class 3 (permanent and no retry) - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SMS_SEND_FAIL_RETRY - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_SEND_SMS 87 - -/** - * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE - * - * Acknowledge the success or failure in the receipt of SMS - * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS - * - * "data" is const RIL_CDMA_SMS_Ack * - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88 - -/** - * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG - * - * Request the setting of GSM/WCDMA Cell Broadcast SMS config. - * - * "data" is NULL - * - * "response" is a const RIL_GSM_BroadcastSmsConfigInfo ** - * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *) - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89 - -/** - * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG - * - * Set GSM/WCDMA Cell Broadcast SMS config - * - * "data" is a const RIL_GSM_BroadcastSmsConfigInfo ** - * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *) - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90 - -/** - * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION - * -* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS - * - * "data" is const int * - * (const int *)data[0] indicates to activate or turn off the - * reception of GSM/WCDMA Cell Broadcast SMS, 0-1, - * 0 - Activate, 1 - Turn off - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91 - -/** - * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG - * - * Request the setting of CDMA Broadcast SMS config - * - * "data" is NULL - * - * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo ** - * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *) - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92 - -/** - * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG - * - * Set CDMA Broadcast SMS config - * - * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo ** - * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *) - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93 - -/** - * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION - * - * Enable or disable the reception of CDMA Broadcast SMS - * - * "data" is const int * - * (const int *)data[0] indicates to activate or turn off the - * reception of CDMA Broadcast SMS, 0-1, - * 0 - Activate, 1 - Turn off - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94 - -/** - * RIL_REQUEST_CDMA_SUBSCRIPTION - * - * Request the device MDN / H_SID / H_NID. - * - * The request is only allowed when CDMA subscription is available. When CDMA - * subscription is changed, application layer should re-issue the request to - * update the subscription information. - * - * If a NULL value is returned for any of the device id, it means that error - * accessing the device. - * - * "response" is const char ** - * ((const char **)response)[0] is MDN if CDMA subscription is available - * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if - * CDMA subscription is available, in decimal format - * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if - * CDMA subscription is available, in decimal format - * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available - * ((const char **)response)[4] is PRL version if CDMA subscription is available - * - * Valid errors: - * SUCCESS - * RIL_E_SUBSCRIPTION_NOT_AVAILABLE - */ - -#define RIL_REQUEST_CDMA_SUBSCRIPTION 95 - -/** - * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM - * - * Stores a CDMA SMS message to RUIM memory. - * - * "data" is RIL_CDMA_SMS_WriteArgs * - * - * "response" is int * - * ((const int *)response)[0] is the record index where the message is stored. - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96 - -/** - * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM - * - * Deletes a CDMA SMS message from RUIM memory. - * - * "data" is int * - * ((int *)data)[0] is the record index of the message to delete. - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97 - -/** - * RIL_REQUEST_DEVICE_IDENTITY - * - * Request the device ESN / MEID / IMEI / IMEISV. - * - * The request is always allowed and contains GSM and CDMA device identity; - * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and - * RIL_REQUEST_GET_IMEISV. - * - * If a NULL value is returned for any of the device id, it means that error - * accessing the device. - * - * When CDMA subscription is changed the ESN/MEID may change. The application - * layer should re-issue the request to update the device identity in this case. - * - * "response" is const char ** - * ((const char **)response)[0] is IMEI if GSM subscription is available - * ((const char **)response)[1] is IMEISV if GSM subscription is available - * ((const char **)response)[2] is ESN if CDMA subscription is available - * ((const char **)response)[3] is MEID if CDMA subscription is available - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_DEVICE_IDENTITY 98 - -/** - * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE - * - * Request the radio's system selection module to exit emergency - * callback mode. RIL will not respond with SUCCESS until the modem has - * completely exited from Emergency Callback Mode. - * - * "data" is NULL - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 - -/** - * RIL_REQUEST_GET_SMSC_ADDRESS - * - * Queries the default Short Message Service Center address on the device. - * - * "data" is NULL - * - * "response" is const char * containing the SMSC address. - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_GET_SMSC_ADDRESS 100 - -/** - * RIL_REQUEST_SET_SMSC_ADDRESS - * - * Sets the default Short Message Service Center address on the device. - * - * "data" is const char * containing the SMSC address. - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_SET_SMSC_ADDRESS 101 - -/** - * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS - * - * Indicates whether there is storage available for new SMS messages. - * - * "data" is int * - * ((int *)data)[0] is 1 if memory is available for storing new messages - * is 0 if memory capacity is exceeded - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 - -/** - * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING - * - * Indicates that the StkSerivce is running and is - * ready to receive RIL_UNSOL_STK_XXXXX commands. - * - * "data" is NULL - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103 - -/** - * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE - * - * Request to query the location where the CDMA subscription shall - * be retrieved - * - * "data" is NULL - * - * "response" is int * - * ((int *)data)[0] is == RIL_CdmaSubscriptionSource - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - * SUBSCRIPTION_NOT_AVAILABLE - * - * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE - */ -#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104 - -/** - * RIL_REQUEST_ISIM_AUTHENTICATION - * - * Request the ISIM application on the UICC to perform AKA - * challenge/response algorithm for IMS authentication - * - * "data" is a const char * containing the challenge string in Base64 format - * "response" is a const char * containing the response in Base64 format - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_ISIM_AUTHENTICATION 105 - -/** - * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU - * - * Acknowledge successful or failed receipt of SMS previously indicated - * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send - * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU. - * - * "data" is const char ** - * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK) - * is "0" on failed receipt (send RP-ERROR) - * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106 - -/** - * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS - * - * Requests to send a SAT/USAT envelope command to SIM. - * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111. - * - * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: - * the SW1 and SW2 status bytes from the UICC response are returned along with - * the response data, using the same structure as RIL_REQUEST_SIM_IO. - * - * The RIL implementation shall perform the normal processing of a '91XX' - * response in SW1/SW2 to retrieve the pending proactive command and send it - * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does. - * - * "data" is a const char * containing the SAT/USAT command - * in hexadecimal format starting with command tag - * - * "response" is a const RIL_SIM_IO_Response * - * - * Valid errors: - * RIL_E_SUCCESS - * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) - * RIL_E_GENERIC_FAILURE - */ -#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107 - -/** - * RIL_REQUEST_VOICE_RADIO_TECH - * - * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only - * when radio state is RADIO_STATE_ON - * - * "data" is NULL - * "response" is int * - * ((int *) response)[0] is of type const RIL_RadioTechnology - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_VOICE_RADIO_TECH 108 - -/** - * RIL_REQUEST_GET_CELL_INFO_LIST - * - * Request all of the current cell information known to the radio. The radio - * must a list of all current cells, including the neighboring cells. If for a particular - * cell information isn't known then the appropriate unknown value will be returned. - * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST. - * - * "data" is NULL - * - * "response" is an array of RIL_CellInfo. - */ -#define RIL_REQUEST_GET_CELL_INFO_LIST 109 - -/** - * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE - * - * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked. - * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported - * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue - * a RIL_UNSOL_CELL_INFO_LIST. - * - * "data" is int * - * ((int *)data)[0] is minimum time in milliseconds - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110 - -/** - * RIL_REQUEST_SET_INITIAL_ATTACH_APN - * - * Set an apn to initial attach network - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * SUBSCRIPTION_NOT_AVAILABLE - */ -#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111 - -/** - * RIL_REQUEST_IMS_REGISTRATION_STATE - * - * Request current IMS registration state - * - * "data" is NULL - * - * "response" is int * - * ((int *)response)[0] is registration state: - * 0 - Not registered - * 1 - Registered - * ((int *)response)[1] is bitmap of the supported services: - * & 0x1 - SMS supported - * - * If IMS is registered and supports SMS, then ((int *) response)[2] - * must follow with IMS SMS format: - * - * ((int *) response)[2] is of type const RIL_IMS_SMS_Format - */ -#define RIL_REQUEST_IMS_REGISTRATION_STATE 112 - -/** - * RIL_REQUEST_IMS_SEND_SMS - * - * Send a SMS message over IMS - * - * "data" is const RIL_IMS_SMS_Message * - * - * "response" is a const RIL_SMS_Response * - * - * Based on the return error, caller decides to resend if sending sms - * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry. - * In case of retry, data is encoded based on Voice Technology available. - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * SMS_SEND_FAIL_RETRY - * FDN_CHECK_FAILURE - * GENERIC_FAILURE - * - */ -#define RIL_REQUEST_IMS_SEND_SMS 113 - -/** - * RIL_REQUEST_GET_DATA_CALL_PROFILE - * - * Get the Data Call Profile for a particular app type - * - * "data" is const int* - * (const int*)data[0] - App type. Value is specified the RUIM spec C.S0023-D - * - * - * "response" is a const char * containing the count and the array of profiles - * ((const int *)response)[0] Number RIL_DataCallProfileInfo structs(count) - * ((const char *)response)[1] is the buffer that contains 'count' number of - * RIL_DataCallProfileInfo structs. - * - * Valid errors: - * SUCCESS - * GENERIC_FAILURE - * RIL_E_DATA_CALL_PROFILE_ERROR - * RIL_E_DATA_CALL_PROFILE_NOT_AVAILABLE - * - */ -#define RIL_REQUEST_GET_DATA_CALL_PROFILE 114 - -/** - * RIL_REQUEST_SET_UICC_SUBSCRIPTION - * - * Selection/de-selection of a subscription from a SIM card - * "data" is const RIL_SelectUiccSub* - - * - * "response" is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * SUBSCRIPTION_NOT_SUPPORTED - * - */ -#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 115 - -/** - * RIL_REQUEST_SET_DATA_SUBSCRIPTION - * - * Selects a subscription for data call setup - * "data" is NULL - * - * "response" is NULL - * - * Valid errors: - * - * SUCCESS - * RADIO_NOT_AVAILABLE (radio resetting) - * GENERIC_FAILURE - * SUBSCRIPTION_NOT_SUPPORTED - * - */ -#define RIL_REQUEST_SET_DATA_SUBSCRIPTION 116 - -/* Oppo extra request */ -/** - * RIL_REQUEST_FACTORY_MODE_NV_PROCESS - * - * Request to radio to get NV parameters. - * - * "data" is integer - * - * "response is NULL - * - * Valid errors: - * SUCCESS - * RADIO_NOT_AVAILABLE - * GENERIC_FAILURE - */ -#define RIL_REQUEST_FACTORY_MODE_NV_PROCESS 123 - -/***********************************************************************/ - - -#define RIL_UNSOL_RESPONSE_BASE 1000 - -/** - * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED - * - * Indicate when value of RIL_RadioState has changed. - * - * Callee will invoke RIL_RadioStateRequest method on main thread - * - * "data" is NULL - */ - -#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000 - - -/** - * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED - * - * Indicate when call state has changed - * - * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread - * - * "data" is NULL - * - * Response should be invoked on, for example, - * "RING", "BUSY", "NO CARRIER", and also call state - * transitions (DIALING->ALERTING ALERTING->ACTIVE) - * - * Redundent or extraneous invocations are tolerated - */ -#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001 - - -/** - * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED - * - * Called when the voice network state changed - * - * Callee will invoke the following requests on main thread: - * - * RIL_REQUEST_VOICE_REGISTRATION_STATE - * RIL_REQUEST_OPERATOR - * - * "data" is NULL - * - * FIXME should this happen when SIM records are loaded? (eg, for - * EONS) - */ -#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002 - -/** - * RIL_UNSOL_RESPONSE_NEW_SMS - * - * Called when new SMS is received. - * - * "data" is const char * - * This is a pointer to a string containing the PDU of an SMS-DELIVER - * as an ascii string of hex digits. The PDU starts with the SMSC address - * per TS 27.005 (+CMT:) - * - * Callee will subsequently confirm the receipt of thei SMS with a - * RIL_REQUEST_SMS_ACKNOWLEDGE - * - * No new RIL_UNSOL_RESPONSE_NEW_SMS - * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a - * RIL_REQUEST_SMS_ACKNOWLEDGE has been received - */ - -#define RIL_UNSOL_RESPONSE_NEW_SMS 1003 - -/** - * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT - * - * Called when new SMS Status Report is received. - * - * "data" is const char * - * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT - * as an ascii string of hex digits. The PDU starts with the SMSC address - * per TS 27.005 (+CDS:). - * - * Callee will subsequently confirm the receipt of the SMS with a - * RIL_REQUEST_SMS_ACKNOWLEDGE - * - * No new RIL_UNSOL_RESPONSE_NEW_SMS - * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a - * RIL_REQUEST_SMS_ACKNOWLEDGE has been received - */ - -#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004 - -/** - * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM - * - * Called when new SMS has been stored on SIM card - * - * "data" is const int * - * ((const int *)data)[0] contains the slot index on the SIM that contains - * the new message - */ - -#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005 - -/** - * RIL_UNSOL_ON_USSD - * - * Called when a new USSD message is received. - * - * "data" is const char ** - * ((const char **)data)[0] points to a type code, which is - * one of these string values: - * "0" USSD-Notify -- text in ((const char **)data)[1] - * "1" USSD-Request -- text in ((const char **)data)[1] - * "2" Session terminated by network - * "3" other local client (eg, SIM Toolkit) has responded - * "4" Operation not supported - * "5" Network timeout - * - * The USSD session is assumed to persist if the type code is "1", otherwise - * the current session (if any) is assumed to have terminated. - * - * ((const char **)data)[1] points to a message string if applicable, which - * should always be in UTF-8. - */ -#define RIL_UNSOL_ON_USSD 1006 -/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */ - -/** - * RIL_UNSOL_ON_USSD_REQUEST - * - * Obsolete. Send via RIL_UNSOL_ON_USSD - */ -#define RIL_UNSOL_ON_USSD_REQUEST 1007 - -/** - * RIL_UNSOL_NITZ_TIME_RECEIVED - * - * Called when radio has received a NITZ time message - * - * "data" is const char * pointing to NITZ time string - * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt" - */ -#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008 - -/** - * RIL_UNSOL_SIGNAL_STRENGTH - * - * Radio may report signal strength rather han have it polled. - * - * "data" is a const RIL_SignalStrength * - */ -#define RIL_UNSOL_SIGNAL_STRENGTH 1009 - - -/** - * RIL_UNSOL_DATA_CALL_LIST_CHANGED - * - * "data" is an array of RIL_Data_Call_Response_v6 identical to that - * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list - * of current data contexts including new contexts that have been - * activated. A data call is only removed from this list when the - * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio - * is powered off/on. - * - * See also: RIL_REQUEST_DATA_CALL_LIST - */ - -#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010 - -/** - * RIL_UNSOL_SUPP_SVC_NOTIFICATION - * - * Reports supplementary service related notification from the network. - * - * "data" is a const RIL_SuppSvcNotification * - * - */ - -#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011 - -/** - * RIL_UNSOL_STK_SESSION_END - * - * Indicate when STK session is terminated by SIM. - * - * "data" is NULL - */ -#define RIL_UNSOL_STK_SESSION_END 1012 - -/** - * RIL_UNSOL_STK_PROACTIVE_COMMAND - * - * Indicate when SIM issue a STK proactive command to applications - * - * "data" is a const char * containing SAT/USAT proactive command - * in hexadecimal format string starting with command tag - * - */ -#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013 - -/** - * RIL_UNSOL_STK_EVENT_NOTIFY - * - * Indicate when SIM notifies applcations some event happens. - * Generally, application does not need to have any feedback to - * SIM but shall be able to indicate appropriate messages to users. - * - * "data" is a const char * containing SAT/USAT commands or responses - * sent by ME to SIM or commands handled by ME, in hexadecimal format string - * starting with first byte of response data or command tag - * - */ -#define RIL_UNSOL_STK_EVENT_NOTIFY 1014 - -/** - * RIL_UNSOL_STK_CALL_SETUP - * - * Indicate when SIM wants application to setup a voice call. - * - * "data" is const int * - * ((const int *)data)[0] contains timeout value (in milliseconds) - */ -#define RIL_UNSOL_STK_CALL_SETUP 1015 - -/** - * RIL_UNSOL_SIM_SMS_STORAGE_FULL - * - * Indicates that SMS storage on the SIM is full. Sent when the network - * attempts to deliver a new SMS message. Messages cannot be saved on the - * SIM until space is freed. In particular, incoming Class 2 messages - * cannot be stored. - * - * "data" is null - * - */ -#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016 - -/** - * RIL_UNSOL_SIM_REFRESH - * - * Indicates that file(s) on the SIM have been updated, or the SIM - * has been reinitialized. - * - * In the case where RIL is version 6 or older: - * "data" is an int * - * ((int *)data)[0] is a RIL_SimRefreshResult. - * ((int *)data)[1] is the EFID of the updated file if the result is - * SIM_FILE_UPDATE or NULL for any other result. - * - * In the case where RIL is version 7: - * "data" is a RIL_SimRefreshResponse_v7 * - * - * Note: If the SIM state changes as a result of the SIM refresh (eg, - * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED - * should be sent. - */ -#define RIL_UNSOL_SIM_REFRESH 1017 - -/** - * RIL_UNSOL_CALL_RING - * - * Ring indication for an incoming call (eg, RING or CRING event). - * There must be at least one RIL_UNSOL_CALL_RING at the beginning - * of a call and sending multiple is optional. If the system property - * ro.telephony.call_ring.multiple is false then the upper layers - * will generate the multiple events internally. Otherwise the vendor - * ril must generate multiple RIL_UNSOL_CALL_RING if - * ro.telephony.call_ring.multiple is true or if it is absent. - * - * The rate of these events is controlled by ro.telephony.call_ring.delay - * and has a default value of 3000 (3 seconds) if absent. - * - * "data" is null for GSM - * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA - */ -#define RIL_UNSOL_CALL_RING 1018 - -/** - * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED - * - * Indicates that SIM state changes. - * - * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread - - * "data" is null - */ -#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019 - -/** - * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS - * - * Called when new CDMA SMS is received - * - * "data" is const RIL_CDMA_SMS_Message * - * - * Callee will subsequently confirm the receipt of the SMS with - * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE - * - * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until - * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received - * - */ -#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020 - -/** - * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS - * - * Called when new Broadcast SMS is received - * - * "data" can be one of the following: - * If received from GSM network, "data" is const char of 88 bytes - * which indicates each page of a CBS Message sent to the MS by the - * BTS as coded in 3GPP 23.041 Section 9.4.1.2. - * If received from UMTS network, "data" is const char of 90 up to 1252 - * bytes which contain between 1 and 15 CBS Message pages sent as one - * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2. - * - */ -#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021 - -/** - * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL - * - * Indicates that SMS storage on the RUIM is full. Messages - * cannot be saved on the RUIM until space is freed. - * - * "data" is null - * - */ -#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022 - -/** - * RIL_UNSOL_RESTRICTED_STATE_CHANGED - * - * Indicates a restricted state change (eg, for Domain Specific Access Control). - * - * Radio need send this msg after radio off/on cycle no matter it is changed or not. - * - * "data" is an int * - * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values. - */ -#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023 - -/** - * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE - * - * Indicates that the radio system selection module has - * autonomously entered emergency callback mode. - * - * "data" is null - * - */ -#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024 - -/** - * RIL_UNSOL_CDMA_CALL_WAITING - * - * Called when CDMA radio receives a call waiting indication. - * - * "data" is const RIL_CDMA_CallWaiting * - * - */ -#define RIL_UNSOL_CDMA_CALL_WAITING 1025 - -/** - * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS - * - * Called when CDMA radio receives an update of the progress of an - * OTASP/OTAPA call. - * - * "data" is const int * - * For CDMA this is an integer OTASP/OTAPA status listed in - * RIL_CDMA_OTA_ProvisionStatus. - * - */ -#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026 - -/** - * RIL_UNSOL_CDMA_INFO_REC - * - * Called when CDMA radio receives one or more info recs. - * - * "data" is const RIL_CDMA_InformationRecords * - * - */ -#define RIL_UNSOL_CDMA_INFO_REC 1027 - -/** - * RIL_UNSOL_OEM_HOOK_RAW - * - * This is for OEM specific use. - * - * "data" is a byte[] - */ -#define RIL_UNSOL_OEM_HOOK_RAW 1028 - -/** - * RIL_UNSOL_RINGBACK_TONE - * - * Indicates that nework doesn't have in-band information, need to - * play out-band tone. - * - * "data" is an int * - * ((int *)data)[0] == 0 for stop play ringback tone. - * ((int *)data)[0] == 1 for start play ringback tone. - */ -#define RIL_UNSOL_RINGBACK_TONE 1029 - -/** - * RIL_UNSOL_RESEND_INCALL_MUTE - * - * Indicates that framework/application need reset the uplink mute state. - * - * There may be situations where the mute state becomes out of sync - * between the application and device in some GSM infrastructures. - * - * "data" is null - */ -#define RIL_UNSOL_RESEND_INCALL_MUTE 1030 - -/** - * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED - * - * Called when CDMA subscription source changed. - * - * "data" is int * - * ((int *)data)[0] is == RIL_CdmaSubscriptionSource - */ -#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031 - -/** - * RIL_UNSOL_CDMA_PRL_CHANGED - * - * Called when PRL (preferred roaming list) changes. - * - * "data" is int * - * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION - */ -#define RIL_UNSOL_CDMA_PRL_CHANGED 1032 - -/** - * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE - * - * Called when Emergency Callback Mode Ends - * - * Indicates that the radio system selection module has - * proactively exited emergency callback mode. - * - * "data" is NULL - * - */ -#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033 - -/** - * RIL_UNSOL_RIL_CONNECTED - * - * Called the ril connects and returns the version - * - * "data" is int * - * ((int *)data)[0] is RIL_VERSION - */ -#define RIL_UNSOL_RIL_CONNECTED 1034 - -/** - * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED - * - * Indicates that voice technology has changed. Contains new radio technology - * as a data in the message. - * - * "data" is int * - * ((int *)data)[0] is of type const RIL_RadioTechnology - * - */ -#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035 - -/** - * RIL_UNSOL_CELL_INFO_LIST - * - * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned - * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE. - * - * "data" is NULL - * - * "response" is an array of RIL_CellInfo. - */ -#define RIL_UNSOL_CELL_INFO_LIST 1036 - -/* - * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED - * - * Called when IMS registration state has changed - * - * "data" is int * - * ((int *)response)[0] is registration state: - * 0 - Not registered - * 1 - Registered - * ((int *)response)[1] is bitmap of the services supported: - * & 0x1 - SMS supported - * - * If IMS is registered and supports SMS, then ((int *) response)[2] - * must follow with IMS SMS format: - * - * ((int *) response)[2] is of type const RIL_IMS_SMS_Format - */ -#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037 - -/** - * RIL_UNSOL_ON_SS - * - * Called when SS response is received when DIAL/USSD/SS is changed to SS by - * call control. - * - * "data" is const RIL_StkCcUnsolSsResponse * - * - */ -#define RIL_UNSOL_ON_SS 1038 - - -/** - * RIL_UNSOL_STK_CC_ALPHA_NOTIFY - * - * Called when there is an ALPHA from UICC during Call Control. - * - * "data" is const char * containing ALPHA string from UICC in UTF-8 format. - * - */ -#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1039 - -/** - * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED - * - * Indicated when there is a change in subscription status. - * This event will be sent in the following scenarios - * - subscription readiness at modem, which was selected by telephony layer - * - when subscription is deactivated by modem due to UICC card removal - * - When network invalidates the subscription i.e. attach reject due to authentication reject - * - * "data" is const int * - * ((const int *)data)[0] == 0 for Subscription Deactivated - * ((const int *)data)[0] == 1 for Subscription Activated - * - */ -#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1040 -/***********************************************************************/ - - -/** - * RIL_Request Function pointer - * - * @param request is one of RIL_REQUEST_* - * @param data is pointer to data defined for that RIL_REQUEST_* - * data is owned by caller, and should not be modified or freed by callee - * @param t should be used in subsequent call to RIL_onResponse - * @param datalen the length of data - * - */ -typedef void (*RIL_RequestFunc) (int request, void *data, - size_t datalen, RIL_Token t); - -/** - * This function should return the current radio state synchronously - */ -typedef RIL_RadioState (*RIL_RadioStateRequest)(); - -/** - * This function returns "1" if the specified RIL_REQUEST code is - * supported and 0 if it is not - * - * @param requestCode is one of RIL_REQUEST codes - */ - -typedef int (*RIL_Supports)(int requestCode); - -/** - * This function is called from a separate thread--not the - * thread that calls RIL_RequestFunc--and indicates that a pending - * request should be cancelled. - * - * On cancel, the callee should do its best to abandon the request and - * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. - * - * Subsequent calls to RIL_onRequestComplete for this request with - * other results will be tolerated but ignored. (That is, it is valid - * to ignore the cancellation request) - * - * RIL_Cancel calls should return immediately, and not wait for cancellation - * - * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 - * interface - * - * @param t token wants to be canceled - */ - -typedef void (*RIL_Cancel)(RIL_Token t); - -typedef void (*RIL_TimedCallback) (void *param); - -/** - * Return a version string for your RIL implementation - */ -typedef const char * (*RIL_GetVersion) (void); - -typedef struct { - int version; /* set to RIL_VERSION */ - RIL_RequestFunc onRequest; - RIL_RadioStateRequest onStateRequest; - RIL_Supports supports; - RIL_Cancel onCancel; - RIL_GetVersion getVersion; -} RIL_RadioFunctions; - -typedef struct { - char *apn; - char *protocol; - int authtype; - char *username; - char *password; -} RIL_InitialAttachApn; - -#ifdef RIL_SHLIB -struct RIL_Env { - /** - * "t" is parameter passed in on previous call to RIL_Notification - * routine. - * - * If "e" != SUCCESS, then response can be null/is ignored - * - * "response" is owned by caller, and should not be modified or - * freed by callee - * - * RIL_onRequestComplete will return as soon as possible - */ - void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, - void *response, size_t responselen); - - /** - * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* - * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* - * - * "data" is owned by caller, and should not be modified or freed by callee - */ - - void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, - size_t datalen); - - /** - * Call user-specifed "callback" function on on the same thread that - * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies - * a relative time value at which the callback is invoked. If relativeTime is - * NULL or points to a 0-filled structure, the callback will be invoked as - * soon as possible - */ - - void (*RequestTimedCallback) (RIL_TimedCallback callback, - void *param, const struct timeval *relativeTime); -}; - - -/** - * RIL implementations must defined RIL_Init - * argc and argv will be command line arguments intended for the RIL implementation - * Return NULL on error - * - * @param env is environment point defined as RIL_Env - * @param argc number of arguments - * @param argv list fo arguments - * - */ -const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv); - -#else /* RIL_SHLIB */ - -/** - * Call this once at startup to register notification routine - * - * @param callbacks user-specifed callback function - */ -void RIL_register (const RIL_RadioFunctions *callbacks); - - -/** - * - * RIL_onRequestComplete will return as soon as possible - * - * @param t is parameter passed in on previous call to RIL_Notification - * routine. - * @param e error code - * if "e" != SUCCESS, then response can be null/is ignored - * @param response is owned by caller, and should not be modified or - * freed by callee - * @param responselen the length of response in byte - */ -void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, - void *response, size_t responselen); - -/** - * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* - * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* - * "data" is owned by caller, and should not be modified or freed by callee - * @param datalen the length of data in byte - */ - -void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, - size_t datalen); - - -/** - * Call user-specifed "callback" function on on the same thread that - * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies - * a relative time value at which the callback is invoked. If relativeTime is - * NULL or points to a 0-filled structure, the callback will be invoked as - * soon as possible - * - * @param callback user-specifed callback function - * @param param parameter list - * @param relativeTime a relative time value at which the callback is invoked - */ - -void RIL_requestTimedCallback (RIL_TimedCallback callback, - void *param, const struct timeval *relativeTime); - - -#endif /* RIL_SHLIB */ - -#ifdef __cplusplus -} -#endif - -#endif /*ANDROID_RIL_H*/ diff --git a/libril/telephony/ril_cdma_sms.h b/libril/telephony/ril_cdma_sms.h deleted file mode 100644 index bcf6b30..0000000 --- a/libril/telephony/ril_cdma_sms.h +++ /dev/null @@ -1,806 +0,0 @@ -/* - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * ISSUES: - * - */ - -/** - * TODO - * - * - */ - - -#ifndef ANDROID_RIL_CDMA_SMS_H -#define ANDROID_RIL_CDMA_SMS_H 1 - -#include <stdlib.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* Used by RIL_REQUEST_CDMA_SEND_SMS and RIL_UNSOL_RESPONSE_CDMA_NEW_SMS */ - -#define RIL_CDMA_SMS_ADDRESS_MAX 36 -#define RIL_CDMA_SMS_SUBADDRESS_MAX 36 -#define RIL_CDMA_SMS_BEARER_DATA_MAX 255 - -typedef enum { - RIL_CDMA_SMS_DIGIT_MODE_4_BIT = 0, /* DTMF digits */ - RIL_CDMA_SMS_DIGIT_MODE_8_BIT = 1, - RIL_CDMA_SMS_DIGIT_MODE_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_DigitMode; - -typedef enum { - RIL_CDMA_SMS_NUMBER_MODE_NOT_DATA_NETWORK = 0, - RIL_CDMA_SMS_NUMBER_MODE_DATA_NETWORK = 1, - RIL_CDMA_SMS_NUMBER_MODE_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_NumberMode; - -typedef enum { - RIL_CDMA_SMS_NUMBER_TYPE_UNKNOWN = 0, - RIL_CDMA_SMS_NUMBER_TYPE_INTERNATIONAL_OR_DATA_IP = 1, - /* INTERNATIONAL is used when number mode is not data network address. - * DATA_IP is used when the number mode is data network address - */ - RIL_CDMA_SMS_NUMBER_TYPE_NATIONAL_OR_INTERNET_MAIL = 2, - /* NATIONAL is used when the number mode is not data network address. - * INTERNET_MAIL is used when the number mode is data network address. - * For INTERNET_MAIL, in the address data "digits", each byte contains - * an ASCII character. Examples are "x@y.com,a@b.com - ref TIA/EIA-637A 3.4.3.3 - */ - RIL_CDMA_SMS_NUMBER_TYPE_NETWORK = 3, - RIL_CDMA_SMS_NUMBER_TYPE_SUBSCRIBER = 4, - RIL_CDMA_SMS_NUMBER_TYPE_ALPHANUMERIC = 5, - /* GSM SMS: address value is GSM 7-bit chars */ - RIL_CDMA_SMS_NUMBER_TYPE_ABBREVIATED = 6, - RIL_CDMA_SMS_NUMBER_TYPE_RESERVED_7 = 7, - RIL_CDMA_SMS_NUMBER_TYPE_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_NumberType; - -typedef enum { - RIL_CDMA_SMS_NUMBER_PLAN_UNKNOWN = 0, - RIL_CDMA_SMS_NUMBER_PLAN_TELEPHONY = 1, /* CCITT E.164 and E.163, including ISDN plan */ - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_2 = 2, - RIL_CDMA_SMS_NUMBER_PLAN_DATA = 3, /* CCITT X.121 */ - RIL_CDMA_SMS_NUMBER_PLAN_TELEX = 4, /* CCITT F.69 */ - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_5 = 5, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_6 = 6, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_7 = 7, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_8 = 8, - RIL_CDMA_SMS_NUMBER_PLAN_PRIVATE = 9, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_10 = 10, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_11 = 11, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_12 = 12, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_13 = 13, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_14 = 14, - RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_15 = 15, - RIL_CDMA_SMS_NUMBER_PLAN_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_NumberPlan; - -typedef struct { - RIL_CDMA_SMS_DigitMode digit_mode; - /* Indicates 4-bit or 8-bit */ - RIL_CDMA_SMS_NumberMode number_mode; - /* Used only when digitMode is 8-bit */ - RIL_CDMA_SMS_NumberType number_type; - /* Used only when digitMode is 8-bit. - * To specify an international address, use the following: - * digitMode = RIL_CDMA_SMS_DIGIT_MODE_8_BIT - * numberMode = RIL_CDMA_SMS_NOT_DATA_NETWORK - * numberType = RIL_CDMA_SMS_NUMBER_TYPE_INTERNATIONAL_OR_DATA_IP - * numberPlan = RIL_CDMA_SMS_NUMBER_PLAN_TELEPHONY - * numberOfDigits = number of digits - * digits = ASCII digits, e.g. '1', '2', '3'3, '4', and '5' - */ - RIL_CDMA_SMS_NumberPlan number_plan; - /* Used only when digitMode is 8-bit */ - unsigned char number_of_digits; - unsigned char digits[ RIL_CDMA_SMS_ADDRESS_MAX ]; - /* Each byte in this array represnts a 40bit or 8-bit digit of address data */ -} RIL_CDMA_SMS_Address; - -typedef enum { - RIL_CDMA_SMS_SUBADDRESS_TYPE_NSAP = 0, /* CCITT X.213 or ISO 8348 AD2 */ - RIL_CDMA_SMS_SUBADDRESS_TYPE_USER_SPECIFIED = 1, /* e.g. X.25 */ - RIL_CDMA_SMS_SUBADDRESS_TYPE_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_SubaddressType; - -typedef struct { - RIL_CDMA_SMS_SubaddressType subaddressType; - /* 1 means the last byte's lower 4 bits should be ignored */ - unsigned char odd; - unsigned char number_of_digits; - /* Each byte respresents a 8-bit digit of subaddress data */ - unsigned char digits[ RIL_CDMA_SMS_SUBADDRESS_MAX ]; -} RIL_CDMA_SMS_Subaddress; - -typedef struct { - int uTeleserviceID; - unsigned char bIsServicePresent; - int uServicecategory; - RIL_CDMA_SMS_Address sAddress; - RIL_CDMA_SMS_Subaddress sSubAddress; - int uBearerDataLen; - unsigned char aBearerData[ RIL_CDMA_SMS_BEARER_DATA_MAX ]; -} RIL_CDMA_SMS_Message; - -/* Used by RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE */ - -typedef enum { - RIL_CDMA_SMS_NO_ERROR = 0, - RIL_CDMA_SMS_ERROR = 1, - RIL_CDMA_SMS_ERROR_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_ErrorClass; - -typedef struct { - RIL_CDMA_SMS_ErrorClass uErrorClass; - int uSMSCauseCode; /* As defined in N.S00005, 6.5.2.125. - Currently, only 35 (resource shortage) and - 39 (other terminal problem) are reported. */ -} RIL_CDMA_SMS_Ack; - -/* Used by RIL_REQUEST_CDMA_SMS_GET_BROADCAST_CONFIG and - RIL_REQUEST_CDMA_SMS_SET_BROADCAST_CONFIG */ - -typedef struct { - int service_category; - int language; - unsigned char selected; -} RIL_CDMA_BroadcastSmsConfigInfo; - -/* Used by RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM */ - -typedef struct { - int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ - /* 0 = "REC UNREAD" */ - /* 1 = "REC READ" */ - /* 2 = "STO UNSENT" */ - /* 3 = "STO SENT" */ - - RIL_CDMA_SMS_Message message; -} RIL_CDMA_SMS_WriteArgs; - - -/* Used by RIL_REQUEST_ENCODE_CDMA_SMS and RIL_REQUEST_DECODE_CDMA_SMS*/ - -#define RIL_CDMA_SMS_UDH_MAX_SND_SIZE 128 -#define RIL_CDMA_SMS_UDH_EO_DATA_SEGMENT_MAX 131 /* 140 - 3 - 6 */ -#define RIL_CDMA_SMS_MAX_UD_HEADERS 7 -#define RIL_CDMA_SMS_USER_DATA_MAX 229 -#define RIL_CDMA_SMS_ADDRESS_MAX 36 -#define RIL_CDMA_SMS_UDH_LARGE_PIC_SIZE 128 -#define RIL_CDMA_SMS_UDH_SMALL_PIC_SIZE 32 -#define RIL_CDMA_SMS_UDH_VAR_PIC_SIZE 134 -#define RIL_CDMA_SMS_UDH_ANIM_NUM_BITMAPS 4 -#define RIL_CDMA_SMS_UDH_LARGE_BITMAP_SIZE 32 -#define RIL_CDMA_SMS_UDH_SMALL_BITMAP_SIZE 8 -#define RIL_CDMA_SMS_UDH_OTHER_SIZE 226 -#define RIL_CDMA_SMS_IP_ADDRESS_SIZE 4 - -/* ------------------- */ -/* ---- User Data ---- */ -/* ------------------- */ -typedef enum { - RIL_CDMA_SMS_UDH_CONCAT_8 = 0x00, - RIL_CDMA_SMS_UDH_SPECIAL_SM, - /* 02 - 03 Reserved */ - RIL_CDMA_SMS_UDH_PORT_8 = 0x04, - RIL_CDMA_SMS_UDH_PORT_16, - RIL_CDMA_SMS_UDH_SMSC_CONTROL, - RIL_CDMA_SMS_UDH_SOURCE, - RIL_CDMA_SMS_UDH_CONCAT_16, - RIL_CDMA_SMS_UDH_WCMP, - RIL_CDMA_SMS_UDH_TEXT_FORMATING, - RIL_CDMA_SMS_UDH_PRE_DEF_SOUND, - RIL_CDMA_SMS_UDH_USER_DEF_SOUND, - RIL_CDMA_SMS_UDH_PRE_DEF_ANIM, - RIL_CDMA_SMS_UDH_LARGE_ANIM, - RIL_CDMA_SMS_UDH_SMALL_ANIM, - RIL_CDMA_SMS_UDH_LARGE_PICTURE, - RIL_CDMA_SMS_UDH_SMALL_PICTURE, - RIL_CDMA_SMS_UDH_VAR_PICTURE, - - RIL_CDMA_SMS_UDH_USER_PROMPT = 0x13, - RIL_CDMA_SMS_UDH_EXTENDED_OBJECT = 0x14, - - /* 15 - 1F Reserved for future EMS */ - - RIL_CDMA_SMS_UDH_RFC822 = 0x20, - - /* 21 - 6F Reserved for future use */ - /* 70 - 7f Reserved for (U)SIM Toolkit Security Headers */ - /* 80 - 9F SME to SME specific use */ - /* A0 - BF Reserved for future use */ - /* C0 - DF SC specific use */ - /* E0 - FF Reserved for future use */ - - RIL_CDMA_SMS_UDH_OTHER = 0xFFFF, /* For unsupported or proprietary headers */ - RIL_CDMA_SMS_UDH_ID_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ - -} RIL_CDMA_SMS_UdhId; - -typedef struct { - /*indicates the reference number for a particular concatenated short message. */ - /*it is constant for every short message which makes up a particular concatenated short message*/ - unsigned char msg_ref; - - /*indicates the total number of short messages within the concatenated short message. - The value shall start at 1 and remain constant for every - short message which makes up the concatenated short message. - if it is 0 then the receiving entity shall ignore the whole Information Element*/ - unsigned char total_sm; - - /* - * it indicates the sequence number of a particular short message within the concatenated short - * message. The value shall start at 1 and increment by one for every short message sent - * within the concatenated short message. If the value is zero or the value is - * greater than the value in octet 2 then the receiving - * entity shall ignore the whole Information Element. - */ - unsigned char seq_num; -} RIL_CDMA_SMS_UdhConcat8; - -/* GW message waiting actions -*/ -typedef enum { - RIL_CDMA_SMS_GW_MSG_WAITING_NONE, - RIL_CDMA_SMS_GW_MSG_WAITING_DISCARD, - RIL_CDMA_SMS_GW_MSG_WAITING_STORE, - RIL_CDMA_SMS_GW_MSG_WAITING_NONE_1111, - RIL_CDMA_SMS_GW_MSG_WAITING_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_GWMsgWaiting; - -/* GW message waiting types -*/ -typedef enum { - RIL_CDMA_SMS_GW_MSG_WAITING_VOICEMAIL, - RIL_CDMA_SMS_GW_MSG_WAITING_FAX, - RIL_CDMA_SMS_GW_MSG_WAITING_EMAIL, - RIL_CDMA_SMS_GW_MSG_WAITING_OTHER, - RIL_CDMA_SMS_GW_MSG_WAITING_KIND_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_GWMsgWaitingKind; - -typedef struct { - RIL_CDMA_SMS_GWMsgWaiting msg_waiting; - RIL_CDMA_SMS_GWMsgWaitingKind msg_waiting_kind; - - /*it indicates the number of messages of the type specified in Octet 1 waiting.*/ - unsigned char message_count; -} RIL_CDMA_SMS_UdhSpecialSM; - -typedef struct { - unsigned char dest_port; - unsigned char orig_port; -} RIL_CDMA_SMS_UdhWap8; - -typedef struct { - unsigned short dest_port; - unsigned short orig_port; -} RIL_CDMA_SMS_UdhWap16; - -typedef struct { - unsigned short msg_ref; - unsigned char total_sm; - unsigned char seq_num; - -} RIL_CDMA_SMS_UdhConcat16; - -typedef enum { - RIL_CDMA_SMS_UDH_LEFT_ALIGNMENT = 0, - RIL_CDMA_SMS_UDH_CENTER_ALIGNMENT, - RIL_CDMA_SMS_UDH_RIGHT_ALIGNMENT, - RIL_CDMA_SMS_UDH_DEFAULT_ALIGNMENT, - RIL_CDMA_SMS_UDH_MAX_ALIGNMENT, - RIL_CDMA_SMS_UDH_ALIGNMENT_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_UdhAlignment; - -typedef enum { - RIL_CDMA_SMS_UDH_FONT_NORMAL = 0, - RIL_CDMA_SMS_UDH_FONT_LARGE, - RIL_CDMA_SMS_UDH_FONT_SMALL, - RIL_CDMA_SMS_UDH_FONT_RESERVED, - RIL_CDMA_SMS_UDH_FONT_MAX, - RIL_CDMA_SMS_UDH_FONT_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_UdhFontSize; - -typedef enum { - RIL_CDMA_SMS_UDH_TEXT_COLOR_BLACK = 0x0, - RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_GREY = 0x1, - RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_RED = 0x2, - RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_YELLOW = 0x3, - RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_GREEN = 0x4, - RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_CYAN = 0x5, - RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_BLUE = 0x6, - RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_MAGENTA = 0x7, - RIL_CDMA_SMS_UDH_TEXT_COLOR_GREY = 0x8, - RIL_CDMA_SMS_UDH_TEXT_COLOR_WHITE = 0x9, - RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_RED = 0xA, - RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_YELLOW = 0xB, - RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_GREEN = 0xC, - RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_CYAN = 0xD, - RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_BLUE = 0xE, - RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_MAGENTA = 0xF, - RIL_CDMA_SMS_UDH_TEXT_COLOR_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_UdhTextColor; - -typedef struct { - unsigned char start_position; - unsigned char text_formatting_length; - RIL_CDMA_SMS_UdhAlignment alignment_type ; /*bit 0 and bit 1*/ - RIL_CDMA_SMS_UdhFontSize font_size ; /*bit 3 and bit 2*/ - unsigned char style_bold; /*bit 4 */ - unsigned char style_italic; /*bit 5 */ - unsigned char style_underlined; /*bit 6 */ - unsigned char style_strikethrough; /*bit 7 */ - - /* if FALSE, ignore the following color information */ - unsigned char is_color_present; - RIL_CDMA_SMS_UdhTextColor text_color_foreground; - RIL_CDMA_SMS_UdhTextColor text_color_background; - -} RIL_CDMA_SMS_UdhTextFormating; - -/* Predefined sound -*/ -typedef struct { - unsigned char position; - unsigned char snd_number; -} RIL_CDMA_SMS_UdhPreDefSound; - -/* User Defined sound -*/ -typedef struct { - unsigned char data_length; - unsigned char position; - unsigned char user_def_sound[RIL_CDMA_SMS_UDH_MAX_SND_SIZE]; -} RIL_CDMA_SMS_UdhUserDefSound; - -/* Large picture -*/ -typedef struct { - unsigned char position; - unsigned char data[RIL_CDMA_SMS_UDH_LARGE_PIC_SIZE]; -} RIL_CDMA_SMS_UdhLargePictureData; - -/* Small picture -*/ -typedef struct { - unsigned char position; - unsigned char data[RIL_CDMA_SMS_UDH_SMALL_PIC_SIZE]; -} RIL_CDMA_SMS_UdhSmallPictureData; - -/* Variable length picture -*/ -typedef struct { - unsigned char position; - unsigned char width; /* Number of pixels - Should be a mutliple of 8 */ - unsigned char height; - unsigned char data[RIL_CDMA_SMS_UDH_VAR_PIC_SIZE]; -} RIL_CDMA_SMS_UdhVarPicture; - -/* Predefined animation -*/ -typedef struct { - unsigned char position; - unsigned char animation_number; -} RIL_CDMA_SMS_UdhPreDefAnim; - -/* Large animation -*/ -typedef struct { - unsigned char position; - unsigned char data[RIL_CDMA_SMS_UDH_ANIM_NUM_BITMAPS][RIL_CDMA_SMS_UDH_LARGE_BITMAP_SIZE]; -} RIL_CDMA_SMS_UdhLargeAnim; - -/* Small animation -*/ -typedef struct { - unsigned char position; - unsigned char data[RIL_CDMA_SMS_UDH_ANIM_NUM_BITMAPS][RIL_CDMA_SMS_UDH_SMALL_BITMAP_SIZE]; -} RIL_CDMA_SMS_UdhSmallAnim; - -/* User Prompt Indicator UDH -*/ -typedef struct { - unsigned char number_of_objects; - /* Number of objects of the same kind that follow this header which will - ** be stitched together by the applications. For example, 5 small pictures - ** are to be stitched together horizontally, or 6 iMelody tones are to be - ** connected together with intermediate iMelody header and footer ignored. - ** Allowed objects to be stitched: - ** - Images (small, large, variable) - ** - User defined sounds - */ -} RIL_CDMA_SMS_UdhUserPrompt; - -typedef struct { - unsigned char length; - - unsigned char data[RIL_CDMA_SMS_UDH_EO_DATA_SEGMENT_MAX]; - /* RIL_CDMA_SMS_UDH_EO_VCARD: See http://www.imc.org/pdi/vcard-21.doc for payload */ - /* RIL_CDMA_SMS_UDH_EO_VCALENDAR: See http://www.imc.org/pdi/vcal-10.doc */ - /* Or: Unsupported/proprietary extended objects */ - -} RIL_CDMA_SMS_UdhEoContent; - -/* Extended Object UDH -*/ -/* Extended Object IDs/types -*/ -typedef enum { - RIL_CDMA_SMS_UDH_EO_VCARD = 0x09, - RIL_CDMA_SMS_UDH_EO_VCALENDAR = 0x0A, - RIL_CDMA_SMS_UDH_EO_MAX32 = 0x10000000 /* Force constant ENUM size in structures */ -} RIL_CDMA_SMS_UdhEoId; - -typedef struct { - /* Extended objects are to be used together with 16-bit concatenation - ** UDH. The max number of segments supported for E.O. is 8 at least. - */ - RIL_CDMA_SMS_UdhEoContent content; - - unsigned char first_segment; - /* The following fields are only present in the first segment of a - ** concatenated SMS message. - */ - unsigned char reference; - /* Identify those extended object segments which should be linked together - */ - unsigned short length; - /* Length of the whole extended object data - */ - unsigned char control; - RIL_CDMA_SMS_UdhEoId type; - unsigned short position; - /* Absolute position of the E.O. in the whole text after concatenation, - ** starting from 1. - */ -} RIL_CDMA_SMS_UdhEo; - -typedef struct { - RIL_CDMA_SMS_UdhId header_id; - unsigned char header_length; - unsigned char data[RIL_CDMA_SMS_UDH_OTHER_SIZE]; -} RIL_CDMA_SMS_UdhOther; - -typedef struct { - unsigned char header_length; -} RIL_CDMA_SMS_UdhRfc822; - -typedef struct { - RIL_CDMA_SMS_UdhId header_id; - - union { - RIL_CDMA_SMS_UdhConcat8 concat_8; // 00 - - RIL_CDMA_SMS_UdhSpecialSM special_sm; // 01 - RIL_CDMA_SMS_UdhWap8 wap_8; // 04 - RIL_CDMA_SMS_UdhWap16 wap_16; // 05 - RIL_CDMA_SMS_UdhConcat16 concat_16; // 08 - RIL_CDMA_SMS_UdhTextFormating text_formating; // 0a - RIL_CDMA_SMS_UdhPreDefSound pre_def_sound; // 0b - RIL_CDMA_SMS_UdhUserDefSound user_def_sound; // 0c - RIL_CDMA_SMS_UdhPreDefAnim pre_def_anim; // 0d - RIL_CDMA_SMS_UdhLargeAnim large_anim; // 0e - RIL_CDMA_SMS_UdhSmallAnim small_anim; // 0f - RIL_CDMA_SMS_UdhLargePictureData large_picture; // 10 - RIL_CDMA_SMS_UdhSmallPictureData small_picture; // 11 - RIL_CDMA_SMS_UdhVarPicture var_picture; // 12 - - RIL_CDMA_SMS_UdhUserPrompt user_prompt; // 13 - RIL_CDMA_SMS_UdhEo eo; // 14 - - RIL_CDMA_SMS_UdhRfc822 rfc822; // 20 - RIL_CDMA_SMS_UdhOther other; - - }u; -} RIL_CDMA_SMS_Udh; - -/* ----------------------------- */ -/* -- User data encoding type -- */ -/* ----------------------------- */ -typedef enum { - RIL_CDMA_SMS_ENCODING_OCTET = 0, /* 8-bit */ - RIL_CDMA_SMS_ENCODING_IS91EP, /* varies */ - RIL_CDMA_SMS_ENCODING_ASCII, /* 7-bit */ - RIL_CDMA_SMS_ENCODING_IA5, /* 7-bit */ - RIL_CDMA_SMS_ENCODING_UNICODE, /* 16-bit */ - RIL_CDMA_SMS_ENCODING_SHIFT_JIS, /* 8 or 16-bit */ - RIL_CDMA_SMS_ENCODING_KOREAN, /* 8 or 16-bit */ - RIL_CDMA_SMS_ENCODING_LATIN_HEBREW, /* 8-bit */ - RIL_CDMA_SMS_ENCODING_LATIN, /* 8-bit */ - RIL_CDMA_SMS_ENCODING_GSM_7_BIT_DEFAULT, /* 7-bit */ - RIL_CDMA_SMS_ENCODING_MAX32 = 0x10000000 - -} RIL_CDMA_SMS_UserDataEncoding; - -/* ------------------------ */ -/* -- IS-91 EP data type -- */ -/* ------------------------ */ -typedef enum { - RIL_CDMA_SMS_IS91EP_VOICE_MAIL = 0x82, - RIL_CDMA_SMS_IS91EP_SHORT_MESSAGE_FULL = 0x83, - RIL_CDMA_SMS_IS91EP_CLI_ORDER = 0x84, - RIL_CDMA_SMS_IS91EP_SHORT_MESSAGE = 0x85, - RIL_CDMA_SMS_IS91EP_MAX32 = 0x10000000 - -} RIL_CDMA_SMS_IS91EPType; - -typedef struct { - /* NOTE: If message_id.udh_present == TRUE: - ** 'num_headers' is the number of User Data Headers (UDHs), - ** and 'headers' include all those headers. - */ - unsigned char num_headers; - RIL_CDMA_SMS_Udh headers[RIL_CDMA_SMS_MAX_UD_HEADERS]; - - RIL_CDMA_SMS_UserDataEncoding encoding; - RIL_CDMA_SMS_IS91EPType is91ep_type; - - /*---------------------------------------------------------------------- - 'data_len' indicates the valid number of bytes in the 'data' array. - - 'padding_bits' (0-7) indicates how many bits in the last byte of 'data' - are invalid bits. This parameter is only used for Mobile-Originated - messages. There is no way for the API to tell how many padding bits - exist in the received message. Instead, the application can find out how - many padding bits exist in the user data when decoding the user data. - - 'data' has the raw bits of the user data field of the SMS message. - The client software should decode the raw user data according to its - supported encoding types and languages. - - EXCEPTION 1: CMT-91 user data raw bits are first translated into BD fields - (e.g. num_messages, callback, etc.) The translated user data field in - VMN and Short Message is in the form of ASCII characters, each occupying - a byte in the resulted 'data'. - - EXCEPTION 2: GSM 7-bit Default characters are decoded so that each byte - has one 7-bit GSM character. - - 'number_of_digits' is the number of digits/characters (7, 8, 16, or - whatever bits) in the raw user data, which can be used by the client - when decoding the user data according to the encoding type and language. - -------------------------------------------------------------------------*/ - unsigned char data_len; - unsigned char padding_bits; - unsigned char data[ RIL_CDMA_SMS_USER_DATA_MAX ]; - unsigned char number_of_digits; - -} RIL_CDMA_SMS_CdmaUserData; - -/* -------------------- */ -/* ---- Message Id ---- */ -/* -------------------- */ -typedef enum { - RIL_CDMA_SMS_BD_TYPE_RESERVED_0 = 0, - RIL_CDMA_SMS_BD_TYPE_DELIVER, /* MT only */ - RIL_CDMA_SMS_BD_TYPE_SUBMIT, /* MO only */ - RIL_CDMA_SMS_BD_TYPE_CANCELLATION, /* MO only */ - RIL_CDMA_SMS_BD_TYPE_DELIVERY_ACK, /* MT only */ - RIL_CDMA_SMS_BD_TYPE_USER_ACK, /* MT & MO */ - RIL_CDMA_SMS_BD_TYPE_READ_ACK, /* MT & MO */ - RIL_CDMA_SMS_BD_TYPE_MAX32 = 0x10000000 - -} RIL_CDMA_SMS_BdMessageType; - -typedef unsigned int RIL_CDMA_SMS_MessageNumber; - -typedef struct { - RIL_CDMA_SMS_BdMessageType type; - RIL_CDMA_SMS_MessageNumber id_number; - unsigned char udh_present; - /* NOTE: if FEATURE_SMS_UDH is not defined, - ** udh_present should be ignored. - */ -} RIL_CDMA_SMS_MessageId; - -typedef unsigned char RIL_CDMA_SMS_UserResponse; - -/* ------------------- */ -/* ---- Timestamp ---- */ -/* ------------------- */ -typedef struct { - /* If 'year' is between 96 and 99, the actual year is 1900 + 'year'; - if 'year' is between 00 and 95, the actual year is 2000 + 'year'. - NOTE: Each field has two BCD digits and byte arrangement is <MSB, ... ,LSB> - */ - unsigned char year; /* 0x00-0x99 */ - unsigned char month; /* 0x01-0x12 */ - unsigned char day; /* 0x01-0x31 */ - unsigned char hour; /* 0x00-0x23 */ - unsigned char minute; /* 0x00-0x59 */ - unsigned char second; /* 0x00-0x59 */ - signed char timezone; /* +/-, [-48,+48] number of 15 minutes - GW only */ -} RIL_CDMA_SMS_Timestamp; - -/* ------------------ */ -/* ---- Priority ---- */ -/* ------------------ */ -typedef enum { - RIL_CDMA_SMS_PRIORITY_NORMAL = 0, - RIL_CDMA_SMS_PRIORITY_INTERACTIVE, - RIL_CDMA_SMS_PRIORITY_URGENT, - RIL_CDMA_SMS_PRIORITY_EMERGENCY, - RIL_CDMA_SMS_PRIORITY_MAX32 = 0x10000000 - -} RIL_CDMA_SMS_Priority; - -/* ----------------- */ -/* ---- Privacy ---- */ -/* ----------------- */ -typedef enum { - RIL_CDMA_SMS_PRIVACY_NORMAL = 0, - RIL_CDMA_SMS_PRIVACY_RESTRICTED, - RIL_CDMA_SMS_PRIVACY_CONFIDENTIAL, - RIL_CDMA_SMS_PRIVACY_SECRET, - RIL_CDMA_SMS_PRIVACY_MAX32 = 0x10000000 - -} RIL_CDMA_SMS_Privacy; - -/* ---------------------- */ -/* ---- Reply option ---- */ -/* ---------------------- */ -typedef struct { - /* whether user ack is requested - */ - unsigned char user_ack_requested; - - /* whether delivery ack is requested. - Should be FALSE for incoming messages. - */ - unsigned char delivery_ack_requested; - - /* Message originator requests the receiving phone to send back a READ_ACK - ** message automatically when the user reads the received message. - */ - unsigned char read_ack_requested; - -} RIL_CDMA_SMS_ReplyOption; - -typedef enum { - RIL_CDMA_SMS_ALERT_MODE_DEFAULT = 0, - RIL_CDMA_SMS_ALERT_MODE_LOW_PRIORITY = 1, - RIL_CDMA_SMS_ALERT_MODE_MEDIUM_PRIORITY = 2, - RIL_CDMA_SMS_ALERT_MODE_HIGH_PRIORITY = 3, - - /* For pre-IS637A implementations, alert_mode only has values of True/False: - */ - RIL_CDMA_SMS_ALERT_MODE_OFF = 0, - RIL_CDMA_SMS_ALERT_MODE_ON = 1 - -} RIL_CDMA_SMS_AlertMode; - -/* ------------------ */ -/* ---- Language ---- */ -/* ------------------ */ -typedef enum { - RIL_CDMA_SMS_LANGUAGE_UNSPECIFIED = 0, - RIL_CDMA_SMS_LANGUAGE_ENGLISH, - RIL_CDMA_SMS_LANGUAGE_FRENCH, - RIL_CDMA_SMS_LANGUAGE_SPANISH, - RIL_CDMA_SMS_LANGUAGE_JAPANESE, - RIL_CDMA_SMS_LANGUAGE_KOREAN, - RIL_CDMA_SMS_LANGUAGE_CHINESE, - RIL_CDMA_SMS_LANGUAGE_HEBREW, - RIL_CDMA_SMS_LANGUAGE_MAX32 = 0x10000000 - -} RIL_CDMA_SMS_Language; - -/* ---------------------------------- */ -/* ---------- Display Mode ---------- */ -/* ---------------------------------- */ -typedef enum { - RIL_CDMA_SMS_DISPLAY_MODE_IMMEDIATE = 0, - RIL_CDMA_SMS_DISPLAY_MODE_DEFAULT = 1, - RIL_CDMA_SMS_DISPLAY_MODE_USER_INVOKE = 2, - RIL_CDMA_SMS_DISPLAY_MODE_RESERVED = 3 -} RIL_CDMA_SMS_DisplayMode; - -/* IS-637B parameters/fields -*/ - -/* ---------------------------------- */ -/* ---------- Delivery Status ------- */ -/* ---------------------------------- */ -typedef enum { - RIL_CDMA_SMS_DELIVERY_STATUS_ACCEPTED = 0, /* ERROR_CLASS_NONE */ - RIL_CDMA_SMS_DELIVERY_STATUS_DEPOSITED_TO_INTERNET = 1, /* ERROR_CLASS_NONE */ - RIL_CDMA_SMS_DELIVERY_STATUS_DELIVERED = 2, /* ERROR_CLASS_NONE */ - RIL_CDMA_SMS_DELIVERY_STATUS_CANCELLED = 3, /* ERROR_CLASS_NONE */ - - RIL_CDMA_SMS_DELIVERY_STATUS_NETWORK_CONGESTION = 4, /* ERROR_CLASS_TEMP & PERM */ - RIL_CDMA_SMS_DELIVERY_STATUS_NETWORK_ERROR = 5, /* ERROR_CLASS_TEMP & PERM */ - RIL_CDMA_SMS_DELIVERY_STATUS_CANCEL_FAILED = 6, /* ERROR_CLASS_PERM */ - RIL_CDMA_SMS_DELIVERY_STATUS_BLOCKED_DESTINATION = 7, /* ERROR_CLASS_PERM */ - RIL_CDMA_SMS_DELIVERY_STATUS_TEXT_TOO_LONG = 8, /* ERROR_CLASS_PERM */ - RIL_CDMA_SMS_DELIVERY_STATUS_DUPLICATE_MESSAGE = 9, /* ERROR_CLASS_PERM */ - RIL_CDMA_SMS_DELIVERY_STATUS_INVALID_DESTINATION = 10, /* ERROR_CLASS_PERM */ - RIL_CDMA_SMS_DELIVERY_STATUS_MESSAGE_EXPIRED = 13, /* ERROR_CLASS_PERM */ - - RIL_CDMA_SMS_DELIVERY_STATUS_UNKNOWN_ERROR = 0x1F /* ERROR_CLASS_PERM */ - - /* All the other values are reserved */ - -} RIL_CDMA_SMS_DeliveryStatusE; - -typedef struct { - RIL_CDMA_SMS_ErrorClass error_class; - RIL_CDMA_SMS_DeliveryStatusE status; -} RIL_CDMA_SMS_DeliveryStatus; - -typedef struct { - unsigned char address[RIL_CDMA_SMS_IP_ADDRESS_SIZE]; - unsigned char is_valid; -} RIL_CDMA_SMS_IpAddress; - -/* This special parameter captures any unrecognized/proprietary parameters -*/ -typedef struct { - unsigned char input_other_len; - unsigned char desired_other_len; /* used during decoding */ - unsigned char * other_data; -} RIL_CDMA_SMS_OtherParm; - -typedef struct { - /* the mask indicates which fields are present in this message */ - unsigned int mask; - - RIL_CDMA_SMS_MessageId message_id; - RIL_CDMA_SMS_CdmaUserData user_data; - RIL_CDMA_SMS_UserResponse user_response; - RIL_CDMA_SMS_Timestamp mc_time; - RIL_CDMA_SMS_Timestamp validity_absolute; - RIL_CDMA_SMS_Timestamp validity_relative; - RIL_CDMA_SMS_Timestamp deferred_absolute; - RIL_CDMA_SMS_Timestamp deferred_relative; - RIL_CDMA_SMS_Priority priority; - RIL_CDMA_SMS_Privacy privacy; - RIL_CDMA_SMS_ReplyOption reply_option; - unsigned char num_messages; /* the actual value; not BCDs */ - RIL_CDMA_SMS_AlertMode alert_mode; - /* For pre-IS-637A implementations, alert_mode is either Off or On. */ - RIL_CDMA_SMS_Language language; - RIL_CDMA_SMS_Address callback; - RIL_CDMA_SMS_DisplayMode display_mode; - - RIL_CDMA_SMS_DeliveryStatus delivery_status; - unsigned int deposit_index; - - RIL_CDMA_SMS_IpAddress ip_address; - unsigned char rsn_no_notify; - - /* See function comments of wms_ts_decode() and - ** wms_ts_decode_cdma_bd_with_other() for details regarding 'other' parameters - */ - RIL_CDMA_SMS_OtherParm other; - -} RIL_CDMA_SMS_ClientBd; - -typedef struct { - unsigned char length; /* length, in bytes, of the encoded SMS message */ - unsigned char * data; /* the encoded SMS message (max 255 bytes) */ -} RIL_CDMA_Encoded_SMS; - -#ifdef __cplusplus -} -#endif - -#endif /*ANDROID_RIL_CDMA_SMS_H*/ diff --git a/libril/telephony/ril_msim.h b/libril/telephony/ril_msim.h deleted file mode 100644 index 28c0e77..0000000 --- a/libril/telephony/ril_msim.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of The Linux Foundation, Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef ANDROID_RIL_MSIM_H -#define ANDROID_RIL_MSIM_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - RIL_UICC_SUBSCRIPTION_DEACTIVATE = 0, - RIL_UICC_SUBSCRIPTION_ACTIVATE = 1 -} RIL_UiccSubActStatus; - -typedef enum { - RIL_SUBSCRIPTION_1 = 0, - RIL_SUBSCRIPTION_2 = 1, - RIL_SUBSCRIPTION_3 = 2 -} RIL_SubscriptionType; - -typedef struct { - int slot; /* 0, 1, ... etc. */ - int app_index; /* array subscriptor from applications[RIL_CARD_MAX_APPS] in - RIL_REQUEST_GET_SIM_STATUS */ - RIL_SubscriptionType sub_type; /* Indicates subscription 1 or subscription 2 */ - RIL_UiccSubActStatus act_status; -} RIL_SelectUiccSub; - -#ifdef __cplusplus -} -#endif - -#endif /*ANDROID_RIL_MSIM_H*/ @@ -14,78 +14,13 @@ # limitations under the License. # -$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) - # overlays DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay vendor/extra/overlays/phone-1080p -# Boot animation -TARGET_SCREEN_HEIGHT := 1920 -TARGET_SCREEN_WIDTH := 1080 - -# Config scripts -PRODUCT_PACKAGES += \ - init.crda.sh \ - init.qcom.bt.sh \ - init.qcom.post_boot.sh \ - init.qcom.usb.sh \ - init.qcom.wifi.sh - -# Ramdisk -PRODUCT_PACKAGES += \ - fstab.qcom \ - init.qcom.rc \ - init.qcom.usb.rc \ - ueventd.qcom.rc - -# Recovery -PRODUCT_PACKAGES += \ - init.recovery.qcom.rc - -# Audio -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/audio/audio_policy.conf:system/etc/audio_policy.conf \ - $(LOCAL_PATH)/audio/snd_soc_msm_2x_Fusion3:system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3 - -PRODUCT_PACKAGES += \ - audio.a2dp.default \ - audio_policy.msm8960 \ - audio.primary.msm8960 \ - audio.r_submix.default \ - audio.usb.default \ - libaudio-resampler \ - tinymix - # Camera PRODUCT_PACKAGES += \ camera.msm8960 -# Charger -PRODUCT_PACKAGES += \ - charger_res_images_n1 \ - charger_n1 - -# Filesystem management tools -PRODUCT_PACKAGES += \ - make_ext4fs \ - e2fsck \ - setup_fs - -# GPS -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/gps/gps.conf:system/etc/gps.conf \ - $(LOCAL_PATH)/gps/izat.conf:system/etc/izat.conf \ - $(LOCAL_PATH)/gps/sap.conf:system/etc/sap.conf - -# Graphics -PRODUCT_PACKAGES += \ - copybit.msm8960 \ - gralloc.msm8960 \ - hwcomposer.msm8960 \ - libgenlock \ - liboverlay \ - memtrack.msm8960 - # Input device config PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/idc/y8c20x66a-rmi-ts.idc:system/usr/idc/y8c20x66a-rmi-ts.idc @@ -101,90 +36,13 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ $(LOCAL_PATH)/keylayout/keypad_8960.kl:system/usr/keylayout/keypad_8960.kl -# Keystore -PRODUCT_PACKAGES += \ - keystore.msm8960 - -# Lights -PRODUCT_PACKAGES += \ - lights.msm8960 - -# IPC router config -PRODUCT_COPY_FILES += \ - device/oppo/n1/configs/sec_config:system/etc/sec_config - # Media profile PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \ $(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml -# NFC packages -ifeq ($(TARGET_BUILD_VARIANT),user) - NFCEE_ACCESS_PATH := $(LOCAL_PATH)/configs/nfcee_access.xml -else - NFCEE_ACCESS_PATH := $(LOCAL_PATH)/configs/nfcee_access_debug.xml -endif -PRODUCT_COPY_FILES += \ - $(NFCEE_ACCESS_PATH):system/etc/nfcee_access.xml - -PRODUCT_PACKAGES += \ - nfc.msm8960 \ - libnfc \ - libnfc_jni \ - Nfc \ - Tag \ - com.android.nfc_extras - -# OMX -PRODUCT_PACKAGES += \ - libc2dcolorconvert \ - libdivxdrmdecrypt \ - libOmxCore \ - libOmxVdec \ - libOmxVenc \ - libOmxAacEnc \ - libOmxAmrEnc \ - libOmxEvrcEnc \ - libOmxQcelp13Enc \ - libstagefrighthw - -# Power -PRODUCT_PACKAGES += \ - power.msm8960 - -# QRNGD -PRODUCT_PACKAGES += qrngd - # Thermal config PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/thermald-8064-N1.conf:system/etc/thermald.conf \ - $(LOCAL_PATH)/configs/thermal-engine-8064.conf:system/etc/thermal-engine.conf - -# Torch -PRODUCT_PACKAGES += \ - Torch - -# USB -PRODUCT_PACKAGES += \ - com.android.future.usb.accessory - -# WiFi -PRODUCT_COPY_FILES += \ - device/oppo/n1/wifi/WCNSS_cfg.dat:system/vendor/firmware/wlan/prima/WCNSS_cfg.dat \ - device/oppo/n1/wifi/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \ - device/oppo/n1/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/wifi/WCNSS_qcom_wlan_nv.bin \ - device/oppo/n1/wifi/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \ - device/oppo/n1/wifi/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf - -PRODUCT_PACKAGES += \ - wcnss_service \ - crda \ - regulatory.bin \ - linville.key.pub.pem \ - libwfcu \ - conn_init \ - WCNSS_qcom_cfg.ini \ - WCNSS_qcom_wlan_nv.bin + $(LOCAL_PATH)/configs/thermald-8064-N1.conf:system/etc/thermald.conf # Init logos PRODUCT_PACKAGES += \ @@ -194,63 +52,8 @@ PRODUCT_PACKAGES += \ tpupdate.rle \ wlan.rle -# Set default USB interface -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ - persist.sys.usb.config=mtp - -# System properties -PRODUCT_PROPERTY_OVERRIDES += \ - com.qc.hardware=true \ - debug.egl.hw=1 \ - debug.mdpcomp.logs=0 \ - persist.hwc.mdpcomp.enable=true \ - persist.gps.qmienabled=true \ - persist.thermal.monitor=true \ - persist.timed.enable=true \ - ro.baseband.arch=mdm \ - ro.opengles.version=196608 \ - ro.product.wireless=WCN3660 \ - ro.qualcomm.bt.hci_transport=smd \ - ro.use_data_netmgrd=true \ - persist.data.netmgrd.qos.enable=true \ - wifi.interface=wlan0 \ - wifi.supplicant_scan_interval=15 - -# Permissions -PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \ - frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ - frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ - frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ - frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ - frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ - frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ - frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ - frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ - frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ - frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ - frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \ - frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \ - frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.compass.xml \ - frameworks/base/nfc-extras/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml \ - frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ - frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml \ - frameworks/native/data/etc/com.nxp.mifare.xml:system/etc/permissions/com.nxp.mifare.xml \ - frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ - frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml - -# Disable advertising this feature for now -# frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml - -# Device uses high-density artwork where available -PRODUCT_AAPT_CONFIG := normal hdpi xhdpi xxhdpi -PRODUCT_AAPT_PREF_CONFIG := xxhdpi - -# call dalvik heap config -$(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-dalvik-heap.mk) - -# call hwui memory config -$(call inherit-product-if-exists, frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk) - # call the proprietary setup $(call inherit-product-if-exists, vendor/oppo/n1/n1-vendor.mk) + +# Inherit from apq8064-common +$(call inherit-product, device/oppo/apq8064-common/apq8064.mk) diff --git a/nfc/Android.mk b/nfc/Android.mk deleted file mode 100644 index 84f20df..0000000 --- a/nfc/Android.mk +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2013 The CyanogenMod Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := nfc.msm8960 -LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw -LOCAL_SRC_FILES := nfc_hw.c -LOCAL_SHARED_LIBRARIES := liblog libcutils -LOCAL_MODULE_TAGS := optional -LOCAL_CFLAGS += -D$(TARGET_DEVICE) - -include $(BUILD_SHARED_LIBRARY) diff --git a/nfc/nfc_hw.c b/nfc/nfc_hw.c deleted file mode 100644 index 7d01640..0000000 --- a/nfc/nfc_hw.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2013 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include <errno.h> -#include <string.h> - -#include <hardware/hardware.h> -#include <hardware/nfc.h> - -static uint8_t pn544_eedata_settings[][4] = { - // DIFFERENTIAL_ANTENNA - - // RF Settings - {0x00,0x9B,0xD1,0x0D} // Tx consumption higher than 0x0D (average 50mA) - ,{0x00,0x9B,0xD2,0x24} // GSP setting for this threshold - ,{0x00,0x9B,0xD3,0x0A} // Tx consumption higher than 0x0A (average 40mA) - ,{0x00,0x9B,0xD4,0x22} // GSP setting for this threshold - ,{0x00,0x9B,0xD5,0x08} // Tx consumption higher than 0x08 (average 30mA) - ,{0x00,0x9B,0xD6,0x1E} // GSP setting for this threshold - ,{0x00,0x9B,0xDD,0x1C} // GSP setting for this threshold - ,{0x00,0x9B,0x84,0x13} // ANACM2 setting - - // Enable PBTF - ,{0x00,0x98,0x00,0x3F} // SECURE_ELEMENT_CONFIGURATION - No Secure Element - ,{0x00,0x9F,0x09,0x00} // SWP_PBTF_RFU - ,{0x00,0x9F,0x0A,0x05} // SWP_PBTF_RFLD --> RFLEVEL Detector for PBTF - ,{0x00,0x9E,0xD1,0xA1} // - - // Change RF Level Detector ANARFLDWU - ,{0x00,0x99,0x23,0x00} // Default Value is 0x01 - - // Low-power polling - ,{0x00,0x9E,0x74,0xB0} // Default Value is 0x00, bits 0->2: sensitivity (0==max, 6==min), - // bit 3: RFU, - // bits 4,5 hybrid low-power: # of low-power polls per regular poll - // bit 6: RFU - // bit 7: (0 -> disabled, 1 -> enabled) - ,{0x00,0x9E,0x7D,0xB0} // bits 0->3: RFU, - // bits 4,5: # retries after low power detection - // 0=1 retry, 1=2 retry, 2=3 retry, 3=4 retry - // bit 6: RFU, - // bit 7: Enable or disable retry mechanism (0: disable, 1: enable) - ,{0x00,0x9F,0x28,0x01} // bits 0->7: # of measurements per low-power poll - - // Polling Loop - Card Emulation Timeout - ,{0x00,0x9F,0x35,0x14} // Time for which PN544 stays in Card Emulation mode after leaving RF field - ,{0x00,0x9F,0x36,0x60} // Default value 0x0411 = 50 ms ---> New Value : 0x1460 = 250 ms - - //LLC Timer - ,{0x00,0x9C,0x31,0x00} // Guard host time-out in ms (MSB) - ,{0x00,0x9C,0x32,0xC8} // Guard host time-out in ms (LSB) - ,{0x00,0x9C,0x19,0x40} // Max RX retry (PN544=>host?) - ,{0x00,0x9C,0x1A,0x40} // Max TX retry (PN544=>host?) - - ,{0x00,0x9C,0x0C,0x00} // - ,{0x00,0x9C,0x0D,0x00} // - ,{0x00,0x9C,0x12,0x00} // - ,{0x00,0x9C,0x13,0x00} // - - // NFC-DEP Target Waiting Time (WT) - ,{0x00,0x98,0xA2,0x08} // Set to 0x08 as required by [digital] (default value: 09) - - //SE GPIO - ,{0x00, 0x98, 0x93, 0x40} - - // Set NFCT ATQA - ,{0x00, 0x98, 0x7D, 0x02} - ,{0x00, 0x98, 0x7E, 0x00} - - // Enable CEA detection mechanism - ,{0x00, 0x9F, 0xC8, 0x01} - // Set NFC-F poll RC=0x00 - ,{0x00, 0x9F, 0x9A, 0x00} - // Setting for EMD support for ISO 14443-4 Reader - ,{0x00,0x9F,0x09,0x00} // 0x00 - Disable EMD support, 0x01 - Enable EMD support -}; - -static int pn544_close(hw_device_t *dev) { - free(dev); - - return 0; -} - -/* - * Generic device handling - */ - -static int nfc_open(const hw_module_t* module, const char* name, - hw_device_t** device) { - if (strcmp(name, NFC_PN544_CONTROLLER) == 0) { - nfc_pn544_device_t *dev = calloc(1, sizeof(nfc_pn544_device_t)); - - dev->common.tag = HARDWARE_DEVICE_TAG; - dev->common.version = 0; - dev->common.module = (struct hw_module_t*) module; - dev->common.close = pn544_close; - - dev->num_eeprom_settings = sizeof(pn544_eedata_settings) / 4; - dev->eeprom_settings = (uint8_t*)pn544_eedata_settings; - dev->linktype = PN544_LINK_TYPE_I2C; - dev->device_node = "/dev/pn544"; - dev->enable_i2c_workaround = 0; - *device = (hw_device_t*) dev; - return 0; - } else { - return -EINVAL; - } -} - -static struct hw_module_methods_t nfc_module_methods = { - .open = nfc_open, -}; - -struct nfc_module_t HAL_MODULE_INFO_SYM = { - .common = { - .tag = HARDWARE_MODULE_TAG, - .version_major = 1, - .version_minor = 0, - .id = NFC_HARDWARE_MODULE_ID, - .name = "N1 NFC HW HAL", - .author = "The Android Open Source Project", - .methods = &nfc_module_methods, - }, -}; diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index a03ca84..1bb7cb6 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -19,9 +19,6 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <!-- If this is true, the screen will fade off. --> - <bool name="config_animateScreenLights">false</bool> - <!-- Flag indicating whether the we should enable the automatic brightness in Settings. Software implementation will be used if config_hardware_auto_brightness_available is not set --> <bool name="config_automatic_brightness_available">true</bool> @@ -88,133 +85,9 @@ that can be set by the user. --> <integer name="config_screenBrightnessDim">10</integer> - <!-- The duration (in milliseconds) that the radio will scan for a signal - when there's no network connection. If the scan doesn't timeout, use zero --> - <integer name="config_radioScanningTimeout">0</integer> - - <!-- List of regexpressions describing the interface (if any) that represent tetherable - USB interfaces. If the device doesn't want to support tething over USB this should - be empty. An example would be "usb.*" --> - <string-array translatable="false" name="config_tether_usb_regexs"> - <item>"usb\\d"</item> - <item>"rndis\\d"</item> - </string-array> - - <!-- List of regexpressions describing the interface (if any) that represent tetherable - Wifi interfaces. If the device doesn't want to support tethering over Wifi this - should be empty. An example would be "softap.*" --> - <string-array translatable="false" name="config_tether_wifi_regexs"> - <item>"wlan0"</item> - <item>"softap.*"</item> - </string-array> - - <!-- List of regexpressions describing the interface (if any) that represent tetherable - bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this - should be empty. --> - <string-array translatable="false" name="config_tether_bluetooth_regexs"> - <item>"bt-pan"</item> - </string-array> - - <!-- Array of allowable ConnectivityManager network types for tethering --> - <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or - [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH --> - <integer-array translatable="false" name="config_tether_upstream_types"> - <item>0</item> - <item>1</item> - <item>5</item> - <item>7</item> - </integer-array> - - <!-- If this is true, the screen will come on when you unplug usb/power/whatever. --> - <bool name="config_unplugTurnsOnScreen">true</bool> - - <!-- Boolean indicating whether the wifi chipset has dual frequency band support --> - <bool translatable="false" name="config_wifi_dual_band_support">true</bool> - - <!-- Boolean indicating whether the wifi chipset has background scan support --> - <bool translatable="false" name="config_wifi_background_scan_support">true</bool> - - <!-- This string array should be overridden by the device to present a list of network - attributes. This is used by the connectivity manager to decide which networks can coexist - based on the hardware --> - <!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx], - [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] --> - <!-- the 5th element "resore-time" indicates the number of milliseconds to delay - before automatically restore the default connection. Set -1 if the connection - does not require auto-restore. --> - <!-- the 6th element indicates boot-time dependency-met value. --> - <string-array translatable="false" name="networkAttributes"> - <item>"wifi,1,1,1,-1,true"</item> - <item>"mobile,0,0,0,-1,true"</item> - <item>"mobile_mms,2,0,2,60000,true"</item> - <item>"mobile_supl,3,0,2,60000,true"</item> - <item>"mobile_dun,4,0,2,60000,true"</item> - <item>"mobile_hipri,5,0,3,60000,true"</item> - <item>"mobile_fota,10,0,2,60000,true"</item> - <item>"mobile_ims,11,0,2,60000,true"</item> - <item>"mobile_cbs,12,0,2,60000,true"</item> - <item>"bluetooth,7,7,2,-1,true"</item> - </string-array> - - <!-- This string array should be overridden by the device to present a list of radio - attributes. This is used by the connectivity manager to decide which networks can coexist - based on the hardware --> - <!-- An Array of "[ConnectivityManager connectionType], - [# simultaneous connection types]" --> - <string-array translatable="false" name="radioAttributes"> - <item>"1,1"</item> - <item>"0,1"</item> - <item>"7,1"</item> - </string-array> - - <!-- Boolean indicating if restoring network selection should be skipped --> - <!-- The restoring is handled by modem if it is true --> - <bool translatable="false" name="skip_restoring_network_selection">true</bool> - - <!-- The default iface on which to monitor data use --> - <string name="config_datause_iface" translatable="false">rmnet_usb0</string> - - <!-- reference volume index for music stream to limit headphone volume and display warning --> - <integer name="config_safe_media_volume_index">7</integer> - - <!-- Hardware 'face' keys present on the device, stored as a bit field. - This integer should equal the sum of the corresponding value for each - of the following keys present: - 1 - Home - 2 - Back - 4 - Menu - 8 - Assistant (search) - 16 - App switch - For example, a device with Home, Back and Menu keys would set this - config to 7. --> - <integer name="config_deviceHardwareKeys">7</integer> - - <!-- reference volume index for music stream to limit headphone volume and display warning --> - <integer name="config_safe_media_volume_index">7</integer> - - <bool name="config_enableWifiDisplay">true</bool> - - <!-- Hardware 'face' keys present on the device, stored as a bit field. - This integer should equal the sum of the corresponding value for each - of the following keys present: - 1 - Home - 2 - Back - 4 - Menu - 8 - Assistant (search) - 16 - App switch - For example, a device with Home, Back and Menu keys would set this - config to 7. --> - <integer name="config_deviceHardwareKeys">7</integer> - - <!-- Is the device capable of hot swapping an ICC Card --> - <bool name="config_hotswapCapable">true</bool> - <!-- True if the gesture service should be started at system start --> <bool name="config_enableGestureService">true</bool> - <!-- Enable flashlight --> - <bool name="config_enableTorch">true</bool> - <!-- The list absolute paths of jar/apk files containing the device specific handlers, delimited by File.pathSeparator, which defaults to ":" on Android --> <!-- <string name="config_deviceHandlerLib" translatable="false">/system/app/ConfigPanel.apk</string> --> @@ -223,55 +96,4 @@ com.android.internal.os.DeviceKeyHandler interface. --> <!-- <string name="config_deviceKeyHandlerClass" translatable="false">com.cyanogenmod.settings.device.KeyHandler</string> --> - <!-- Control the behavior when the user long presses the home button. - 0 - Nothing - 1 - Menu key - 2 - Recent apps view in SystemUI - 3 - Launch assist intent - 4 - Voice Search - 5 - In-app Search - This needs to match the constants in - policy/src/com/android/internal/policy/impl/PhoneWindowManager.java - --> - <integer name="config_longPressOnHomeBehavior">3</integer> - - <!-- Control the behavior when the user double-taps the home button. - 0 - Nothing - 1 - Menu - 2 - Recent apps view in SystemUI - 3 - Launch assist intent - 4 - Voice Search - 5 - In-app Search - This needs to match the constants in - policy/src/com/android/internal/policy/impl/PhoneWindowManager.java - --> - <integer name="config_doubleTapOnHomeBehavior">2</integer> - - <!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. --> - <bool name="config_cellBroadcastAppLinks">true</bool> - - <!-- Make things go fast --> - <bool name="config_ui_enableFadingMarquee">false</bool> - - <!-- Performance profiles --> - <string name="config_perf_profile_prop">sys.perf.profile</string> - <string name="config_perf_profile_default_entry">1</string> - - <!-- Enable lockscreen translucent decor by default --> - <bool name="config_enableLockScreenTranslucentDecor">true</bool> - - <!-- Set to true if the wifi display supports compositing content stored - in gralloc protected buffers. For this to be true, there must exist - a protected hardware path for surface flinger to composite and send - protected buffers to the wifi display video encoder. - - If this flag is false, we advise applications not to use protected - buffers (if possible) when presenting content to a wifi display because - the content may be blanked. - - This flag controls whether the {@link Display#FLAG_SUPPORTS_PROTECTED_BUFFERS} - flag is set for wifi displays. - --> - <bool name="config_wifiDisplaySupportsProtectedBuffers">true</bool> - </resources> diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml deleted file mode 100644 index 245e78c..0000000 --- a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* -** Copyright 2013, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ ---> - -<!-- These resources are around just to allow their values to be customized - for different hardware and product builds. --> -<resources> - - <!-- Control whether status bar should distinguish HSPA data icon form UMTS - data icon on devices --> - <bool name="config_hspa_data_distinguishable">true</bool> - -</resources> - diff --git a/overlay/packages/apps/Phone b/overlay/packages/apps/Phone deleted file mode 120000 index 0f8d39e..0000000 --- a/overlay/packages/apps/Phone +++ /dev/null @@ -1 +0,0 @@ -../services/Telephony/
\ No newline at end of file diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml deleted file mode 100644 index 7eb7263..0000000 --- a/overlay/packages/apps/Settings/res/values/config.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2013 The CyanogenMod Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<resources> - <bool name="config_show_volumeRockerWake">true</bool> -</resources> diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml deleted file mode 100644 index 97bb447..0000000 --- a/overlay/packages/services/Telephony/res/values/config.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2013 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> - -<!-- shooteru-specific phone app resources. --> -<resources> - - <!-- Determine whether calls to mute the microphone in PhoneUtils - are routed through the android.media.AudioManager class (true) or through - the com.android.internal.telephony.Phone interface (false). --> - <bool name="send_mic_mute_to_AudioManager">true</bool> - - <!-- Flag indicating if the tty is enabled --> - <bool name="tty_enabled">true</bool> - -</resources> diff --git a/proprietary-files.txt b/proprietary-files.txt deleted file mode 100644 index cb90e84..0000000 --- a/proprietary-files.txt +++ /dev/null @@ -1,182 +0,0 @@ -# Misc executables -bin/btnvtool -bin/ds_fmc_appd -bin/hci_qcomm_init -bin/irsc_util -bin/mpdecision -bin/radish - -# Audio -lib/libacdbloader.so -lib/libaudcal.so -lib/libcsd-client.so - -# Thermal -bin/thermald -lib/libthermalclient.so - -# Camera -bin/mm-qcamera-daemon -lib/hw/camera.msm8960.so:lib/hw/vendor-camera.msm8960.so -lib/libgemini.so -lib/libimage-jpeg-enc-omx-comp.so -lib/libimage-omx-common.so -lib/libmercury.so -lib/libmmcamera_3a_legacy.so -lib/libmmcamera_faceproc.so -lib/libmmcamera_frameproc.so -lib/libmmcamera_hdr_lib.so -lib/libmmcamera_image_stab.so -lib/libmmcamera_imx091.so -lib/libmmcamera_interface2.so -lib/libmmcamera_interface.so -lib/libmmcamera_plugin.so -lib/libmmcamera_statsproc31.so -lib/libmmcamera_tintless_algo.so -lib/libmmcamera_tintless_wrapper.so -lib/libmmcamera_wavelet_lib.so -lib/libmmjpeg.so -lib/libmmjpeg_interface.so -lib/libmmstillomx.so -lib/liboemcamera.so - -# GPS --app/com.qualcomm.location.apk -bin/gsiff_daemon -etc/permissions/com.qualcomm.location.xml -lib/libgps.utils.so -lib/libloc_core.so -lib/libloc_api_v02.so -lib/libloc_ds_api.so -lib/libloc_eng.so -lib/libloc_xtra.so -lib/hw/gps.msm8960.so -vendor/lib/libgeofence.so -vendor/lib/libizat_core.so -vendor/lib/liblbs_core.so -vendor/lib/liblocationservice.so -vendor/lib/libulp2.so -vendor/lib/libquipc_os_api.so -vendor/lib/libquipc_ulp_adapter.so - -# Graphics -vendor/lib/egl/eglsubAndroid.so -vendor/lib/egl/libEGL_adreno.so -vendor/lib/egl/libGLESv1_CM_adreno.so -vendor/lib/egl/libGLESv2_adreno.so -vendor/lib/egl/libplayback_adreno.so -vendor/lib/egl/libq3dtools_adreno.so -vendor/lib/libadreno_utils.so -vendor/lib/libc2d30-a3xx.so -vendor/lib/libc2d30.so -vendor/lib/libC2D2.so -vendor/lib/libCB.so -vendor/lib/libgsl.so -vendor/lib/libllvm-a3xx.so -vendor/lib/librs_adreno_sha1.so -vendor/lib/librs_adreno.so -vendor/lib/libRSDriver_adreno.so -vendor/lib/libsc-a3xx.so - -# Graphics firmware -etc/firmware/a300_pfp.fw -etc/firmware/a300_pm4.fw -etc/firmware/vidc.b00 -etc/firmware/vidc.b01 -etc/firmware/vidc.b02 -etc/firmware/vidc.b03 -etc/firmware/vidc.mdt -etc/firmware/vidc_1080p.fw - -# Media -lib/libI420colorconvert.so -lib/libmm-color-convertor.so -lib/libExtendedExtractor.so - -# Network -lib/libcneapiclient.so - -# NFC -etc/firmware/libpn544_fw.so:vendor/firmware/libpn544_fw.so - -# Oppo NV -app/OppoNvProcess.apk -app/OppoRadioShutdown.apk -framework/qcnvitems.jar -etc/permissions/qcnvitems.xml -framework/qcrilhook.jar -etc/permissions/qcrilhook.xml -app/qcrilmsgtunnel.apk - -# Qualcomm framework -lib/libdsi_netctrl.so -lib/libdsutils.so -lib/libidl.so -lib/libqcci_legacy.so -lib/libqdi.so -lib/libqdp.so -lib/libqmi.so -lib/libqmi_client_qmux.so -lib/libqmi_csvt_srvc.so -lib/libqmiservices.so -vendor/lib/libdiag.so -vendor/lib/libqmi_cci.so -vendor/lib/libqmi_csi.so -vendor/lib/libqmi_common_so.so -vendor/lib/libqmi_encdec.so - -# Radio -bin/bridgemgrd -bin/efsks -bin/ks -bin/netmgrd -bin/nv_tee -bin/qcks -bin/qmuxd -bin/rmt_storage -lib/libnetmgr.so -lib/libril-qc-qmi-1.so -lib/libril-qcril-hook-oem.so - -# Sensors -bin/sensors.qcom -lib/hw/sensors.msm8960.so -lib/libAKM.so -lib/libsensor1.so -lib/libsensor_reg.so - -# DRM -bin/oemwvtest -bin/drmdiagapp -bin/qseecomd -lib/libdrmdecrypt.so -lib/libdrmdiag.so -lib/libdrmfs.so -lib/libdrmtime.so -lib/libQSEEComAPI.so -vendor/lib/libwvdrm_L3.so -vendor/lib/libwvm.so -vendor/lib/libWVStreamControlAPI_L3.so -vendor/lib/drm/libdrmwvmplugin.so -vendor/lib/mediadrm/libwvdrmengine.so - -# Misc --vendor/lib/libqc-opt.so -lib/libadsprpc.so - -# Postprocessing --app/PPPreference.apk -bin/mm-pp-daemon -lib/libmm-abl.so -lib/libmm-abl-oem.so - -# Time services -bin/time_daemon --lib/libtime_genoff.so - -# Keystore -vendor/firmware/keymaster/keymaster.b00 -vendor/firmware/keymaster/keymaster.b01 -vendor/firmware/keymaster/keymaster.b02 -vendor/firmware/keymaster/keymaster.b03 -vendor/firmware/keymaster/keymaster.mdt diff --git a/recovery.fstab b/recovery.fstab deleted file mode 100644 index 2d3eefa..0000000 --- a/recovery.fstab +++ /dev/null @@ -1,17 +0,0 @@ -# Android fstab file. -# The filesystem that contains the filesystem checker binary (typically /system) cannot -# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK - -#TODO: Add 'check' as fs_mgr_flags with data partition. -# Currently we dont have e2fsck compiled. So fs check would failed. - -#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> -/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults -/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults -/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait -/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,noatime wait,check -/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev wait,check -/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:radio_efs_file:s0 wait -/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,noatime,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384 - -/dev/block/platform/msm_sdcc.1/by-name/sdcard /sdcard vfat defaults wait,check diff --git a/rootdir/Android.mk b/rootdir/Android.mk deleted file mode 100644 index ada2112..0000000 --- a/rootdir/Android.mk +++ /dev/null @@ -1,115 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -# QCOM config scripts - -include $(CLEAR_VARS) -LOCAL_MODULE := init.crda.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.crda.sh -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.bt.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.bt.sh -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.btdun.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.btdun.sh -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.fm.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.fm.sh -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.post_boot.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.post_boot.sh -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.wifi.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.wifi.sh -include $(BUILD_PREBUILT) - -# Root scripts - -include $(CLEAR_VARS) -LOCAL_MODULE := hcidump.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/hcidump.sh -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.class_core.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.class_core.sh -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.usb.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.usb.sh -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) - -# Device init files - -include $(CLEAR_VARS) -LOCAL_MODULE := fstab.qcom -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/fstab.qcom -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.usb.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.usb.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := ueventd.qcom.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/ueventd.qcom.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.recovery.qcom.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.recovery.qcom.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom deleted file mode 100644 index 9290efd..0000000 --- a/rootdir/etc/fstab.qcom +++ /dev/null @@ -1,20 +0,0 @@ -# Android fstab file. -# The filesystem that contains the filesystem checker binary (typically /system) cannot -# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK - -#TODO: Add 'check' as fs_mgr_flags with data partition. -# Currently we dont have e2fsck compiled. So fs check would failed. - -#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> -/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults -/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults -/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait -/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,noatime wait,check -/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev wait,check -/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337 wait -/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,noatime,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer,length=-16384 - -/devices/platform/msm_sdcc.1/mmc_host/mmc0 auto auto defaults voldmanaged=sdcard0:29,nonremovable,noemulatedsd - -# USB storage -/devices/platform/msm_hsusb_host/usb auto auto defaults voldmanaged=usbdisk:auto,noemulatedsd diff --git a/rootdir/etc/hcidump.sh b/rootdir/etc/hcidump.sh deleted file mode 100755 index b286c5a..0000000 --- a/rootdir/etc/hcidump.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/system/bin/sh -#Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -LOG_DIR="/data/hcidump/" -LOG_TAG="hcidump" -LOG_FILE=`date +%Y%m%d%H%M%S`.cfa - -logv () -{ - /system/bin/log -t $LOG_TAG -p v "$LOG_NAME $@" -} - -mkdir $LOG_DIR -logv "Starting hcidump to $LOG_DIR$LOG_FILE" -/system/xbin/hcidump -xw $LOG_DIR$LOG_FILE & -/system/bin/logwrapper /system/xbin/hcidump -xt diff --git a/rootdir/etc/init.crda.sh b/rootdir/etc/init.crda.sh deleted file mode 100755 index cfd38c1..0000000 --- a/rootdir/etc/init.crda.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -country=`getprop wlan.crda.country` -# crda takes input in COUNTRY environment variable -if [ $country != "" ] -then -COUNTRY="$country" /system/bin/crda -fi diff --git a/rootdir/etc/init.qcom.bt.sh b/rootdir/etc/init.qcom.bt.sh deleted file mode 100755 index 01cc3f0..0000000 --- a/rootdir/etc/init.qcom.bt.sh +++ /dev/null @@ -1,319 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -#Read the arguments passed to the script -config="$1" - -BLUETOOTH_SLEEP_PATH=/proc/bluetooth/sleep/proto -LOG_TAG="qcom-bluetooth" -LOG_NAME="${0}:" - -hciattach_pid="" - -loge () -{ - /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" -} - -logi () -{ - /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" -} - -failed () -{ - loge "$1: exit code $2" - exit $2 -} - -program_bdaddr () -{ - /system/bin/btnvtool -O - logi "Bluetooth Address programmed successfully" -} - -# -# enable bluetooth profiles dynamically -# -config_bt () -{ - baseband=`getprop ro.baseband` - target=`getprop ro.board.platform` - soc_hwid=`cat /sys/devices/system/soc/soc0/id` - btsoc=`getprop qcom.bluetooth.soc` - - case $baseband in - "apq") - setprop ro.qualcomm.bluetooth.opp true - setprop ro.qualcomm.bluetooth.ftp true - setprop ro.qualcomm.bluetooth.nap false - setprop ro.qualcomm.bluetooth.sap false - setprop ro.qualcomm.bluetooth.dun false - # For MPQ as baseband is same for both - case $soc_hwid in - "130") - setprop ro.qualcomm.bluetooth.hsp true - setprop ro.qualcomm.bluetooth.hfp true - setprop ro.qualcomm.bluetooth.pbap false - setprop ro.qualcomm.bluetooth.map false - ;; - *) - setprop ro.qualcomm.bluetooth.hsp false - setprop ro.qualcomm.bluetooth.hfp false - setprop ro.qualcomm.bluetooth.pbap true - setprop ro.qualcomm.bluetooth.map true - ;; - esac - ;; - "mdm" | "svlte2a" | "svlte1" | "csfb") - setprop ro.qualcomm.bluetooth.opp true - setprop ro.qualcomm.bluetooth.hfp true - setprop ro.qualcomm.bluetooth.hsp true - setprop ro.qualcomm.bluetooth.pbap true - setprop ro.qualcomm.bluetooth.ftp true - setprop ro.qualcomm.bluetooth.map true - setprop ro.qualcomm.bluetooth.nap true - setprop ro.qualcomm.bluetooth.sap true - case $soc_hwid in - "109") - logi "Enabling BT-DUN for Fusion3" - setprop ro.qualcomm.bluetooth.dun true - ;; - esac - ;; - "msm") - setprop ro.qualcomm.bluetooth.opp true - setprop ro.qualcomm.bluetooth.hfp true - setprop ro.qualcomm.bluetooth.hsp true - setprop ro.qualcomm.bluetooth.pbap true - setprop ro.qualcomm.bluetooth.ftp true - setprop ro.qualcomm.bluetooth.nap true - setprop ro.qualcomm.bluetooth.sap true - setprop ro.qualcomm.bluetooth.dun true - case $btsoc in - "ath3k") - setprop ro.qualcomm.bluetooth.map false - ;; - *) - setprop ro.qualcomm.bluetooth.map true - ;; - esac - ;; - *) - setprop ro.qualcomm.bluetooth.opp true - setprop ro.qualcomm.bluetooth.hfp true - setprop ro.qualcomm.bluetooth.hsp true - setprop ro.qualcomm.bluetooth.pbap true - setprop ro.qualcomm.bluetooth.ftp true - setprop ro.qualcomm.bluetooth.map true - setprop ro.qualcomm.bluetooth.nap true - setprop ro.qualcomm.bluetooth.sap true - setprop ro.qualcomm.bluetooth.dun true - ;; - esac - - #Enable Bluetooth Profiles specific to target Dynamically - case $target in - "msm8960") - if [ "$btsoc" != "ath3k" ] && [ "$soc_hwid" != "130" ] - then - setprop ro.bluetooth.hfp.ver 1.6 - setprop ro.qualcomm.bt.hci_transport smd - fi - ;; - "msm8974") - if [ "$btsoc" != "ath3k" ] - then - setprop ro.bluetooth.hfp.ver 1.6 - setprop ro.qualcomm.bt.hci_transport smd - fi - ;; - *) - ;; - esac - -if [ -f /system/etc/bluetooth/stack.conf ]; then -stack=`cat /system/etc/bluetooth/stack.conf` -fi - -case "$stack" in - "bluez") - logi "Bluetooth stack is $stack" - setprop ro.qc.bluetooth.stack $stack - ;; - *) - logi "Bluetooth stack is Bluedroid" - ;; -esac - -} - -start_hciattach () -{ - /system/bin/hciattach -n $BTS_DEVICE $BTS_TYPE $BTS_BAUD & - hciattach_pid=$! - logi "start_hciattach: pid = $hciattach_pid" - echo 1 > $BLUETOOTH_SLEEP_PATH -} - -kill_hciattach () -{ - echo 0 > $BLUETOOTH_SLEEP_PATH - logi "kill_hciattach: pid = $hciattach_pid" - ## careful not to kill zero or null! - kill -TERM $hciattach_pid - # this shell doesn't exit now -- wait returns for normal exit -} - -logi "init.qcom.bt.sh config = $config" -case "$config" in - "onboot") - program_bdaddr - config_bt - exit 0 - ;; - *) - ;; -esac - -# mimic hciattach options parsing -- maybe a waste of effort -USAGE="hciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]" - -while getopts "blnpt:s:" f -do - case $f in - b | l | n | p) opt_flags="$opt_flags -$f" ;; - t) timeout=$OPTARG;; - s) initial_speed=$OPTARG;; - \?) echo $USAGE; exit 1;; - esac -done -shift $(($OPTIND-1)) - -# Note that "hci_qcomm_init -e" prints expressions to set the shell variables -# BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS. - -#Selectively Disable sleep -BOARD=`getprop ro.board.platform` -STACK=`getprop ro.qc.bluetooth.stack` - -# BR/EDR & LE power class configurations -POWER_CLASS=`getprop qcom.bt.dev_power_class` -LE_POWER_CLASS=`getprop qcom.bt.le_dev_pwr_class` - -#find the transport type -TRANSPORT=`getprop ro.qualcomm.bt.hci_transport` -logi "Transport : $TRANSPORT" -case $STACK in - "bluez") - logi "** Bluez stack **" - ;; - *) - logi "** Bluedroid stack **" - setprop bluetooth.status off - ;; -esac - - -case $POWER_CLASS in - 1) PWR_CLASS="-p 0" ; - logi "Power Class: 1";; - 2) PWR_CLASS="-p 1" ; - logi "Power Class: 2";; - 3) PWR_CLASS="-p 2" ; - logi "Power Class: CUSTOM";; - *) PWR_CLASS=""; - logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)"; - logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";; -esac - -case $LE_POWER_CLASS in - 1) LE_PWR_CLASS="-P 0" ; - logi "LE Power Class: 1";; - 2) LE_PWR_CLASS="-P 1" ; - logi "LE Power Class: 2";; - 3) LE_PWR_CLASS="-P 2" ; - logi "LE Power Class: CUSTOM";; - *) LE_PWR_CLASS="-P 1"; - logi "LE Power Class: Ignored. Default(2) used (1-CLASS1/2-CLASS2/3-CUSTOM)"; - logi "LE Power Class: To override, Before turning BT ON; setprop qcom.bt.le_dev_pwr_class <1 or 2 or 3>";; -esac - -eval $(/system/bin/hci_qcomm_init -e $PWR_CLASS $LE_PWR_CLASS && echo "exit_code_hci_qcomm_init=0" || echo "exit_code_hci_qcomm_init=1") - -case $exit_code_hci_qcomm_init in - 0) logi "Bluetooth QSoC firmware download succeeded, $BTS_DEVICE $BTS_TYPE $BTS_BAUD $BTS_ADDRESS";; - *) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init; - case $STACK in - "bluez") - logi "** Bluez stack **" - ;; - *) - logi "** Bluedroid stack **" - setprop bluetooth.status off - ;; - esac - - exit $exit_code_hci_qcomm_init;; -esac - -# init does SIGTERM on ctl.stop for service -trap "kill_hciattach" TERM INT - -case $TRANSPORT in - "smd") - case $STACK in - "bluez") - logi "** Bluez stack **" - echo 1 > /sys/module/hci_smd/parameters/hcismd_set - ;; - *) - logi "** Bluedroid stack **" - setprop bluetooth.status on - ;; - esac - ;; - *) - logi "start hciattach" - start_hciattach - case $STACK in - "bluez") - logi "Bluetooth is turning On with Bluez stack " - ;; - *) - logi "** Bluedroid stack **" - setprop bluetooth.status on - ;; - esac - - wait $hciattach_pid - logi "Bluetooth stopped" - ;; -esac - -exit 0 diff --git a/rootdir/etc/init.qcom.btdun.sh b/rootdir/etc/init.qcom.btdun.sh deleted file mode 100755 index f3bd6cb..0000000 --- a/rootdir/etc/init.qcom.btdun.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - - -LOG_TAG="qcom-btdun" -LOG_NAME="${0}:" -#Set this to default port except for Fusion3 case -BTDUN_MDM_PORT="/dev/smd7" - -loge () -{ - /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" -} - -logi () -{ - /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" -} - - -logi "Enter init.qcom.btdun.sh" - -baseband=`getprop ro.baseband` -soc_hwid=`cat /sys/devices/system/soc/soc0/id` - -if [ "$baseband" == "mdm" ] && [ "$soc_hwid" == "109" ] -then - logi "Set the ttyUSB0 as Modem endpoint for Fusion3" - chown bluetooth:bluetooth /dev/ttyUSB0 - BTDUN_MDM_PORT="/dev/ttyUSB0" -fi - -loge "BTDUN_MDM_PORT= $BTDUN_MDM_PORT" -#Start BT-DUN port-bridge serice with the required ports -/system/bin/dun-server $BTDUN_MDM_PORT /dev/rfcomm0 - -exit 0 diff --git a/rootdir/etc/init.qcom.fm.sh b/rootdir/etc/init.qcom.fm.sh deleted file mode 100755 index 481e06f..0000000 --- a/rootdir/etc/init.qcom.fm.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2009-2011, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -setprop hw.fm.init 0 - -mode=`getprop hw.fm.mode` -version=`getprop hw.fm.version` -isAnalog=`getprop hw.fm.isAnalog` - -#find the transport type -TRANSPORT=`getprop ro.qualcomm.bt.hci_transport` - -LOG_TAG="qcom-fm" -LOG_NAME="${0}:" - -loge () -{ - /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" -} - -logi () -{ - /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" -} - -failed () -{ - loge "$1: exit code $2" - exit $2 -} - -logi "In FM shell Script" -logi "mode: $mode" -logi "isAnalog: $isAnalog" -logi "Transport : $TRANSPORT" -logi "Version : $version" - -#$fm_qsoc_patches <fm_chipVersion> <enable/disable WCM> -# -case $mode in - "normal") - case $TRANSPORT in - "smd") - logi "inserting the radio transport module" - insmod /system/lib/modules/radio-iris-transport.ko - ;; - *) - logi "default transport case " - ;; - esac - /system/bin/fm_qsoc_patches $version 0 - ;; - "wa_enable") - /system/bin/fm_qsoc_patches $version 1 - ;; - "wa_disable") - /system/bin/fm_qsoc_patches $version 2 - ;; - "config_dac") - /system/bin/fm_qsoc_patches $version 3 $isAnalog - ;; - *) - logi "Shell: Default case" - /system/bin/fm_qsoc_patches $version 0 - ;; -esac - -exit_code_fm_qsoc_patches=$? - -case $exit_code_fm_qsoc_patches in - 0) - logi "FM QSoC calibration and firmware download succeeded" - ;; - *) - failed "FM QSoC firmware download and/or calibration failed" $exit_code_fm_qsoc_patches - ;; -esac - -setprop hw.fm.init 1 - -exit 0 diff --git a/rootdir/etc/init.qcom.post_boot.sh b/rootdir/etc/init.qcom.post_boot.sh deleted file mode 100755 index 2bb4eef..0000000 --- a/rootdir/etc/init.qcom.post_boot.sh +++ /dev/null @@ -1,392 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2009-2012, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -target=`getprop ro.board.platform` -case "$target" in - "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627a" | "msm7627_surf" | \ - "qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x") - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - ;; -esac - -case "$target" in - "msm7201a_ffa" | "msm7201a_surf") - echo 500000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - ;; -esac - -case "$target" in - "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") - echo 75000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 1 > /sys/module/pm2/parameters/idle_sleep_mode - ;; -esac - -case "$target" in - "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627_surf" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm7627a" ) - echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - ;; -esac - -case "$target" in - "msm8660") - echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache - echo 1 > /sys/module/rpm_resources/enable_low_power/pxo - echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_dig - echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_mem - echo 1 > /sys/module/rpm_resources/enable_low_power/rpm_cpu - echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq - chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - chown root.system /sys/devices/system/cpu/mfreq - chmod 220 /sys/devices/system/cpu/mfreq - chown root.system /sys/devices/system/cpu/cpu1/online - chmod 664 /sys/devices/system/cpu/cpu1/online - ;; -esac - -case "$target" in - "msm8960") - echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache - echo 1 > /sys/module/rpm_resources/enable_low_power/pxo - echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_dig - echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_mem - echo 1 > /sys/module/pm_8x60/modes/cpu0/retention/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/retention/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu2/retention/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu3/retention/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled - echo 0 > /sys/module/msm_thermal/core_control/enabled - echo 1 > /sys/devices/system/cpu/cpu1/online - echo 1 > /sys/devices/system/cpu/cpu2/online - echo 1 > /sys/devices/system/cpu/cpu3/online - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential - echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core - echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core - echo 918000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq - echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load - echo 1134000 > /sys/devices/system/cpu/cpufreq/ondemand/input_boost - echo 1026000 > /sys/module/cpu_boost/parameters/sync_threshold - echo 20 > /sys/module/cpu_boost/parameters/boost_ms - echo 1 > /dev/cpuctl/apps/cpu.notify_on_migrate - chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 384000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 384000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq - chown system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - chown system /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq - chown system /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - chown system /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq - chown system /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - echo 1 > /sys/module/msm_thermal/core_control/enabled - chown root.system /sys/devices/system/cpu/mfreq - chmod 220 /sys/devices/system/cpu/mfreq - chown root.system /sys/devices/system/cpu/cpu1/online - chown root.system /sys/devices/system/cpu/cpu2/online - chown root.system /sys/devices/system/cpu/cpu3/online - chmod 664 /sys/devices/system/cpu/cpu1/online - chmod 664 /sys/devices/system/cpu/cpu2/online - chmod 664 /sys/devices/system/cpu/cpu3/online - # set DCVS parameters for CPU - echo 40000 > /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us - echo 40000 > /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us - echo 100000 > /sys/module/msm_dcvs/cores/cpu0/em_win_size_min_us - echo 500000 > /sys/module/msm_dcvs/cores/cpu0/em_win_size_max_us - echo 0 > /sys/module/msm_dcvs/cores/cpu0/slack_mode_dynamic - echo 1000000 > /sys/module/msm_dcvs/cores/cpu0/disable_pc_threshold - echo 25000 > /sys/module/msm_dcvs/cores/cpu1/slack_time_max_us - echo 25000 > /sys/module/msm_dcvs/cores/cpu1/slack_time_min_us - echo 100000 > /sys/module/msm_dcvs/cores/cpu1/em_win_size_min_us - echo 500000 > /sys/module/msm_dcvs/cores/cpu1/em_win_size_max_us - echo 0 > /sys/module/msm_dcvs/cores/cpu1/slack_mode_dynamic - echo 1000000 > /sys/module/msm_dcvs/cores/cpu1/disable_pc_threshold - echo 25000 > /sys/module/msm_dcvs/cores/cpu2/slack_time_max_us - echo 25000 > /sys/module/msm_dcvs/cores/cpu2/slack_time_min_us - echo 100000 > /sys/module/msm_dcvs/cores/cpu2/em_win_size_min_us - echo 500000 > /sys/module/msm_dcvs/cores/cpu2/em_win_size_max_us - echo 0 > /sys/module/msm_dcvs/cores/cpu2/slack_mode_dynamic - echo 1000000 > /sys/module/msm_dcvs/cores/cpu2/disable_pc_threshold - echo 25000 > /sys/module/msm_dcvs/cores/cpu3/slack_time_max_us - echo 25000 > /sys/module/msm_dcvs/cores/cpu3/slack_time_min_us - echo 100000 > /sys/module/msm_dcvs/cores/cpu3/em_win_size_min_us - echo 500000 > /sys/module/msm_dcvs/cores/cpu3/em_win_size_max_us - echo 0 > /sys/module/msm_dcvs/cores/cpu3/slack_mode_dynamic - echo 1000000 > /sys/module/msm_dcvs/cores/cpu3/disable_pc_threshold - # set DCVS parameters for GPU - echo 20000 > /sys/module/msm_dcvs/cores/gpu0/slack_time_max_us - echo 20000 > /sys/module/msm_dcvs/cores/gpu0/slack_time_min_us - echo 0 > /sys/module/msm_dcvs/cores/gpu0/slack_mode_dynamic - # set msm_mpdecision parameters - echo 45000 > /sys/module/msm_mpdecision/slack_time_max_us - echo 15000 > /sys/module/msm_mpdecision/slack_time_min_us - echo 100000 > /sys/module/msm_mpdecision/em_win_size_min_us - echo 1000000 > /sys/module/msm_mpdecision/em_win_size_max_us - echo 3 > /sys/module/msm_mpdecision/online_util_pct_min - echo 25 > /sys/module/msm_mpdecision/online_util_pct_max - echo 97 > /sys/module/msm_mpdecision/em_max_util_pct - echo 2 > /sys/module/msm_mpdecision/rq_avg_poll_ms - echo 10 > /sys/module/msm_mpdecision/mp_em_rounding_point_min - echo 85 > /sys/module/msm_mpdecision/mp_em_rounding_point_max - echo 50 > /sys/module/msm_mpdecision/iowait_threshold_pct - #set permissions for the nodes needed by display on/off hook - chown system /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us - chown system /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us - chown system /sys/module/msm_mpdecision/slack_time_max_us - chown system /sys/module/msm_mpdecision/slack_time_min_us - chmod 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us - chmod 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us - chmod 664 /sys/module/msm_mpdecision/slack_time_max_us - chmod 664 /sys/module/msm_mpdecision/slack_time_min_us - soc_id=`cat /sys/devices/system/soc/soc0/id` - case "$soc_id" in - "130") - echo 230 > /sys/class/gpio/export - echo 228 > /sys/class/gpio/export - echo 229 > /sys/class/gpio/export - echo "in" > /sys/class/gpio/gpio230/direction - echo "rising" > /sys/class/gpio/gpio230/edge - echo "in" > /sys/class/gpio/gpio228/direction - echo "rising" > /sys/class/gpio/gpio228/edge - echo "in" > /sys/class/gpio/gpio229/direction - echo "rising" > /sys/class/gpio/gpio229/edge - echo 253 > /sys/class/gpio/export - echo 254 > /sys/class/gpio/export - echo 257 > /sys/class/gpio/export - echo 258 > /sys/class/gpio/export - echo 259 > /sys/class/gpio/export - echo "out" > /sys/class/gpio/gpio253/direction - echo "out" > /sys/class/gpio/gpio254/direction - echo "out" > /sys/class/gpio/gpio257/direction - echo "out" > /sys/class/gpio/gpio258/direction - echo "out" > /sys/class/gpio/gpio259/direction - chown media /sys/class/gpio/gpio253/value - chown media /sys/class/gpio/gpio254/value - chown media /sys/class/gpio/gpio257/value - chown media /sys/class/gpio/gpio258/value - chown media /sys/class/gpio/gpio259/value - chown media /sys/class/gpio/gpio253/direction - chown media /sys/class/gpio/gpio254/direction - chown media /sys/class/gpio/gpio257/direction - chown media /sys/class/gpio/gpio258/direction - chown media /sys/class/gpio/gpio259/direction - echo 0 > /sys/module/rpm_resources/enable_low_power/vdd_dig - echo 0 > /sys/module/rpm_resources/enable_low_power/vdd_mem - ;; - esac - ;; -esac - -case "$target" in - "msm8974") - echo 1 > /sys/module/lpm_resources/enable_low_power/l2 - echo 1 > /sys/module/lpm_resources/enable_low_power/pxo - echo 1 > /sys/module/lpm_resources/enable_low_power/vdd_dig - echo 1 > /sys/module/lpm_resources/enable_low_power/vdd_mem - echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/idle_enabled - echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor - echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential - echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq - echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq - chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - chown root.system /sys/devices/system/cpu/mfreq - chmod 220 /sys/devices/system/cpu/mfreq - chown root.system /sys/devices/system/cpu/cpu1/online - chown root.system /sys/devices/system/cpu/cpu2/online - chown root.system /sys/devices/system/cpu/cpu3/online - chmod 664 /sys/devices/system/cpu/cpu1/online - chmod 664 /sys/devices/system/cpu/cpu2/online - chmod 664 /sys/devices/system/cpu/cpu3/online - ;; -esac - -case "$target" in - "msm7627_ffa" | "msm7627_surf" | "msm7627_6x") - echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - ;; -esac - -case "$target" in - "qsd8250_surf" | "qsd8250_ffa" | "qsd8650a_st1x") - echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - ;; -esac - -case "$target" in - "qsd8650a_st1x") - mount -t debugfs none /sys/kernel/debug - ;; -esac - -chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate -chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor -chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy - -emmc_boot=`getprop ro.boot.emmc` -case "$emmc_boot" - in "true") - chown system /sys/devices/platform/rs300000a7.65536/force_sync - chown system /sys/devices/platform/rs300000a7.65536/sync_sts - chown system /sys/devices/platform/rs300100a7.65536/force_sync - chown system /sys/devices/platform/rs300100a7.65536/sync_sts - ;; -esac - -case "$target" in - "msm8960" | "msm8660" | "msm7630_surf") - echo 10 > /sys/devices/platform/msm_sdcc.3/idle_timeout - ;; - "msm7627a") - echo 10 > /sys/devices/platform/msm_sdcc.1/idle_timeout - ;; -esac - -# Post-setup services -case "$target" in - "msm8660" | "msm8960" | "msm8974") - start mpdecision - ;; - "msm7627a") - soc_id=`cat /sys/devices/system/soc/soc0/id` - case "$soc_id" in - "127" | "128" | "129") - start mpdecision - ;; - esac - ;; -esac - -# Enable Power modes and set the CPU Freq Sampling rates -case "$target" in - "msm7627a") - start qosmgrd - echo 1 > /sys/module/pm2/modes/cpu0/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm2/modes/cpu1/standalone_power_collapse/idle_enabled - echo 1 > /sys/module/pm2/modes/cpu0/standalone_power_collapse/suspend_enabled - echo 1 > /sys/module/pm2/modes/cpu1/standalone_power_collapse/suspend_enabled - #SuspendPC: - echo 1 > /sys/module/pm2/modes/cpu0/power_collapse/suspend_enabled - #IdlePC: - echo 1 > /sys/module/pm2/modes/cpu0/power_collapse/idle_enabled - echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate - ;; -esac - -# Change adj level and min_free_kbytes setting for lowmemory killer to kick in -case "$target" in - "msm7627a") - echo 0,1,2,4,9,12 > /sys/module/lowmemorykiller/parameters/adj - echo 5120 > /proc/sys/vm/min_free_kbytes - ;; -esac - -# Install AdrenoTest.apk if not already installed -if [ -f /data/prebuilt/AdrenoTest.apk ]; then - if [ ! -d /data/data/com.qualcomm.adrenotest ]; then - pm install /data/prebuilt/AdrenoTest.apk - fi -fi - -# Change adj level and min_free_kbytes setting for lowmemory killer to kick in -case "$target" in - "msm8660") - start qosmgrd - echo 0,1,2,4,9,12 > /sys/module/lowmemorykiller/parameters/adj - echo 5120 > /proc/sys/vm/min_free_kbytes - ;; -esac - -#fastrpc permission setting -insmod /system/lib/modules/adsprpc.ko -chown system.system /dev/adsprpc-smd -chmod 666 /dev/adsprpc-smd diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc deleted file mode 100644 index 88e361c..0000000 --- a/rootdir/etc/init.qcom.rc +++ /dev/null @@ -1,704 +0,0 @@ -# Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -import init.qcom.usb.rc - -on early-init - mkdir /firmware 0771 system system - symlink /data/tombstones /tombstones - mount debugfs debugfs /sys/kernel/debug - chown system system /sys/kernel/debug/kgsl/proc - -on init - export BOOTCLASSPATH ${BOOTCLASSPATH}:/system/framework/qcnvitems.jar:/system/framework/qcrilhook.jar - - # Set permissions for persist partition - mkdir /persist 0771 system system - - # See storage config details at http://source.android.com/tech/storage/ - mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw - mkdir /storage/sdcard0 0700 root root - - mkdir /mnt/media_rw/usbdisk 0700 media_rw media_rw - mkdir /storage/usbdisk 0700 root root - - # for backwards compatibility - symlink /storage/sdcard0 /sdcard - symlink /storage/sdcard0 /mnt/sdcard - symlink /storage/usbdisk /usbdisk - symlink /storage/usbdisk /mnt/usbdisk - - export EXTERNAL_STORAGE /storage/sdcard0 - export SECONDARY_STORAGE /storage/usbdisk - -on fs - mount_all fstab.qcom - restorecon -R /persist - restorecon -R /proc/touchpad - restorecon -R /proc/touchpanel - restorecon -R /sys/devices/system/cpu/cpu0/cpufreq - restorecon -R /sys/devices/system/cpu/cpu1/cpufreq - restorecon -R /sys/devices/system/cpu/cpu2/cpufreq - restorecon -R /sys/devices/system/cpu/cpu3/cpufreq - restorecon /sys/kernel/mm/ksm/run - restorecon /sys/devices/virtual/graphics/fb0/cabc - -on early-boot - # set RLIMIT_MEMLOCK to 64MB - setrlimit 8 67108864 67108864 - -on boot - chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power - chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type - chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state - chown bluetooth bluetooth /proc/bluetooth/sleep/proto - chown system system /sys/module/sco/parameters/disable_esco - chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set - chmod 0660 /sys/module/bluetooth_power/parameters/power - chmod 0660 /sys/module/hci_smd/parameters/hcismd_set - chmod 0660 /sys/class/rfkill/rfkill0/state - chmod 0660 /proc/bluetooth/sleep/proto - chown bluetooth bluetooth /dev/ttyHS0 - chmod 0660 /dev/ttyHS0 - chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock - chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock - - chmod 0660 /dev/ttyHS2 - chown bluetooth bluetooth /dev/ttyHS2 - - mkdir /data/opponvitems 0771 radio radio - - #Create QMUX deamon socket area - mkdir /dev/socket/qmux_radio 0770 radio radio - chmod 2770 /dev/socket/qmux_radio - mkdir /dev/socket/qmux_audio 0770 media audio - chmod 2770 /dev/socket/qmux_audio - mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth - chmod 2770 /dev/socket/qmux_bluetooth - mkdir /dev/socket/qmux_gps 0770 gps gps - chmod 2770 /dev/socket/qmux_gps - - setprop wifi.interface wlan0 - -# Define TCP buffer sizes for various networks -# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, - setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576 - - setprop ro.telephony.call_ring.multiple false - - #Remove SUID bit for iproute2 ip tool - chmod 0755 /system/bin/ip - - #BT DUN port-bridge - chmod 0660 /dev/smd7 - chown bluetooth bluetooth /dev/smd7 - - chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state - - # create symlink for fb1 as HDMI - symlink /dev/graphics/fb1 /dev/graphics/hdmi - - # Remove write permissions to video related nodes - chmod 0664 /sys/devices/virtual/graphics/fb1/hpd - chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode - chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d - - # Change owner and group for media server and surface flinger - chown system system /sys/devices/virtual/graphics/fb1/format_3d - chown system system /sys/devices/virtual/graphics/fb1/hpd - - # Change permissions for fps_level nodes - chown system graphics /sys/class/graphics/fb0/msm_fb_fps_level - chown system graphics /sys/class/graphics/fb1/msm_fb_fps_level - chown system graphics /sys/class/graphics/fb2/msm_fb_fps_level - chmod 644 /sys/class/graphics/fb0/msm_fb_fps_level - chmod 400 /sys/class/graphics/fb1/msm_fb_fps_level - chmod 400 /sys/class/graphics/fb2/msm_fb_fps_level - - chmod 660 /dev/rtc0 - chown system system /dev/rtc0 - - chown root system /proc/net/ip_conntrack - - # Enable DEBUG_SUSPEND, DEBUG_EXIT_SUSPEND, and DEBUG_WAKEUP - write /sys/module/wakelock/parameters/debug_mask 7 - - #For bridgemgr daemon to inform the USB driver of the correct transport - chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport - - #To allow interfaces to get v6 address when tethering is enabled - write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2 - - # To prevent out of order acknowledgements from making - # connection tracking to treat them as not belonging to - # the connection they belong to. - # Otherwise, a weird issue happens in which some long - # connections on high-throughput links get dropped when - # an ack packet comes out of order - write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1 - - # OPPO tuning - write /proc/sys/vm/dirty_writeback_centisecs 60000 - write /proc/sys/vm/dirty_expire_centisecs 60000 - write /proc/sys/vm/dirty_background_ratio 20 - write /proc/sys/vm/dirty_ratio 40 - - write /sys/module/msm_rtb/parameters/filter 32 - -on charger - # Enable Power modes and set the CPU Freq Sampling rates - write /sys/module/rpm_resources/enable_low_power/L2_cache 1 - write /sys/module/rpm_resources/enable_low_power/pxo 1 - write /sys/module/rpm_resources/enable_low_power/vdd_dig 1 - write /sys/module/rpm_resources/enable_low_power/vdd_mem 1 - write /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled 1 - write /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled 1 - write /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled 1 - write /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled 1 - write /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled 1 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave" - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "powersave" - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "powersave" - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "powersave" - write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90 - write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000 - write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1 - write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 384000 - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 384000 - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 384000 - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 384000 - write /sys/devices/system/cpu/cpu1/online 0 - write /sys/devices/system/cpu/cpu2/online 0 - write /sys/devices/system/cpu/cpu3/online 0 - write /sys/devices/platform/gpio-keys/disabled_keys 102,114-115,139,158 - write /sys/class/leds/button-backlight/brightness 0 - -on post-fs - # Increase readahead - write /sys/block/mmcblk0/queue/read_ahead_kb 256 - -# msm specific files that need to be created on /data -on post-fs-data - mkdir /data/tombstones 0771 system system - mkdir /tombstones/modem 0771 system system - mkdir /tombstones/lpass 0771 system system - mkdir /tombstones/wcnss 0771 system system - mkdir /tombstones/dsps 0771 system system - mkdir /tombstones/mdm 0771 system system - mkdir /tombstones/mdm2 0771 system system - - # we will remap this as /mnt/sdcard with the sdcard fuse tool - mkdir /data/media 0770 media_rw media_rw - chown media_rw media_rw /data/media - - mkdir /data/misc/bluetooth 0770 bluetooth bluetooth - - # Create the directories used by the Wireless subsystem - mkdir /data/misc/wifi 0770 wifi wifi - mkdir /data/misc/wifi/sockets 0770 wifi wifi - mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi - mkdir /data/misc/dhcp 0770 dhcp dhcp - chown dhcp dhcp /data/misc/dhcp - - chown system system /dev/wcnss_wlan - - # to observe dnsmasq.leases file for dhcp information of soft ap. - chown dhcp system /data/misc/dhcp - - mkdir /data/misc/playready - restorecon /data/misc/playready - mkdir /data/misc/tzapps - restorecon /data/misc/tzapps - - # Create the directory used by CnE subsystem - mkdir /data/connectivity 0771 system system - chown system system /data/connectivity - - # Create directory used by audio subsystem - mkdir /data/misc/audio 0770 audio audio - - # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections - # We chown/chmod /persist again so because mount is run as root + defaults - chown system system /persist - chmod 0771 /persist - chmod 0664 /sys/devices/platform/msm_sdcc.1/polling - chmod 0664 /sys/devices/platform/msm_sdcc.2/polling - chmod 0664 /sys/devices/platform/msm_sdcc.3/polling - chmod 0664 /sys/devices/platform/msm_sdcc.4/polling - - # Chown polling nodes as needed from UI running on system server - chown system system /sys/devices/platform/msm_sdcc.1/polling - chown system system /sys/devices/platform/msm_sdcc.2/polling - chown system system /sys/devices/platform/msm_sdcc.3/polling - chown system system /sys/devices/platform/msm_sdcc.4/polling - - #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant - mkdir /data/system 0775 system system - #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant - - #Create directory used by sensor subsystem(dsps) - mkdir /data/system/sensors - chmod 665 /data/system/sensors - write /data/system/sensors/settings 1 - restorecon /data/system/sensors/settings - chmod 660 /data/system/sensors/settings - - # AKM setting data - mkdir /data/misc/sensors - chmod 775 /data/misc/sensors - - mkdir /persist/sensors - chmod 775 /persist/sensors - - #Create directories for Location services - mkdir /data/misc/location 0770 gps gps - mkdir /data/misc/location/mq 0770 gps gps - mkdir /data/misc/location/xtwifi 0770 gps gps - - #Create directory for hostapd - mkdir /data/hostapd 0660 system wifi - - # Create /data/time folder for time-services - mkdir /data/time/ 0700 system system - - mkdir /data/audio/ 0770 media audio - chmod 2770 /data/audio - - # Torch - chown system camera /sys/class/leds/flashlight/brightness - chmod 0660 /sys/class/leds/flashlight/brightness - - # Kickstart - mkdir /data/qcks 0770 system system - chown system /dev/block/platform/msm_sdcc.1/by-name - - # Touchpanel/sensor - chown root system /proc/touchpad/enable - chmod 0660 /proc/touchpad/enable - - chown root system /proc/touchpanel/camera_enable - chmod 0660 /proc/touchpanel/camera_enable - - chown root system /proc/touchpanel/double_tap_enable - chmod 0660 /proc/touchpanel/double_tap_enable - - chown root system /proc/touchpanel/flashlight_enable - chmod 0660 /proc/touchpanel/flashlight_enable - - chown root system /proc/touchpanel/glove_mode_enable - chmod 0660 /proc/touchpanel/glove_mode_enable - - chown root system /proc/touchpanel/music_enable - chmod 0660 /proc/touchpanel/music_enable - - chown system system /sys/devices/virtual/graphics/fb0/cabc - chown system system /sys/devices/virtual/graphics/fb0/sre - - # Mpdecision state - mkdir /data/mpdecision 0660 system system - - setprop qcom.audio.init complete - - setprop vold.post_fs_data_done 1 - -on property:init.svc.surfaceflinger=stopped - stop ppd - stop hdmid - -on property:init.svc.wpa_supplicant=stopped - stop dhcpcd - -on property:bluetooth.isEnabled=true - write /sys/class/bluetooth/hci0/idle_timeout 7000 - -on property:bluetooth.sap.status=running - start bt-sap - -on property:bluetooth.sap.status=stopped - stop bt-sap - -on property:vold.decrypt=trigger_restart_framework - start config_bluetooth - -#service cnd /system/bin/cnd -# class late_start -# socket cnd stream 660 root inet - -service irsc_util /system/bin/logwrapper /system/bin/irsc_util "/etc/sec_config" - class main - user root - oneshot - -service rmt_storage /system/bin/rmt_storage - class core - user root - -service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot" - class core - user root - oneshot - -service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh - class late_start - user bluetooth - group qcom_oncrpc bluetooth net_bt_admin system - disabled - oneshot - -on property:bluetooth.hciattach=true - start hciattach - -on property:bluetooth.hciattach=false - setprop bluetooth.status off - -service bt-dun /system/bin/sh /system/etc/init.qcom.btdun.sh - class late_start - user bluetooth - group bluetooth net_bt_admin inet - disabled - oneshot - -service bt-sap /system/bin/sapd 15 - user bluetooth - group bluetooth net_bt_admin - class late_start - disabled - oneshot - -service bridgemgrd /system/bin/bridgemgrd - class main - user radio - group radio qcom_diag - disabled - -service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0 - class late_start - user system - group system inet - disabled - -# QMUX must be in multiple groups to support external process connections -service qmuxd /system/bin/qmuxd - class main - user radio - group radio audio bluetooth gps qcom_diag - -service netmgrd /system/bin/netmgrd - class main - -service sensors /system/bin/sensors.qcom - class late_start - user root - group root - -# Adjust socket buffer to enlarge TCP receive window for high bandwidth -# but only if ro.data.large_tcp_window_size property is set. -on property:ro.data.large_tcp_window_size=true - write /proc/sys/net/ipv4/tcp_adv_win_scale 2 - -service wpa_supplicant /system/bin/wpa_supplicant \ - -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf \ - -O/data/misc/wifi/sockets \ - -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 - # we will start as root and wpa_supplicant will switch to user wifi - # after setting up the capabilities required for WEXT - # user wifi - # group wifi inet keystore - class main - socket wpa_wlan0 dgram 660 wifi wifi - disabled - oneshot - -service p2p_supplicant /system/bin/wpa_supplicant \ - -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ - -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \ - -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf \ - -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \ - -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 -# we will start as root and wpa_supplicant will switch to user wifi -# after setting up the capabilities required for WEXT -# user wifi -# group wifi inet keystore - class main - socket wpa_wlan0 dgram 660 wifi wifi - disabled - oneshot - -service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL - class main - disabled - oneshot - -service dhcpcd_p2p /system/bin/dhcpcd -aABKL - class main - disabled - oneshot - -service iprenew_wlan0 /system/bin/dhcpcd -n - class main - disabled - oneshot - -service iprenew_p2p /system/bin/dhcpcd -n - class main - disabled - oneshot - -service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL - class main - disabled - oneshot - -service iprenew_bt-pan /system/bin/dhcpcd -n - class main - disabled - oneshot - -service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL - class main - disabled - oneshot - -service iprenew_eth0 /system/bin/dhcpcd -n - class main - disabled - oneshot - -service drmdiag /system/bin/drmdiagapp - class late_start - user root - disabled - oneshot - -on property:drmdiag.load=1 - start drmdiag - -on property:drmdiag.load=0 - stop drmdiag - -service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh - class late_start - user root - disabled - oneshot - -service wifi-crda /system/bin/sh /system/etc/init.crda.sh - class late_start - user root - disabled - oneshot - - -on property:sys.boot_completed=1 - start qcom-post-boot - -#service atfwd /system/bin/ATFWD-daemon -# class late_start -# user system -# group system radio -# onrestart /system/bin/log -t RIL-ATFWD -p w "ATFWD daemon restarted" - -service ppd /system/bin/mm-pp-daemon - class late_start - user system - socket pps stream 0660 system system graphics - group system graphics - -service hostapd /system/bin/hostapd -dddd /data/hostapd/hostapd.conf - class late_start - user root - group root - oneshot - disabled - -service ds_fmc_appd /system/bin/ds_fmc_appd -p "rmnet0" -D - class late_start - group radio wifi inet - disabled - oneshot - -on property:persist.data.ds_fmc_app.mode=1 - start ds_fmc_appd - -on property:ro.data.large_tcp_window_size=true - # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) - write /proc/sys/net/ipv4/tcp_adv_win_scale 2 - -service profiler_daemon /system/bin/profiler_daemon - class late_start - user root - group root - disabled - -service hcidump /system/bin/sh /system/etc/hcidump.sh - user bluetooth - group bluetooth system net_bt_admin net_admin - disabled - oneshot - -service charger /sbin/charger_n1 - class charger - -service ssr_diag /system/bin/ssr_diag - class late_start - user system - group system - -#Disable boot timeout for external modems. -on property:persist.sys.mdm.timeout_disable=1 - write /sys/module/mdm_common/parameters/disable_boot_timeout 1 -# Limit to SoC reset (1) and independent SSR (3) -on property:persist.sys.ssr.restart_level=1 - write /sys/module/subsystem_restart/parameters/restart_level 1 -on property:persist.sys.ssr.restart_level=3 - write /sys/module/subsystem_restart/parameters/restart_level 3 - -service diag_mdlog_start /system/bin/diag_mdlog - class late_start - user sdcard_rw - group system qcom_diag sdcard_rw sdcard_r media_rw - disabled - oneshot - -service diag_mdlog_stop /system/bin/diag_mdlog -k - class late_start - user sdcard_rw - group system qcom_diag sdcard_rw sdcard_r media_rw - disabled - oneshot - -#start GNSS/Sensor interface daemon -service gsiff_daemon /system/bin/gsiff_daemon - class late_start - user system - group gps qcom_oncrpc net_raw - -# usb-otg storage -service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbdisk /storage/usbdisk - class late_start - disabled - -# internal sdcard -service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0 - class late_start - disabled - -service thermald /system/bin/thermald - class main - -service mpdecision /system/bin/mpdecision --no_sleep --avg_comp - class main - -service kickstart /system/bin/qcks -i /firmware/image/ -r /data/tombstones/mdm/ - class core - oneshot - -service qrngd /system/bin/qrngd -f - class main - user root - group root - -service qseecomd /system/bin/qseecomd - class late_start - user system - group system - -service time_daemon /system/bin/time_daemon - class late_start - user root - group root - -service wcnss-init /system/bin/sh /system/etc/init.qcom.wifi.sh - class main - user root - oneshot - -#start camera server as daemon -service qcamerasvr /system/bin/mm-qcamera-daemon - class late_start - user camera - group camera system inet input graphics net_bt_stack - - -# CM Performance Profiles - -# Powersave -on property:sys.perf.profile=0 - start mpdecision - start thermald - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor conservative - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor conservative - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor conservative - write /sys/class/kgsl/kgsl-3d0/pwrscale/trustzone/governor ondemand - -# Balanced -on property:sys.perf.profile=1 - start mpdecision - start thermald - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ondemand - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor ondemand - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor ondemand - write /sys/class/kgsl/kgsl-3d0/pwrscale/trustzone/governor ondemand - -# High performance -on property:sys.perf.profile=2 - stop mpdecision - stop thermald - write /sys/devices/system/cpu/cpu0/online 1 - write /sys/devices/system/cpu/cpu1/online 1 - write /sys/devices/system/cpu/cpu2/online 1 - write /sys/devices/system/cpu/cpu3/online 1 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor performance - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor performance - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor performance - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor performance - write /sys/class/kgsl/kgsl-3d0/pwrscale/trustzone/governor performance - diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc deleted file mode 100644 index 3d4ecc3..0000000 --- a/rootdir/etc/init.qcom.usb.rc +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -on init - write /sys/class/android_usb/android0/f_rndis/manufacturer Oppo - write /sys/class/android_usb/android0/f_rndis/vendorID 22d9 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - -on boot - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} - write /sys/class/android_usb/android0/iProduct ${ro.product.model} - -service qcom-usb-sh /system/bin/sh /init.qcom.usb.sh - class core - user root - oneshot - -# Following are the parameters required for usb functionality. They provide configurable options like -# product_id/vendor id and allows specifying required functions: -# -# Required parameters: -# -# /sys/class/android_usb/android0/enable: Enables/disables usb composition -# Value: 0 (disable), 1 (enable) -# -# /sys/class/android_usb/android0/idVendor: Stores Vendor ID -# Value: 05c6 (Vendor id for Qualcomm Inc) -# -# /sys/class/android_usb/android0/idProduct: Stores Product id corresponding to usb composition -# Value: 0x9xxx for composite interface, 0xFxxx for single interface -# -# /sys/class/android_usb/android0/f_diag/clients: Stores name of clients representing a diag interface. -# Value: Passed one per interface. e.g. diag[,diag_mdm, diag_qsc, diag_mdm2] -# -# /sys/class/android_usb/android0/functions: Stores name of the function drivers used in usb composition. -# Value: Passed one per function driver. e.g. diag[,adb] -# -#Optional parameters: -# -# /sys/class/android_usb/android0/f_serial/transports: Stores type of underlying transports used to -# communicate to serial interface. -# Value: Passed one per interface. One value represents control and data transport together. -# e.g. smd[,sdio,tty,hsic] -# Only required if serial interface is present. -# -# /sys/class/android_usb/android0/f_serial/transport_names: Stores name of the underlying transports -# used to communicate to serial interface. This is used to distinguish between more than one interface -# using same transport type. -# Value: Passed one per interface. One value represents control and data transport together. -# e.g. serial_hsic[,serial_hsusb] -# Only required for transport type hsic, optional for other transport types. -# -# /sys/class/android_usb/android0/f_rmnet/transports: Stores type of underlying transports used to -# communicate to rmnet interface. -# Value: Passed two per interface as control, data transport type pair. -# e.g. smd,bam[,hsuart,hsuart] -# Only required if rmnet interface is present. -# -# /sys/class/android_usb/android0/f_rmnet/transport_names: Stores name of the underlying transports -# used to communicate to rmnet interface. This is used to distinguish between more than one interface -# using same transport type. -# Value: Passed one per interface. One value represents control and data transport together. -# e.g. rmnet_hsic[,rmnet_hsusb] -# Only required for transport type hsic, optional for other transport types. - -# USB compositions -on property:sys.usb.config=ptp - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 2771 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ptp,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 2772 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp - stop adbd - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 2764 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mtp,adb - stop adbd - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 2765 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,adb - stop adbd - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 2766 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mass_storage,adb - stop adbd - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 2767 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=mass_storage - stop adbd - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 2768 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 2769 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 22d9 - write /sys/class/android_usb/android0/idProduct 276a - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} diff --git a/rootdir/etc/init.qcom.usb.sh b/rootdir/etc/init.qcom.usb.sh deleted file mode 100755 index 0a6dee5..0000000 --- a/rootdir/etc/init.qcom.usb.sh +++ /dev/null @@ -1,202 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2012, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# -# Update USB serial number from persist storage if present, if not update -# with value passed from kernel command line, if none of these values are -# set then use the default value. This order is needed as for devices which -# do not have unique serial number. -# User needs to set unique usb serial number to persist.usb.serialno -# -serialno=`getprop persist.usb.serialno` -case "$serialno" in - "") - serialnum=`getprop ro.serialno` - case "$serialnum" in - "");; #Do nothing, use default serial number - *) - echo "$serialnum" > /sys/class/android_usb/android0/iSerial - esac - ;; - *) - echo "$serialno" > /sys/class/android_usb/android0/iSerial -esac - -chown root.system /sys/devices/platform/msm_hsusb/gadget/wakeup -chmod 220 /sys/devices/platform/msm_hsusb/gadget/wakeup - -# -# Allow persistent usb charging disabling -# User needs to set usb charging disabled in persist.usb.chgdisabled -# -target=`getprop ro.board.platform` -usbchgdisabled=`getprop persist.usb.chgdisabled` -case "$usbchgdisabled" in - "") ;; #Do nothing here - * ) - case $target in - "msm8660") - echo "$usbchgdisabled" > /sys/module/pmic8058_charger/parameters/disabled - echo "$usbchgdisabled" > /sys/module/smb137b/parameters/disabled - ;; - "msm8960") - echo "$usbchgdisabled" > /sys/module/pm8921_charger/parameters/disabled - ;; - esac -esac - -usbcurrentlimit=`getprop persist.usb.currentlimit` -case "$usbcurrentlimit" in - "") ;; #Do nothing here - * ) - case $target in - "msm8960") - echo "$usbcurrentlimit" > /sys/module/pm8921_charger/parameters/usb_max_current - ;; - esac -esac -# -# Allow USB enumeration with default PID/VID -# -baseband=`getprop ro.baseband` -echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua -usb_config=`getprop persist.sys.usb.config` -case "$usb_config" in - "" | "adb") #USB persist config not set, select default configuration - case $target in - "msm8960" | "msm8974") - case "$baseband" in - "mdm") - setprop persist.sys.usb.config diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb - ;; - "sglte") - setprop persist.sys.usb.config diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb - ;; - "dsda" | "sglte2") - setprop persist.sys.usb.config diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb - ;; - "dsda2") - setprop persist.sys.usb.config diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb - ;; - *) - setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb - ;; - esac - ;; - "msm7627a") - setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_smd,mass_storage,adb - ;; - * ) - case "$baseband" in - "svlte2a") - setprop persist.sys.usb.config diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb - ;; - "csfb") - setprop persist.sys.usb.config diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb - ;; - *) - setprop persist.sys.usb.config diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb - ;; - esac - ;; - esac - ;; - * ) ;; #USB persist config exists, do nothing -esac - -# -# Add support for exposing lun0 as cdrom in mass-storage -# -target=`getprop ro.product.device` -cdromname="/system/etc/cdrom_install.iso" -cdromenable=`getprop persist.service.cdrom.enable` -case "$target" in - "msm7627a") - case "$cdromenable" in - 0) - echo "" > /sys/class/android_usb/android0/f_mass_storage/lun0/file - ;; - 1) - echo "mounting usbcdrom lun" - echo $cdromname > /sys/class/android_usb/android0/f_mass_storage/lun0/file - ;; - esac - ;; -esac - -# -# Select USB BAM - 2.0 or 3.0 -# -case "$target" in - "msm8974") - echo hsusb > /sys/bus/platform/devices/usb_bam/enable - ;; -esac - -# -# set module params for embedded rmnet devices -# -rmnetmux=`getprop persist.rmnet.mux` -case "$baseband" in - "mdm" | "dsda" | "sglte2") - case "$rmnetmux" in - "enabled") - echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled - echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links - echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev - ;; - esac - echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init - # Allow QMUX daemon to assign port open wait time - chown radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait - ;; - "dsda2") - echo 2 > /sys/module/rmnet_usb/parameters/no_rmnet_devs - echo hsicctl,hsusbctl > /sys/module/rmnet_usb/parameters/rmnet_dev_names - case "$rmnetmux" in - "enabled") #mux is neabled on both mdms - echo 3 > /sys/module/rmnet_usb/parameters/mux_enabled - echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links - echo 17 > write /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev - ;; - "enabled_hsic") #mux is enabled on hsic mdm - echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled - echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links - echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev - ;; - "enabled_hsusb") #mux is enabled on hsusb mdm - echo 2 > /sys/module/rmnet_usb/parameters/mux_enabled - echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links - echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev - ;; - esac - echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init - # Allow QMUX daemon to assign port open wait time - chown radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait - ;; -esac diff --git a/rootdir/etc/init.qcom.wifi.sh b/rootdir/etc/init.qcom.wifi.sh deleted file mode 100644 index 75fbcec..0000000 --- a/rootdir/etc/init.qcom.wifi.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/system/bin/sh - -# Workaround for conn_init not copying the updated firmware -rm /data/misc/wifi/WCNSS_qcom_cfg.ini 2> /dev/null -rm /data/misc/wifi/WCNSS_qcom_wlan_nv.bin 2> /dev/null - -echo `getprop ro.serialno` > /sys/devices/platform/wcnss_wlan.0/serial_number -setprop wlan.driver.config /data/misc/wifi/WCNSS_qcom_cfg.ini - -# Configure the hardware. Set a random MAC if nvitems aren't available yet. -logwrapper /system/bin/conn_init - -echo 1 > /dev/wcnss_wlan - -# Wait for nvitems and reconfigure if necessary (first boot) -if [ ! "$(ls /data/opponvitems)" ]; then - while [ ! "$(ls /data/opponvitems)" ]; do - sleep 1; - done - logwrapper /system/bin/conn_init - echo 0 > /sys/module/wlan/parameters/con_mode -fi - - -start wcnss-service - diff --git a/rootdir/etc/init.recovery.qcom.rc b/rootdir/etc/init.recovery.qcom.rc deleted file mode 100644 index 5fe4234..0000000 --- a/rootdir/etc/init.recovery.qcom.rc +++ /dev/null @@ -1,35 +0,0 @@ -on boot - # Enable Power modes and set the CPU Freq Sampling rates - write /sys/module/rpm_resources/enable_low_power/L2_cache 1 - write /sys/module/rpm_resources/enable_low_power/pxo 1 - write /sys/module/rpm_resources/enable_low_power/vdd_dig 1 - write /sys/module/rpm_resources/enable_low_power/vdd_mem 1 - write /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled 1 - write /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled 1 - write /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled 1 - write /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled 1 - write /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled 1 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 384000 - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 384000 - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 384000 - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 384000 - setprop recovery.perf.mode 0 - -on property:recovery.perf.mode=1 - write /sys/devices/system/cpu/cpu1/online 1 - write /sys/devices/system/cpu/cpu2/online 1 - write /sys/devices/system/cpu/cpu3/online 1 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "performance" - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "performance" - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "performance" - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "performance" - -on property:recovery.perf_mode=0 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "conservative" - write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "conservative" - write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "conservative" - write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "conservative" - write /sys/devices/system/cpu/cpu1/online 0 - write /sys/devices/system/cpu/cpu2/online 0 - write /sys/devices/system/cpu/cpu3/online 0 - diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc deleted file mode 100644 index 5ddeb1a..0000000 --- a/rootdir/etc/ueventd.qcom.rc +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -# the DIAG device node is not world writable/readable. -/dev/diag 0660 system qcom_diag - -/dev/genlock 0666 system system -/dev/kgsl 0666 system system -/dev/kgsl-3d0 0666 system system -/dev/kgsl-2d0 0666 root root -/dev/kgsl-2d1 0666 root root -/dev/ion 0664 system system -/dev/rtc0 0600 system system -/dev/smd0 0660 system system -/dev/smd4 0660 system system -/dev/smd_cxm_qmi 0640 radio radio -/dev/smd7 0660 bluetooth bluetooth -/dev/radio0 0640 system system -/dev/rfcomm0 0660 bluetooth bluetooth -/dev/gss 0660 gps gps -/dev/smdcntl0 0640 radio radio -/dev/smdcntl1 0640 radio radio -/dev/smdcntl2 0640 radio radio -/dev/smdcntl3 0640 radio radio -/dev/smdcntl4 0640 radio radio -/dev/smdcntl5 0640 radio radio -/dev/smdcntl6 0640 radio radio -/dev/smdcntl7 0640 radio radio -/dev/smdcnt_rev0 0640 radio radio -/dev/smdcnt_rev1 0640 radio radio -/dev/smdcnt_rev2 0640 radio radio -/dev/smdcnt_rev3 0640 radio radio -/dev/smdcnt_rev4 0640 radio radio -/dev/smdcnt_rev5 0640 radio radio -/dev/smdcnt_rev6 0640 radio radio -/dev/smdcnt_rev7 0640 radio radio -/dev/smdcnt_rev8 0640 radio radio -/dev/smuxctl32 0640 radio radio -/dev/sdioctl0 0640 radio radio -/dev/sdioctl1 0640 radio radio -/dev/sdioctl2 0640 radio radio -/dev/sdioctl3 0640 radio radio -/dev/sdioctl4 0640 radio radio -/dev/sdioctl5 0640 radio radio -/dev/sdioctl6 0640 radio radio -/dev/sdioctl7 0640 radio radio -/dev/sdioctl8 0640 radio radio -/dev/rmnet_mux_ctrl 0640 radio radio -/dev/hsicctl0 0640 radio radio -/dev/hsicctl1 0640 radio radio -/dev/hsicctl2 0640 radio radio -/dev/hsicctl3 0640 radio radio -/dev/hsicctl4 0640 radio radio -/dev/hsicctl5 0640 radio radio -/dev/hsicctl6 0640 radio radio -/dev/hsicctl7 0640 radio radio -/dev/hsicctl8 0640 radio radio -/dev/hsicctl9 0640 radio radio -/dev/hsicctl10 0640 radio radio -/dev/hsicctl11 0640 radio radio -/dev/hsicctl12 0640 radio radio -/dev/hsicctl13 0640 radio radio -/dev/hsicctl14 0640 radio radio -/dev/hsicctl15 0640 radio radio -/dev/hsicctl16 0640 radio radio -/dev/hsusbctl0 0640 radio radio -/dev/hsusbctl1 0640 radio radio -/dev/hsusbctl2 0640 radio radio -/dev/hsusbctl3 0640 radio radio -/dev/video* 0660 system camera -/dev/media* 0660 system camera -/dev/v4l-subdev* 0660 system camera -/dev/qseecom 0660 system drmrpc -/dev/gemini0 0660 system camera -/dev/jpeg0 0660 system camera -/dev/jpeg1 0660 system camera -/dev/jpeg2 0660 system camera -/dev/msm_camera/* 0660 system camera -/dev/gemini/ 0660 system camera -/dev/mercury0 0660 system camera -/dev/msm_vidc_reg 0660 system audio -/dev/msm_vidc_dec 0660 system audio -/dev/msm_vidc_dec_sec 0660 system audio -/dev/msm_vidc_enc 0660 system audio -/dev/msm_rotator 0660 system system -/dev/hw_random 0660 system system - -#permissions for audio -/dev/msm_qcelp 0660 system audio -/dev/msm_evrc 0660 system audio -/dev/msm_wma 0660 system audio -/dev/msm_wmapro 0660 system audio -/dev/msm_amrnb 0660 system audio -/dev/msm_amrwb 0660 system audio -/dev/msm_amrwbplus 0660 system audio -/dev/msm_aac 0660 system audio -/dev/msm_multi_aac 0660 system audio -/dev/msm_aac_in 0660 system audio -/dev/msm_qcelp_in 0660 system audio -/dev/msm_evrc_in 0660 system audio -/dev/msm_amrnb_in 0640 system audio -/dev/msm_a2dp_in 0660 system audio -/dev/msm_ac3 0660 system audio -/dev/msm_acdb 0660 system audio -/dev/msm_cad 0660 system audio -/dev/msm_fm 0660 system audio -/dev/msm_mvs 0660 system audio -/dev/msm_pcm_lp_dec 0660 system audio -/dev/msm_preproc_ctl 0660 system audio -/dev/msm_rtac 0660 system audio -/dev/msm_voicememo 0660 system audio -/dev/radio0 0640 fm_radio fm_radio -/dev/smd3 0660 bluetooth net_bt_stack -/dev/smd2 0660 bluetooth net_bt_stack -/dev/ttyHSL1 0660 system system -/dev/mdm 0660 system radio -/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio -/dev/sdio_tty_ciq_00 0660 system system -/dev/tty_sdio_00 0660 system system -/dev/ttyGS0 0660 system system -/dev/i2c-5 0660 media media - -# DVB devices -/dev/dvb/adapter0/demux* 0444 media media -/dev/dvb/adapter0/dvr* 0664 media media -/dev/dvb/adapter0/video* 0664 media media - -# native sensors -/sys/devices/i2c-12/12-* pollrate_ms 0664 system system -/sys/devices/i2c-12/12-* enable 0664 system system -/sys/devices/i2c-12/12-* poll_delay 0664 system system - -# wlan -/dev/wcnss_wlan 0660 system system - -# NFC -/dev/pn544 0600 nfc nfc - diff --git a/sepolicy/app.te b/sepolicy/app.te deleted file mode 100644 index eb71391..0000000 --- a/sepolicy/app.te +++ /dev/null @@ -1,3 +0,0 @@ -# Grant GPU access to all processes started by Zygote. -# They need that to render the standard UI. -allow appdomain gpu_device:chr_file rw_file_perms; diff --git a/sepolicy/bluetooth.te b/sepolicy/bluetooth.te deleted file mode 100644 index 523b252..0000000 --- a/sepolicy/bluetooth.te +++ /dev/null @@ -1 +0,0 @@ -allow bluetooth smd_device:chr_file rw_file_perms; diff --git a/sepolicy/device.te b/sepolicy/device.te deleted file mode 100644 index a8c6747..0000000 --- a/sepolicy/device.te +++ /dev/null @@ -1,17 +0,0 @@ -# GPU (used by most UI apps) -type gpu_device, dev_type; - -# Qualcomm Secure Execution Environment Communicator (QSEECOM) device -type qseecom_device, dev_type; - -type diag_device, dev_type; -type bcm2079x_device, dev_type; - -# Qualcomm MSM Audio ACDB device -type msm_acdb_device, dev_type; - -# Kickstart device used by QC qcks -type kickstart_device, dev_type; - -# SMD device, used by hci_qcomm_init -type smd_device, dev_type; diff --git a/sepolicy/domain.te b/sepolicy/domain.te deleted file mode 100644 index 45925a7..0000000 --- a/sepolicy/domain.te +++ /dev/null @@ -1 +0,0 @@ -allow domain init_tmpfs:file read; diff --git a/sepolicy/drmserver.te b/sepolicy/drmserver.te deleted file mode 100644 index 0c8b461..0000000 --- a/sepolicy/drmserver.te +++ /dev/null @@ -1,3 +0,0 @@ -# Grant DRM Service access to Qualcomm Secure Execution Environment Communicator (QSEECOM) device -allow drmserver qseecom_device:chr_file rw_file_perms; -allow drmserver sdcard_external:file open; diff --git a/sepolicy/file.te b/sepolicy/file.te deleted file mode 100644 index 839b0a4..0000000 --- a/sepolicy/file.te +++ /dev/null @@ -1,7 +0,0 @@ -# Qualcomm MSM Interface (QMI) socket types -type qmux_audio_socket, file_type; -type qmux_bluetooth_socket, file_type; -type qmux_gps_socket, file_type; -type qmux_radio_socket, file_type; - -type audio_firmware_file, file_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts deleted file mode 100644 index ccbb9b6..0000000 --- a/sepolicy/file_contexts +++ /dev/null @@ -1,36 +0,0 @@ -# GPU device -/dev/kgsl-3d0 u:object_r:gpu_device:s0 -/dev/msm_rotator u:object_r:gpu_device:s0 - -# Qualcomm Secure Execution Environment Communicator (QSEECOM) device -/dev/qseecom u:object_r:qseecom_device:s0 - -# Qualcomm MSM Interface (QMI) devices -/dev/socket/qmux_audio/* u:object_r:qmux_audio_socket:s0 -/dev/socket/qmux_bluetooth/* u:object_r:qmux_bluetooth_socket:s0 -/dev/socket/qmux_gps/* u:object_r:qmux_gps_socket:s0 -/dev/socket/qmux_radio/* u:object_r:qmux_radio_socket:s0 - -/dev/bcm2079x-i2c u:object_r:bcm2079x_device:s0 -/dev/diag u:object_r:diag_device:s0 -/dev/media([0-9])+ u:object_r:camera_device:s0 -/dev/smd([0-9])+ u:object_r:smd_device:s0 -/dev/mdm u:object_r:radio_device:s0 - -# Qualcomm MSM Audio ACDB device -/dev/msm_acdb u:object_r:msm_acdb_device:s0 - -# Qualcomm audio firmware files -/data/misc/audio/* u:object_r:audio_firmware_file:s0 - -/dev/ks_hsic_bridge u:object_r:kickstart_device:s0 -/dev/efs_hsic_bridge u:object_r:kickstart_device:s0 - -/system/bin/qcks u:object_r:kickstart_exec:s0 -/system/bin/efsks u:object_r:kickstart_exec:s0 -/system/bin/ks u:object_r:kickstart_exec:s0 - -/data/nfc(/.*)? u:object_r:nfc_data_file:s0 - -/system/bin/hci_qcomm_init u:object_r:hci_exec:s0 -/system/bin/bdAddrLoader u:object_r:hci_exec:s0 diff --git a/sepolicy/hci_init.te b/sepolicy/hci_init.te deleted file mode 100644 index 85f5d32..0000000 --- a/sepolicy/hci_init.te +++ /dev/null @@ -1,6 +0,0 @@ -type hci_init, domain; -permissive hci_init; -type hci_exec, file_type, exec_type; -type hci_data_file, file_type; -domain_auto_trans(shell, hci_exec, hci_init) -unconfined_domain(hci_init) diff --git a/sepolicy/init_shell.te b/sepolicy/init_shell.te deleted file mode 100644 index 204392f..0000000 --- a/sepolicy/init_shell.te +++ /dev/null @@ -1,6 +0,0 @@ -allow init_shell diag_device:chr_file { read write }; -allow init_shell hci_exec:file rx_file_perms; -allow init_shell bluetooth_prop:property_service set; -allow init_shell smd_device:chr_file rw_file_perms; -allow init_shell unlabeled:file r_file_perms; -allow init_shell init:fifo_file r_file_perms; diff --git a/sepolicy/keystore.te b/sepolicy/keystore.te deleted file mode 100644 index 2583cac..0000000 --- a/sepolicy/keystore.te +++ /dev/null @@ -1,3 +0,0 @@ -# Grant keystore daemon access to Qualcomm Secure Execution Environment Communicator (QSEECOM) device -allow keystore qseecom_device:chr_file rw_file_perms; - diff --git a/sepolicy/kickstart.te b/sepolicy/kickstart.te deleted file mode 100644 index f4a4a26..0000000 --- a/sepolicy/kickstart.te +++ /dev/null @@ -1,5 +0,0 @@ -type kickstart, domain; -permissive kickstart; -type kickstart_exec, file_type, exec_type; -domain_auto_trans(init, kickstart_exec, kickstart) -unconfined_domain(kickstart) diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te deleted file mode 100644 index dacaacf..0000000 --- a/sepolicy/mediaserver.te +++ /dev/null @@ -1,13 +0,0 @@ -# Grant access to Qualcomm MSM Audio ACDB device to mediaserver -allow mediaserver msm_acdb_device:chr_file rw_file_perms; - -# Grant access to Qualcomm MSM Interface (QMI) audio sockets to mediaserver -allow mediaserver qmux_audio_socket:sock_file create_file_perms; -allow mediaserver qmux_audio_socket:dir rw_dir_perms; - -# Permit mediaserver to create sockets -allow mediaserver self:socket create; - -# Grant access to audio firmware files to mediaserver -allow mediaserver audio_firmware_file:dir ra_dir_perms; -allow mediaserver audio_firmware_file:file create_file_perms; diff --git a/sepolicy/nfc.te b/sepolicy/nfc.te deleted file mode 100644 index 593608d..0000000 --- a/sepolicy/nfc.te +++ /dev/null @@ -1 +0,0 @@ -allow nfc bcm2079x_device:chr_file rw_file_perms; diff --git a/sepolicy/rild.te b/sepolicy/rild.te deleted file mode 100644 index 419c583..0000000 --- a/sepolicy/rild.te +++ /dev/null @@ -1,5 +0,0 @@ -allow rild diag_device:chr_file rw_file_perms; - -# Grant access to Qualcomm MSM Interface (QMI) radio sockets to RILD -allow rild qmux_radio_socket:sock_file create_file_perms; -allow rild qmux_radio_socket:dir rw_dir_perms; diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te deleted file mode 100644 index 787432d..0000000 --- a/sepolicy/surfaceflinger.te +++ /dev/null @@ -1,9 +0,0 @@ -# Grant GPU access to SurfaceFlinger -allow surfaceflinger gpu_device:chr_file rw_file_perms; - -allow surfaceflinger sysfs:file rw_file_perms; - -# Read from /data/local/tmp -allow surfaceflinger shell_data_file:dir search; -allow surfaceflinger shell_data_file:file { open getattr read }; -allow surfaceflinger shell_data_file:lnk_file read; diff --git a/sepolicy/system.te b/sepolicy/system.te deleted file mode 100644 index b11c892..0000000 --- a/sepolicy/system.te +++ /dev/null @@ -1,8 +0,0 @@ -# Grant GPU access to system apps (e.g., PowerManagerService) -allow system gpu_device:chr_file rw_file_perms; -allow system diag_device:chr_file rw_file_perms; - -# Grant access to Qualcomm MSM Interface (QMI) radio sockets to system apps -# (e.g., LocationManager) -allow system qmux_radio_socket:sock_file create_file_perms; -allow system qmux_radio_socket:dir rw_dir_perms; diff --git a/sepolicy/ueventd.te b/sepolicy/ueventd.te deleted file mode 100644 index 9f734f4..0000000 --- a/sepolicy/ueventd.te +++ /dev/null @@ -1,4 +0,0 @@ -allow ueventd sdcard_external:dir search; -allow ueventd sdcard_external:file r_file_perms; -allow ueventd wifi_data_file:dir search; -allow ueventd wifi_data_file:file r_file_perms; diff --git a/sepolicy/wpa.te b/sepolicy/wpa.te deleted file mode 100644 index c8f185f..0000000 --- a/sepolicy/wpa.te +++ /dev/null @@ -1 +0,0 @@ -allow wpa devpts:chr_file rw_file_perms; diff --git a/setup-makefiles.sh b/setup-makefiles.sh index a0327ca..e634d55 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -1,159 +1,7 @@ -#!/bin/bash +#!/bin/sh -VENDOR=oppo -DEVICE=n1 -OUTDIR=vendor/$VENDOR/$DEVICE -MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk +set -e -(cat << EOF) > $MAKEFILE -# Copyright (C) 2013 The CyanogenMod Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh - -PRODUCT_COPY_FILES += \\ -EOF - -LINEEND=" \\" -COUNT=`wc -l proprietary-files.txt | awk {'print $1'}` -DISM=`egrep -c '(^#|^$)' proprietary-files.txt` -COUNT=`expr $COUNT - $DISM` -for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do - COUNT=`expr $COUNT - 1` - if [ $COUNT = "0" ]; then - LINEEND="" - fi - # Split the file from the destination (format is "file[:destination]") - OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS - if [[ ! "$FILE" =~ ^-.* ]]; then - FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"` - DEST=${PARSING_ARRAY[1]} - if [ -n "$DEST" ]; then - FILE=$DEST - fi - echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE - fi -done - -(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk -# Copyright (C) 2013 The CyanogenMod Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh - -# Pick up overlay for features that depend on non-open-source files -DEVICE_PACKAGE_OVERLAYS += vendor/$VENDOR/$DEVICE/overlay - -PRODUCT_PACKAGES += \\ - libtime_genoff \\ - libqc-opt \\ - com.qualcomm.location \\ - PPPreference - -\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) -EOF - -(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk -# Copyright (C) 2013 The CyanogenMod Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh - -EOF - -(cat << EOF) > ../../../$OUTDIR/Android.mk -# Copyright (C) 2013 The CyanogenMod Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh - -LOCAL_PATH := \$(call my-dir) - -ifeq (\$(TARGET_DEVICE),n1) - -include \$(CLEAR_VARS) -LOCAL_MODULE := libtime_genoff -LOCAL_MODULE_OWNER := oppo -LOCAL_SRC_FILES := proprietary/lib/libtime_genoff.so -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := .so -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -include \$(BUILD_PREBUILT) - -include \$(CLEAR_VARS) -LOCAL_MODULE := libqc-opt -LOCAL_MODULE_OWNER := oppo -LOCAL_SRC_FILES := proprietary/vendor/lib/libqc-opt.so -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := .so -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -LOCAL_MODULE_PATH := \$(TARGET_OUT_VENDOR)/lib -include \$(BUILD_PREBUILT) - -include \$(CLEAR_VARS) -LOCAL_MODULE := PPPreference -LOCAL_MODULE_OWNER := oppo -LOCAL_SRC_FILES := proprietary/app/PPPreference.apk -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := .apk -LOCAL_MODULE_CLASS := APPS -LOCAL_CERTIFICATE := platform -include \$(BUILD_PREBUILT) - -include \$(CLEAR_VARS) -LOCAL_MODULE := com.qualcomm.location -LOCAL_MODULE_OWNER := oppo -LOCAL_SRC_FILES := proprietary/app/com.qualcomm.location.apk -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_SUFFIX := .apk -LOCAL_MODULE_CLASS := APPS -LOCAL_CERTIFICATE := platform -include \$(BUILD_PREBUILT) - -endif - -EOF +export DEVICE=n1 +export VENDOR=oppo +./../apq8064-common/setup-makefiles.sh $@ diff --git a/wifi/WCNSS_cfg.dat b/wifi/WCNSS_cfg.dat Binary files differdeleted file mode 100644 index d4a219f..0000000 --- a/wifi/WCNSS_cfg.dat +++ /dev/null diff --git a/wifi/WCNSS_qcom_cfg.ini b/wifi/WCNSS_qcom_cfg.ini deleted file mode 100644 index 0a5beff..0000000 --- a/wifi/WCNSS_qcom_cfg.ini +++ /dev/null @@ -1,398 +0,0 @@ -# This file allows user to override the factory - -# defaults for the WLAN Driver - - -# Enable IMPS or not -gEnableImps=1 - -# Enable/Disable Idle Scan - -gEnableIdleScan=0 - - -# Increase sleep duration (seconds) during IMPS -# 0 implies no periodic wake up from IMPS. Periodic wakeup is -# unnecessary if Idle Scan is disabled. -gImpsModSleepTime=0 - - -# Enable BMPS or not -gEnableBmps=1 - -# Enable suspend or not - -# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter - -gEnableSuspend=3 - - -# Phy Mode (auto, b, g, n, etc) -# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac -gDot11Mode=0 - - -# Handoff Enable(1) Disable(0) - -gEnableHandoff=0 - - -# CSR Roaming Enable(1) Disable(0) - -gRoamingTime=0 - - -# Assigned MAC Addresses - This will be used until NV items are in place - -# Each byte of MAC address is represented in Hex format as XX - -Intf0MacAddress=000AF58989FF -Intf1MacAddress=000AF58989FE -Intf2MacAddress=000AF58989FD - -Intf3MacAddress=000AF58989FC - - -# UAPSD service interval for VO,VI, BE, BK traffic - -InfraUapsdVoSrvIntv=0 - -InfraUapsdViSrvIntv=0 - -InfraUapsdBeSrvIntv=0 - -InfraUapsdBkSrvIntv=0 - - -# Make 1x1 the default antenna configuration - -gNumRxAnt=1 - - -# Beacon filtering frequency (unit in beacon intervals) - -gNthBeaconFilter=50 - - -# Enable WAPI or not - -# WAPIIsEnabled=0 - - -# Flags to filter Mcast abd Bcast RX packets. - -# Value 0: No filtering, 1: Filter all Multicast. - -# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast - -McastBcastFilter=3 - - -#Flag to enable HostARPOffload feature or not - -hostArpOffload=1 - - -#SoftAP Related Parameters - -# AP MAc addr - -gAPMacAddr=000AF589dcab - - -# 802.11n Protection flag - -gEnableApProt=1 - - -#Enable OBSS protection - -gEnableApOBSSProt=1 - - -#Enable/Disable UAPSD for SoftAP - -gEnableApUapsd=0 - - -# Fixed Rate - -gFixedRate=0 - - -# Maximum Tx power - -# gTxPowerCap=30 - - -# Fragmentation Threshold - -# gFragmentationThreshold=2346 - - -# RTS threshold - -RTSThreshold=2347 - - -# Intra-BSS forward - -gDisableIntraBssFwd=0 - - -# WMM Enable/Disable - -WmmIsEnabled=0 - - -# 802.11d support - -g11dSupportEnabled=1 - -# 802.11h support - -g11hSupportEnabled=1 - -# CCX Support and fast transition -CcxEnabled=0 -FastTransitionEnabled=1 -ImplicitQosIsEnabled=1 -gNeighborScanTimerPeriod=200 - -gNeighborLookupThreshold=76 -gNeighborReassocThreshold=81 - -gNeighborScanChannelMinTime=20 -gNeighborScanChannelMaxTime=30 -gMaxNeighborReqTries=3 - -# Legacy (non-CCX, non-802.11r) Fast Roaming Support -# To enable, set FastRoamEnabled=1 -# To disable, set FastRoamEnabled=0 -FastRoamEnabled=1 - -#Check if the AP to which we are roaming is better than current AP in terms of RSSI. -#Checking is disabled if set to Zero.Otherwise it will use this value as to how better -#the RSSI of the new/roamable AP should be for roaming -RoamRssiDiff=3 - -# If the RSSI of any available candidate is better than currently associated -# AP by at least gImmediateRoamRssiDiff, then being to roam immediately (without -# registering for reassoc threshold). -# NOTE: Value of 0 means that we would register for reassoc threshold. -gImmediateRoamRssiDiff=10 - -# To enable, set gRoamIntraBand=1 (Roaming within band) -# To disable, set gRoamIntraBand=0 (Roaming across band) -gRoamIntraBand=0 - -# SAP Country code - -# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door. - -# Example - -# US Indoor, USI - -# Korea Outdoor, KRO - -# Japan without optional byte, JP - -# France without optional byte, FR - -#gAPCntryCode=USI - - -#Short Guard Interval Enable/disable - -gShortGI20Mhz=1 - -gShortGI40Mhz=1 - - -#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled - -gAPAutoShutOff=0 - - -# SAP auto channel selection configuration - -# 0 = disable auto channel selection - -# 1 = enable auto channel selection, channel provided by supplicant will be ignored - -gApAutoChannelSelection=0 - - -# Listen Energy Detect Mode Configuration - -# Valid values 0-128 - -# 128 means disable Energy Detect feature - -# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled. - -# 10-128 are reserved. - -# The EDET threshold mapping is as follows in 3dB step: - -# 0 = -60 dBm - -# 1 = -63 dBm - -# 2 = -66 dBm - -# ... - -# 7 = -81 dBm - -# 8 = -84 dBm - -# 9 = -87 dBm - -# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as: - -# - -# Range Loss (dB) = EDET threshold level (dBm) + 97 dBm. - -# - -gEnablePhyAgcListenMode=128 - - -#Preferred channel to start BT AMP AP mode (0 means, any channel) - -BtAmpPreferredChannel=0 - - -#Preferred band (both or 2.4 only or 5 only) - -BandCapability=0 - - -#Beacon Early Termination (1 = enable the BET feature, 0 = disable) - -enableBeaconEarlyTermination=0 - -beaconEarlyTerminationWakeInterval=3 - - -#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable) - -gEnableBtAmp=0 - - -#SOFTAP Channel Range selection - -gAPChannelSelectStartChannel=1 - -gAPChannelSelectEndChannel=11 - - -#SOFTAP Channel Range selection Operating band - -# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND - -gAPChannelSelectOperatingBand=0 - - -#Channel Bonding -gChannelBondingMode5GHz=1 - - -#Enable Keep alive with non-zero period value - -#gStaKeepAlivePeriod = 30 - -#AP LINK MONITOR TIMEOUT is used for both SAP and GO mode. -#It is used to change the frequency of keep alive packets in the AP Link Monitor period which is by -#default 20s. Currently the keep alive packets are sent as an interval of 3s but after this change -#the keep alive packet frequency can be changed. - -#gApLinkMonitorPeriod = 3 - - -#If set will start with active scan after driver load, otherwise will start with - -#passive scan to find out the domain - -gEnableBypass11d=1 - - -#If set to 0, will not scan DFS channels - -gEnableDFSChnlScan=1 - - -gVhtChannelWidth=2 -gEnableLogp=1 - - -# Enable Automatic Tx Power control - -gEnableAutomaticTxPowerControl=1 - -# 0 for OLPC 1 for CLPC and SCPC -gEnableCloseLoop=1 - -#Data Inactivity Timeout when in powersave (in ms) -gDataInactivityTimeout=200 - -# VHT Tx/Rx MCS values -# Valid values are 0,1,2. If commented out, the default value is 0. -# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9 -gVhtRxMCS=2 -gVhtTxMCS=2 - -# Enable CRDA regulatory support by settings default country code -#gCrdaDefaultCountryCode=TW - -# Scan Timing Parameters -# gPassiveMaxChannelTime=110 -# gPassiveMinChannelTime=60 -# gActiveMaxChannelTime=40 -# gActiveMinChannelTime=20 - -#If set to 0, MCC is not allowed. -gEnableMCCMode=1 - -# 1=enable STBC; 0=disable STBC -gEnableRXSTBC=1 - -# Enable Active mode offload -gEnableActiveModeOffload=1 - -#Enable Scan Results Aging based on timer -#Timer value is in seconds -#If Set to 0 it will not enable the feature -gScanAgingTime=0 - -#Enable Power saving mechanism Based on Android Framework -#If set to 0 Driver internally control the Power saving mechanism -#If set to 1 Android Framwrok control the Power saving mechanism -isAndroidPsEn=0 - -#disable LDPC in STA mode if the AP is TXBF capable -gDisableLDPCWithTxbfAP=1 - -#Enable thermal mitigation -gThermalMitigationEnable=1 - -#List of Country codes for which 11ac needs to be disabled -#Each country code must be delimited by comma(,) -gListOfNon11acCountryCode=RU,UA,ZA - -#Maxium Channel time in msec -gMaxMediumTime = 6000 - -# 802.11K support -gRrmEnable=1 -gRrmOperChanMax=8 -gRrmNonOperChanMax=8 -gRrmRandIntvl=100 - -END - -# Note: Configuration parser would not read anything past the END marker - diff --git a/wifi/WCNSS_qcom_wlan_nv.bin b/wifi/WCNSS_qcom_wlan_nv.bin Binary files differdeleted file mode 100644 index 9ecfc08..0000000 --- a/wifi/WCNSS_qcom_wlan_nv.bin +++ /dev/null diff --git a/wifi/p2p_supplicant_overlay.conf b/wifi/p2p_supplicant_overlay.conf deleted file mode 100644 index acbace2..0000000 --- a/wifi/p2p_supplicant_overlay.conf +++ /dev/null @@ -1 +0,0 @@ -disable_scan_offload=1 diff --git a/wifi/wpa_supplicant_overlay.conf b/wifi/wpa_supplicant_overlay.conf deleted file mode 100644 index 58c2639..0000000 --- a/wifi/wpa_supplicant_overlay.conf +++ /dev/null @@ -1,2 +0,0 @@ -disable_scan_offload=1 -p2p_disabled=1 |
