summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:02:55 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:02:55 +0000
commit265505441cd99fc7b6889d00a74f6c01353aac7d (patch)
treeb3500eb5ccd0fc360f3f4439b74a87bc4b05daa4
parent7f47f75eaf9d475bbcdd78343e9a40cf6d986874 (diff)
parentc2a556a3d1bca2d8c127b973af37cc2733cdc81e (diff)
Snap for 8570526 from c2a556a3d1bca2d8c127b973af37cc2733cdc81e to mainline-ipsec-releaseaml_ips_331312000aml_ips_331310000aml_ips_331111030aml_ips_331014020
Change-Id: I4345eef79743c111d3f9cf425493aa27d4d655c5
-rw-r--r--Android.bp56
-rw-r--r--Android.mk12
-rw-r--r--AndroidProducts.mk8
-rw-r--r--BoardConfigCommon.mk34
-rw-r--r--METADATA7
-rw-r--r--audio/Android.mk14
-rw-r--r--audio/audio_aec.c700
-rw-r--r--audio/audio_aec.h132
-rw-r--r--audio/audio_hw.c823
-rw-r--r--audio/audio_hw.h127
-rw-r--r--audio/fifo_wrapper.cpp79
-rw-r--r--audio/fifo_wrapper.h35
-rw-r--r--audio/fir_filter.c154
-rw-r--r--audio/fir_filter.h39
-rw-r--r--build/tasks/kernel.mk8
-rw-r--r--compatibility_matrix.xml8
-rw-r--r--db845c.mk25
-rw-r--r--db845c/BoardConfig.mk35
-rw-r--r--db845c/device.mk44
-rw-r--r--db845c/eth_mac_addr.rc9
-rw-r--r--db845c/eth_mac_addr.sh15
-rw-r--r--db845c/firmware/Android.mk103
-rw-r--r--db845c/firmware/K2026090.membin13012 -> 0 bytes
-rw-r--r--db845c/firmware/LICENSE.qcom.txt206
-rw-r--r--db845c/firmware/NOTICE206
-rw-r--r--db845c/firmware/a630_gmu.binbin32768 -> 0 bytes
-rw-r--r--db845c/firmware/a630_sqe.fwbin31316 -> 0 bytes
-rw-r--r--db845c/firmware/a630_zap.b00bin148 -> 0 bytes
-rw-r--r--db845c/firmware/a630_zap.b01bin6536 -> 0 bytes
-rw-r--r--db845c/firmware/a630_zap.b02bin1968 -> 0 bytes
-rw-r--r--db845c/firmware/a630_zap.elfbin14256 -> 0 bytes
-rw-r--r--db845c/firmware/a630_zap.mdtbin6684 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b00bin532 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b01bin6920 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b02bin8408 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b03bin120356 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b04bin1831808 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b05bin1144284 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b06bin2872 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b07bin33548 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b08bin307832 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b09bin100 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b10bin6474588 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b11bin308688 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b12bin2368 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.b13bin143696 -> 0 bytes
-rw-r--r--db845c/firmware/adsp.mdtbin7452 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.102bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.104bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.105bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.106bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.107bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.108bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.109bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.10bbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.10cbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b04bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b07bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b09bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b0abin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b0bbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b0dbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b0ebin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b0fbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b14bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b15bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b30bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b31bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b32bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b33bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b34bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b35bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b36bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b37bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b38bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b39bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b3abin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b3cbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b3dbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b3ebin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b3fbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b41bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b42bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b45bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.b70bin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.binbin19152 -> 0 bytes
-rw-r--r--db845c/firmware/bdwlan.txt5223
-rw-r--r--db845c/firmware/cdsp.b00bin372 -> 0 bytes
-rw-r--r--db845c/firmware/cdsp.b01bin6760 -> 0 bytes
-rw-r--r--db845c/firmware/cdsp.b02bin153296 -> 0 bytes
-rw-r--r--db845c/firmware/cdsp.b03bin104096 -> 0 bytes
-rw-r--r--db845c/firmware/cdsp.b04bin980 -> 0 bytes
-rw-r--r--db845c/firmware/cdsp.b05bin2341364 -> 0 bytes
-rw-r--r--db845c/firmware/cdsp.b06bin30560 -> 0 bytes
-rw-r--r--db845c/firmware/cdsp.b08bin50708 -> 0 bytes
-rw-r--r--db845c/firmware/cdsp.mdtbin7132 -> 0 bytes
-rw-r--r--db845c/firmware/devcfg.mbnbin39944 -> 0 bytes
-rw-r--r--db845c/firmware/device.mk114
-rw-r--r--db845c/firmware/qca/Android.mk11
-rw-r--r--db845c/firmware/qca/NOTICE426
-rw-r--r--db845c/firmware/qca/crbtfw21.tlvbin177060 -> 0 bytes
-rw-r--r--db845c/firmware/qca/crnv21.binbin4587 -> 0 bytes
-rw-r--r--db845c/firmware/qcom/Android.mk6
-rw-r--r--db845c/firmware/qcom/venus-5.2/Android.mk13
-rw-r--r--db845c/firmware/qcom/venus-5.2/NOTICE206
-rw-r--r--db845c/firmware/qcom/venus-5.2/venus.b00bin212 -> 0 bytes
-rw-r--r--db845c/firmware/qcom/venus-5.2/venus.b01bin6600 -> 0 bytes
-rw-r--r--db845c/firmware/qcom/venus-5.2/venus.b02bin809980 -> 0 bytes
-rw-r--r--db845c/firmware/qcom/venus-5.2/venus.b03bin33536 -> 0 bytes
-rw-r--r--db845c/firmware/qcom/venus-5.2/venus.b041
-rw-r--r--db845c/firmware/qcom/venus-5.2/venus.mdtbin6812 -> 0 bytes
-rw-r--r--db845c/firmware/wlanmdsp.mbnbin3311964 -> 0 bytes
-rw-r--r--db845c_mini.mk7
-rw-r--r--device-common.mk205
-rw-r--r--etc/audio_policy_configuration.xml59
-rw-r--r--etc/external_camera_config.xml28
-rw-r--r--etc/media_profiles.xml118
-rw-r--r--etc/mixer_paths.xml11
-rw-r--r--etc/permissions/android.software.xml43
-rwxr-xr-xfetch-vendor-package.sh27
-rw-r--r--fstab.common14
-rw-r--r--fstab.ramdisk.common3
-rw-r--r--full.mk253
-rw-r--r--gralloc/Android.mk57
-rw-r--r--gralloc/gralloc.cpp259
-rw-r--r--gralloc/gralloc_drm.h42
-rw-r--r--gralloc/gralloc_gbm.cpp475
-rw-r--r--gralloc/gralloc_gbm_priv.h55
-rw-r--r--init.common.rc22
-rw-r--r--init.common.usb.rc14
-rw-r--r--installer/db845c/README11
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/BTFM.binbin667648 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/LICENSE206
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/MD5SUMS.txt50
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/abl.elfbin151552 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/aop.mbnbin184180 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/boot-erase.imgbin1048576 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/cmnlib.mbnbin376516 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/cmnlib64.mbnbin496406 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/devcfg.mbnbin39944 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/dspso.binbin33554432 -> 0 bytes
-rwxr-xr-xinstaller/db845c/dragonboard-845c-bootloader-ufs-aosp/flashall27
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup0.binbin20480 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup1.binbin20480 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup2.binbin20480 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup3.binbin20480 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup4.binbin20480 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup5.binbin20480 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both0.binbin45056 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both1.binbin45056 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both2.binbin45056 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both3.binbin45056 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both4.binbin45056 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both5.binbin45056 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main0.binbin24576 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main1.binbin24576 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main2.binbin24576 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main3.binbin24576 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main4.binbin24576 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main5.binbin24576 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/hyp.mbnbin385872 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/imagefv.elfbin20480 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/keymaster64.mbnbin232947 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch0.xml32
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch1.xml32
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch2.xml32
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch3.xml32
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch4.xml32
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch5.xml32
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/prog_firehose_ddr.elfbin680369 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/qupv3fw.elfbin65487 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram0.xml15
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram1.xml10
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram2.xml10
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram3.xml11
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram4.xml56
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram5.xml17
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/sec.datbin80 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/storsec.mbnbin20777 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/tz.mbnbin2056192 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/xbl.elfbin3286608 -> 0 bytes
-rw-r--r--installer/db845c/dragonboard-845c-bootloader-ufs-aosp/xbl_config.elfbin98124 -> 0 bytes
-rwxr-xr-xinstaller/db845c/flash-all-aosp.sh28
-rwxr-xr-xinstaller/db845c/qdlbin132224 -> 0 bytes
-rwxr-xr-xinstaller/db845c/recovery.sh28
-rw-r--r--installer/rb5/README70
-rwxr-xr-xinstaller/rb5/flash-all-aosp.sh63
-rwxr-xr-xinstaller/rb5/recovery.sh34
-rw-r--r--libmemtrack/memtrack_dragonboard.c45
-rw-r--r--manifest.xml94
-rw-r--r--mini-manifest.xml2
-rw-r--r--mini.mk44
-rw-r--r--pixel3_mainline.mk10
-rw-r--r--pixel3_mainline/BoardConfig.mk14
-rw-r--r--pixel3_mainline/device.mk30
-rw-r--r--qcom/init.qcom.rc56
-rw-r--r--qcom/pd-mapper/Android.bp30
-rw-r--r--qcom/pd-mapper/LICENSE60
-rw-r--r--qcom/pd-mapper/Makefile28
-rw-r--r--qcom/pd-mapper/assoc.c158
-rw-r--r--qcom/pd-mapper/assoc.h54
-rw-r--r--qcom/pd-mapper/json.c451
-rw-r--r--qcom/pd-mapper/json.h67
-rw-r--r--qcom/pd-mapper/pd-mapper.c387
-rw-r--r--qcom/pd-mapper/pd-mapper.service.in11
-rw-r--r--qcom/pd-mapper/servreg_loc.c169
-rw-r--r--qcom/pd-mapper/servreg_loc.h67
-rw-r--r--qcom/pd-mapper/servreg_loc.qmi48
-rw-r--r--qcom/qrtr/Android.bp68
-rw-r--r--qcom/qrtr/LICENSE24
-rw-r--r--qcom/qrtr/Makefile150
-rw-r--r--qcom/qrtr/lib/libqrtr.h195
-rw-r--r--qcom/qrtr/lib/logging.c73
-rw-r--r--qcom/qrtr/lib/logging.h36
-rw-r--r--qcom/qrtr/lib/qmi.c874
-rw-r--r--qcom/qrtr/lib/qrtr.c258
-rw-r--r--qcom/qrtr/qrtr-ns.service.in9
-rwxr-xr-xqcom/qrtr/qrtr.py97
-rw-r--r--qcom/qrtr/src/addr.c77
-rw-r--r--qcom/qrtr/src/addr.h8
-rw-r--r--qcom/qrtr/src/cfg.c44
-rw-r--r--qcom/qrtr/src/hash.c37
-rw-r--r--qcom/qrtr/src/hash.h12
-rw-r--r--qcom/qrtr/src/list.h128
-rw-r--r--qcom/qrtr/src/lookup.c237
-rw-r--r--qcom/qrtr/src/map.c233
-rw-r--r--qcom/qrtr/src/map.h38
-rw-r--r--qcom/qrtr/src/ns.c808
-rw-r--r--qcom/qrtr/src/ns.h10
-rw-r--r--qcom/qrtr/src/util.c18
-rw-r--r--qcom/qrtr/src/util.h9
-rw-r--r--qcom/qrtr/src/waiter.c378
-rw-r--r--qcom/qrtr/src/waiter.h103
-rw-r--r--qcom/rmtfs/Android.bp32
-rw-r--r--qcom/rmtfs/LICENSE27
-rw-r--r--qcom/rmtfs/Makefile27
-rw-r--r--qcom/rmtfs/qmi_rmtfs.c256
-rw-r--r--qcom/rmtfs/qmi_rmtfs.h101
-rw-r--r--qcom/rmtfs/qmi_rmtfs.qmi77
-rw-r--r--qcom/rmtfs/qmi_tlv.c233
-rw-r--r--qcom/rmtfs/rmtfs.c568
-rw-r--r--qcom/rmtfs/rmtfs.h42
-rw-r--r--qcom/rmtfs/rmtfs.service.in12
-rw-r--r--qcom/rmtfs/rproc.c137
-rw-r--r--qcom/rmtfs/sharedmem.c468
-rw-r--r--qcom/rmtfs/storage.c288
-rw-r--r--qcom/rmtfs/util.c48
-rw-r--r--qcom/rmtfs/util.h9
-rw-r--r--qcom/set_hw.sh12
-rwxr-xr-xqcom/set_udc.sh17
-rw-r--r--qcom/tqftpserv/Android.bp28
-rw-r--r--qcom/tqftpserv/LICENSE30
-rw-r--r--qcom/tqftpserv/Makefile25
-rw-r--r--qcom/tqftpserv/list.h104
-rw-r--r--qcom/tqftpserv/tqftpserv.c609
-rw-r--r--qcom/tqftpserv/tqftpserv.service.in12
-rw-r--r--qcom/tqftpserv/translate.c190
-rw-r--r--qcom/tqftpserv/translate.h6
-rw-r--r--rb5.mk7
-rw-r--r--rb5/BoardConfig.mk44
-rw-r--r--rb5/device.mk54
-rw-r--r--rb5/mixer_paths.xml5
-rw-r--r--rb5_mini.mk7
-rw-r--r--seccomp_policy/mediaswcodec.policy3
-rw-r--r--sepolicy/eth_mac_addr.te12
-rw-r--r--sepolicy/file.te9
-rw-r--r--sepolicy/file_contexts68
-rw-r--r--sepolicy/genfs_contexts29
-rw-r--r--sepolicy/hal_audio_default.te2
-rw-r--r--sepolicy/hal_camera.te15
-rw-r--r--sepolicy/hal_graphics_composer.te2
-rw-r--r--sepolicy/hal_graphics_composer_default.te5
-rw-r--r--sepolicy/kernel.te6
-rw-r--r--sepolicy/mediacodec.te1
-rw-r--r--sepolicy/mediaserver.te1
-rw-r--r--sepolicy/mediaswcodec.te2
-rw-r--r--sepolicy/pd_mapper.te8
-rw-r--r--sepolicy/property_contexts2
-rw-r--r--sepolicy/qrtr.te8
-rw-r--r--sepolicy/rmtfs.te15
-rw-r--r--sepolicy/set_hw.te11
-rw-r--r--sepolicy/set_udc.te11
-rw-r--r--sepolicy/surfaceflinger.te1
-rw-r--r--sepolicy/suspend_blocker.te6
-rw-r--r--sepolicy/system_server.te2
-rw-r--r--sepolicy/te_macros2
-rw-r--r--sepolicy/tinymix.te7
-rw-r--r--sepolicy/tqftpserv.te10
-rw-r--r--sm8450/BoardConfig.mk58
-rw-r--r--sm8450/device.mk (renamed from libmemtrack/Android.mk)25
-rw-r--r--sm8450_mini.mk7
-rw-r--r--ueventd.common.rc7
-rw-r--r--utils.mk15
-rw-r--r--vendor-package-ver.mk4
-rwxr-xr-xvendor-package-ver.sh14
295 files changed, 12368 insertions, 8623 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..c9f7e86
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,56 @@
+// Copyright 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+soong_namespace {}
+
+// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
+// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
+// DEPENDING ON IT IN YOUR PROJECT. ***
+package {
+ default_applicable_licenses: ["device_linaro_dragonboard_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+// See: http://go/android-license-faq
+license {
+ name: "device_linaro_dragonboard_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ "SPDX-license-identifier-MIT",
+ "SPDX-license-identifier-OpenSSL",
+ "legacy_by_exception_only", // by exception only
+ ],
+ // large-scale-change unable to identify any license_text files
+}
+
+subdirs = [
+ "qcom/pd-mapper",
+ "qcom/qrtr",
+ "qcom/rmtfs",
+ "qcom/tqftpserv",
+]
diff --git a/Android.mk b/Android.mk
index 12ec650..2b6c64a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -20,10 +20,20 @@
# to only building on ARM if they include assembly. Individual makefiles
# are responsible for having their own logic, for fine-grained control.
-ifneq ($(filter db845c pixel3_mainline, $(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter db845c rb5, $(TARGET_BOARD_PLATFORM)),)
LOCAL_PATH := $(call my-dir)
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,.conf))
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,.kl))
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,.policy))
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,.rc))
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,.sh))
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,.xml))
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,fstab.db845c))
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,fstab.pixel3_mainline))
+$(eval $(call declare-1p-copy-files,device/linaro/dragonboard,fstab.rb5))
+
# If some modules are built directly from this directory (not subdirectories),
# their rules should be written here.
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 84cf20f..3492246 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -11,8 +11,12 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/db845c.mk \
- $(LOCAL_DIR)/pixel3_mainline.mk
+ $(LOCAL_DIR)/db845c_mini.mk \
+ $(LOCAL_DIR)/rb5.mk \
+ $(LOCAL_DIR)/rb5_mini.mk \
+ $(LOCAL_DIR)/sm8450_mini.mk \
COMMON_LUNCH_CHOICES := \
db845c-userdebug \
- pixel3_mainline-userdebug
+ rb5-userdebug \
+
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 11ffba8..87cde99 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -13,19 +13,6 @@
# limitations under the License.
#
-# Primary Arch
-TARGET_ARCH := arm64
-TARGET_ARCH_VARIANT := armv8-2a
-TARGET_CPU_VARIANT := kryo385
-TARGET_CPU_ABI := arm64-v8a
-
-# Secondary Arch
-TARGET_2ND_ARCH := arm
-TARGET_2ND_ARCH_VARIANT := armv8-2a
-TARGET_2ND_CPU_VARIANT := kryo385
-TARGET_2ND_CPU_ABI := armeabi-v7a
-TARGET_2ND_CPU_ABI2 := armeabi
-
TARGET_USES_64_BIT_BINDER := true
TARGET_NO_BOOTLOADER := true
@@ -38,12 +25,14 @@ TARGET_COPY_OUT_VENDOR := vendor
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_SYSTEM_EXT := system_ext
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_PRODUCT := product
+BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_USES_METADATA_PARTITION := true
# Super partition
TARGET_USE_DYNAMIC_PARTITIONS := true
BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
BOARD_SUPER_PARTITION_GROUPS := db_dynamic_partitions
-BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext
+BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor system_ext product
# Enable Treble
PRODUCT_FULL_TREBLE := true
@@ -51,9 +40,17 @@ BOARD_VNDK_VERSION := current
# Mesa DRM hwcomposer
BOARD_USES_DRM_HWCOMPOSER := true
-BOARD_GPU_DRIVERS := freedreno virgl
+BOARD_GPU_DRIVERS := freedreno
TARGET_USES_HWC2 := true
+ifeq ($(TARGET_BUILD_MESA),true)
+BOARD_MESA3D_USES_MESON_BUILD := true
+BOARD_MESA3D_GALLIUM_DRIVERS := freedreno
+BOARD_MESA3D_VULKAN_DRIVERS := freedreno
+else
+BOARD_USE_CUSTOMIZED_MESA := true
+endif
+
# WiFi
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
@@ -68,9 +65,6 @@ BOARD_SEPOLICY_DIRS += \
device/linaro/dragonboard/sepolicy \
system/bt/vendor_libs/linux/sepolicy
-DEVICE_MANIFEST_FILE := device/linaro/dragonboard/manifest.xml
-DEVICE_MATRIX_FILE := device/linaro/dragonboard/compatibility_matrix.xml
-
# Enable dex pre-opt to speed up initial boot
ifeq ($(HOST_OS),linux)
ifeq ($(WITH_DEXPREOPT),)
@@ -78,3 +72,7 @@ ifeq ($(HOST_OS),linux)
WITH_DEXPREOPT_PIC := true
endif
endif
+
+# Copy firmware files to ramdisk/vendor_ramdisk to workaround
+# the dependency on FW_LOADER_USER_HELPER_FALLBACK kernel config
+BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..9b2a1bc
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,7 @@
+# *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
+# CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
+# DEPENDING ON IT IN YOUR PROJECT. ***
+third_party {
+ license_note: "proprietary"
+ license_type: BY_EXCEPTION_ONLY
+}
diff --git a/audio/Android.mk b/audio/Android.mk
index afa804f..4356384 100644
--- a/audio/Android.mk
+++ b/audio/Android.mk
@@ -24,18 +24,22 @@ include $(CLEAR_VARS)
LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM)
-LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib/hw
-LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64/hw
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_VENDOR_MODULE := true
-LOCAL_SRC_FILES := audio_hw.c
-LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa
+LOCAL_SRC_FILES := audio_hw.c \
+ audio_aec.c \
+ fifo_wrapper.cpp \
+ fir_filter.c
+LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioroute libaudioutils
LOCAL_CFLAGS := -Wno-unused-parameter
LOCAL_C_INCLUDES += \
external/tinyalsa/include \
external/expat/lib \
+ $(call include-path-for, audio-route) \
system/media/audio_utils/include \
system/media/audio_effects/include
include $(BUILD_SHARED_LIBRARY)
-
diff --git a/audio/audio_aec.c b/audio/audio_aec.c
new file mode 100644
index 0000000..ab99c93
--- /dev/null
+++ b/audio/audio_aec.c
@@ -0,0 +1,700 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+// clang-format off
+/*
+ * Typical AEC signal flow:
+ *
+ * Microphone Audio
+ * Timestamps
+ * +--------------------------------------+
+ * | | +---------------+
+ * | Microphone +---------------+ | | |
+ * O|====== | Audio | Sample Rate | +-------> |
+ * (from . +--+ Samples | + | | |
+ * mic . +==================> Format |==============> |
+ * codec) . | Conversion | | | Cleaned
+ * O|====== | (if required) | | Acoustic | Audio
+ * +---------------+ | Echo | Samples
+ * | Canceller |===================>
+ * | (AEC) |
+ * Reference +---------------+ | |
+ * Audio | Sample Rate | | |
+ * Samples | + | | |
+ * +=============> Format |==============> |
+ * | | Conversion | | |
+ * | | (if required) | +-------> |
+ * | +---------------+ | | |
+ * | | +---------------+
+ * | +-------------------------------+
+ * | | Reference Audio
+ * | | Timestamps
+ * | |
+ * +--+----+---------+ AUDIO CAPTURE
+ * | Speaker |
+ * +------------+ Audio/Timestamp +---------------------------------------------------------------------------+
+ * | Buffer |
+ * +--^----^---------+ AUDIO PLAYBACK
+ * | |
+ * | |
+ * | |
+ * | |
+ * |\ | |
+ * | +-+ | |
+ * (to | | +-----C----+
+ * speaker | | | | Playback
+ * codec) | | <=====+================================================================+ Audio
+ * | +-+ Samples
+ * |/
+ *
+ */
+// clang-format on
+
+#define LOG_TAG "audio_hw_aec"
+// #define LOG_NDEBUG 0
+
+#include <audio_utils/primitives.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <errno.h>
+#include <malloc.h>
+#include <sys/time.h>
+#include <tinyalsa/asoundlib.h>
+#include <unistd.h>
+#include <log/log.h>
+#include "audio_aec.h"
+
+#ifdef AEC_HAL
+#include "audio_aec_process.h"
+#else
+#define aec_spk_mic_init(...) ((int)0)
+#define aec_spk_mic_reset(...) ((void)0)
+#define aec_spk_mic_process(...) ((int32_t)0)
+#define aec_spk_mic_release(...) ((void)0)
+#endif
+
+#define MAX_TIMESTAMP_DIFF_USEC 200000
+
+#define MAX_READ_WAIT_TIME_MSEC 80
+
+uint64_t timespec_to_usec(struct timespec ts) {
+ return (ts.tv_sec * 1e6L + ts.tv_nsec/1000);
+}
+
+void get_reference_audio_in_place(struct aec_t *aec, size_t frames) {
+ if (aec->num_reference_channels == aec->spk_num_channels) {
+ /* Reference count equals speaker channels, nothing to do here. */
+ return;
+ } else if (aec->num_reference_channels != 1) {
+ /* We don't have a rule for non-mono references, show error on log */
+ ALOGE("Invalid reference count - must be 1 or match number of playback channels!");
+ return;
+ }
+ int16_t *src_Nch = &aec->spk_buf_playback_format[0];
+ int16_t *dst_1ch = &aec->spk_buf_playback_format[0];
+ int32_t num_channels = (int32_t)aec->spk_num_channels;
+ size_t frame, ch;
+ for (frame = 0; frame < frames; frame++) {
+ int32_t acc = 0;
+ for (ch = 0; ch < aec->spk_num_channels; ch++) {
+ acc += src_Nch[ch];
+ }
+ *dst_1ch++ = clamp16(acc/num_channels);
+ src_Nch += aec->spk_num_channels;
+ }
+}
+
+void print_queue_status_to_log(struct aec_t *aec, bool write_side) {
+ ssize_t q1 = fifo_available_to_read(aec->spk_fifo);
+ ssize_t q2 = fifo_available_to_read(aec->ts_fifo);
+
+ ALOGV("Queue available %s: Spk %zd (count %zd) TS %zd (count %zd)",
+ (write_side) ? "(POST-WRITE)" : "(PRE-READ)",
+ q1, q1/aec->spk_frame_size_bytes/PLAYBACK_PERIOD_SIZE,
+ q2, q2/sizeof(struct aec_info));
+}
+
+void flush_aec_fifos(struct aec_t *aec) {
+ if (aec == NULL) {
+ return;
+ }
+ if (aec->spk_fifo != NULL) {
+ ALOGV("Flushing AEC Spk FIFO...");
+ fifo_flush(aec->spk_fifo);
+ }
+ if (aec->ts_fifo != NULL) {
+ ALOGV("Flushing AEC Timestamp FIFO...");
+ fifo_flush(aec->ts_fifo);
+ }
+ /* Reset FIFO read-write offset tracker */
+ aec->read_write_diff_bytes = 0;
+}
+
+void aec_set_spk_running_no_lock(struct aec_t* aec, bool state) {
+ aec->spk_running = state;
+}
+
+bool aec_get_spk_running_no_lock(struct aec_t* aec) {
+ return aec->spk_running;
+}
+
+void destroy_aec_reference_config_no_lock(struct aec_t* aec) {
+ if (!aec->spk_initialized) {
+ return;
+ }
+ aec_set_spk_running_no_lock(aec, false);
+ fifo_release(aec->spk_fifo);
+ fifo_release(aec->ts_fifo);
+ memset(&aec->last_spk_info, 0, sizeof(struct aec_info));
+ aec->spk_initialized = false;
+}
+
+void destroy_aec_mic_config_no_lock(struct aec_t* aec) {
+ if (!aec->mic_initialized) {
+ return;
+ }
+ release_resampler(aec->spk_resampler);
+ free(aec->mic_buf);
+ free(aec->spk_buf);
+ free(aec->spk_buf_playback_format);
+ free(aec->spk_buf_resampler_out);
+ memset(&aec->last_mic_info, 0, sizeof(struct aec_info));
+ aec->mic_initialized = false;
+}
+
+struct aec_t *init_aec_interface() {
+ ALOGV("%s enter", __func__);
+ struct aec_t *aec = (struct aec_t *)calloc(1, sizeof(struct aec_t));
+ if (aec == NULL) {
+ ALOGE("Failed to allocate memory for AEC interface!");
+ } else {
+ pthread_mutex_init(&aec->lock, NULL);
+ }
+
+ ALOGV("%s exit", __func__);
+ return aec;
+}
+
+void release_aec_interface(struct aec_t *aec) {
+ ALOGV("%s enter", __func__);
+ pthread_mutex_lock(&aec->lock);
+ destroy_aec_mic_config_no_lock(aec);
+ destroy_aec_reference_config_no_lock(aec);
+ pthread_mutex_unlock(&aec->lock);
+ free(aec);
+ ALOGV("%s exit", __func__);
+}
+
+int init_aec(int sampling_rate, int num_reference_channels,
+ int num_microphone_channels, struct aec_t **aec_ptr) {
+ ALOGV("%s enter", __func__);
+ int ret = 0;
+ int aec_ret = aec_spk_mic_init(
+ sampling_rate,
+ num_reference_channels,
+ num_microphone_channels);
+ if (aec_ret) {
+ ALOGE("AEC object failed to initialize!");
+ ret = -EINVAL;
+ }
+ struct aec_t *aec = init_aec_interface();
+ if (!ret) {
+ aec->num_reference_channels = num_reference_channels;
+ /* Set defaults, will be overridden by settings in init_aec_(mic|referece_config) */
+ /* Capture uses 2-ch, 32-bit frames */
+ aec->mic_sampling_rate = CAPTURE_CODEC_SAMPLING_RATE;
+ aec->mic_frame_size_bytes = CHANNEL_STEREO * sizeof(int32_t);
+ aec->mic_num_channels = CHANNEL_STEREO;
+
+ /* Playback uses 2-ch, 16-bit frames */
+ aec->spk_sampling_rate = PLAYBACK_CODEC_SAMPLING_RATE;
+ aec->spk_frame_size_bytes = CHANNEL_STEREO * sizeof(int16_t);
+ aec->spk_num_channels = CHANNEL_STEREO;
+ }
+
+ (*aec_ptr) = aec;
+ ALOGV("%s exit", __func__);
+ return ret;
+}
+
+void release_aec(struct aec_t *aec) {
+ ALOGV("%s enter", __func__);
+ if (aec == NULL) {
+ return;
+ }
+ release_aec_interface(aec);
+ aec_spk_mic_release();
+ ALOGV("%s exit", __func__);
+}
+
+int init_aec_reference_config(struct aec_t *aec, struct alsa_stream_out *out) {
+ ALOGV("%s enter", __func__);
+ if (!aec) {
+ ALOGE("AEC: No valid interface found!");
+ return -EINVAL;
+ }
+
+ int ret = 0;
+ pthread_mutex_lock(&aec->lock);
+ if (aec->spk_initialized) {
+ destroy_aec_reference_config_no_lock(aec);
+ }
+
+ aec->spk_fifo = fifo_init(
+ out->config.period_count * out->config.period_size *
+ audio_stream_out_frame_size(&out->stream),
+ false /* reader_throttles_writer */);
+ if (aec->spk_fifo == NULL) {
+ ALOGE("AEC: Speaker loopback FIFO Init failed!");
+ ret = -EINVAL;
+ goto exit;
+ }
+ aec->ts_fifo = fifo_init(
+ out->config.period_count * sizeof(struct aec_info),
+ false /* reader_throttles_writer */);
+ if (aec->ts_fifo == NULL) {
+ ALOGE("AEC: Speaker timestamp FIFO Init failed!");
+ ret = -EINVAL;
+ fifo_release(aec->spk_fifo);
+ goto exit;
+ }
+
+ aec->spk_sampling_rate = out->config.rate;
+ aec->spk_frame_size_bytes = audio_stream_out_frame_size(&out->stream);
+ aec->spk_num_channels = out->config.channels;
+ aec->spk_initialized = true;
+exit:
+ pthread_mutex_unlock(&aec->lock);
+ ALOGV("%s exit", __func__);
+ return ret;
+}
+
+void destroy_aec_reference_config(struct aec_t* aec) {
+ ALOGV("%s enter", __func__);
+ if (aec == NULL) {
+ ALOGV("%s exit", __func__);
+ return;
+ }
+ pthread_mutex_lock(&aec->lock);
+ destroy_aec_reference_config_no_lock(aec);
+ pthread_mutex_unlock(&aec->lock);
+ ALOGV("%s exit", __func__);
+}
+
+int write_to_reference_fifo(struct aec_t* aec, void* buffer, struct aec_info* info) {
+ ALOGV("%s enter", __func__);
+ int ret = 0;
+ size_t bytes = info->bytes;
+
+ /* Write audio samples to FIFO */
+ ssize_t written_bytes = fifo_write(aec->spk_fifo, buffer, bytes);
+ if (written_bytes != bytes) {
+ ALOGE("Could only write %zu of %zu bytes", written_bytes, bytes);
+ ret = -ENOMEM;
+ }
+
+ /* Write timestamp to FIFO */
+ info->bytes = written_bytes;
+ ALOGV("Speaker timestamp: %ld s, %ld nsec", info->timestamp.tv_sec, info->timestamp.tv_nsec);
+ ssize_t ts_bytes = fifo_write(aec->ts_fifo, info, sizeof(struct aec_info));
+ ALOGV("Wrote TS bytes: %zu", ts_bytes);
+ print_queue_status_to_log(aec, true);
+ ALOGV("%s exit", __func__);
+ return ret;
+}
+
+void get_spk_timestamp(struct aec_t* aec, ssize_t read_bytes, uint64_t* spk_time) {
+ *spk_time = 0;
+ uint64_t spk_time_offset = 0;
+ float usec_per_byte = 1E6 / ((float)(aec->spk_frame_size_bytes * aec->spk_sampling_rate));
+ if (aec->read_write_diff_bytes < 0) {
+ /* We're still reading a previous write packet. (We only need the first sample's timestamp,
+ * so even if we straddle packets we only care about the first one)
+ * So we just use the previous timestamp, with an appropriate offset
+ * based on the number of bytes remaining to be read from that write packet. */
+ spk_time_offset = (aec->last_spk_info.bytes + aec->read_write_diff_bytes) * usec_per_byte;
+ ALOGV("Reusing previous timestamp, calculated offset (usec) %" PRIu64, spk_time_offset);
+ } else {
+ /* If read_write_diff_bytes > 0, there are no new writes, so there won't be timestamps in
+ * the FIFO, and the check below will fail. */
+ if (!fifo_available_to_read(aec->ts_fifo)) {
+ ALOGE("Timestamp error: no new timestamps!");
+ return;
+ }
+ /* We just read valid data, so if we're here, we should have a valid timestamp to use. */
+ ssize_t ts_bytes = fifo_read(aec->ts_fifo, &aec->last_spk_info, sizeof(struct aec_info));
+ ALOGV("Read TS bytes: %zd, expected %zu", ts_bytes, sizeof(struct aec_info));
+ aec->read_write_diff_bytes -= aec->last_spk_info.bytes;
+ }
+
+ *spk_time = timespec_to_usec(aec->last_spk_info.timestamp) + spk_time_offset;
+
+ aec->read_write_diff_bytes += read_bytes;
+ struct aec_info spk_info = aec->last_spk_info;
+ while (aec->read_write_diff_bytes > 0) {
+ /* If read_write_diff_bytes > 0, it means that there are more write packet timestamps
+ * in FIFO (since there we read more valid data the size of the current timestamp's
+ * packet). Keep reading timestamps from FIFO to get to the most recent one. */
+ if (!fifo_available_to_read(aec->ts_fifo)) {
+ /* There are no more timestamps, we have the most recent one. */
+ ALOGV("At the end of timestamp FIFO, breaking...");
+ break;
+ }
+ fifo_read(aec->ts_fifo, &spk_info, sizeof(struct aec_info));
+ ALOGV("Fast-forwarded timestamp by %zd bytes, remaining bytes: %zd,"
+ " new timestamp (usec) %" PRIu64,
+ spk_info.bytes, aec->read_write_diff_bytes, timespec_to_usec(spk_info.timestamp));
+ aec->read_write_diff_bytes -= spk_info.bytes;
+ }
+ aec->last_spk_info = spk_info;
+}
+
+int get_reference_samples(struct aec_t* aec, void* buffer, struct aec_info* info) {
+ ALOGV("%s enter", __func__);
+
+ if (!aec->spk_initialized) {
+ ALOGE("%s called with no reference initialized", __func__);
+ return -EINVAL;
+ }
+
+ size_t bytes = info->bytes;
+ const size_t frames = bytes / aec->mic_frame_size_bytes;
+ const size_t sample_rate_ratio = aec->spk_sampling_rate / aec->mic_sampling_rate;
+
+ /* Read audio samples from FIFO */
+ const size_t req_bytes = frames * sample_rate_ratio * aec->spk_frame_size_bytes;
+ ssize_t available_bytes = 0;
+ unsigned int wait_count = MAX_READ_WAIT_TIME_MSEC;
+ while (true) {
+ available_bytes = fifo_available_to_read(aec->spk_fifo);
+ if (available_bytes >= req_bytes) {
+ break;
+ } else if (available_bytes < 0) {
+ ALOGE("fifo_read returned code %zu ", available_bytes);
+ return -ENOMEM;
+ }
+
+ ALOGV("Sleeping, required bytes: %zu, available bytes: %zd", req_bytes, available_bytes);
+ usleep(1000);
+ if ((wait_count--) == 0) {
+ ALOGE("Timed out waiting for read from reference FIFO");
+ return -ETIMEDOUT;
+ }
+ }
+
+ const size_t read_bytes = fifo_read(aec->spk_fifo, aec->spk_buf_playback_format, req_bytes);
+
+ /* Get timestamp*/
+ get_spk_timestamp(aec, read_bytes, &info->timestamp_usec);
+
+ /* Get reference - could be mono, downmixed from multichannel.
+ * Reference stored at spk_buf_playback_format */
+ const size_t resampler_in_frames = frames * sample_rate_ratio;
+ get_reference_audio_in_place(aec, resampler_in_frames);
+
+ int16_t* resampler_out_buf;
+ /* Resample to mic sampling rate (16-bit resampler) */
+ if (aec->spk_resampler != NULL) {
+ size_t in_frame_count = resampler_in_frames;
+ size_t out_frame_count = frames;
+ aec->spk_resampler->resample_from_input(aec->spk_resampler, aec->spk_buf_playback_format,
+ &in_frame_count, aec->spk_buf_resampler_out,
+ &out_frame_count);
+ resampler_out_buf = aec->spk_buf_resampler_out;
+ } else {
+ if (sample_rate_ratio != 1) {
+ ALOGE("Speaker sample rate %d, mic sample rate %d but no resampler defined!",
+ aec->spk_sampling_rate, aec->mic_sampling_rate);
+ }
+ resampler_out_buf = aec->spk_buf_playback_format;
+ }
+
+ /* Convert to 32 bit */
+ int16_t* src16 = resampler_out_buf;
+ int32_t* dst32 = buffer;
+ size_t frame, ch;
+ for (frame = 0; frame < frames; frame++) {
+ for (ch = 0; ch < aec->num_reference_channels; ch++) {
+ *dst32++ = ((int32_t)*src16++) << 16;
+ }
+ }
+
+ info->bytes = bytes;
+
+ ALOGV("%s exit", __func__);
+ return 0;
+}
+
+int init_aec_mic_config(struct aec_t *aec, struct alsa_stream_in *in) {
+ ALOGV("%s enter", __func__);
+#if DEBUG_AEC
+ remove("/data/local/traces/aec_in.pcm");
+ remove("/data/local/traces/aec_out.pcm");
+ remove("/data/local/traces/aec_ref.pcm");
+ remove("/data/local/traces/aec_timestamps.txt");
+#endif /* #if DEBUG_AEC */
+
+ if (!aec) {
+ ALOGE("AEC: No valid interface found!");
+ return -EINVAL;
+ }
+
+ int ret = 0;
+ pthread_mutex_lock(&aec->lock);
+ if (aec->mic_initialized) {
+ destroy_aec_mic_config_no_lock(aec);
+ }
+ aec->mic_sampling_rate = in->config.rate;
+ aec->mic_frame_size_bytes = audio_stream_in_frame_size(&in->stream);
+ aec->mic_num_channels = in->config.channels;
+
+ aec->mic_buf_size_bytes = in->config.period_size * audio_stream_in_frame_size(&in->stream);
+ aec->mic_buf = (int32_t *)malloc(aec->mic_buf_size_bytes);
+ if (aec->mic_buf == NULL) {
+ ret = -ENOMEM;
+ goto exit;
+ }
+ memset(aec->mic_buf, 0, aec->mic_buf_size_bytes);
+ /* Reference buffer is the same number of frames as mic,
+ * only with a different number of channels in the frame. */
+ aec->spk_buf_size_bytes = in->config.period_size * aec->spk_frame_size_bytes;
+ aec->spk_buf = (int32_t *)malloc(aec->spk_buf_size_bytes);
+ if (aec->spk_buf == NULL) {
+ ret = -ENOMEM;
+ goto exit_1;
+ }
+ memset(aec->spk_buf, 0, aec->spk_buf_size_bytes);
+
+ /* Pre-resampler buffer */
+ size_t spk_frame_out_format_bytes = aec->spk_sampling_rate / aec->mic_sampling_rate *
+ aec->spk_buf_size_bytes;
+ aec->spk_buf_playback_format = (int16_t *)malloc(spk_frame_out_format_bytes);
+ if (aec->spk_buf_playback_format == NULL) {
+ ret = -ENOMEM;
+ goto exit_2;
+ }
+ /* Resampler is 16-bit */
+ aec->spk_buf_resampler_out = (int16_t *)malloc(aec->spk_buf_size_bytes);
+ if (aec->spk_buf_resampler_out == NULL) {
+ ret = -ENOMEM;
+ goto exit_3;
+ }
+
+ /* Don't use resampler if it's not required */
+ if (in->config.rate == aec->spk_sampling_rate) {
+ aec->spk_resampler = NULL;
+ } else {
+ int resampler_ret = create_resampler(
+ aec->spk_sampling_rate, in->config.rate, aec->num_reference_channels,
+ RESAMPLER_QUALITY_MAX - 1, /* MAX - 1 is the real max */
+ NULL, /* resampler_buffer_provider */
+ &aec->spk_resampler);
+ if (resampler_ret) {
+ ALOGE("AEC: Resampler initialization failed! Error code %d", resampler_ret);
+ ret = resampler_ret;
+ goto exit_4;
+ }
+ }
+
+ flush_aec_fifos(aec);
+ aec_spk_mic_reset();
+ aec->mic_initialized = true;
+
+exit:
+ pthread_mutex_unlock(&aec->lock);
+ ALOGV("%s exit", __func__);
+ return ret;
+
+exit_4:
+ free(aec->spk_buf_resampler_out);
+exit_3:
+ free(aec->spk_buf_playback_format);
+exit_2:
+ free(aec->spk_buf);
+exit_1:
+ free(aec->mic_buf);
+ pthread_mutex_unlock(&aec->lock);
+ ALOGV("%s exit", __func__);
+ return ret;
+}
+
+void aec_set_spk_running(struct aec_t *aec, bool state) {
+ ALOGV("%s enter", __func__);
+ pthread_mutex_lock(&aec->lock);
+ aec_set_spk_running_no_lock(aec, state);
+ pthread_mutex_unlock(&aec->lock);
+ ALOGV("%s exit", __func__);
+}
+
+bool aec_get_spk_running(struct aec_t *aec) {
+ ALOGV("%s enter", __func__);
+ pthread_mutex_lock(&aec->lock);
+ bool state = aec_get_spk_running_no_lock(aec);
+ pthread_mutex_unlock(&aec->lock);
+ ALOGV("%s exit", __func__);
+ return state;
+}
+
+void destroy_aec_mic_config(struct aec_t* aec) {
+ ALOGV("%s enter", __func__);
+ if (aec == NULL) {
+ ALOGV("%s exit", __func__);
+ return;
+ }
+
+ pthread_mutex_lock(&aec->lock);
+ destroy_aec_mic_config_no_lock(aec);
+ pthread_mutex_unlock(&aec->lock);
+ ALOGV("%s exit", __func__);
+}
+
+#ifdef AEC_HAL
+int process_aec(struct aec_t *aec, void* buffer, struct aec_info *info) {
+ ALOGV("%s enter", __func__);
+ int ret = 0;
+
+ if (aec == NULL) {
+ ALOGE("AEC: Interface uninitialized! Cannot process.");
+ return -EINVAL;
+ }
+
+ if ((!aec->mic_initialized) || (!aec->spk_initialized)) {
+ ALOGE("%s called with initialization: mic: %d, spk: %d", __func__, aec->mic_initialized,
+ aec->spk_initialized);
+ return -EINVAL;
+ }
+
+ size_t bytes = info->bytes;
+
+ size_t frame_size = aec->mic_frame_size_bytes;
+ size_t in_frames = bytes / frame_size;
+
+ /* Copy raw mic samples to AEC input buffer */
+ memcpy(aec->mic_buf, buffer, bytes);
+
+ uint64_t mic_time = timespec_to_usec(info->timestamp);
+ uint64_t spk_time = 0;
+
+ /*
+ * Only run AEC if there is speaker playback.
+ * The first time speaker state changes to running, flush FIFOs, so we're not stuck
+ * processing stale reference input.
+ */
+ bool spk_running = aec_get_spk_running(aec);
+
+ if (!spk_running) {
+ /* No new playback samples, so don't run AEC.
+ * 'buffer' already contains input samples. */
+ ALOGV("Speaker not running, skipping AEC..");
+ goto exit;
+ }
+
+ if (!aec->prev_spk_running) {
+ flush_aec_fifos(aec);
+ }
+
+ /* If there's no data in FIFO, exit */
+ if (fifo_available_to_read(aec->spk_fifo) <= 0) {
+ ALOGV("Echo reference buffer empty, zeroing reference....");
+ goto exit;
+ }
+
+ print_queue_status_to_log(aec, false);
+
+ /* Get reference, with format and sample rate required by AEC */
+ struct aec_info spk_info;
+ spk_info.bytes = bytes;
+ int ref_ret = get_reference_samples(aec, aec->spk_buf, &spk_info);
+ spk_time = spk_info.timestamp_usec;
+
+ if (ref_ret) {
+ ALOGE("get_reference_samples returned code %d", ref_ret);
+ ret = -ENOMEM;
+ goto exit;
+ }
+
+ int64_t time_diff = (mic_time > spk_time) ? (mic_time - spk_time) : (spk_time - mic_time);
+ if ((spk_time == 0) || (mic_time == 0) || (time_diff > MAX_TIMESTAMP_DIFF_USEC)) {
+ ALOGV("Speaker-mic timestamps diverged, skipping AEC");
+ flush_aec_fifos(aec);
+ aec_spk_mic_reset();
+ goto exit;
+ }
+
+ ALOGV("Mic time: %"PRIu64", spk time: %"PRIu64, mic_time, spk_time);
+
+ /*
+ * AEC processing call - output stored at 'buffer'
+ */
+ int32_t aec_status = aec_spk_mic_process(
+ aec->spk_buf, spk_time,
+ aec->mic_buf, mic_time,
+ in_frames,
+ buffer);
+
+ if (!aec_status) {
+ ALOGE("AEC processing failed!");
+ ret = -EINVAL;
+ }
+
+exit:
+ aec->prev_spk_running = spk_running;
+ ALOGV("Mic time: %"PRIu64", spk time: %"PRIu64, mic_time, spk_time);
+ if (ret) {
+ /* Best we can do is copy over the raw mic signal */
+ memcpy(buffer, aec->mic_buf, bytes);
+ flush_aec_fifos(aec);
+ aec_spk_mic_reset();
+ }
+
+#if DEBUG_AEC
+ /* ref data is 32-bit at this point */
+ size_t ref_bytes = in_frames*aec->num_reference_channels*sizeof(int32_t);
+
+ FILE *fp_in = fopen("/data/local/traces/aec_in.pcm", "a+");
+ if (fp_in) {
+ fwrite((char *)aec->mic_buf, 1, bytes, fp_in);
+ fclose(fp_in);
+ } else {
+ ALOGE("AEC debug: Could not open file aec_in.pcm!");
+ }
+ FILE *fp_out = fopen("/data/local/traces/aec_out.pcm", "a+");
+ if (fp_out) {
+ fwrite((char *)buffer, 1, bytes, fp_out);
+ fclose(fp_out);
+ } else {
+ ALOGE("AEC debug: Could not open file aec_out.pcm!");
+ }
+ FILE *fp_ref = fopen("/data/local/traces/aec_ref.pcm", "a+");
+ if (fp_ref) {
+ fwrite((char *)aec->spk_buf, 1, ref_bytes, fp_ref);
+ fclose(fp_ref);
+ } else {
+ ALOGE("AEC debug: Could not open file aec_ref.pcm!");
+ }
+ FILE *fp_ts = fopen("/data/local/traces/aec_timestamps.txt", "a+");
+ if (fp_ts) {
+ fprintf(fp_ts, "%"PRIu64",%"PRIu64"\n", mic_time, spk_time);
+ fclose(fp_ts);
+ } else {
+ ALOGE("AEC debug: Could not open file aec_timestamps.txt!");
+ }
+#endif /* #if DEBUG_AEC */
+ ALOGV("%s exit", __func__);
+ return ret;
+}
+
+#endif /*#ifdef AEC_HAL*/
diff --git a/audio/audio_aec.h b/audio/audio_aec.h
new file mode 100644
index 0000000..ac7a1dd
--- /dev/null
+++ b/audio/audio_aec.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+/*
+ * Definitions and interface related to HAL implementations of Acoustic Echo Canceller (AEC).
+ *
+ * AEC cleans the microphone signal by removing from it audio data corresponding to loudspeaker
+ * playback. Note that this process can be nonlinear.
+ *
+ */
+
+#ifndef _AUDIO_AEC_H_
+#define _AUDIO_AEC_H_
+
+#include <stdint.h>
+#include <pthread.h>
+#include <sys/time.h>
+#include <hardware/audio.h>
+#include <audio_utils/resampler.h>
+#include "audio_hw.h"
+#include "fifo_wrapper.h"
+
+struct aec_t {
+ pthread_mutex_t lock;
+ size_t num_reference_channels;
+ bool mic_initialized;
+ int32_t *mic_buf;
+ size_t mic_num_channels;
+ size_t mic_buf_size_bytes;
+ size_t mic_frame_size_bytes;
+ uint32_t mic_sampling_rate;
+ struct aec_info last_mic_info;
+ bool spk_initialized;
+ int32_t *spk_buf;
+ size_t spk_num_channels;
+ size_t spk_buf_size_bytes;
+ size_t spk_frame_size_bytes;
+ uint32_t spk_sampling_rate;
+ struct aec_info last_spk_info;
+ int16_t *spk_buf_playback_format;
+ int16_t *spk_buf_resampler_out;
+ void *spk_fifo;
+ void *ts_fifo;
+ ssize_t read_write_diff_bytes;
+ struct resampler_itfe *spk_resampler;
+ bool spk_running;
+ bool prev_spk_running;
+};
+
+/* Initialize AEC object.
+ * This must be called when the audio device is opened.
+ * ALSA device mutex must be held before calling this API.
+ * Returns -EINVAL if AEC object fails to initialize, else returns 0. */
+int init_aec (int sampling_rate, int num_reference_channels,
+ int num_microphone_channels, struct aec_t **);
+
+/* Release AEC object.
+ * This must be called when the audio device is closed. */
+void release_aec(struct aec_t* aec);
+
+/* Initialize reference configuration for AEC.
+ * Must be called when a new output stream is opened.
+ * Returns -EINVAL if any processing block fails to initialize,
+ * else returns 0. */
+int init_aec_reference_config (struct aec_t *aec, struct alsa_stream_out *out);
+
+/* Clear reference configuration for AEC.
+ * Must be called when the output stream is closed. */
+void destroy_aec_reference_config (struct aec_t *aec);
+
+/* Initialize microphone configuration for AEC.
+ * Must be called when a new input stream is opened.
+ * Returns -EINVAL if any processing block fails to initialize,
+ * else returns 0. */
+int init_aec_mic_config(struct aec_t* aec, struct alsa_stream_in* in);
+
+/* Clear microphone configuration for AEC.
+ * Must be called when the input stream is closed. */
+void destroy_aec_mic_config (struct aec_t *aec);
+
+/* Used to communicate playback state (running or not) to AEC interface.
+ * This is used by process_aec() to determine if AEC processing is to be run. */
+void aec_set_spk_running (struct aec_t *aec, bool state);
+
+/* Used to communicate playback state (running or not) to the caller. */
+bool aec_get_spk_running(struct aec_t* aec);
+
+/* Write audio samples to AEC reference FIFO for use in AEC.
+ * Both audio samples and timestamps are added in FIFO fashion.
+ * Must be called after every write to PCM.
+ * Returns -ENOMEM if the write fails, else returns 0. */
+int write_to_reference_fifo(struct aec_t* aec, void* buffer, struct aec_info* info);
+
+/* Get reference audio samples + timestamp, in the format expected by AEC,
+ * i.e. same sample rate and bit rate as microphone audio.
+ * Timestamp is updated in field 'timestamp_usec', and not in 'timestamp'.
+ * Returns:
+ * -EINVAL if the AEC object is invalid.
+ * -ENOMEM if the reference FIFO overflows or is corrupted.
+ * -ETIMEDOUT if we timed out waiting for the requested number of bytes
+ * 0 otherwise */
+int get_reference_samples(struct aec_t* aec, void* buffer, struct aec_info* info);
+
+#ifdef AEC_HAL
+
+/* Processing function call for AEC.
+ * AEC output is updated at location pointed to by 'buffer'.
+ * This function does not run AEC when there is no playback -
+ * as communicated to this AEC interface using aec_set_spk_running().
+ * Returns -EINVAL if processing fails, else returns 0. */
+int process_aec(struct aec_t* aec, void* buffer, struct aec_info* info);
+
+#else /* #ifdef AEC_HAL */
+
+#define process_aec(...) ((int)0)
+
+#endif /* #ifdef AEC_HAL */
+
+#endif /* _AUDIO_AEC_H_ */
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index d601ea8..75d3ff0 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -12,18 +12,22 @@
* 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.
+ *
+ * Copied as it is from device/amlogic/generic/hal/audio/
*/
-#define LOG_TAG "audio_hw_dragonboard"
+#define LOG_TAG "audio_hw_yukawa"
//#define LOG_NDEBUG 0
#include <errno.h>
+#include <inttypes.h>
#include <malloc.h>
#include <pthread.h>
#include <stdint.h>
-#include <sys/time.h>
#include <stdlib.h>
+#include <sys/time.h>
#include <unistd.h>
+#include <string.h>
#include <log/log.h>
#include <cutils/str_parms.h>
@@ -33,84 +37,178 @@
#include <system/audio.h>
#include <hardware/audio.h>
-#include <sound/asound.h>
-#include <tinyalsa/asoundlib.h>
-#include <audio_utils/resampler.h>
+#include <audio_effects/effect_aec.h>
+#include <audio_route/audio_route.h>
+#include <audio_utils/clock.h>
#include <audio_utils/echo_reference.h>
-#include <hardware/audio_effect.h>
+#include <audio_utils/resampler.h>
+#include <cutils/properties.h>
#include <hardware/audio_alsaops.h>
-#include <audio_effects/effect_aec.h>
+#include <hardware/audio_effect.h>
+#include <sound/asound.h>
+#include <tinyalsa/asoundlib.h>
+#include <sys/ioctl.h>
+
+#include "audio_aec.h"
+#include "audio_hw.h"
+
+static int adev_get_mic_mute(const struct audio_hw_device* dev, bool* state);
+static int adev_get_microphones(const struct audio_hw_device* dev,
+ struct audio_microphone_characteristic_t* mic_array,
+ size_t* mic_count);
+static size_t out_get_buffer_size(const struct audio_stream* stream);
+
+static bool is_aec_input(const struct alsa_stream_in* in) {
+ /* If AEC is in the app, only configure based on ECHO_REFERENCE spec.
+ * If AEC is in the HAL, configure using the given mic stream. */
+ bool aec_input = true;
+#if !defined(AEC_HAL)
+ aec_input = (in->source == AUDIO_SOURCE_ECHO_REFERENCE);
+#endif
+ return aec_input;
+}
-#define CARD_OUT 0
-#define PORT_CODEC 0
-/* Minimum granularity - Arbitrary but small value */
-#define CODEC_BASE_FRAME_COUNT 32
-
-/* number of base blocks in a short period (low latency) */
-#define PERIOD_MULTIPLIER 32 /* 21 ms */
-/* number of frames per short period (low latency) */
-#define PERIOD_SIZE (CODEC_BASE_FRAME_COUNT * PERIOD_MULTIPLIER)
-/* number of pseudo periods for low latency playback */
-#define PLAYBACK_PERIOD_COUNT 2
-#define PLAYBACK_PERIOD_START_THRESHOLD 2
-#define CODEC_SAMPLING_RATE 48000
-#define CHANNEL_STEREO 2
-#define MIN_WRITE_SLEEP_US 5000
-
-struct stub_stream_in {
- struct audio_stream_in stream;
-};
+static int get_audio_output_port(audio_devices_t devices) {
+ /* Only HDMI out for now #FIXME */
+ return PORT_HDMI;
+}
-struct alsa_audio_device {
- struct audio_hw_device hw_device;
+static int get_audio_card(int direction, int port) {
+ struct pcm_params* params = NULL;
+ int card = 0;
- pthread_mutex_t lock; /* see note below on mutex acquisition order */
- int devices;
- struct alsa_stream_in *active_input;
- struct alsa_stream_out *active_output;
- bool mic_mute;
-};
+ while (!params && card < 8) {
+ /* Find the first input/output device that works */
+ params = pcm_params_get(card, port, direction);
+ card++;
+ }
+ pcm_params_free(params);
-struct alsa_stream_out {
- struct audio_stream_out stream;
-
- pthread_mutex_t lock; /* see note below on mutex acquisition order */
- struct pcm_config config;
- struct pcm *pcm;
- bool unavailable;
- int standby;
- struct alsa_audio_device *dev;
- int write_threshold;
- unsigned int written;
-};
+ return card - 1;
+}
+static void timestamp_adjust(struct timespec* ts, ssize_t frames, uint32_t sampling_rate) {
+ /* This function assumes the adjustment (in nsec) is less than the max value of long,
+ * which for 32-bit long this is 2^31 * 1e-9 seconds, slightly over 2 seconds.
+ * For 64-bit long it is 9e+9 seconds. */
+ long adj_nsec = (frames / (float) sampling_rate) * 1E9L;
+ ts->tv_nsec += adj_nsec;
+ while (ts->tv_nsec > 1E9L) {
+ ts->tv_sec++;
+ ts->tv_nsec -= 1E9L;
+ }
+ if (ts->tv_nsec < 0) {
+ ts->tv_sec--;
+ ts->tv_nsec += 1E9L;
+ }
+}
+
+/* Helper function to get PCM hardware timestamp.
+ * Only the field 'timestamp' of argument 'ts' is updated. */
+static int get_pcm_timestamp(struct pcm* pcm, uint32_t sample_rate, struct aec_info* info,
+ bool isOutput) {
+ int ret = 0;
+ if (pcm_get_htimestamp(pcm, &info->available, &info->timestamp) < 0) {
+ ALOGE("Error getting PCM timestamp!");
+ info->timestamp.tv_sec = 0;
+ info->timestamp.tv_nsec = 0;
+ return -EINVAL;
+ }
+ ssize_t frames;
+ if (isOutput) {
+ frames = pcm_get_buffer_size(pcm) - info->available;
+ } else {
+ frames = -info->available; /* rewind timestamp */
+ }
+ timestamp_adjust(&info->timestamp, frames, sample_rate);
+ return ret;
+}
+
+static int read_filter_from_file(const char* filename, int16_t* filter, int max_length) {
+ FILE* fp = fopen(filename, "r");
+ if (fp == NULL) {
+ ALOGI("%s: File %s not found.", __func__, filename);
+ return 0;
+ }
+ int num_taps = 0;
+ char* line = NULL;
+ size_t len = 0;
+ while (!feof(fp)) {
+ size_t size = getline(&line, &len, fp);
+ if ((line[0] == '#') || (size < 2)) {
+ continue;
+ }
+ int n = sscanf(line, "%" SCNd16 "\n", &filter[num_taps++]);
+ if (n < 1) {
+ ALOGE("Could not find coefficient %d! Exiting...", num_taps - 1);
+ return 0;
+ }
+ ALOGV("Coeff %d : %" PRId16, num_taps, filter[num_taps - 1]);
+ if (num_taps == max_length) {
+ ALOGI("%s: max tap length %d reached.", __func__, max_length);
+ break;
+ }
+ }
+ free(line);
+ fclose(fp);
+ return num_taps;
+}
+
+static void out_set_eq(struct alsa_stream_out* out) {
+ out->speaker_eq = NULL;
+ int16_t* speaker_eq_coeffs = (int16_t*)calloc(SPEAKER_MAX_EQ_LENGTH, sizeof(int16_t));
+ if (speaker_eq_coeffs == NULL) {
+ ALOGE("%s: Failed to allocate speaker EQ", __func__);
+ return;
+ }
+ int num_taps = read_filter_from_file(SPEAKER_EQ_FILE, speaker_eq_coeffs, SPEAKER_MAX_EQ_LENGTH);
+ if (num_taps == 0) {
+ ALOGI("%s: Empty filter file or 0 taps set.", __func__);
+ free(speaker_eq_coeffs);
+ return;
+ }
+ out->speaker_eq = fir_init(
+ out->config.channels, FIR_SINGLE_FILTER, num_taps,
+ out_get_buffer_size(&out->stream.common) / out->config.channels / sizeof(int16_t),
+ speaker_eq_coeffs);
+ free(speaker_eq_coeffs);
+}
/* must be called with hw device and output stream mutexes locked */
static int start_output_stream(struct alsa_stream_out *out)
{
struct alsa_audio_device *adev = out->dev;
- if (out->unavailable)
- return -ENODEV;
-
/* default to low power: will be corrected in out_write if necessary before first write to
* tinyalsa.
*/
- out->write_threshold = PLAYBACK_PERIOD_COUNT * PERIOD_SIZE;
- out->config.start_threshold = PLAYBACK_PERIOD_START_THRESHOLD * PERIOD_SIZE;
- out->config.avail_min = PERIOD_SIZE;
-
- out->pcm = pcm_open(CARD_OUT, PORT_CODEC, PCM_OUT | PCM_MMAP | PCM_NOIRQ | PCM_MONOTONIC, &out->config);
-
- if (!pcm_is_ready(out->pcm)) {
- ALOGE("cannot open pcm_out driver: %s", pcm_get_error(out->pcm));
- pcm_close(out->pcm);
- adev->active_output = NULL;
- out->unavailable = true;
- return -ENODEV;
+ out->write_threshold = PLAYBACK_PERIOD_COUNT * PLAYBACK_PERIOD_SIZE;
+ out->config.start_threshold = PLAYBACK_PERIOD_START_THRESHOLD * PLAYBACK_PERIOD_SIZE;
+ out->config.avail_min = PLAYBACK_PERIOD_SIZE;
+ out->unavailable = true;
+ unsigned int pcm_retry_count = PCM_OPEN_RETRIES;
+ int out_port = get_audio_output_port(out->devices);
+ int out_card = get_audio_card(PCM_OUT, out_port);
+
+ while (1) {
+ out->pcm = pcm_open(out_card, out_port, PCM_OUT | PCM_MONOTONIC, &out->config);
+ if ((out->pcm != NULL) && pcm_is_ready(out->pcm)) {
+ break;
+ } else {
+ ALOGE("cannot open pcm_out driver: %s", pcm_get_error(out->pcm));
+ if (out->pcm != NULL) {
+ pcm_close(out->pcm);
+ out->pcm = NULL;
+ }
+ if (--pcm_retry_count == 0) {
+ ALOGE("Failed to open pcm_out after %d tries", PCM_OPEN_RETRIES);
+ return -ENODEV;
+ }
+ usleep(PCM_OPEN_WAIT_TIME_MS * 1000);
+ }
}
-
+ out->unavailable = false;
adev->active_output = out;
return 0;
}
@@ -133,7 +231,7 @@ static size_t out_get_buffer_size(const struct audio_stream *stream)
/* return the closest majoring multiple of 16 frames, as
* audioflinger expects audio buffers to be a multiple of 16 frames */
- size_t size = PERIOD_SIZE;
+ size_t size = PLAYBACK_PERIOD_SIZE;
size = ((size + 15) / 16) * 16;
return size * audio_stream_out_frame_size((struct audio_stream_out *)stream);
}
@@ -162,12 +260,15 @@ static int do_output_standby(struct alsa_stream_out *out)
{
struct alsa_audio_device *adev = out->dev;
+ fir_reset(out->speaker_eq);
+
if (!out->standby) {
pcm_close(out->pcm);
out->pcm = NULL;
adev->active_output = NULL;
out->standby = 1;
}
+ aec_set_spk_running(adev->aec, false);
return 0;
}
@@ -207,16 +308,16 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
val = atoi(value);
pthread_mutex_lock(&adev->lock);
pthread_mutex_lock(&out->lock);
- if (((adev->devices & AUDIO_DEVICE_OUT_ALL) != val) && (val != 0)) {
- adev->devices &= ~AUDIO_DEVICE_OUT_ALL;
- adev->devices |= val;
+ if (((out->devices & AUDIO_DEVICE_OUT_ALL) != val) && (val != 0)) {
+ out->devices &= ~AUDIO_DEVICE_OUT_ALL;
+ out->devices |= val;
}
pthread_mutex_unlock(&out->lock);
pthread_mutex_unlock(&adev->lock);
}
str_parms_destroy(parms);
- return ret;
+ return 0;
}
static char * out_get_parameters(const struct audio_stream *stream, const char *keys)
@@ -229,14 +330,14 @@ static uint32_t out_get_latency(const struct audio_stream_out *stream)
{
ALOGV("out_get_latency");
struct alsa_stream_out *out = (struct alsa_stream_out *)stream;
- return (PERIOD_SIZE * PLAYBACK_PERIOD_COUNT * 1000) / out->config.rate;
+ return (PLAYBACK_PERIOD_SIZE * PLAYBACK_PERIOD_COUNT * 1000) / out->config.rate;
}
static int out_set_volume(struct audio_stream_out *stream, float left,
float right)
{
ALOGV("out_set_volume: Left:%f Right:%f", left, right);
- return 0;
+ return -ENOSYS;
}
static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
@@ -248,6 +349,8 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
size_t frame_size = audio_stream_out_frame_size(stream);
size_t out_frames = bytes / frame_size;
+ ALOGV("%s: devices: %d, bytes %zu", __func__, out->devices, bytes);
+
/* acquiring hw device mutex systematically is useful if a low priority thread is waiting
* on the output stream mutex - e.g. executing select_mode() while holding the hw device
* mutex
@@ -261,14 +364,29 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
goto exit;
}
out->standby = 0;
+ aec_set_spk_running(adev->aec, true);
}
pthread_mutex_unlock(&adev->lock);
- ret = pcm_mmap_write(out->pcm, buffer, out_frames * frame_size);
+ if (out->speaker_eq != NULL) {
+ fir_process_interleaved(out->speaker_eq, (int16_t*)buffer, (int16_t*)buffer, out_frames);
+ }
+
+ ret = pcm_write(out->pcm, buffer, out_frames * frame_size);
if (ret == 0) {
- out->written += out_frames;
+ out->frames_written += out_frames;
+
+ struct aec_info info;
+ get_pcm_timestamp(out->pcm, out->config.rate, &info, true /*isOutput*/);
+ out->timestamp = info.timestamp;
+ info.bytes = out_frames * frame_size;
+ int aec_ret = write_to_reference_fifo(adev->aec, (void *)buffer, &info);
+ if (aec_ret) {
+ ALOGE("AEC: Write to speaker loopback FIFO failed!");
+ }
}
+
exit:
pthread_mutex_unlock(&out->lock);
@@ -283,30 +401,24 @@ exit:
static int out_get_render_position(const struct audio_stream_out *stream,
uint32_t *dsp_frames)
{
- *dsp_frames = 0;
ALOGV("out_get_render_position: dsp_frames: %p", dsp_frames);
- return -EINVAL;
+ return -ENOSYS;
}
static int out_get_presentation_position(const struct audio_stream_out *stream,
uint64_t *frames, struct timespec *timestamp)
{
- struct alsa_stream_out *out = (struct alsa_stream_out *)stream;
- int ret = -1;
-
- if (out->pcm) {
- unsigned int avail;
- if (pcm_get_htimestamp(out->pcm, &avail, timestamp) == 0) {
- size_t kernel_buffer_size = out->config.period_size * out->config.period_count;
- int64_t signed_frames = out->written - kernel_buffer_size + avail;
- if (signed_frames >= 0) {
- *frames = signed_frames;
- ret = 0;
- }
- }
- }
+ if (stream == NULL || frames == NULL || timestamp == NULL) {
+ return -EINVAL;
+ }
+ struct alsa_stream_out* out = (struct alsa_stream_out*)stream;
- return ret;
+ *frames = out->frames_written;
+ *timestamp = out->timestamp;
+ ALOGV("%s: frames: %" PRIu64 ", timestamp (nsec): %" PRIu64, __func__, *frames,
+ audio_utils_ns_from_timespec(timestamp));
+
+ return 0;
}
@@ -327,14 +439,65 @@ static int out_get_next_write_timestamp(const struct audio_stream_out *stream,
{
*timestamp = 0;
ALOGV("out_get_next_write_timestamp: %ld", (long int)(*timestamp));
- return -EINVAL;
+ return -ENOSYS;
}
/** audio_stream_in implementation **/
+
+/* must be called with hw device and input stream mutexes locked */
+static int start_input_stream(struct alsa_stream_in *in)
+{
+ struct alsa_audio_device *adev = in->dev;
+ in->unavailable = true;
+ unsigned int pcm_retry_count = PCM_OPEN_RETRIES;
+ int in_card = get_audio_card(PCM_IN, PORT_BUILTIN_MIC);
+
+ while (1) {
+ in->pcm = pcm_open(in_card, PORT_BUILTIN_MIC, PCM_IN | PCM_MONOTONIC, &in->config);
+ if ((in->pcm != NULL) && pcm_is_ready(in->pcm)) {
+ break;
+ } else {
+ ALOGE("cannot open pcm_in driver: %s", pcm_get_error(in->pcm));
+ if (in->pcm != NULL) {
+ pcm_close(in->pcm);
+ in->pcm = NULL;
+ }
+ if (--pcm_retry_count == 0) {
+ ALOGE("Failed to open pcm_in after %d tries", PCM_OPEN_RETRIES);
+ return -ENODEV;
+ }
+ usleep(PCM_OPEN_WAIT_TIME_MS * 1000);
+ }
+ }
+ in->unavailable = false;
+ adev->active_input = in;
+ return 0;
+}
+
+static void get_mic_characteristics(struct audio_microphone_characteristic_t* mic_data,
+ size_t* mic_count) {
+ *mic_count = 1;
+ memset(mic_data, 0, sizeof(struct audio_microphone_characteristic_t));
+ strlcpy(mic_data->device_id, "builtin_mic", AUDIO_MICROPHONE_ID_MAX_LEN - 1);
+ strlcpy(mic_data->address, "top", AUDIO_DEVICE_MAX_ADDRESS_LEN - 1);
+ memset(mic_data->channel_mapping, AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED,
+ sizeof(mic_data->channel_mapping));
+ mic_data->device = AUDIO_DEVICE_IN_BUILTIN_MIC;
+ mic_data->sensitivity = -37.0;
+ mic_data->max_spl = AUDIO_MICROPHONE_SPL_UNKNOWN;
+ mic_data->min_spl = AUDIO_MICROPHONE_SPL_UNKNOWN;
+ mic_data->orientation.x = 0.0f;
+ mic_data->orientation.y = 0.0f;
+ mic_data->orientation.z = 0.0f;
+ mic_data->geometric_location.x = AUDIO_MICROPHONE_COORDINATE_UNKNOWN;
+ mic_data->geometric_location.y = AUDIO_MICROPHONE_COORDINATE_UNKNOWN;
+ mic_data->geometric_location.z = AUDIO_MICROPHONE_COORDINATE_UNKNOWN;
+}
+
static uint32_t in_get_sample_rate(const struct audio_stream *stream)
{
- ALOGV("in_get_sample_rate");
- return 8000;
+ struct alsa_stream_in *in = (struct alsa_stream_in *)stream;
+ return in->config.rate;
}
static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate)
@@ -343,21 +506,29 @@ static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate)
return -ENOSYS;
}
-static size_t in_get_buffer_size(const struct audio_stream *stream)
-{
- ALOGV("in_get_buffer_size: %d", 320);
- return 320;
+static size_t get_input_buffer_size(size_t frames, audio_format_t format,
+ audio_channel_mask_t channel_mask) {
+ /* return the closest majoring multiple of 16 frames, as
+ * audioflinger expects audio buffers to be a multiple of 16 frames */
+ frames = ((frames + 15) / 16) * 16;
+ size_t bytes_per_frame = audio_channel_count_from_in_mask(channel_mask) *
+ audio_bytes_per_sample(format);
+ size_t buffer_size = frames * bytes_per_frame;
+ return buffer_size;
}
static audio_channel_mask_t in_get_channels(const struct audio_stream *stream)
{
- ALOGV("in_get_channels: %d", AUDIO_CHANNEL_IN_MONO);
- return AUDIO_CHANNEL_IN_MONO;
+ struct alsa_stream_in *in = (struct alsa_stream_in *)stream;
+ ALOGV("in_get_channels: %d", in->config.channels);
+ return audio_channel_in_mask_from_count(in->config.channels);
}
static audio_format_t in_get_format(const struct audio_stream *stream)
{
- return AUDIO_FORMAT_PCM_16_BIT;
+ struct alsa_stream_in *in = (struct alsa_stream_in *)stream;
+ ALOGV("in_get_format: %d", in->config.format);
+ return audio_format_from_pcm_format(in->config.format);
}
static int in_set_format(struct audio_stream *stream, audio_format_t format)
@@ -365,13 +536,86 @@ static int in_set_format(struct audio_stream *stream, audio_format_t format)
return -ENOSYS;
}
-static int in_standby(struct audio_stream *stream)
+static size_t in_get_buffer_size(const struct audio_stream *stream)
+{
+ struct alsa_stream_in* in = (struct alsa_stream_in*)stream;
+ size_t frames = CAPTURE_PERIOD_SIZE;
+ if (in->source == AUDIO_SOURCE_ECHO_REFERENCE) {
+ frames = CAPTURE_PERIOD_SIZE * PLAYBACK_CODEC_SAMPLING_RATE / CAPTURE_CODEC_SAMPLING_RATE;
+ }
+
+ size_t buffer_size =
+ get_input_buffer_size(frames, stream->get_format(stream), stream->get_channels(stream));
+ ALOGV("in_get_buffer_size: %zu", buffer_size);
+ return buffer_size;
+}
+
+static int in_get_active_microphones(const struct audio_stream_in* stream,
+ struct audio_microphone_characteristic_t* mic_array,
+ size_t* mic_count) {
+ ALOGV("in_get_active_microphones");
+ if ((mic_array == NULL) || (mic_count == NULL)) {
+ return -EINVAL;
+ }
+ struct alsa_stream_in* in = (struct alsa_stream_in*)stream;
+ struct audio_hw_device* dev = (struct audio_hw_device*)in->dev;
+ bool mic_muted = false;
+ adev_get_mic_mute(dev, &mic_muted);
+ if ((in->source == AUDIO_SOURCE_ECHO_REFERENCE) || mic_muted) {
+ *mic_count = 0;
+ return 0;
+ }
+ adev_get_microphones(dev, mic_array, mic_count);
+ return 0;
+}
+
+static int do_input_standby(struct alsa_stream_in *in)
{
+ struct alsa_audio_device *adev = in->dev;
+
+ if (!in->standby) {
+ pcm_close(in->pcm);
+ in->pcm = NULL;
+ adev->active_input = NULL;
+ in->standby = true;
+ }
return 0;
}
+static int in_standby(struct audio_stream *stream)
+{
+ struct alsa_stream_in *in = (struct alsa_stream_in *)stream;
+ int status;
+
+ pthread_mutex_lock(&in->lock);
+ pthread_mutex_lock(&in->dev->lock);
+ status = do_input_standby(in);
+ pthread_mutex_unlock(&in->dev->lock);
+ pthread_mutex_unlock(&in->lock);
+ return status;
+}
+
static int in_dump(const struct audio_stream *stream, int fd)
{
+ struct alsa_stream_in* in = (struct alsa_stream_in*)stream;
+ if (in->source == AUDIO_SOURCE_ECHO_REFERENCE) {
+ return 0;
+ }
+
+ struct audio_microphone_characteristic_t mic_array[AUDIO_MICROPHONE_MAX_COUNT];
+ size_t mic_count;
+
+ get_mic_characteristics(mic_array, &mic_count);
+
+ dprintf(fd, " Microphone count: %zd\n", mic_count);
+ size_t idx;
+ for (idx = 0; idx < mic_count; idx++) {
+ dprintf(fd, " Microphone: %zd\n", idx);
+ dprintf(fd, " Address: %s\n", mic_array[idx].address);
+ dprintf(fd, " Device: %d\n", mic_array[idx].device);
+ dprintf(fd, " Sensitivity (dB): %.2f\n", mic_array[idx].sensitivity);
+ }
+
return 0;
}
@@ -394,14 +638,154 @@ static int in_set_gain(struct audio_stream_in *stream, float gain)
static ssize_t in_read(struct audio_stream_in *stream, void* buffer,
size_t bytes)
{
- ALOGV("in_read: bytes %zu", bytes);
- /* XXX: fake timing for audio input */
- usleep((int64_t)bytes * 1000000 / audio_stream_in_frame_size(stream) /
- in_get_sample_rate(&stream->common));
- memset(buffer, 0, bytes);
+ int ret;
+ struct alsa_stream_in *in = (struct alsa_stream_in *)stream;
+ struct alsa_audio_device *adev = in->dev;
+ size_t frame_size = audio_stream_in_frame_size(stream);
+ size_t in_frames = bytes / frame_size;
+
+ ALOGV("in_read: stream: %d, bytes %zu", in->source, bytes);
+
+ /* Special handling for Echo Reference: simply get the reference from FIFO.
+ * The format and sample rate should be specified by arguments to adev_open_input_stream. */
+ if (in->source == AUDIO_SOURCE_ECHO_REFERENCE) {
+ struct aec_info info;
+ info.bytes = bytes;
+
+ const uint64_t time_increment_nsec = (uint64_t)bytes * NANOS_PER_SECOND /
+ audio_stream_in_frame_size(stream) /
+ in_get_sample_rate(&stream->common);
+ if (!aec_get_spk_running(adev->aec)) {
+ if (in->timestamp_nsec == 0) {
+ struct timespec now;
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ const uint64_t timestamp_nsec = audio_utils_ns_from_timespec(&now);
+ in->timestamp_nsec = timestamp_nsec;
+ } else {
+ in->timestamp_nsec += time_increment_nsec;
+ }
+ memset(buffer, 0, bytes);
+ const uint64_t time_increment_usec = time_increment_nsec / 1000;
+ usleep(time_increment_usec);
+ } else {
+ int ref_ret = get_reference_samples(adev->aec, buffer, &info);
+ if ((ref_ret) || (info.timestamp_usec == 0)) {
+ memset(buffer, 0, bytes);
+ in->timestamp_nsec += time_increment_nsec;
+ } else {
+ in->timestamp_nsec = 1000 * info.timestamp_usec;
+ }
+ }
+ in->frames_read += in_frames;
+
+#if DEBUG_AEC
+ FILE* fp_ref = fopen("/data/local/traces/aec_ref.pcm", "a+");
+ if (fp_ref) {
+ fwrite((char*)buffer, 1, bytes, fp_ref);
+ fclose(fp_ref);
+ } else {
+ ALOGE("AEC debug: Could not open file aec_ref.pcm!");
+ }
+ FILE* fp_ref_ts = fopen("/data/local/traces/aec_ref_timestamps.txt", "a+");
+ if (fp_ref_ts) {
+ fprintf(fp_ref_ts, "%" PRIu64 "\n", in->timestamp_nsec);
+ fclose(fp_ref_ts);
+ } else {
+ ALOGE("AEC debug: Could not open file aec_ref_timestamps.txt!");
+ }
+#endif
+ return info.bytes;
+ }
+
+ /* Microphone input stream read */
+
+ /* acquiring hw device mutex systematically is useful if a low priority thread is waiting
+ * on the input stream mutex - e.g. executing select_mode() while holding the hw device
+ * mutex
+ */
+ pthread_mutex_lock(&in->lock);
+ pthread_mutex_lock(&adev->lock);
+ if (in->standby) {
+ ret = start_input_stream(in);
+ if (ret != 0) {
+ pthread_mutex_unlock(&adev->lock);
+ ALOGE("start_input_stream failed with code %d", ret);
+ goto exit;
+ }
+ in->standby = false;
+ }
+
+ pthread_mutex_unlock(&adev->lock);
+
+ ret = pcm_read(in->pcm, buffer, in_frames * frame_size);
+ struct aec_info info;
+ get_pcm_timestamp(in->pcm, in->config.rate, &info, false /*isOutput*/);
+ if (ret == 0) {
+ in->frames_read += in_frames;
+ in->timestamp_nsec = audio_utils_ns_from_timespec(&info.timestamp);
+ }
+ else {
+ ALOGE("pcm_read failed with code %d", ret);
+ }
+
+exit:
+ pthread_mutex_unlock(&in->lock);
+
+ bool mic_muted = false;
+ adev_get_mic_mute((struct audio_hw_device*)adev, &mic_muted);
+ if (mic_muted) {
+ memset(buffer, 0, bytes);
+ }
+
+ if (ret != 0) {
+ usleep((int64_t)bytes * 1000000 / audio_stream_in_frame_size(stream) /
+ in_get_sample_rate(&stream->common));
+ } else {
+ /* Process AEC if available */
+ /* TODO move to a separate thread */
+ if (!mic_muted) {
+ info.bytes = bytes;
+ int aec_ret = process_aec(adev->aec, buffer, &info);
+ if (aec_ret) {
+ ALOGE("process_aec returned error code %d", aec_ret);
+ }
+ }
+ }
+
+#if DEBUG_AEC && !defined(AEC_HAL)
+ FILE* fp_in = fopen("/data/local/traces/aec_in.pcm", "a+");
+ if (fp_in) {
+ fwrite((char*)buffer, 1, bytes, fp_in);
+ fclose(fp_in);
+ } else {
+ ALOGE("AEC debug: Could not open file aec_in.pcm!");
+ }
+ FILE* fp_mic_ts = fopen("/data/local/traces/aec_in_timestamps.txt", "a+");
+ if (fp_mic_ts) {
+ fprintf(fp_mic_ts, "%" PRIu64 "\n", in->timestamp_nsec);
+ fclose(fp_mic_ts);
+ } else {
+ ALOGE("AEC debug: Could not open file aec_in_timestamps.txt!");
+ }
+#endif
+
return bytes;
}
+static int in_get_capture_position(const struct audio_stream_in* stream, int64_t* frames,
+ int64_t* time) {
+ if (stream == NULL || frames == NULL || time == NULL) {
+ return -EINVAL;
+ }
+ struct alsa_stream_in* in = (struct alsa_stream_in*)stream;
+
+ *frames = in->frames_read;
+ *time = in->timestamp_nsec;
+ ALOGV("%s: source: %d, timestamp (nsec): %" PRIu64, __func__, in->source, *time);
+
+ return 0;
+}
+
static uint32_t in_get_input_frames_lost(struct audio_stream_in *stream)
{
return 0;
@@ -428,17 +812,18 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
ALOGV("adev_open_output_stream...");
struct alsa_audio_device *ladev = (struct alsa_audio_device *)dev;
- struct alsa_stream_out *out;
- struct pcm_params *params;
- int ret = 0;
-
- params = pcm_params_get(CARD_OUT, PORT_CODEC, PCM_OUT);
- if (!params)
+ int out_port = get_audio_output_port(devices);
+ int out_card = get_audio_card(PCM_OUT, out_port);
+ struct pcm_params* params = pcm_params_get(out_card, out_port, PCM_OUT);
+ if (!params) {
return -ENOSYS;
+ }
- out = (struct alsa_stream_out *)calloc(1, sizeof(struct alsa_stream_out));
- if (!out)
+ struct alsa_stream_out* out =
+ (struct alsa_stream_out*)calloc(1, sizeof(struct alsa_stream_out));
+ if (!out) {
return -ENOMEM;
+ }
out->stream.common.get_sample_rate = out_get_sample_rate;
out->stream.common.set_sample_rate = out_set_sample_rate;
@@ -460,9 +845,9 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
out->stream.get_presentation_position = out_get_presentation_position;
out->config.channels = CHANNEL_STEREO;
- out->config.rate = CODEC_SAMPLING_RATE;
+ out->config.rate = PLAYBACK_CODEC_SAMPLING_RATE;
out->config.format = PCM_FORMAT_S16_LE;
- out->config.period_size = PERIOD_SIZE;
+ out->config.period_size = PLAYBACK_PERIOD_SIZE;
out->config.period_count = PLAYBACK_PERIOD_COUNT;
if (out->config.rate != config->sample_rate ||
@@ -471,32 +856,53 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
config->sample_rate = out->config.rate;
config->format = audio_format_from_pcm_format(out->config.format);
config->channel_mask = audio_channel_out_mask_from_count(CHANNEL_STEREO);
- ret = -EINVAL;
+ goto error_1;
}
- ALOGI("adev_open_output_stream selects channels=%d rate=%d format=%d",
- out->config.channels, out->config.rate, out->config.format);
+ ALOGI("adev_open_output_stream selects channels=%d rate=%d format=%d, devices=%d",
+ out->config.channels, out->config.rate, out->config.format, devices);
out->dev = ladev;
out->standby = 1;
out->unavailable = false;
+ out->devices = devices;
config->format = out_get_format(&out->stream.common);
config->channel_mask = out_get_channels(&out->stream.common);
config->sample_rate = out_get_sample_rate(&out->stream.common);
- *stream_out = &out->stream;
+ out->speaker_eq = NULL;
+ if (out_port == PORT_INTERNAL_SPEAKER) {
+ out_set_eq(out);
+ if (out->speaker_eq == NULL) {
+ ALOGE("%s: Failed to initialize speaker EQ", __func__);
+ }
+ }
- /* TODO The retry mechanism isn't implemented in AudioPolicyManager/AudioFlinger. */
- ret = 0;
+ int aec_ret = init_aec_reference_config(ladev->aec, out);
+ if (aec_ret) {
+ ALOGE("AEC: Speaker config init failed!");
+ goto error_2;
+ }
- return ret;
+ *stream_out = &out->stream;
+ return 0;
+
+error_2:
+ fir_release(out->speaker_eq);
+error_1:
+ free(out);
+ return -EINVAL;
}
static void adev_close_output_stream(struct audio_hw_device *dev,
struct audio_stream_out *stream)
{
ALOGV("adev_close_output_stream...");
+ struct alsa_audio_device *adev = (struct alsa_audio_device *)dev;
+ destroy_aec_reference_config(adev->aec);
+ struct alsa_stream_out* out = (struct alsa_stream_out*)stream;
+ fir_release(out->speaker_eq);
free(stream);
}
@@ -513,6 +919,17 @@ static char * adev_get_parameters(const struct audio_hw_device *dev,
return strdup("");
}
+static int adev_get_microphones(const struct audio_hw_device* dev,
+ struct audio_microphone_characteristic_t* mic_array,
+ size_t* mic_count) {
+ ALOGV("adev_get_microphones");
+ if ((mic_array == NULL) || (mic_count == NULL)) {
+ return -EINVAL;
+ }
+ get_mic_characteristics(mic_array, mic_count);
+ return 0;
+}
+
static int adev_init_check(const struct audio_hw_device *dev)
{
ALOGV("adev_init_check");
@@ -558,38 +975,51 @@ static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode)
static int adev_set_mic_mute(struct audio_hw_device *dev, bool state)
{
ALOGV("adev_set_mic_mute: %d",state);
- return -ENOSYS;
+ struct alsa_audio_device *adev = (struct alsa_audio_device *)dev;
+ pthread_mutex_lock(&adev->lock);
+ adev->mic_mute = state;
+ pthread_mutex_unlock(&adev->lock);
+ return 0;
}
static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state)
{
ALOGV("adev_get_mic_mute");
- return -ENOSYS;
+ struct alsa_audio_device *adev = (struct alsa_audio_device *)dev;
+ pthread_mutex_lock(&adev->lock);
+ *state = adev->mic_mute;
+ pthread_mutex_unlock(&adev->lock);
+ return 0;
}
static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
const struct audio_config *config)
{
- ALOGV("adev_get_input_buffer_size: %d", 320);
- return 320;
+ size_t buffer_size =
+ get_input_buffer_size(CAPTURE_PERIOD_SIZE, config->format, config->channel_mask);
+ ALOGV("adev_get_input_buffer_size: %zu", buffer_size);
+ return buffer_size;
}
-static int adev_open_input_stream(struct audio_hw_device __unused *dev,
- audio_io_handle_t handle,
- audio_devices_t devices,
- struct audio_config *config,
- struct audio_stream_in **stream_in,
- audio_input_flags_t flags __unused,
- const char *address __unused,
- audio_source_t source __unused)
-{
- struct stub_stream_in *in;
-
+static int adev_open_input_stream(struct audio_hw_device* dev, audio_io_handle_t handle,
+ audio_devices_t devices, struct audio_config* config,
+ struct audio_stream_in** stream_in,
+ audio_input_flags_t flags __unused, const char* address __unused,
+ audio_source_t source) {
ALOGV("adev_open_input_stream...");
- in = (struct stub_stream_in *)calloc(1, sizeof(struct stub_stream_in));
- if (!in)
+ struct alsa_audio_device *ladev = (struct alsa_audio_device *)dev;
+
+ int in_card = get_audio_card(PCM_IN, PORT_BUILTIN_MIC);
+ struct pcm_params* params = pcm_params_get(in_card, PORT_BUILTIN_MIC, PCM_IN);
+ if (!params) {
+ return -ENOSYS;
+ }
+
+ struct alsa_stream_in* in = (struct alsa_stream_in*)calloc(1, sizeof(struct alsa_stream_in));
+ if (!in) {
return -ENOMEM;
+ }
in->stream.common.get_sample_rate = in_get_sample_rate;
in->stream.common.set_sample_rate = in_set_sample_rate;
@@ -606,15 +1036,69 @@ static int adev_open_input_stream(struct audio_hw_device __unused *dev,
in->stream.set_gain = in_set_gain;
in->stream.read = in_read;
in->stream.get_input_frames_lost = in_get_input_frames_lost;
+ in->stream.get_capture_position = in_get_capture_position;
+ in->stream.get_active_microphones = in_get_active_microphones;
+
+ in->config.channels = CHANNEL_STEREO;
+ if (source == AUDIO_SOURCE_ECHO_REFERENCE) {
+ in->config.rate = PLAYBACK_CODEC_SAMPLING_RATE;
+ } else {
+ in->config.rate = CAPTURE_CODEC_SAMPLING_RATE;
+ }
+ in->config.format = PCM_FORMAT_S32_LE;
+ in->config.period_size = CAPTURE_PERIOD_SIZE;
+ in->config.period_count = CAPTURE_PERIOD_COUNT;
+
+ if (in->config.rate != config->sample_rate ||
+ audio_channel_count_from_in_mask(config->channel_mask) != CHANNEL_STEREO ||
+ in->config.format != pcm_format_from_audio_format(config->format) ) {
+ config->format = in_get_format(&in->stream.common);
+ config->channel_mask = in_get_channels(&in->stream.common);
+ config->sample_rate = in_get_sample_rate(&in->stream.common);
+ goto error_1;
+ }
+
+ ALOGI("adev_open_input_stream selects channels=%d rate=%d format=%d source=%d",
+ in->config.channels, in->config.rate, in->config.format, source);
+
+ in->dev = ladev;
+ in->standby = true;
+ in->unavailable = false;
+ in->source = source;
+ in->devices = devices;
+
+ if (is_aec_input(in)) {
+ int aec_ret = init_aec_mic_config(ladev->aec, in);
+ if (aec_ret) {
+ ALOGE("AEC: Mic config init failed!");
+ goto error_1;
+ }
+ }
+
+#if DEBUG_AEC
+ remove("/data/local/traces/aec_ref.pcm");
+ remove("/data/local/traces/aec_in.pcm");
+ remove("/data/local/traces/aec_ref_timestamps.txt");
+ remove("/data/local/traces/aec_in_timestamps.txt");
+#endif
*stream_in = &in->stream;
return 0;
+
+error_1:
+ free(in);
+ return -EINVAL;
}
static void adev_close_input_stream(struct audio_hw_device *dev,
- struct audio_stream_in *in)
+ struct audio_stream_in *stream)
{
ALOGV("adev_close_input_stream...");
+ struct alsa_stream_in* in = (struct alsa_stream_in*)stream;
+ if (is_aec_input(in)) {
+ destroy_aec_mic_config(in->dev->aec);
+ }
+ free(stream);
return;
}
@@ -627,6 +1111,11 @@ static int adev_dump(const audio_hw_device_t *device, int fd)
static int adev_close(hw_device_t *device)
{
ALOGV("adev_close");
+
+ struct alsa_audio_device *adev = (struct alsa_audio_device *)device;
+ release_aec(adev->aec);
+ audio_route_free(adev->audio_route);
+ mixer_close(adev->mixer);
free(device);
return 0;
}
@@ -634,16 +1123,19 @@ static int adev_close(hw_device_t *device)
static int adev_open(const hw_module_t* module, const char* name,
hw_device_t** device)
{
- struct alsa_audio_device *adev;
-
+ char vendor_hw[PROPERTY_VALUE_MAX] = {0};
+ // Prefix for the hdmi path, the board name is the suffix
+ char path_name[256] = "hdmi_";
ALOGV("adev_open: %s", name);
- if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0)
+ if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0) {
return -EINVAL;
+ }
- adev = calloc(1, sizeof(struct alsa_audio_device));
- if (!adev)
+ struct alsa_audio_device* adev = calloc(1, sizeof(struct alsa_audio_device));
+ if (!adev) {
return -ENOMEM;
+ }
adev->hw_device.common.tag = HARDWARE_DEVICE_TAG;
adev->hw_device.common.version = AUDIO_DEVICE_API_VERSION_2_0;
@@ -666,12 +1158,49 @@ static int adev_open(const hw_module_t* module, const char* name,
adev->hw_device.open_input_stream = adev_open_input_stream;
adev->hw_device.close_input_stream = adev_close_input_stream;
adev->hw_device.dump = adev_dump;
-
- adev->devices = AUDIO_DEVICE_NONE;
+ adev->hw_device.get_microphones = adev_get_microphones;
*device = &adev->hw_device.common;
+ int out_card = get_audio_card(PCM_OUT, 0);
+ adev->mixer = mixer_open(out_card);
+ if (!adev->mixer) {
+ ALOGE("Unable to open the mixer, aborting.");
+ goto error_1;
+ }
+
+ adev->audio_route = audio_route_init(out_card, MIXER_XML_PATH);
+ if (!adev->audio_route) {
+ ALOGE("%s: Failed to init audio route controls, aborting.", __func__);
+ goto error_2;
+ }
+
+ /*
+ * To support both the db845c and rb5 we need to used the right mixer path
+ * we do this by checking the hardware name. Which is set at boot time.
+ */
+ property_get("vendor.hw", vendor_hw, "db845c");
+ strlcat(path_name, vendor_hw, 256);
+ ALOGV("%s: Using mixer path: %s", __func__, path_name);
+ audio_route_apply_and_update_path(adev->audio_route, path_name);
+
+ pthread_mutex_lock(&adev->lock);
+ if (init_aec(CAPTURE_CODEC_SAMPLING_RATE, NUM_AEC_REFERENCE_CHANNELS,
+ CHANNEL_STEREO, &adev->aec)) {
+ pthread_mutex_unlock(&adev->lock);
+ goto error_3;
+ }
+ pthread_mutex_unlock(&adev->lock);
+
return 0;
+
+error_3:
+ audio_route_free(adev->audio_route);
+error_2:
+ mixer_close(adev->mixer);
+error_1:
+ free(adev);
+ return -EINVAL;
}
static struct hw_module_methods_t hal_module_methods = {
@@ -684,7 +1213,7 @@ struct audio_module HAL_MODULE_INFO_SYM = {
.module_api_version = AUDIO_MODULE_API_VERSION_0_1,
.hal_api_version = HARDWARE_HAL_API_VERSION,
.id = AUDIO_HARDWARE_MODULE_ID,
- .name = "Generic Audio HAL for dragonboards",
+ .name = "Yukawa audio HW HAL",
.author = "The Android Open Source Project",
.methods = &hal_module_methods,
},
diff --git a/audio/audio_hw.h b/audio/audio_hw.h
new file mode 100644
index 0000000..2e45e02
--- /dev/null
+++ b/audio/audio_hw.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2019 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 _YUKAWA_AUDIO_HW_H_
+#define _YUKAWA_AUDIO_HW_H_
+
+#include <hardware/audio.h>
+#include <tinyalsa/asoundlib.h>
+
+#include "fir_filter.h"
+
+#define PORT_HDMI 0
+#define PORT_INTERNAL_SPEAKER 1
+#define PORT_BUILTIN_MIC 3
+
+#define MIXER_XML_PATH "/vendor/etc/mixer_paths.xml"
+/* Minimum granularity - Arbitrary but small value */
+#define CODEC_BASE_FRAME_COUNT 32
+
+#define CHANNEL_STEREO 2
+
+#ifdef AEC_HAL
+#define NUM_AEC_REFERENCE_CHANNELS 1
+#else
+/* App AEC uses 2-channel reference */
+#define NUM_AEC_REFERENCE_CHANNELS 2
+#endif /* #ifdef AEC_HAL */
+
+#define DEBUG_AEC 0
+
+#define PCM_OPEN_RETRIES 100
+#define PCM_OPEN_WAIT_TIME_MS 20
+
+/* Capture codec parameters */
+/* Set up a capture period of 32 ms:
+ * CAPTURE_PERIOD = PERIOD_SIZE / SAMPLE_RATE, so (32e-3) = PERIOD_SIZE / (16e3)
+ * => PERIOD_SIZE = 512 frames, where each "frame" consists of 1 sample of every channel (here, 2ch) */
+#define CAPTURE_PERIOD_MULTIPLIER 16
+#define CAPTURE_PERIOD_SIZE (CODEC_BASE_FRAME_COUNT * CAPTURE_PERIOD_MULTIPLIER)
+#define CAPTURE_PERIOD_COUNT 4
+#define CAPTURE_PERIOD_START_THRESHOLD 0
+#define CAPTURE_CODEC_SAMPLING_RATE 16000
+
+/* Playback codec parameters */
+/* number of base blocks in a short period (low latency) */
+#define PLAYBACK_PERIOD_MULTIPLIER 32 /* 21 ms */
+/* number of frames per short period (low latency) */
+#define PLAYBACK_PERIOD_SIZE (CODEC_BASE_FRAME_COUNT * PLAYBACK_PERIOD_MULTIPLIER)
+/* number of pseudo periods for low latency playback */
+#define PLAYBACK_PERIOD_COUNT 4
+#define PLAYBACK_PERIOD_START_THRESHOLD 2
+#define PLAYBACK_CODEC_SAMPLING_RATE 48000
+#define MIN_WRITE_SLEEP_US 5000
+
+#define SPEAKER_EQ_FILE "/vendor/etc/speaker_eq.fir"
+#define SPEAKER_MAX_EQ_LENGTH 512
+
+struct alsa_audio_device {
+ struct audio_hw_device hw_device;
+
+ pthread_mutex_t lock; /* see notes in in_read/out_write on mutex acquisition order */
+ struct alsa_stream_in *active_input;
+ struct alsa_stream_out *active_output;
+ struct audio_route *audio_route;
+ struct mixer *mixer;
+ bool mic_mute;
+ struct aec_t *aec;
+};
+
+struct alsa_stream_in {
+ struct audio_stream_in stream;
+
+ pthread_mutex_t lock; /* see note in in_read() on mutex acquisition order */
+ audio_devices_t devices;
+ struct pcm_config config;
+ struct pcm *pcm;
+ bool unavailable;
+ bool standby;
+ struct alsa_audio_device *dev;
+ int read_threshold;
+ unsigned int frames_read;
+ uint64_t timestamp_nsec;
+ audio_source_t source;
+};
+
+struct alsa_stream_out {
+ struct audio_stream_out stream;
+
+ pthread_mutex_t lock; /* see note in out_write() on mutex acquisition order */
+ audio_devices_t devices;
+ struct pcm_config config;
+ struct pcm *pcm;
+ bool unavailable;
+ int standby;
+ struct alsa_audio_device *dev;
+ int write_threshold;
+ unsigned int frames_written;
+ struct timespec timestamp;
+ fir_filter_t* speaker_eq;
+};
+
+/* 'bytes' are the number of bytes written to audio FIFO, for which 'timestamp' is valid.
+ * 'available' is the number of frames available to read (for input) or yet to be played
+ * (for output) frames in the PCM buffer.
+ * timestamp and available are updated by pcm_get_htimestamp(), so they use the same
+ * datatypes as the corresponding arguments to that function. */
+struct aec_info {
+ struct timespec timestamp;
+ uint64_t timestamp_usec;
+ unsigned int available;
+ size_t bytes;
+};
+
+#endif /* #ifndef _YUKAWA_AUDIO_HW_H_ */
diff --git a/audio/fifo_wrapper.cpp b/audio/fifo_wrapper.cpp
new file mode 100644
index 0000000..7bc9079
--- /dev/null
+++ b/audio/fifo_wrapper.cpp
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2019 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 "audio_utils_fifo_wrapper"
+// #define LOG_NDEBUG 0
+
+#include <stdint.h>
+#include <errno.h>
+#include <log/log.h>
+#include <audio_utils/fifo.h>
+#include "fifo_wrapper.h"
+
+struct audio_fifo_itfe {
+ audio_utils_fifo *p_fifo;
+ audio_utils_fifo_reader *p_fifo_reader;
+ audio_utils_fifo_writer *p_fifo_writer;
+ int8_t *p_buffer;
+};
+
+void *fifo_init(uint32_t bytes, bool reader_throttles_writer) {
+ struct audio_fifo_itfe *interface = new struct audio_fifo_itfe;
+ interface->p_buffer = new int8_t[bytes];
+ if (interface->p_buffer == NULL) {
+ ALOGE("Failed to allocate fifo buffer!");
+ return NULL;
+ }
+ interface->p_fifo = new audio_utils_fifo(bytes, 1, interface->p_buffer, reader_throttles_writer);
+ interface->p_fifo_writer = new audio_utils_fifo_writer(*interface->p_fifo);
+ interface->p_fifo_reader = new audio_utils_fifo_reader(*interface->p_fifo);
+
+ return (void *)interface;
+}
+
+void fifo_release(void *fifo_itfe) {
+ struct audio_fifo_itfe *interface = static_cast<struct audio_fifo_itfe *>(fifo_itfe);
+ delete interface->p_fifo_writer;
+ delete interface->p_fifo_reader;
+ delete interface->p_fifo;
+ delete[] interface->p_buffer;
+ delete interface;
+}
+
+ssize_t fifo_read(void *fifo_itfe, void *buffer, size_t bytes) {
+ struct audio_fifo_itfe *interface = static_cast<struct audio_fifo_itfe *>(fifo_itfe);
+ return interface->p_fifo_reader->read(buffer, bytes);
+}
+
+ssize_t fifo_write(void *fifo_itfe, void *buffer, size_t bytes) {
+ struct audio_fifo_itfe *interface = static_cast<struct audio_fifo_itfe *>(fifo_itfe);
+ return interface->p_fifo_writer->write(buffer, bytes);
+}
+
+ssize_t fifo_available_to_read(void *fifo_itfe) {
+ struct audio_fifo_itfe *interface = static_cast<struct audio_fifo_itfe *>(fifo_itfe);
+ return interface->p_fifo_reader->available();
+}
+
+ssize_t fifo_available_to_write(void *fifo_itfe) {
+ struct audio_fifo_itfe *interface = static_cast<struct audio_fifo_itfe *>(fifo_itfe);
+ return interface->p_fifo_writer->available();
+}
+
+ssize_t fifo_flush(void *fifo_itfe) {
+ struct audio_fifo_itfe *interface = static_cast<struct audio_fifo_itfe *>(fifo_itfe);
+ return interface->p_fifo_reader->flush();
+}
diff --git a/audio/fifo_wrapper.h b/audio/fifo_wrapper.h
new file mode 100644
index 0000000..e9469ef
--- /dev/null
+++ b/audio/fifo_wrapper.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2019 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 _AUDIO_FIFO_WRAPPER_H_
+#define _AUDIO_FIFO_WRAPPER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *fifo_init(uint32_t bytes, bool reader_throttles_writer);
+void fifo_release(void *fifo_itfe);
+ssize_t fifo_read(void *fifo_itfe, void *buffer, size_t bytes);
+ssize_t fifo_write(void *fifo_itfe, void *buffer, size_t bytes);
+ssize_t fifo_available_to_read(void *fifo_itfe);
+ssize_t fifo_available_to_write(void *fifo_itfe);
+ssize_t fifo_flush(void *fifo_itfe);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* #ifndef _AUDIO_FIFO_WRAPPER_H_ */
diff --git a/audio/fir_filter.c b/audio/fir_filter.c
new file mode 100644
index 0000000..c648fc0
--- /dev/null
+++ b/audio/fir_filter.c
@@ -0,0 +1,154 @@
+/*
+ * Copyright (C) 2020 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 "audio_hw_fir_filter"
+//#define LOG_NDEBUG 0
+
+#include <assert.h>
+#include <audio_utils/primitives.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <log/log.h>
+#include <malloc.h>
+#include <string.h>
+
+#include "fir_filter.h"
+
+#ifdef __ARM_NEON
+#include "arm_neon.h"
+#endif /* #ifdef __ARM_NEON */
+
+fir_filter_t* fir_init(uint32_t channels, fir_filter_mode_t mode, uint32_t filter_length,
+ uint32_t input_length, int16_t* coeffs) {
+ if ((channels == 0) || (filter_length == 0) || (coeffs == NULL)) {
+ ALOGE("%s: Invalid channel count, filter length or coefficient array.", __func__);
+ return NULL;
+ }
+
+ fir_filter_t* fir = (fir_filter_t*)calloc(1, sizeof(fir_filter_t));
+ if (fir == NULL) {
+ ALOGE("%s: Unable to allocate memory for fir_filter.", __func__);
+ return NULL;
+ }
+
+ fir->channels = channels;
+ fir->filter_length = filter_length;
+ /* Default: same filter coeffs for all channels */
+ fir->mode = FIR_SINGLE_FILTER;
+ uint32_t coeff_bytes = fir->filter_length * sizeof(int16_t);
+ if (mode == FIR_PER_CHANNEL_FILTER) {
+ fir->mode = FIR_PER_CHANNEL_FILTER;
+ coeff_bytes = fir->filter_length * fir->channels * sizeof(int16_t);
+ }
+
+ fir->coeffs = (int16_t*)malloc(coeff_bytes);
+ if (fir->coeffs == NULL) {
+ ALOGE("%s: Unable to allocate memory for FIR coeffs", __func__);
+ goto exit_1;
+ }
+ memcpy(fir->coeffs, coeffs, coeff_bytes);
+
+ fir->buffer_size = (input_length + fir->filter_length) * fir->channels;
+ fir->state = (int16_t*)malloc(fir->buffer_size * sizeof(int16_t));
+ if (fir->state == NULL) {
+ ALOGE("%s: Unable to allocate memory for FIR state", __func__);
+ goto exit_2;
+ }
+
+#ifdef __ARM_NEON
+ ALOGI("%s: Using ARM Neon", __func__);
+#endif /* #ifdef __ARM_NEON */
+
+ fir_reset(fir);
+ return fir;
+
+exit_2:
+ free(fir->coeffs);
+exit_1:
+ free(fir);
+ return NULL;
+}
+
+void fir_release(fir_filter_t* fir) {
+ if (fir == NULL) {
+ return;
+ }
+ free(fir->state);
+ free(fir->coeffs);
+ free(fir);
+}
+
+void fir_reset(fir_filter_t* fir) {
+ if (fir == NULL) {
+ return;
+ }
+ memset(fir->state, 0, fir->buffer_size * sizeof(int16_t));
+}
+
+void fir_process_interleaved(fir_filter_t* fir, int16_t* input, int16_t* output, uint32_t samples) {
+ assert(fir != NULL);
+
+ int start_offset = (fir->filter_length - 1) * fir->channels;
+ memcpy(&fir->state[start_offset], input, samples * fir->channels * sizeof(int16_t));
+ // int ch;
+ bool use_2nd_set_coeffs = (fir->channels > 1) && (fir->mode == FIR_PER_CHANNEL_FILTER);
+ int16_t* p_coeff_A = &fir->coeffs[0];
+ int16_t* p_coeff_B = use_2nd_set_coeffs ? &fir->coeffs[fir->filter_length] : &fir->coeffs[0];
+ int16_t* p_output;
+ for (int ch = 0; ch < fir->channels; ch += 2) {
+ p_output = &output[ch];
+ int offset = start_offset + ch;
+ for (int s = 0; s < samples; s++) {
+ int32_t acc_A = 0;
+ int32_t acc_B = 0;
+
+#ifdef __ARM_NEON
+ int32x4_t acc_vec = vdupq_n_s32(0);
+ for (int k = 0; k < fir->filter_length; k++, offset -= fir->channels) {
+ int16x4_t coeff_vec = vdup_n_s16(p_coeff_A[k]);
+ coeff_vec = vset_lane_s16(p_coeff_B[k], coeff_vec, 1);
+ int16x4_t input_vec = vld1_s16(&fir->state[offset]);
+ acc_vec = vmlal_s16(acc_vec, coeff_vec, input_vec);
+ }
+ acc_A = vgetq_lane_s32(acc_vec, 0);
+ acc_B = vgetq_lane_s32(acc_vec, 1);
+#else
+ for (int k = 0; k < fir->filter_length; k++, offset -= fir->channels) {
+ int32_t input_A = (int32_t)(fir->state[offset]);
+ int32_t coeff_A = (int32_t)(p_coeff_A[k]);
+ int32_t input_B = (int32_t)(fir->state[offset + 1]);
+ int32_t coeff_B = (int32_t)(p_coeff_B[k]);
+ acc_A += (input_A * coeff_A);
+ acc_B += (input_B * coeff_B);
+ }
+#endif /* #ifdef __ARM_NEON */
+
+ *p_output = clamp16(acc_A >> 15);
+ if (ch < fir->channels - 1) {
+ *(p_output + 1) = clamp16(acc_B >> 15);
+ }
+ /* Move to next sample */
+ p_output += fir->channels;
+ offset += (fir->filter_length + 1) * fir->channels;
+ }
+ if (use_2nd_set_coeffs) {
+ p_coeff_A += (fir->filter_length << 1);
+ p_coeff_B += (fir->filter_length << 1);
+ }
+ }
+ memmove(fir->state, &fir->state[samples * fir->channels],
+ (fir->filter_length - 1) * fir->channels * sizeof(int16_t));
+}
diff --git a/audio/fir_filter.h b/audio/fir_filter.h
new file mode 100644
index 0000000..d8c6e91
--- /dev/null
+++ b/audio/fir_filter.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 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 FIR_FILTER_H
+#define FIR_FILTER_H
+
+#include <stdint.h>
+
+typedef enum fir_filter_mode { FIR_SINGLE_FILTER = 0, FIR_PER_CHANNEL_FILTER } fir_filter_mode_t;
+
+typedef struct fir_filter {
+ fir_filter_mode_t mode;
+ uint32_t channels;
+ uint32_t filter_length;
+ uint32_t buffer_size;
+ int16_t* coeffs;
+ int16_t* state;
+} fir_filter_t;
+
+fir_filter_t* fir_init(uint32_t channels, fir_filter_mode_t mode, uint32_t filter_length,
+ uint32_t input_length, int16_t* coeffs);
+void fir_release(fir_filter_t* fir);
+void fir_reset(fir_filter_t* fir);
+void fir_process_interleaved(fir_filter_t* fir, int16_t* input, int16_t* output, uint32_t samples);
+
+#endif /* #ifndef FIR_FILTER_H */
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
new file mode 100644
index 0000000..7723dc3
--- /dev/null
+++ b/build/tasks/kernel.mk
@@ -0,0 +1,8 @@
+ifneq ($(filter db845c db845c_mini, $(TARGET_DEVICE)),)
+
+$(PRODUCT_OUT)/dtb.img: $(TARGET_KERNEL_DIR)/sdm845-db845c.dtb $(wildcard $(TARGET_KERNEL_DIR)/qrb5165-rb5.dtb)
+ cat $^ > $@
+
+droidcore: $(PRODUCT_OUT)/dtb.img
+
+endif
diff --git a/compatibility_matrix.xml b/compatibility_matrix.xml
index 3082485..f10b6bd 100644
--- a/compatibility_matrix.xml
+++ b/compatibility_matrix.xml
@@ -1,13 +1,5 @@
<compatibility-matrix version="1.0" type="device">
<hal format="hidl" optional="false">
- <name>android.frameworks.schedulerservice</name>
- <version>1.0</version>
- <interface>
- <name>ISchedulingPolicyService</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl" optional="false">
<name>android.frameworks.sensorservice</name>
<version>1.0</version>
<interface>
diff --git a/db845c.mk b/db845c.mk
index 6e360ee..e949af1 100644
--- a/db845c.mk
+++ b/db845c.mk
@@ -1,28 +1,9 @@
-ifndef TARGET_KERNEL_USE
-TARGET_KERNEL_USE := 5.4
-endif
-DB845C_KERNEL_DIR := device/linaro/dragonboard-kernel/android-$(TARGET_KERNEL_USE)
-
-# Inherit the full_base and device configurations
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, device/linaro/dragonboard/full.mk)
$(call inherit-product, device/linaro/dragonboard/db845c/device.mk)
-$(call inherit-product, device/linaro/dragonboard/device-common.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+
+TARGET_USES_BOOT_HDR_V3 ?= true
# Product overrides
PRODUCT_NAME := db845c
PRODUCT_DEVICE := db845c
PRODUCT_BRAND := Android
-
-ifndef DB845C_USES_GKI
-DB845C_USES_GKI := true
-endif
-
-ifeq ($(DB845C_USES_GKI), true)
-DB845C_MODS := $(wildcard $(DB845C_KERNEL_DIR)/*.ko)
-ifneq ($(DB845C_MODS),)
- BOARD_VENDOR_KERNEL_MODULES += $(DB845C_MODS)
- DB845C_ONLY_VENDOR := %/btqca.ko %/hci_uart.ko
- BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(filter-out $(DB845C_ONLY_VENDOR),$(DB845C_MODS))
-endif
-endif
diff --git a/db845c/BoardConfig.mk b/db845c/BoardConfig.mk
index 3c925b3..018213a 100644
--- a/db845c/BoardConfig.mk
+++ b/db845c/BoardConfig.mk
@@ -1,23 +1,46 @@
include device/linaro/dragonboard/BoardConfigCommon.mk
+# Primary Arch
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-2a
+TARGET_CPU_VARIANT := kryo385
+TARGET_CPU_ABI := arm64-v8a
+
+# Secondary Arch
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-2a
+TARGET_2ND_CPU_VARIANT := kryo385
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+
# Board Information
TARGET_BOOTLOADER_BOARD_NAME := db845c
TARGET_BOARD_PLATFORM := db845c
TARGET_NO_KERNEL := false
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
-BOARD_BOOT_HEADER_VERSION := 2
+ifeq ($(TARGET_USES_BOOT_HDR_V3), true)
+ BOARD_BOOT_HEADER_VERSION := 3
+ BOARD_KERNEL_PAGESIZE := 4096
+ BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 103079215104 #96M
+else
+ BOARD_BOOT_HEADER_VERSION := 2
+ BOARD_KERNEL_PAGESIZE := 2048
+endif
BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOT_HEADER_VERSION)
BOARD_KERNEL_BASE := 0x80000000
-BOARD_KERNEL_PAGESIZE := 2048
BOARD_KERNEL_CMDLINE := earlycon firmware_class.path=/vendor/firmware/ androidboot.hardware=db845c
-BOARD_KERNEL_CMDLINE += init=/init androidboot.boot_devices=soc/1d84000.ufshc printk.devkmsg=on
+BOARD_KERNEL_CMDLINE += init=/init androidboot.boot_devices=soc@0/1d84000.ufshc printk.devkmsg=on
+BOARD_KERNEL_CMDLINE += deferred_probe_timeout=30
+BOARD_KERNEL_CMDLINE += pcie_pme=nomsi #For WiFi to work on rb5
+BOARD_KERNEL_CMDLINE += qcom_geni_serial.con_enabled=1
# Image Configuration
-BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 #64M
+BOARD_BOOTIMAGE_PARTITION_SIZE := 103079215104 #96M
BOARD_USERDATAIMAGE_PARTITION_SIZE := 21474836480 #20G
BOARD_FLASH_BLOCK_SIZE := 512
# Super partition
-BOARD_SUPER_PARTITION_SIZE := 10737418240 #10G
-BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 10737418240 #10G
+BOARD_SUPER_PARTITION_SIZE := 12437225472
+BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 12433031168 # Reserve 4M for DAP metadata
BOARD_SUPER_PARTITION_METADATA_DEVICE := super
+BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
diff --git a/db845c/device.mk b/db845c/device.mk
index be50f51..63e24a1 100644
--- a/db845c/device.mk
+++ b/db845c/device.mk
@@ -17,18 +17,42 @@
# setup dalvik vm configs
$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
-PRODUCT_COPY_FILES := \
- $(DB845C_KERNEL_DIR)/Image.gz:kernel \
- $(DB845C_KERNEL_DIR)/sdm845-db845c.dtb:dtb.img \
- device/linaro/dragonboard/fstab.ramdisk.common:$(TARGET_COPY_OUT_RAMDISK)/fstab.db845c \
- device/linaro/dragonboard/fstab.ramdisk.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.db845c \
- device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/init/fstab.db845c \
- device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.db845c.rc \
- device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.db845c.usb.rc \
- device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/db845c.kl
+include $(LOCAL_PATH)/../vendor-package-ver.mk
+ifeq ($(TARGET_USES_BOOT_HDR_V3), true)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk)
+else
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
+endif
# Build generic Audio HAL
PRODUCT_PACKAGES := audio.primary.db845c
+# BootControl HAL
+PRODUCT_PACKAGES += \
+ android.hardware.boot@1.2-impl \
+ android.hardware.boot@1.2-impl.recovery \
+ android.hardware.boot@1.2-service
+
+# Install scripts to set vendor.* properties
+PRODUCT_COPY_FILES += \
+ device/linaro/dragonboard/qcom/set_hw.sh:$(TARGET_COPY_OUT_VENDOR)/bin/set_hw.sh \
+ device/linaro/dragonboard/qcom/set_udc.sh:$(TARGET_COPY_OUT_VENDOR)/bin/set_udc.sh
+
+# Install scripts to set Ethernet MAC address
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/eth_mac_addr.rc:/system/etc/init/eth_mac_addr.rc \
+ $(LOCAL_PATH)/eth_mac_addr.sh:/system/bin/eth_mac_addr.sh
+
+PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=Qualcomm
+PRODUCT_VENDOR_PROPERTIES += ro.soc.model=SDM845
+
+PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=160
+
# Copy firmware files
-$(call inherit-product-if-exists, $(LOCAL_PATH)/firmware/device.mk)
+$(call inherit-product-if-exists, vendor/linaro/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/device.mk)
+$(call inherit-product-if-exists, vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)/device.mk)
+
+TARGET_HARDWARE := db845c
+TARGET_KERNEL_USE ?= 5.15
+
+include device/linaro/dragonboard/device-common.mk
diff --git a/db845c/eth_mac_addr.rc b/db845c/eth_mac_addr.rc
new file mode 100644
index 0000000..a30c0a5
--- /dev/null
+++ b/db845c/eth_mac_addr.rc
@@ -0,0 +1,9 @@
+service eth_mac_addr /system/bin/eth_mac_addr.sh
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+on post-fs-data && property:vendor.hw=db45c
+ start eth_mac_addr
diff --git a/db845c/eth_mac_addr.sh b/db845c/eth_mac_addr.sh
new file mode 100644
index 0000000..bdc1ba7
--- /dev/null
+++ b/db845c/eth_mac_addr.sh
@@ -0,0 +1,15 @@
+#! /system/bin/sh
+# Set eth0 mac address.
+#
+# Get the unique board serial number from /proc/cmdline,
+# prepend '0's to the serial number to fill 5 LSBs of the
+# MAC address and prepend "02" as MSB to prepare a 6 byte
+# locally administered unicast MAC address.
+# Format the output in xx:xx:xx:xx:xx:xx format for the
+# "ip" set address command to work.
+
+SERIALNO=`cat /proc/cmdline | grep -o serialno.* | cut -f2 -d'=' | awk '{printf("02%010s\n", $1)}' | sed 's/\(..\)/\1:/g' | sed '$s/:$//'`
+
+/system/bin/ip link set dev eth0 down
+/system/bin/ip link set dev eth0 address "${SERIALNO}"
+/system/bin/ip link set dev eth0 up
diff --git a/db845c/firmware/Android.mk b/db845c/firmware/Android.mk
deleted file mode 100644
index 6cdcfd7..0000000
--- a/db845c/firmware/Android.mk
+++ /dev/null
@@ -1,103 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include device/linaro/dragonboard/utils.mk
-
-# Firmware files copied over from
-# http://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware/RB3_firmware_20190529180356-v3.zip
-
-# Adreno
-firmware_files := \
- a630_gmu.bin \
- a630_sqe.fw \
- a630_zap.b00 \
- a630_zap.b01 \
- a630_zap.b02 \
- a630_zap.elf \
- a630_zap.mdt
-
-# DSP (adsp+cdsp)
-firmware_files += \
- adsp.b00 \
- adsp.b01 \
- adsp.b02 \
- adsp.b03 \
- adsp.b04 \
- adsp.b05 \
- adsp.b06 \
- adsp.b07 \
- adsp.b08 \
- adsp.b09 \
- adsp.b10 \
- adsp.b11 \
- adsp.b12 \
- adsp.b13 \
- adsp.mdt \
- cdsp.b00 \
- cdsp.b01 \
- cdsp.b02 \
- cdsp.b03 \
- cdsp.b04 \
- cdsp.b05 \
- cdsp.b06 \
- cdsp.b08 \
- cdsp.mdt
-
-# USB
-firmware_files += \
- K2026090.mem
-
-# Wlan
-firmware_files += \
- bdwlan.102 \
- bdwlan.104 \
- bdwlan.105 \
- bdwlan.106 \
- bdwlan.107 \
- bdwlan.108 \
- bdwlan.109 \
- bdwlan.10b \
- bdwlan.10c \
- bdwlan.b04 \
- bdwlan.b07 \
- bdwlan.b09 \
- bdwlan.b0a \
- bdwlan.b0b \
- bdwlan.b0d \
- bdwlan.b0e \
- bdwlan.b0f \
- bdwlan.b14 \
- bdwlan.b15 \
- bdwlan.b30 \
- bdwlan.b31 \
- bdwlan.b32 \
- bdwlan.b33 \
- bdwlan.b34 \
- bdwlan.b35 \
- bdwlan.b36 \
- bdwlan.b37 \
- bdwlan.b38 \
- bdwlan.b39 \
- bdwlan.b3a \
- bdwlan.b3c \
- bdwlan.b3d \
- bdwlan.b3e \
- bdwlan.b3f \
- bdwlan.b41 \
- bdwlan.b42 \
- bdwlan.b45 \
- bdwlan.b70 \
- bdwlan.bin \
- bdwlan.txt \
- wlanmdsp.mbn
-
-# I2C/SPI fix
-firmware_files += \
- devcfg.mbn
-
-# License
-firmware_files += \
- LICENSE.qcom.txt
-
-$(foreach f, $(firmware_files), $(call add-qcom-firmware, $(f), $(TARGET_OUT_VENDOR)/firmware/))
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/db845c/firmware/K2026090.mem b/db845c/firmware/K2026090.mem
deleted file mode 100644
index 47424d4..0000000
--- a/db845c/firmware/K2026090.mem
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/LICENSE.qcom.txt b/db845c/firmware/LICENSE.qcom.txt
deleted file mode 100644
index c880572..0000000
--- a/db845c/firmware/LICENSE.qcom.txt
+++ /dev/null
@@ -1,206 +0,0 @@
-PLEASE READ THIS LICENSE AGREEMENT ("AGREEMENT") CAREFULLY. THIS AGREEMENT IS
-A BINDING LEGAL AGREEMENT ENTERED INTO BY AND BETWEEN YOU (OR IF YOU ARE
-ENTERING INTO THIS AGREEMENT ON BEHALF OF AN ENTITY, THEN THE ENTITY THAT YOU
-REPRESENT) AND QUALCOMM TECHNOLOGIES, INC. ("QTI" "WE" "OUR" OR "US"). THIS IS
-THE AGREEMENT THAT APPLIES TO YOUR USE OF THE DESIGNATED AND/OR LINKED
-APPLICATIONS, THE ENCLOSED QUALCOMM TECHNOLOGIES' MATERIALS, INCLUDING RELATED
-DOCUMENTATION AND ANY UPDATES OR IMPROVEMENTS THEREOF
-(COLLECTIVELY, "MATERIALS"). BY USING OR COMPLETING THE INSTALLATION OF THE
-MATERIALS, YOU ARE ACCEPTING THIS AGREEMENT AND YOU AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS. IF YOU DO NOT AGREE TO THESE TERMS, QTI IS UNWILLING TO
-AND DOES NOT LICENSE THE MATERIALS TO YOU. IF YOU DO NOT AGREE TO THESE TERMS
-YOU MUST DISCONTINUE THE INSTALLATION PROCESS AND YOU MAY NOT USE THE MATERIALS
-OR RETAIN ANY COPIES OF THE MATERIALS. ANY USE OR POSSESSION OF THE MATERIALS
-BY YOU IS SUBJECT TO THE TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT.
-
-1. RIGHT TO USE DELIVERABLES; RESTRICTIONS.
-
- 1.1 License. Subject to the terms and conditions of this Agreement,
- including, without limitation, the restrictions, conditions, limitations and
- exclusions set forth in this Agreement, QTI hereby grants to you a
- nonexclusive, limited license under QTI's copyrights to: (i) install and use
- the Materials; and (ii) to reproduce and redistribute the binary code portions
- of the Materials (the "Redistributable Binary Code"). You may make and use a
- reasonable number of copies of any documentation.
-
- 1.2 Redistribution Restrictions. Distribution of the Redistributable Binary
- Code is subject to the following restrictions: (i) Redistributable Binary Code
- may only be distributed in binary format and may not be distributed in source
- code format:; (ii) the Redistributable Binary Code may only operate in
- conjunction with platforms incorporating Qualcomm Technologies, Inc. chipsets;
- (iii) redistribution of the Redistributable Binary Code must include the .txt
- file setting forth the terms and condition of this Agreement; (iv) you may not
- use Qualcomm Technologies' or its affiliates or subsidiaries name, logo or
- trademarks; and (v) copyright, trademark, patent and any other notices that
- appear on the Materials may not be removed or obscured.
-
- 1.3 Additional Restrictions. Except as expressly permitted by this Agreement,
- you shall have no right to sublicense, transfer or otherwise disclose the
- Materials to any third party. You shall not reverse engineer, reverse
- assemble, reverse translate, decompile or reduce to source code form any
- portion of the Materials provided in object code form or executable form.
- Except for the purposes expressly permitted in this Agreement, You shall not
- use the Materials for any other purpose. QTI (or its licensors) shall retain
- title and all ownership rights in and to the Materials and any alterations,
- modifications (including all derivative works), translations or adaptations
- made of the Materials, and all copies thereof, and nothing herein shall be
- deemed to grant any right to You under any of QTI's or its affiliates'
- patents. You shall not subject the Materials to any third party license
- terms (e.g., open source license terms). You shall not use the Materials for
- the purpose of identifying or providing evidence to support any potential
- patent infringement claim against QTI, its affiliates, or any of QTI's or
- QTI's affiliates' suppliers and/or direct or indirect customers. QTI hereby
- reserves all rights not expressly granted herein.
-
- 1.4 Third Party Software and Materials. The Software may contain or link to
- certain software and/or materials that are written or owned by third parties.
- Such third party code and materials may be licensed under separate or
- different terms and conditions and are not licensed to you under the terms of
- this Agreement. You agree to comply with all terms and conditions imposed on
- you in the applicable third party licenses. Such terms and conditions may
- impose certain obligations on you as a condition to the permitted use of such
- third party code and materials. QTI does not represent or warrant that such
- third party licensors have or will continue to license or make available their
- code and materials to you.
-
- 1.5 Feedback. QTI may from time to time receive suggestions, feedback or
- other information from You regarding the Materials. Any suggestions, feedback
- or other disclosures received from You are and shall be entirely voluntary on
- the part of You. Notwithstanding any other term in this Agreement, QTI shall
- be free to use suggestions, feedback or other information received from You,
- without obligation of any kind to You. The Parties agree that all inventions,
- product improvements, and modifications conceived of or made by QTI that are
- based, either in whole or in part, on ideas, feedback, suggestions, or
- recommended improvements received from You are the exclusive property of QTI,
- and all right, title and interest in and to any such inventions, product
- improvements, and modifications will vest solely in QTI.
-
- 1.6 No Technical Support. QTI is under no obligation to provide any form of
- technical support for the Materials, and if QTI, in its sole discretion,
- chooses to provide any form of support or information relating to the
- Materials, such support and information shall be deemed confidential and
- proprietary to QTI.
-
-2. WARRANTY DISCLAIMER. YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT THE USE OF
-THE MATERIALS IS AT YOUR SOLE RISK. THE MATERIALS AND TECHNICAL SUPPORT, IF
-ANY, ARE PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR
-IMPLIED. QTI ITS LICENSORS AND AFFILIATES MAKE NO WARRANTIES, EXPRESS OR
-IMPLIED, WITH RESPECT TO THE MATERIALS OR ANY OTHER INFORMATION OR DOCUMENTATION
-PROVIDED UNDER THIS AGREEMENT, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR AGAINST INFRINGEMENT, OR
-ANY EXPRESS OR IMPLIED WARRANTY ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF
-DEALING OR COURSE OF PERFORMANCE. NOTHING CONTAINED IN THIS AGREEMENT SHALL BE
-CONSTRUED AS (I) A WARRANTY OR REPRESENTATION BY QTI, ITS LICENSORS OR
-AFFILIATES AS TO THE VALIDITY OR SCOPE OF ANY PATENT, COPYRIGHT OR OTHER
-INTELLECTUAL PROPERTY RIGHT OR (II) A WARRANTY OR REPRESENTATION BY QTI THAT ANY
-MANUFACTURE OR USE WILL BE FREE FROM INFRINGEMENT OF PATENTS, COPYRIGHTS OR
-OTHER INTELLECTUAL PROPERTY RIGHTS OF OTHERS, AND IT SHALL BE THE SOLE
-RESPONSIBILITY OF YOU TO MAKE SUCH DETERMINATION AS IS NECESSARY WITH RESPECT TO
-THE ACQUISITION OF LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY OF
-THIRD PARTIES.
-
-3. NO OTHER LICENSES OR INTELLECTUAL PROPERTY RIGHTS. Neither this Agreement,
-nor any act by QTI or any of its affiliates pursuant to this Agreement or
-relating to the Materials (including, without limitation, the provision by QTI
-or its affiliates of the Materials), shall provide to You any license or any
-other rights whatsoever under any patents, trademarks, trade secrets, copyrights
-or any other intellectual property of QTI or any of its affiliates, except for
-the copyright rights expressly licensed under this Agreement. You understand and
-agree that:
-
- (i) Neither this Agreement, nor delivery of the Materials, grants any right to
- practice, or any other right at all with respect to, any patent of QTI or any
- of its affiliates; and
-
- (ii) A separate license agreement from QUALCOMM Incorporated is needed to use
- or practice any patent of QUALCOMM Incorporated. You agree not to contend in
- any context that, as a result of the provision or use of the Materials, either
- QTI or any of its affiliates has any obligation to extend, or You or any other
- party has obtained any right to, any license, whether express or implied, with
- respect to any patent of QTI or any of its affiliates for any purpose.
-
-4. TERMINATION. This Agreement shall be effective upon acceptance, or access or
-use of the Materials (whichever occurs first) by You and shall continue until
-terminated. You may terminate the Agreement at any time by deleting and
-destroying all copies of the Materials and all related information in Your
-possession or control. This Agreement terminates immediately and automatically,
-with or without notice, if You fail to comply with any provision hereof.
-Additionally, QTI may at any time terminate this Agreement, without cause, upon
-notice to You. Upon termination You must, to the extent possible, delete or
-destroy all copies of the Materials in Your possession and the license granted
-to You in this Agreement shall terminate. Sections 1.2 through 10 shall survive
-the termination of this Agreement. In the event that any restrictions,
-conditions, limitations are found to be either invalid or unenforceable, the
-rights granted to You in Section 1 (License) shall be null, void and ineffective
-from the Effective Date, and QTI shall also have the right to terminate this
-Agreement immediately, and with retroactive effect to the effective date.
-
-5. LIMITATION OF LIABILITY. IN NO EVENT SHALL QTI, QTI's AFFILIATES OR ITS
-LICENSORS BE LIABLE TO YOU FOR ANY INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES,
-INCLUDING BUT NOT LIMITED TO ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL
-DAMAGES, ARISING OUT OF THE USE OR INABILITY TO USE, OR THE DELIVERY OR FAILURE
-TO DELIVER, ANY OF THE DELIVERABLES, OR ANY BREACH OF ANY OBLIGATION UNDER THIS
-AGREEMENT, EVEN IF QTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-THE FOREGOING LIMITATION OF LIABILITY SHALL REMAIN IN FULL FORCE AND EFFECT
-REGARDLESS OF WHETHER YOUR REMEDIES HEREUNDER ARE DETERMINED TO HAVE FAILED OF
-THEIR ESSENTIAL PURPOSE. THE ENTIRE LIABILITY OF QTI, QTI's AFFILIATES AND ITS
-LICENSORS, AND THE SOLE AND EXCLUSIVE REMEDY OF YOU, FOR ANY CLAIM OR CAUSE OF
-ACTION ARISING HEREUNDER (WHETHER IN CONTRACT, TORT, OR OTHERWISE) SHALL NOT
-EXCEED US$50.
-
-6. INDEMNIFICATION. You agree to indemnify and hold harmless QTI and its
-officers, directors, employees and successors and assigns against any and all
-third party claims, demands, causes of action, losses, liabilities, damages,
-costs and expenses, incurred by QTI (including but not limited to costs of
-defense, investigation and reasonable attorney's fees) arising out of, resulting
-from or related to: (i) any breach of this Agreement by You; and (ii) your acts,
-omissions, products and services. If requested by QTI, You agree to defend QTI
-in connection with any third party claims, demands, or causes of action
-resulting from, arising out of or in connection with any of the foregoing.
-
-7. ASSIGNMENT. You shall not assign this Agreement or any right or interest
-under this Agreement, nor delegate any obligation to be performed under this
-Agreement, without QTI's prior written consent. For purposes of this Section 7,
-an "assignment" by You under this Section shall be deemed to include, without
-limitation, any merger, consolidation, sale of all or substantially all of its
-assets, or any substantial change in the management or control of You.
-Any attempted assignment in contravention of this Section 9 shall be void.
-QTI may freely assign this Agreement or delegate any or all of its rights and
-obligations hereunder to any third party.
-
-8. COMPLIANCE WITH LAWS; APPLICABLE LAW. You agree to comply with all
-applicable local, international and national laws and regulations and with U.S.
-Export Administration Regulations, as they apply to the subject matter of this
-Agreement. This Agreement is governed by the laws of the State of California,
-excluding California's choice of law rules.
-
-9. CONTRACTING PARTIES. If the Materials are downloaded on any computer owned
-by a corporation or other legal entity, then this Agreement is formed by and
-between QTI and such entity. The individual accepting the terms of this
-Agreement represents and warrants to QTI that they have the authority to bind
-such entity to the terms and conditions of this Agreement.
-
-10. MISCELLANEOUS PROVISIONS. This Agreement, together with all exhibits
-attached hereto, which are incorporated herein by this reference, constitutes
-the entire agreement between QTI and You and supersedes all prior negotiations,
-representations and agreements between the parties with respect to the subject
-matter hereof. No addition or modification of this Agreement shall be effective
-unless made in writing and signed by the respective representatives of QTI and
-You. The restrictions, limitations, exclusions and conditions set forth in this
-Agreement shall apply even if QTI or any of its affiliates becomes aware of or
-fails to act in a manner to address any violation or failure to comply
-therewith. You hereby acknowledge and agree that the restrictions, limitations,
-conditions and exclusions imposed in this Agreement on the rights granted in
-this Agreement are not a derogation of the benefits of such rights. You further
-acknowledges that, in the absence of such restrictions, limitations, conditions
-and exclusions, QTI would not have entered into this Agreement with You. Each
-party shall be responsible for and shall bear its own expenses in connection
-with this Agreement. If any of the provisions of this Agreement are determined
-to be invalid, illegal, or otherwise unenforceable, the remaining provisions
-shall remain in full force and effect. This Agreement is entered into solely
-in the English language, and if for any reason any other language version is
-prepared by any party, it shall be solely for convenience and the English
-version shall govern and control all aspects. If You are located in the
-province of Quebec, Canada, the following applies: The Parties hereby confirm
-they have requested this Agreement and all related documents be prepared
-in English.. \ No newline at end of file
diff --git a/db845c/firmware/NOTICE b/db845c/firmware/NOTICE
deleted file mode 100644
index c880572..0000000
--- a/db845c/firmware/NOTICE
+++ /dev/null
@@ -1,206 +0,0 @@
-PLEASE READ THIS LICENSE AGREEMENT ("AGREEMENT") CAREFULLY. THIS AGREEMENT IS
-A BINDING LEGAL AGREEMENT ENTERED INTO BY AND BETWEEN YOU (OR IF YOU ARE
-ENTERING INTO THIS AGREEMENT ON BEHALF OF AN ENTITY, THEN THE ENTITY THAT YOU
-REPRESENT) AND QUALCOMM TECHNOLOGIES, INC. ("QTI" "WE" "OUR" OR "US"). THIS IS
-THE AGREEMENT THAT APPLIES TO YOUR USE OF THE DESIGNATED AND/OR LINKED
-APPLICATIONS, THE ENCLOSED QUALCOMM TECHNOLOGIES' MATERIALS, INCLUDING RELATED
-DOCUMENTATION AND ANY UPDATES OR IMPROVEMENTS THEREOF
-(COLLECTIVELY, "MATERIALS"). BY USING OR COMPLETING THE INSTALLATION OF THE
-MATERIALS, YOU ARE ACCEPTING THIS AGREEMENT AND YOU AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS. IF YOU DO NOT AGREE TO THESE TERMS, QTI IS UNWILLING TO
-AND DOES NOT LICENSE THE MATERIALS TO YOU. IF YOU DO NOT AGREE TO THESE TERMS
-YOU MUST DISCONTINUE THE INSTALLATION PROCESS AND YOU MAY NOT USE THE MATERIALS
-OR RETAIN ANY COPIES OF THE MATERIALS. ANY USE OR POSSESSION OF THE MATERIALS
-BY YOU IS SUBJECT TO THE TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT.
-
-1. RIGHT TO USE DELIVERABLES; RESTRICTIONS.
-
- 1.1 License. Subject to the terms and conditions of this Agreement,
- including, without limitation, the restrictions, conditions, limitations and
- exclusions set forth in this Agreement, QTI hereby grants to you a
- nonexclusive, limited license under QTI's copyrights to: (i) install and use
- the Materials; and (ii) to reproduce and redistribute the binary code portions
- of the Materials (the "Redistributable Binary Code"). You may make and use a
- reasonable number of copies of any documentation.
-
- 1.2 Redistribution Restrictions. Distribution of the Redistributable Binary
- Code is subject to the following restrictions: (i) Redistributable Binary Code
- may only be distributed in binary format and may not be distributed in source
- code format:; (ii) the Redistributable Binary Code may only operate in
- conjunction with platforms incorporating Qualcomm Technologies, Inc. chipsets;
- (iii) redistribution of the Redistributable Binary Code must include the .txt
- file setting forth the terms and condition of this Agreement; (iv) you may not
- use Qualcomm Technologies' or its affiliates or subsidiaries name, logo or
- trademarks; and (v) copyright, trademark, patent and any other notices that
- appear on the Materials may not be removed or obscured.
-
- 1.3 Additional Restrictions. Except as expressly permitted by this Agreement,
- you shall have no right to sublicense, transfer or otherwise disclose the
- Materials to any third party. You shall not reverse engineer, reverse
- assemble, reverse translate, decompile or reduce to source code form any
- portion of the Materials provided in object code form or executable form.
- Except for the purposes expressly permitted in this Agreement, You shall not
- use the Materials for any other purpose. QTI (or its licensors) shall retain
- title and all ownership rights in and to the Materials and any alterations,
- modifications (including all derivative works), translations or adaptations
- made of the Materials, and all copies thereof, and nothing herein shall be
- deemed to grant any right to You under any of QTI's or its affiliates'
- patents. You shall not subject the Materials to any third party license
- terms (e.g., open source license terms). You shall not use the Materials for
- the purpose of identifying or providing evidence to support any potential
- patent infringement claim against QTI, its affiliates, or any of QTI's or
- QTI's affiliates' suppliers and/or direct or indirect customers. QTI hereby
- reserves all rights not expressly granted herein.
-
- 1.4 Third Party Software and Materials. The Software may contain or link to
- certain software and/or materials that are written or owned by third parties.
- Such third party code and materials may be licensed under separate or
- different terms and conditions and are not licensed to you under the terms of
- this Agreement. You agree to comply with all terms and conditions imposed on
- you in the applicable third party licenses. Such terms and conditions may
- impose certain obligations on you as a condition to the permitted use of such
- third party code and materials. QTI does not represent or warrant that such
- third party licensors have or will continue to license or make available their
- code and materials to you.
-
- 1.5 Feedback. QTI may from time to time receive suggestions, feedback or
- other information from You regarding the Materials. Any suggestions, feedback
- or other disclosures received from You are and shall be entirely voluntary on
- the part of You. Notwithstanding any other term in this Agreement, QTI shall
- be free to use suggestions, feedback or other information received from You,
- without obligation of any kind to You. The Parties agree that all inventions,
- product improvements, and modifications conceived of or made by QTI that are
- based, either in whole or in part, on ideas, feedback, suggestions, or
- recommended improvements received from You are the exclusive property of QTI,
- and all right, title and interest in and to any such inventions, product
- improvements, and modifications will vest solely in QTI.
-
- 1.6 No Technical Support. QTI is under no obligation to provide any form of
- technical support for the Materials, and if QTI, in its sole discretion,
- chooses to provide any form of support or information relating to the
- Materials, such support and information shall be deemed confidential and
- proprietary to QTI.
-
-2. WARRANTY DISCLAIMER. YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT THE USE OF
-THE MATERIALS IS AT YOUR SOLE RISK. THE MATERIALS AND TECHNICAL SUPPORT, IF
-ANY, ARE PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR
-IMPLIED. QTI ITS LICENSORS AND AFFILIATES MAKE NO WARRANTIES, EXPRESS OR
-IMPLIED, WITH RESPECT TO THE MATERIALS OR ANY OTHER INFORMATION OR DOCUMENTATION
-PROVIDED UNDER THIS AGREEMENT, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR AGAINST INFRINGEMENT, OR
-ANY EXPRESS OR IMPLIED WARRANTY ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF
-DEALING OR COURSE OF PERFORMANCE. NOTHING CONTAINED IN THIS AGREEMENT SHALL BE
-CONSTRUED AS (I) A WARRANTY OR REPRESENTATION BY QTI, ITS LICENSORS OR
-AFFILIATES AS TO THE VALIDITY OR SCOPE OF ANY PATENT, COPYRIGHT OR OTHER
-INTELLECTUAL PROPERTY RIGHT OR (II) A WARRANTY OR REPRESENTATION BY QTI THAT ANY
-MANUFACTURE OR USE WILL BE FREE FROM INFRINGEMENT OF PATENTS, COPYRIGHTS OR
-OTHER INTELLECTUAL PROPERTY RIGHTS OF OTHERS, AND IT SHALL BE THE SOLE
-RESPONSIBILITY OF YOU TO MAKE SUCH DETERMINATION AS IS NECESSARY WITH RESPECT TO
-THE ACQUISITION OF LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY OF
-THIRD PARTIES.
-
-3. NO OTHER LICENSES OR INTELLECTUAL PROPERTY RIGHTS. Neither this Agreement,
-nor any act by QTI or any of its affiliates pursuant to this Agreement or
-relating to the Materials (including, without limitation, the provision by QTI
-or its affiliates of the Materials), shall provide to You any license or any
-other rights whatsoever under any patents, trademarks, trade secrets, copyrights
-or any other intellectual property of QTI or any of its affiliates, except for
-the copyright rights expressly licensed under this Agreement. You understand and
-agree that:
-
- (i) Neither this Agreement, nor delivery of the Materials, grants any right to
- practice, or any other right at all with respect to, any patent of QTI or any
- of its affiliates; and
-
- (ii) A separate license agreement from QUALCOMM Incorporated is needed to use
- or practice any patent of QUALCOMM Incorporated. You agree not to contend in
- any context that, as a result of the provision or use of the Materials, either
- QTI or any of its affiliates has any obligation to extend, or You or any other
- party has obtained any right to, any license, whether express or implied, with
- respect to any patent of QTI or any of its affiliates for any purpose.
-
-4. TERMINATION. This Agreement shall be effective upon acceptance, or access or
-use of the Materials (whichever occurs first) by You and shall continue until
-terminated. You may terminate the Agreement at any time by deleting and
-destroying all copies of the Materials and all related information in Your
-possession or control. This Agreement terminates immediately and automatically,
-with or without notice, if You fail to comply with any provision hereof.
-Additionally, QTI may at any time terminate this Agreement, without cause, upon
-notice to You. Upon termination You must, to the extent possible, delete or
-destroy all copies of the Materials in Your possession and the license granted
-to You in this Agreement shall terminate. Sections 1.2 through 10 shall survive
-the termination of this Agreement. In the event that any restrictions,
-conditions, limitations are found to be either invalid or unenforceable, the
-rights granted to You in Section 1 (License) shall be null, void and ineffective
-from the Effective Date, and QTI shall also have the right to terminate this
-Agreement immediately, and with retroactive effect to the effective date.
-
-5. LIMITATION OF LIABILITY. IN NO EVENT SHALL QTI, QTI's AFFILIATES OR ITS
-LICENSORS BE LIABLE TO YOU FOR ANY INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES,
-INCLUDING BUT NOT LIMITED TO ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL
-DAMAGES, ARISING OUT OF THE USE OR INABILITY TO USE, OR THE DELIVERY OR FAILURE
-TO DELIVER, ANY OF THE DELIVERABLES, OR ANY BREACH OF ANY OBLIGATION UNDER THIS
-AGREEMENT, EVEN IF QTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-THE FOREGOING LIMITATION OF LIABILITY SHALL REMAIN IN FULL FORCE AND EFFECT
-REGARDLESS OF WHETHER YOUR REMEDIES HEREUNDER ARE DETERMINED TO HAVE FAILED OF
-THEIR ESSENTIAL PURPOSE. THE ENTIRE LIABILITY OF QTI, QTI's AFFILIATES AND ITS
-LICENSORS, AND THE SOLE AND EXCLUSIVE REMEDY OF YOU, FOR ANY CLAIM OR CAUSE OF
-ACTION ARISING HEREUNDER (WHETHER IN CONTRACT, TORT, OR OTHERWISE) SHALL NOT
-EXCEED US$50.
-
-6. INDEMNIFICATION. You agree to indemnify and hold harmless QTI and its
-officers, directors, employees and successors and assigns against any and all
-third party claims, demands, causes of action, losses, liabilities, damages,
-costs and expenses, incurred by QTI (including but not limited to costs of
-defense, investigation and reasonable attorney's fees) arising out of, resulting
-from or related to: (i) any breach of this Agreement by You; and (ii) your acts,
-omissions, products and services. If requested by QTI, You agree to defend QTI
-in connection with any third party claims, demands, or causes of action
-resulting from, arising out of or in connection with any of the foregoing.
-
-7. ASSIGNMENT. You shall not assign this Agreement or any right or interest
-under this Agreement, nor delegate any obligation to be performed under this
-Agreement, without QTI's prior written consent. For purposes of this Section 7,
-an "assignment" by You under this Section shall be deemed to include, without
-limitation, any merger, consolidation, sale of all or substantially all of its
-assets, or any substantial change in the management or control of You.
-Any attempted assignment in contravention of this Section 9 shall be void.
-QTI may freely assign this Agreement or delegate any or all of its rights and
-obligations hereunder to any third party.
-
-8. COMPLIANCE WITH LAWS; APPLICABLE LAW. You agree to comply with all
-applicable local, international and national laws and regulations and with U.S.
-Export Administration Regulations, as they apply to the subject matter of this
-Agreement. This Agreement is governed by the laws of the State of California,
-excluding California's choice of law rules.
-
-9. CONTRACTING PARTIES. If the Materials are downloaded on any computer owned
-by a corporation or other legal entity, then this Agreement is formed by and
-between QTI and such entity. The individual accepting the terms of this
-Agreement represents and warrants to QTI that they have the authority to bind
-such entity to the terms and conditions of this Agreement.
-
-10. MISCELLANEOUS PROVISIONS. This Agreement, together with all exhibits
-attached hereto, which are incorporated herein by this reference, constitutes
-the entire agreement between QTI and You and supersedes all prior negotiations,
-representations and agreements between the parties with respect to the subject
-matter hereof. No addition or modification of this Agreement shall be effective
-unless made in writing and signed by the respective representatives of QTI and
-You. The restrictions, limitations, exclusions and conditions set forth in this
-Agreement shall apply even if QTI or any of its affiliates becomes aware of or
-fails to act in a manner to address any violation or failure to comply
-therewith. You hereby acknowledge and agree that the restrictions, limitations,
-conditions and exclusions imposed in this Agreement on the rights granted in
-this Agreement are not a derogation of the benefits of such rights. You further
-acknowledges that, in the absence of such restrictions, limitations, conditions
-and exclusions, QTI would not have entered into this Agreement with You. Each
-party shall be responsible for and shall bear its own expenses in connection
-with this Agreement. If any of the provisions of this Agreement are determined
-to be invalid, illegal, or otherwise unenforceable, the remaining provisions
-shall remain in full force and effect. This Agreement is entered into solely
-in the English language, and if for any reason any other language version is
-prepared by any party, it shall be solely for convenience and the English
-version shall govern and control all aspects. If You are located in the
-province of Quebec, Canada, the following applies: The Parties hereby confirm
-they have requested this Agreement and all related documents be prepared
-in English.. \ No newline at end of file
diff --git a/db845c/firmware/a630_gmu.bin b/db845c/firmware/a630_gmu.bin
deleted file mode 100644
index 7ab6857..0000000
--- a/db845c/firmware/a630_gmu.bin
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/a630_sqe.fw b/db845c/firmware/a630_sqe.fw
deleted file mode 100644
index e0576f7..0000000
--- a/db845c/firmware/a630_sqe.fw
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/a630_zap.b00 b/db845c/firmware/a630_zap.b00
deleted file mode 100644
index 7d5bcf1..0000000
--- a/db845c/firmware/a630_zap.b00
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/a630_zap.b01 b/db845c/firmware/a630_zap.b01
deleted file mode 100644
index 58b8d52..0000000
--- a/db845c/firmware/a630_zap.b01
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/a630_zap.b02 b/db845c/firmware/a630_zap.b02
deleted file mode 100644
index 74585f2..0000000
--- a/db845c/firmware/a630_zap.b02
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/a630_zap.elf b/db845c/firmware/a630_zap.elf
deleted file mode 100644
index 9e6f2ad..0000000
--- a/db845c/firmware/a630_zap.elf
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/a630_zap.mdt b/db845c/firmware/a630_zap.mdt
deleted file mode 100644
index 037c179..0000000
--- a/db845c/firmware/a630_zap.mdt
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b00 b/db845c/firmware/adsp.b00
deleted file mode 100644
index 6272d00..0000000
--- a/db845c/firmware/adsp.b00
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b01 b/db845c/firmware/adsp.b01
deleted file mode 100644
index 80e0612..0000000
--- a/db845c/firmware/adsp.b01
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b02 b/db845c/firmware/adsp.b02
deleted file mode 100644
index 028258b..0000000
--- a/db845c/firmware/adsp.b02
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b03 b/db845c/firmware/adsp.b03
deleted file mode 100644
index 3c7c39b..0000000
--- a/db845c/firmware/adsp.b03
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b04 b/db845c/firmware/adsp.b04
deleted file mode 100644
index f0fd51a..0000000
--- a/db845c/firmware/adsp.b04
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b05 b/db845c/firmware/adsp.b05
deleted file mode 100644
index 67a79f1..0000000
--- a/db845c/firmware/adsp.b05
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b06 b/db845c/firmware/adsp.b06
deleted file mode 100644
index e5f0ee6..0000000
--- a/db845c/firmware/adsp.b06
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b07 b/db845c/firmware/adsp.b07
deleted file mode 100644
index ccf5b48..0000000
--- a/db845c/firmware/adsp.b07
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b08 b/db845c/firmware/adsp.b08
deleted file mode 100644
index b2574a7..0000000
--- a/db845c/firmware/adsp.b08
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b09 b/db845c/firmware/adsp.b09
deleted file mode 100644
index bdafaf2..0000000
--- a/db845c/firmware/adsp.b09
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b10 b/db845c/firmware/adsp.b10
deleted file mode 100644
index 40d86a3..0000000
--- a/db845c/firmware/adsp.b10
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b11 b/db845c/firmware/adsp.b11
deleted file mode 100644
index 33cdfc8..0000000
--- a/db845c/firmware/adsp.b11
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b12 b/db845c/firmware/adsp.b12
deleted file mode 100644
index 3d0658d..0000000
--- a/db845c/firmware/adsp.b12
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.b13 b/db845c/firmware/adsp.b13
deleted file mode 100644
index 190e243..0000000
--- a/db845c/firmware/adsp.b13
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/adsp.mdt b/db845c/firmware/adsp.mdt
deleted file mode 100644
index b6f1c22..0000000
--- a/db845c/firmware/adsp.mdt
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.102 b/db845c/firmware/bdwlan.102
deleted file mode 100644
index 2dd716c..0000000
--- a/db845c/firmware/bdwlan.102
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.104 b/db845c/firmware/bdwlan.104
deleted file mode 100644
index f09eec0..0000000
--- a/db845c/firmware/bdwlan.104
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.105 b/db845c/firmware/bdwlan.105
deleted file mode 100644
index 58694f8..0000000
--- a/db845c/firmware/bdwlan.105
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.106 b/db845c/firmware/bdwlan.106
deleted file mode 100644
index 2957e87..0000000
--- a/db845c/firmware/bdwlan.106
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.107 b/db845c/firmware/bdwlan.107
deleted file mode 100644
index 0edaf48..0000000
--- a/db845c/firmware/bdwlan.107
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.108 b/db845c/firmware/bdwlan.108
deleted file mode 100644
index 667dc89..0000000
--- a/db845c/firmware/bdwlan.108
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.109 b/db845c/firmware/bdwlan.109
deleted file mode 100644
index 0edaf48..0000000
--- a/db845c/firmware/bdwlan.109
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.10b b/db845c/firmware/bdwlan.10b
deleted file mode 100644
index 850c5a7..0000000
--- a/db845c/firmware/bdwlan.10b
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.10c b/db845c/firmware/bdwlan.10c
deleted file mode 100644
index bf8c3a8..0000000
--- a/db845c/firmware/bdwlan.10c
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b04 b/db845c/firmware/bdwlan.b04
deleted file mode 100644
index 3e80f4a..0000000
--- a/db845c/firmware/bdwlan.b04
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b07 b/db845c/firmware/bdwlan.b07
deleted file mode 100644
index 686b623..0000000
--- a/db845c/firmware/bdwlan.b07
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b09 b/db845c/firmware/bdwlan.b09
deleted file mode 100644
index 8befd03..0000000
--- a/db845c/firmware/bdwlan.b09
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b0a b/db845c/firmware/bdwlan.b0a
deleted file mode 100644
index 5f66567..0000000
--- a/db845c/firmware/bdwlan.b0a
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b0b b/db845c/firmware/bdwlan.b0b
deleted file mode 100644
index c64a9db..0000000
--- a/db845c/firmware/bdwlan.b0b
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b0d b/db845c/firmware/bdwlan.b0d
deleted file mode 100644
index d491683..0000000
--- a/db845c/firmware/bdwlan.b0d
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b0e b/db845c/firmware/bdwlan.b0e
deleted file mode 100644
index 3015178..0000000
--- a/db845c/firmware/bdwlan.b0e
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b0f b/db845c/firmware/bdwlan.b0f
deleted file mode 100644
index 8ad2af0..0000000
--- a/db845c/firmware/bdwlan.b0f
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b14 b/db845c/firmware/bdwlan.b14
deleted file mode 100644
index 6f3bb9d..0000000
--- a/db845c/firmware/bdwlan.b14
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b15 b/db845c/firmware/bdwlan.b15
deleted file mode 100644
index 245bd58..0000000
--- a/db845c/firmware/bdwlan.b15
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b30 b/db845c/firmware/bdwlan.b30
deleted file mode 100644
index 686b623..0000000
--- a/db845c/firmware/bdwlan.b30
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b31 b/db845c/firmware/bdwlan.b31
deleted file mode 100644
index d491683..0000000
--- a/db845c/firmware/bdwlan.b31
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b32 b/db845c/firmware/bdwlan.b32
deleted file mode 100644
index 3015178..0000000
--- a/db845c/firmware/bdwlan.b32
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b33 b/db845c/firmware/bdwlan.b33
deleted file mode 100644
index 8befd03..0000000
--- a/db845c/firmware/bdwlan.b33
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b34 b/db845c/firmware/bdwlan.b34
deleted file mode 100644
index b2873bb..0000000
--- a/db845c/firmware/bdwlan.b34
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b35 b/db845c/firmware/bdwlan.b35
deleted file mode 100644
index a7ca609..0000000
--- a/db845c/firmware/bdwlan.b35
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b36 b/db845c/firmware/bdwlan.b36
deleted file mode 100644
index 53fe62a..0000000
--- a/db845c/firmware/bdwlan.b36
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b37 b/db845c/firmware/bdwlan.b37
deleted file mode 100644
index a7ca609..0000000
--- a/db845c/firmware/bdwlan.b37
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b38 b/db845c/firmware/bdwlan.b38
deleted file mode 100644
index 2cd4f61..0000000
--- a/db845c/firmware/bdwlan.b38
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b39 b/db845c/firmware/bdwlan.b39
deleted file mode 100644
index 46014e1..0000000
--- a/db845c/firmware/bdwlan.b39
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b3a b/db845c/firmware/bdwlan.b3a
deleted file mode 100644
index 5af2b85..0000000
--- a/db845c/firmware/bdwlan.b3a
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b3c b/db845c/firmware/bdwlan.b3c
deleted file mode 100644
index 093133c..0000000
--- a/db845c/firmware/bdwlan.b3c
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b3d b/db845c/firmware/bdwlan.b3d
deleted file mode 100644
index 370b07a..0000000
--- a/db845c/firmware/bdwlan.b3d
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b3e b/db845c/firmware/bdwlan.b3e
deleted file mode 100644
index ddd8563..0000000
--- a/db845c/firmware/bdwlan.b3e
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b3f b/db845c/firmware/bdwlan.b3f
deleted file mode 100644
index 1524383..0000000
--- a/db845c/firmware/bdwlan.b3f
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b41 b/db845c/firmware/bdwlan.b41
deleted file mode 100644
index a2db514..0000000
--- a/db845c/firmware/bdwlan.b41
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b42 b/db845c/firmware/bdwlan.b42
deleted file mode 100644
index 4a70b46..0000000
--- a/db845c/firmware/bdwlan.b42
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b45 b/db845c/firmware/bdwlan.b45
deleted file mode 100644
index 692889d..0000000
--- a/db845c/firmware/bdwlan.b45
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.b70 b/db845c/firmware/bdwlan.b70
deleted file mode 100644
index e309a43..0000000
--- a/db845c/firmware/bdwlan.b70
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.bin b/db845c/firmware/bdwlan.bin
deleted file mode 100644
index 778234f..0000000
--- a/db845c/firmware/bdwlan.bin
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/bdwlan.txt b/db845c/firmware/bdwlan.txt
deleted file mode 100644
index 5c0df64..0000000
--- a/db845c/firmware/bdwlan.txt
+++ /dev/null
@@ -1,5223 +0,0 @@
-nvBaseId__0_0 1
-nvBaseLen__0_0 1028
-nvBaseFlag__0_0 0x0
-length__0_0 19152
-checksum__0_0 0xc7a2
-bdf_version__0_0 0x2
-template_version__0_0 0x1
-macAddr__0_0 0x0 0x0 0x0 0x0 0x0 0x0
-regDmn__0_0 0x0 0x0
-refDesignId__0_0 0x0
-customerId__0_0 0x0
-projectId__0_0 0x0
-boardDataRev__0_0 0x0
-rfSilent__0_0 0x0
-wlanLedGpio__0_0 0x0
-nvMacFlag__0_0 1
-calSmVersion__0_0 0x0
-concurrencyModeMask__0_0 0x0
-commonBoardFlags__0_0 0x0
-overwriteCdacIn__0_0 0x0
-overwriteCdacOut__0_0 0x0
-otpCdacIn__0_0 0x0
-otpCdacOut__0_0 0x0
-fineCorrectionCdacIn__0_0 0x0
-fineCorrectionCdacOut__0_0 0x0
-checkTrainingStatusDelay__0_0 0x190
-intPaConfig_rtcExSel__0_0 0x0
-mipiPowerMode__0_0 0
-calRFId__0_0 2
-calBBId__0_0 1
-dbsTableSelect__0_0 0x0 0x0 0x0 0x0
-sensitivityAdjustment__0_0 0
-swreg__0_0 0x0
-clkOutDriveStrengh__0_0 0x0
-spectralShapingSelect__0_0 0x0
-xtalCapInterval__0_0 0 0 0 0
-custData__0_0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
-hwCReserved__0_0 0x0
-boardFlags__0_0 0x6000
-type__0_0 0
-id__0_0 0
-hwId__0_0 0x0
-revId__0_0 0x0
-chainMask__0_0 0x0
-type__1_0 0
-id__1_0 0
-hwId__1_0 0x0
-revId__1_0 0x0
-chainMask__1_0 0x0
-type__2_0 0
-id__2_0 0
-hwId__2_0 0x0
-revId__2_0 0x0
-chainMask__2_0 0x0
-type__3_0 0
-id__3_0 0
-hwId__3_0 0x0
-revId__3_0 0x0
-chainMask__3_0 0x0
-type__4_0 0
-id__4_0 0
-hwId__4_0 0x0
-revId__4_0 0x0
-chainMask__4_0 0x0
-type__5_0 0
-id__5_0 0
-hwId__5_0 0x0
-revId__5_0 0x0
-chainMask__5_0 0x0
-type__6_0 0
-id__6_0 0
-hwId__6_0 0x0
-revId__6_0 0x0
-chainMask__6_0 0x0
-type__7_0 0
-id__7_0 0
-hwId__7_0 0x0
-revId__7_0 0x0
-chainMask__7_0 0x0
-type__8_0 0
-id__8_0 0
-hwId__8_0 0x0
-revId__8_0 0x0
-chainMask__8_0 0x0
-type__9_0 0
-id__9_0 0
-hwId__9_0 0x0
-revId__9_0 0x0
-chainMask__9_0 0x0
-type__10_0 0
-id__10_0 0
-hwId__10_0 0x0
-revId__10_0 0x0
-chainMask__10_0 0x0
-type__11_0 0
-id__11_0 0
-hwId__11_0 0x0
-revId__11_0 0x0
-chainMask__11_0 0x0
-type__12_0 0
-id__12_0 0
-hwId__12_0 0x0
-revId__12_0 0x0
-chainMask__12_0 0x0
-type__13_0 0
-id__13_0 0
-hwId__13_0 0x0
-revId__13_0 0x0
-chainMask__13_0 0x0
-type__14_0 0
-id__14_0 0
-hwId__14_0 0x0
-revId__14_0 0x0
-chainMask__14_0 0x0
-type__15_0 0
-id__15_0 0
-hwId__15_0 0x0
-revId__15_0 0x0
-chainMask__15_0 0x0
-normal_maxCCApwr_0__0_0 0x116 0x116
-normal_maxCCApwr_1__0_0 0x134 0x13c
-normal_maxCCApwr_2__0_0 0x13c 0x136
-normal_maxCCApwr_3__0_0 0x13c 0x132
-normal_maxCCApwr_4__0_0 0x13a 0x132
-normal_maxCCApwr_5__0_0 0x136 0x134
-normal_maxCCApwr_6__0_0 0x134 0x134
-normal_maxCCApwr_7__0_0 0x132 0x130
-dtim_maxCCApwr_0__0_0 0x112
-dtim_maxCCApwr_1__0_0 0x116
-dtim_maxCCApwr_2__0_0 0x11e
-dtim_maxCCApwr_3__0_0 0x11e
-dtim_maxCCApwr_4__0_0 0x11d
-dtim_maxCCApwr_5__0_0 0x118
-dtim_maxCCApwr_6__0_0 0x116
-dtim_maxCCApwr_7__0_0 0x114
-rssiOffset_0__0_0 0
-rssiOffset_1__0_0 0
-rssiOffset_2__0_0 0
-rssiOffset_3__0_0 0
-rssiOffset_4__0_0 0
-rssiOffset_5__0_0 0
-rssiOffset_6__0_0 0
-rssiOffset_7__0_0 0
-coexFlags__0_0 0x0
-coexConfig__0_0 0x0
-normal_maxCCApwr_1x1_0__0_0 0x0 0x0
-normal_maxCCApwr_1x1_1__0_0 0x0 0x0
-normal_maxCCApwr_1x1_2__0_0 0x0 0x0
-normal_maxCCApwr_1x1_3__0_0 0x0 0x0
-normal_maxCCApwr_1x1_4__0_0 0x0 0x0
-normal_maxCCApwr_1x1_5__0_0 0x0 0x0
-normal_maxCCApwr_1x1_6__0_0 0x0 0x0
-normal_maxCCApwr_1x1_7__0_0 0x0 0x0
-greentxConfig__0_0 0x0
-gtxRTMask_basic_TpcPkts__0_0 0x0
-gtxPER_VSupport__0_0 0x0
-gtxBWMASK_VThreshold__0_0 0x0
-gtxVCompen_VGpioPin__0_0 0x0
-gtxuserGtxMask__0_0 0x0
-gtxRTMask_CCK__0_0 0x0
-gtxRTMask_OFDM__0_0 0x0
-gtxRTMask_HT__0_0 0x0
-gtxRTMask_VHT__0_0 0x0
-CckTxFirCommon__0_0 0x0 0x0 0x0
-CckTxFirCh14__0_0 0x0 0x0 0x0
-lowRSSIThreshold__0_0 0x0
-gtx_config2__0_0 0x30
-disableDAC2xInterpolation__0_0 0x1
-txCckDelay__0_0 0x0
-wlanwansplitterbasedASEnable__0_0 0x0
-baseReserved__0_0 0 0
-tempDifferenceForRecal__0_0 0
-gtxPwrMargin__0_0 0
-baseReserved1__0_0 0x0
-lowTempThresholdForCombCal__0_0 0
-baseFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvPerPhyId__0_0 2
-nvPerPhyLen__0_0 292
-nvPerPhyFlag__0_0 0x0
-opFlags_T0_0_0 0x3f
-featureEnable_T0_0_0 0x0
-miscConfiguration_T0_0_0 0x0
-flag1_T0_0_0 0x0
-bdf_flags_resvd1_T0_0_0 0x0
-opFlags2_T0_0_0 0x3f
-flag2_T0_0_0 0x3
-flag3_T0_0_0 0x7
-bdf_flags_resvd_T0_0_0 0x0
-bdf_flags_resvd2_T0_0_0 0x0
-txMask2G_T0_0_0 0x3
-rxMask2G_T0_0_0 0x3
-txMask5G_T0_0_0 0x3
-rxMask5G_T0_0_0 0x3
-deltaCapin_T0_0_0_0 0
-deltaCapout_T0_0_0_0 0
-temperature_T0_0_0_0 0
-deltaCapin_T0_1_0_0 0
-deltaCapout_T0_1_0_0 0
-temperature_T0_1_0_0 0
-deltaCapin_T0_2_0_0 0
-deltaCapout_T0_2_0_0 0
-temperature_T0_2_0_0 0
-deltaCapin_T0_3_0_0 0
-deltaCapout_T0_3_0_0 0
-temperature_T0_3_0_0 0
-deltaCapin_T0_4_0_0 0
-deltaCapout_T0_4_0_0 0
-temperature_T0_4_0_0 0
-deltaCapin_T0_5_0_0 0
-deltaCapout_T0_5_0_0 0
-temperature_T0_5_0_0 0
-deltaCapin_T0_6_0_0 0
-deltaCapout_T0_6_0_0 0
-temperature_T0_6_0_0 0
-deltaCapin_T0_7_0_0 0
-deltaCapout_T0_7_0_0 0
-temperature_T0_7_0_0 0
-deltaCapin_T0_8_0_0 0
-deltaCapout_T0_8_0_0 0
-temperature_T0_8_0_0 0
-deltaCapin_T0_9_0_0 0
-deltaCapout_T0_9_0_0 0
-temperature_T0_9_0_0 0
-tpc_flag_T0_0_0 0x0
-xtalSettleTime_T0_0_0 0
-smartAntennaEnable_T0_0_0 0
-ccaThresh_T0_0_0 0
-dbsConcurrencyBackoff_T0_B0_0_0 0
-dbsConcurrencyBackoff_T0_B1_0_0 0
-perPhyFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-opFlags_T1_0_0 0x2a
-featureEnable_T1_0_0 0x0
-miscConfiguration_T1_0_0 0x0
-flag1_T1_0_0 0x0
-bdf_flags_resvd1_T1_0_0 0x0
-opFlags2_T1_0_0 0xa
-flag2_T1_0_0 0x3
-flag3_T1_0_0 0x7
-bdf_flags_resvd_T1_0_0 0x0
-bdf_flags_resvd2_T1_0_0 0x0
-txMask2G_T1_0_0 0x1
-rxMask2G_T1_0_0 0x1
-txMask5G_T1_0_0 0x1
-rxMask5G_T1_0_0 0x1
-deltaCapin_T1_0_0_0 0
-deltaCapout_T1_0_0_0 0
-temperature_T1_0_0_0 0
-deltaCapin_T1_1_0_0 0
-deltaCapout_T1_1_0_0 0
-temperature_T1_1_0_0 0
-deltaCapin_T1_2_0_0 0
-deltaCapout_T1_2_0_0 0
-temperature_T1_2_0_0 0
-deltaCapin_T1_3_0_0 0
-deltaCapout_T1_3_0_0 0
-temperature_T1_3_0_0 0
-deltaCapin_T1_4_0_0 0
-deltaCapout_T1_4_0_0 0
-temperature_T1_4_0_0 0
-deltaCapin_T1_5_0_0 0
-deltaCapout_T1_5_0_0 0
-temperature_T1_5_0_0 0
-deltaCapin_T1_6_0_0 0
-deltaCapout_T1_6_0_0 0
-temperature_T1_6_0_0 0
-deltaCapin_T1_7_0_0 0
-deltaCapout_T1_7_0_0 0
-temperature_T1_7_0_0 0
-deltaCapin_T1_8_0_0 0
-deltaCapout_T1_8_0_0 0
-temperature_T1_8_0_0 0
-deltaCapin_T1_9_0_0 0
-deltaCapout_T1_9_0_0 0
-temperature_T1_9_0_0 0
-tpc_flag_T1_0_0 0x0
-xtalSettleTime_T1_0_0 0
-smartAntennaEnable_T1_0_0 0
-ccaThresh_T1_0_0 0
-dbsConcurrencyBackoff_T1_B0_0_0 0
-dbsConcurrencyBackoff_T1_B1_0_0 0
-perPhyFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvFreqModalId__0_0 3
-nvFreqModalLen__0_0 484
-nvFreqModalFlag__0_0 0x0
-xatten1DB2G_B0_0_0 0x0
-xatten1DB5GLow_B0_0_0 0x0
-xatten1DB5GMid_B0_0_0 0x0
-xatten1DB5GHigh_B0_0_0 0x0
-xatten1DB2G_B1_0_0 0x0
-xatten1DB5GLow_B1_0_0 0x0
-xatten1DB5GMid_B1_0_0 0x0
-xatten1DB5GHigh_B1_0_0 0x0
-xatten1Margin2G_B0_0_0 0x0
-xatten1Margin5GLow_B0_0_0 0x0
-xatten1Margin5GMid_B0_0_0 0x0
-xatten1Margin5GHigh_B0_0_0 0x0
-xatten1Margin2G_B1_0_0 0x0
-xatten1Margin5GLow_B1_0_0 0x0
-xatten1Margin5GMid_B1_0_0 0x0
-xatten1Margin5GHigh_B1_0_0 0x0
-xatten1Hyst2G_B0_0_0 0x0
-xatten1Hyst5GLow_B0_0_0 0x0
-xatten1Hyst5GMid_B0_0_0 0x0
-xatten1Hyst5GHigh_B0_0_0 0x0
-xatten1Hyst2G_B1_0_0 0x0
-xatten1Hyst5GLow_B1_0_0 0x0
-xatten1Hyst5GMid_B1_0_0 0x0
-xatten1Hyst5GHigh_B1_0_0 0x0
-xatten1Hyst2GHT40_B0_0_0 0x0
-xatten1Hyst5GHT40Low_B0_0_0 0x0
-xatten1Hyst5GHT40Mid_B0_0_0 0x0
-xatten1Hyst5GHT40High_B0_0_0 0x0
-xatten1Hyst2GHT40_B1_0_0 0x0
-xatten1Hyst5GHT40Low_B1_0_0 0x0
-xatten1Hyst5GHT40Mid_B1_0_0 0x0
-xatten1Hyst5GHT40High_B1_0_0 0x0
-xatten1Hyst2GHT80_B0_0_0 0x0
-xatten1Hyst5GHT80Low_B0_0_0 0x0
-xatten1Hyst5GHT80Mid_B0_0_0 0x0
-xatten1Hyst5GHT80High_B0_0_0 0x0
-xatten1Hyst2GHT80_B1_0_0 0x0
-xatten1Hyst5GHT80Low_B1_0_0 0x0
-xatten1Hyst5GHT80Mid_B1_0_0 0x0
-xatten1Hyst5GHT80High_B1_0_0 0x0
-future_B0_0_0 0x0
-future_B1_0_0 0x0
-freqModalHeaderReserved 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-spurRssiThreshSel__0_0 0x0
-spurRssiThresh__0_0 0x0
-spurRssiThreshCck__0_0 0x0
-spurMitFlag__0_0 0x0
-spurChans_5Gx10__0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-spurStr_5G__0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-spurChans_CCKx10__0_0 0 0 0 0 0 0
-spurChans_2Gx10__0_0 0 0 0 0 0 0 0 0
-spurStr_2G__0_0 0 0 0 0 0 0 0 0
-spurPuncMask__0_0 0x0
-spurPilotMask__0_0 0x0
-spurChanMask__0_0 0x0
-spurMitFreqMax__0_0 0x0
-spurThreshold__0_0 0 0 0 0 0
-spur_config_reserve__0_0 0x0 0x0
-spurNotchFilterFlag_2G__0_0 0x0
-spurNotchFilterFlag_5G__0_0 0x0
-freqModalFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvBandId__0_0 4
-nvBandLen__0_0 1028
-nvBandFlag__0_0 0x0
-antCtrlCommon_G_0_0 0x0
-antCtrlCommon2_G_0_0 0x0
-antCtrlChain_G_0_0 0x0 0x0
-minCCAPwrThresh_G_0_0 0
-minPwr4TPCErrCorr_G_0_0 0
-voltSlope_G_0_0 0 0
-femHighIsolationMode_G_0_0 0x0
-femXpaSet_G_0_0 0x0
-femXlnaSet_G_0_0 0x0
-xtrSwitchSet_G_0_0 0x0
-clpcAttenTargetPwrChain_G_0_0 0x0 0x0
-clpcPdetTiaGain_G_0_0 0x0
-clpcLpfHighLowTiaHighGain_G_0_0 0x0
-clpcSqGain_G_0_0 0x0
-thermal_interval_G_0_0 0
-thermal_interval_lowTemp_G_0_0 0
-calPowerOffset_G_0_0 0
-TxIQCalMaxTxGain_G_0_0 0
-startChannel_G_0_0 0
-endChannel_G_0_0 0
-antennaGainCh_G_0_0 0x0
-txrxgain_G_0_0 0
-paBiasTrim_G_0_0 0 0
-xpaBiasLvl_G_0_0 0x0
-xlnaGain_G_0_0 0x0 0x0
-txbbf_20_G_0_0 0x0
-txbbf_40_G_0_0 0x0
-txbbf_80_G_0_0 0x0
-txbbf_160_G_0_0 0x0
-PA2CINTUNE_0_G_0_0 0x0 0x0 0x0
-PA2CINTUNE_1_G_0_0 0x0 0x0 0x0
-diversityGain_G_0_0 0
-rssiChainCompForDbs_G_0_0 0 0
-gtxEnable_G_0_0 0x0
-clpcerror_G_0_0 0 0
-thr_cca_etsi_ovd_G_0_0 0x0
-thr_cca_pri20_G_0_0 0x0
-thr_cca_ext20_G_0_0 0x0
-thr_cca_ext40_G_0_0 0x0
-thr_cca_ext80_G_0_0 0x0
-padding_G_0_0 0x0 0x0 0x0
-clpcerrorlow_G_0_0 0 0
-clpcerrorhi_G_0_0 0 0
-clpcerrorthermal_G_0_0 0 0
-vdetCalFlag_G_0_0 0x0
-gtxTempThreshForVoltSel_G_0_0 0 0
-futureBandModal_G 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-antCtrlCommon_A_0_0 0x0
-antCtrlCommon2_A_0_0 0x0
-antCtrlChain_A_0_0 0x0 0x0
-minCCAPwrThresh_A_0_0 0
-minPwr4TPCErrCorr_A_0_0 0
-voltSlope_A_0_0 0 0
-femHighIsolationMode_A_0_0 0x0
-femXpaSet_A_0_0 0x0
-femXlnaSet_A_0_0 0x0
-xtrSwitchSet_A_0_0 0x0
-clpcAttenTargetPwrChain_A_0_0 0x0 0x0
-clpcPdetTiaGain_A_0_0 0x0
-clpcLpfHighLowTiaHighGain_A_0_0 0x0
-clpcSqGain_A_0_0 0x0
-thermal_interval_A_0_0 0
-thermal_interval_lowTemp_A_0_0 0
-calPowerOffset_A_0_0 0
-TxIQCalMaxTxGain_A_0_0 0
-startChannel_A_0_0 0
-endChannel_A_0_0 0
-antennaGainCh_A_0_0 0x0
-txrxgain_A_0_0 0
-paBiasTrim_A_0_0 0 0
-xpaBiasLvl_A_0_0 0x0
-xlnaGain_A_0_0 0x0 0x0
-txbbf_20_A_0_0 0x0
-txbbf_40_A_0_0 0x0
-txbbf_80_A_0_0 0x0
-txbbf_160_A_0_0 0x0
-PA2CINTUNE_0_A_0_0 0x0 0x0 0x0
-PA2CINTUNE_1_A_0_0 0x0 0x0 0x0
-diversityGain_A_0_0 0
-rssiChainCompForDbs_A_0_0 0 0
-gtxEnable_A_0_0 0x0
-clpcerror_A_0_0 0 0
-thr_cca_etsi_ovd_A_0_0 0x0
-thr_cca_pri20_A_0_0 0x0
-thr_cca_ext20_A_0_0 0x0
-thr_cca_ext40_A_0_0 0x0
-thr_cca_ext80_A_0_0 0x0
-padding_A_0_0 0x0 0x0 0x0
-clpcerrorlow_A_0_0 0 0
-clpcerrorhi_A_0_0 0 0
-clpcerrorthermal_A_0_0 0 0
-vdetCalFlag_A_0_0 0x0
-gtxTempThreshForVoltSel_A_0_0 0 0
-futureBandModal_A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-bandModalFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvStandAloneId__0_0 5
-nvStandAloneLen__0_0 656
-nvStandAloneFlag__0_0 0x0
-heavyClipEnableBitMap__0_0 0x0
-heavyClipLiteMcsThr__0_0 0x0
-heavyClipLevelForHeavy__0_0 0x0
-heavyClipLevelForLite__0_0 0x0
-heavyClipTableFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ibfCalFreqPiers__0_0 0 0 0 0 0 0 0 0 0 0 0 0
-ibfCalData__0_0 0 0 0 0 0 0 0 0 0 0 0 0
-edcaOverride__0_0 1
-edcaVoTxop__0_0 1500
-edcaViTxop__0_0 3500
-edcaBeTxop__0_0 5500
-edcaBkTxop__0_0 0
-edcaVoAifs__0_0 0
-edcaViAifs__0_0 0
-edcaBeAifs__0_0 0
-edcaBkAifs__0_0 0
-standAloneReserve 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvDpdPefConfigId__0_0 6
-nvDpdPefConfigLen__0_0 636
-nvDpdPefConfigFlag__0_0 0x0
-pefMask__0_0 0x0
-pefFlag__0_0 0x0
-pefCalMax__0_0 0
-pefCalMin__0_0 0
-pefCalStep__0_0 0
-pefMaxCalAtt__0_0 0
-pefMaxCalBw__0_0 0
-pefMagSel__0_0 0
-pefLbSel__0_0 0
-bwCntl__0_0 0
-paprdBwTableDpdOff_B0_0_0 0x0
-paprdBwTableDpdOff_B1_0_0 0x0
-paprdBwTable_B0_0_0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
-paprdBwTable_B1_0_0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
-PefCoefI__0_0 0 0 0 0 0 0 0 0 0
-PefCoefQ__0_0 0 0 0 0 0 0 0 0 0
-PefCoefI_HT40__0_0 0 0 0 0 0 0 0 0 0
-PefCoefQ_HT40__0_0 0 0 0 0 0 0 0 0 0
-PefCoefI__0_0 0 0 0 0 0 0 0 0 0
-PefCoefQ__0_0 0 0 0 0 0 0 0 0 0
-PefCoefI_HT40__0_0 0 0 0 0 0 0 0 0 0
-PefCoefQ_HT40__0_0 0 0 0 0 0 0 0 0 0
-PefCoefI_VHT80__0_0 0 0 0 0 0 0 0 0 0
-PefCoefQ_VHT80__0_0 0 0 0 0 0 0 0 0 0
-PefCoefI_VHT160__0_0 0 0 0 0 0 0 0 0 0
-PefCoefQ_VHT160__0_0 0 0 0 0 0 0 0 0 0
-PREEMP_CNTL__0_0 0x0
-PEFTBL_SEL_B0_0_0 0x0
-PEFTBL_SEL_B1_0_0 0x0
-dpdPefConfigFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvDpdConfigId__0_0 7
-nvDpdConfigLen__0_0 280
-nvDpdConfigFlag__0_0 0x0
-dpdNarrowBandTraining__0_0 0
-dpdDebugMode__0_0 0
-dpdSqLimit__0_0 120
-dpdSqBestLimit__0_0 20
-dpdTrainingBW__0_0 0
-dpdAgc2Settling__0_0 40
-dpdXpaOn__0_0 0
-dpdFlag__0_0 0x0
-dpdReserved__0_0 0 0 0 0
-dpdAm2AmMask__0_0 0x3fffffff
-dpdAm2PmMask__0_0 0x3fffffff
-dpdHt40Mask__0_0 0x3fffffff
-dpdVht80Mask__0_0 0x3fffffff
-dpdVht160Mask__0_0 0x0
-dpdEnable_G_0_0 1
-dpdNoiseRatio_G_0_0 25 15
-dpdTargetPwrMax_G_0_0 63
-dpdTargetPwrMin_G_0_0 0
-dpdDacGain_G_0_0 8 8 8 8
-dpdAgc2Power_G_0_0 -12
-pad_G_0_0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
-dpdEnable_A_0_0 0
-dpdNoiseRatio_A_0_0 15 15
-dpdTargetPwrMax_A_0_0 63
-dpdTargetPwrMin_A_0_0 0
-dpdDacGain_A_0_0 -8 0 0 0
-dpdAgc2Power_A_0_0 -14
-pad_A_0_0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
-dpdNbFreq0__0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-dpdNbFreq1__0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-dpdOffPerChainChannelList_B0_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-dpdOffPerChainChannelList_B1_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-dpdConfigFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvTpcDataId__0_0 8
-nvTpcDataLen__0_0 4932
-nvTpcDataFlag__0_0 0x0
-calFreqPier2G_G_0_0 112 137 162 255 255 255 255 255 255 255 255 255 255 255
-alignPad1_1 0 0
-paSet_txgainIdx_B0_G_0_0 pasetting:0x0 txgainIdx:0xa
-meas_pwr_B0_G_0_0 149
-paSet_txgainIdx_B0_G_0_1 pasetting:0x0 txgainIdx:0x9
-meas_pwr_B0_G_0_1 135
-paSet_txgainIdx_B0_G_0_2 pasetting:0x0 txgainIdx:0x8
-meas_pwr_B0_G_0_2 120
-paSet_txgainIdx_B0_G_0_3 pasetting:0x0 txgainIdx:0x7
-meas_pwr_B0_G_0_3 107
-paSet_txgainIdx_B0_G_0_4 pasetting:0x0 txgainIdx:0x5
-meas_pwr_B0_G_0_4 76
-paSet_txgainIdx_B0_G_0_5 pasetting:0x0 txgainIdx:0x4
-meas_pwr_B0_G_0_5 61
-paSet_txgainIdx_B0_G_0_6 pasetting:0x0 txgainIdx:0x1
-meas_pwr_B0_G_0_6 4
-paSet_txgainIdx_B0_G_0_7 pasetting:0x0 txgainIdx:0x1
-meas_pwr_B0_G_0_7 4
-paSet_txgainIdx_B1_G_0_0 pasetting:0x0 txgainIdx:0xa
-meas_pwr_B1_G_0_0 147
-paSet_txgainIdx_B1_G_0_1 pasetting:0x0 txgainIdx:0x9
-meas_pwr_B1_G_0_1 133
-paSet_txgainIdx_B1_G_0_2 pasetting:0x0 txgainIdx:0x8
-meas_pwr_B1_G_0_2 117
-paSet_txgainIdx_B1_G_0_3 pasetting:0x0 txgainIdx:0x7
-meas_pwr_B1_G_0_3 102
-paSet_txgainIdx_B1_G_0_4 pasetting:0x0 txgainIdx:0x6
-meas_pwr_B1_G_0_4 83
-paSet_txgainIdx_B1_G_0_5 pasetting:0x0 txgainIdx:0x4
-meas_pwr_B1_G_0_5 55
-paSet_txgainIdx_B1_G_0_6 pasetting:0x0 txgainIdx:0x1
-meas_pwr_B1_G_0_6 1
-paSet_txgainIdx_B1_G_0_7 pasetting:0x0 txgainIdx:0x1
-meas_pwr_B1_G_0_7 1
-dacGain_G_0_0 -8 -8
-thermCalVal_G_0_0 123 123
-voltCalVal_G_0_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_1_0 pasetting:0x0 txgainIdx:0xa
-meas_pwr_B0_G_1_0 151
-paSet_txgainIdx_B0_G_1_1 pasetting:0x0 txgainIdx:0x9
-meas_pwr_B0_G_1_1 138
-paSet_txgainIdx_B0_G_1_2 pasetting:0x0 txgainIdx:0x8
-meas_pwr_B0_G_1_2 122
-paSet_txgainIdx_B0_G_1_3 pasetting:0x0 txgainIdx:0x7
-meas_pwr_B0_G_1_3 109
-paSet_txgainIdx_B0_G_1_4 pasetting:0x0 txgainIdx:0x5
-meas_pwr_B0_G_1_4 77
-paSet_txgainIdx_B0_G_1_5 pasetting:0x0 txgainIdx:0x4
-meas_pwr_B0_G_1_5 62
-paSet_txgainIdx_B0_G_1_6 pasetting:0x0 txgainIdx:0x1
-meas_pwr_B0_G_1_6 5
-paSet_txgainIdx_B0_G_1_7 pasetting:0x0 txgainIdx:0x1
-meas_pwr_B0_G_1_7 5
-paSet_txgainIdx_B1_G_1_0 pasetting:0x0 txgainIdx:0xa
-meas_pwr_B1_G_1_0 147
-paSet_txgainIdx_B1_G_1_1 pasetting:0x0 txgainIdx:0x9
-meas_pwr_B1_G_1_1 133
-paSet_txgainIdx_B1_G_1_2 pasetting:0x0 txgainIdx:0x8
-meas_pwr_B1_G_1_2 119
-paSet_txgainIdx_B1_G_1_3 pasetting:0x0 txgainIdx:0x7
-meas_pwr_B1_G_1_3 105
-paSet_txgainIdx_B1_G_1_4 pasetting:0x0 txgainIdx:0x5
-meas_pwr_B1_G_1_4 74
-paSet_txgainIdx_B1_G_1_5 pasetting:0x0 txgainIdx:0x4
-meas_pwr_B1_G_1_5 58
-paSet_txgainIdx_B1_G_1_6 pasetting:0x0 txgainIdx:0x1
-meas_pwr_B1_G_1_6 5
-paSet_txgainIdx_B1_G_1_7 pasetting:0x0 txgainIdx:0x1
-meas_pwr_B1_G_1_7 5
-dacGain_G_1_0 -8 -8
-thermCalVal_G_1_0 123 123
-voltCalVal_G_1_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_2_0 pasetting:0x0 txgainIdx:0xa
-meas_pwr_B0_G_2_0 145
-paSet_txgainIdx_B0_G_2_1 pasetting:0x0 txgainIdx:0x9
-meas_pwr_B0_G_2_1 130
-paSet_txgainIdx_B0_G_2_2 pasetting:0x0 txgainIdx:0x8
-meas_pwr_B0_G_2_2 114
-paSet_txgainIdx_B0_G_2_3 pasetting:0x0 txgainIdx:0x7
-meas_pwr_B0_G_2_3 100
-paSet_txgainIdx_B0_G_2_4 pasetting:0x0 txgainIdx:0x6
-meas_pwr_B0_G_2_4 81
-paSet_txgainIdx_B0_G_2_5 pasetting:0x0 txgainIdx:0x4
-meas_pwr_B0_G_2_5 52
-paSet_txgainIdx_B0_G_2_6 pasetting:0x0 txgainIdx:0x2
-meas_pwr_B0_G_2_6 15
-paSet_txgainIdx_B0_G_2_7 pasetting:0x0 txgainIdx:0x2
-meas_pwr_B0_G_2_7 15
-paSet_txgainIdx_B1_G_2_0 pasetting:0x0 txgainIdx:0xb
-meas_pwr_B1_G_2_0 152
-paSet_txgainIdx_B1_G_2_1 pasetting:0x0 txgainIdx:0xa
-meas_pwr_B1_G_2_1 140
-paSet_txgainIdx_B1_G_2_2 pasetting:0x0 txgainIdx:0x9
-meas_pwr_B1_G_2_2 125
-paSet_txgainIdx_B1_G_2_3 pasetting:0x0 txgainIdx:0x8
-meas_pwr_B1_G_2_3 109
-paSet_txgainIdx_B1_G_2_4 pasetting:0x0 txgainIdx:0x6
-meas_pwr_B1_G_2_4 75
-paSet_txgainIdx_B1_G_2_5 pasetting:0x0 txgainIdx:0x4
-meas_pwr_B1_G_2_5 48
-paSet_txgainIdx_B1_G_2_6 pasetting:0x0 txgainIdx:0x2
-meas_pwr_B1_G_2_6 12
-paSet_txgainIdx_B1_G_2_7 pasetting:0x0 txgainIdx:0x2
-meas_pwr_B1_G_2_7 12
-dacGain_G_2_0 -8 -8
-thermCalVal_G_2_0 123 123
-voltCalVal_G_2_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_3_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_3_0 0
-paSet_txgainIdx_B0_G_3_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_3_1 0
-paSet_txgainIdx_B0_G_3_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_3_2 0
-paSet_txgainIdx_B0_G_3_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_3_3 0
-paSet_txgainIdx_B0_G_3_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_3_4 0
-paSet_txgainIdx_B0_G_3_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_3_5 0
-paSet_txgainIdx_B0_G_3_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_3_6 0
-paSet_txgainIdx_B0_G_3_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_3_7 0
-paSet_txgainIdx_B1_G_3_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_3_0 0
-paSet_txgainIdx_B1_G_3_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_3_1 0
-paSet_txgainIdx_B1_G_3_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_3_2 0
-paSet_txgainIdx_B1_G_3_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_3_3 0
-paSet_txgainIdx_B1_G_3_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_3_4 0
-paSet_txgainIdx_B1_G_3_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_3_5 0
-paSet_txgainIdx_B1_G_3_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_3_6 0
-paSet_txgainIdx_B1_G_3_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_3_7 0
-dacGain_G_3_0 0 0
-thermCalVal_G_3_0 121 121
-voltCalVal_G_3_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_4_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_4_0 0
-paSet_txgainIdx_B0_G_4_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_4_1 0
-paSet_txgainIdx_B0_G_4_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_4_2 0
-paSet_txgainIdx_B0_G_4_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_4_3 0
-paSet_txgainIdx_B0_G_4_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_4_4 0
-paSet_txgainIdx_B0_G_4_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_4_5 0
-paSet_txgainIdx_B0_G_4_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_4_6 0
-paSet_txgainIdx_B0_G_4_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_4_7 0
-paSet_txgainIdx_B1_G_4_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_4_0 0
-paSet_txgainIdx_B1_G_4_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_4_1 0
-paSet_txgainIdx_B1_G_4_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_4_2 0
-paSet_txgainIdx_B1_G_4_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_4_3 0
-paSet_txgainIdx_B1_G_4_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_4_4 0
-paSet_txgainIdx_B1_G_4_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_4_5 0
-paSet_txgainIdx_B1_G_4_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_4_6 0
-paSet_txgainIdx_B1_G_4_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_4_7 0
-dacGain_G_4_0 0 0
-thermCalVal_G_4_0 121 121
-voltCalVal_G_4_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_5_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_5_0 0
-paSet_txgainIdx_B0_G_5_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_5_1 0
-paSet_txgainIdx_B0_G_5_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_5_2 0
-paSet_txgainIdx_B0_G_5_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_5_3 0
-paSet_txgainIdx_B0_G_5_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_5_4 0
-paSet_txgainIdx_B0_G_5_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_5_5 0
-paSet_txgainIdx_B0_G_5_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_5_6 0
-paSet_txgainIdx_B0_G_5_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_5_7 0
-paSet_txgainIdx_B1_G_5_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_5_0 0
-paSet_txgainIdx_B1_G_5_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_5_1 0
-paSet_txgainIdx_B1_G_5_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_5_2 0
-paSet_txgainIdx_B1_G_5_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_5_3 0
-paSet_txgainIdx_B1_G_5_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_5_4 0
-paSet_txgainIdx_B1_G_5_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_5_5 0
-paSet_txgainIdx_B1_G_5_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_5_6 0
-paSet_txgainIdx_B1_G_5_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_5_7 0
-dacGain_G_5_0 0 0
-thermCalVal_G_5_0 121 121
-voltCalVal_G_5_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_6_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_6_0 0
-paSet_txgainIdx_B0_G_6_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_6_1 0
-paSet_txgainIdx_B0_G_6_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_6_2 0
-paSet_txgainIdx_B0_G_6_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_6_3 0
-paSet_txgainIdx_B0_G_6_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_6_4 0
-paSet_txgainIdx_B0_G_6_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_6_5 0
-paSet_txgainIdx_B0_G_6_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_6_6 0
-paSet_txgainIdx_B0_G_6_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_6_7 0
-paSet_txgainIdx_B1_G_6_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_6_0 0
-paSet_txgainIdx_B1_G_6_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_6_1 0
-paSet_txgainIdx_B1_G_6_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_6_2 0
-paSet_txgainIdx_B1_G_6_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_6_3 0
-paSet_txgainIdx_B1_G_6_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_6_4 0
-paSet_txgainIdx_B1_G_6_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_6_5 0
-paSet_txgainIdx_B1_G_6_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_6_6 0
-paSet_txgainIdx_B1_G_6_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_6_7 0
-dacGain_G_6_0 0 0
-thermCalVal_G_6_0 121 121
-voltCalVal_G_6_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_7_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_7_0 0
-paSet_txgainIdx_B0_G_7_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_7_1 0
-paSet_txgainIdx_B0_G_7_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_7_2 0
-paSet_txgainIdx_B0_G_7_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_7_3 0
-paSet_txgainIdx_B0_G_7_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_7_4 0
-paSet_txgainIdx_B0_G_7_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_7_5 0
-paSet_txgainIdx_B0_G_7_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_7_6 0
-paSet_txgainIdx_B0_G_7_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_7_7 0
-paSet_txgainIdx_B1_G_7_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_7_0 0
-paSet_txgainIdx_B1_G_7_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_7_1 0
-paSet_txgainIdx_B1_G_7_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_7_2 0
-paSet_txgainIdx_B1_G_7_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_7_3 0
-paSet_txgainIdx_B1_G_7_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_7_4 0
-paSet_txgainIdx_B1_G_7_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_7_5 0
-paSet_txgainIdx_B1_G_7_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_7_6 0
-paSet_txgainIdx_B1_G_7_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_7_7 0
-dacGain_G_7_0 0 0
-thermCalVal_G_7_0 121 121
-voltCalVal_G_7_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_8_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_8_0 0
-paSet_txgainIdx_B0_G_8_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_8_1 0
-paSet_txgainIdx_B0_G_8_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_8_2 0
-paSet_txgainIdx_B0_G_8_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_8_3 0
-paSet_txgainIdx_B0_G_8_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_8_4 0
-paSet_txgainIdx_B0_G_8_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_8_5 0
-paSet_txgainIdx_B0_G_8_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_8_6 0
-paSet_txgainIdx_B0_G_8_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_8_7 0
-paSet_txgainIdx_B1_G_8_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_8_0 0
-paSet_txgainIdx_B1_G_8_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_8_1 0
-paSet_txgainIdx_B1_G_8_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_8_2 0
-paSet_txgainIdx_B1_G_8_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_8_3 0
-paSet_txgainIdx_B1_G_8_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_8_4 0
-paSet_txgainIdx_B1_G_8_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_8_5 0
-paSet_txgainIdx_B1_G_8_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_8_6 0
-paSet_txgainIdx_B1_G_8_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_8_7 0
-dacGain_G_8_0 0 0
-thermCalVal_G_8_0 121 121
-voltCalVal_G_8_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_9_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_9_0 0
-paSet_txgainIdx_B0_G_9_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_9_1 0
-paSet_txgainIdx_B0_G_9_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_9_2 0
-paSet_txgainIdx_B0_G_9_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_9_3 0
-paSet_txgainIdx_B0_G_9_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_9_4 0
-paSet_txgainIdx_B0_G_9_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_9_5 0
-paSet_txgainIdx_B0_G_9_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_9_6 0
-paSet_txgainIdx_B0_G_9_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_9_7 0
-paSet_txgainIdx_B1_G_9_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_9_0 0
-paSet_txgainIdx_B1_G_9_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_9_1 0
-paSet_txgainIdx_B1_G_9_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_9_2 0
-paSet_txgainIdx_B1_G_9_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_9_3 0
-paSet_txgainIdx_B1_G_9_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_9_4 0
-paSet_txgainIdx_B1_G_9_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_9_5 0
-paSet_txgainIdx_B1_G_9_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_9_6 0
-paSet_txgainIdx_B1_G_9_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_9_7 0
-dacGain_G_9_0 0 0
-thermCalVal_G_9_0 121 121
-voltCalVal_G_9_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_10_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_10_0 0
-paSet_txgainIdx_B0_G_10_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_10_1 0
-paSet_txgainIdx_B0_G_10_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_10_2 0
-paSet_txgainIdx_B0_G_10_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_10_3 0
-paSet_txgainIdx_B0_G_10_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_10_4 0
-paSet_txgainIdx_B0_G_10_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_10_5 0
-paSet_txgainIdx_B0_G_10_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_10_6 0
-paSet_txgainIdx_B0_G_10_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_10_7 0
-paSet_txgainIdx_B1_G_10_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_10_0 0
-paSet_txgainIdx_B1_G_10_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_10_1 0
-paSet_txgainIdx_B1_G_10_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_10_2 0
-paSet_txgainIdx_B1_G_10_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_10_3 0
-paSet_txgainIdx_B1_G_10_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_10_4 0
-paSet_txgainIdx_B1_G_10_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_10_5 0
-paSet_txgainIdx_B1_G_10_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_10_6 0
-paSet_txgainIdx_B1_G_10_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_10_7 0
-dacGain_G_10_0 0 0
-thermCalVal_G_10_0 121 121
-voltCalVal_G_10_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_11_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_11_0 0
-paSet_txgainIdx_B0_G_11_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_11_1 0
-paSet_txgainIdx_B0_G_11_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_11_2 0
-paSet_txgainIdx_B0_G_11_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_11_3 0
-paSet_txgainIdx_B0_G_11_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_11_4 0
-paSet_txgainIdx_B0_G_11_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_11_5 0
-paSet_txgainIdx_B0_G_11_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_11_6 0
-paSet_txgainIdx_B0_G_11_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_11_7 0
-paSet_txgainIdx_B1_G_11_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_11_0 0
-paSet_txgainIdx_B1_G_11_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_11_1 0
-paSet_txgainIdx_B1_G_11_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_11_2 0
-paSet_txgainIdx_B1_G_11_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_11_3 0
-paSet_txgainIdx_B1_G_11_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_11_4 0
-paSet_txgainIdx_B1_G_11_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_11_5 0
-paSet_txgainIdx_B1_G_11_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_11_6 0
-paSet_txgainIdx_B1_G_11_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_11_7 0
-dacGain_G_11_0 0 0
-thermCalVal_G_11_0 121 121
-voltCalVal_G_11_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_12_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_12_0 0
-paSet_txgainIdx_B0_G_12_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_12_1 0
-paSet_txgainIdx_B0_G_12_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_12_2 0
-paSet_txgainIdx_B0_G_12_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_12_3 0
-paSet_txgainIdx_B0_G_12_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_12_4 0
-paSet_txgainIdx_B0_G_12_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_12_5 0
-paSet_txgainIdx_B0_G_12_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_12_6 0
-paSet_txgainIdx_B0_G_12_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_12_7 0
-paSet_txgainIdx_B1_G_12_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_12_0 0
-paSet_txgainIdx_B1_G_12_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_12_1 0
-paSet_txgainIdx_B1_G_12_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_12_2 0
-paSet_txgainIdx_B1_G_12_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_12_3 0
-paSet_txgainIdx_B1_G_12_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_12_4 0
-paSet_txgainIdx_B1_G_12_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_12_5 0
-paSet_txgainIdx_B1_G_12_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_12_6 0
-paSet_txgainIdx_B1_G_12_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_12_7 0
-dacGain_G_12_0 0 0
-thermCalVal_G_12_0 121 121
-voltCalVal_G_12_0 0
-calOlpc2GReserved 0 0 0
-paSet_txgainIdx_B0_G_13_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_13_0 0
-paSet_txgainIdx_B0_G_13_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_13_1 0
-paSet_txgainIdx_B0_G_13_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_13_2 0
-paSet_txgainIdx_B0_G_13_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_13_3 0
-paSet_txgainIdx_B0_G_13_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_13_4 0
-paSet_txgainIdx_B0_G_13_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_13_5 0
-paSet_txgainIdx_B0_G_13_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_13_6 0
-paSet_txgainIdx_B0_G_13_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_G_13_7 0
-paSet_txgainIdx_B1_G_13_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_13_0 0
-paSet_txgainIdx_B1_G_13_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_13_1 0
-paSet_txgainIdx_B1_G_13_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_13_2 0
-paSet_txgainIdx_B1_G_13_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_13_3 0
-paSet_txgainIdx_B1_G_13_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_13_4 0
-paSet_txgainIdx_B1_G_13_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_13_5 0
-paSet_txgainIdx_B1_G_13_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_13_6 0
-paSet_txgainIdx_B1_G_13_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_G_13_7 0
-dacGain_G_13_0 0 0
-thermCalVal_G_13_0 121 121
-voltCalVal_G_13_0 0
-calOlpc2GReserved 0 0 0
-fullpdadc_read_B0_G_0_0 181
-fullmeas_pwr_B0_G_0_0 135
-fullpdadc_read_B0_G_0_1 115
-fullmeas_pwr_B0_G_0_1 120
-fullpdadc_read_B0_G_0_2 78
-fullmeas_pwr_B0_G_0_2 107
-fullpdadc_read_B0_G_0_3 44
-fullmeas_pwr_B0_G_0_3 88
-fullpdadc_read_B0_G_0_4 30
-fullmeas_pwr_B0_G_0_4 76
-fullpdadc_read_B0_G_0_5 0
-fullmeas_pwr_B0_G_0_5 0
-fullpdadc_read_B0_G_0_6 0
-fullmeas_pwr_B0_G_0_6 0
-fullpdadc_read_B0_G_0_7 0
-fullmeas_pwr_B0_G_0_7 0
-fullpdadc_read_B0_G_0_8 0
-fullmeas_pwr_B0_G_0_8 0
-fullpdadc_read_B0_G_0_9 0
-fullmeas_pwr_B0_G_0_9 0
-fullpdadc_read_B1_G_0_0 127
-fullmeas_pwr_B1_G_0_0 133
-fullpdadc_read_B1_G_0_1 78
-fullmeas_pwr_B1_G_0_1 117
-fullpdadc_read_B1_G_0_2 52
-fullmeas_pwr_B1_G_0_2 102
-fullpdadc_read_B1_G_0_3 31
-fullmeas_pwr_B1_G_0_3 83
-fullpdadc_read_B1_G_0_4 21
-fullmeas_pwr_B1_G_0_4 71
-fullpdadc_read_B1_G_0_5 0
-fullmeas_pwr_B1_G_0_5 0
-fullpdadc_read_B1_G_0_6 0
-fullmeas_pwr_B1_G_0_6 0
-fullpdadc_read_B1_G_0_7 0
-fullmeas_pwr_B1_G_0_7 0
-fullpdadc_read_B1_G_0_8 0
-fullmeas_pwr_B1_G_0_8 0
-fullpdadc_read_B1_G_0_9 0
-fullmeas_pwr_B1_G_0_9 0
-fullpdadc_read_B0_G_1_0 188
-fullmeas_pwr_B0_G_1_0 138
-fullpdadc_read_B0_G_1_1 120
-fullmeas_pwr_B0_G_1_1 122
-fullpdadc_read_B0_G_1_2 79
-fullmeas_pwr_B0_G_1_2 109
-fullpdadc_read_B0_G_1_3 46
-fullmeas_pwr_B0_G_1_3 89
-fullpdadc_read_B0_G_1_4 22
-fullmeas_pwr_B0_G_1_4 62
-fullpdadc_read_B0_G_1_5 0
-fullmeas_pwr_B0_G_1_5 0
-fullpdadc_read_B0_G_1_6 0
-fullmeas_pwr_B0_G_1_6 0
-fullpdadc_read_B0_G_1_7 0
-fullmeas_pwr_B0_G_1_7 0
-fullpdadc_read_B0_G_1_8 0
-fullmeas_pwr_B0_G_1_8 0
-fullpdadc_read_B0_G_1_9 0
-fullmeas_pwr_B0_G_1_9 0
-fullpdadc_read_B1_G_1_0 175
-fullmeas_pwr_B1_G_1_0 147
-fullpdadc_read_B1_G_1_1 115
-fullmeas_pwr_B1_G_1_1 133
-fullpdadc_read_B1_G_1_2 73
-fullmeas_pwr_B1_G_1_2 119
-fullpdadc_read_B1_G_1_3 49
-fullmeas_pwr_B1_G_1_3 105
-fullpdadc_read_B1_G_1_4 29
-fullmeas_pwr_B1_G_1_4 86
-fullpdadc_read_B1_G_1_5 0
-fullmeas_pwr_B1_G_1_5 0
-fullpdadc_read_B1_G_1_6 0
-fullmeas_pwr_B1_G_1_6 0
-fullpdadc_read_B1_G_1_7 0
-fullmeas_pwr_B1_G_1_7 0
-fullpdadc_read_B1_G_1_8 0
-fullmeas_pwr_B1_G_1_8 0
-fullpdadc_read_B1_G_1_9 0
-fullmeas_pwr_B1_G_1_9 0
-fullpdadc_read_B0_G_2_0 151
-fullmeas_pwr_B0_G_2_0 130
-fullpdadc_read_B0_G_2_1 94
-fullmeas_pwr_B0_G_2_1 114
-fullpdadc_read_B0_G_2_2 64
-fullmeas_pwr_B0_G_2_2 100
-fullpdadc_read_B0_G_2_3 35
-fullmeas_pwr_B0_G_2_3 81
-fullpdadc_read_B0_G_2_4 24
-fullmeas_pwr_B0_G_2_4 68
-fullpdadc_read_B0_G_2_5 0
-fullmeas_pwr_B0_G_2_5 0
-fullpdadc_read_B0_G_2_6 0
-fullmeas_pwr_B0_G_2_6 0
-fullpdadc_read_B0_G_2_7 0
-fullmeas_pwr_B0_G_2_7 0
-fullpdadc_read_B0_G_2_8 0
-fullmeas_pwr_B0_G_2_8 0
-fullpdadc_read_B0_G_2_9 0
-fullmeas_pwr_B0_G_2_9 0
-fullpdadc_read_B1_G_2_0 172
-fullmeas_pwr_B1_G_2_0 140
-fullpdadc_read_B1_G_2_1 108
-fullmeas_pwr_B1_G_2_1 125
-fullpdadc_read_B1_G_2_2 69
-fullmeas_pwr_B1_G_2_2 109
-fullpdadc_read_B1_G_2_3 46
-fullmeas_pwr_B1_G_2_3 95
-fullpdadc_read_B1_G_2_4 25
-fullmeas_pwr_B1_G_2_4 75
-fullpdadc_read_B1_G_2_5 0
-fullmeas_pwr_B1_G_2_5 0
-fullpdadc_read_B1_G_2_6 0
-fullmeas_pwr_B1_G_2_6 0
-fullpdadc_read_B1_G_2_7 0
-fullmeas_pwr_B1_G_2_7 0
-fullpdadc_read_B1_G_2_8 0
-fullmeas_pwr_B1_G_2_8 0
-fullpdadc_read_B1_G_2_9 0
-fullmeas_pwr_B1_G_2_9 0
-fullpdadc_read_B0_G_3_0 0
-fullmeas_pwr_B0_G_3_0 0
-fullpdadc_read_B0_G_3_1 0
-fullmeas_pwr_B0_G_3_1 0
-fullpdadc_read_B0_G_3_2 0
-fullmeas_pwr_B0_G_3_2 0
-fullpdadc_read_B0_G_3_3 0
-fullmeas_pwr_B0_G_3_3 0
-fullpdadc_read_B0_G_3_4 0
-fullmeas_pwr_B0_G_3_4 0
-fullpdadc_read_B0_G_3_5 0
-fullmeas_pwr_B0_G_3_5 0
-fullpdadc_read_B0_G_3_6 0
-fullmeas_pwr_B0_G_3_6 0
-fullpdadc_read_B0_G_3_7 0
-fullmeas_pwr_B0_G_3_7 0
-fullpdadc_read_B0_G_3_8 0
-fullmeas_pwr_B0_G_3_8 0
-fullpdadc_read_B0_G_3_9 0
-fullmeas_pwr_B0_G_3_9 0
-fullpdadc_read_B1_G_3_0 0
-fullmeas_pwr_B1_G_3_0 0
-fullpdadc_read_B1_G_3_1 0
-fullmeas_pwr_B1_G_3_1 0
-fullpdadc_read_B1_G_3_2 0
-fullmeas_pwr_B1_G_3_2 0
-fullpdadc_read_B1_G_3_3 0
-fullmeas_pwr_B1_G_3_3 0
-fullpdadc_read_B1_G_3_4 0
-fullmeas_pwr_B1_G_3_4 0
-fullpdadc_read_B1_G_3_5 0
-fullmeas_pwr_B1_G_3_5 0
-fullpdadc_read_B1_G_3_6 0
-fullmeas_pwr_B1_G_3_6 0
-fullpdadc_read_B1_G_3_7 0
-fullmeas_pwr_B1_G_3_7 0
-fullpdadc_read_B1_G_3_8 0
-fullmeas_pwr_B1_G_3_8 0
-fullpdadc_read_B1_G_3_9 0
-fullmeas_pwr_B1_G_3_9 0
-fullpdadc_read_B0_G_4_0 0
-fullmeas_pwr_B0_G_4_0 0
-fullpdadc_read_B0_G_4_1 0
-fullmeas_pwr_B0_G_4_1 0
-fullpdadc_read_B0_G_4_2 0
-fullmeas_pwr_B0_G_4_2 0
-fullpdadc_read_B0_G_4_3 0
-fullmeas_pwr_B0_G_4_3 0
-fullpdadc_read_B0_G_4_4 0
-fullmeas_pwr_B0_G_4_4 0
-fullpdadc_read_B0_G_4_5 0
-fullmeas_pwr_B0_G_4_5 0
-fullpdadc_read_B0_G_4_6 0
-fullmeas_pwr_B0_G_4_6 0
-fullpdadc_read_B0_G_4_7 0
-fullmeas_pwr_B0_G_4_7 0
-fullpdadc_read_B0_G_4_8 0
-fullmeas_pwr_B0_G_4_8 0
-fullpdadc_read_B0_G_4_9 0
-fullmeas_pwr_B0_G_4_9 0
-fullpdadc_read_B1_G_4_0 0
-fullmeas_pwr_B1_G_4_0 0
-fullpdadc_read_B1_G_4_1 0
-fullmeas_pwr_B1_G_4_1 0
-fullpdadc_read_B1_G_4_2 0
-fullmeas_pwr_B1_G_4_2 0
-fullpdadc_read_B1_G_4_3 0
-fullmeas_pwr_B1_G_4_3 0
-fullpdadc_read_B1_G_4_4 0
-fullmeas_pwr_B1_G_4_4 0
-fullpdadc_read_B1_G_4_5 0
-fullmeas_pwr_B1_G_4_5 0
-fullpdadc_read_B1_G_4_6 0
-fullmeas_pwr_B1_G_4_6 0
-fullpdadc_read_B1_G_4_7 0
-fullmeas_pwr_B1_G_4_7 0
-fullpdadc_read_B1_G_4_8 0
-fullmeas_pwr_B1_G_4_8 0
-fullpdadc_read_B1_G_4_9 0
-fullmeas_pwr_B1_G_4_9 0
-fullpdadc_read_B0_G_5_0 0
-fullmeas_pwr_B0_G_5_0 0
-fullpdadc_read_B0_G_5_1 0
-fullmeas_pwr_B0_G_5_1 0
-fullpdadc_read_B0_G_5_2 0
-fullmeas_pwr_B0_G_5_2 0
-fullpdadc_read_B0_G_5_3 0
-fullmeas_pwr_B0_G_5_3 0
-fullpdadc_read_B0_G_5_4 0
-fullmeas_pwr_B0_G_5_4 0
-fullpdadc_read_B0_G_5_5 0
-fullmeas_pwr_B0_G_5_5 0
-fullpdadc_read_B0_G_5_6 0
-fullmeas_pwr_B0_G_5_6 0
-fullpdadc_read_B0_G_5_7 0
-fullmeas_pwr_B0_G_5_7 0
-fullpdadc_read_B0_G_5_8 0
-fullmeas_pwr_B0_G_5_8 0
-fullpdadc_read_B0_G_5_9 0
-fullmeas_pwr_B0_G_5_9 0
-fullpdadc_read_B1_G_5_0 0
-fullmeas_pwr_B1_G_5_0 0
-fullpdadc_read_B1_G_5_1 0
-fullmeas_pwr_B1_G_5_1 0
-fullpdadc_read_B1_G_5_2 0
-fullmeas_pwr_B1_G_5_2 0
-fullpdadc_read_B1_G_5_3 0
-fullmeas_pwr_B1_G_5_3 0
-fullpdadc_read_B1_G_5_4 0
-fullmeas_pwr_B1_G_5_4 0
-fullpdadc_read_B1_G_5_5 0
-fullmeas_pwr_B1_G_5_5 0
-fullpdadc_read_B1_G_5_6 0
-fullmeas_pwr_B1_G_5_6 0
-fullpdadc_read_B1_G_5_7 0
-fullmeas_pwr_B1_G_5_7 0
-fullpdadc_read_B1_G_5_8 0
-fullmeas_pwr_B1_G_5_8 0
-fullpdadc_read_B1_G_5_9 0
-fullmeas_pwr_B1_G_5_9 0
-fullpdadc_read_B0_G_6_0 0
-fullmeas_pwr_B0_G_6_0 0
-fullpdadc_read_B0_G_6_1 0
-fullmeas_pwr_B0_G_6_1 0
-fullpdadc_read_B0_G_6_2 0
-fullmeas_pwr_B0_G_6_2 0
-fullpdadc_read_B0_G_6_3 0
-fullmeas_pwr_B0_G_6_3 0
-fullpdadc_read_B0_G_6_4 0
-fullmeas_pwr_B0_G_6_4 0
-fullpdadc_read_B0_G_6_5 0
-fullmeas_pwr_B0_G_6_5 0
-fullpdadc_read_B0_G_6_6 0
-fullmeas_pwr_B0_G_6_6 0
-fullpdadc_read_B0_G_6_7 0
-fullmeas_pwr_B0_G_6_7 0
-fullpdadc_read_B0_G_6_8 0
-fullmeas_pwr_B0_G_6_8 0
-fullpdadc_read_B0_G_6_9 0
-fullmeas_pwr_B0_G_6_9 0
-fullpdadc_read_B1_G_6_0 0
-fullmeas_pwr_B1_G_6_0 0
-fullpdadc_read_B1_G_6_1 0
-fullmeas_pwr_B1_G_6_1 0
-fullpdadc_read_B1_G_6_2 0
-fullmeas_pwr_B1_G_6_2 0
-fullpdadc_read_B1_G_6_3 0
-fullmeas_pwr_B1_G_6_3 0
-fullpdadc_read_B1_G_6_4 0
-fullmeas_pwr_B1_G_6_4 0
-fullpdadc_read_B1_G_6_5 0
-fullmeas_pwr_B1_G_6_5 0
-fullpdadc_read_B1_G_6_6 0
-fullmeas_pwr_B1_G_6_6 0
-fullpdadc_read_B1_G_6_7 0
-fullmeas_pwr_B1_G_6_7 0
-fullpdadc_read_B1_G_6_8 0
-fullmeas_pwr_B1_G_6_8 0
-fullpdadc_read_B1_G_6_9 0
-fullmeas_pwr_B1_G_6_9 0
-fullpdadc_read_B0_G_7_0 0
-fullmeas_pwr_B0_G_7_0 0
-fullpdadc_read_B0_G_7_1 0
-fullmeas_pwr_B0_G_7_1 0
-fullpdadc_read_B0_G_7_2 0
-fullmeas_pwr_B0_G_7_2 0
-fullpdadc_read_B0_G_7_3 0
-fullmeas_pwr_B0_G_7_3 0
-fullpdadc_read_B0_G_7_4 0
-fullmeas_pwr_B0_G_7_4 0
-fullpdadc_read_B0_G_7_5 0
-fullmeas_pwr_B0_G_7_5 0
-fullpdadc_read_B0_G_7_6 0
-fullmeas_pwr_B0_G_7_6 0
-fullpdadc_read_B0_G_7_7 0
-fullmeas_pwr_B0_G_7_7 0
-fullpdadc_read_B0_G_7_8 0
-fullmeas_pwr_B0_G_7_8 0
-fullpdadc_read_B0_G_7_9 0
-fullmeas_pwr_B0_G_7_9 0
-fullpdadc_read_B1_G_7_0 0
-fullmeas_pwr_B1_G_7_0 0
-fullpdadc_read_B1_G_7_1 0
-fullmeas_pwr_B1_G_7_1 0
-fullpdadc_read_B1_G_7_2 0
-fullmeas_pwr_B1_G_7_2 0
-fullpdadc_read_B1_G_7_3 0
-fullmeas_pwr_B1_G_7_3 0
-fullpdadc_read_B1_G_7_4 0
-fullmeas_pwr_B1_G_7_4 0
-fullpdadc_read_B1_G_7_5 0
-fullmeas_pwr_B1_G_7_5 0
-fullpdadc_read_B1_G_7_6 0
-fullmeas_pwr_B1_G_7_6 0
-fullpdadc_read_B1_G_7_7 0
-fullmeas_pwr_B1_G_7_7 0
-fullpdadc_read_B1_G_7_8 0
-fullmeas_pwr_B1_G_7_8 0
-fullpdadc_read_B1_G_7_9 0
-fullmeas_pwr_B1_G_7_9 0
-fullpdadc_read_B0_G_8_0 0
-fullmeas_pwr_B0_G_8_0 0
-fullpdadc_read_B0_G_8_1 0
-fullmeas_pwr_B0_G_8_1 0
-fullpdadc_read_B0_G_8_2 0
-fullmeas_pwr_B0_G_8_2 0
-fullpdadc_read_B0_G_8_3 0
-fullmeas_pwr_B0_G_8_3 0
-fullpdadc_read_B0_G_8_4 0
-fullmeas_pwr_B0_G_8_4 0
-fullpdadc_read_B0_G_8_5 0
-fullmeas_pwr_B0_G_8_5 0
-fullpdadc_read_B0_G_8_6 0
-fullmeas_pwr_B0_G_8_6 0
-fullpdadc_read_B0_G_8_7 0
-fullmeas_pwr_B0_G_8_7 0
-fullpdadc_read_B0_G_8_8 0
-fullmeas_pwr_B0_G_8_8 0
-fullpdadc_read_B0_G_8_9 0
-fullmeas_pwr_B0_G_8_9 0
-fullpdadc_read_B1_G_8_0 0
-fullmeas_pwr_B1_G_8_0 0
-fullpdadc_read_B1_G_8_1 0
-fullmeas_pwr_B1_G_8_1 0
-fullpdadc_read_B1_G_8_2 0
-fullmeas_pwr_B1_G_8_2 0
-fullpdadc_read_B1_G_8_3 0
-fullmeas_pwr_B1_G_8_3 0
-fullpdadc_read_B1_G_8_4 0
-fullmeas_pwr_B1_G_8_4 0
-fullpdadc_read_B1_G_8_5 0
-fullmeas_pwr_B1_G_8_5 0
-fullpdadc_read_B1_G_8_6 0
-fullmeas_pwr_B1_G_8_6 0
-fullpdadc_read_B1_G_8_7 0
-fullmeas_pwr_B1_G_8_7 0
-fullpdadc_read_B1_G_8_8 0
-fullmeas_pwr_B1_G_8_8 0
-fullpdadc_read_B1_G_8_9 0
-fullmeas_pwr_B1_G_8_9 0
-fullpdadc_read_B0_G_9_0 0
-fullmeas_pwr_B0_G_9_0 0
-fullpdadc_read_B0_G_9_1 0
-fullmeas_pwr_B0_G_9_1 0
-fullpdadc_read_B0_G_9_2 0
-fullmeas_pwr_B0_G_9_2 0
-fullpdadc_read_B0_G_9_3 0
-fullmeas_pwr_B0_G_9_3 0
-fullpdadc_read_B0_G_9_4 0
-fullmeas_pwr_B0_G_9_4 0
-fullpdadc_read_B0_G_9_5 0
-fullmeas_pwr_B0_G_9_5 0
-fullpdadc_read_B0_G_9_6 0
-fullmeas_pwr_B0_G_9_6 0
-fullpdadc_read_B0_G_9_7 0
-fullmeas_pwr_B0_G_9_7 0
-fullpdadc_read_B0_G_9_8 0
-fullmeas_pwr_B0_G_9_8 0
-fullpdadc_read_B0_G_9_9 0
-fullmeas_pwr_B0_G_9_9 0
-fullpdadc_read_B1_G_9_0 0
-fullmeas_pwr_B1_G_9_0 0
-fullpdadc_read_B1_G_9_1 0
-fullmeas_pwr_B1_G_9_1 0
-fullpdadc_read_B1_G_9_2 0
-fullmeas_pwr_B1_G_9_2 0
-fullpdadc_read_B1_G_9_3 0
-fullmeas_pwr_B1_G_9_3 0
-fullpdadc_read_B1_G_9_4 0
-fullmeas_pwr_B1_G_9_4 0
-fullpdadc_read_B1_G_9_5 0
-fullmeas_pwr_B1_G_9_5 0
-fullpdadc_read_B1_G_9_6 0
-fullmeas_pwr_B1_G_9_6 0
-fullpdadc_read_B1_G_9_7 0
-fullmeas_pwr_B1_G_9_7 0
-fullpdadc_read_B1_G_9_8 0
-fullmeas_pwr_B1_G_9_8 0
-fullpdadc_read_B1_G_9_9 0
-fullmeas_pwr_B1_G_9_9 0
-fullpdadc_read_B0_G_10_0 0
-fullmeas_pwr_B0_G_10_0 0
-fullpdadc_read_B0_G_10_1 0
-fullmeas_pwr_B0_G_10_1 0
-fullpdadc_read_B0_G_10_2 0
-fullmeas_pwr_B0_G_10_2 0
-fullpdadc_read_B0_G_10_3 0
-fullmeas_pwr_B0_G_10_3 0
-fullpdadc_read_B0_G_10_4 0
-fullmeas_pwr_B0_G_10_4 0
-fullpdadc_read_B0_G_10_5 0
-fullmeas_pwr_B0_G_10_5 0
-fullpdadc_read_B0_G_10_6 0
-fullmeas_pwr_B0_G_10_6 0
-fullpdadc_read_B0_G_10_7 0
-fullmeas_pwr_B0_G_10_7 0
-fullpdadc_read_B0_G_10_8 0
-fullmeas_pwr_B0_G_10_8 0
-fullpdadc_read_B0_G_10_9 0
-fullmeas_pwr_B0_G_10_9 0
-fullpdadc_read_B1_G_10_0 0
-fullmeas_pwr_B1_G_10_0 0
-fullpdadc_read_B1_G_10_1 0
-fullmeas_pwr_B1_G_10_1 0
-fullpdadc_read_B1_G_10_2 0
-fullmeas_pwr_B1_G_10_2 0
-fullpdadc_read_B1_G_10_3 0
-fullmeas_pwr_B1_G_10_3 0
-fullpdadc_read_B1_G_10_4 0
-fullmeas_pwr_B1_G_10_4 0
-fullpdadc_read_B1_G_10_5 0
-fullmeas_pwr_B1_G_10_5 0
-fullpdadc_read_B1_G_10_6 0
-fullmeas_pwr_B1_G_10_6 0
-fullpdadc_read_B1_G_10_7 0
-fullmeas_pwr_B1_G_10_7 0
-fullpdadc_read_B1_G_10_8 0
-fullmeas_pwr_B1_G_10_8 0
-fullpdadc_read_B1_G_10_9 0
-fullmeas_pwr_B1_G_10_9 0
-fullpdadc_read_B0_G_11_0 0
-fullmeas_pwr_B0_G_11_0 0
-fullpdadc_read_B0_G_11_1 0
-fullmeas_pwr_B0_G_11_1 0
-fullpdadc_read_B0_G_11_2 0
-fullmeas_pwr_B0_G_11_2 0
-fullpdadc_read_B0_G_11_3 0
-fullmeas_pwr_B0_G_11_3 0
-fullpdadc_read_B0_G_11_4 0
-fullmeas_pwr_B0_G_11_4 0
-fullpdadc_read_B0_G_11_5 0
-fullmeas_pwr_B0_G_11_5 0
-fullpdadc_read_B0_G_11_6 0
-fullmeas_pwr_B0_G_11_6 0
-fullpdadc_read_B0_G_11_7 0
-fullmeas_pwr_B0_G_11_7 0
-fullpdadc_read_B0_G_11_8 0
-fullmeas_pwr_B0_G_11_8 0
-fullpdadc_read_B0_G_11_9 0
-fullmeas_pwr_B0_G_11_9 0
-fullpdadc_read_B1_G_11_0 0
-fullmeas_pwr_B1_G_11_0 0
-fullpdadc_read_B1_G_11_1 0
-fullmeas_pwr_B1_G_11_1 0
-fullpdadc_read_B1_G_11_2 0
-fullmeas_pwr_B1_G_11_2 0
-fullpdadc_read_B1_G_11_3 0
-fullmeas_pwr_B1_G_11_3 0
-fullpdadc_read_B1_G_11_4 0
-fullmeas_pwr_B1_G_11_4 0
-fullpdadc_read_B1_G_11_5 0
-fullmeas_pwr_B1_G_11_5 0
-fullpdadc_read_B1_G_11_6 0
-fullmeas_pwr_B1_G_11_6 0
-fullpdadc_read_B1_G_11_7 0
-fullmeas_pwr_B1_G_11_7 0
-fullpdadc_read_B1_G_11_8 0
-fullmeas_pwr_B1_G_11_8 0
-fullpdadc_read_B1_G_11_9 0
-fullmeas_pwr_B1_G_11_9 0
-fullpdadc_read_B0_G_12_0 0
-fullmeas_pwr_B0_G_12_0 0
-fullpdadc_read_B0_G_12_1 0
-fullmeas_pwr_B0_G_12_1 0
-fullpdadc_read_B0_G_12_2 0
-fullmeas_pwr_B0_G_12_2 0
-fullpdadc_read_B0_G_12_3 0
-fullmeas_pwr_B0_G_12_3 0
-fullpdadc_read_B0_G_12_4 0
-fullmeas_pwr_B0_G_12_4 0
-fullpdadc_read_B0_G_12_5 0
-fullmeas_pwr_B0_G_12_5 0
-fullpdadc_read_B0_G_12_6 0
-fullmeas_pwr_B0_G_12_6 0
-fullpdadc_read_B0_G_12_7 0
-fullmeas_pwr_B0_G_12_7 0
-fullpdadc_read_B0_G_12_8 0
-fullmeas_pwr_B0_G_12_8 0
-fullpdadc_read_B0_G_12_9 0
-fullmeas_pwr_B0_G_12_9 0
-fullpdadc_read_B1_G_12_0 0
-fullmeas_pwr_B1_G_12_0 0
-fullpdadc_read_B1_G_12_1 0
-fullmeas_pwr_B1_G_12_1 0
-fullpdadc_read_B1_G_12_2 0
-fullmeas_pwr_B1_G_12_2 0
-fullpdadc_read_B1_G_12_3 0
-fullmeas_pwr_B1_G_12_3 0
-fullpdadc_read_B1_G_12_4 0
-fullmeas_pwr_B1_G_12_4 0
-fullpdadc_read_B1_G_12_5 0
-fullmeas_pwr_B1_G_12_5 0
-fullpdadc_read_B1_G_12_6 0
-fullmeas_pwr_B1_G_12_6 0
-fullpdadc_read_B1_G_12_7 0
-fullmeas_pwr_B1_G_12_7 0
-fullpdadc_read_B1_G_12_8 0
-fullmeas_pwr_B1_G_12_8 0
-fullpdadc_read_B1_G_12_9 0
-fullmeas_pwr_B1_G_12_9 0
-fullpdadc_read_B0_G_13_0 0
-fullmeas_pwr_B0_G_13_0 0
-fullpdadc_read_B0_G_13_1 0
-fullmeas_pwr_B0_G_13_1 0
-fullpdadc_read_B0_G_13_2 0
-fullmeas_pwr_B0_G_13_2 0
-fullpdadc_read_B0_G_13_3 0
-fullmeas_pwr_B0_G_13_3 0
-fullpdadc_read_B0_G_13_4 0
-fullmeas_pwr_B0_G_13_4 0
-fullpdadc_read_B0_G_13_5 0
-fullmeas_pwr_B0_G_13_5 0
-fullpdadc_read_B0_G_13_6 0
-fullmeas_pwr_B0_G_13_6 0
-fullpdadc_read_B0_G_13_7 0
-fullmeas_pwr_B0_G_13_7 0
-fullpdadc_read_B0_G_13_8 0
-fullmeas_pwr_B0_G_13_8 0
-fullpdadc_read_B0_G_13_9 0
-fullmeas_pwr_B0_G_13_9 0
-fullpdadc_read_B1_G_13_0 0
-fullmeas_pwr_B1_G_13_0 0
-fullpdadc_read_B1_G_13_1 0
-fullmeas_pwr_B1_G_13_1 0
-fullpdadc_read_B1_G_13_2 0
-fullmeas_pwr_B1_G_13_2 0
-fullpdadc_read_B1_G_13_3 0
-fullmeas_pwr_B1_G_13_3 0
-fullpdadc_read_B1_G_13_4 0
-fullmeas_pwr_B1_G_13_4 0
-fullpdadc_read_B1_G_13_5 0
-fullmeas_pwr_B1_G_13_5 0
-fullpdadc_read_B1_G_13_6 0
-fullmeas_pwr_B1_G_13_6 0
-fullpdadc_read_B1_G_13_7 0
-fullmeas_pwr_B1_G_13_7 0
-fullpdadc_read_B1_G_13_8 0
-fullmeas_pwr_B1_G_13_8 0
-fullpdadc_read_B1_G_13_9 0
-fullmeas_pwr_B1_G_13_9 0
-calOffsetFreqPier2G_G_0_0 112 142 172 184
-calOffsetPierData2G_B0_G_0_0 0 0 0 0
-calOffsetPierData2G_B1_G_0_0 0 0 0 0
-offsetThreshold2G_G_0_0 0
-calData2GFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-calFreqPier5G_A_0_0 76 88 104 140 160 180 189 205 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
-paSet_txgainIdx_B0_A_0_0 pasetting:0x3 txgainIdx:0xa
-meas_pwr_B0_A_0_0 153
-paSet_txgainIdx_B0_A_0_1 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B0_A_0_1 132
-paSet_txgainIdx_B0_A_0_2 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B0_A_0_2 120
-paSet_txgainIdx_B0_A_0_3 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B0_A_0_3 99
-paSet_txgainIdx_B0_A_0_4 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B0_A_0_4 78
-paSet_txgainIdx_B0_A_0_5 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B0_A_0_5 63
-paSet_txgainIdx_B0_A_0_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_0_6 45
-paSet_txgainIdx_B0_A_0_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_0_7 45
-paSet_txgainIdx_B1_A_0_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B1_A_0_0 147
-paSet_txgainIdx_B1_A_0_1 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B1_A_0_1 137
-paSet_txgainIdx_B1_A_0_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B1_A_0_2 115
-paSet_txgainIdx_B1_A_0_3 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B1_A_0_3 104
-paSet_txgainIdx_B1_A_0_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B1_A_0_4 78
-paSet_txgainIdx_B1_A_0_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_0_5 60
-paSet_txgainIdx_B1_A_0_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_0_6 60
-paSet_txgainIdx_B1_A_0_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_0_7 60
-dacGain_A_0_0 -8 -8
-thermCalVal_A_0_0 123 123
-voltCalVal_A_0_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_1_0 pasetting:0x3 txgainIdx:0xa
-meas_pwr_B0_A_1_0 150
-paSet_txgainIdx_B0_A_1_1 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B0_A_1_1 130
-paSet_txgainIdx_B0_A_1_2 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B0_A_1_2 119
-paSet_txgainIdx_B0_A_1_3 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B0_A_1_3 97
-paSet_txgainIdx_B0_A_1_4 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B0_A_1_4 75
-paSet_txgainIdx_B0_A_1_5 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B0_A_1_5 60
-paSet_txgainIdx_B0_A_1_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_1_6 42
-paSet_txgainIdx_B0_A_1_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_1_7 42
-paSet_txgainIdx_B1_A_1_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B1_A_1_0 145
-paSet_txgainIdx_B1_A_1_1 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B1_A_1_1 134
-paSet_txgainIdx_B1_A_1_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B1_A_1_2 112
-paSet_txgainIdx_B1_A_1_3 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B1_A_1_3 101
-paSet_txgainIdx_B1_A_1_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B1_A_1_4 74
-paSet_txgainIdx_B1_A_1_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_1_5 57
-paSet_txgainIdx_B1_A_1_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_1_6 57
-paSet_txgainIdx_B1_A_1_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_1_7 57
-dacGain_A_1_0 -8 -8
-thermCalVal_A_1_0 123 123
-voltCalVal_A_1_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_2_0 pasetting:0x3 txgainIdx:0x9
-meas_pwr_B0_A_2_0 144
-paSet_txgainIdx_B0_A_2_1 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B0_A_2_1 135
-paSet_txgainIdx_B0_A_2_2 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B0_A_2_2 124
-paSet_txgainIdx_B0_A_2_3 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B0_A_2_3 103
-paSet_txgainIdx_B0_A_2_4 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B0_A_2_4 81
-paSet_txgainIdx_B0_A_2_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_2_5 48
-paSet_txgainIdx_B0_A_2_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_2_6 48
-paSet_txgainIdx_B0_A_2_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_2_7 48
-paSet_txgainIdx_B1_A_2_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B1_A_2_0 149
-paSet_txgainIdx_B1_A_2_1 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B1_A_2_1 138
-paSet_txgainIdx_B1_A_2_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B1_A_2_2 116
-paSet_txgainIdx_B1_A_2_3 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B1_A_2_3 105
-paSet_txgainIdx_B1_A_2_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B1_A_2_4 79
-paSet_txgainIdx_B1_A_2_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_2_5 61
-paSet_txgainIdx_B1_A_2_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_2_6 61
-paSet_txgainIdx_B1_A_2_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_2_7 61
-dacGain_A_2_0 -8 -8
-thermCalVal_A_2_0 123 123
-voltCalVal_A_2_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_3_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B0_A_3_0 145
-paSet_txgainIdx_B0_A_3_1 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B0_A_3_1 134
-paSet_txgainIdx_B0_A_3_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B0_A_3_2 114
-paSet_txgainIdx_B0_A_3_3 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B0_A_3_3 104
-paSet_txgainIdx_B0_A_3_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B0_A_3_4 78
-paSet_txgainIdx_B0_A_3_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_3_5 60
-paSet_txgainIdx_B0_A_3_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_3_6 60
-paSet_txgainIdx_B0_A_3_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_3_7 60
-paSet_txgainIdx_B1_A_3_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B1_A_3_0 153
-paSet_txgainIdx_B1_A_3_1 pasetting:0x3 txgainIdx:0x6
-meas_pwr_B1_A_3_1 129
-paSet_txgainIdx_B1_A_3_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B1_A_3_2 121
-paSet_txgainIdx_B1_A_3_3 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B1_A_3_3 100
-paSet_txgainIdx_B1_A_3_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B1_A_3_4 84
-paSet_txgainIdx_B1_A_3_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_3_5 66
-paSet_txgainIdx_B1_A_3_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_3_6 66
-paSet_txgainIdx_B1_A_3_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_3_7 66
-dacGain_A_3_0 -8 -8
-thermCalVal_A_3_0 123 123
-voltCalVal_A_3_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_4_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B0_A_4_0 149
-paSet_txgainIdx_B0_A_4_1 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B0_A_4_1 139
-paSet_txgainIdx_B0_A_4_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B0_A_4_2 118
-paSet_txgainIdx_B0_A_4_3 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B0_A_4_3 98
-paSet_txgainIdx_B0_A_4_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B0_A_4_4 83
-paSet_txgainIdx_B0_A_4_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_4_5 65
-paSet_txgainIdx_B0_A_4_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_4_6 65
-paSet_txgainIdx_B0_A_4_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_4_7 65
-paSet_txgainIdx_B1_A_4_0 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B1_A_4_0 150
-paSet_txgainIdx_B1_A_4_1 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B1_A_4_1 129
-paSet_txgainIdx_B1_A_4_2 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B1_A_4_2 120
-paSet_txgainIdx_B1_A_4_3 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B1_A_4_3 108
-paSet_txgainIdx_B1_A_4_4 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_4_4 76
-paSet_txgainIdx_B1_A_4_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_4_5 76
-paSet_txgainIdx_B1_A_4_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_4_6 76
-paSet_txgainIdx_B1_A_4_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_4_7 76
-dacGain_A_4_0 -8 -8
-thermCalVal_A_4_0 123 123
-voltCalVal_A_4_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_5_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B0_A_5_0 148
-paSet_txgainIdx_B0_A_5_1 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B0_A_5_1 138
-paSet_txgainIdx_B0_A_5_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B0_A_5_2 117
-paSet_txgainIdx_B0_A_5_3 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B0_A_5_3 107
-paSet_txgainIdx_B0_A_5_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B0_A_5_4 81
-paSet_txgainIdx_B0_A_5_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_5_5 62
-paSet_txgainIdx_B0_A_5_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_5_6 62
-paSet_txgainIdx_B0_A_5_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_5_7 62
-paSet_txgainIdx_B1_A_5_0 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B1_A_5_0 154
-paSet_txgainIdx_B1_A_5_1 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B1_A_5_1 132
-paSet_txgainIdx_B1_A_5_2 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B1_A_5_2 122
-paSet_txgainIdx_B1_A_5_3 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B1_A_5_3 96
-paSet_txgainIdx_B1_A_5_4 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_5_4 78
-paSet_txgainIdx_B1_A_5_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_5_5 78
-paSet_txgainIdx_B1_A_5_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_5_6 78
-paSet_txgainIdx_B1_A_5_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_5_7 78
-dacGain_A_5_0 -8 -8
-thermCalVal_A_5_0 123 123
-voltCalVal_A_5_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_6_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B0_A_6_0 148
-paSet_txgainIdx_B0_A_6_1 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B0_A_6_1 138
-paSet_txgainIdx_B0_A_6_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B0_A_6_2 116
-paSet_txgainIdx_B0_A_6_3 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B0_A_6_3 106
-paSet_txgainIdx_B0_A_6_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B0_A_6_4 80
-paSet_txgainIdx_B0_A_6_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_6_5 62
-paSet_txgainIdx_B0_A_6_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_6_6 62
-paSet_txgainIdx_B0_A_6_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_6_7 62
-paSet_txgainIdx_B1_A_6_0 pasetting:0x3 txgainIdx:0x6
-meas_pwr_B1_A_6_0 145
-paSet_txgainIdx_B1_A_6_1 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B1_A_6_1 137
-paSet_txgainIdx_B1_A_6_2 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B1_A_6_2 116
-paSet_txgainIdx_B1_A_6_3 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B1_A_6_3 100
-paSet_txgainIdx_B1_A_6_4 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_6_4 82
-paSet_txgainIdx_B1_A_6_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_6_5 82
-paSet_txgainIdx_B1_A_6_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_6_6 82
-paSet_txgainIdx_B1_A_6_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_6_7 82
-dacGain_A_6_0 -8 -8
-thermCalVal_A_6_0 123 123
-voltCalVal_A_6_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_7_0 pasetting:0x3 txgainIdx:0x8
-meas_pwr_B0_A_7_0 150
-paSet_txgainIdx_B0_A_7_1 pasetting:0x3 txgainIdx:0x7
-meas_pwr_B0_A_7_1 139
-paSet_txgainIdx_B0_A_7_2 pasetting:0x3 txgainIdx:0x5
-meas_pwr_B0_A_7_2 118
-paSet_txgainIdx_B0_A_7_3 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B0_A_7_3 96
-paSet_txgainIdx_B0_A_7_4 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B0_A_7_4 81
-paSet_txgainIdx_B0_A_7_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_7_5 63
-paSet_txgainIdx_B0_A_7_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_7_6 63
-paSet_txgainIdx_B0_A_7_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B0_A_7_7 63
-paSet_txgainIdx_B1_A_7_0 pasetting:0x3 txgainIdx:0x6
-meas_pwr_B1_A_7_0 148
-paSet_txgainIdx_B1_A_7_1 pasetting:0x3 txgainIdx:0x4
-meas_pwr_B1_A_7_1 131
-paSet_txgainIdx_B1_A_7_2 pasetting:0x3 txgainIdx:0x3
-meas_pwr_B1_A_7_2 119
-paSet_txgainIdx_B1_A_7_3 pasetting:0x3 txgainIdx:0x2
-meas_pwr_B1_A_7_3 104
-paSet_txgainIdx_B1_A_7_4 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_7_4 86
-paSet_txgainIdx_B1_A_7_5 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_7_5 86
-paSet_txgainIdx_B1_A_7_6 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_7_6 86
-paSet_txgainIdx_B1_A_7_7 pasetting:0x3 txgainIdx:0x1
-meas_pwr_B1_A_7_7 86
-dacGain_A_7_0 -8 -8
-thermCalVal_A_7_0 123 123
-voltCalVal_A_7_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_8_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_8_0 0
-paSet_txgainIdx_B0_A_8_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_8_1 0
-paSet_txgainIdx_B0_A_8_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_8_2 0
-paSet_txgainIdx_B0_A_8_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_8_3 0
-paSet_txgainIdx_B0_A_8_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_8_4 0
-paSet_txgainIdx_B0_A_8_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_8_5 0
-paSet_txgainIdx_B0_A_8_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_8_6 0
-paSet_txgainIdx_B0_A_8_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_8_7 0
-paSet_txgainIdx_B1_A_8_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_8_0 0
-paSet_txgainIdx_B1_A_8_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_8_1 0
-paSet_txgainIdx_B1_A_8_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_8_2 0
-paSet_txgainIdx_B1_A_8_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_8_3 0
-paSet_txgainIdx_B1_A_8_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_8_4 0
-paSet_txgainIdx_B1_A_8_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_8_5 0
-paSet_txgainIdx_B1_A_8_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_8_6 0
-paSet_txgainIdx_B1_A_8_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_8_7 0
-dacGain_A_8_0 0 0
-thermCalVal_A_8_0 121 121
-voltCalVal_A_8_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_9_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_9_0 0
-paSet_txgainIdx_B0_A_9_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_9_1 0
-paSet_txgainIdx_B0_A_9_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_9_2 0
-paSet_txgainIdx_B0_A_9_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_9_3 0
-paSet_txgainIdx_B0_A_9_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_9_4 0
-paSet_txgainIdx_B0_A_9_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_9_5 0
-paSet_txgainIdx_B0_A_9_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_9_6 0
-paSet_txgainIdx_B0_A_9_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_9_7 0
-paSet_txgainIdx_B1_A_9_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_9_0 0
-paSet_txgainIdx_B1_A_9_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_9_1 0
-paSet_txgainIdx_B1_A_9_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_9_2 0
-paSet_txgainIdx_B1_A_9_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_9_3 0
-paSet_txgainIdx_B1_A_9_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_9_4 0
-paSet_txgainIdx_B1_A_9_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_9_5 0
-paSet_txgainIdx_B1_A_9_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_9_6 0
-paSet_txgainIdx_B1_A_9_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_9_7 0
-dacGain_A_9_0 0 0
-thermCalVal_A_9_0 121 121
-voltCalVal_A_9_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_10_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_10_0 0
-paSet_txgainIdx_B0_A_10_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_10_1 0
-paSet_txgainIdx_B0_A_10_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_10_2 0
-paSet_txgainIdx_B0_A_10_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_10_3 0
-paSet_txgainIdx_B0_A_10_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_10_4 0
-paSet_txgainIdx_B0_A_10_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_10_5 0
-paSet_txgainIdx_B0_A_10_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_10_6 0
-paSet_txgainIdx_B0_A_10_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_10_7 0
-paSet_txgainIdx_B1_A_10_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_10_0 0
-paSet_txgainIdx_B1_A_10_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_10_1 0
-paSet_txgainIdx_B1_A_10_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_10_2 0
-paSet_txgainIdx_B1_A_10_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_10_3 0
-paSet_txgainIdx_B1_A_10_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_10_4 0
-paSet_txgainIdx_B1_A_10_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_10_5 0
-paSet_txgainIdx_B1_A_10_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_10_6 0
-paSet_txgainIdx_B1_A_10_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_10_7 0
-dacGain_A_10_0 0 0
-thermCalVal_A_10_0 121 121
-voltCalVal_A_10_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_11_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_11_0 0
-paSet_txgainIdx_B0_A_11_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_11_1 0
-paSet_txgainIdx_B0_A_11_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_11_2 0
-paSet_txgainIdx_B0_A_11_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_11_3 0
-paSet_txgainIdx_B0_A_11_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_11_4 0
-paSet_txgainIdx_B0_A_11_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_11_5 0
-paSet_txgainIdx_B0_A_11_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_11_6 0
-paSet_txgainIdx_B0_A_11_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_11_7 0
-paSet_txgainIdx_B1_A_11_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_11_0 0
-paSet_txgainIdx_B1_A_11_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_11_1 0
-paSet_txgainIdx_B1_A_11_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_11_2 0
-paSet_txgainIdx_B1_A_11_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_11_3 0
-paSet_txgainIdx_B1_A_11_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_11_4 0
-paSet_txgainIdx_B1_A_11_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_11_5 0
-paSet_txgainIdx_B1_A_11_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_11_6 0
-paSet_txgainIdx_B1_A_11_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_11_7 0
-dacGain_A_11_0 0 0
-thermCalVal_A_11_0 121 121
-voltCalVal_A_11_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_12_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_12_0 0
-paSet_txgainIdx_B0_A_12_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_12_1 0
-paSet_txgainIdx_B0_A_12_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_12_2 0
-paSet_txgainIdx_B0_A_12_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_12_3 0
-paSet_txgainIdx_B0_A_12_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_12_4 0
-paSet_txgainIdx_B0_A_12_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_12_5 0
-paSet_txgainIdx_B0_A_12_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_12_6 0
-paSet_txgainIdx_B0_A_12_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_12_7 0
-paSet_txgainIdx_B1_A_12_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_12_0 0
-paSet_txgainIdx_B1_A_12_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_12_1 0
-paSet_txgainIdx_B1_A_12_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_12_2 0
-paSet_txgainIdx_B1_A_12_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_12_3 0
-paSet_txgainIdx_B1_A_12_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_12_4 0
-paSet_txgainIdx_B1_A_12_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_12_5 0
-paSet_txgainIdx_B1_A_12_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_12_6 0
-paSet_txgainIdx_B1_A_12_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_12_7 0
-dacGain_A_12_0 0 0
-thermCalVal_A_12_0 121 121
-voltCalVal_A_12_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_13_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_13_0 0
-paSet_txgainIdx_B0_A_13_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_13_1 0
-paSet_txgainIdx_B0_A_13_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_13_2 0
-paSet_txgainIdx_B0_A_13_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_13_3 0
-paSet_txgainIdx_B0_A_13_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_13_4 0
-paSet_txgainIdx_B0_A_13_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_13_5 0
-paSet_txgainIdx_B0_A_13_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_13_6 0
-paSet_txgainIdx_B0_A_13_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_13_7 0
-paSet_txgainIdx_B1_A_13_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_13_0 0
-paSet_txgainIdx_B1_A_13_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_13_1 0
-paSet_txgainIdx_B1_A_13_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_13_2 0
-paSet_txgainIdx_B1_A_13_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_13_3 0
-paSet_txgainIdx_B1_A_13_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_13_4 0
-paSet_txgainIdx_B1_A_13_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_13_5 0
-paSet_txgainIdx_B1_A_13_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_13_6 0
-paSet_txgainIdx_B1_A_13_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_13_7 0
-dacGain_A_13_0 0 0
-thermCalVal_A_13_0 121 121
-voltCalVal_A_13_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_14_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_14_0 0
-paSet_txgainIdx_B0_A_14_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_14_1 0
-paSet_txgainIdx_B0_A_14_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_14_2 0
-paSet_txgainIdx_B0_A_14_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_14_3 0
-paSet_txgainIdx_B0_A_14_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_14_4 0
-paSet_txgainIdx_B0_A_14_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_14_5 0
-paSet_txgainIdx_B0_A_14_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_14_6 0
-paSet_txgainIdx_B0_A_14_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_14_7 0
-paSet_txgainIdx_B1_A_14_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_14_0 0
-paSet_txgainIdx_B1_A_14_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_14_1 0
-paSet_txgainIdx_B1_A_14_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_14_2 0
-paSet_txgainIdx_B1_A_14_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_14_3 0
-paSet_txgainIdx_B1_A_14_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_14_4 0
-paSet_txgainIdx_B1_A_14_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_14_5 0
-paSet_txgainIdx_B1_A_14_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_14_6 0
-paSet_txgainIdx_B1_A_14_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_14_7 0
-dacGain_A_14_0 0 0
-thermCalVal_A_14_0 121 121
-voltCalVal_A_14_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_15_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_15_0 0
-paSet_txgainIdx_B0_A_15_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_15_1 0
-paSet_txgainIdx_B0_A_15_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_15_2 0
-paSet_txgainIdx_B0_A_15_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_15_3 0
-paSet_txgainIdx_B0_A_15_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_15_4 0
-paSet_txgainIdx_B0_A_15_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_15_5 0
-paSet_txgainIdx_B0_A_15_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_15_6 0
-paSet_txgainIdx_B0_A_15_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_15_7 0
-paSet_txgainIdx_B1_A_15_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_15_0 0
-paSet_txgainIdx_B1_A_15_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_15_1 0
-paSet_txgainIdx_B1_A_15_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_15_2 0
-paSet_txgainIdx_B1_A_15_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_15_3 0
-paSet_txgainIdx_B1_A_15_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_15_4 0
-paSet_txgainIdx_B1_A_15_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_15_5 0
-paSet_txgainIdx_B1_A_15_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_15_6 0
-paSet_txgainIdx_B1_A_15_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_15_7 0
-dacGain_A_15_0 0 0
-thermCalVal_A_15_0 121 121
-voltCalVal_A_15_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_16_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_16_0 0
-paSet_txgainIdx_B0_A_16_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_16_1 0
-paSet_txgainIdx_B0_A_16_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_16_2 0
-paSet_txgainIdx_B0_A_16_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_16_3 0
-paSet_txgainIdx_B0_A_16_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_16_4 0
-paSet_txgainIdx_B0_A_16_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_16_5 0
-paSet_txgainIdx_B0_A_16_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_16_6 0
-paSet_txgainIdx_B0_A_16_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_16_7 0
-paSet_txgainIdx_B1_A_16_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_16_0 0
-paSet_txgainIdx_B1_A_16_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_16_1 0
-paSet_txgainIdx_B1_A_16_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_16_2 0
-paSet_txgainIdx_B1_A_16_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_16_3 0
-paSet_txgainIdx_B1_A_16_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_16_4 0
-paSet_txgainIdx_B1_A_16_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_16_5 0
-paSet_txgainIdx_B1_A_16_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_16_6 0
-paSet_txgainIdx_B1_A_16_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_16_7 0
-dacGain_A_16_0 0 0
-thermCalVal_A_16_0 121 121
-voltCalVal_A_16_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_17_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_17_0 0
-paSet_txgainIdx_B0_A_17_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_17_1 0
-paSet_txgainIdx_B0_A_17_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_17_2 0
-paSet_txgainIdx_B0_A_17_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_17_3 0
-paSet_txgainIdx_B0_A_17_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_17_4 0
-paSet_txgainIdx_B0_A_17_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_17_5 0
-paSet_txgainIdx_B0_A_17_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_17_6 0
-paSet_txgainIdx_B0_A_17_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_17_7 0
-paSet_txgainIdx_B1_A_17_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_17_0 0
-paSet_txgainIdx_B1_A_17_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_17_1 0
-paSet_txgainIdx_B1_A_17_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_17_2 0
-paSet_txgainIdx_B1_A_17_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_17_3 0
-paSet_txgainIdx_B1_A_17_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_17_4 0
-paSet_txgainIdx_B1_A_17_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_17_5 0
-paSet_txgainIdx_B1_A_17_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_17_6 0
-paSet_txgainIdx_B1_A_17_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_17_7 0
-dacGain_A_17_0 0 0
-thermCalVal_A_17_0 121 121
-voltCalVal_A_17_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_18_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_18_0 0
-paSet_txgainIdx_B0_A_18_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_18_1 0
-paSet_txgainIdx_B0_A_18_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_18_2 0
-paSet_txgainIdx_B0_A_18_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_18_3 0
-paSet_txgainIdx_B0_A_18_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_18_4 0
-paSet_txgainIdx_B0_A_18_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_18_5 0
-paSet_txgainIdx_B0_A_18_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_18_6 0
-paSet_txgainIdx_B0_A_18_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_18_7 0
-paSet_txgainIdx_B1_A_18_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_18_0 0
-paSet_txgainIdx_B1_A_18_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_18_1 0
-paSet_txgainIdx_B1_A_18_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_18_2 0
-paSet_txgainIdx_B1_A_18_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_18_3 0
-paSet_txgainIdx_B1_A_18_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_18_4 0
-paSet_txgainIdx_B1_A_18_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_18_5 0
-paSet_txgainIdx_B1_A_18_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_18_6 0
-paSet_txgainIdx_B1_A_18_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_18_7 0
-dacGain_A_18_0 0 0
-thermCalVal_A_18_0 121 121
-voltCalVal_A_18_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_19_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_19_0 0
-paSet_txgainIdx_B0_A_19_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_19_1 0
-paSet_txgainIdx_B0_A_19_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_19_2 0
-paSet_txgainIdx_B0_A_19_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_19_3 0
-paSet_txgainIdx_B0_A_19_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_19_4 0
-paSet_txgainIdx_B0_A_19_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_19_5 0
-paSet_txgainIdx_B0_A_19_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_19_6 0
-paSet_txgainIdx_B0_A_19_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_19_7 0
-paSet_txgainIdx_B1_A_19_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_19_0 0
-paSet_txgainIdx_B1_A_19_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_19_1 0
-paSet_txgainIdx_B1_A_19_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_19_2 0
-paSet_txgainIdx_B1_A_19_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_19_3 0
-paSet_txgainIdx_B1_A_19_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_19_4 0
-paSet_txgainIdx_B1_A_19_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_19_5 0
-paSet_txgainIdx_B1_A_19_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_19_6 0
-paSet_txgainIdx_B1_A_19_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_19_7 0
-dacGain_A_19_0 0 0
-thermCalVal_A_19_0 121 121
-voltCalVal_A_19_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_20_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_20_0 0
-paSet_txgainIdx_B0_A_20_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_20_1 0
-paSet_txgainIdx_B0_A_20_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_20_2 0
-paSet_txgainIdx_B0_A_20_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_20_3 0
-paSet_txgainIdx_B0_A_20_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_20_4 0
-paSet_txgainIdx_B0_A_20_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_20_5 0
-paSet_txgainIdx_B0_A_20_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_20_6 0
-paSet_txgainIdx_B0_A_20_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_20_7 0
-paSet_txgainIdx_B1_A_20_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_20_0 0
-paSet_txgainIdx_B1_A_20_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_20_1 0
-paSet_txgainIdx_B1_A_20_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_20_2 0
-paSet_txgainIdx_B1_A_20_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_20_3 0
-paSet_txgainIdx_B1_A_20_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_20_4 0
-paSet_txgainIdx_B1_A_20_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_20_5 0
-paSet_txgainIdx_B1_A_20_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_20_6 0
-paSet_txgainIdx_B1_A_20_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_20_7 0
-dacGain_A_20_0 0 0
-thermCalVal_A_20_0 121 121
-voltCalVal_A_20_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_21_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_21_0 0
-paSet_txgainIdx_B0_A_21_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_21_1 0
-paSet_txgainIdx_B0_A_21_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_21_2 0
-paSet_txgainIdx_B0_A_21_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_21_3 0
-paSet_txgainIdx_B0_A_21_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_21_4 0
-paSet_txgainIdx_B0_A_21_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_21_5 0
-paSet_txgainIdx_B0_A_21_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_21_6 0
-paSet_txgainIdx_B0_A_21_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_21_7 0
-paSet_txgainIdx_B1_A_21_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_21_0 0
-paSet_txgainIdx_B1_A_21_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_21_1 0
-paSet_txgainIdx_B1_A_21_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_21_2 0
-paSet_txgainIdx_B1_A_21_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_21_3 0
-paSet_txgainIdx_B1_A_21_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_21_4 0
-paSet_txgainIdx_B1_A_21_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_21_5 0
-paSet_txgainIdx_B1_A_21_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_21_6 0
-paSet_txgainIdx_B1_A_21_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_21_7 0
-dacGain_A_21_0 0 0
-thermCalVal_A_21_0 121 121
-voltCalVal_A_21_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_22_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_22_0 0
-paSet_txgainIdx_B0_A_22_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_22_1 0
-paSet_txgainIdx_B0_A_22_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_22_2 0
-paSet_txgainIdx_B0_A_22_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_22_3 0
-paSet_txgainIdx_B0_A_22_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_22_4 0
-paSet_txgainIdx_B0_A_22_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_22_5 0
-paSet_txgainIdx_B0_A_22_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_22_6 0
-paSet_txgainIdx_B0_A_22_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_22_7 0
-paSet_txgainIdx_B1_A_22_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_22_0 0
-paSet_txgainIdx_B1_A_22_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_22_1 0
-paSet_txgainIdx_B1_A_22_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_22_2 0
-paSet_txgainIdx_B1_A_22_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_22_3 0
-paSet_txgainIdx_B1_A_22_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_22_4 0
-paSet_txgainIdx_B1_A_22_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_22_5 0
-paSet_txgainIdx_B1_A_22_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_22_6 0
-paSet_txgainIdx_B1_A_22_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_22_7 0
-dacGain_A_22_0 0 0
-thermCalVal_A_22_0 121 121
-voltCalVal_A_22_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_23_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_23_0 0
-paSet_txgainIdx_B0_A_23_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_23_1 0
-paSet_txgainIdx_B0_A_23_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_23_2 0
-paSet_txgainIdx_B0_A_23_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_23_3 0
-paSet_txgainIdx_B0_A_23_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_23_4 0
-paSet_txgainIdx_B0_A_23_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_23_5 0
-paSet_txgainIdx_B0_A_23_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_23_6 0
-paSet_txgainIdx_B0_A_23_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_23_7 0
-paSet_txgainIdx_B1_A_23_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_23_0 0
-paSet_txgainIdx_B1_A_23_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_23_1 0
-paSet_txgainIdx_B1_A_23_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_23_2 0
-paSet_txgainIdx_B1_A_23_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_23_3 0
-paSet_txgainIdx_B1_A_23_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_23_4 0
-paSet_txgainIdx_B1_A_23_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_23_5 0
-paSet_txgainIdx_B1_A_23_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_23_6 0
-paSet_txgainIdx_B1_A_23_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_23_7 0
-dacGain_A_23_0 0 0
-thermCalVal_A_23_0 121 121
-voltCalVal_A_23_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_24_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_24_0 0
-paSet_txgainIdx_B0_A_24_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_24_1 0
-paSet_txgainIdx_B0_A_24_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_24_2 0
-paSet_txgainIdx_B0_A_24_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_24_3 0
-paSet_txgainIdx_B0_A_24_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_24_4 0
-paSet_txgainIdx_B0_A_24_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_24_5 0
-paSet_txgainIdx_B0_A_24_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_24_6 0
-paSet_txgainIdx_B0_A_24_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_24_7 0
-paSet_txgainIdx_B1_A_24_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_24_0 0
-paSet_txgainIdx_B1_A_24_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_24_1 0
-paSet_txgainIdx_B1_A_24_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_24_2 0
-paSet_txgainIdx_B1_A_24_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_24_3 0
-paSet_txgainIdx_B1_A_24_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_24_4 0
-paSet_txgainIdx_B1_A_24_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_24_5 0
-paSet_txgainIdx_B1_A_24_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_24_6 0
-paSet_txgainIdx_B1_A_24_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_24_7 0
-dacGain_A_24_0 0 0
-thermCalVal_A_24_0 121 121
-voltCalVal_A_24_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_25_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_25_0 0
-paSet_txgainIdx_B0_A_25_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_25_1 0
-paSet_txgainIdx_B0_A_25_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_25_2 0
-paSet_txgainIdx_B0_A_25_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_25_3 0
-paSet_txgainIdx_B0_A_25_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_25_4 0
-paSet_txgainIdx_B0_A_25_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_25_5 0
-paSet_txgainIdx_B0_A_25_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_25_6 0
-paSet_txgainIdx_B0_A_25_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_25_7 0
-paSet_txgainIdx_B1_A_25_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_25_0 0
-paSet_txgainIdx_B1_A_25_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_25_1 0
-paSet_txgainIdx_B1_A_25_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_25_2 0
-paSet_txgainIdx_B1_A_25_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_25_3 0
-paSet_txgainIdx_B1_A_25_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_25_4 0
-paSet_txgainIdx_B1_A_25_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_25_5 0
-paSet_txgainIdx_B1_A_25_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_25_6 0
-paSet_txgainIdx_B1_A_25_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_25_7 0
-dacGain_A_25_0 0 0
-thermCalVal_A_25_0 121 121
-voltCalVal_A_25_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_26_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_26_0 0
-paSet_txgainIdx_B0_A_26_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_26_1 0
-paSet_txgainIdx_B0_A_26_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_26_2 0
-paSet_txgainIdx_B0_A_26_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_26_3 0
-paSet_txgainIdx_B0_A_26_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_26_4 0
-paSet_txgainIdx_B0_A_26_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_26_5 0
-paSet_txgainIdx_B0_A_26_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_26_6 0
-paSet_txgainIdx_B0_A_26_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_26_7 0
-paSet_txgainIdx_B1_A_26_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_26_0 0
-paSet_txgainIdx_B1_A_26_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_26_1 0
-paSet_txgainIdx_B1_A_26_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_26_2 0
-paSet_txgainIdx_B1_A_26_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_26_3 0
-paSet_txgainIdx_B1_A_26_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_26_4 0
-paSet_txgainIdx_B1_A_26_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_26_5 0
-paSet_txgainIdx_B1_A_26_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_26_6 0
-paSet_txgainIdx_B1_A_26_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_26_7 0
-dacGain_A_26_0 0 0
-thermCalVal_A_26_0 121 121
-voltCalVal_A_26_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_27_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_27_0 0
-paSet_txgainIdx_B0_A_27_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_27_1 0
-paSet_txgainIdx_B0_A_27_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_27_2 0
-paSet_txgainIdx_B0_A_27_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_27_3 0
-paSet_txgainIdx_B0_A_27_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_27_4 0
-paSet_txgainIdx_B0_A_27_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_27_5 0
-paSet_txgainIdx_B0_A_27_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_27_6 0
-paSet_txgainIdx_B0_A_27_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_27_7 0
-paSet_txgainIdx_B1_A_27_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_27_0 0
-paSet_txgainIdx_B1_A_27_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_27_1 0
-paSet_txgainIdx_B1_A_27_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_27_2 0
-paSet_txgainIdx_B1_A_27_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_27_3 0
-paSet_txgainIdx_B1_A_27_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_27_4 0
-paSet_txgainIdx_B1_A_27_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_27_5 0
-paSet_txgainIdx_B1_A_27_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_27_6 0
-paSet_txgainIdx_B1_A_27_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_27_7 0
-dacGain_A_27_0 0 0
-thermCalVal_A_27_0 121 121
-voltCalVal_A_27_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_28_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_28_0 0
-paSet_txgainIdx_B0_A_28_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_28_1 0
-paSet_txgainIdx_B0_A_28_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_28_2 0
-paSet_txgainIdx_B0_A_28_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_28_3 0
-paSet_txgainIdx_B0_A_28_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_28_4 0
-paSet_txgainIdx_B0_A_28_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_28_5 0
-paSet_txgainIdx_B0_A_28_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_28_6 0
-paSet_txgainIdx_B0_A_28_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_28_7 0
-paSet_txgainIdx_B1_A_28_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_28_0 0
-paSet_txgainIdx_B1_A_28_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_28_1 0
-paSet_txgainIdx_B1_A_28_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_28_2 0
-paSet_txgainIdx_B1_A_28_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_28_3 0
-paSet_txgainIdx_B1_A_28_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_28_4 0
-paSet_txgainIdx_B1_A_28_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_28_5 0
-paSet_txgainIdx_B1_A_28_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_28_6 0
-paSet_txgainIdx_B1_A_28_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_28_7 0
-dacGain_A_28_0 0 0
-thermCalVal_A_28_0 121 121
-voltCalVal_A_28_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_29_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_29_0 0
-paSet_txgainIdx_B0_A_29_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_29_1 0
-paSet_txgainIdx_B0_A_29_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_29_2 0
-paSet_txgainIdx_B0_A_29_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_29_3 0
-paSet_txgainIdx_B0_A_29_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_29_4 0
-paSet_txgainIdx_B0_A_29_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_29_5 0
-paSet_txgainIdx_B0_A_29_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_29_6 0
-paSet_txgainIdx_B0_A_29_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_29_7 0
-paSet_txgainIdx_B1_A_29_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_29_0 0
-paSet_txgainIdx_B1_A_29_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_29_1 0
-paSet_txgainIdx_B1_A_29_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_29_2 0
-paSet_txgainIdx_B1_A_29_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_29_3 0
-paSet_txgainIdx_B1_A_29_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_29_4 0
-paSet_txgainIdx_B1_A_29_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_29_5 0
-paSet_txgainIdx_B1_A_29_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_29_6 0
-paSet_txgainIdx_B1_A_29_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_29_7 0
-dacGain_A_29_0 0 0
-thermCalVal_A_29_0 121 121
-voltCalVal_A_29_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_30_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_30_0 0
-paSet_txgainIdx_B0_A_30_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_30_1 0
-paSet_txgainIdx_B0_A_30_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_30_2 0
-paSet_txgainIdx_B0_A_30_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_30_3 0
-paSet_txgainIdx_B0_A_30_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_30_4 0
-paSet_txgainIdx_B0_A_30_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_30_5 0
-paSet_txgainIdx_B0_A_30_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_30_6 0
-paSet_txgainIdx_B0_A_30_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_30_7 0
-paSet_txgainIdx_B1_A_30_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_30_0 0
-paSet_txgainIdx_B1_A_30_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_30_1 0
-paSet_txgainIdx_B1_A_30_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_30_2 0
-paSet_txgainIdx_B1_A_30_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_30_3 0
-paSet_txgainIdx_B1_A_30_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_30_4 0
-paSet_txgainIdx_B1_A_30_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_30_5 0
-paSet_txgainIdx_B1_A_30_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_30_6 0
-paSet_txgainIdx_B1_A_30_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_30_7 0
-dacGain_A_30_0 0 0
-thermCalVal_A_30_0 121 121
-voltCalVal_A_30_0 0
-calOlpc5GReserved 0 0 0
-paSet_txgainIdx_B0_A_31_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_31_0 0
-paSet_txgainIdx_B0_A_31_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_31_1 0
-paSet_txgainIdx_B0_A_31_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_31_2 0
-paSet_txgainIdx_B0_A_31_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_31_3 0
-paSet_txgainIdx_B0_A_31_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_31_4 0
-paSet_txgainIdx_B0_A_31_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_31_5 0
-paSet_txgainIdx_B0_A_31_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_31_6 0
-paSet_txgainIdx_B0_A_31_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B0_A_31_7 0
-paSet_txgainIdx_B1_A_31_0 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_31_0 0
-paSet_txgainIdx_B1_A_31_1 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_31_1 0
-paSet_txgainIdx_B1_A_31_2 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_31_2 0
-paSet_txgainIdx_B1_A_31_3 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_31_3 0
-paSet_txgainIdx_B1_A_31_4 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_31_4 0
-paSet_txgainIdx_B1_A_31_5 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_31_5 0
-paSet_txgainIdx_B1_A_31_6 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_31_6 0
-paSet_txgainIdx_B1_A_31_7 pasetting:0x0 txgainIdx:0x0
-meas_pwr_B1_A_31_7 0
-dacGain_A_31_0 0 0
-thermCalVal_A_31_0 121 121
-voltCalVal_A_31_0 0
-calOlpc5GReserved 0 0 0
-fullpdadc_read_B0_A_0_0 92
-fullmeas_pwr_B0_A_0_0 153
-fullpdadc_read_B0_A_0_1 68
-fullmeas_pwr_B0_A_0_1 141
-fullpdadc_read_B0_A_0_2 52
-fullmeas_pwr_B0_A_0_2 132
-fullpdadc_read_B0_A_0_3 37
-fullmeas_pwr_B0_A_0_3 120
-fullpdadc_read_B0_A_0_4 25
-fullmeas_pwr_B0_A_0_4 106
-fullpdadc_read_B0_A_0_5 0
-fullmeas_pwr_B0_A_0_5 0
-fullpdadc_read_B0_A_0_6 0
-fullmeas_pwr_B0_A_0_6 0
-fullpdadc_read_B0_A_0_7 0
-fullmeas_pwr_B0_A_0_7 0
-fullpdadc_read_B0_A_0_8 0
-fullmeas_pwr_B0_A_0_8 0
-fullpdadc_read_B0_A_0_9 0
-fullmeas_pwr_B0_A_0_9 0
-fullpdadc_read_B1_A_0_0 98
-fullmeas_pwr_B1_A_0_0 147
-fullpdadc_read_B1_A_0_1 72
-fullmeas_pwr_B1_A_0_1 137
-fullpdadc_read_B1_A_0_2 49
-fullmeas_pwr_B1_A_0_2 123
-fullpdadc_read_B1_A_0_3 38
-fullmeas_pwr_B1_A_0_3 115
-fullpdadc_read_B1_A_0_4 29
-fullmeas_pwr_B1_A_0_4 104
-fullpdadc_read_B1_A_0_5 0
-fullmeas_pwr_B1_A_0_5 0
-fullpdadc_read_B1_A_0_6 0
-fullmeas_pwr_B1_A_0_6 0
-fullpdadc_read_B1_A_0_7 0
-fullmeas_pwr_B1_A_0_7 0
-fullpdadc_read_B1_A_0_8 0
-fullmeas_pwr_B1_A_0_8 0
-fullpdadc_read_B1_A_0_9 0
-fullmeas_pwr_B1_A_0_9 0
-fullpdadc_read_B0_A_1_0 92
-fullmeas_pwr_B0_A_1_0 150
-fullpdadc_read_B0_A_1_1 66
-fullmeas_pwr_B0_A_1_1 139
-fullpdadc_read_B0_A_1_2 51
-fullmeas_pwr_B0_A_1_2 130
-fullpdadc_read_B0_A_1_3 37
-fullmeas_pwr_B0_A_1_3 119
-fullpdadc_read_B0_A_1_4 25
-fullmeas_pwr_B0_A_1_4 105
-fullpdadc_read_B0_A_1_5 0
-fullmeas_pwr_B0_A_1_5 0
-fullpdadc_read_B0_A_1_6 0
-fullmeas_pwr_B0_A_1_6 0
-fullpdadc_read_B0_A_1_7 0
-fullmeas_pwr_B0_A_1_7 0
-fullpdadc_read_B0_A_1_8 0
-fullmeas_pwr_B0_A_1_8 0
-fullpdadc_read_B0_A_1_9 0
-fullmeas_pwr_B0_A_1_9 0
-fullpdadc_read_B1_A_1_0 90
-fullmeas_pwr_B1_A_1_0 145
-fullpdadc_read_B1_A_1_1 66
-fullmeas_pwr_B1_A_1_1 134
-fullpdadc_read_B1_A_1_2 44
-fullmeas_pwr_B1_A_1_2 120
-fullpdadc_read_B1_A_1_3 34
-fullmeas_pwr_B1_A_1_3 112
-fullpdadc_read_B1_A_1_4 26
-fullmeas_pwr_B1_A_1_4 101
-fullpdadc_read_B1_A_1_5 0
-fullmeas_pwr_B1_A_1_5 0
-fullpdadc_read_B1_A_1_6 0
-fullmeas_pwr_B1_A_1_6 0
-fullpdadc_read_B1_A_1_7 0
-fullmeas_pwr_B1_A_1_7 0
-fullpdadc_read_B1_A_1_8 0
-fullmeas_pwr_B1_A_1_8 0
-fullpdadc_read_B1_A_1_9 0
-fullmeas_pwr_B1_A_1_9 0
-fullpdadc_read_B0_A_2_0 80
-fullmeas_pwr_B0_A_2_0 144
-fullpdadc_read_B0_A_2_1 62
-fullmeas_pwr_B0_A_2_1 135
-fullpdadc_read_B0_A_2_2 46
-fullmeas_pwr_B0_A_2_2 124
-fullpdadc_read_B0_A_2_3 31
-fullmeas_pwr_B0_A_2_3 111
-fullpdadc_read_B0_A_2_4 25
-fullmeas_pwr_B0_A_2_4 103
-fullpdadc_read_B0_A_2_5 0
-fullmeas_pwr_B0_A_2_5 0
-fullpdadc_read_B0_A_2_6 0
-fullmeas_pwr_B0_A_2_6 0
-fullpdadc_read_B0_A_2_7 0
-fullmeas_pwr_B0_A_2_7 0
-fullpdadc_read_B0_A_2_8 0
-fullmeas_pwr_B0_A_2_8 0
-fullpdadc_read_B0_A_2_9 0
-fullmeas_pwr_B0_A_2_9 0
-fullpdadc_read_B1_A_2_0 104
-fullmeas_pwr_B1_A_2_0 149
-fullpdadc_read_B1_A_2_1 76
-fullmeas_pwr_B1_A_2_1 138
-fullpdadc_read_B1_A_2_2 51
-fullmeas_pwr_B1_A_2_2 124
-fullpdadc_read_B1_A_2_3 40
-fullmeas_pwr_B1_A_2_3 116
-fullpdadc_read_B1_A_2_4 30
-fullmeas_pwr_B1_A_2_4 105
-fullpdadc_read_B1_A_2_5 0
-fullmeas_pwr_B1_A_2_5 0
-fullpdadc_read_B1_A_2_6 0
-fullmeas_pwr_B1_A_2_6 0
-fullpdadc_read_B1_A_2_7 0
-fullmeas_pwr_B1_A_2_7 0
-fullpdadc_read_B1_A_2_8 0
-fullmeas_pwr_B1_A_2_8 0
-fullpdadc_read_B1_A_2_9 0
-fullmeas_pwr_B1_A_2_9 0
-fullpdadc_read_B0_A_3_0 87
-fullmeas_pwr_B0_A_3_0 145
-fullpdadc_read_B0_A_3_1 64
-fullmeas_pwr_B0_A_3_1 134
-fullpdadc_read_B0_A_3_2 44
-fullmeas_pwr_B0_A_3_2 121
-fullpdadc_read_B0_A_3_3 35
-fullmeas_pwr_B0_A_3_3 114
-fullpdadc_read_B0_A_3_4 26
-fullmeas_pwr_B0_A_3_4 104
-fullpdadc_read_B0_A_3_5 0
-fullmeas_pwr_B0_A_3_5 0
-fullpdadc_read_B0_A_3_6 0
-fullmeas_pwr_B0_A_3_6 0
-fullpdadc_read_B0_A_3_7 0
-fullmeas_pwr_B0_A_3_7 0
-fullpdadc_read_B0_A_3_8 0
-fullmeas_pwr_B0_A_3_8 0
-fullpdadc_read_B0_A_3_9 0
-fullmeas_pwr_B0_A_3_9 0
-fullpdadc_read_B1_A_3_0 127
-fullmeas_pwr_B1_A_3_0 153
-fullpdadc_read_B1_A_3_1 95
-fullmeas_pwr_B1_A_3_1 143
-fullpdadc_read_B1_A_3_2 63
-fullmeas_pwr_B1_A_3_2 129
-fullpdadc_read_B1_A_3_3 37
-fullmeas_pwr_B1_A_3_3 111
-fullpdadc_read_B1_A_3_4 27
-fullmeas_pwr_B1_A_3_4 100
-fullpdadc_read_B1_A_3_5 0
-fullmeas_pwr_B1_A_3_5 0
-fullpdadc_read_B1_A_3_6 0
-fullmeas_pwr_B1_A_3_6 0
-fullpdadc_read_B1_A_3_7 0
-fullmeas_pwr_B1_A_3_7 0
-fullpdadc_read_B1_A_3_8 0
-fullmeas_pwr_B1_A_3_8 0
-fullpdadc_read_B1_A_3_9 0
-fullmeas_pwr_B1_A_3_9 0
-fullpdadc_read_B0_A_4_0 104
-fullmeas_pwr_B0_A_4_0 149
-fullpdadc_read_B0_A_4_1 76
-fullmeas_pwr_B0_A_4_1 139
-fullpdadc_read_B0_A_4_2 51
-fullmeas_pwr_B0_A_4_2 126
-fullpdadc_read_B0_A_4_3 42
-fullmeas_pwr_B0_A_4_3 118
-fullpdadc_read_B0_A_4_4 22
-fullmeas_pwr_B0_A_4_4 98
-fullpdadc_read_B0_A_4_5 0
-fullmeas_pwr_B0_A_4_5 0
-fullpdadc_read_B0_A_4_6 0
-fullmeas_pwr_B0_A_4_6 0
-fullpdadc_read_B0_A_4_7 0
-fullmeas_pwr_B0_A_4_7 0
-fullpdadc_read_B0_A_4_8 0
-fullmeas_pwr_B0_A_4_8 0
-fullpdadc_read_B0_A_4_9 0
-fullmeas_pwr_B0_A_4_9 0
-fullpdadc_read_B1_A_4_0 126
-fullmeas_pwr_B1_A_4_0 150
-fullpdadc_read_B1_A_4_1 84
-fullmeas_pwr_B1_A_4_1 137
-fullpdadc_read_B1_A_4_2 67
-fullmeas_pwr_B1_A_4_2 129
-fullpdadc_read_B1_A_4_3 50
-fullmeas_pwr_B1_A_4_3 120
-fullpdadc_read_B1_A_4_4 23
-fullmeas_pwr_B1_A_4_4 93
-fullpdadc_read_B1_A_4_5 0
-fullmeas_pwr_B1_A_4_5 0
-fullpdadc_read_B1_A_4_6 0
-fullmeas_pwr_B1_A_4_6 0
-fullpdadc_read_B1_A_4_7 0
-fullmeas_pwr_B1_A_4_7 0
-fullpdadc_read_B1_A_4_8 0
-fullmeas_pwr_B1_A_4_8 0
-fullpdadc_read_B1_A_4_9 0
-fullmeas_pwr_B1_A_4_9 0
-fullpdadc_read_B0_A_5_0 102
-fullmeas_pwr_B0_A_5_0 148
-fullpdadc_read_B0_A_5_1 75
-fullmeas_pwr_B0_A_5_1 138
-fullpdadc_read_B0_A_5_2 50
-fullmeas_pwr_B0_A_5_2 124
-fullpdadc_read_B0_A_5_3 41
-fullmeas_pwr_B0_A_5_3 117
-fullpdadc_read_B0_A_5_4 30
-fullmeas_pwr_B0_A_5_4 107
-fullpdadc_read_B0_A_5_5 0
-fullmeas_pwr_B0_A_5_5 0
-fullpdadc_read_B0_A_5_6 0
-fullmeas_pwr_B0_A_5_6 0
-fullpdadc_read_B0_A_5_7 0
-fullmeas_pwr_B0_A_5_7 0
-fullpdadc_read_B0_A_5_8 0
-fullmeas_pwr_B0_A_5_8 0
-fullpdadc_read_B0_A_5_9 0
-fullmeas_pwr_B0_A_5_9 0
-fullpdadc_read_B1_A_5_0 138
-fullmeas_pwr_B1_A_5_0 154
-fullpdadc_read_B1_A_5_1 93
-fullmeas_pwr_B1_A_5_1 141
-fullpdadc_read_B1_A_5_2 74
-fullmeas_pwr_B1_A_5_2 132
-fullpdadc_read_B1_A_5_3 39
-fullmeas_pwr_B1_A_5_3 111
-fullpdadc_read_B1_A_5_4 26
-fullmeas_pwr_B1_A_5_4 96
-fullpdadc_read_B1_A_5_5 0
-fullmeas_pwr_B1_A_5_5 0
-fullpdadc_read_B1_A_5_6 0
-fullmeas_pwr_B1_A_5_6 0
-fullpdadc_read_B1_A_5_7 0
-fullmeas_pwr_B1_A_5_7 0
-fullpdadc_read_B1_A_5_8 0
-fullmeas_pwr_B1_A_5_8 0
-fullpdadc_read_B1_A_5_9 0
-fullmeas_pwr_B1_A_5_9 0
-fullpdadc_read_B0_A_6_0 100
-fullmeas_pwr_B0_A_6_0 148
-fullpdadc_read_B0_A_6_1 74
-fullmeas_pwr_B0_A_6_1 138
-fullpdadc_read_B0_A_6_2 50
-fullmeas_pwr_B0_A_6_2 124
-fullpdadc_read_B0_A_6_3 39
-fullmeas_pwr_B0_A_6_3 116
-fullpdadc_read_B0_A_6_4 30
-fullmeas_pwr_B0_A_6_4 106
-fullpdadc_read_B0_A_6_5 0
-fullmeas_pwr_B0_A_6_5 0
-fullpdadc_read_B0_A_6_6 0
-fullmeas_pwr_B0_A_6_6 0
-fullpdadc_read_B0_A_6_7 0
-fullmeas_pwr_B0_A_6_7 0
-fullpdadc_read_B0_A_6_8 0
-fullmeas_pwr_B0_A_6_8 0
-fullpdadc_read_B0_A_6_9 0
-fullmeas_pwr_B0_A_6_9 0
-fullpdadc_read_B1_A_6_0 103
-fullmeas_pwr_B1_A_6_0 145
-fullpdadc_read_B1_A_6_1 83
-fullmeas_pwr_B1_A_6_1 137
-fullpdadc_read_B1_A_6_2 61
-fullmeas_pwr_B1_A_6_2 127
-fullpdadc_read_B1_A_6_3 44
-fullmeas_pwr_B1_A_6_3 116
-fullpdadc_read_B1_A_6_4 29
-fullmeas_pwr_B1_A_6_4 100
-fullpdadc_read_B1_A_6_5 0
-fullmeas_pwr_B1_A_6_5 0
-fullpdadc_read_B1_A_6_6 0
-fullmeas_pwr_B1_A_6_6 0
-fullpdadc_read_B1_A_6_7 0
-fullmeas_pwr_B1_A_6_7 0
-fullpdadc_read_B1_A_6_8 0
-fullmeas_pwr_B1_A_6_8 0
-fullpdadc_read_B1_A_6_9 0
-fullmeas_pwr_B1_A_6_9 0
-fullpdadc_read_B0_A_7_0 108
-fullmeas_pwr_B0_A_7_0 150
-fullpdadc_read_B0_A_7_1 78
-fullmeas_pwr_B0_A_7_1 139
-fullpdadc_read_B0_A_7_2 52
-fullmeas_pwr_B0_A_7_2 125
-fullpdadc_read_B0_A_7_3 43
-fullmeas_pwr_B0_A_7_3 118
-fullpdadc_read_B0_A_7_4 22
-fullmeas_pwr_B0_A_7_4 96
-fullpdadc_read_B0_A_7_5 0
-fullmeas_pwr_B0_A_7_5 0
-fullpdadc_read_B0_A_7_6 0
-fullmeas_pwr_B0_A_7_6 0
-fullpdadc_read_B0_A_7_7 0
-fullmeas_pwr_B0_A_7_7 0
-fullpdadc_read_B0_A_7_8 0
-fullmeas_pwr_B0_A_7_8 0
-fullpdadc_read_B0_A_7_9 0
-fullmeas_pwr_B0_A_7_9 0
-fullpdadc_read_B1_A_7_0 118
-fullmeas_pwr_B1_A_7_0 148
-fullpdadc_read_B1_A_7_1 94
-fullmeas_pwr_B1_A_7_1 141
-fullpdadc_read_B1_A_7_2 71
-fullmeas_pwr_B1_A_7_2 131
-fullpdadc_read_B1_A_7_3 34
-fullmeas_pwr_B1_A_7_3 104
-fullpdadc_read_B1_A_7_4 20
-fullmeas_pwr_B1_A_7_4 86
-fullpdadc_read_B1_A_7_5 0
-fullmeas_pwr_B1_A_7_5 0
-fullpdadc_read_B1_A_7_6 0
-fullmeas_pwr_B1_A_7_6 0
-fullpdadc_read_B1_A_7_7 0
-fullmeas_pwr_B1_A_7_7 0
-fullpdadc_read_B1_A_7_8 0
-fullmeas_pwr_B1_A_7_8 0
-fullpdadc_read_B1_A_7_9 0
-fullmeas_pwr_B1_A_7_9 0
-fullpdadc_read_B0_A_8_0 0
-fullmeas_pwr_B0_A_8_0 0
-fullpdadc_read_B0_A_8_1 0
-fullmeas_pwr_B0_A_8_1 0
-fullpdadc_read_B0_A_8_2 0
-fullmeas_pwr_B0_A_8_2 0
-fullpdadc_read_B0_A_8_3 0
-fullmeas_pwr_B0_A_8_3 0
-fullpdadc_read_B0_A_8_4 0
-fullmeas_pwr_B0_A_8_4 0
-fullpdadc_read_B0_A_8_5 0
-fullmeas_pwr_B0_A_8_5 0
-fullpdadc_read_B0_A_8_6 0
-fullmeas_pwr_B0_A_8_6 0
-fullpdadc_read_B0_A_8_7 0
-fullmeas_pwr_B0_A_8_7 0
-fullpdadc_read_B0_A_8_8 0
-fullmeas_pwr_B0_A_8_8 0
-fullpdadc_read_B0_A_8_9 0
-fullmeas_pwr_B0_A_8_9 0
-fullpdadc_read_B1_A_8_0 0
-fullmeas_pwr_B1_A_8_0 0
-fullpdadc_read_B1_A_8_1 0
-fullmeas_pwr_B1_A_8_1 0
-fullpdadc_read_B1_A_8_2 0
-fullmeas_pwr_B1_A_8_2 0
-fullpdadc_read_B1_A_8_3 0
-fullmeas_pwr_B1_A_8_3 0
-fullpdadc_read_B1_A_8_4 0
-fullmeas_pwr_B1_A_8_4 0
-fullpdadc_read_B1_A_8_5 0
-fullmeas_pwr_B1_A_8_5 0
-fullpdadc_read_B1_A_8_6 0
-fullmeas_pwr_B1_A_8_6 0
-fullpdadc_read_B1_A_8_7 0
-fullmeas_pwr_B1_A_8_7 0
-fullpdadc_read_B1_A_8_8 0
-fullmeas_pwr_B1_A_8_8 0
-fullpdadc_read_B1_A_8_9 0
-fullmeas_pwr_B1_A_8_9 0
-fullpdadc_read_B0_A_9_0 0
-fullmeas_pwr_B0_A_9_0 0
-fullpdadc_read_B0_A_9_1 0
-fullmeas_pwr_B0_A_9_1 0
-fullpdadc_read_B0_A_9_2 0
-fullmeas_pwr_B0_A_9_2 0
-fullpdadc_read_B0_A_9_3 0
-fullmeas_pwr_B0_A_9_3 0
-fullpdadc_read_B0_A_9_4 0
-fullmeas_pwr_B0_A_9_4 0
-fullpdadc_read_B0_A_9_5 0
-fullmeas_pwr_B0_A_9_5 0
-fullpdadc_read_B0_A_9_6 0
-fullmeas_pwr_B0_A_9_6 0
-fullpdadc_read_B0_A_9_7 0
-fullmeas_pwr_B0_A_9_7 0
-fullpdadc_read_B0_A_9_8 0
-fullmeas_pwr_B0_A_9_8 0
-fullpdadc_read_B0_A_9_9 0
-fullmeas_pwr_B0_A_9_9 0
-fullpdadc_read_B1_A_9_0 0
-fullmeas_pwr_B1_A_9_0 0
-fullpdadc_read_B1_A_9_1 0
-fullmeas_pwr_B1_A_9_1 0
-fullpdadc_read_B1_A_9_2 0
-fullmeas_pwr_B1_A_9_2 0
-fullpdadc_read_B1_A_9_3 0
-fullmeas_pwr_B1_A_9_3 0
-fullpdadc_read_B1_A_9_4 0
-fullmeas_pwr_B1_A_9_4 0
-fullpdadc_read_B1_A_9_5 0
-fullmeas_pwr_B1_A_9_5 0
-fullpdadc_read_B1_A_9_6 0
-fullmeas_pwr_B1_A_9_6 0
-fullpdadc_read_B1_A_9_7 0
-fullmeas_pwr_B1_A_9_7 0
-fullpdadc_read_B1_A_9_8 0
-fullmeas_pwr_B1_A_9_8 0
-fullpdadc_read_B1_A_9_9 0
-fullmeas_pwr_B1_A_9_9 0
-fullpdadc_read_B0_A_10_0 0
-fullmeas_pwr_B0_A_10_0 0
-fullpdadc_read_B0_A_10_1 0
-fullmeas_pwr_B0_A_10_1 0
-fullpdadc_read_B0_A_10_2 0
-fullmeas_pwr_B0_A_10_2 0
-fullpdadc_read_B0_A_10_3 0
-fullmeas_pwr_B0_A_10_3 0
-fullpdadc_read_B0_A_10_4 0
-fullmeas_pwr_B0_A_10_4 0
-fullpdadc_read_B0_A_10_5 0
-fullmeas_pwr_B0_A_10_5 0
-fullpdadc_read_B0_A_10_6 0
-fullmeas_pwr_B0_A_10_6 0
-fullpdadc_read_B0_A_10_7 0
-fullmeas_pwr_B0_A_10_7 0
-fullpdadc_read_B0_A_10_8 0
-fullmeas_pwr_B0_A_10_8 0
-fullpdadc_read_B0_A_10_9 0
-fullmeas_pwr_B0_A_10_9 0
-fullpdadc_read_B1_A_10_0 0
-fullmeas_pwr_B1_A_10_0 0
-fullpdadc_read_B1_A_10_1 0
-fullmeas_pwr_B1_A_10_1 0
-fullpdadc_read_B1_A_10_2 0
-fullmeas_pwr_B1_A_10_2 0
-fullpdadc_read_B1_A_10_3 0
-fullmeas_pwr_B1_A_10_3 0
-fullpdadc_read_B1_A_10_4 0
-fullmeas_pwr_B1_A_10_4 0
-fullpdadc_read_B1_A_10_5 0
-fullmeas_pwr_B1_A_10_5 0
-fullpdadc_read_B1_A_10_6 0
-fullmeas_pwr_B1_A_10_6 0
-fullpdadc_read_B1_A_10_7 0
-fullmeas_pwr_B1_A_10_7 0
-fullpdadc_read_B1_A_10_8 0
-fullmeas_pwr_B1_A_10_8 0
-fullpdadc_read_B1_A_10_9 0
-fullmeas_pwr_B1_A_10_9 0
-fullpdadc_read_B0_A_11_0 0
-fullmeas_pwr_B0_A_11_0 0
-fullpdadc_read_B0_A_11_1 0
-fullmeas_pwr_B0_A_11_1 0
-fullpdadc_read_B0_A_11_2 0
-fullmeas_pwr_B0_A_11_2 0
-fullpdadc_read_B0_A_11_3 0
-fullmeas_pwr_B0_A_11_3 0
-fullpdadc_read_B0_A_11_4 0
-fullmeas_pwr_B0_A_11_4 0
-fullpdadc_read_B0_A_11_5 0
-fullmeas_pwr_B0_A_11_5 0
-fullpdadc_read_B0_A_11_6 0
-fullmeas_pwr_B0_A_11_6 0
-fullpdadc_read_B0_A_11_7 0
-fullmeas_pwr_B0_A_11_7 0
-fullpdadc_read_B0_A_11_8 0
-fullmeas_pwr_B0_A_11_8 0
-fullpdadc_read_B0_A_11_9 0
-fullmeas_pwr_B0_A_11_9 0
-fullpdadc_read_B1_A_11_0 0
-fullmeas_pwr_B1_A_11_0 0
-fullpdadc_read_B1_A_11_1 0
-fullmeas_pwr_B1_A_11_1 0
-fullpdadc_read_B1_A_11_2 0
-fullmeas_pwr_B1_A_11_2 0
-fullpdadc_read_B1_A_11_3 0
-fullmeas_pwr_B1_A_11_3 0
-fullpdadc_read_B1_A_11_4 0
-fullmeas_pwr_B1_A_11_4 0
-fullpdadc_read_B1_A_11_5 0
-fullmeas_pwr_B1_A_11_5 0
-fullpdadc_read_B1_A_11_6 0
-fullmeas_pwr_B1_A_11_6 0
-fullpdadc_read_B1_A_11_7 0
-fullmeas_pwr_B1_A_11_7 0
-fullpdadc_read_B1_A_11_8 0
-fullmeas_pwr_B1_A_11_8 0
-fullpdadc_read_B1_A_11_9 0
-fullmeas_pwr_B1_A_11_9 0
-fullpdadc_read_B0_A_12_0 0
-fullmeas_pwr_B0_A_12_0 0
-fullpdadc_read_B0_A_12_1 0
-fullmeas_pwr_B0_A_12_1 0
-fullpdadc_read_B0_A_12_2 0
-fullmeas_pwr_B0_A_12_2 0
-fullpdadc_read_B0_A_12_3 0
-fullmeas_pwr_B0_A_12_3 0
-fullpdadc_read_B0_A_12_4 0
-fullmeas_pwr_B0_A_12_4 0
-fullpdadc_read_B0_A_12_5 0
-fullmeas_pwr_B0_A_12_5 0
-fullpdadc_read_B0_A_12_6 0
-fullmeas_pwr_B0_A_12_6 0
-fullpdadc_read_B0_A_12_7 0
-fullmeas_pwr_B0_A_12_7 0
-fullpdadc_read_B0_A_12_8 0
-fullmeas_pwr_B0_A_12_8 0
-fullpdadc_read_B0_A_12_9 0
-fullmeas_pwr_B0_A_12_9 0
-fullpdadc_read_B1_A_12_0 0
-fullmeas_pwr_B1_A_12_0 0
-fullpdadc_read_B1_A_12_1 0
-fullmeas_pwr_B1_A_12_1 0
-fullpdadc_read_B1_A_12_2 0
-fullmeas_pwr_B1_A_12_2 0
-fullpdadc_read_B1_A_12_3 0
-fullmeas_pwr_B1_A_12_3 0
-fullpdadc_read_B1_A_12_4 0
-fullmeas_pwr_B1_A_12_4 0
-fullpdadc_read_B1_A_12_5 0
-fullmeas_pwr_B1_A_12_5 0
-fullpdadc_read_B1_A_12_6 0
-fullmeas_pwr_B1_A_12_6 0
-fullpdadc_read_B1_A_12_7 0
-fullmeas_pwr_B1_A_12_7 0
-fullpdadc_read_B1_A_12_8 0
-fullmeas_pwr_B1_A_12_8 0
-fullpdadc_read_B1_A_12_9 0
-fullmeas_pwr_B1_A_12_9 0
-fullpdadc_read_B0_A_13_0 0
-fullmeas_pwr_B0_A_13_0 0
-fullpdadc_read_B0_A_13_1 0
-fullmeas_pwr_B0_A_13_1 0
-fullpdadc_read_B0_A_13_2 0
-fullmeas_pwr_B0_A_13_2 0
-fullpdadc_read_B0_A_13_3 0
-fullmeas_pwr_B0_A_13_3 0
-fullpdadc_read_B0_A_13_4 0
-fullmeas_pwr_B0_A_13_4 0
-fullpdadc_read_B0_A_13_5 0
-fullmeas_pwr_B0_A_13_5 0
-fullpdadc_read_B0_A_13_6 0
-fullmeas_pwr_B0_A_13_6 0
-fullpdadc_read_B0_A_13_7 0
-fullmeas_pwr_B0_A_13_7 0
-fullpdadc_read_B0_A_13_8 0
-fullmeas_pwr_B0_A_13_8 0
-fullpdadc_read_B0_A_13_9 0
-fullmeas_pwr_B0_A_13_9 0
-fullpdadc_read_B1_A_13_0 0
-fullmeas_pwr_B1_A_13_0 0
-fullpdadc_read_B1_A_13_1 0
-fullmeas_pwr_B1_A_13_1 0
-fullpdadc_read_B1_A_13_2 0
-fullmeas_pwr_B1_A_13_2 0
-fullpdadc_read_B1_A_13_3 0
-fullmeas_pwr_B1_A_13_3 0
-fullpdadc_read_B1_A_13_4 0
-fullmeas_pwr_B1_A_13_4 0
-fullpdadc_read_B1_A_13_5 0
-fullmeas_pwr_B1_A_13_5 0
-fullpdadc_read_B1_A_13_6 0
-fullmeas_pwr_B1_A_13_6 0
-fullpdadc_read_B1_A_13_7 0
-fullmeas_pwr_B1_A_13_7 0
-fullpdadc_read_B1_A_13_8 0
-fullmeas_pwr_B1_A_13_8 0
-fullpdadc_read_B1_A_13_9 0
-fullmeas_pwr_B1_A_13_9 0
-fullpdadc_read_B0_A_14_0 0
-fullmeas_pwr_B0_A_14_0 0
-fullpdadc_read_B0_A_14_1 0
-fullmeas_pwr_B0_A_14_1 0
-fullpdadc_read_B0_A_14_2 0
-fullmeas_pwr_B0_A_14_2 0
-fullpdadc_read_B0_A_14_3 0
-fullmeas_pwr_B0_A_14_3 0
-fullpdadc_read_B0_A_14_4 0
-fullmeas_pwr_B0_A_14_4 0
-fullpdadc_read_B0_A_14_5 0
-fullmeas_pwr_B0_A_14_5 0
-fullpdadc_read_B0_A_14_6 0
-fullmeas_pwr_B0_A_14_6 0
-fullpdadc_read_B0_A_14_7 0
-fullmeas_pwr_B0_A_14_7 0
-fullpdadc_read_B0_A_14_8 0
-fullmeas_pwr_B0_A_14_8 0
-fullpdadc_read_B0_A_14_9 0
-fullmeas_pwr_B0_A_14_9 0
-fullpdadc_read_B1_A_14_0 0
-fullmeas_pwr_B1_A_14_0 0
-fullpdadc_read_B1_A_14_1 0
-fullmeas_pwr_B1_A_14_1 0
-fullpdadc_read_B1_A_14_2 0
-fullmeas_pwr_B1_A_14_2 0
-fullpdadc_read_B1_A_14_3 0
-fullmeas_pwr_B1_A_14_3 0
-fullpdadc_read_B1_A_14_4 0
-fullmeas_pwr_B1_A_14_4 0
-fullpdadc_read_B1_A_14_5 0
-fullmeas_pwr_B1_A_14_5 0
-fullpdadc_read_B1_A_14_6 0
-fullmeas_pwr_B1_A_14_6 0
-fullpdadc_read_B1_A_14_7 0
-fullmeas_pwr_B1_A_14_7 0
-fullpdadc_read_B1_A_14_8 0
-fullmeas_pwr_B1_A_14_8 0
-fullpdadc_read_B1_A_14_9 0
-fullmeas_pwr_B1_A_14_9 0
-fullpdadc_read_B0_A_15_0 0
-fullmeas_pwr_B0_A_15_0 0
-fullpdadc_read_B0_A_15_1 0
-fullmeas_pwr_B0_A_15_1 0
-fullpdadc_read_B0_A_15_2 0
-fullmeas_pwr_B0_A_15_2 0
-fullpdadc_read_B0_A_15_3 0
-fullmeas_pwr_B0_A_15_3 0
-fullpdadc_read_B0_A_15_4 0
-fullmeas_pwr_B0_A_15_4 0
-fullpdadc_read_B0_A_15_5 0
-fullmeas_pwr_B0_A_15_5 0
-fullpdadc_read_B0_A_15_6 0
-fullmeas_pwr_B0_A_15_6 0
-fullpdadc_read_B0_A_15_7 0
-fullmeas_pwr_B0_A_15_7 0
-fullpdadc_read_B0_A_15_8 0
-fullmeas_pwr_B0_A_15_8 0
-fullpdadc_read_B0_A_15_9 0
-fullmeas_pwr_B0_A_15_9 0
-fullpdadc_read_B1_A_15_0 0
-fullmeas_pwr_B1_A_15_0 0
-fullpdadc_read_B1_A_15_1 0
-fullmeas_pwr_B1_A_15_1 0
-fullpdadc_read_B1_A_15_2 0
-fullmeas_pwr_B1_A_15_2 0
-fullpdadc_read_B1_A_15_3 0
-fullmeas_pwr_B1_A_15_3 0
-fullpdadc_read_B1_A_15_4 0
-fullmeas_pwr_B1_A_15_4 0
-fullpdadc_read_B1_A_15_5 0
-fullmeas_pwr_B1_A_15_5 0
-fullpdadc_read_B1_A_15_6 0
-fullmeas_pwr_B1_A_15_6 0
-fullpdadc_read_B1_A_15_7 0
-fullmeas_pwr_B1_A_15_7 0
-fullpdadc_read_B1_A_15_8 0
-fullmeas_pwr_B1_A_15_8 0
-fullpdadc_read_B1_A_15_9 0
-fullmeas_pwr_B1_A_15_9 0
-fullpdadc_read_B0_A_16_0 0
-fullmeas_pwr_B0_A_16_0 0
-fullpdadc_read_B0_A_16_1 0
-fullmeas_pwr_B0_A_16_1 0
-fullpdadc_read_B0_A_16_2 0
-fullmeas_pwr_B0_A_16_2 0
-fullpdadc_read_B0_A_16_3 0
-fullmeas_pwr_B0_A_16_3 0
-fullpdadc_read_B0_A_16_4 0
-fullmeas_pwr_B0_A_16_4 0
-fullpdadc_read_B0_A_16_5 0
-fullmeas_pwr_B0_A_16_5 0
-fullpdadc_read_B0_A_16_6 0
-fullmeas_pwr_B0_A_16_6 0
-fullpdadc_read_B0_A_16_7 0
-fullmeas_pwr_B0_A_16_7 0
-fullpdadc_read_B0_A_16_8 0
-fullmeas_pwr_B0_A_16_8 0
-fullpdadc_read_B0_A_16_9 0
-fullmeas_pwr_B0_A_16_9 0
-fullpdadc_read_B1_A_16_0 0
-fullmeas_pwr_B1_A_16_0 0
-fullpdadc_read_B1_A_16_1 0
-fullmeas_pwr_B1_A_16_1 0
-fullpdadc_read_B1_A_16_2 0
-fullmeas_pwr_B1_A_16_2 0
-fullpdadc_read_B1_A_16_3 0
-fullmeas_pwr_B1_A_16_3 0
-fullpdadc_read_B1_A_16_4 0
-fullmeas_pwr_B1_A_16_4 0
-fullpdadc_read_B1_A_16_5 0
-fullmeas_pwr_B1_A_16_5 0
-fullpdadc_read_B1_A_16_6 0
-fullmeas_pwr_B1_A_16_6 0
-fullpdadc_read_B1_A_16_7 0
-fullmeas_pwr_B1_A_16_7 0
-fullpdadc_read_B1_A_16_8 0
-fullmeas_pwr_B1_A_16_8 0
-fullpdadc_read_B1_A_16_9 0
-fullmeas_pwr_B1_A_16_9 0
-fullpdadc_read_B0_A_17_0 0
-fullmeas_pwr_B0_A_17_0 0
-fullpdadc_read_B0_A_17_1 0
-fullmeas_pwr_B0_A_17_1 0
-fullpdadc_read_B0_A_17_2 0
-fullmeas_pwr_B0_A_17_2 0
-fullpdadc_read_B0_A_17_3 0
-fullmeas_pwr_B0_A_17_3 0
-fullpdadc_read_B0_A_17_4 0
-fullmeas_pwr_B0_A_17_4 0
-fullpdadc_read_B0_A_17_5 0
-fullmeas_pwr_B0_A_17_5 0
-fullpdadc_read_B0_A_17_6 0
-fullmeas_pwr_B0_A_17_6 0
-fullpdadc_read_B0_A_17_7 0
-fullmeas_pwr_B0_A_17_7 0
-fullpdadc_read_B0_A_17_8 0
-fullmeas_pwr_B0_A_17_8 0
-fullpdadc_read_B0_A_17_9 0
-fullmeas_pwr_B0_A_17_9 0
-fullpdadc_read_B1_A_17_0 0
-fullmeas_pwr_B1_A_17_0 0
-fullpdadc_read_B1_A_17_1 0
-fullmeas_pwr_B1_A_17_1 0
-fullpdadc_read_B1_A_17_2 0
-fullmeas_pwr_B1_A_17_2 0
-fullpdadc_read_B1_A_17_3 0
-fullmeas_pwr_B1_A_17_3 0
-fullpdadc_read_B1_A_17_4 0
-fullmeas_pwr_B1_A_17_4 0
-fullpdadc_read_B1_A_17_5 0
-fullmeas_pwr_B1_A_17_5 0
-fullpdadc_read_B1_A_17_6 0
-fullmeas_pwr_B1_A_17_6 0
-fullpdadc_read_B1_A_17_7 0
-fullmeas_pwr_B1_A_17_7 0
-fullpdadc_read_B1_A_17_8 0
-fullmeas_pwr_B1_A_17_8 0
-fullpdadc_read_B1_A_17_9 0
-fullmeas_pwr_B1_A_17_9 0
-fullpdadc_read_B0_A_18_0 0
-fullmeas_pwr_B0_A_18_0 0
-fullpdadc_read_B0_A_18_1 0
-fullmeas_pwr_B0_A_18_1 0
-fullpdadc_read_B0_A_18_2 0
-fullmeas_pwr_B0_A_18_2 0
-fullpdadc_read_B0_A_18_3 0
-fullmeas_pwr_B0_A_18_3 0
-fullpdadc_read_B0_A_18_4 0
-fullmeas_pwr_B0_A_18_4 0
-fullpdadc_read_B0_A_18_5 0
-fullmeas_pwr_B0_A_18_5 0
-fullpdadc_read_B0_A_18_6 0
-fullmeas_pwr_B0_A_18_6 0
-fullpdadc_read_B0_A_18_7 0
-fullmeas_pwr_B0_A_18_7 0
-fullpdadc_read_B0_A_18_8 0
-fullmeas_pwr_B0_A_18_8 0
-fullpdadc_read_B0_A_18_9 0
-fullmeas_pwr_B0_A_18_9 0
-fullpdadc_read_B1_A_18_0 0
-fullmeas_pwr_B1_A_18_0 0
-fullpdadc_read_B1_A_18_1 0
-fullmeas_pwr_B1_A_18_1 0
-fullpdadc_read_B1_A_18_2 0
-fullmeas_pwr_B1_A_18_2 0
-fullpdadc_read_B1_A_18_3 0
-fullmeas_pwr_B1_A_18_3 0
-fullpdadc_read_B1_A_18_4 0
-fullmeas_pwr_B1_A_18_4 0
-fullpdadc_read_B1_A_18_5 0
-fullmeas_pwr_B1_A_18_5 0
-fullpdadc_read_B1_A_18_6 0
-fullmeas_pwr_B1_A_18_6 0
-fullpdadc_read_B1_A_18_7 0
-fullmeas_pwr_B1_A_18_7 0
-fullpdadc_read_B1_A_18_8 0
-fullmeas_pwr_B1_A_18_8 0
-fullpdadc_read_B1_A_18_9 0
-fullmeas_pwr_B1_A_18_9 0
-fullpdadc_read_B0_A_19_0 0
-fullmeas_pwr_B0_A_19_0 0
-fullpdadc_read_B0_A_19_1 0
-fullmeas_pwr_B0_A_19_1 0
-fullpdadc_read_B0_A_19_2 0
-fullmeas_pwr_B0_A_19_2 0
-fullpdadc_read_B0_A_19_3 0
-fullmeas_pwr_B0_A_19_3 0
-fullpdadc_read_B0_A_19_4 0
-fullmeas_pwr_B0_A_19_4 0
-fullpdadc_read_B0_A_19_5 0
-fullmeas_pwr_B0_A_19_5 0
-fullpdadc_read_B0_A_19_6 0
-fullmeas_pwr_B0_A_19_6 0
-fullpdadc_read_B0_A_19_7 0
-fullmeas_pwr_B0_A_19_7 0
-fullpdadc_read_B0_A_19_8 0
-fullmeas_pwr_B0_A_19_8 0
-fullpdadc_read_B0_A_19_9 0
-fullmeas_pwr_B0_A_19_9 0
-fullpdadc_read_B1_A_19_0 0
-fullmeas_pwr_B1_A_19_0 0
-fullpdadc_read_B1_A_19_1 0
-fullmeas_pwr_B1_A_19_1 0
-fullpdadc_read_B1_A_19_2 0
-fullmeas_pwr_B1_A_19_2 0
-fullpdadc_read_B1_A_19_3 0
-fullmeas_pwr_B1_A_19_3 0
-fullpdadc_read_B1_A_19_4 0
-fullmeas_pwr_B1_A_19_4 0
-fullpdadc_read_B1_A_19_5 0
-fullmeas_pwr_B1_A_19_5 0
-fullpdadc_read_B1_A_19_6 0
-fullmeas_pwr_B1_A_19_6 0
-fullpdadc_read_B1_A_19_7 0
-fullmeas_pwr_B1_A_19_7 0
-fullpdadc_read_B1_A_19_8 0
-fullmeas_pwr_B1_A_19_8 0
-fullpdadc_read_B1_A_19_9 0
-fullmeas_pwr_B1_A_19_9 0
-fullpdadc_read_B0_A_20_0 0
-fullmeas_pwr_B0_A_20_0 0
-fullpdadc_read_B0_A_20_1 0
-fullmeas_pwr_B0_A_20_1 0
-fullpdadc_read_B0_A_20_2 0
-fullmeas_pwr_B0_A_20_2 0
-fullpdadc_read_B0_A_20_3 0
-fullmeas_pwr_B0_A_20_3 0
-fullpdadc_read_B0_A_20_4 0
-fullmeas_pwr_B0_A_20_4 0
-fullpdadc_read_B0_A_20_5 0
-fullmeas_pwr_B0_A_20_5 0
-fullpdadc_read_B0_A_20_6 0
-fullmeas_pwr_B0_A_20_6 0
-fullpdadc_read_B0_A_20_7 0
-fullmeas_pwr_B0_A_20_7 0
-fullpdadc_read_B0_A_20_8 0
-fullmeas_pwr_B0_A_20_8 0
-fullpdadc_read_B0_A_20_9 0
-fullmeas_pwr_B0_A_20_9 0
-fullpdadc_read_B1_A_20_0 0
-fullmeas_pwr_B1_A_20_0 0
-fullpdadc_read_B1_A_20_1 0
-fullmeas_pwr_B1_A_20_1 0
-fullpdadc_read_B1_A_20_2 0
-fullmeas_pwr_B1_A_20_2 0
-fullpdadc_read_B1_A_20_3 0
-fullmeas_pwr_B1_A_20_3 0
-fullpdadc_read_B1_A_20_4 0
-fullmeas_pwr_B1_A_20_4 0
-fullpdadc_read_B1_A_20_5 0
-fullmeas_pwr_B1_A_20_5 0
-fullpdadc_read_B1_A_20_6 0
-fullmeas_pwr_B1_A_20_6 0
-fullpdadc_read_B1_A_20_7 0
-fullmeas_pwr_B1_A_20_7 0
-fullpdadc_read_B1_A_20_8 0
-fullmeas_pwr_B1_A_20_8 0
-fullpdadc_read_B1_A_20_9 0
-fullmeas_pwr_B1_A_20_9 0
-fullpdadc_read_B0_A_21_0 0
-fullmeas_pwr_B0_A_21_0 0
-fullpdadc_read_B0_A_21_1 0
-fullmeas_pwr_B0_A_21_1 0
-fullpdadc_read_B0_A_21_2 0
-fullmeas_pwr_B0_A_21_2 0
-fullpdadc_read_B0_A_21_3 0
-fullmeas_pwr_B0_A_21_3 0
-fullpdadc_read_B0_A_21_4 0
-fullmeas_pwr_B0_A_21_4 0
-fullpdadc_read_B0_A_21_5 0
-fullmeas_pwr_B0_A_21_5 0
-fullpdadc_read_B0_A_21_6 0
-fullmeas_pwr_B0_A_21_6 0
-fullpdadc_read_B0_A_21_7 0
-fullmeas_pwr_B0_A_21_7 0
-fullpdadc_read_B0_A_21_8 0
-fullmeas_pwr_B0_A_21_8 0
-fullpdadc_read_B0_A_21_9 0
-fullmeas_pwr_B0_A_21_9 0
-fullpdadc_read_B1_A_21_0 0
-fullmeas_pwr_B1_A_21_0 0
-fullpdadc_read_B1_A_21_1 0
-fullmeas_pwr_B1_A_21_1 0
-fullpdadc_read_B1_A_21_2 0
-fullmeas_pwr_B1_A_21_2 0
-fullpdadc_read_B1_A_21_3 0
-fullmeas_pwr_B1_A_21_3 0
-fullpdadc_read_B1_A_21_4 0
-fullmeas_pwr_B1_A_21_4 0
-fullpdadc_read_B1_A_21_5 0
-fullmeas_pwr_B1_A_21_5 0
-fullpdadc_read_B1_A_21_6 0
-fullmeas_pwr_B1_A_21_6 0
-fullpdadc_read_B1_A_21_7 0
-fullmeas_pwr_B1_A_21_7 0
-fullpdadc_read_B1_A_21_8 0
-fullmeas_pwr_B1_A_21_8 0
-fullpdadc_read_B1_A_21_9 0
-fullmeas_pwr_B1_A_21_9 0
-fullpdadc_read_B0_A_22_0 0
-fullmeas_pwr_B0_A_22_0 0
-fullpdadc_read_B0_A_22_1 0
-fullmeas_pwr_B0_A_22_1 0
-fullpdadc_read_B0_A_22_2 0
-fullmeas_pwr_B0_A_22_2 0
-fullpdadc_read_B0_A_22_3 0
-fullmeas_pwr_B0_A_22_3 0
-fullpdadc_read_B0_A_22_4 0
-fullmeas_pwr_B0_A_22_4 0
-fullpdadc_read_B0_A_22_5 0
-fullmeas_pwr_B0_A_22_5 0
-fullpdadc_read_B0_A_22_6 0
-fullmeas_pwr_B0_A_22_6 0
-fullpdadc_read_B0_A_22_7 0
-fullmeas_pwr_B0_A_22_7 0
-fullpdadc_read_B0_A_22_8 0
-fullmeas_pwr_B0_A_22_8 0
-fullpdadc_read_B0_A_22_9 0
-fullmeas_pwr_B0_A_22_9 0
-fullpdadc_read_B1_A_22_0 0
-fullmeas_pwr_B1_A_22_0 0
-fullpdadc_read_B1_A_22_1 0
-fullmeas_pwr_B1_A_22_1 0
-fullpdadc_read_B1_A_22_2 0
-fullmeas_pwr_B1_A_22_2 0
-fullpdadc_read_B1_A_22_3 0
-fullmeas_pwr_B1_A_22_3 0
-fullpdadc_read_B1_A_22_4 0
-fullmeas_pwr_B1_A_22_4 0
-fullpdadc_read_B1_A_22_5 0
-fullmeas_pwr_B1_A_22_5 0
-fullpdadc_read_B1_A_22_6 0
-fullmeas_pwr_B1_A_22_6 0
-fullpdadc_read_B1_A_22_7 0
-fullmeas_pwr_B1_A_22_7 0
-fullpdadc_read_B1_A_22_8 0
-fullmeas_pwr_B1_A_22_8 0
-fullpdadc_read_B1_A_22_9 0
-fullmeas_pwr_B1_A_22_9 0
-fullpdadc_read_B0_A_23_0 0
-fullmeas_pwr_B0_A_23_0 0
-fullpdadc_read_B0_A_23_1 0
-fullmeas_pwr_B0_A_23_1 0
-fullpdadc_read_B0_A_23_2 0
-fullmeas_pwr_B0_A_23_2 0
-fullpdadc_read_B0_A_23_3 0
-fullmeas_pwr_B0_A_23_3 0
-fullpdadc_read_B0_A_23_4 0
-fullmeas_pwr_B0_A_23_4 0
-fullpdadc_read_B0_A_23_5 0
-fullmeas_pwr_B0_A_23_5 0
-fullpdadc_read_B0_A_23_6 0
-fullmeas_pwr_B0_A_23_6 0
-fullpdadc_read_B0_A_23_7 0
-fullmeas_pwr_B0_A_23_7 0
-fullpdadc_read_B0_A_23_8 0
-fullmeas_pwr_B0_A_23_8 0
-fullpdadc_read_B0_A_23_9 0
-fullmeas_pwr_B0_A_23_9 0
-fullpdadc_read_B1_A_23_0 0
-fullmeas_pwr_B1_A_23_0 0
-fullpdadc_read_B1_A_23_1 0
-fullmeas_pwr_B1_A_23_1 0
-fullpdadc_read_B1_A_23_2 0
-fullmeas_pwr_B1_A_23_2 0
-fullpdadc_read_B1_A_23_3 0
-fullmeas_pwr_B1_A_23_3 0
-fullpdadc_read_B1_A_23_4 0
-fullmeas_pwr_B1_A_23_4 0
-fullpdadc_read_B1_A_23_5 0
-fullmeas_pwr_B1_A_23_5 0
-fullpdadc_read_B1_A_23_6 0
-fullmeas_pwr_B1_A_23_6 0
-fullpdadc_read_B1_A_23_7 0
-fullmeas_pwr_B1_A_23_7 0
-fullpdadc_read_B1_A_23_8 0
-fullmeas_pwr_B1_A_23_8 0
-fullpdadc_read_B1_A_23_9 0
-fullmeas_pwr_B1_A_23_9 0
-fullpdadc_read_B0_A_24_0 0
-fullmeas_pwr_B0_A_24_0 0
-fullpdadc_read_B0_A_24_1 0
-fullmeas_pwr_B0_A_24_1 0
-fullpdadc_read_B0_A_24_2 0
-fullmeas_pwr_B0_A_24_2 0
-fullpdadc_read_B0_A_24_3 0
-fullmeas_pwr_B0_A_24_3 0
-fullpdadc_read_B0_A_24_4 0
-fullmeas_pwr_B0_A_24_4 0
-fullpdadc_read_B0_A_24_5 0
-fullmeas_pwr_B0_A_24_5 0
-fullpdadc_read_B0_A_24_6 0
-fullmeas_pwr_B0_A_24_6 0
-fullpdadc_read_B0_A_24_7 0
-fullmeas_pwr_B0_A_24_7 0
-fullpdadc_read_B0_A_24_8 0
-fullmeas_pwr_B0_A_24_8 0
-fullpdadc_read_B0_A_24_9 0
-fullmeas_pwr_B0_A_24_9 0
-fullpdadc_read_B1_A_24_0 0
-fullmeas_pwr_B1_A_24_0 0
-fullpdadc_read_B1_A_24_1 0
-fullmeas_pwr_B1_A_24_1 0
-fullpdadc_read_B1_A_24_2 0
-fullmeas_pwr_B1_A_24_2 0
-fullpdadc_read_B1_A_24_3 0
-fullmeas_pwr_B1_A_24_3 0
-fullpdadc_read_B1_A_24_4 0
-fullmeas_pwr_B1_A_24_4 0
-fullpdadc_read_B1_A_24_5 0
-fullmeas_pwr_B1_A_24_5 0
-fullpdadc_read_B1_A_24_6 0
-fullmeas_pwr_B1_A_24_6 0
-fullpdadc_read_B1_A_24_7 0
-fullmeas_pwr_B1_A_24_7 0
-fullpdadc_read_B1_A_24_8 0
-fullmeas_pwr_B1_A_24_8 0
-fullpdadc_read_B1_A_24_9 0
-fullmeas_pwr_B1_A_24_9 0
-fullpdadc_read_B0_A_25_0 0
-fullmeas_pwr_B0_A_25_0 0
-fullpdadc_read_B0_A_25_1 0
-fullmeas_pwr_B0_A_25_1 0
-fullpdadc_read_B0_A_25_2 0
-fullmeas_pwr_B0_A_25_2 0
-fullpdadc_read_B0_A_25_3 0
-fullmeas_pwr_B0_A_25_3 0
-fullpdadc_read_B0_A_25_4 0
-fullmeas_pwr_B0_A_25_4 0
-fullpdadc_read_B0_A_25_5 0
-fullmeas_pwr_B0_A_25_5 0
-fullpdadc_read_B0_A_25_6 0
-fullmeas_pwr_B0_A_25_6 0
-fullpdadc_read_B0_A_25_7 0
-fullmeas_pwr_B0_A_25_7 0
-fullpdadc_read_B0_A_25_8 0
-fullmeas_pwr_B0_A_25_8 0
-fullpdadc_read_B0_A_25_9 0
-fullmeas_pwr_B0_A_25_9 0
-fullpdadc_read_B1_A_25_0 0
-fullmeas_pwr_B1_A_25_0 0
-fullpdadc_read_B1_A_25_1 0
-fullmeas_pwr_B1_A_25_1 0
-fullpdadc_read_B1_A_25_2 0
-fullmeas_pwr_B1_A_25_2 0
-fullpdadc_read_B1_A_25_3 0
-fullmeas_pwr_B1_A_25_3 0
-fullpdadc_read_B1_A_25_4 0
-fullmeas_pwr_B1_A_25_4 0
-fullpdadc_read_B1_A_25_5 0
-fullmeas_pwr_B1_A_25_5 0
-fullpdadc_read_B1_A_25_6 0
-fullmeas_pwr_B1_A_25_6 0
-fullpdadc_read_B1_A_25_7 0
-fullmeas_pwr_B1_A_25_7 0
-fullpdadc_read_B1_A_25_8 0
-fullmeas_pwr_B1_A_25_8 0
-fullpdadc_read_B1_A_25_9 0
-fullmeas_pwr_B1_A_25_9 0
-fullpdadc_read_B0_A_26_0 0
-fullmeas_pwr_B0_A_26_0 0
-fullpdadc_read_B0_A_26_1 0
-fullmeas_pwr_B0_A_26_1 0
-fullpdadc_read_B0_A_26_2 0
-fullmeas_pwr_B0_A_26_2 0
-fullpdadc_read_B0_A_26_3 0
-fullmeas_pwr_B0_A_26_3 0
-fullpdadc_read_B0_A_26_4 0
-fullmeas_pwr_B0_A_26_4 0
-fullpdadc_read_B0_A_26_5 0
-fullmeas_pwr_B0_A_26_5 0
-fullpdadc_read_B0_A_26_6 0
-fullmeas_pwr_B0_A_26_6 0
-fullpdadc_read_B0_A_26_7 0
-fullmeas_pwr_B0_A_26_7 0
-fullpdadc_read_B0_A_26_8 0
-fullmeas_pwr_B0_A_26_8 0
-fullpdadc_read_B0_A_26_9 0
-fullmeas_pwr_B0_A_26_9 0
-fullpdadc_read_B1_A_26_0 0
-fullmeas_pwr_B1_A_26_0 0
-fullpdadc_read_B1_A_26_1 0
-fullmeas_pwr_B1_A_26_1 0
-fullpdadc_read_B1_A_26_2 0
-fullmeas_pwr_B1_A_26_2 0
-fullpdadc_read_B1_A_26_3 0
-fullmeas_pwr_B1_A_26_3 0
-fullpdadc_read_B1_A_26_4 0
-fullmeas_pwr_B1_A_26_4 0
-fullpdadc_read_B1_A_26_5 0
-fullmeas_pwr_B1_A_26_5 0
-fullpdadc_read_B1_A_26_6 0
-fullmeas_pwr_B1_A_26_6 0
-fullpdadc_read_B1_A_26_7 0
-fullmeas_pwr_B1_A_26_7 0
-fullpdadc_read_B1_A_26_8 0
-fullmeas_pwr_B1_A_26_8 0
-fullpdadc_read_B1_A_26_9 0
-fullmeas_pwr_B1_A_26_9 0
-fullpdadc_read_B0_A_27_0 0
-fullmeas_pwr_B0_A_27_0 0
-fullpdadc_read_B0_A_27_1 0
-fullmeas_pwr_B0_A_27_1 0
-fullpdadc_read_B0_A_27_2 0
-fullmeas_pwr_B0_A_27_2 0
-fullpdadc_read_B0_A_27_3 0
-fullmeas_pwr_B0_A_27_3 0
-fullpdadc_read_B0_A_27_4 0
-fullmeas_pwr_B0_A_27_4 0
-fullpdadc_read_B0_A_27_5 0
-fullmeas_pwr_B0_A_27_5 0
-fullpdadc_read_B0_A_27_6 0
-fullmeas_pwr_B0_A_27_6 0
-fullpdadc_read_B0_A_27_7 0
-fullmeas_pwr_B0_A_27_7 0
-fullpdadc_read_B0_A_27_8 0
-fullmeas_pwr_B0_A_27_8 0
-fullpdadc_read_B0_A_27_9 0
-fullmeas_pwr_B0_A_27_9 0
-fullpdadc_read_B1_A_27_0 0
-fullmeas_pwr_B1_A_27_0 0
-fullpdadc_read_B1_A_27_1 0
-fullmeas_pwr_B1_A_27_1 0
-fullpdadc_read_B1_A_27_2 0
-fullmeas_pwr_B1_A_27_2 0
-fullpdadc_read_B1_A_27_3 0
-fullmeas_pwr_B1_A_27_3 0
-fullpdadc_read_B1_A_27_4 0
-fullmeas_pwr_B1_A_27_4 0
-fullpdadc_read_B1_A_27_5 0
-fullmeas_pwr_B1_A_27_5 0
-fullpdadc_read_B1_A_27_6 0
-fullmeas_pwr_B1_A_27_6 0
-fullpdadc_read_B1_A_27_7 0
-fullmeas_pwr_B1_A_27_7 0
-fullpdadc_read_B1_A_27_8 0
-fullmeas_pwr_B1_A_27_8 0
-fullpdadc_read_B1_A_27_9 0
-fullmeas_pwr_B1_A_27_9 0
-fullpdadc_read_B0_A_28_0 0
-fullmeas_pwr_B0_A_28_0 0
-fullpdadc_read_B0_A_28_1 0
-fullmeas_pwr_B0_A_28_1 0
-fullpdadc_read_B0_A_28_2 0
-fullmeas_pwr_B0_A_28_2 0
-fullpdadc_read_B0_A_28_3 0
-fullmeas_pwr_B0_A_28_3 0
-fullpdadc_read_B0_A_28_4 0
-fullmeas_pwr_B0_A_28_4 0
-fullpdadc_read_B0_A_28_5 0
-fullmeas_pwr_B0_A_28_5 0
-fullpdadc_read_B0_A_28_6 0
-fullmeas_pwr_B0_A_28_6 0
-fullpdadc_read_B0_A_28_7 0
-fullmeas_pwr_B0_A_28_7 0
-fullpdadc_read_B0_A_28_8 0
-fullmeas_pwr_B0_A_28_8 0
-fullpdadc_read_B0_A_28_9 0
-fullmeas_pwr_B0_A_28_9 0
-fullpdadc_read_B1_A_28_0 0
-fullmeas_pwr_B1_A_28_0 0
-fullpdadc_read_B1_A_28_1 0
-fullmeas_pwr_B1_A_28_1 0
-fullpdadc_read_B1_A_28_2 0
-fullmeas_pwr_B1_A_28_2 0
-fullpdadc_read_B1_A_28_3 0
-fullmeas_pwr_B1_A_28_3 0
-fullpdadc_read_B1_A_28_4 0
-fullmeas_pwr_B1_A_28_4 0
-fullpdadc_read_B1_A_28_5 0
-fullmeas_pwr_B1_A_28_5 0
-fullpdadc_read_B1_A_28_6 0
-fullmeas_pwr_B1_A_28_6 0
-fullpdadc_read_B1_A_28_7 0
-fullmeas_pwr_B1_A_28_7 0
-fullpdadc_read_B1_A_28_8 0
-fullmeas_pwr_B1_A_28_8 0
-fullpdadc_read_B1_A_28_9 0
-fullmeas_pwr_B1_A_28_9 0
-fullpdadc_read_B0_A_29_0 0
-fullmeas_pwr_B0_A_29_0 0
-fullpdadc_read_B0_A_29_1 0
-fullmeas_pwr_B0_A_29_1 0
-fullpdadc_read_B0_A_29_2 0
-fullmeas_pwr_B0_A_29_2 0
-fullpdadc_read_B0_A_29_3 0
-fullmeas_pwr_B0_A_29_3 0
-fullpdadc_read_B0_A_29_4 0
-fullmeas_pwr_B0_A_29_4 0
-fullpdadc_read_B0_A_29_5 0
-fullmeas_pwr_B0_A_29_5 0
-fullpdadc_read_B0_A_29_6 0
-fullmeas_pwr_B0_A_29_6 0
-fullpdadc_read_B0_A_29_7 0
-fullmeas_pwr_B0_A_29_7 0
-fullpdadc_read_B0_A_29_8 0
-fullmeas_pwr_B0_A_29_8 0
-fullpdadc_read_B0_A_29_9 0
-fullmeas_pwr_B0_A_29_9 0
-fullpdadc_read_B1_A_29_0 0
-fullmeas_pwr_B1_A_29_0 0
-fullpdadc_read_B1_A_29_1 0
-fullmeas_pwr_B1_A_29_1 0
-fullpdadc_read_B1_A_29_2 0
-fullmeas_pwr_B1_A_29_2 0
-fullpdadc_read_B1_A_29_3 0
-fullmeas_pwr_B1_A_29_3 0
-fullpdadc_read_B1_A_29_4 0
-fullmeas_pwr_B1_A_29_4 0
-fullpdadc_read_B1_A_29_5 0
-fullmeas_pwr_B1_A_29_5 0
-fullpdadc_read_B1_A_29_6 0
-fullmeas_pwr_B1_A_29_6 0
-fullpdadc_read_B1_A_29_7 0
-fullmeas_pwr_B1_A_29_7 0
-fullpdadc_read_B1_A_29_8 0
-fullmeas_pwr_B1_A_29_8 0
-fullpdadc_read_B1_A_29_9 0
-fullmeas_pwr_B1_A_29_9 0
-fullpdadc_read_B0_A_30_0 0
-fullmeas_pwr_B0_A_30_0 0
-fullpdadc_read_B0_A_30_1 0
-fullmeas_pwr_B0_A_30_1 0
-fullpdadc_read_B0_A_30_2 0
-fullmeas_pwr_B0_A_30_2 0
-fullpdadc_read_B0_A_30_3 0
-fullmeas_pwr_B0_A_30_3 0
-fullpdadc_read_B0_A_30_4 0
-fullmeas_pwr_B0_A_30_4 0
-fullpdadc_read_B0_A_30_5 0
-fullmeas_pwr_B0_A_30_5 0
-fullpdadc_read_B0_A_30_6 0
-fullmeas_pwr_B0_A_30_6 0
-fullpdadc_read_B0_A_30_7 0
-fullmeas_pwr_B0_A_30_7 0
-fullpdadc_read_B0_A_30_8 0
-fullmeas_pwr_B0_A_30_8 0
-fullpdadc_read_B0_A_30_9 0
-fullmeas_pwr_B0_A_30_9 0
-fullpdadc_read_B1_A_30_0 0
-fullmeas_pwr_B1_A_30_0 0
-fullpdadc_read_B1_A_30_1 0
-fullmeas_pwr_B1_A_30_1 0
-fullpdadc_read_B1_A_30_2 0
-fullmeas_pwr_B1_A_30_2 0
-fullpdadc_read_B1_A_30_3 0
-fullmeas_pwr_B1_A_30_3 0
-fullpdadc_read_B1_A_30_4 0
-fullmeas_pwr_B1_A_30_4 0
-fullpdadc_read_B1_A_30_5 0
-fullmeas_pwr_B1_A_30_5 0
-fullpdadc_read_B1_A_30_6 0
-fullmeas_pwr_B1_A_30_6 0
-fullpdadc_read_B1_A_30_7 0
-fullmeas_pwr_B1_A_30_7 0
-fullpdadc_read_B1_A_30_8 0
-fullmeas_pwr_B1_A_30_8 0
-fullpdadc_read_B1_A_30_9 0
-fullmeas_pwr_B1_A_30_9 0
-fullpdadc_read_B0_A_31_0 0
-fullmeas_pwr_B0_A_31_0 0
-fullpdadc_read_B0_A_31_1 0
-fullmeas_pwr_B0_A_31_1 0
-fullpdadc_read_B0_A_31_2 0
-fullmeas_pwr_B0_A_31_2 0
-fullpdadc_read_B0_A_31_3 0
-fullmeas_pwr_B0_A_31_3 0
-fullpdadc_read_B0_A_31_4 0
-fullmeas_pwr_B0_A_31_4 0
-fullpdadc_read_B0_A_31_5 0
-fullmeas_pwr_B0_A_31_5 0
-fullpdadc_read_B0_A_31_6 0
-fullmeas_pwr_B0_A_31_6 0
-fullpdadc_read_B0_A_31_7 0
-fullmeas_pwr_B0_A_31_7 0
-fullpdadc_read_B0_A_31_8 0
-fullmeas_pwr_B0_A_31_8 0
-fullpdadc_read_B0_A_31_9 0
-fullmeas_pwr_B0_A_31_9 0
-fullpdadc_read_B1_A_31_0 0
-fullmeas_pwr_B1_A_31_0 0
-fullpdadc_read_B1_A_31_1 0
-fullmeas_pwr_B1_A_31_1 0
-fullpdadc_read_B1_A_31_2 0
-fullmeas_pwr_B1_A_31_2 0
-fullpdadc_read_B1_A_31_3 0
-fullmeas_pwr_B1_A_31_3 0
-fullpdadc_read_B1_A_31_4 0
-fullmeas_pwr_B1_A_31_4 0
-fullpdadc_read_B1_A_31_5 0
-fullmeas_pwr_B1_A_31_5 0
-fullpdadc_read_B1_A_31_6 0
-fullmeas_pwr_B1_A_31_6 0
-fullpdadc_read_B1_A_31_7 0
-fullmeas_pwr_B1_A_31_7 0
-fullpdadc_read_B1_A_31_8 0
-fullmeas_pwr_B1_A_31_8 0
-fullpdadc_read_B1_A_31_9 0
-fullmeas_pwr_B1_A_31_9 0
-calOffsetFreqPier5G_A_0_0 76 88 92 104 140 160 180 189
-calOffsetPierData5G_B0_A_0_0 0 0 0 0 0 0 0 0
-calOffsetPierData5G_B1_A_0_0 0 0 0 0 0 0 0 0
-offsetThreshold5G_A_0_0 0
-calData5GFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvTpcConfigId__0_0 9
-nvTpcConfigLen__0_0 920
-nvTpcConfigFlag__0_0 0x0
-gainIdxForCal_G_0_0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
-dacGainForCal_G_0_0 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8
-paConfigForCal_G_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-calDataTgtPwr_G_0_0 12 37 56 72 96 112 128 144 160 176 192 208 224 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
-calPwrTargets_G_0_0 144 128 112 96 72 48 0 0
-calPdadcTargets_G_0_0 200 125 80 50 30 0 0 0 0 0
-pdetAttenProfile_32nddb_G_0_0 36 36 35 36 36 35 37 34 33 33 35 34 33 34 34
-pdetTiaGainProfile_8thdb_G_0_0 40
-alutOffset_G_0_0 0
-pdetRange_8thdb_G_0_0 8
-txPwrOffset_G_0_0 0
-valid_G_0_0 1
-minDacGainMargin_G_0_0 8
-unused_G_0_0 0
-gainIdxForCal_A_0_0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
-dacGainForCal_A_0_0 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8 -8
-paConfigForCal_A_0_0 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
-calDataTgtPwr_A_0_0 12 37 56 72 96 112 128 144 160 176 192 208 224 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255
-calPwrTargets_A_0_0 144 128 112 96 72 48 0 0
-calPdadcTargets_A_0_0 200 125 80 50 30 0 0 0 0 0
-pdetAttenProfile_32nddb_A_0_0 37 37 36 37 37 36 35 34 33 32 35 33 33 34 33
-pdetTiaGainProfile_8thdb_A_0_0 88
-alutOffset_A_0_0 3
-pdetRange_8thdb_A_0_0 8
-txPwrOffset_A_0_0 0
-valid_A_0_0 1
-minDacGainMargin_A_0_0 8
-unused_A_0_0 0
-powerOffset_HT20_G_0_0 0 0 0 0 0 0 0 0 0 0
-powerOffset_HT40_G_0_0 0 0 0 0 0 0 0 0 0 0
-powerOffset_VHT80_G_0_0 0 0 0 0 0 0 0 0 0 0
-powerOffset_VHT160_G_0_0 0 0 0 0 0 0 0 0 0 0
-powerOffset_HT20_A_0_0 0 0 0 0 0 0 0 0 0 0
-powerOffset_HT40_A_0_0 0 0 0 0 0 0 0 0 0 0
-powerOffset_VHT80_A_0_0 0 0 0 0 0 0 0 0 0 0
-powerOffset_VHT160_A_0_0 0 0 0 0 0 0 0 0 0 0
-powerOffsetByChan2G_chan_G_0_0 0 0 0 0
-powerOffsetByChan2G_chanOffset_0_G_0_0 0 0
-powerOffsetByChan2G_chanOffset_1_G_0_0 0 0
-powerOffsetByChan2G_chanOffset_2_G_0_0 0 0
-powerOffsetByChan2G_chanOffset_3_G_0_0 0 0
-powerOffsetByChan2G_ht20HI_G_0_0 0 0
-powerOffsetByChan2G_ht20MI_G_0_0 0 0
-powerOffsetByChan2G_ht20LO_G_0_0 0 0
-powerOffsetByChan2G_ht20pad_G_0_0 0 0
-powerOffsetByChan2G_ht40HI_G_0_0 0 0
-powerOffsetByChan2G_ht40MI_G_0_0 0 0
-powerOffsetByChan2G_ht40LO_G_0_0 0 0
-powerOffsetByChan2G_ht40pad_G_0_0 0 0
-powerOffsetByChan2G_thr_G_0_0 0x0
-powerOffsetByChan2G_pad_G_0_0 0x0 0x0 0x0
-powerOffsetByChan5G_chan_A_0_0 0 0 0 0 0 0 0 0
-powerOffsetByChan5G_chanOffset_0_A_0_0 0 0
-powerOffsetByChan5G_chanOffset_1_A_0_0 0 0
-powerOffsetByChan5G_chanOffset_2_A_0_0 0 0
-powerOffsetByChan5G_chanOffset_3_A_0_0 0 0
-powerOffsetByChan5G_chanOffset_4_A_0_0 0 0
-powerOffsetByChan5G_chanOffset_5_A_0_0 0 0
-powerOffsetByChan5G_chanOffset_6_A_0_0 0 0
-powerOffsetByChan5G_chanOffset_7_A_0_0 0 0
-powerOffsetByChan5G_ht20HI_A_0_0 0 0
-powerOffsetByChan5G_ht20MI_A_0_0 0 0
-powerOffsetByChan5G_ht20LO_A_0_0 0 0
-powerOffsetByChan5G_ht20pad_A_0_0 0 0
-powerOffsetByChan5G_ht40HI_A_0_0 0 0
-powerOffsetByChan5G_ht40MI_A_0_0 0 0
-powerOffsetByChan5G_ht40LO_A_0_0 0 0
-powerOffsetByChan5G_ht40pad_A_0_0 0 0
-powerOffsetByChan5G_ht80HI_A_0_0 0 0
-powerOffsetByChan5G_ht80MI_A_0_0 0 0
-powerOffsetByChan5G_ht80LO_A_0_0 0 0
-powerOffsetByChan5G_ht80pad_A_0_0 0 0
-powerOffsetByChan5G_thr_A_0_0 0x0
-powerOffsetByChan5G_pad_A_0_0 0x0 0x0 0x0
-clpcPowerOffsetPad 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 36 36 35 36 36 35 37 34 33 33 35 34 33 34 33 36 36 35 36 36 35 37 34 33 33 35 34 33 34 33 0 0 36 36 35 36 36 35 37 34 33 33 35 34 33 34 33 36 36 35 36 36 35 37 34 33 33 35 34 33 34 33 0 0 37 37 36 37 37 36 35 34 33 32 35 33 33 34 33 37 37 36 37 37 36 35 34 33 32 35 33 33 34 33 0 0 37 37 36 37 37 36 35 34 33 32 35 33 33 34 33 37 37 36 37 37 36 35 34 33 32 35 33 33 34 33 0 0
-clpc_power_offset_cck_G_0_0 0
-clpc_power_offset_ofdm20_G_0_0 0
-clpc_power_offset_ofdm20_hc_G_0_0 0
-clpc_power_offset_ofdm40_G_0_0 0
-clpc_power_offset_ofdm40_hc_G_0_0 0
-clpc_power_offset_ofdm80_G_0_0 0
-clpc_power_offset_ofdm80_hc_G_0_0 0
-reserved_G_0_0 0
-clpc_power_offset_cck_A_0_0 0
-clpc_power_offset_ofdm20_A_0_0 0
-clpc_power_offset_ofdm20_hc_A_0_0 0
-clpc_power_offset_ofdm40_A_0_0 0
-clpc_power_offset_ofdm40_hc_A_0_0 0
-clpc_power_offset_ofdm80_A_0_0 0
-clpc_power_offset_ofdm80_hc_A_0_0 0
-reserved_A_0_0 0
-clpc_power_offset_ofdm40_lte_coex_G_0_0 0 0 0 0 0 0 0 0 0
-clpc_power_offset_lte_coex_reserved_G_0_0 0 0 0
-TPCPowerMeasurementDelay__0_0 0
-tempThreshold__0_0 0 0
-tempPowerOffset2G_G_0_0 0 0
-tempPowerOffset5G_A_0_0 0 0
-alutTargetLoOffset__0_0 0
-alutTargetHiOffset__0_0 0
-clpcPowerOffsetCckChan_G_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0
-tpcPad__0_0 0
-ch1gainIdxForCal_G_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ch1paConfigForCal_G_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ch1calDataTgtPwr_G_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ch1gainIdxForCal_A_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ch1paConfigForCal_A_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ch1calDataTgtPwr_A_0_0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-gainIdxForCalBitmapGrp1_G_0_0 0x0
-glutPwrsMapBitMapGrp1_G_0_0 0x0
-gainIdxForCalBitmapGrp1_A_0_0 0x0
-glutPwrsMapBitMapGrp1_A_0_0 0x0
-gainIdxForCalBitmapGrp2_G_0_0 0x0
-glutPwrsMapBitMapGrp2_G_0_0 0x0
-gainIdxForCalBitmapGrp2_A_0_0 0x0
-glutPwrsMapBitMapGrp2_A_0_0 0x0
-gainIdxForCalBitmapGrp3_G_0_0 0x0
-glutPwrsMapBitMapGrp3_G_0_0 0x0
-gainIdxForCalBitmapGrp3_A_0_0 0x0
-glutPwrsMapBitMapGrp3_A_0_0 0x0
-gainIdxForCalBitmapGrp4_G_0_0 0x0
-glutPwrsMapBitMapGrp4_G_0_0 0x0
-gainIdxForCalBitmapGrp4_A_0_0 0x0
-glutPwrsMapBitMapGrp4_A_0_0 0x0
-calOffsetPower__0_0 30
-maxCalTgtPwr2G_G_0_0 0
-maxCalTgtPwr5G_A_0_0 0
-dupGlut2G_G_0_0 0x0 0x0 0x0 0x0
-dupGlut5G_A_0_0 0x0 0x0 0x0 0x0
-numGlutEntries2G_G_0_0 0
-numGlutEntries5G_A_0_0 0
-WriteOnePointCalToOTPFlags_A_0_0 0
-alutFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvTpcCompId__0_0 10
-nvTpcCompLen__0_0 928
-nvTpcCompFlag__0_0 0x0
-tempCompChans2G_B0_G_0_0 112 137 157 172
-tempCompChans2G_B1_G_0_0 112 137 157 172
-alphaThermTbl2G_B0_G_0_0 0x25 0x25 0x25 0x25
-alphaThermTbl2G_B0_G_1_0 0x25 0x25 0x25 0x25
-alphaThermTbl2G_B0_G_2_0 0x25 0x25 0x25 0x25
-alphaThermTbl2G_B0_G_3_0 0x25 0x25 0x25 0x25
-alphaThermTbl2G_B1_G_0_0 0x25 0x25 0x25 0x25
-alphaThermTbl2G_B1_G_1_0 0x25 0x25 0x25 0x25
-alphaThermTbl2G_B1_G_2_0 0x25 0x25 0x25 0x25
-alphaThermTbl2G_B1_G_3_0 0x25 0x25 0x25 0x25
-pdetTempComp2G 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-tempCompChans5G_B0_A_0_0 76 88 92 104 140 160 180 201
-tempCompChans5G_B1_A_0_0 76 88 92 104 140 160 180 201
-alphaThermTbl5G_B0_A_0_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B0_A_1_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B0_A_2_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B0_A_3_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B0_A_4_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B0_A_5_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B0_A_6_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B0_A_7_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B1_A_0_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B1_A_1_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B1_A_2_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B1_A_3_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B1_A_4_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B1_A_5_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B1_A_6_0 0x27 0x26 0x25 0x24
-alphaThermTbl5G_B1_A_7_0 0x27 0x26 0x25 0x24
-pdetTempComp5G 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-secondChannelGLUTOffset_0_A_0_0 0 0 0 0 0 0
-secondChannelGLUTOffset_1_A_0_0 0 0 0 0 0 0
-secondChannelGLUTOffset_2_A_0_0 0 0 0 0 0 0
-secondChannelGLUTOffset_3_A_0_0 0 0 0 0 0 0
-secondChannelGLUTOffset_4_A_0_0 0 0 0 0 0 0
-secondChannelGLUTOffset_5_A_0_0 0 0 0 0 0 0
-nvTargetPwrId__0_0 11
-nvTargetPwrLen__0_0 1028
-nvTargetPwrFlag__0_0 0x0
-targetPowerR2PTable_11bg_1_14_0_0 36 36 36 36 33 33 33 33 33 32 31 31
-targetPowerR2PTable_HT20_1_14_0_0 33 33 33 33 33 31 31 30 33 33 33 33 33 31 31 30
-targetPowerR2PTable_HT40_1_14_0_0 32 32 32 32 32 30 30 29 32 32 32 32 32 30 30 29
-targetPowerR2PTable_VHT20_1_14_0_0 33 33 33 33 33 31 31 30 27 27 33 33 33 33 33 31 31 30 27 27
-targetPowerR2PTable_VHT40_1_14_0_0 32 32 32 32 32 30 30 29 26 25 32 32 32 32 32 30 30 29 26 25
-targetPowerR2PTable_VHT80_1_14_0_0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
-targetPowerR2PTable_VHT160_1_14_0_0 20 20 20 20 20 20 20 20 20 20
-targetPowerR2PTable_DupExt_1_14_0_0 32 32 32 32 32
-targetPowerTempThresh_G_0_0 0 0
-targetPowerTempOffset_G_0_0 0 0
-targetPowerEnablePerChainLimit_G_0_0 0x0
-targetPowerPerChainLimit_G_0_0 0 0
-targetPower2GFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-targetPowerR2PTable_11bg_36_64_0_0 34 34 34 34 34 34 34 34 34 33 32 32
-targetPowerR2PTable_HT20_36_64_0_0 34 34 34 34 34 34 32 30 34 34 34 34 34 34 32 30
-targetPowerR2PTable_HT40_36_64_0_0 34 34 34 34 34 34 32 30 34 34 34 34 34 34 32 30
-targetPowerR2PTable_VHT20_36_64_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT40_36_64_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT80_36_64_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT160_36_64_0_0 20 20 20 20 20 20 20 20 20 20
-targetPowerR2PTable_DupExt_36_64_0_0 34 34 34 34 34
-targetPowerR2PTable_11bg_100_144_0_0 34 34 34 34 34 34 34 34 34 33 32 32
-targetPowerR2PTable_HT20_100_144_0_0 34 34 34 34 34 34 32 30 34 34 34 34 34 34 32 30
-targetPowerR2PTable_HT40_100_144_0_0 34 34 34 34 34 34 32 30 34 34 34 34 34 34 32 30
-targetPowerR2PTable_VHT20_100_144_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT40_100_144_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT80_100_144_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT160_100_144_0_0 20 20 20 20 20 20 20 20 20 20
-targetPowerR2PTable_DupExt_100_144_0_0 34 34 34 34 34
-targetPowerR2PTable_11bg_149_183_0_0 34 34 34 34 34 34 34 34 34 33 32 32
-targetPowerR2PTable_HT20_149_183_0_0 34 34 34 34 34 34 32 30 34 34 34 34 34 34 32 30
-targetPowerR2PTable_HT40_149_183_0_0 34 34 34 34 34 34 32 30 34 34 34 34 34 34 32 30
-targetPowerR2PTable_VHT20_149_183_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT40_149_183_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT80_149_183_0_0 34 34 34 34 34 34 32 30 28 28 34 34 34 34 34 34 32 30 28 28
-targetPowerR2PTable_VHT160_149_183_0_0 20 20 20 20 20 20 20 20 20 20
-targetPowerR2PTable_DupExt_149_183_0_0 34 34 34 34 34
-targetPowerTempThresh_A_0_0 0 0
-targetPowerTempOffset_A_0_0 0 0
-targetPowerEnablePerChainLimit_A_0_0 0x0
-targetPowerPerChainLimit_A_0_0 0 0
-clpcACKPowerOffsetCckG__0_0 0
-clpcACKPowerOffsetOfdmG__0_0 0
-clpcACKPowerOffsetOfdmA__0_0 0
-futureSelfGenA__0_0 0 0 0 0 0
-targetPower5GFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvCtlId__0_0 12
-nvCtlLen__0_0 3432
-nvCtlFlag__0_0 0x0
-ctlIndex2G_11b_mode_0_G_0_0 1
-ctlIndex2G_11b_bf_reg_0_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_11b_numChMask_0_G_0_0 0x2
-ctlIndex2G_11b_numSSMask_0_G_0_0 0x1
-ctlIndex2G_11b_mode_1_G_0_0 1
-ctlIndex2G_11b_bf_reg_1_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_11b_numChMask_1_G_0_0 0x1
-ctlIndex2G_11b_numSSMask_1_G_0_0 0x1
-ctlIndex2G_11b_mode_2_G_0_0 1
-ctlIndex2G_11b_bf_reg_2_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_11b_numChMask_2_G_0_0 0x2
-ctlIndex2G_11b_numSSMask_2_G_0_0 0x1
-ctlIndex2G_11b_mode_3_G_0_0 1
-ctlIndex2G_11b_bf_reg_3_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_11b_numChMask_3_G_0_0 0x1
-ctlIndex2G_11b_numSSMask_3_G_0_0 0x1
-ctlIndex2G_11b_mode_4_G_0_0 1
-ctlIndex2G_11b_bf_reg_4_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_11b_numChMask_4_G_0_0 0x2
-ctlIndex2G_11b_numSSMask_4_G_0_0 0x1
-ctlIndex2G_11b_mode_5_G_0_0 1
-ctlIndex2G_11b_bf_reg_5_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_11b_numChMask_5_G_0_0 0x1
-ctlIndex2G_11b_numSSMask_5_G_0_0 0x1
-ctlFreqbin2G_11b_G_0_0 112 117 122 127 132 137 142 147 152 157 162 167 172 184
-ctl2G11bReserved_G_0_0 0 0
-ctlData2G_11b_0_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_11b_1_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_11b_2_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_11b_3_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_11b_4_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_11b_5_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlIndex2G_HT20_mode_0_G_0_0 2
-ctlIndex2G_HT20_bf_reg_0_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT20_numChMask_0_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_0_G_0_0 0x1
-ctlIndex2G_HT20_mode_1_G_0_0 2
-ctlIndex2G_HT20_bf_reg_1_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT20_numChMask_1_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_1_G_0_0 0x2
-ctlIndex2G_HT20_mode_2_G_0_0 2
-ctlIndex2G_HT20_bf_reg_2_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT20_numChMask_2_G_0_0 0x1
-ctlIndex2G_HT20_numSSMask_2_G_0_0 0x1
-ctlIndex2G_HT20_mode_3_G_0_0 2
-ctlIndex2G_HT20_bf_reg_3_G_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT20_numChMask_3_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_3_G_0_0 0x1
-ctlIndex2G_HT20_mode_4_G_0_0 0
-ctlIndex2G_HT20_bf_reg_4_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT20_numChMask_4_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_4_G_0_0 0x1
-ctlIndex2G_HT20_mode_5_G_0_0 0
-ctlIndex2G_HT20_bf_reg_5_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT20_numChMask_5_G_0_0 0x1
-ctlIndex2G_HT20_numSSMask_5_G_0_0 0x1
-ctlIndex2G_HT20_mode_6_G_0_0 0
-ctlIndex2G_HT20_bf_reg_6_G_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT20_numChMask_6_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_6_G_0_0 0x1
-ctlIndex2G_HT20_mode_7_G_0_0 2
-ctlIndex2G_HT20_bf_reg_7_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT20_numChMask_7_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_7_G_0_0 0x1
-ctlIndex2G_HT20_mode_8_G_0_0 2
-ctlIndex2G_HT20_bf_reg_8_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT20_numChMask_8_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_8_G_0_0 0x2
-ctlIndex2G_HT20_mode_9_G_0_0 2
-ctlIndex2G_HT20_bf_reg_9_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT20_numChMask_9_G_0_0 0x1
-ctlIndex2G_HT20_numSSMask_9_G_0_0 0x1
-ctlIndex2G_HT20_mode_10_G_0_0 2
-ctlIndex2G_HT20_bf_reg_10_G_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT20_numChMask_10_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_10_G_0_0 0x1
-ctlIndex2G_HT20_mode_11_G_0_0 0
-ctlIndex2G_HT20_bf_reg_11_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT20_numChMask_11_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_11_G_0_0 0x1
-ctlIndex2G_HT20_mode_12_G_0_0 0
-ctlIndex2G_HT20_bf_reg_12_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT20_numChMask_12_G_0_0 0x1
-ctlIndex2G_HT20_numSSMask_12_G_0_0 0x1
-ctlIndex2G_HT20_mode_13_G_0_0 0
-ctlIndex2G_HT20_bf_reg_13_G_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT20_numChMask_13_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_13_G_0_0 0x1
-ctlIndex2G_HT20_mode_14_G_0_0 2
-ctlIndex2G_HT20_bf_reg_14_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT20_numChMask_14_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_14_G_0_0 0x1
-ctlIndex2G_HT20_mode_15_G_0_0 2
-ctlIndex2G_HT20_bf_reg_15_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT20_numChMask_15_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_15_G_0_0 0x2
-ctlIndex2G_HT20_mode_16_G_0_0 2
-ctlIndex2G_HT20_bf_reg_16_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT20_numChMask_16_G_0_0 0x1
-ctlIndex2G_HT20_numSSMask_16_G_0_0 0x1
-ctlIndex2G_HT20_mode_17_G_0_0 2
-ctlIndex2G_HT20_bf_reg_17_G_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT20_numChMask_17_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_17_G_0_0 0x1
-ctlIndex2G_HT20_mode_18_G_0_0 0
-ctlIndex2G_HT20_bf_reg_18_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT20_numChMask_18_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_18_G_0_0 0x1
-ctlIndex2G_HT20_mode_19_G_0_0 0
-ctlIndex2G_HT20_bf_reg_19_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT20_numChMask_19_G_0_0 0x1
-ctlIndex2G_HT20_numSSMask_19_G_0_0 0x1
-ctlIndex2G_HT20_mode_20_G_0_0 0
-ctlIndex2G_HT20_bf_reg_20_G_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT20_numChMask_20_G_0_0 0x2
-ctlIndex2G_HT20_numSSMask_20_G_0_0 0x1
-ctlFreqbin2G_HT20_G_0_0 112 117 122 127 132 137 142 147 152 157 162 167 172 184
-ctlData2G_HT20_0_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_1_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_2_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_3_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_4_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_5_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_6_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_7_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_8_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_9_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_10_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_11_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_12_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_13_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_14_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_15_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_16_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_17_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_18_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_19_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT20_20_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlPad2 0 0
-ctlIndex2G_HT40_mode_0_G_0_0 3
-ctlIndex2G_HT40_bf_reg_0_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT40_numChMask_0_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_0_G_0_0 0x1
-ctlIndex2G_HT40_mode_1_G_0_0 3
-ctlIndex2G_HT40_bf_reg_1_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT40_numChMask_1_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_1_G_0_0 0x2
-ctlIndex2G_HT40_mode_2_G_0_0 3
-ctlIndex2G_HT40_bf_reg_2_G_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT40_numChMask_2_G_0_0 0x1
-ctlIndex2G_HT40_numSSMask_2_G_0_0 0x1
-ctlIndex2G_HT40_mode_3_G_0_0 3
-ctlIndex2G_HT40_bf_reg_3_G_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex2G_HT40_numChMask_3_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_3_G_0_0 0x1
-ctlIndex2G_HT40_mode_4_G_0_0 3
-ctlIndex2G_HT40_bf_reg_4_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT40_numChMask_4_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_4_G_0_0 0x1
-ctlIndex2G_HT40_mode_5_G_0_0 3
-ctlIndex2G_HT40_bf_reg_5_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT40_numChMask_5_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_5_G_0_0 0x2
-ctlIndex2G_HT40_mode_6_G_0_0 3
-ctlIndex2G_HT40_bf_reg_6_G_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT40_numChMask_6_G_0_0 0x1
-ctlIndex2G_HT40_numSSMask_6_G_0_0 0x1
-ctlIndex2G_HT40_mode_7_G_0_0 3
-ctlIndex2G_HT40_bf_reg_7_G_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex2G_HT40_numChMask_7_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_7_G_0_0 0x1
-ctlIndex2G_HT40_mode_8_G_0_0 3
-ctlIndex2G_HT40_bf_reg_8_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT40_numChMask_8_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_8_G_0_0 0x1
-ctlIndex2G_HT40_mode_9_G_0_0 3
-ctlIndex2G_HT40_bf_reg_9_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT40_numChMask_9_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_9_G_0_0 0x2
-ctlIndex2G_HT40_mode_10_G_0_0 3
-ctlIndex2G_HT40_bf_reg_10_G_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT40_numChMask_10_G_0_0 0x1
-ctlIndex2G_HT40_numSSMask_10_G_0_0 0x1
-ctlIndex2G_HT40_mode_11_G_0_0 3
-ctlIndex2G_HT40_bf_reg_11_G_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex2G_HT40_numChMask_11_G_0_0 0x2
-ctlIndex2G_HT40_numSSMask_11_G_0_0 0x1
-ctlFreqbin2G_HT40_G_0_0 122 127 132 137 142 147 152 157 162
-ctl2GHT40Reserved_G_0_0 0 0 0
-ctlData2G_HT40_0_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_1_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_2_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_3_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_4_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_5_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_6_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_7_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_8_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_9_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_10_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlData2G_HT40_11_G_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0xbc
-ctlSpare2G 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-ctlIndex5G_11a_mode_0_A_0_0 0
-ctlIndex5G_11a_bf_reg_0_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_11a_numChMask_0_A_0_0 0x2
-ctlIndex5G_11a_numSSMask_0_A_0_0 0x1
-ctlIndex5G_11a_mode_1_A_0_0 0
-ctlIndex5G_11a_bf_reg_1_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_11a_numChMask_1_A_0_0 0x1
-ctlIndex5G_11a_numSSMask_1_A_0_0 0x1
-ctlIndex5G_11a_mode_2_A_0_0 0
-ctlIndex5G_11a_bf_reg_2_A_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex5G_11a_numChMask_2_A_0_0 0x2
-ctlIndex5G_11a_numSSMask_2_A_0_0 0x1
-ctlIndex5G_11a_mode_3_A_0_0 0
-ctlIndex5G_11a_bf_reg_3_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_11a_numChMask_3_A_0_0 0x2
-ctlIndex5G_11a_numSSMask_3_A_0_0 0x1
-ctlIndex5G_11a_mode_4_A_0_0 0
-ctlIndex5G_11a_bf_reg_4_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_11a_numChMask_4_A_0_0 0x1
-ctlIndex5G_11a_numSSMask_4_A_0_0 0x1
-ctlIndex5G_11a_mode_5_A_0_0 0
-ctlIndex5G_11a_bf_reg_5_A_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex5G_11a_numChMask_5_A_0_0 0x2
-ctlIndex5G_11a_numSSMask_5_A_0_0 0x1
-ctlIndex5G_11a_mode_6_A_0_0 0
-ctlIndex5G_11a_bf_reg_6_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_11a_numChMask_6_A_0_0 0x2
-ctlIndex5G_11a_numSSMask_6_A_0_0 0x1
-ctlIndex5G_11a_mode_7_A_0_0 0
-ctlIndex5G_11a_bf_reg_7_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_11a_numChMask_7_A_0_0 0x1
-ctlIndex5G_11a_numSSMask_7_A_0_0 0x1
-ctlIndex5G_11a_mode_8_A_0_0 0
-ctlIndex5G_11a_bf_reg_8_A_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex5G_11a_numChMask_8_A_0_0 0x2
-ctlIndex5G_11a_numSSMask_8_A_0_0 0x1
-ctlFreqbin5G_11a_A_0_0 76 80 84 88 92 96 100 104 140 144 148 152 156 160 164 168 172 176 180 184 189 193 197 201 205 255 255 255 255
-ctl5G11aReserved_A_0_0 0
-ctlData5G_11a_0_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_11a_1_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_11a_2_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_11a_3_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_11a_4_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_11a_5_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_11a_6_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_11a_7_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_11a_8_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlPad4 0 0 0
-ctlIndex5G_HT20_mode_0_A_0_0 2
-ctlIndex5G_HT20_bf_reg_0_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_HT20_numChMask_0_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_0_A_0_0 0x1
-ctlIndex5G_HT20_mode_1_A_0_0 2
-ctlIndex5G_HT20_bf_reg_1_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_HT20_numChMask_1_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_1_A_0_0 0x2
-ctlIndex5G_HT20_mode_2_A_0_0 2
-ctlIndex5G_HT20_bf_reg_2_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_HT20_numChMask_2_A_0_0 0x1
-ctlIndex5G_HT20_numSSMask_2_A_0_0 0x1
-ctlIndex5G_HT20_mode_3_A_0_0 2
-ctlIndex5G_HT20_bf_reg_3_A_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex5G_HT20_numChMask_3_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_3_A_0_0 0x1
-ctlIndex5G_HT20_mode_4_A_0_0 2
-ctlIndex5G_HT20_bf_reg_4_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_HT20_numChMask_4_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_4_A_0_0 0x1
-ctlIndex5G_HT20_mode_5_A_0_0 2
-ctlIndex5G_HT20_bf_reg_5_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_HT20_numChMask_5_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_5_A_0_0 0x2
-ctlIndex5G_HT20_mode_6_A_0_0 2
-ctlIndex5G_HT20_bf_reg_6_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_HT20_numChMask_6_A_0_0 0x1
-ctlIndex5G_HT20_numSSMask_6_A_0_0 0x1
-ctlIndex5G_HT20_mode_7_A_0_0 2
-ctlIndex5G_HT20_bf_reg_7_A_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex5G_HT20_numChMask_7_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_7_A_0_0 0x1
-ctlIndex5G_HT20_mode_8_A_0_0 2
-ctlIndex5G_HT20_bf_reg_8_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_HT20_numChMask_8_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_8_A_0_0 0x1
-ctlIndex5G_HT20_mode_9_A_0_0 2
-ctlIndex5G_HT20_bf_reg_9_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_HT20_numChMask_9_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_9_A_0_0 0x2
-ctlIndex5G_HT20_mode_10_A_0_0 2
-ctlIndex5G_HT20_bf_reg_10_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_HT20_numChMask_10_A_0_0 0x1
-ctlIndex5G_HT20_numSSMask_10_A_0_0 0x1
-ctlIndex5G_HT20_mode_11_A_0_0 2
-ctlIndex5G_HT20_bf_reg_11_A_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex5G_HT20_numChMask_11_A_0_0 0x2
-ctlIndex5G_HT20_numSSMask_11_A_0_0 0x1
-ctlFreqbin5G_HT20_A_0_0 76 80 84 88 92 96 100 104 140 144 148 152 156 160 164 168 172 176 180 184 189 193 197 201 205 255 255 255 255
-ctl5GHT20Reserved_A_0_0 0 0 0
-ctlData5G_HT20_0_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_1_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_2_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_3_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_4_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_5_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_6_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_7_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_8_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_9_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_10_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlData5G_HT20_11_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x0 0x0 0x0 0x0
-ctlIndex5G_HT40_mode_0_A_0_0 3
-ctlIndex5G_HT40_bf_reg_0_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_HT40_numChMask_0_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_0_A_0_0 0x1
-ctlIndex5G_HT40_mode_1_A_0_0 3
-ctlIndex5G_HT40_bf_reg_1_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_HT40_numChMask_1_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_1_A_0_0 0x2
-ctlIndex5G_HT40_mode_2_A_0_0 3
-ctlIndex5G_HT40_bf_reg_2_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_HT40_numChMask_2_A_0_0 0x1
-ctlIndex5G_HT40_numSSMask_2_A_0_0 0x1
-ctlIndex5G_HT40_mode_3_A_0_0 3
-ctlIndex5G_HT40_bf_reg_3_A_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex5G_HT40_numChMask_3_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_3_A_0_0 0x1
-ctlIndex5G_HT40_mode_4_A_0_0 3
-ctlIndex5G_HT40_bf_reg_4_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_HT40_numChMask_4_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_4_A_0_0 0x1
-ctlIndex5G_HT40_mode_5_A_0_0 3
-ctlIndex5G_HT40_bf_reg_5_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_HT40_numChMask_5_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_5_A_0_0 0x2
-ctlIndex5G_HT40_mode_6_A_0_0 3
-ctlIndex5G_HT40_bf_reg_6_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_HT40_numChMask_6_A_0_0 0x1
-ctlIndex5G_HT40_numSSMask_6_A_0_0 0x1
-ctlIndex5G_HT40_mode_7_A_0_0 3
-ctlIndex5G_HT40_bf_reg_7_A_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex5G_HT40_numChMask_7_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_7_A_0_0 0x1
-ctlIndex5G_HT40_mode_8_A_0_0 3
-ctlIndex5G_HT40_bf_reg_8_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_HT40_numChMask_8_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_8_A_0_0 0x1
-ctlIndex5G_HT40_mode_9_A_0_0 3
-ctlIndex5G_HT40_bf_reg_9_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_HT40_numChMask_9_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_9_A_0_0 0x2
-ctlIndex5G_HT40_mode_10_A_0_0 3
-ctlIndex5G_HT40_bf_reg_10_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_HT40_numChMask_10_A_0_0 0x1
-ctlIndex5G_HT40_numSSMask_10_A_0_0 0x1
-ctlIndex5G_HT40_mode_11_A_0_0 3
-ctlIndex5G_HT40_bf_reg_11_A_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex5G_HT40_numChMask_11_A_0_0 0x2
-ctlIndex5G_HT40_numSSMask_11_A_0_0 0x1
-ctlFreqbin5G_HT40_A_0_0 78 82 86 90 94 98 102 142 146 150 154 158 162 166 170 174 178 182 191 195 199 203
-ctl5GHT40Reserved_A_0_0 0 0
-ctlData5G_HT40_0_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_1_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_2_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_3_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_4_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_5_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_6_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_7_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_8_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_9_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_10_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_HT40_11_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlIndex5G_VHT80_mode_0_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_0_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT80_numChMask_0_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_0_A_0_0 0x1
-ctlIndex5G_VHT80_mode_1_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_1_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT80_numChMask_1_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_1_A_0_0 0x2
-ctlIndex5G_VHT80_mode_2_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_2_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT80_numChMask_2_A_0_0 0x1
-ctlIndex5G_VHT80_numSSMask_2_A_0_0 0x1
-ctlIndex5G_VHT80_mode_3_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_3_A_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT80_numChMask_3_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_3_A_0_0 0x1
-ctlIndex5G_VHT80_mode_4_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_4_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT80_numChMask_4_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_4_A_0_0 0x1
-ctlIndex5G_VHT80_mode_5_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_5_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT80_numChMask_5_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_5_A_0_0 0x2
-ctlIndex5G_VHT80_mode_6_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_6_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT80_numChMask_6_A_0_0 0x1
-ctlIndex5G_VHT80_numSSMask_6_A_0_0 0x1
-ctlIndex5G_VHT80_mode_7_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_7_A_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT80_numChMask_7_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_7_A_0_0 0x1
-ctlIndex5G_VHT80_mode_8_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_8_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT80_numChMask_8_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_8_A_0_0 0x1
-ctlIndex5G_VHT80_mode_9_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_9_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT80_numChMask_9_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_9_A_0_0 0x2
-ctlIndex5G_VHT80_mode_10_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_10_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT80_numChMask_10_A_0_0 0x1
-ctlIndex5G_VHT80_numSSMask_10_A_0_0 0x1
-ctlIndex5G_VHT80_mode_11_A_0_0 4
-ctlIndex5G_VHT80_bf_reg_11_A_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT80_numChMask_11_A_0_0 0x2
-ctlIndex5G_VHT80_numSSMask_11_A_0_0 0x1
-ctlFreqbin5G_VHT80_A_0_0 82 86 90 94 98 146 150 154 158 162 166 170 174 178 195 199
-ctlData5G_VHT80_0_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_1_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_2_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_3_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_4_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_5_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_6_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_7_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_8_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_9_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_10_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80_11_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_mode_0_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_bf_reg_0_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numChMask_0_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numSSMask_0_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_mode_1_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_bf_reg_1_A_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numChMask_1_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numSSMask_1_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_mode_2_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_bf_reg_2_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numChMask_2_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numSSMask_2_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_mode_3_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_bf_reg_3_A_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numChMask_3_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numSSMask_3_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_mode_4_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_bf_reg_4_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numChMask_4_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numSSMask_4_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_mode_5_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_bf_reg_5_A_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numChMask_5_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryLowerFreq_numSSMask_5_A_0_0 0x2
-ctlModeExt5G_PrimaryLowerFreq_A_0_0 8 8 8 8 8 8
-ctlFreqbin5G_VHT80p80_PrimaryLowerFreq_A_0_0 90 154 158 162 166 170
-ctlData5G_VHT80p80_PrimaryLowerFreq_0_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryLowerFreq_1_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryLowerFreq_2_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryLowerFreq_3_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryLowerFreq_4_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryLowerFreq_5_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_mode_0_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_bf_reg_0_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numChMask_0_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numSSMask_0_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_mode_1_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_bf_reg_1_A_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numChMask_1_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numSSMask_1_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_mode_2_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_bf_reg_2_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numChMask_2_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numSSMask_2_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_mode_3_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_bf_reg_3_A_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numChMask_3_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numSSMask_3_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_mode_4_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_bf_reg_4_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numChMask_4_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numSSMask_4_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_mode_5_A_0_0 7
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_bf_reg_5_A_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numChMask_5_A_0_0 0x2
-ctlIndex5G_VHT80p80_PrimaryHigherFreq_numSSMask_5_A_0_0 0x2
-ctlModeExt5G_VHT80p80_PrimaryHigherFreq_A_0_0 9 9 9 9 9 9
-ctlFreqbin5G_VHT80p80_PrimaryHigherFreq_A_0_0 90 154 158 162 166 170
-ctlData5G_VHT80p80_PrimaryHigherFreq_0_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryHigherFreq_1_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryHigherFreq_2_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryHigherFreq_3_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryHigherFreq_4_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT80p80_PrimaryHigherFreq_5_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlIndex5G_VHT160_mode_0_A_0_0 6
-ctlIndex5G_VHT160_bf_reg_0_A_0_0 beamforming:0x0 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT160_numChMask_0_A_0_0 0x2
-ctlIndex5G_VHT160_numSSMask_0_A_0_0 0x2
-ctlIndex5G_VHT160_mode_1_A_0_0 6
-ctlIndex5G_VHT160_bf_reg_1_A_0_0 beamforming:0x1 regDmn:0x1 reserved:0x0
-ctlIndex5G_VHT160_numChMask_1_A_0_0 0x2
-ctlIndex5G_VHT160_numSSMask_1_A_0_0 0x2
-ctlIndex5G_VHT160_mode_2_A_0_0 6
-ctlIndex5G_VHT160_bf_reg_2_A_0_0 beamforming:0x0 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT160_numChMask_2_A_0_0 0x2
-ctlIndex5G_VHT160_numSSMask_2_A_0_0 0x2
-ctlIndex5G_VHT160_mode_3_A_0_0 6
-ctlIndex5G_VHT160_bf_reg_3_A_0_0 beamforming:0x1 regDmn:0x4 reserved:0x0
-ctlIndex5G_VHT160_numChMask_3_A_0_0 0x2
-ctlIndex5G_VHT160_numSSMask_3_A_0_0 0x2
-ctlIndex5G_VHT160_mode_4_A_0_0 6
-ctlIndex5G_VHT160_bf_reg_4_A_0_0 beamforming:0x0 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT160_numChMask_4_A_0_0 0x2
-ctlIndex5G_VHT160_numSSMask_4_A_0_0 0x2
-ctlIndex5G_VHT160_mode_5_A_0_0 6
-ctlIndex5G_VHT160_bf_reg_5_A_0_0 beamforming:0x1 regDmn:0x3 reserved:0x0
-ctlIndex5G_VHT160_numChMask_5_A_0_0 0x2
-ctlIndex5G_VHT160_numSSMask_5_A_0_0 0x2
-ctlFreqbin5G_VHT160_A_0_0 90 154 158 162 166 170
-ctl5GVHT160Reserved_A_0_0 0 0
-ctlData5G_VHT160_0_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT160_1_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT160_2_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT160_3_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT160_4_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlData5G_VHT160_5_A_0_0 0x3c 0x3c 0x3c 0x3c 0x3c 0x3c
-ctlSpare5G 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvSARId__0_0 13
-nvSARLen__0_0 44
-nvSARFlag__0_0 0x0
-CCK2gLimit_B0_0_0 0x3c
-Ofdm2gLimit_B0_0_0 0x3c
-Ofdm5gLimit_B0_0_0 0x3c
-pad_B0_0_0 0
-CCK2gLimit_B1_0_0 0x3c
-Ofdm2gLimit_B1_0_0 0x3c
-Ofdm5gLimit_B1_0_0 0x3c
-pad_B1_0_0 0
-CCK2gLimit_B0_1_0 0x3c
-Ofdm2gLimit_B0_1_0 0x3c
-Ofdm5gLimit_B0_1_0 0x3c
-pad_B0_1_0 0
-CCK2gLimit_B1_1_0 0x3c
-Ofdm2gLimit_B1_1_0 0x3c
-Ofdm5gLimit_B1_1_0 0x3c
-pad_B1_1_0 0
-CCK2gLimit_B0_2_0 0x3c
-Ofdm2gLimit_B0_2_0 0x3c
-Ofdm5gLimit_B0_2_0 0x3c
-pad_B0_2_0 0
-CCK2gLimit_B1_2_0 0x3c
-Ofdm2gLimit_B1_2_0 0x3c
-Ofdm5gLimit_B1_2_0 0x3c
-pad_B1_2_0 0
-CCK2gLimit_B0_3_0 0x3c
-Ofdm2gLimit_B0_3_0 0x3c
-Ofdm5gLimit_B0_3_0 0x3c
-pad_B0_3_0 0
-CCK2gLimit_B1_3_0 0x3c
-Ofdm2gLimit_B1_3_0 0x3c
-Ofdm5gLimit_B1_3_0 0x3c
-pad_B1_3_0 0
-CCK2gLimit_B0_4_0 0x3c
-Ofdm2gLimit_B0_4_0 0x3c
-Ofdm5gLimit_B0_4_0 0x3c
-pad_B0_4_0 0
-CCK2gLimit_B1_4_0 0x3c
-Ofdm2gLimit_B1_4_0 0x3c
-Ofdm5gLimit_B1_4_0 0x3c
-pad_B1_4_0 0
-nvRxGainId__0_0 14
-nvRxGainLen__0_0 260
-nvRxGainFlag__0_0 0x0
-bandMask_G_0_0_0 0x0
-refISS_G_0_0_0 0
-rate_G_0_0_0 0
-bandWidth_G_0_0_0 0
-numChan_G_0_0_0 0
-numChain_G_0_0_0 0
-numPkts_G_0_0_0 0
-chans_G_0_0_0 0 0 0 0
-chainMasks_G_0_0_0 0x0 0x0
-rxNFCalPowerDBr_G_0_0_0 0 0
-rxNFCalPowerDBm_G_0_0_0 0 0
-rxTempMeas_G_0_0_0 0 0
-rxNFThermCalSlope_G_0_0_0 0 0
-minCcaThreshold_G_0_0_0 0 0
-rxNFCalPowerDBmDTIMSynth_G_0_0_0 0 0
-rxNFCalPowerDBr_G_0_1_0 0 0
-rxNFCalPowerDBm_G_0_1_0 0 0
-rxTempMeas_G_0_1_0 0 0
-rxNFThermCalSlope_G_0_1_0 0 0
-minCcaThreshold_G_0_1_0 0 0
-rxNFCalPowerDBmDTIMSynth_G_0_1_0 0 0
-rxNFCalPowerDBr_G_0_2_0 0 0
-rxNFCalPowerDBm_G_0_2_0 0 0
-rxTempMeas_G_0_2_0 0 0
-rxNFThermCalSlope_G_0_2_0 0 0
-minCcaThreshold_G_0_2_0 0 0
-rxNFCalPowerDBmDTIMSynth_G_0_2_0 0 0
-rxNFCalPowerDBr_G_0_3_0 0 0
-rxNFCalPowerDBm_G_0_3_0 0 0
-rxTempMeas_G_0_3_0 0 0
-rxNFThermCalSlope_G_0_3_0 0 0
-minCcaThreshold_G_0_3_0 0 0
-rxNFCalPowerDBmDTIMSynth_G_0_3_0 0 0
-bandMask_A_0_0_0 0x0
-refISS_A_0_0_0 0
-rate_A_0_0_0 0
-bandWidth_A_0_0_0 0
-numChan_A_0_0_0 0
-numChain_A_0_0_0 0
-numPkts_A_0_0_0 0
-chans_A_0_0_0 0 0 0 0
-chainMasks_A_0_0_0 0x0 0x0
-rxNFCalPowerDBr_A_0_0_0 0 0
-rxNFCalPowerDBm_A_0_0_0 0 0
-rxTempMeas_A_0_0_0 0 0
-rxNFThermCalSlope_A_0_0_0 0 0
-minCcaThreshold_A_0_0_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_0_0_0 0 0
-rxNFCalPowerDBr_A_0_1_0 0 0
-rxNFCalPowerDBm_A_0_1_0 0 0
-rxTempMeas_A_0_1_0 0 0
-rxNFThermCalSlope_A_0_1_0 0 0
-minCcaThreshold_A_0_1_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_0_1_0 0 0
-rxNFCalPowerDBr_A_0_2_0 0 0
-rxNFCalPowerDBm_A_0_2_0 0 0
-rxTempMeas_A_0_2_0 0 0
-rxNFThermCalSlope_A_0_2_0 0 0
-minCcaThreshold_A_0_2_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_0_2_0 0 0
-rxNFCalPowerDBr_A_0_3_0 0 0
-rxNFCalPowerDBm_A_0_3_0 0 0
-rxTempMeas_A_0_3_0 0 0
-rxNFThermCalSlope_A_0_3_0 0 0
-minCcaThreshold_A_0_3_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_0_3_0 0 0
-bandMask_A_1_0_0 0x0
-refISS_A_1_0_0 0
-rate_A_1_0_0 0
-bandWidth_A_1_0_0 0
-numChan_A_1_0_0 0
-numChain_A_1_0_0 0
-numPkts_A_1_0_0 0
-chans_A_1_0_0 0 0 0 0
-chainMasks_A_1_0_0 0x0 0x0
-rxNFCalPowerDBr_A_1_0_0 0 0
-rxNFCalPowerDBm_A_1_0_0 0 0
-rxTempMeas_A_1_0_0 0 0
-rxNFThermCalSlope_A_1_0_0 0 0
-minCcaThreshold_A_1_0_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_1_0_0 0 0
-rxNFCalPowerDBr_A_1_1_0 0 0
-rxNFCalPowerDBm_A_1_1_0 0 0
-rxTempMeas_A_1_1_0 0 0
-rxNFThermCalSlope_A_1_1_0 0 0
-minCcaThreshold_A_1_1_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_1_1_0 0 0
-rxNFCalPowerDBr_A_1_2_0 0 0
-rxNFCalPowerDBm_A_1_2_0 0 0
-rxTempMeas_A_1_2_0 0 0
-rxNFThermCalSlope_A_1_2_0 0 0
-minCcaThreshold_A_1_2_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_1_2_0 0 0
-rxNFCalPowerDBr_A_1_3_0 0 0
-rxNFCalPowerDBm_A_1_3_0 0 0
-rxTempMeas_A_1_3_0 0 0
-rxNFThermCalSlope_A_1_3_0 0 0
-minCcaThreshold_A_1_3_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_1_3_0 0 0
-bandMask_A_2_0_0 0x0
-refISS_A_2_0_0 0
-rate_A_2_0_0 0
-bandWidth_A_2_0_0 0
-numChan_A_2_0_0 0
-numChain_A_2_0_0 0
-numPkts_A_2_0_0 0
-chans_A_2_0_0 0 0 0 0
-chainMasks_A_2_0_0 0x0 0x0
-rxNFCalPowerDBr_A_2_0_0 0 0
-rxNFCalPowerDBm_A_2_0_0 0 0
-rxTempMeas_A_2_0_0 0 0
-rxNFThermCalSlope_A_2_0_0 0 0
-minCcaThreshold_A_2_0_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_2_0_0 0 0
-rxNFCalPowerDBr_A_2_1_0 0 0
-rxNFCalPowerDBm_A_2_1_0 0 0
-rxTempMeas_A_2_1_0 0 0
-rxNFThermCalSlope_A_2_1_0 0 0
-minCcaThreshold_A_2_1_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_2_1_0 0 0
-rxNFCalPowerDBr_A_2_2_0 0 0
-rxNFCalPowerDBm_A_2_2_0 0 0
-rxTempMeas_A_2_2_0 0 0
-rxNFThermCalSlope_A_2_2_0 0 0
-minCcaThreshold_A_2_2_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_2_2_0 0 0
-rxNFCalPowerDBr_A_2_3_0 0 0
-rxNFCalPowerDBm_A_2_3_0 0 0
-rxTempMeas_A_2_3_0 0 0
-rxNFThermCalSlope_A_2_3_0 0 0
-minCcaThreshold_A_2_3_0 0 0
-rxNFCalPowerDBmDTIMSynth_A_2_3_0 0 0
-nvRttTableId__0_0 15
-nvRttTableLen__0_0 1016
-nvRttTableFlag__0_0 0x0
-rttTxBaseDelayLowBand_Legacy_20_160_T0_0_0 5450 0 3680 0
-rttTxBaseDelayLowBand_Ht20_20_160_T0_0_0 5350 0 3570 0
-rttTxBaseDelayLowBand_Vht20_20_160_T0_0_0 0 0 -64 0
-rttTxBaseDelayLowBand_Dup40_40_160_T0_0_0 3950 5054 0
-rttTxBaseDelayLowBand_Ht40_40_160_T0_0_0 6150 4570 0
-rttTxBaseDelayLowBand_Vht40_40_160_T0_0_0 6450 4880 0
-rttTxBaseDelayLowBand_Dup80_80_160_T0_0_0 4222 0
-rttTxBaseDelayLowBand_Vht80_80_160_T0_0_0 4110 0
-rttTxBaseDelayLowBand_Dup160_160_160_T0_0_0 0
-rttTxBaseDelayLowBand_Vht160_160_160_T0_0_0 0
-rttTxBaseDelayLowBand_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttRxBaseDelayLowBand_Legacy_20_160_T0_0_0 3949 0 3669 0
-rttRxBaseDelayLowBand_Ht20_20_160_T0_0_0 3880 0 3558 0
-rttRxBaseDelayLowBand_Vht20_20_160_T0_0_0 0 0 -76 0
-rttRxBaseDelayLowBand_Dup40_40_160_T0_0_0 0 2880 0
-rttRxBaseDelayLowBand_Ht40_40_160_T0_0_0 0 2137 0
-rttRxBaseDelayLowBand_Vht40_40_160_T0_0_0 0 2447 0
-rttRxBaseDelayLowBand_Dup80_80_160_T0_0_0 2913 0
-rttRxBaseDelayLowBand_Vht80_80_160_T0_0_0 1804 0
-rttRxBaseDelayLowBand_Dup160_160_160_T0_0_0 143
-rttRxBaseDelayLowBand_Vht160_160_160_T0_0_0 -2180
-rttRxBaseDelayLowBand_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttTxBaseDelayHighBand_Legacy_20_160_T0_0_0 0 0 3680 0
-rttTxBaseDelayHighBand_Ht20_20_160_T0_0_0 0 0 3570 0
-rttTxBaseDelayHighBand_Vht20_20_160_T0_0_0 0 0 -64 0
-rttTxBaseDelayHighBand_Dup40_40_160_T0_0_0 0 5054 0
-rttTxBaseDelayHighBand_Ht40_40_160_T0_0_0 0 4570 0
-rttTxBaseDelayHighBand_Vht40_40_160_T0_0_0 0 4880 0
-rttTxBaseDelayHighBand_Dup80_80_160_T0_0_0 4222 0
-rttTxBaseDelayHighBand_Vht80_80_160_T0_0_0 4110 0
-rttTxBaseDelayHighBand_Dup160_160_160_T0_0_0 0
-rttTxBaseDelayHighBand_Vht160_160_160_T0_0_0 0
-rttTxBaseDelayHighBand_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttRxBaseDelayHighBand_Legacy_20_160_T0_0_0 0 0 3669 0
-rttRxBaseDelayHighBand_Ht20_20_160_T0_0_0 0 0 3558 0
-rttRxBaseDelayHighBand_Vht20_20_160_T0_0_0 0 0 -76 0
-rttRxBaseDelayHighBand_Dup40_40_160_T0_0_0 0 2880 0
-rttRxBaseDelayHighBand_Ht40_40_160_T0_0_0 0 2137 0
-rttRxBaseDelayHighBand_Vht40_40_160_T0_0_0 0 2447 0
-rttRxBaseDelayHighBand_Dup80_80_160_T0_0_0 2913 0
-rttRxBaseDelayHighBand_Vht80_80_160_T0_0_0 1804 0
-rttRxBaseDelayHighBand_Dup160_160_160_T0_0_0 143
-rttRxBaseDelayHighBand_Vht160_160_160_T0_0_0 -2180
-rttRxBaseDelayHighBand_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttTxDeltaOtherChains2G_Legacy_20_80_T0_0_0 0 0 0
-rttTxDeltaOtherChains2G_Ht20_20_80_T0_0_0 0 0 0
-rttTxDeltaOtherChains2G_Vht20_20_80_T0_0_0 0 0 0
-rttTxDeltaOtherChains2G_Dup40_40_80_T0_0_0 0 0
-rttTxDeltaOtherChains2G_Ht40_40_80_T0_0_0 0 0
-rttTxDeltaOtherChains2G_Vht40_40_80_T0_0_0 0 0
-rttTxDeltaOtherChains2G_Dup80_80_80_T0_0_0 0
-rttTxDeltaOtherChains2G_Vht80_80_80_T0_0_0 0
-rttTxDeltaOtherChains2G_rttDelay_20_80Reserved_T0_0_0 0x0 0x0
-rttTxDeltaOtherChains5G_Legacy_20_80_T0_0_0 0 0 0
-rttTxDeltaOtherChains5G_Ht20_20_80_T0_0_0 0 0 0
-rttTxDeltaOtherChains5G_Vht20_20_80_T0_0_0 0 0 0
-rttTxDeltaOtherChains5G_Dup40_40_80_T0_0_0 0 0
-rttTxDeltaOtherChains5G_Ht40_40_80_T0_0_0 0 0
-rttTxDeltaOtherChains5G_Vht40_40_80_T0_0_0 0 0
-rttTxDeltaOtherChains5G_Dup80_80_80_T0_0_0 0
-rttTxDeltaOtherChains5G_Vht80_80_80_T0_0_0 0
-rttTxDeltaOtherChains5G_rttDelay_20_80Reserved_T0_0_0 0x0 0x0
-rttTxDeltaHeavyClipOn_Legacy_20_160_T0_0_0 0 0 0 0
-rttTxDeltaHeavyClipOn_Ht20_20_160_T0_0_0 0 0 0 0
-rttTxDeltaHeavyClipOn_Vht20_20_160_T0_0_0 0 0 0 0
-rttTxDeltaHeavyClipOn_Dup40_40_160_T0_0_0 0 0 0
-rttTxDeltaHeavyClipOn_Ht40_40_160_T0_0_0 0 0 0
-rttTxDeltaHeavyClipOn_Vht40_40_160_T0_0_0 0 0 0
-rttTxDeltaHeavyClipOn_Dup80_80_160_T0_0_0 0 0
-rttTxDeltaHeavyClipOn_Vht80_80_160_T0_0_0 0 0
-rttTxDeltaHeavyClipOn_Dup160_160_160_T0_0_0 0
-rttTxDeltaHeavyClipOn_Vht160_160_160_T0_0_0 0
-rttTxDeltaHeavyClipOn_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttTxDeltaDpdOn_Legacy_20_160_T0_0_0 0 0 0 0
-rttTxDeltaDpdOn_Ht20_20_160_T0_0_0 0 0 0 0
-rttTxDeltaDpdOn_Vht20_20_160_T0_0_0 0 0 0 0
-rttTxDeltaDpdOn_Dup40_40_160_T0_0_0 0 0 0
-rttTxDeltaDpdOn_Ht40_40_160_T0_0_0 0 0 0
-rttTxDeltaDpdOn_Vht40_40_160_T0_0_0 0 0 0
-rttTxDeltaDpdOn_Dup80_80_160_T0_0_0 0 0
-rttTxDeltaDpdOn_Vht80_80_160_T0_0_0 0 0
-rttTxDeltaDpdOn_Dup160_160_160_T0_0_0 0
-rttTxDeltaDpdOn_Vht160_160_160_T0_0_0 0
-rttTxDeltaDpdOn_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttTxDeltaPefOn_Legacy_20_160_T0_0_0 208 0 104 0
-rttTxDeltaPefOn_Ht20_20_160_T0_0_0 208 0 104 0
-rttTxDeltaPefOn_Vht20_20_160_T0_0_0 208 0 104 0
-rttTxDeltaPefOn_Dup40_40_160_T0_0_0 208 104 0
-rttTxDeltaPefOn_Ht40_40_160_T0_0_0 208 104 0
-rttTxDeltaPefOn_Vht40_40_160_T0_0_0 208 104 0
-rttTxDeltaPefOn_Dup80_80_160_T0_0_0 104 0
-rttTxDeltaPefOn_Vht80_80_160_T0_0_0 104 0
-rttTxDeltaPefOn_Dup160_160_160_T0_0_0 104
-rttTxDeltaPefOn_Vht160_160_160_T0_0_0 104
-rttTxDeltaPefOn_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttTxDeltaTxiqOn_Legacy_20_160_T0_0_0 250 0 125 0
-rttTxDeltaTxiqOn_Ht20_20_160_T0_0_0 250 0 125 0
-rttTxDeltaTxiqOn_Vht20_20_160_T0_0_0 250 0 125 0
-rttTxDeltaTxiqOn_Dup40_40_160_T0_0_0 250 125 0
-rttTxDeltaTxiqOn_Ht40_40_160_T0_0_0 250 125 0
-rttTxDeltaTxiqOn_Vht40_40_160_T0_0_0 250 125 0
-rttTxDeltaTxiqOn_Dup80_80_160_T0_0_0 125 0
-rttTxDeltaTxiqOn_Vht80_80_160_T0_0_0 125 0
-rttTxDeltaTxiqOn_Dup160_160_160_T0_0_0 125
-rttTxDeltaTxiqOn_Vht160_160_160_T0_0_0 125
-rttTxDeltaTxiqOn_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttRxDelta2G_Legacy_20_160_T0_0_0 0 0 0 0
-rttRxDelta2G_Ht20_20_160_T0_0_0 0 0 0 0
-rttRxDelta2G_Vht20_20_160_T0_0_0 0 0 0 0
-rttRxDelta2G_Dup40_40_160_T0_0_0 0 0 0
-rttRxDelta2G_Ht40_40_160_T0_0_0 0 0 0
-rttRxDelta2G_Vht40_40_160_T0_0_0 0 0 0
-rttRxDelta2G_Dup80_80_160_T0_0_0 0 0
-rttRxDelta2G_Vht80_80_160_T0_0_0 0 0
-rttRxDelta2G_Dup160_160_160_T0_0_0 0
-rttRxDelta2G_Vht160_160_160_T0_0_0 0
-rttRxDelta2G_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttRxDeltaOtherChains2G_Legacy_20_80_T0_0_0 0 0 0
-rttRxDeltaOtherChains2G_Ht20_20_80_T0_0_0 0 0 0
-rttRxDeltaOtherChains2G_Vht20_20_80_T0_0_0 0 0 0
-rttRxDeltaOtherChains2G_Dup40_40_80_T0_0_0 0 0
-rttRxDeltaOtherChains2G_Ht40_40_80_T0_0_0 0 0
-rttRxDeltaOtherChains2G_Vht40_40_80_T0_0_0 0 0
-rttRxDeltaOtherChains2G_Dup80_80_80_T0_0_0 0
-rttRxDeltaOtherChains2G_Vht80_80_80_T0_0_0 0
-rttRxDeltaOtherChains2G_rttDelay_20_80Reserved_T0_0_0 0x0 0x0
-rttRxDeltaOtherChains2G_Legacy_20_80_T0_1_0 0 0 0
-rttRxDeltaOtherChains2G_Ht20_20_80_T0_1_0 0 0 0
-rttRxDeltaOtherChains2G_Vht20_20_80_T0_1_0 0 0 0
-rttRxDeltaOtherChains2G_Dup40_40_80_T0_1_0 0 0
-rttRxDeltaOtherChains2G_Ht40_40_80_T0_1_0 0 0
-rttRxDeltaOtherChains2G_Vht40_40_80_T0_1_0 0 0
-rttRxDeltaOtherChains2G_Dup80_80_80_T0_1_0 0
-rttRxDeltaOtherChains2G_Vht80_80_80_T0_1_0 0
-rttRxDeltaOtherChains2G_rttDelay_20_80Reserved_T0_1_0 0x0 0x0
-rttRxDeltaOtherChains5G_Legacy_20_80_T0_0_0 0 0 0
-rttRxDeltaOtherChains5G_Ht20_20_80_T0_0_0 0 0 0
-rttRxDeltaOtherChains5G_Vht20_20_80_T0_0_0 0 0 0
-rttRxDeltaOtherChains5G_Dup40_40_80_T0_0_0 0 0
-rttRxDeltaOtherChains5G_Ht40_40_80_T0_0_0 0 0
-rttRxDeltaOtherChains5G_Vht40_40_80_T0_0_0 0 0
-rttRxDeltaOtherChains5G_Dup80_80_80_T0_0_0 0
-rttRxDeltaOtherChains5G_Vht80_80_80_T0_0_0 0
-rttRxDeltaOtherChains5G_rttDelay_20_80Reserved_T0_0_0 0x0 0x0
-rttRxDeltaOtherChains5G_Legacy_20_80_T0_1_0 0 0 0
-rttRxDeltaOtherChains5G_Ht20_20_80_T0_1_0 0 0 0
-rttRxDeltaOtherChains5G_Vht20_20_80_T0_1_0 0 0 0
-rttRxDeltaOtherChains5G_Dup40_40_80_T0_1_0 0 0
-rttRxDeltaOtherChains5G_Ht40_40_80_T0_1_0 0 0
-rttRxDeltaOtherChains5G_Vht40_40_80_T0_1_0 0 0
-rttRxDeltaOtherChains5G_Dup80_80_80_T0_1_0 0
-rttRxDeltaOtherChains5G_Vht80_80_80_T0_1_0 0
-rttRxDeltaOtherChains5G_rttDelay_20_80Reserved_T0_1_0 0x0 0x0
-rttRxDeltaRxiqOn7Tap_Legacy_20_160_T0_0_0 333 0 167 0
-rttRxDeltaRxiqOn7Tap_Ht20_20_160_T0_0_0 333 0 167 0
-rttRxDeltaRxiqOn7Tap_Vht20_20_160_T0_0_0 333 0 167 0
-rttRxDeltaRxiqOn7Tap_Dup40_40_160_T0_0_0 333 167 0
-rttRxDeltaRxiqOn7Tap_Ht40_40_160_T0_0_0 333 167 0
-rttRxDeltaRxiqOn7Tap_Vht40_40_160_T0_0_0 333 167 0
-rttRxDeltaRxiqOn7Tap_Dup80_80_160_T0_0_0 167 0
-rttRxDeltaRxiqOn7Tap_Vht80_80_160_T0_0_0 167 0
-rttRxDeltaRxiqOn7Tap_Dup160_160_160_T0_0_0 167
-rttRxDeltaRxiqOn7Tap_Vht160_160_160_T0_0_0 167
-rttRxDeltaRxiqOn7Tap_rttDelay_20_160Reserved_T0_0_0 0x0 0x0
-rttDelaysFuture1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-rttTxBaseDelay_Legacy_20_40_T1_0_0 5400 0
-rttTxBaseDelay_Ht20_20_40_T1_0_0 5300 0
-rttTxBaseDelay_Vht20_20_40_T1_0_0 0 0
-rttTxBaseDelay_Dup40_40_40_T1_0_0 3900
-rttTxBaseDelay_Ht40_40_40_T1_0_0 6100
-rttTxBaseDelay_Vht40_24_40_T1_0_0 6400
-rttTxBaseDelay_rttDelay_20_40Reserved_T1_0_0 0x0 0x0
-rttRxBaseDelay_Legacy_20_40_T1_0_0 0 0
-rttRxBaseDelay_Ht20_20_40_T1_0_0 0 0
-rttRxBaseDelay_Vht20_20_40_T1_0_0 0 0
-rttRxBaseDelay_Dup40_40_40_T1_0_0 0
-rttRxBaseDelay_Ht40_40_40_T1_0_0 0
-rttRxBaseDelay_Vht40_24_40_T1_0_0 0
-rttRxBaseDelay_rttDelay_20_40Reserved_T1_0_0 0x0 0x0
-rttTxDeltaHeavyClipOn_Legacy_20_40_T1_0_0 0 0
-rttTxDeltaHeavyClipOn_Ht20_20_40_T1_0_0 0 0
-rttTxDeltaHeavyClipOn_Vht20_20_40_T1_0_0 0 0
-rttTxDeltaHeavyClipOn_Dup40_40_40_T1_0_0 0
-rttTxDeltaHeavyClipOn_Ht40_40_40_T1_0_0 0
-rttTxDeltaHeavyClipOn_Vht40_24_40_T1_0_0 0
-rttTxDeltaHeavyClipOn_rttDelay_20_40Reserved_T1_0_0 0x0 0x0
-rttTxDeltaDpdOn_Legacy_20_40_T1_0_0 0 0
-rttTxDeltaDpdOn_Ht20_20_40_T1_0_0 0 0
-rttTxDeltaDpdOn_Vht20_20_40_T1_0_0 0 0
-rttTxDeltaDpdOn_Dup40_40_40_T1_0_0 0
-rttTxDeltaDpdOn_Ht40_40_40_T1_0_0 0
-rttTxDeltaDpdOn_Vht40_24_40_T1_0_0 0
-rttTxDeltaDpdOn_rttDelay_20_40Reserved_T1_0_0 0x0 0x0
-rttTxDeltaPefOn_Legacy_20_40_T1_0_0 208 0
-rttTxDeltaPefOn_Ht20_20_40_T1_0_0 208 0
-rttTxDeltaPefOn_Vht20_20_40_T1_0_0 208 0
-rttTxDeltaPefOn_Dup40_40_40_T1_0_0 208
-rttTxDeltaPefOn_Ht40_40_40_T1_0_0 208
-rttTxDeltaPefOn_Vht40_24_40_T1_0_0 208
-rttTxDeltaPefOn_rttDelay_20_40Reserved_T1_0_0 0x0 0x0
-rttTxDeltaTxiqOn_Legacy_20_40_T1_0_0 250 0
-rttTxDeltaTxiqOn_Ht20_20_40_T1_0_0 250 0
-rttTxDeltaTxiqOn_Vht20_20_40_T1_0_0 250 0
-rttTxDeltaTxiqOn_Dup40_40_40_T1_0_0 250
-rttTxDeltaTxiqOn_Ht40_40_40_T1_0_0 250
-rttTxDeltaTxiqOn_Vht40_24_40_T1_0_0 250
-rttTxDeltaTxiqOn_rttDelay_20_40Reserved_T1_0_0 0x0 0x0
-rttRxDeltaRxiqOn7Tap_Legacy_20_40_T1_0_0 333 0
-rttRxDeltaRxiqOn7Tap_Ht20_20_40_T1_0_0 333 0
-rttRxDeltaRxiqOn7Tap_Vht20_20_40_T1_0_0 333 0
-rttRxDeltaRxiqOn7Tap_Dup40_40_40_T1_0_0 333
-rttRxDeltaRxiqOn7Tap_Ht40_40_40_T1_0_0 333
-rttRxDeltaRxiqOn7Tap_Vht40_24_40_T1_0_0 333
-rttRxDeltaRxiqOn7Tap_rttDelay_20_40Reserved_T1_0_0 0x0 0x0
-rttDelaysFuture2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-nvConfigAddrId__0_0 16
-nvConfigAddrLen__0_0 2052
-nvConfigAddrFlag__0_0 0x0
-configAddr__0_0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
-nvAteId__0_0 17
-nvAteLen__0_0 68
-nvAteFlag__0_0 0x0
-configFlag__0_0 0x0
-rbias__0_0 0x0
-tempSlopeCharacterized__0_0 0x0
-chipCalDataReserved__0_0 0x0
-ateCALTemp_B0_0_0 0
-ateChainThermCode_B0_0_0 0
-pad_B0_0_0 0 0
-ateCALTemp_B1_0_0 0
-ateChainThermCode_B1_0_0 0
-pad_B1_0_0 0 0
-thermAdcScaledGain_T0_0_0 0 0
-thermAdcOffset_T0_0_0 0 0
-chipCalDataPerPhyReserved_T0_0_0 0x0 0x0
-thermAdcScaledGain_T1_0_0 0 0
-thermAdcOffset_T1_0_0 0 0
-chipCalDataPerPhyReserved_T1_0_0 0x0 0x0
-ate_reserved 0 0 0 0 0 0 0 0 0 0 0 0
-ateFuture 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
diff --git a/db845c/firmware/cdsp.b00 b/db845c/firmware/cdsp.b00
deleted file mode 100644
index a58b080..0000000
--- a/db845c/firmware/cdsp.b00
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/cdsp.b01 b/db845c/firmware/cdsp.b01
deleted file mode 100644
index 6d6d277..0000000
--- a/db845c/firmware/cdsp.b01
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/cdsp.b02 b/db845c/firmware/cdsp.b02
deleted file mode 100644
index 69319a4..0000000
--- a/db845c/firmware/cdsp.b02
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/cdsp.b03 b/db845c/firmware/cdsp.b03
deleted file mode 100644
index 54c48df..0000000
--- a/db845c/firmware/cdsp.b03
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/cdsp.b04 b/db845c/firmware/cdsp.b04
deleted file mode 100644
index e8d3bc5..0000000
--- a/db845c/firmware/cdsp.b04
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/cdsp.b05 b/db845c/firmware/cdsp.b05
deleted file mode 100644
index 706ea99..0000000
--- a/db845c/firmware/cdsp.b05
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/cdsp.b06 b/db845c/firmware/cdsp.b06
deleted file mode 100644
index ea6cb88..0000000
--- a/db845c/firmware/cdsp.b06
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/cdsp.b08 b/db845c/firmware/cdsp.b08
deleted file mode 100644
index d20b791..0000000
--- a/db845c/firmware/cdsp.b08
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/cdsp.mdt b/db845c/firmware/cdsp.mdt
deleted file mode 100644
index 9915c6e..0000000
--- a/db845c/firmware/cdsp.mdt
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/devcfg.mbn b/db845c/firmware/devcfg.mbn
deleted file mode 100644
index f7080e7..0000000
--- a/db845c/firmware/devcfg.mbn
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/device.mk b/db845c/firmware/device.mk
deleted file mode 100644
index 08cd807..0000000
--- a/db845c/firmware/device.mk
+++ /dev/null
@@ -1,114 +0,0 @@
-# Install firmware files copied over from
-# http://releases.linaro.org/96boards/dragonboard845c/qualcomm/firmware/RB3_firmware_20190529180356-v3.zip
-
-# Adreno
-PRODUCT_PACKAGES := \
- a630_gmu.bin \
- a630_sqe.fw \
- a630_zap.b00 \
- a630_zap.b01 \
- a630_zap.b02 \
- a630_zap.elf \
- a630_zap.mdt
-
-# DSP (adsp+cdsp)
-PRODUCT_PACKAGES += \
- adsp.b00 \
- adsp.b01 \
- adsp.b02 \
- adsp.b03 \
- adsp.b04 \
- adsp.b05 \
- adsp.b06 \
- adsp.b07 \
- adsp.b08 \
- adsp.b09 \
- adsp.b10 \
- adsp.b11 \
- adsp.b12 \
- adsp.b13 \
- adsp.mdt \
- cdsp.b00 \
- cdsp.b01 \
- cdsp.b02 \
- cdsp.b03 \
- cdsp.b04 \
- cdsp.b05 \
- cdsp.b06 \
- cdsp.b08 \
- cdsp.mdt
-
-# USB (USB Host to PCIE)
-# For Ethernet and one of the USB-A host port to work
-PRODUCT_PACKAGES += \
- K2026090.mem
-
-# I2C/SPI fix
-PRODUCT_PACKAGES += \
- devcfg.mbn
-
-# Venus
-# Video encoder/decoder accelerator
-PRODUCT_PACKAGES += \
- venus.b00 \
- venus.b01 \
- venus.b02 \
- venus.b03 \
- venus.b04 \
- venus.mdt
-
-# Wlan
-PRODUCT_PACKAGES += \
- bdwlan.102 \
- bdwlan.104 \
- bdwlan.105 \
- bdwlan.106 \
- bdwlan.107 \
- bdwlan.108 \
- bdwlan.109 \
- bdwlan.10b \
- bdwlan.10c \
- bdwlan.b04 \
- bdwlan.b07 \
- bdwlan.b09 \
- bdwlan.b0a \
- bdwlan.b0b \
- bdwlan.b0d \
- bdwlan.b0e \
- bdwlan.b0f \
- bdwlan.b14 \
- bdwlan.b15 \
- bdwlan.b30 \
- bdwlan.b31 \
- bdwlan.b32 \
- bdwlan.b33 \
- bdwlan.b34 \
- bdwlan.b35 \
- bdwlan.b36 \
- bdwlan.b37 \
- bdwlan.b38 \
- bdwlan.b39 \
- bdwlan.b3a \
- bdwlan.b3c \
- bdwlan.b3d \
- bdwlan.b3e \
- bdwlan.b3f \
- bdwlan.b41 \
- bdwlan.b42 \
- bdwlan.b45 \
- bdwlan.b70 \
- bdwlan.bin \
- bdwlan.txt \
- wlanmdsp.mbn
-
-# License
-# Necessary to bundle license with firmware files
-PRODUCT_PACKAGES += \
- LICENSE.qcom.txt
-
-# Bluetooth
-# Firmware files (qca/cr*) copied from
-# https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qca
-PRODUCT_PACKAGES += \
- crbtfw21.tlv \
- crnv21.bin
diff --git a/db845c/firmware/qca/Android.mk b/db845c/firmware/qca/Android.mk
deleted file mode 100644
index 3fb65bf..0000000
--- a/db845c/firmware/qca/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include device/linaro/dragonboard/utils.mk
-
-# QCA firmware files copied from
-# https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qca
-firmware_files_bt := \
- crbtfw21.tlv \
- crnv21.bin
-
-$(foreach f, $(firmware_files_bt), $(call add-qcom-firmware, $(f), $(TARGET_OUT_VENDOR)/firmware/qca/))
diff --git a/db845c/firmware/qca/NOTICE b/db845c/firmware/qca/NOTICE
deleted file mode 100644
index 9313020..0000000
--- a/db845c/firmware/qca/NOTICE
+++ /dev/null
@@ -1,426 +0,0 @@
-
-This Notice.txt file contains certain notices of software components included
-with the software that Qualcomm Atheros, Inc. ("Qualcomm Atheros") is required
-to provide you. Except where prohibited by the open source license, the content
-of this notices file is only provided to satisfy Qualcomm Atheros's attribution
-and notice requirement; your use of these software components together with the
-Qualcomm Atheros software (Qualcomm Atheros software hereinafter referred to
-as "Software") is subject to the terms of your agreement from Qualcomm Atheros.
-Compliance with all copyright laws and software license agreements included in
-the notice section of this file are the responsibility of the user. Except as
-may be granted by separate express written agreement, this file provides no
-license to any patents, trademarks, copyrights, or other intellectual property
-of Qualcomm Incorporated or any of its subsidiaries.
-
-Qualcomm is a trademark of Qualcomm Incorporated, registered in the United States
-and other countries. All Qualcomm Incorporated trademarks are used with permission.
-Other products and brand names may be trademarks or registered trademarks of their
-respective owners.
-
-NOTICES:
-
-===============================================================================
-
- 1.
-
-/*
- * FILE: sha2.c
- * AUTHOR: Aaron D. Gifford <me@aarongifford.com>
- *
- * Copyright (c) 2000-2001, Aaron D. Gifford
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) 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.
- *
- * $Id: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $
- */
-File: LLM_sp_sha2.c
-
-
-/*
- * FILE: sha2.h
- * AUTHOR: Aaron D. Gifford <me@aarongifford.com>
- *
- * Copyright (c) 2000-2001, Aaron D. Gifford
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) 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.
- *
- * $Id: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $
- */
-File: LLM_sp_sha2.h
-
-===============================================================================
-
- 2.
-
-/* utility to create the register check tables
-* this includes inlined list.h safe for userspace.
-*
-* Copyright 2009 Jerome Glisse
-* Copyright 2009 Red Hat Inc.
-*
-* Authors:
-* Jerome Glisse
-* Dave Airlie
-*/
-/*All rights reserved.
-Redistribution and use in source and binary forms, with or without modification
-are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- 3. Neither the name of the <ORGANIZATION> 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 AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
-*/
-File: comm_lib.h
-
-===============================================================================
-
- 3.
-
-/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */
-/* ====================================================================
- * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- * nor may "OpenSSL" appear in their names without prior written
- * permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- */
-File Name list: aes.h, aes_locl.h
-
-===============================================================================
-
- 4.
-
-/* crypto/aes/aes_core.c -*- mode:C; c-file-style: "eay" -*- */
-/**
- * rijndael-alg-fst.c
- *
- * @version 3.0 (December 2000)
- *
- * Optimised ANSI C code for the Rijndael cipher (now AES)
- *
- * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
- * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
- * @author Paulo Barreto <paulo.barreto@terra.com.br>
- *
- * This code is hereby placed in the public domain.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS 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.
- */
-File: aes_core.c
-
-===============================================================================
-
- 5.
-
-/*===========================================================================
-
- EDIT HISTORY FOR FILE
-
- $Header: //depot/asic/msmshared/sec/sec/MSM_SEC.03.03.08.xx/aes.h#1 $
- $DateTime: 2006/12/11 00:43:21 $ $Author: davidf $
-
-when who what, where, why
--------- --- ----------------------------------------------------------
-11/12/04 rv changes to correct LINT errors
-02/02/04 rwh Small mods to open source.
-
-===========================================================================*/
-
- /*
- I retain copyright in this code but I encourage its free use provided
- that I don't carry any responsibility for the results. I am especially
- happy to see it used in free and open source software. If you do use
- it I would appreciate an acknowledgement of its origin in the code or
- the product that results and I would also appreciate knowing a liitle
- about the use to which it is being put.
-
- Dr B. R. Gladman <brg@gladman.uk.net> 1st June 2001.
-
-*/
-File: aes.h
-
-/*===========================================================================
-
- EDIT HISTORY FOR FILE
-
- $Header: //depot/asic/msmshared/sec/sec/MSM_SEC.03.03.08.xx/aes_tab.h#1 $
- $DateTime: 2006/12/11 00:43:21 $ $Author: davidf $
-
-when who what, where, why
--------- --- ----------------------------------------------------------
-11/12/04 rv changes to correct LINT errors
-02/02/04 rwh Small mods to open source.
-
-===========================================================================*/
-/*lint -e146 -e303 */
-/* 146: Assuming a binary constant */
-/* 303: String too long (try +macros) */
-
-
- /*
- I retain copyright in this code but I encourage its free use provided
- that I don't carry any responsibility for the results. I am especially
- happy to see it used in free and open source software. If you do use
- it I would appreciate an acknowledgement of its origin in the code or
- the product that results and I would also appreciate knowing a liitle
- about the use to which it is being put.
-
- Dr B. R. Gladman <brg@gladman.uk.net> 1st June 2001.
- */
-File: aes_tab.h
-
-===============================================================================
-6.
-===============================================================================
-#FILE:Conftest.py
-# Copyright (c) 2003 Stichting NLnet Labs
-# Copyright (c) 2001, 2002, 2003 Steven Knight
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-#
-#
-===============================================================================
-File: Conftest.py
-
-===============================================================================
-7.
-===============================================================================
-/ ***
- *
- * Fowler/Noll/Vo- hash
- *
- * The basis of this hash algorithm was taken from an idea sent
- * as reviewer comments to the IEEE POSIX P1003.2 committee by:
- *
- * Phong Vo (http://www.research.att.com/info/kpv/)
- * Glenn Fowler (http://www.research.att.com/~gsf/)
- *
- * In a subsequent ballot round:
- *
- * Landon Curt Noll (http://www.isthe.com/chongo/)
- *
- * improved on their algorithm. Some people tried this hash
- * and found that it worked rather well. In an EMail message
- * to Landon, they named it the ``Fowler/Noll/Vo'' or FNV hash.
- *
- * FNV hashes are designed to be fast while maintaining a low
- * collision rate. The FNV speed allows one to quickly hash lots
- * of data while maintaining a reasonable collision rate. See:
- *
- * http://www.isthe.com/chongo/tech/comp/fnv/index.html
- *
- * for more details as well as other forms of the FNV hash.
- *
- *
- * Please do not copyright this code. This code is in the public domain.
- *
- * LANDON CURT NOLL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
- * EVENT SHALL LANDON CURT NOLL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
- * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- *
- * By:
- * chongo <Landon Curt Noll> /\oo/\
- * http://www.isthe.com/chongo/
- *
- * Share and Enjoy! :-)
- */
-File: fm_fnv_hash.h, fm_fnv_hash.c
-
-===============================================================================
-8.
-===============================================================================
-
-/*
- * $Header: //source/qcom/qct/core/api/kernel/main/latest/libstd/stringl/stringl.h#13 $
- * $DateTime: 2013/07/24 11:35:54 $
- */
-
-/* $OpenBSD: string.h,v 1.17 2006/01/06 18:53:04 millert Exp $ */
-/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */
-
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)string.h 5.10 (Berkeley) 3/9/91
- */
-File: stringl.h
-
-===============================================================================
-9.
-===============================================================================
-/*
- * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-File: wcslcpy.c, wcslcat.c, wstrlcpy.c, strlcat.c, strlcpy.c, wstrlcat.c
diff --git a/db845c/firmware/qca/crbtfw21.tlv b/db845c/firmware/qca/crbtfw21.tlv
deleted file mode 100644
index 2d5ef8d..0000000
--- a/db845c/firmware/qca/crbtfw21.tlv
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/qca/crnv21.bin b/db845c/firmware/qca/crnv21.bin
deleted file mode 100644
index 7f48ef1..0000000
--- a/db845c/firmware/qca/crnv21.bin
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/qcom/Android.mk b/db845c/firmware/qcom/Android.mk
deleted file mode 100644
index 6f725c0..0000000
--- a/db845c/firmware/qcom/Android.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-# If some modules are built directly from this directory (not subdirectories),
-# their rules should be written here.
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/db845c/firmware/qcom/venus-5.2/Android.mk b/db845c/firmware/qcom/venus-5.2/Android.mk
deleted file mode 100644
index 4047e15..0000000
--- a/db845c/firmware/qcom/venus-5.2/Android.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include device/linaro/dragonboard/utils.mk
-
-firmware_files_venus := \
- venus.b00 \
- venus.b01 \
- venus.b02 \
- venus.b03 \
- venus.b04 \
- venus.mdt
-
-$(foreach f, $(firmware_files_venus), $(call add-qcom-firmware, $(f), $(TARGET_OUT_VENDOR)/firmware/qcom/venus-5.2/))
diff --git a/db845c/firmware/qcom/venus-5.2/NOTICE b/db845c/firmware/qcom/venus-5.2/NOTICE
deleted file mode 100644
index c880572..0000000
--- a/db845c/firmware/qcom/venus-5.2/NOTICE
+++ /dev/null
@@ -1,206 +0,0 @@
-PLEASE READ THIS LICENSE AGREEMENT ("AGREEMENT") CAREFULLY. THIS AGREEMENT IS
-A BINDING LEGAL AGREEMENT ENTERED INTO BY AND BETWEEN YOU (OR IF YOU ARE
-ENTERING INTO THIS AGREEMENT ON BEHALF OF AN ENTITY, THEN THE ENTITY THAT YOU
-REPRESENT) AND QUALCOMM TECHNOLOGIES, INC. ("QTI" "WE" "OUR" OR "US"). THIS IS
-THE AGREEMENT THAT APPLIES TO YOUR USE OF THE DESIGNATED AND/OR LINKED
-APPLICATIONS, THE ENCLOSED QUALCOMM TECHNOLOGIES' MATERIALS, INCLUDING RELATED
-DOCUMENTATION AND ANY UPDATES OR IMPROVEMENTS THEREOF
-(COLLECTIVELY, "MATERIALS"). BY USING OR COMPLETING THE INSTALLATION OF THE
-MATERIALS, YOU ARE ACCEPTING THIS AGREEMENT AND YOU AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS. IF YOU DO NOT AGREE TO THESE TERMS, QTI IS UNWILLING TO
-AND DOES NOT LICENSE THE MATERIALS TO YOU. IF YOU DO NOT AGREE TO THESE TERMS
-YOU MUST DISCONTINUE THE INSTALLATION PROCESS AND YOU MAY NOT USE THE MATERIALS
-OR RETAIN ANY COPIES OF THE MATERIALS. ANY USE OR POSSESSION OF THE MATERIALS
-BY YOU IS SUBJECT TO THE TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT.
-
-1. RIGHT TO USE DELIVERABLES; RESTRICTIONS.
-
- 1.1 License. Subject to the terms and conditions of this Agreement,
- including, without limitation, the restrictions, conditions, limitations and
- exclusions set forth in this Agreement, QTI hereby grants to you a
- nonexclusive, limited license under QTI's copyrights to: (i) install and use
- the Materials; and (ii) to reproduce and redistribute the binary code portions
- of the Materials (the "Redistributable Binary Code"). You may make and use a
- reasonable number of copies of any documentation.
-
- 1.2 Redistribution Restrictions. Distribution of the Redistributable Binary
- Code is subject to the following restrictions: (i) Redistributable Binary Code
- may only be distributed in binary format and may not be distributed in source
- code format:; (ii) the Redistributable Binary Code may only operate in
- conjunction with platforms incorporating Qualcomm Technologies, Inc. chipsets;
- (iii) redistribution of the Redistributable Binary Code must include the .txt
- file setting forth the terms and condition of this Agreement; (iv) you may not
- use Qualcomm Technologies' or its affiliates or subsidiaries name, logo or
- trademarks; and (v) copyright, trademark, patent and any other notices that
- appear on the Materials may not be removed or obscured.
-
- 1.3 Additional Restrictions. Except as expressly permitted by this Agreement,
- you shall have no right to sublicense, transfer or otherwise disclose the
- Materials to any third party. You shall not reverse engineer, reverse
- assemble, reverse translate, decompile or reduce to source code form any
- portion of the Materials provided in object code form or executable form.
- Except for the purposes expressly permitted in this Agreement, You shall not
- use the Materials for any other purpose. QTI (or its licensors) shall retain
- title and all ownership rights in and to the Materials and any alterations,
- modifications (including all derivative works), translations or adaptations
- made of the Materials, and all copies thereof, and nothing herein shall be
- deemed to grant any right to You under any of QTI's or its affiliates'
- patents. You shall not subject the Materials to any third party license
- terms (e.g., open source license terms). You shall not use the Materials for
- the purpose of identifying or providing evidence to support any potential
- patent infringement claim against QTI, its affiliates, or any of QTI's or
- QTI's affiliates' suppliers and/or direct or indirect customers. QTI hereby
- reserves all rights not expressly granted herein.
-
- 1.4 Third Party Software and Materials. The Software may contain or link to
- certain software and/or materials that are written or owned by third parties.
- Such third party code and materials may be licensed under separate or
- different terms and conditions and are not licensed to you under the terms of
- this Agreement. You agree to comply with all terms and conditions imposed on
- you in the applicable third party licenses. Such terms and conditions may
- impose certain obligations on you as a condition to the permitted use of such
- third party code and materials. QTI does not represent or warrant that such
- third party licensors have or will continue to license or make available their
- code and materials to you.
-
- 1.5 Feedback. QTI may from time to time receive suggestions, feedback or
- other information from You regarding the Materials. Any suggestions, feedback
- or other disclosures received from You are and shall be entirely voluntary on
- the part of You. Notwithstanding any other term in this Agreement, QTI shall
- be free to use suggestions, feedback or other information received from You,
- without obligation of any kind to You. The Parties agree that all inventions,
- product improvements, and modifications conceived of or made by QTI that are
- based, either in whole or in part, on ideas, feedback, suggestions, or
- recommended improvements received from You are the exclusive property of QTI,
- and all right, title and interest in and to any such inventions, product
- improvements, and modifications will vest solely in QTI.
-
- 1.6 No Technical Support. QTI is under no obligation to provide any form of
- technical support for the Materials, and if QTI, in its sole discretion,
- chooses to provide any form of support or information relating to the
- Materials, such support and information shall be deemed confidential and
- proprietary to QTI.
-
-2. WARRANTY DISCLAIMER. YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT THE USE OF
-THE MATERIALS IS AT YOUR SOLE RISK. THE MATERIALS AND TECHNICAL SUPPORT, IF
-ANY, ARE PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR
-IMPLIED. QTI ITS LICENSORS AND AFFILIATES MAKE NO WARRANTIES, EXPRESS OR
-IMPLIED, WITH RESPECT TO THE MATERIALS OR ANY OTHER INFORMATION OR DOCUMENTATION
-PROVIDED UNDER THIS AGREEMENT, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR AGAINST INFRINGEMENT, OR
-ANY EXPRESS OR IMPLIED WARRANTY ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF
-DEALING OR COURSE OF PERFORMANCE. NOTHING CONTAINED IN THIS AGREEMENT SHALL BE
-CONSTRUED AS (I) A WARRANTY OR REPRESENTATION BY QTI, ITS LICENSORS OR
-AFFILIATES AS TO THE VALIDITY OR SCOPE OF ANY PATENT, COPYRIGHT OR OTHER
-INTELLECTUAL PROPERTY RIGHT OR (II) A WARRANTY OR REPRESENTATION BY QTI THAT ANY
-MANUFACTURE OR USE WILL BE FREE FROM INFRINGEMENT OF PATENTS, COPYRIGHTS OR
-OTHER INTELLECTUAL PROPERTY RIGHTS OF OTHERS, AND IT SHALL BE THE SOLE
-RESPONSIBILITY OF YOU TO MAKE SUCH DETERMINATION AS IS NECESSARY WITH RESPECT TO
-THE ACQUISITION OF LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY OF
-THIRD PARTIES.
-
-3. NO OTHER LICENSES OR INTELLECTUAL PROPERTY RIGHTS. Neither this Agreement,
-nor any act by QTI or any of its affiliates pursuant to this Agreement or
-relating to the Materials (including, without limitation, the provision by QTI
-or its affiliates of the Materials), shall provide to You any license or any
-other rights whatsoever under any patents, trademarks, trade secrets, copyrights
-or any other intellectual property of QTI or any of its affiliates, except for
-the copyright rights expressly licensed under this Agreement. You understand and
-agree that:
-
- (i) Neither this Agreement, nor delivery of the Materials, grants any right to
- practice, or any other right at all with respect to, any patent of QTI or any
- of its affiliates; and
-
- (ii) A separate license agreement from QUALCOMM Incorporated is needed to use
- or practice any patent of QUALCOMM Incorporated. You agree not to contend in
- any context that, as a result of the provision or use of the Materials, either
- QTI or any of its affiliates has any obligation to extend, or You or any other
- party has obtained any right to, any license, whether express or implied, with
- respect to any patent of QTI or any of its affiliates for any purpose.
-
-4. TERMINATION. This Agreement shall be effective upon acceptance, or access or
-use of the Materials (whichever occurs first) by You and shall continue until
-terminated. You may terminate the Agreement at any time by deleting and
-destroying all copies of the Materials and all related information in Your
-possession or control. This Agreement terminates immediately and automatically,
-with or without notice, if You fail to comply with any provision hereof.
-Additionally, QTI may at any time terminate this Agreement, without cause, upon
-notice to You. Upon termination You must, to the extent possible, delete or
-destroy all copies of the Materials in Your possession and the license granted
-to You in this Agreement shall terminate. Sections 1.2 through 10 shall survive
-the termination of this Agreement. In the event that any restrictions,
-conditions, limitations are found to be either invalid or unenforceable, the
-rights granted to You in Section 1 (License) shall be null, void and ineffective
-from the Effective Date, and QTI shall also have the right to terminate this
-Agreement immediately, and with retroactive effect to the effective date.
-
-5. LIMITATION OF LIABILITY. IN NO EVENT SHALL QTI, QTI's AFFILIATES OR ITS
-LICENSORS BE LIABLE TO YOU FOR ANY INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES,
-INCLUDING BUT NOT LIMITED TO ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL
-DAMAGES, ARISING OUT OF THE USE OR INABILITY TO USE, OR THE DELIVERY OR FAILURE
-TO DELIVER, ANY OF THE DELIVERABLES, OR ANY BREACH OF ANY OBLIGATION UNDER THIS
-AGREEMENT, EVEN IF QTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-THE FOREGOING LIMITATION OF LIABILITY SHALL REMAIN IN FULL FORCE AND EFFECT
-REGARDLESS OF WHETHER YOUR REMEDIES HEREUNDER ARE DETERMINED TO HAVE FAILED OF
-THEIR ESSENTIAL PURPOSE. THE ENTIRE LIABILITY OF QTI, QTI's AFFILIATES AND ITS
-LICENSORS, AND THE SOLE AND EXCLUSIVE REMEDY OF YOU, FOR ANY CLAIM OR CAUSE OF
-ACTION ARISING HEREUNDER (WHETHER IN CONTRACT, TORT, OR OTHERWISE) SHALL NOT
-EXCEED US$50.
-
-6. INDEMNIFICATION. You agree to indemnify and hold harmless QTI and its
-officers, directors, employees and successors and assigns against any and all
-third party claims, demands, causes of action, losses, liabilities, damages,
-costs and expenses, incurred by QTI (including but not limited to costs of
-defense, investigation and reasonable attorney's fees) arising out of, resulting
-from or related to: (i) any breach of this Agreement by You; and (ii) your acts,
-omissions, products and services. If requested by QTI, You agree to defend QTI
-in connection with any third party claims, demands, or causes of action
-resulting from, arising out of or in connection with any of the foregoing.
-
-7. ASSIGNMENT. You shall not assign this Agreement or any right or interest
-under this Agreement, nor delegate any obligation to be performed under this
-Agreement, without QTI's prior written consent. For purposes of this Section 7,
-an "assignment" by You under this Section shall be deemed to include, without
-limitation, any merger, consolidation, sale of all or substantially all of its
-assets, or any substantial change in the management or control of You.
-Any attempted assignment in contravention of this Section 9 shall be void.
-QTI may freely assign this Agreement or delegate any or all of its rights and
-obligations hereunder to any third party.
-
-8. COMPLIANCE WITH LAWS; APPLICABLE LAW. You agree to comply with all
-applicable local, international and national laws and regulations and with U.S.
-Export Administration Regulations, as they apply to the subject matter of this
-Agreement. This Agreement is governed by the laws of the State of California,
-excluding California's choice of law rules.
-
-9. CONTRACTING PARTIES. If the Materials are downloaded on any computer owned
-by a corporation or other legal entity, then this Agreement is formed by and
-between QTI and such entity. The individual accepting the terms of this
-Agreement represents and warrants to QTI that they have the authority to bind
-such entity to the terms and conditions of this Agreement.
-
-10. MISCELLANEOUS PROVISIONS. This Agreement, together with all exhibits
-attached hereto, which are incorporated herein by this reference, constitutes
-the entire agreement between QTI and You and supersedes all prior negotiations,
-representations and agreements between the parties with respect to the subject
-matter hereof. No addition or modification of this Agreement shall be effective
-unless made in writing and signed by the respective representatives of QTI and
-You. The restrictions, limitations, exclusions and conditions set forth in this
-Agreement shall apply even if QTI or any of its affiliates becomes aware of or
-fails to act in a manner to address any violation or failure to comply
-therewith. You hereby acknowledge and agree that the restrictions, limitations,
-conditions and exclusions imposed in this Agreement on the rights granted in
-this Agreement are not a derogation of the benefits of such rights. You further
-acknowledges that, in the absence of such restrictions, limitations, conditions
-and exclusions, QTI would not have entered into this Agreement with You. Each
-party shall be responsible for and shall bear its own expenses in connection
-with this Agreement. If any of the provisions of this Agreement are determined
-to be invalid, illegal, or otherwise unenforceable, the remaining provisions
-shall remain in full force and effect. This Agreement is entered into solely
-in the English language, and if for any reason any other language version is
-prepared by any party, it shall be solely for convenience and the English
-version shall govern and control all aspects. If You are located in the
-province of Quebec, Canada, the following applies: The Parties hereby confirm
-they have requested this Agreement and all related documents be prepared
-in English.. \ No newline at end of file
diff --git a/db845c/firmware/qcom/venus-5.2/venus.b00 b/db845c/firmware/qcom/venus-5.2/venus.b00
deleted file mode 100644
index 41b63be..0000000
--- a/db845c/firmware/qcom/venus-5.2/venus.b00
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/qcom/venus-5.2/venus.b01 b/db845c/firmware/qcom/venus-5.2/venus.b01
deleted file mode 100644
index a9bae79..0000000
--- a/db845c/firmware/qcom/venus-5.2/venus.b01
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/qcom/venus-5.2/venus.b02 b/db845c/firmware/qcom/venus-5.2/venus.b02
deleted file mode 100644
index 22052a0..0000000
--- a/db845c/firmware/qcom/venus-5.2/venus.b02
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/qcom/venus-5.2/venus.b03 b/db845c/firmware/qcom/venus-5.2/venus.b03
deleted file mode 100644
index 2ad2108..0000000
--- a/db845c/firmware/qcom/venus-5.2/venus.b03
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/qcom/venus-5.2/venus.b04 b/db845c/firmware/qcom/venus-5.2/venus.b04
deleted file mode 100644
index 90c7fc9..0000000
--- a/db845c/firmware/qcom/venus-5.2/venus.b04
+++ /dev/null
@@ -1 +0,0 @@
- Ð­Þ Ð­Þ Ð­Þ Ð­Þ Ð­Þ Ð­Þ Ð­Þ Ð­Þ \ No newline at end of file
diff --git a/db845c/firmware/qcom/venus-5.2/venus.mdt b/db845c/firmware/qcom/venus-5.2/venus.mdt
deleted file mode 100644
index 3e39973..0000000
--- a/db845c/firmware/qcom/venus-5.2/venus.mdt
+++ /dev/null
Binary files differ
diff --git a/db845c/firmware/wlanmdsp.mbn b/db845c/firmware/wlanmdsp.mbn
deleted file mode 100644
index 1e3251c..0000000
--- a/db845c/firmware/wlanmdsp.mbn
+++ /dev/null
Binary files differ
diff --git a/db845c_mini.mk b/db845c_mini.mk
new file mode 100644
index 0000000..01ff129
--- /dev/null
+++ b/db845c_mini.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/mini.mk)
+$(call inherit-product, device/linaro/dragonboard/db845c/device.mk)
+
+# Product overrides
+PRODUCT_NAME := db845c_mini
+PRODUCT_DEVICE := db845c
+PRODUCT_BRAND := Android
diff --git a/device-common.mk b/device-common.mk
index 7be64f9..6601cda 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2014 The Android Open-Source Project
+# Copyright (C) 2022 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.
@@ -14,159 +14,66 @@
# limitations under the License.
#
-# Enable updating of APEXes
-$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
-
-# Device overlay
-DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay
-
-# Build and run only ART
-PRODUCT_RUNTIMES := runtime_libart_default
-
-PRODUCT_SHIPPING_API_LEVEL := 29
-PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
-
-# vndk
-PRODUCT_PACKAGES := vndk-sp
+TARGET_KERNEL_DIR ?= device/linaro/dragonboard-kernel/android-$(TARGET_KERNEL_USE)
+
+TARGET_USES_GKI ?= true
+
+ifeq ($(TARGET_USES_GKI), true)
+ TARGET_MODS := $(wildcard $(TARGET_KERNEL_DIR)/*.ko)
+ ifneq ($(TARGET_MODS),)
+ BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(TARGET_MODS)
+ endif
+endif
+
+PRODUCT_SHIPPING_API_LEVEL := 31
+
+# Check vendor package version
+# If you need to make changes to the vendor partition,
+# please modify the source git project here:
+# https://staging-git.codelinaro.org/linaro/linaro-aosp/aosp-linaro-vendor-package
+include device/linaro/dragonboard/vendor-package-ver.mk
+ifneq (,$(wildcard $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk))
+ # Unfortunately inherit-product doesn't export build variables from the
+ # called make file to the caller, so we have to include it directly here.
+ include $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk
+ ifneq ($(TARGET_LINARO_VENDOR_VERSION), $(EXPECTED_LINARO_VENDOR_VERSION))
+ $(warning TARGET_LINARO_VENDOR_VERSION ($(TARGET_LINARO_VENDOR_VERSION)) does not match exiting the build ($(EXPECTED_LINARO_VENDOR_VERSION)).)
+ $(warning Please download new binaries here:)
+ $(warning $(VND_PKG_URL) )
+ $(warning And extract in the ANDROID_TOP_DIR)
+ # Would be good to error out here, but that causes other issues
+ endif
+else
+ $(warning Missing Linaro Vendor Package!)
+ $(warning Please download new binaries here:)
+ $(warning $(VND_PKG_URL) )
+ $(warning And extract in the ANDROID_TOP_DIR)
+ # Would be good to error out here, but that causes other issues
+endif
+
+PRODUCT_SOONG_NAMESPACES += \
+ device/linaro/dragonboard \
+ vendor/linaro/linux-firmware/$(EXPECTED_LINARO_VENDOR_VERSION) \
+ vendor/linaro/db845c/$(EXPECTED_LINARO_VENDOR_VERSION) \
+ vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)
# Dynamic partitions
PRODUCT_BUILD_SUPER_PARTITION := true
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
-# HACK: Avoid usb crash
-PRODUCT_PRODUCT_PROPERTIES := \
- persist.adb.nonblocking_ffs=0 \
- ro.adb.nonblocking_ffs=0
-
-# Display
-PRODUCT_PACKAGES += \
- android.hardware.drm@1.0-impl \
- android.hardware.drm@1.0-service \
- android.hardware.graphics.allocator@2.0-impl \
- android.hardware.graphics.allocator@2.0-service \
- android.hardware.graphics.composer@2.2-impl \
- android.hardware.graphics.composer@2.2-service \
- android.hardware.graphics.mapper@2.0-impl-2.1 \
- gralloc.gbm \
- hwcomposer.drm \
- libGLES_mesa
-
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.hardware.gralloc=gbm \
- ro.hardware.hwcomposer=drm \
- debug.sf.no_hw_vsync=1 \
- hwc.drm.use_framebuffer_target=1 \
- hwc.drm.use_overlay_planes=0 \
- ro.sf.lcd_density=160 \
- ro.opengles.version=196608 \
- persist.demo.rotationlock=1
-
-# Use Launcher3QuickStep
-PRODUCT_PACKAGES += Launcher3QuickStep
-
-# Enable WiFi
-PRODUCT_PACKAGES += \
- hostapd \
- libwpa_client \
- wpa_supplicant \
- wpa_supplicant.conf \
- wificond \
- wifilogd
-
-PRODUCT_PROPERTY_OVERRIDES += \
- wifi.interface=wlan0 \
- wifi.supplicant_scan_interval=15
-
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
- frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
- $(LOCAL_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
- $(LOCAL_PATH)/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
-
-# Enable BT
-PRODUCT_PACKAGES += \
- android.hardware.bluetooth@1.1-service.btlinux
-
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
- frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
-
-# Audio
-PRODUCT_PACKAGES += \
- android.hardware.audio@4.0-impl:32 \
- android.hardware.audio.effect@4.0-impl:32 \
- android.hardware.audio@2.0-service \
- android.hardware.soundtrigger@2.0-impl \
- android.hardware.bluetooth.audio@2.0-impl
-
-# Build default bluetooth a2dp and usb audio HALs
-PRODUCT_PACKAGES += \
- audio.a2dp.default \
- audio.bluetooth.default \
- audio.usb.default \
- audio.r_submix.default
-
-# Build tinyalsa cli tools for debugging
-PRODUCT_PACKAGES += \
- tinyplay \
- tinycap \
- tinymix \
- tinypcminfo
+# Enable Virtual A/B
+AB_OTA_UPDATER := true
+AB_OTA_PARTITIONS += \
+ product \
+ system \
+ system_ext \
+ vendor
-# audio policy configuration
-USE_XML_AUDIO_POLICY_CONF := 1
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/etc/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
- $(LOCAL_PATH)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
- frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
- frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml
-
-# Copy media codecs config file
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/etc/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml
-
-# Memtrack
-PRODUCT_PACKAGES += \
- memtrack.default \
- android.hardware.memtrack@1.0-service \
- android.hardware.memtrack@1.0-impl
-
-# Keymaster
-PRODUCT_PACKAGES += \
- android.hardware.keymaster@3.0-impl \
- android.hardware.keymaster@3.0-service
-
-# Gatekeeper
-PRODUCT_PACKAGES += \
- android.hardware.gatekeeper@1.0-service.software
-
-# Health
-PRODUCT_PACKAGES += \
- android.hardware.health@2.0-service \
- android.hardware.health@2.0-impl
-
-# mkbootimg host tool to build boot.img separately
-PRODUCT_HOST_PACKAGES := \
- mkbootimg
-
-# Copy standard platform config files
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
- frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \
- frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
- frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \
- frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \
- frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
- frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
- frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
- frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml
-
-PRODUCT_SOONG_NAMESPACES += external/mesa3d
+ $(TARGET_KERNEL_DIR)/Image.gz:kernel \
+ device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.$(TARGET_HARDWARE) \
+ device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(TARGET_HARDWARE) \
+ device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).rc \
+ device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).usb.rc \
+ device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/$(TARGET_HARDWARE).kl
diff --git a/etc/audio_policy_configuration.xml b/etc/audio_policy_configuration.xml
index c94718e..fec99cc 100644
--- a/etc/audio_policy_configuration.xml
+++ b/etc/audio_policy_configuration.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- Copyright (C) 2015 The Android Open Source Project
+<!-- Copyright (C) 2019 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.
@@ -15,15 +15,40 @@
-->
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
-
- <globalConfiguration speaker_drc_enabled="false"/>
-
+ <!-- version section contains a “version†tag in the form “major.minor†e.g version=â€1.0†-->
+
+ <!-- Global configuration Decalaration -->
+ <globalConfiguration speaker_drc_enabled="true"/>
+
+
+ <!-- Modules section:
+ There is one section per audio HW module present on the platform.
+ Each module section will contains two mandatory tags for audio HAL “halVersion†and “nameâ€.
+ The module names are the same as in current .conf file:
+ “primaryâ€, “A2DPâ€, “remote_submixâ€, “USBâ€
+ Each module will contain the following sections:
+ “devicePortsâ€: a list of device descriptors for all input and output devices accessible via this
+ module.
+ This contains both permanently attached devices and removable devices.
+ “mixPortsâ€: listing all output and input streams exposed by the audio HAL
+ “routesâ€: list of possible connections between input and output devices or between stream and
+ devices.
+ "route": is defined by an attribute:
+ -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
+ -"sink": the sink involved in this route
+ -"sources": all the sources than can be connected to the sink via vis route
+ “attachedDevicesâ€: permanently attached devices.
+ The attachedDevices section is a list of devices names. The names correspond to device names
+ defined in <devicePorts> section.
+ “defaultOutputDeviceâ€: device to be used by default when no policy rule applies
+ -->
<modules>
<!-- Primary Audio HAL -->
- <module name="primary" halVersion="2.0">
+ <module name="primary" halVersion="3.0">
<attachedDevices>
<item>Speaker</item>
<item>Built-In Mic</item>
+ <item>Echo Reference</item>
</attachedDevices>
<defaultOutputDevice>Speaker</defaultOutputDevice>
<mixPorts>
@@ -36,10 +61,17 @@
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
</mixPort>
+ <mixPort name="echo reference" role="sink">
+ <profile name="echo_reference" format="AUDIO_FORMAT_PCM_32_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
+ </mixPort>
</mixPorts>
<devicePorts>
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
- <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER">
+ <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
+ <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
</devicePort>
@@ -49,10 +81,6 @@
</devicePort>
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
</devicePort>
- <devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
- </devicePort>
- <devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
- </devicePort>
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
</devicePort>
@@ -60,6 +88,11 @@
</devicePort>
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
</devicePort>
+ <devicePort tagName="Echo Reference" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source">
+ <profile name="echo_reference" format="AUDIO_FORMAT_PCM_32_BIT"
+ samplingRates="48000"
+ channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
+ </devicePort>
</devicePorts>
<!-- route declaration, i.e. list all available sources for a given sink -->
<routes>
@@ -69,16 +102,14 @@
sources="primary output"/>
<route type="mix" sink="Wired Headphones"
sources="primary output"/>
- <route type="mix" sink="Aux Digital"
- sources="primary output"/>
<route type="mix" sink="BT SCO"
sources="primary output"/>
<route type="mix" sink="BT SCO Headset"
sources="primary output"/>
- <route type="mix" sink="BT SCO Car Kit"
- sources="primary output"/>
<route type="mix" sink="primary input"
sources="Built-In Mic,Wired Headset Mic,BT SCO Headset Mic"/>
+ <route type="mix" sink="echo reference"
+ sources="Echo Reference"/>
</routes>
</module>
diff --git a/etc/external_camera_config.xml b/etc/external_camera_config.xml
new file mode 100644
index 0000000..991ff40
--- /dev/null
+++ b/etc/external_camera_config.xml
@@ -0,0 +1,28 @@
+<ExternalCamera>
+ <Provider>
+ <ignore> <!-- Internal video devices to be ignored by external camera HAL -->
+ </ignore>
+ </Provider>
+ <!-- See ExternalCameraUtils.cpp for default values of Device configurations below -->
+ <Device>
+ <!-- Max JPEG buffer size in bytes-->
+ <MaxJpegBufferSize bytes="3145728"/> <!-- 3MB (~= 1080p YUV420) -->
+ <!-- Size of v4l2 buffer queue when streaming >= 30fps -->
+ <!-- Larger value: more request can be cached pipeline (less janky) -->
+ <!-- Smaller value: use less memory -->
+ <NumVideoBuffers count="4"/>
+ <!-- Size of v4l2 buffer queue when streaming < 30fps -->
+ <NumStillBuffers count="2"/>
+
+ <!-- List of maximum fps for various output sizes -->
+ <!-- Any image size smaller than the size listed in Limit row will report
+ fps (as minimum frame duration) up to the fpsBound value. -->
+ <FpsList>
+ <!-- width/height must be increasing, fpsBound must be decreasing-->
+ <Limit width="640" height="480" fpsBound="30.0"/>
+ <Limit width="1280" height="720" fpsBound="15.0"/>
+ <Limit width="1920" height="1080" fpsBound="10.0"/>
+ <!-- image size larger than the last entry will not be supported-->
+ </FpsList>
+ </Device>
+</ExternalCamera>
diff --git a/etc/media_profiles.xml b/etc/media_profiles.xml
new file mode 100644
index 0000000..2ffb7a3
--- /dev/null
+++ b/etc/media_profiles.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, 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.
+*/
+-->
+<!DOCTYPE MediaSettings SYSTEM "/system/etc/media_profiles_V1_0.dtd">
+<MediaSettings>
+ <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+ <CamcorderProfiles cameraId="0">
+ <!-- Iffy! Lets pretend vga (640x480) is 480p! -->
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="6000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="128000"
+ width="320"
+ height="240"
+ frameRate="30" />
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <EncoderOutputFileFormat name="3gp" />
+ <EncoderOutputFileFormat name="mp4" />
+
+ <!--
+ If a codec is not enabled, it is invisible to the applications
+ In other words, the applications won't be able to use the codec
+ or query the capabilities of the codec at all if it is disabled
+ -->
+ <VideoEncoderCap name="h264" enabled="true"
+ minBitRate="64000" maxBitRate="12000000"
+ minFrameWidth="176" maxFrameWidth="1280"
+ minFrameHeight="144" maxFrameHeight="720"
+ minFrameRate="15" maxFrameRate="30" />
+
+ <VideoEncoderCap name="h263" enabled="true"
+ minBitRate="64000" maxBitRate="12000000"
+ minFrameWidth="176" maxFrameWidth="1280"
+ minFrameHeight="144" maxFrameHeight="720"
+ minFrameRate="15" maxFrameRate="30" />
+
+ <VideoEncoderCap name="m4v" enabled="true"
+ minBitRate="64000" maxBitRate="12000000"
+ minFrameWidth="176" maxFrameWidth="1280"
+ minFrameHeight="144" maxFrameHeight="720"
+ minFrameRate="15" maxFrameRate="30" />
+
+ <AudioEncoderCap name="aac" enabled="true"
+ minBitRate="8000" maxBitRate="96000"
+ minSampleRate="8000" maxSampleRate="48000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrwb" enabled="true"
+ minBitRate="6600" maxBitRate="23050"
+ minSampleRate="16000" maxSampleRate="16000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrnb" enabled="true"
+ minBitRate="5525" maxBitRate="12200"
+ minSampleRate="8000" maxSampleRate="8000"
+ minChannels="1" maxChannels="1" />
+
+ <!--
+ FIXME:
+ We do not check decoder capabilities at present
+ At present, we only check whether windows media is visible
+ for TEST applications. For other applications, we do
+ not perform any checks at all.
+ -->
+ <VideoDecoderCap name="wmv" enabled="false"/>
+ <AudioDecoderCap name="wma" enabled="false"/>
+</MediaSettings>
diff --git a/etc/mixer_paths.xml b/etc/mixer_paths.xml
new file mode 100644
index 0000000..966e1ef
--- /dev/null
+++ b/etc/mixer_paths.xml
@@ -0,0 +1,11 @@
+<mixer>
+ <!-- Enable HDMI out for db845c -->
+ <path name="hdmi_db845c">
+ <ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+
+ <!-- Enable HDMI out for rb5 -->
+ <path name="hdmi_rb5">
+ <ctl name="TERT_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+ </path>
+</mixer>
diff --git a/etc/permissions/android.software.xml b/etc/permissions/android.software.xml
new file mode 100644
index 0000000..742a086
--- /dev/null
+++ b/etc/permissions/android.software.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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 are the hardware components that all handheld devices
+ must include. Devices with optional hardware must also include extra
+ hardware files, per the comments below.
+
+ Handheld devices include phones, mobile Internet devices (MIDs),
+ Personal Media Players (PMPs), small tablets (7" or less), and similar
+ devices.
+-->
+<permissions>
+ <!-- following features are said to be "basic system services"
+ in frameworks/native/data/etc/tablet_core_hardware.xml,
+ -->
+ <feature name="android.software.activities_on_secondary_displays" />
+ <feature name="android.software.autofill" />
+ <feature name="android.software.companion_device_setup" />
+ <feature name="android.software.home_screen" />
+ <feature name="android.software.input_methods" />
+ <feature name="android.software.picture_in_picture" />
+ <feature name="android.software.print" />
+
+ <!-- need by following cts test
+ android.app.cts.ActivityManagerProcessStateTest#testCantSaveStateLaunchAndBackground
+ android.app.cts.ActivityManagerProcessStateTest#testCantSaveStateLaunchAndSwitch
+ -->
+ <feature name="android.software.cant_save_state" />
+
+</permissions>
diff --git a/fetch-vendor-package.sh b/fetch-vendor-package.sh
new file mode 100755
index 0000000..5e8d727
--- /dev/null
+++ b/fetch-vendor-package.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# fetch, check & extract the current vendor package
+set -e
+
+DIR_PARENT=$(cd $(dirname $0); pwd)
+if [ -z "${ANDROID_BUILD_TOP}" ]; then
+ ANDROID_BUILD_TOP=$(cd ${DIR_PARENT}/../../../; pwd)
+fi
+
+. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
+
+PKG_FILE=extract-linaro_devices-${EXPECTED_LINARO_VENDOR_VERSION}
+
+pushd ${ANDROID_BUILD_TOP}
+
+if [ ! -e "${PKG_FILE}.tgz" ]; then
+ curl -L ${VND_PKG_URL} -o ${PKG_FILE}.tgz
+fi
+
+# generate expected sha512sum, check & cleanup
+echo "${EXPECTED_LINARO_VENDOR_SHA} ${PKG_FILE}.tgz" > ${PKG_FILE}.tgz.sha
+sha512sum -c ${PKG_FILE}.tgz.sha
+rm ${PKG_FILE}.tgz.sha
+
+tar -xf ${PKG_FILE}.tgz
+./${PKG_FILE}.sh
+popd
diff --git a/fstab.common b/fstab.common
index 7ccfed5..f1bd034 100644
--- a/fstab.common
+++ b/fstab.common
@@ -1,6 +1,8 @@
-# Android fstab file.
-#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
-# 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
-LABEL=data /data ext4 discard,noauto_da_alloc,data=ordered,user_xattr,barrier=1 wait
-/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,formattable
+system /system ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+/dev/block/platform/soc@0/1d84000.ufshc/by-name/userdata /data ext4 discard,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1,inlinecrypt latemount,wait,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized,keydirectory=/metadata/vold/metadata_encryption,quota
+/dev/block/platform/soc@0/1d84000.ufshc/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,formattable,first_stage_mount,check
+/dev/block/platform/soc@0/1d84000.ufshc/by-name/misc /misc emmc defaults defaults
+/devices/platform/soc@0/8804000.sdhci/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto
+vendor /vendor ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+system_ext /system_ext ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
+product /product ext4 noatime,ro,errors=panic wait,logical,first_stage_mount,slotselect
diff --git a/fstab.ramdisk.common b/fstab.ramdisk.common
deleted file mode 100644
index a2dcc4c..0000000
--- a/fstab.ramdisk.common
+++ /dev/null
@@ -1,3 +0,0 @@
-system /system ext4 noatime,ro,errors=panic wait,logical,first_stage_mount
-vendor /vendor ext4 noatime,ro,errors=panic wait,logical,first_stage_mount
-system_ext /system_ext ext4 noatime,ro,errors=panic wait,logical,first_stage_mount
diff --git a/full.mk b/full.mk
new file mode 100644
index 0000000..fc1c0be
--- /dev/null
+++ b/full.mk
@@ -0,0 +1,253 @@
+#
+# Copyright (C) 2014 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.
+#
+
+# Enable updating of APEXes
+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+
+# Device overlay
+DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay
+
+# Build and run only ART
+PRODUCT_RUNTIMES := runtime_libart_default
+
+PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
+
+# Enable Scoped Storage related
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
+
+# vndk
+PRODUCT_PACKAGES := vndk-sp
+
+# HACK: Avoid usb crash
+PRODUCT_PRODUCT_PROPERTIES := \
+ persist.adb.nonblocking_ffs=0 \
+ ro.adb.nonblocking_ffs=0
+
+# Display
+PRODUCT_PACKAGES += \
+ android.hardware.drm@1.3-service.clearkey \
+ android.hardware.drm@1.3-service.widevine
+
+# Mesa
+PRODUCT_PACKAGES += \
+ libGLES_mesa \
+ libEGL_mesa \
+ libGLESv1_CM_mesa \
+ libGLESv2_mesa \
+ libgallium_dri \
+ libglapi
+
+TARGET_BUILD_MESA ?= false
+ifeq ($(TARGET_BUILD_MESA), true)
+ PRODUCT_SOONG_NAMESPACES += \
+ external/mesa3d
+endif
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.hardware.gralloc=minigbm_msm \
+ ro.hardware.hwcomposer=drm \
+ ro.opengles.version=196608 \
+ persist.demo.rotationlock=1
+
+# Vulkan
+PRODUCT_PACKAGES += \
+ vulkan.freedreno
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
+ frameworks/native/data/etc/android.software.vulkan.deqp.level-2021-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
+
+PRODUCT_VENDOR_PROPERTIES += \
+ ro.hardware.vulkan=freedreno
+
+# Will need to enable this after ANDROID_external_memory_android_hardware_buffer lands in mesa
+#TARGET_USES_VULKAN = true
+
+#
+# Hardware Composer HAL
+#
+PRODUCT_PACKAGES += \
+ hwcomposer.drm \
+ android.hardware.graphics.composer@2.3-impl \
+ android.hardware.graphics.composer@2.3-service
+
+#
+# Gralloc HAL
+#
+PRODUCT_PACKAGES += \
+ gralloc.minigbm_msm \
+ android.hardware.graphics.allocator@4.0-service.minigbm_msm \
+ android.hardware.graphics.mapper@4.0-impl.minigbm_msm
+
+
+# Use Launcher3QuickStep
+PRODUCT_PACKAGES += Launcher3QuickStep
+
+# Enable WiFi
+PRODUCT_PACKAGES += \
+ hostapd \
+ libwpa_client \
+ wpa_supplicant \
+ wpa_supplicant.conf \
+ wificond
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ wifi.interface=wlan0 \
+ wifi.supplicant_scan_interval=15
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
+ frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
+ $(LOCAL_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
+ $(LOCAL_PATH)/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
+
+# Enable BT
+PRODUCT_PACKAGES += \
+ android.hardware.bluetooth@1.1-service.btlinux
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
+
+#
+# Power HAL
+#
+PRODUCT_PACKAGES += \
+ android.hardware.power-service.example
+
+#
+# PowerStats HAL
+#
+PRODUCT_PACKAGES += \
+ android.hardware.power.stats-service.example
+
+
+# Audio
+PRODUCT_PACKAGES += \
+ android.hardware.audio.service \
+ android.hardware.audio@7.0-impl \
+ android.hardware.audio.effect@7.0-impl \
+ android.hardware.soundtrigger@2.3-impl \
+ android.hardware.bluetooth.audio@2.0-impl
+
+# Build default bluetooth a2dp and usb audio HALs
+PRODUCT_PACKAGES += \
+ audio.bluetooth.default \
+ audio.usb.default \
+ audio.r_submix.default
+
+# Build tinyalsa cli tools for debugging
+PRODUCT_PACKAGES += \
+ tinyplay \
+ tinycap \
+ tinymix \
+ tinypcminfo
+
+# audio policy configuration
+USE_XML_AUDIO_POLICY_CONF := 1
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/etc/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
+ $(LOCAL_PATH)/etc/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+ $(LOCAL_PATH)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
+ frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
+ frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml
+
+# Copy media codecs config file
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/etc/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
+ frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/seccomp_policy/mediaswcodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
+ $(LOCAL_PATH)/seccomp_policy/mediaswcodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaswcodec.policy
+
+# Copy hardware config file(s)
+PRODUCT_COPY_FILES += \
+ device/linaro/dragonboard/etc/permissions/android.software.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.xml
+
+
+# External Web Cam support
+PRODUCT_PACKAGES += \
+ android.hardware.camera.provider@2.4-impl \
+ android.hardware.camera.provider@2.4-external-service
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
+ $(LOCAL_PATH)/etc/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
+ $(LOCAL_PATH)/etc/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml
+
+# Keymaster
+PRODUCT_PACKAGES += \
+ android.hardware.keymaster@3.0-impl \
+ android.hardware.keymaster@3.0-service
+
+# Gatekeeper
+PRODUCT_PACKAGES += \
+ android.hardware.gatekeeper@1.0-service.software
+
+# Health
+PRODUCT_PACKAGES += \
+ android.hardware.health@2.1-impl-cuttlefish \
+ android.hardware.health@2.1-service
+
+# TODO: disable this service once we implement system suspend
+PRODUCT_PACKAGES += \
+ suspend_blocker
+
+# mkbootimg host tool to build boot.img separately
+PRODUCT_HOST_PACKAGES := \
+ mkbootimg
+
+# Userspace vendor services for WiFi/Audio to work
+PRODUCT_PACKAGES += \
+ pd-mapper \
+ qrtr-ns \
+ qrtr-cfg \
+ qrtr-lookup \
+ rmtfs \
+ tqftpserv
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/qcom/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qcom.rc
+
+# Copy standard platform config files
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
+ frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \
+ frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
+ frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \
+ frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \
+ frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
+ frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
+ frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
+ frameworks/native/data/etc/android.software.opengles.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
+ frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml
+
+DEVICE_MANIFEST_FILE := device/linaro/dragonboard/manifest.xml
+DEVICE_MATRIX_FILE := device/linaro/dragonboard/compatibility_matrix.xml
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
diff --git a/gralloc/Android.mk b/gralloc/Android.mk
deleted file mode 100644
index 049b019..0000000
--- a/gralloc/Android.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (C) 2016 Linaro, Ltd., Rob Herring <robh@kernel.org>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- gralloc_gbm.cpp \
- gralloc.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libdrm \
- libgbm \
- liblog \
- libcutils
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)
-
-LOCAL_C_INCLUDES += system/core/include hardware/libhardware/include
-LOCAL_C_INCLUDES += system/core/libsystem/include system/core
-
-LOCAL_MODULE := gralloc.gbm
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_PROPRIETARY_MODULE := true
-
-include $(BUILD_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)
-
-LOCAL_MODULE := libgralloc_drm
-LOCAL_MODULE_TAGS := optional
-LOCAL_PROPRIETARY_MODULE := true
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/gralloc/gralloc.cpp b/gralloc/gralloc.cpp
deleted file mode 100644
index 2753ee9..0000000
--- a/gralloc/gralloc.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
- * Copyright (C) 2010-2011 LunarG Inc.
- * Copyright (C) 2016 Linaro, Ltd., Rob Herring <robh@kernel.org>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#define LOG_TAG "GRALLOC-GBM"
-
-#include <cutils/log.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <pthread.h>
-#include <errno.h>
-
-#include <hardware/gralloc.h>
-#include <system/graphics.h>
-
-#include <gbm.h>
-
-#include "gralloc_drm.h"
-#include "gralloc_gbm_priv.h"
-
-struct gbm_module_t {
- gralloc_module_t base;
-
- pthread_mutex_t mutex;
- struct gbm_device *gbm;
-};
-
-/*
- * Initialize the DRM device object
- */
-static int gbm_init(struct gbm_module_t *dmod)
-{
- int err = 0;
-
- pthread_mutex_lock(&dmod->mutex);
- if (!dmod->gbm) {
- dmod->gbm = gbm_dev_create();
- if (!dmod->gbm)
- err = -EINVAL;
- }
- pthread_mutex_unlock(&dmod->mutex);
-
- return err;
-}
-
-static int gbm_mod_perform(const struct gralloc_module_t *mod, int op, ...)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *) mod;
- va_list args;
- int err;
- uint32_t uop = static_cast<uint32_t>(op);
-
- err = gbm_init(dmod);
- if (err)
- return err;
-
- va_start(args, op);
- switch (uop) {
- case GRALLOC_MODULE_PERFORM_GET_DRM_FD:
- {
- int *fd = va_arg(args, int *);
- *fd = gbm_device_get_fd(dmod->gbm);
- err = 0;
- }
- break;
- default:
- err = -EINVAL;
- break;
- }
- va_end(args);
-
- return err;
-}
-
-static int gbm_mod_register_buffer(const gralloc_module_t *mod,
- buffer_handle_t handle)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *) mod;
- int err;
-
- err = gbm_init(dmod);
- if (err)
- return err;
-
- pthread_mutex_lock(&dmod->mutex);
- err = gralloc_gbm_handle_register(handle, dmod->gbm);
- pthread_mutex_unlock(&dmod->mutex);
-
- return err;
-}
-
-static int gbm_mod_unregister_buffer(const gralloc_module_t *mod,
- buffer_handle_t handle)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *) mod;
- int err;
-
- pthread_mutex_lock(&dmod->mutex);
- err = gralloc_gbm_handle_unregister(handle);
- pthread_mutex_unlock(&dmod->mutex);
-
- return err;
-}
-
-static int gbm_mod_lock(const gralloc_module_t *mod, buffer_handle_t handle,
- int usage, int x, int y, int w, int h, void **ptr)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *) mod;
- int err;
-
- pthread_mutex_lock(&dmod->mutex);
-
- err = gralloc_gbm_bo_lock(handle, usage, x, y, w, h, ptr);
- ALOGV("buffer %p lock usage = %08x", handle, usage);
-
- pthread_mutex_unlock(&dmod->mutex);
- return err;
-}
-
-static int gbm_mod_unlock(const gralloc_module_t *mod, buffer_handle_t handle)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *) mod;
- int err;
-
- pthread_mutex_lock(&dmod->mutex);
- err = gralloc_gbm_bo_unlock(handle);
- pthread_mutex_unlock(&dmod->mutex);
-
- return err;
-}
-
-static int gbm_mod_close_gpu0(struct hw_device_t *dev)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *)dev->module;
- struct alloc_device_t *alloc = (struct alloc_device_t *) dev;
-
- gbm_dev_destroy(dmod->gbm);
- delete alloc;
-
- return 0;
-}
-
-static int gbm_mod_free_gpu0(alloc_device_t *dev, buffer_handle_t handle)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *) dev->common.module;
-
- pthread_mutex_lock(&dmod->mutex);
- gbm_free(handle);
- native_handle_close(handle);
- delete handle;
-
- pthread_mutex_unlock(&dmod->mutex);
- return 0;
-}
-
-static int gbm_mod_alloc_gpu0(alloc_device_t *dev,
- int w, int h, int format, int usage,
- buffer_handle_t *handle, int *stride)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *) dev->common.module;
- int err = 0;
-
- pthread_mutex_lock(&dmod->mutex);
-
- *handle = gralloc_gbm_bo_create(dmod->gbm, w, h, format, usage, stride);
- if (!*handle)
- err = -errno;
-
- ALOGV("buffer %p usage = %08x", *handle, usage);
- pthread_mutex_unlock(&dmod->mutex);
- return err;
-}
-
-static int gbm_mod_open_gpu0(struct gbm_module_t *dmod, hw_device_t **dev)
-{
- struct alloc_device_t *alloc;
- int err;
-
- err = gbm_init(dmod);
- if (err)
- return err;
-
- alloc = new alloc_device_t();
- if (!alloc)
- return -EINVAL;
-
- alloc->common.tag = HARDWARE_DEVICE_TAG;
- alloc->common.version = 0;
- alloc->common.module = &dmod->base.common;
- alloc->common.close = gbm_mod_close_gpu0;
-
- alloc->alloc = gbm_mod_alloc_gpu0;
- alloc->free = gbm_mod_free_gpu0;
-
- *dev = &alloc->common;
-
- return 0;
-}
-
-static int gbm_mod_open(const struct hw_module_t *mod,
- const char *name, struct hw_device_t **dev)
-{
- struct gbm_module_t *dmod = (struct gbm_module_t *) mod;
- int err;
-
- if (strcmp(name, GRALLOC_HARDWARE_GPU0) == 0)
- err = gbm_mod_open_gpu0(dmod, dev);
- else
- err = -EINVAL;
-
- return err;
-}
-
-static struct hw_module_methods_t gbm_mod_methods = {
- .open = gbm_mod_open
-};
-
-struct gbm_module_t HAL_MODULE_INFO_SYM = {
- .base = {
- .common = {
- .tag = HARDWARE_MODULE_TAG,
- .version_major = 1,
- .version_minor = 0,
- .id = GRALLOC_HARDWARE_MODULE_ID,
- .name = "GBM Memory Allocator",
- .author = "Rob Herring - Linaro",
- .methods = &gbm_mod_methods
- },
- .registerBuffer = gbm_mod_register_buffer,
- .unregisterBuffer = gbm_mod_unregister_buffer,
- .lock = gbm_mod_lock,
- .unlock = gbm_mod_unlock,
- .perform = gbm_mod_perform
- },
-
- .mutex = PTHREAD_MUTEX_INITIALIZER,
- .gbm = NULL,
-};
diff --git a/gralloc/gralloc_drm.h b/gralloc/gralloc_drm.h
deleted file mode 100644
index 0ece652..0000000
--- a/gralloc/gralloc_drm.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
- * Copyright (C) 2010-2011 LunarG Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _GRALLOC_DRM_H_
-#define _GRALLOC_DRM_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum {
- /* perform(const struct gralloc_module_t *mod,
- * int op,
- * int *fd);
- */
- GRALLOC_MODULE_PERFORM_GET_DRM_FD = 0x40000002,
-};
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _GRALLOC_DRM_H_ */
diff --git a/gralloc/gralloc_gbm.cpp b/gralloc/gralloc_gbm.cpp
deleted file mode 100644
index ab6c12b..0000000
--- a/gralloc/gralloc_gbm.cpp
+++ /dev/null
@@ -1,475 +0,0 @@
-/*
- * Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
- * Copyright (C) 2010-2011 LunarG Inc.
- * Copyright (C) 2016 Linaro, Ltd., Rob Herring <robh@kernel.org>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#define LOG_TAG "GRALLOC-GBM"
-
-#include <cutils/log.h>
-#include <cutils/atomic.h>
-#include <cutils/properties.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <assert.h>
-
-#include <hardware/gralloc.h>
-#include <system/graphics.h>
-
-#include <gbm.h>
-
-#include "gralloc_gbm_priv.h"
-#include <android/gralloc_handle.h>
-
-#include <unordered_map>
-
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-
-#define unlikely(x) __builtin_expect(!!(x), 0)
-
-static std::unordered_map<buffer_handle_t, struct gbm_bo *> gbm_bo_handle_map;
-
-struct bo_data_t {
- void *map_data;
- int lock_count;
- int locked_for;
-};
-
-void gralloc_gbm_destroy_user_data(struct gbm_bo *bo, void *data)
-{
- struct bo_data_t *bo_data = (struct bo_data_t *)data;
- delete bo_data;
-
- (void)bo;
-}
-
-static struct bo_data_t *gbm_bo_data(struct gbm_bo *bo) {
- return (struct bo_data_t *)gbm_bo_get_user_data(bo);
-}
-
-
-static uint32_t get_gbm_format(int format)
-{
- uint32_t fmt;
-
- switch (format) {
- case HAL_PIXEL_FORMAT_RGBA_8888:
- fmt = GBM_FORMAT_ABGR8888;
- break;
- case HAL_PIXEL_FORMAT_RGBX_8888:
- fmt = GBM_FORMAT_XBGR8888;
- break;
- case HAL_PIXEL_FORMAT_RGB_888:
- fmt = GBM_FORMAT_RGB888;
- break;
- case HAL_PIXEL_FORMAT_RGB_565:
- fmt = GBM_FORMAT_RGB565;
- break;
- case HAL_PIXEL_FORMAT_BGRA_8888:
- fmt = GBM_FORMAT_ARGB8888;
- break;
- case HAL_PIXEL_FORMAT_YV12:
- /* YV12 is planar, but must be a single buffer so ask for GR88 */
- fmt = GBM_FORMAT_GR88;
- break;
- case HAL_PIXEL_FORMAT_YCbCr_422_SP:
- case HAL_PIXEL_FORMAT_YCrCb_420_SP:
- default:
- fmt = 0;
- break;
- }
-
- return fmt;
-}
-
-static int gralloc_gbm_get_bpp(int format)
-{
- int bpp;
-
- switch (format) {
- case HAL_PIXEL_FORMAT_RGBA_8888:
- case HAL_PIXEL_FORMAT_RGBX_8888:
- case HAL_PIXEL_FORMAT_BGRA_8888:
- bpp = 4;
- break;
- case HAL_PIXEL_FORMAT_RGB_888:
- bpp = 3;
- break;
- case HAL_PIXEL_FORMAT_RGB_565:
- case HAL_PIXEL_FORMAT_YCbCr_422_I:
- bpp = 2;
- break;
- /* planar; only Y is considered */
- case HAL_PIXEL_FORMAT_YV12:
- case HAL_PIXEL_FORMAT_YCbCr_422_SP:
- case HAL_PIXEL_FORMAT_YCrCb_420_SP:
- bpp = 1;
- break;
- default:
- bpp = 0;
- break;
- }
-
- return bpp;
-}
-
-static unsigned int get_pipe_bind(int usage)
-{
- unsigned int bind = 0;
-
- if (usage & (GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN))
- bind |= GBM_BO_USE_LINEAR;
- if (usage & GRALLOC_USAGE_CURSOR)
- ;//bind |= GBM_BO_USE_CURSOR;
- if (usage & (GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE))
- bind |= GBM_BO_USE_RENDERING;
- if (usage & GRALLOC_USAGE_HW_FB)
- bind |= GBM_BO_USE_SCANOUT;
- if (usage & GRALLOC_USAGE_HW_COMPOSER)
- bind |= GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING;
-
- return bind;
-}
-
-static struct gbm_bo *gbm_import(struct gbm_device *gbm,
- buffer_handle_t _handle)
-{
- struct gbm_bo *bo;
- struct gralloc_handle_t *handle = gralloc_handle(_handle);
- #ifdef GBM_BO_IMPORT_FD_MODIFIER
- struct gbm_import_fd_modifier_data data;
- #else
- struct gbm_import_fd_data data;
- #endif
-
- int format = get_gbm_format(handle->format);
- if (handle->prime_fd < 0)
- return NULL;
-
- memset(&data, 0, sizeof(data));
- data.width = handle->width;
- data.height = handle->height;
- data.format = format;
- /* Adjust the width and height for a GBM GR88 buffer */
- if (handle->format == HAL_PIXEL_FORMAT_YV12) {
- data.width /= 2;
- data.height += handle->height / 2;
- }
-
- #ifdef GBM_BO_IMPORT_FD_MODIFIER
- data.num_fds = 1;
- data.fds[0] = handle->prime_fd;
- data.strides[0] = handle->stride;
- data.modifier = handle->modifier;
- bo = gbm_bo_import(gbm, GBM_BO_IMPORT_FD_MODIFIER, &data, 0);
- #else
- data.fd = handle->prime_fd;
- data.stride = handle->stride;
- bo = gbm_bo_import(gbm, GBM_BO_IMPORT_FD, &data, 0);
- #endif
-
- return bo;
-}
-
-static struct gbm_bo *gbm_alloc(struct gbm_device *gbm,
- buffer_handle_t _handle)
-{
- struct gbm_bo *bo;
- struct gralloc_handle_t *handle = gralloc_handle(_handle);
- int format = get_gbm_format(handle->format);
- int usage = get_pipe_bind(handle->usage);
- int width, height;
-
- width = handle->width;
- height = handle->height;
- if (usage & GBM_BO_USE_CURSOR) {
- if (handle->width < 64)
- width = 64;
- if (handle->height < 64)
- height = 64;
- }
-
- /*
- * For YV12, we request GR88, so halve the width since we're getting
- * 16bpp. Then increase the height by 1.5 for the U and V planes.
- */
- if (handle->format == HAL_PIXEL_FORMAT_YV12) {
- width /= 2;
- height += handle->height / 2;
- }
-
- ALOGV("create BO, size=%dx%d, fmt=%d, usage=%x",
- handle->width, handle->height, handle->format, usage);
- bo = gbm_bo_create(gbm, width, height, format, usage);
- if (!bo) {
- ALOGE("failed to create BO, size=%dx%d, fmt=%d, usage=%x",
- handle->width, handle->height, handle->format, usage);
- return NULL;
- }
-
- handle->prime_fd = gbm_bo_get_fd(bo);
- handle->stride = gbm_bo_get_stride(bo);
- #ifdef GBM_BO_IMPORT_FD_MODIFIER
- handle->modifier = gbm_bo_get_modifier(bo);
- #endif
-
- return bo;
-}
-
-void gbm_free(buffer_handle_t handle)
-{
- struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle);
-
- if (!bo)
- return;
-
- gbm_bo_handle_map.erase(handle);
- gbm_bo_destroy(bo);
-}
-
-/*
- * Return the bo of a registered handle.
- */
-struct gbm_bo *gralloc_gbm_bo_from_handle(buffer_handle_t handle)
-{
- return gbm_bo_handle_map[handle];
-}
-
-static int gbm_map(buffer_handle_t handle, int x, int y, int w, int h,
- int enable_write, void **addr)
-{
- int err = 0;
- int flags = GBM_BO_TRANSFER_READ;
- struct gralloc_gbm_handle_t *gbm_handle = gralloc_handle(handle);
- struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle);
- struct bo_data_t *bo_data = gbm_bo_data(bo);
- uint32_t stride;
-
- if (bo_data->map_data)
- return -EINVAL;
-
- if (gbm_handle->format == HAL_PIXEL_FORMAT_YV12) {
- if (x || y)
- ALOGE("can't map with offset for planar %p", bo);
- w /= 2;
- h += h / 2;
- }
-
- if (enable_write)
- flags |= GBM_BO_TRANSFER_WRITE;
-
- *addr = gbm_bo_map(bo, 0, 0, x + w, y + h, flags, &stride, &bo_data->map_data);
- ALOGV("mapped bo %p (%d, %d)-(%d, %d) at %p", bo, x, y, w, h, *addr);
- if (*addr == NULL)
- return -ENOMEM;
-
- assert(stride == gbm_bo_get_stride(bo));
-
- return err;
-}
-
-static void gbm_unmap(struct gbm_bo *bo)
-{
- struct bo_data_t *bo_data = gbm_bo_data(bo);
-
- gbm_bo_unmap(bo, bo_data->map_data);
- bo_data->map_data = NULL;
-}
-
-void gbm_dev_destroy(struct gbm_device *gbm)
-{
- int fd = gbm_device_get_fd(gbm);
-
- gbm_device_destroy(gbm);
- close(fd);
-}
-
-struct gbm_device *gbm_dev_create(void)
-{
- struct gbm_device *gbm;
- char path[PROPERTY_VALUE_MAX];
- int fd;
-
- property_get("gralloc.gbm.device", path, "/dev/dri/renderD128");
- fd = open(path, O_RDWR | O_CLOEXEC);
- if (fd < 0) {
- ALOGE("failed to open %s", path);
- return NULL;
- }
-
- gbm = gbm_create_device(fd);
- if (!gbm) {
- ALOGE("failed to create gbm device");
- close(fd);
- }
-
- return gbm;
-}
-
-/*
- * Register a buffer handle.
- */
-int gralloc_gbm_handle_register(buffer_handle_t _handle, struct gbm_device *gbm)
-{
- struct gbm_bo *bo;
-
- if (!_handle)
- return -EINVAL;
-
- if (gbm_bo_handle_map.count(_handle))
- return -EINVAL;
-
- bo = gbm_import(gbm, _handle);
- if (!bo)
- return -EINVAL;
-
- gbm_bo_handle_map.emplace(_handle, bo);
-
- return 0;
-}
-
-/*
- * Unregister a buffer handle. It is no-op for handles created locally.
- */
-int gralloc_gbm_handle_unregister(buffer_handle_t handle)
-{
- gbm_free(handle);
-
- return 0;
-}
-
-/*
- * Create a bo.
- */
-buffer_handle_t gralloc_gbm_bo_create(struct gbm_device *gbm,
- int width, int height, int format, int usage, int *stride)
-{
- struct gbm_bo *bo;
- native_handle_t *handle;
-
- handle = gralloc_handle_create(width, height, format, usage);
- if (!handle)
- return NULL;
-
- bo = gbm_alloc(gbm, handle);
- if (!bo) {
- native_handle_delete(handle);
- return NULL;
- }
-
- gbm_bo_handle_map.emplace(handle, bo);
-
- /* in pixels */
- struct gralloc_handle_t *ghandle = gralloc_handle(handle);
- *stride = ghandle->stride / gralloc_gbm_get_bpp(format);
-
- return handle;
-}
-
-/*
- * Lock a bo. XXX thread-safety?
- */
-int gralloc_gbm_bo_lock(buffer_handle_t handle,
- int usage, int x, int y, int w, int h,
- void **addr)
-{
- struct gralloc_handle_t *gbm_handle = gralloc_handle(handle);
- struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle);
- struct bo_data_t *bo_data;
-
- if (!bo)
- return -EINVAL;
-
- if ((gbm_handle->usage & usage) != (uint32_t)usage) {
- /* make FB special for testing software renderer with */
-
- if (!(gbm_handle->usage & GRALLOC_USAGE_SW_READ_OFTEN) &&
- !(gbm_handle->usage & GRALLOC_USAGE_HW_FB) &&
- !(gbm_handle->usage & GRALLOC_USAGE_HW_TEXTURE)) {
- ALOGE("bo.usage:x%X/usage:x%X is not GRALLOC_USAGE_HW_FB or GRALLOC_USAGE_HW_TEXTURE",
- gbm_handle->usage, usage);
- return -EINVAL;
- }
- }
-
- bo_data = gbm_bo_data(bo);
- if (!bo_data) {
- bo_data = new struct bo_data_t();
- gbm_bo_set_user_data(bo, bo_data, gralloc_gbm_destroy_user_data);
- }
-
- ALOGI("lock bo %p, cnt=%d, usage=%x", bo, bo_data->lock_count, usage);
-
- /* allow multiple locks with compatible usages */
- if (bo_data->lock_count && (bo_data->locked_for & usage) != usage)
- return -EINVAL;
-
- usage |= bo_data->locked_for;
-
- if (usage & (GRALLOC_USAGE_SW_WRITE_MASK |
- GRALLOC_USAGE_SW_READ_MASK)) {
- /* the driver is supposed to wait for the bo */
- int write = !!(usage & GRALLOC_USAGE_SW_WRITE_MASK);
- int err = gbm_map(handle, x, y, w, h, write, addr);
- if (err)
- return err;
- }
- else {
- /* kernel handles the synchronization here */
- }
-
- bo_data->lock_count++;
- bo_data->locked_for |= usage;
-
- return 0;
-}
-
-/*
- * Unlock a bo.
- */
-int gralloc_gbm_bo_unlock(buffer_handle_t handle)
-{
- struct gbm_bo *bo = gralloc_gbm_bo_from_handle(handle);
- struct bo_data_t *bo_data;
- if (!bo)
- return -EINVAL;
-
- bo_data = gbm_bo_data(bo);
-
- int mapped = bo_data->locked_for &
- (GRALLOC_USAGE_SW_WRITE_MASK | GRALLOC_USAGE_SW_READ_MASK);
-
- if (!bo_data->lock_count)
- return 0;
-
- if (mapped)
- gbm_unmap(bo);
-
- bo_data->lock_count--;
- if (!bo_data->lock_count)
- bo_data->locked_for = 0;
-
- return 0;
-}
diff --git a/gralloc/gralloc_gbm_priv.h b/gralloc/gralloc_gbm_priv.h
deleted file mode 100644
index 7174fb8..0000000
--- a/gralloc/gralloc_gbm_priv.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
- * Copyright (C) 2010-2011 LunarG Inc.
- * Copyright (C) 2016 Linaro, Ltd., Rob Herring <robh@kernel.org>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef _GRALLOC_GBM_PRIV_H_
-#define _GRALLOC_GBM_PRIV_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct gbm_device;
-struct gbm_bo;
-
-int gralloc_gbm_handle_register(buffer_handle_t handle, struct gbm_device *gbm);
-int gralloc_gbm_handle_unregister(buffer_handle_t handle);
-
-buffer_handle_t gralloc_gbm_bo_create(struct gbm_device *gbm,
- int width, int height, int format, int usage, int *stride);
-void gbm_free(buffer_handle_t handle);
-
-struct gbm_bo *gralloc_gbm_bo_from_handle(buffer_handle_t handle);
-buffer_handle_t gralloc_gbm_bo_get_handle(struct gbm_bo *bo);
-int gralloc_gbm_get_gem_handle(buffer_handle_t handle);
-
-int gralloc_gbm_bo_lock(buffer_handle_t handle, int x, int y, int w, int h, int enable_write, void **addr);
-int gralloc_gbm_bo_unlock(buffer_handle_t handle);
-
-struct gbm_device *gbm_dev_create(void);
-void gbm_dev_destroy(struct gbm_device *gbm);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _GRALLOC_GBM_PRIV_H_ */
diff --git a/init.common.rc b/init.common.rc
index 8b8f952..f15640a 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -1,9 +1,19 @@
import init.${ro.hardware}.usb.rc
import init.${ro.hardware}.power.rc
+on early-fs
+ start vold
+
on fs
- mount_all /vendor/etc/init/fstab.${ro.hardware}
- swapon_all /vendor/etc/init/fstab.${ro.hardware}
+ mount_all /vendor/etc/fstab.${ro.hardware} --early
+ swapon_all /vendor/etc/fstab.${ro.hardware}
+
+on post-fs
+ # set RLIMIT_MEMLOCK to 64MB
+ setrlimit 8 67108864 67108864
+
+on late-fs
+ mount_all /vendor/etc/fstab.${ro.hardware} --late
on init
# For legacy support
@@ -31,6 +41,8 @@ on zygote-start
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
on property:sys.boot_completed=1
+ chmod 0755 /sys/kernel/debug/tracing
+
# update cpuset now that processors are up
# Foreground should contain most cores (7 is reserved for top-app)
write /dev/cpuset/foreground/cpus 0-6
@@ -55,3 +67,9 @@ service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
class main
disabled
oneshot
+
+# TODO: disable this service once we implement system suspend
+service suspend_blocker /vendor/bin/suspend_blocker
+ class early_hal # Start together with system_suspend HAL
+ group system
+ user root
diff --git a/init.common.usb.rc b/init.common.usb.rc
index 50a4340..79d4d58 100644
--- a/init.common.usb.rc
+++ b/init.common.usb.rc
@@ -26,11 +26,15 @@ on boot
mkdir /dev/usb-ffs/ptp 0770 mtp mtp
mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+
setprop sys.usb.mtp.device_type 3
setprop sys.usb.configfs 1
setprop sys.usb.ffs.aio_compat 1
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+on property:vendor.usb.controller=*
+ setprop sys.usb.controller ${vendor.usb.controller}
+
on property:sys.usb.config=none && property:sys.usb.configfs=1
write /config/usb_gadget/g1/os_desc/use 0
@@ -86,3 +90,13 @@ on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idProduct 0x2d05
+
+on post-fs
+ start set_udc
+
+service set_udc /vendor/bin/set_udc.sh
+ class core
+ user root
+ group system
+ disabled
+ oneshot
diff --git a/installer/db845c/README b/installer/db845c/README
index 61c3a3b..3b86aa9 100644
--- a/installer/db845c/README
+++ b/installer/db845c/README
@@ -38,16 +38,11 @@ If HDMI is plugged in, you should see a text based
Flash the board:
----------------
-Once the board is in fastboot mode, you can then flash it by
-running the following from the
+Once the board is in fastboot mode, you can then flash bootloader
+binaries and AOSP images by running the following script from
device/linaro/dragonboard/installer/db845c/ directory:
- $ ./flash-all-aosp.sh <optional_kernel_binary>
-
-
-This will flash the bootloader binaries, AOSP images (userdata.img
-and super.img), and will also generate and flash boot.img if kernel
-binary (in Image.gz-dtb format) is passed to the script.
+ $ ./flash-all-aosp.sh
Troubleshooting:
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/BTFM.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/BTFM.bin
deleted file mode 100644
index b82e363..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/BTFM.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/LICENSE b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/LICENSE
deleted file mode 100644
index 6b9a0a2..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/LICENSE
+++ /dev/null
@@ -1,206 +0,0 @@
-PLEASE READ THIS LICENSE AGREEMENT ("AGREEMENT") CAREFULLY. THIS AGREEMENT IS
-A BINDING LEGAL AGREEMENT ENTERED INTO BY AND BETWEEN YOU (OR IF YOU ARE
-ENTERING INTO THIS AGREEMENT ON BEHALF OF AN ENTITY, THEN THE ENTITY THAT YOU
-REPRESENT) AND QUALCOMM TECHNOLOGIES, INC. ("QTI" "WE" "OUR" OR "US"). THIS IS
-THE AGREEMENT THAT APPLIES TO YOUR USE OF THE DESIGNATED AND/OR LINKED
-APPLICATIONS, THE ENCLOSED QUALCOMM TECHNOLOGIES' MATERIALS, INCLUDING RELATED
-DOCUMENTATION AND ANY UPDATES OR IMPROVEMENTS THEREOF
-(COLLECTIVELY, "MATERIALS"). BY USING OR COMPLETING THE INSTALLATION OF THE
-MATERIALS, YOU ARE ACCEPTING THIS AGREEMENT AND YOU AGREE TO BE BOUND BY ITS
-TERMS AND CONDITIONS. IF YOU DO NOT AGREE TO THESE TERMS, QTI IS UNWILLING TO
-AND DOES NOT LICENSE THE MATERIALS TO YOU. IF YOU DO NOT AGREE TO THESE TERMS
-YOU MUST DISCONTINUE THE INSTALLATION PROCESS AND YOU MAY NOT USE THE MATERIALS
-OR RETAIN ANY COPIES OF THE MATERIALS. ANY USE OR POSSESSION OF THE MATERIALS
-BY YOU IS SUBJECT TO THE TERMS AND CONDITIONS SET FORTH IN THIS AGREEMENT.
-
-1. RIGHT TO USE DELIVERABLES; RESTRICTIONS.
-
- 1.1 License. Subject to the terms and conditions of this Agreement,
- including, without limitation, the restrictions, conditions, limitations and
- exclusions set forth in this Agreement, QTI hereby grants to you a
- nonexclusive, limited license under QTI's copyrights to: (i) install and use
- the Materials; and (ii) to reproduce and redistribute the binary code portions
- of the Materials (the "Redistributable Binary Code"). You may make and use a
- reasonable number of copies of any documentation.
-
- 1.2 Redistribution Restrictions. Distribution of the Redistributable Binary
- Code is subject to the following restrictions: (i) Redistributable Binary Code
- may only be distributed in binary format and may not be distributed in source
- code format:; (ii) the Redistributable Binary Code may only operate in
- conjunction with platforms incorporating Qualcomm Technologies, Inc. chipsets;
- (iii) redistribution of the Redistributable Binary Code must include the .txt
- file setting forth the terms and condition of this Agreement; (iv) you may not
- use Qualcomm Technologies' or its affiliates or subsidiaries name, logo or
- trademarks; and (v) copyright, trademark, patent and any other notices that
- appear on the Materials may not be removed or obscured.
-
- 1.3 Additional Restrictions. Except as expressly permitted by this Agreement,
- you shall have no right to sublicense, transfer or otherwise disclose the
- Materials to any third party. You shall not reverse engineer, reverse
- assemble, reverse translate, decompile or reduce to source code form any
- portion of the Materials provided in object code form or executable form.
- Except for the purposes expressly permitted in this Agreement, You shall not
- use the Materials for any other purpose. QTI (or its licensors) shall retain
- title and all ownership rights in and to the Materials and any alterations,
- modifications (including all derivative works), translations or adaptations
- made of the Materials, and all copies thereof, and nothing herein shall be
- deemed to grant any right to You under any of QTI's or its affiliates'
- patents. You shall not subject the Materials to any third party license
- terms (e.g., open source license terms). You shall not use the Materials for
- the purpose of identifying or providing evidence to support any potential
- patent infringement claim against QTI, its affiliates, or any of QTI's or
- QTI's affiliates' suppliers and/or direct or indirect customers. QTI hereby
- reserves all rights not expressly granted herein.
-
- 1.4 Third Party Software and Materials. The Software may contain or link to
- certain software and/or materials that are written or owned by third parties.
- Such third party code and materials may be licensed under separate or
- different terms and conditions and are not licensed to you under the terms of
- this Agreement. You agree to comply with all terms and conditions imposed on
- you in the applicable third party licenses. Such terms and conditions may
- impose certain obligations on you as a condition to the permitted use of such
- third party code and materials. QTI does not represent or warrant that such
- third party licensors have or will continue to license or make available their
- code and materials to you.
-
- 1.5 Feedback. QTI may from time to time receive suggestions, feedback or
- other information from You regarding the Materials. Any suggestions, feedback
- or other disclosures received from You are and shall be entirely voluntary on
- the part of You. Notwithstanding any other term in this Agreement, QTI shall
- be free to use suggestions, feedback or other information received from You,
- without obligation of any kind to You. The Parties agree that all inventions,
- product improvements, and modifications conceived of or made by QTI that are
- based, either in whole or in part, on ideas, feedback, suggestions, or
- recommended improvements received from You are the exclusive property of QTI,
- and all right, title and interest in and to any such inventions, product
- improvements, and modifications will vest solely in QTI.
-
- 1.6 No Technical Support. QTI is under no obligation to provide any form of
- technical support for the Materials, and if QTI, in its sole discretion,
- chooses to provide any form of support or information relating to the
- Materials, such support and information shall be deemed confidential and
- proprietary to QTI.
-
-2. WARRANTY DISCLAIMER. YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT THE USE OF
-THE MATERIALS IS AT YOUR SOLE RISK. THE MATERIALS AND TECHNICAL SUPPORT, IF
-ANY, ARE PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR
-IMPLIED. QTI ITS LICENSORS AND AFFILIATES MAKE NO WARRANTIES, EXPRESS OR
-IMPLIED, WITH RESPECT TO THE MATERIALS OR ANY OTHER INFORMATION OR DOCUMENTATION
-PROVIDED UNDER THIS AGREEMENT, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR AGAINST INFRINGEMENT, OR
-ANY EXPRESS OR IMPLIED WARRANTY ARISING OUT OF TRADE USAGE OR OUT OF A COURSE OF
-DEALING OR COURSE OF PERFORMANCE. NOTHING CONTAINED IN THIS AGREEMENT SHALL BE
-CONSTRUED AS (I) A WARRANTY OR REPRESENTATION BY QTI, ITS LICENSORS OR
-AFFILIATES AS TO THE VALIDITY OR SCOPE OF ANY PATENT, COPYRIGHT OR OTHER
-INTELLECTUAL PROPERTY RIGHT OR (II) A WARRANTY OR REPRESENTATION BY QTI THAT ANY
-MANUFACTURE OR USE WILL BE FREE FROM INFRINGEMENT OF PATENTS, COPYRIGHTS OR
-OTHER INTELLECTUAL PROPERTY RIGHTS OF OTHERS, AND IT SHALL BE THE SOLE
-RESPONSIBILITY OF YOU TO MAKE SUCH DETERMINATION AS IS NECESSARY WITH RESPECT TO
-THE ACQUISITION OF LICENSES UNDER PATENTS AND OTHER INTELLECTUAL PROPERTY OF
-THIRD PARTIES.
-
-3. NO OTHER LICENSES OR INTELLECTUAL PROPERTY RIGHTS. Neither this Agreement,
-nor any act by QTI or any of its affiliates pursuant to this Agreement or
-relating to the Materials (including, without limitation, the provision by QTI
-or its affiliates of the Materials), shall provide to You any license or any
-other rights whatsoever under any patents, trademarks, trade secrets, copyrights
-or any other intellectual property of QTI or any of its affiliates, except for
-the copyright rights expressly licensed under this Agreement. You understand and
-agree that:
-
- (i) Neither this Agreement, nor delivery of the Materials, grants any right to
- practice, or any other right at all with respect to, any patent of QTI or any
- of its affiliates; and
-
- (ii) A separate license agreement from QUALCOMM Incorporated is needed to use
- or practice any patent of QUALCOMM Incorporated. You agree not to contend in
- any context that, as a result of the provision or use of the Materials, either
- QTI or any of its affiliates has any obligation to extend, or You or any other
- party has obtained any right to, any license, whether express or implied, with
- respect to any patent of QTI or any of its affiliates for any purpose.
-
-4. TERMINATION. This Agreement shall be effective upon acceptance, or access or
-use of the Materials (whichever occurs first) by You and shall continue until
-terminated. You may terminate the Agreement at any time by deleting and
-destroying all copies of the Materials and all related information in Your
-possession or control. This Agreement terminates immediately and automatically,
-with or without notice, if You fail to comply with any provision hereof.
-Additionally, QTI may at any time terminate this Agreement, without cause, upon
-notice to You. Upon termination You must, to the extent possible, delete or
-destroy all copies of the Materials in Your possession and the license granted
-to You in this Agreement shall terminate. Sections 1.2 through 10 shall survive
-the termination of this Agreement. In the event that any restrictions,
-conditions, limitations are found to be either invalid or unenforceable, the
-rights granted to You in Section 1 (License) shall be null, void and ineffective
-from the Effective Date, and QTI shall also have the right to terminate this
-Agreement immediately, and with retroactive effect to the effective date.
-
-5. LIMITATION OF LIABILITY. IN NO EVENT SHALL QTI, QTI's AFFILIATES OR ITS
-LICENSORS BE LIABLE TO YOU FOR ANY INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES,
-INCLUDING BUT NOT LIMITED TO ANY LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL
-DAMAGES, ARISING OUT OF THE USE OR INABILITY TO USE, OR THE DELIVERY OR FAILURE
-TO DELIVER, ANY OF THE DELIVERABLES, OR ANY BREACH OF ANY OBLIGATION UNDER THIS
-AGREEMENT, EVEN IF QTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-THE FOREGOING LIMITATION OF LIABILITY SHALL REMAIN IN FULL FORCE AND EFFECT
-REGARDLESS OF WHETHER YOUR REMEDIES HEREUNDER ARE DETERMINED TO HAVE FAILED OF
-THEIR ESSENTIAL PURPOSE. THE ENTIRE LIABILITY OF QTI, QTI's AFFILIATES AND ITS
-LICENSORS, AND THE SOLE AND EXCLUSIVE REMEDY OF YOU, FOR ANY CLAIM OR CAUSE OF
-ACTION ARISING HEREUNDER (WHETHER IN CONTRACT, TORT, OR OTHERWISE) SHALL NOT
-EXCEED US$50.
-
-6. INDEMNIFICATION. You agree to indemnify and hold harmless QTI and its
-officers, directors, employees and successors and assigns against any and all
-third party claims, demands, causes of action, losses, liabilities, damages,
-costs and expenses, incurred by QTI (including but not limited to costs of
-defense, investigation and reasonable attorney's fees) arising out of, resulting
-from or related to: (i) any breach of this Agreement by You; and (ii) your acts,
-omissions, products and services. If requested by QTI, You agree to defend QTI
-in connection with any third party claims, demands, or causes of action
-resulting from, arising out of or in connection with any of the foregoing.
-
-7. ASSIGNMENT. You shall not assign this Agreement or any right or interest
-under this Agreement, nor delegate any obligation to be performed under this
-Agreement, without QTI's prior written consent. For purposes of this Section 7,
-an "assignment" by You under this Section shall be deemed to include, without
-limitation, any merger, consolidation, sale of all or substantially all of its
-assets, or any substantial change in the management or control of You.
-Any attempted assignment in contravention of this Section 9 shall be void.
-QTI may freely assign this Agreement or delegate any or all of its rights and
-obligations hereunder to any third party.
-
-8. COMPLIANCE WITH LAWS; APPLICABLE LAW. You agree to comply with all
-applicable local, international and national laws and regulations and with U.S.
-Export Administration Regulations, as they apply to the subject matter of this
-Agreement. This Agreement is governed by the laws of the State of California,
-excluding California's choice of law rules.
-
-9. CONTRACTING PARTIES. If the Materials are downloaded on any computer owned
-by a corporation or other legal entity, then this Agreement is formed by and
-between QTI and such entity. The individual accepting the terms of this
-Agreement represents and warrants to QTI that they have the authority to bind
-such entity to the terms and conditions of this Agreement.
-
-10. MISCELLANEOUS PROVISIONS. This Agreement, together with all exhibits
-attached hereto, which are incorporated herein by this reference, constitutes
-the entire agreement between QTI and You and supersedes all prior negotiations,
-representations and agreements between the parties with respect to the subject
-matter hereof. No addition or modification of this Agreement shall be effective
-unless made in writing and signed by the respective representatives of QTI and
-You. The restrictions, limitations, exclusions and conditions set forth in this
-Agreement shall apply even if QTI or any of its affiliates becomes aware of or
-fails to act in a manner to address any violation or failure to comply
-therewith. You hereby acknowledge and agree that the restrictions, limitations,
-conditions and exclusions imposed in this Agreement on the rights granted in
-this Agreement are not a derogation of the benefits of such rights. You further
-acknowledges that, in the absence of such restrictions, limitations, conditions
-and exclusions, QTI would not have entered into this Agreement with You. Each
-party shall be responsible for and shall bear its own expenses in connection
-with this Agreement. If any of the provisions of this Agreement are determined
-to be invalid, illegal, or otherwise unenforceable, the remaining provisions
-shall remain in full force and effect. This Agreement is entered into solely
-in the English language, and if for any reason any other language version is
-prepared by any party, it shall be solely for convenience and the English
-version shall govern and control all aspects. If You are located in the
-province of Quebec, Canada, the following applies: The Parties hereby confirm
-they have requested this Agreement and all related documents be prepared
-in English.. \ No newline at end of file
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/MD5SUMS.txt b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/MD5SUMS.txt
deleted file mode 100644
index 61b9063..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/MD5SUMS.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-9e5bd5524c1379c511dd92ea33393ad7 abl.elf
-71c6dd41e387ddb12c8553091928ec39 aop.mbn
-b6d81b360a5672d80c27430f39153e2c boot-erase.img
-40e97319f57ab9d0b60009163ff940c2 BTFM.bin
-cbd3f7ab1a261c30e9e3178c0ec09428 cmnlib64.mbn
-7e89535018695c938593581134d14871 cmnlib.mbn
-699e4dc2a0dbac11b255c79422744b44 devcfg.mbn
-d5cf22da99f6a871d4c7d43ce8eb801a dspso.bin
-4400827c0a6689bfe118a67d79b4fcd7 flashall
-61362db524d6b1a082aa3e68c5ce5226 gpt_backup0.bin
-10711bd7b6c795b396ec7acc6546641b gpt_backup1.bin
-1384ab8fa504bed08282b9fdbedd1256 gpt_backup2.bin
-f9f43f922865a282bd340731e2e4c05c gpt_backup3.bin
-c98f59260b9d839fd66c7a799344763b gpt_backup4.bin
-f1dd799d40155b2fb0a13e74dc708ef0 gpt_backup5.bin
-62809acaa9deeafbcf228ab3dec80fba gpt_both0.bin
-1a45d3cc41bf1f7ab52c35a8dafde7c2 gpt_both1.bin
-26156f1cf28c2b03a52dc645e0776a6a gpt_both2.bin
-836794cd35e92ac1865bca5bceb3afa8 gpt_both3.bin
-2a728d731064cb62a253e05fda09584c gpt_both4.bin
-9b30da0d32e99c239a51c3d868960fde gpt_both5.bin
-d3d913561434b15f1fd42b5c26b6e514 gpt_main0.bin
-42d103f66ffadf2fabe079c864d6ad2f gpt_main1.bin
-33f9210eb72379fa4d737f7d968d69fe gpt_main2.bin
-41530c11400b67d4efaca893a7bbc99f gpt_main3.bin
-2ac0679ed66a373fc2a863dcb17bf6bf gpt_main4.bin
-866e4769d16b95bb473441fa79b39d23 gpt_main5.bin
-94794668fb0a63c599e754cba52f6517 hyp.mbn
-35cc47772102f785807556e03135764a imagefv.elf
-1fbaef77827cc531b5b7372ad1ee4937 keymaster64.mbn
-cbbe399f2c983ad51768f4561587f000 LICENSE
-c1c770a035a596c4b13a08789a76a137 patch0.xml
-0780990ee59934bdcaffc918cac99aed patch1.xml
-81036277fd056a16c0e418a756a5a835 patch2.xml
-f1e955eeee449ed57767ac0b87552cf1 patch3.xml
-04859b2cf8561a9d54e85a01595c44bb patch4.xml
-ab5847dcda2a52572616499f37ff1676 patch5.xml
-61e29ca7d21884af0e3a813d3bd0ade1 prog_firehose_ddr.elf
-57f570d8896ef6c0e55af6c3dc0940e1 qupv3fw.elf
-aea48fb241747a7db9741b05d2cc8a5e rawprogram0.xml
-078978d92fc3c2a0ad0744e5e905e806 rawprogram1.xml
-e829b09f11eeed7f44caca1b592c91bf rawprogram2.xml
-e03411d04b290ffe1ea9b993d1f23074 rawprogram3.xml
-394901123816bf4ea4ed31ad055a156a rawprogram4.xml
-3640402754265a04aaff27ede61fa1c0 rawprogram5.xml
-21775907582b06389a656ab56011c160 sec.dat
-a09977823a706b04e851609cfe0a9113 storsec.mbn
-ce1bdfe85a34c3ce8f30f99e01a9f2af tz.mbn
-3d4e3c711e9fcdb2513afefb4072ab69 xbl_config.elf
-53510083c9fc81d0e7b75e8f09c5c0ea xbl.elf
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/abl.elf b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/abl.elf
deleted file mode 100644
index a8e5195..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/abl.elf
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/aop.mbn b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/aop.mbn
deleted file mode 100644
index 59c3db6..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/aop.mbn
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/boot-erase.img b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/boot-erase.img
deleted file mode 100644
index 9e0f96a..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/boot-erase.img
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/cmnlib.mbn b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/cmnlib.mbn
deleted file mode 100644
index f6a5688..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/cmnlib.mbn
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/cmnlib64.mbn b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/cmnlib64.mbn
deleted file mode 100644
index 3c1f8e0..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/cmnlib64.mbn
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/devcfg.mbn b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/devcfg.mbn
deleted file mode 100644
index f7080e7..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/devcfg.mbn
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/dspso.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/dspso.bin
deleted file mode 100644
index 0468851..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/dspso.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/flashall b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/flashall
deleted file mode 100755
index 2c4db9e..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/flashall
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-fastboot flash partition:0 gpt_both0.bin
-fastboot flash partition:1 gpt_both1.bin
-fastboot flash partition:2 gpt_both2.bin
-fastboot flash partition:3 gpt_both3.bin
-fastboot flash partition:4 gpt_both4.bin
-fastboot flash partition:5 gpt_both5.bin
-
-fastboot flash ImageFv_a imagefv.elf
-fastboot flash aop_a aop.mbn
-fastboot flash bluetooth_a BTFM.bin
-fastboot flash cmnlib64_a cmnlib64.mbn
-fastboot flash cmnlib_a cmnlib.mbn
-fastboot erase ddr
-fastboot flash devcfg_a devcfg.mbn
-fastboot flash dsp_a dspso.bin
-fastboot flash hyp_a hyp.mbn
-fastboot flash keymaster_a keymaster64.mbn
-#fastboot flash logfs logfs_ufs_8mb.bin
-#fastboot flash modem_a NON-HLOS.bin
-fastboot flash qupfw_a qupv3fw.elf
-fastboot flash storsec_a storsec.mbn
-fastboot flash tz_a tz.mbn
-fastboot flash xbl_a xbl.elf
-fastboot flash xbl_config_a xbl_config.elf
-fastboot flash abl_a abl.elf
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup0.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup0.bin
deleted file mode 100644
index c293d6c..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup0.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup1.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup1.bin
deleted file mode 100644
index a7df42f..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup1.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup2.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup2.bin
deleted file mode 100644
index 9768f0d..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup2.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup3.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup3.bin
deleted file mode 100644
index 308f3d7..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup3.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup4.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup4.bin
deleted file mode 100644
index 047e1b0..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup4.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup5.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup5.bin
deleted file mode 100644
index 51e1a4c..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_backup5.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both0.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both0.bin
deleted file mode 100644
index ecb66bf..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both0.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both1.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both1.bin
deleted file mode 100644
index c16f0bd..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both1.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both2.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both2.bin
deleted file mode 100644
index bd359d5..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both2.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both3.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both3.bin
deleted file mode 100644
index ae4516f..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both3.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both4.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both4.bin
deleted file mode 100644
index bc2cf44..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both4.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both5.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both5.bin
deleted file mode 100644
index 47be07d..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_both5.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main0.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main0.bin
deleted file mode 100644
index 9fffcb8..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main0.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main1.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main1.bin
deleted file mode 100644
index 33c7c99..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main1.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main2.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main2.bin
deleted file mode 100644
index ea6d98f..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main2.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main3.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main3.bin
deleted file mode 100644
index ed6134e..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main3.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main4.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main4.bin
deleted file mode 100644
index e690bd8..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main4.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main5.bin b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main5.bin
deleted file mode 100644
index f7c071c..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/gpt_main5.bin
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/hyp.mbn b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/hyp.mbn
deleted file mode 100644
index 538dcc6..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/hyp.mbn
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/imagefv.elf b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/imagefv.elf
deleted file mode 100644
index 42107de..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/imagefv.elf
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/keymaster64.mbn b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/keymaster64.mbn
deleted file mode 100644
index 5bdd1a9..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/keymaster64.mbn
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch0.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch0.xml
deleted file mode 100644
index 3548ee3..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch0.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" ?>
-<patches>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Patching is in little endian format, i.e. 0xAABBCCDD will look like DD CC BB AA in the file or on disk-->
- <!--NOTE: This file is used by Trace32 - So make sure to add decimals, i.e. 0x10-10=0, *but* 0x10-10.=6.-->
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="936" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 8 'userdata' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="936" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 8 'userdata' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="936" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="0" value="NUM_DISK_SECTORS-6." what="Update last partition 8 'userdata' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="936" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-5." value="NUM_DISK_SECTORS-6." what="Update last partition 8 'userdata' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="DISK" physical_partition_number="0" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="4" value="CRC32(0,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-5.,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="4" value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup0.bin" physical_partition_number="0" size_in_bytes="4" start_sector="4" value="CRC32(4,92)" what="Update Backup Header with CRC of Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="0" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-1.,92)" what="Update Backup Header with CRC of Backup Header."/>
-</patches>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch1.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch1.xml
deleted file mode 100644
index f22f118..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch1.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" ?>
-<patches>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Patching is in little endian format, i.e. 0xAABBCCDD will look like DD CC BB AA in the file or on disk-->
- <!--NOTE: This file is used by Trace32 - So make sure to add decimals, i.e. 0x10-10=0, *but* 0x10-10.=6.-->
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="296" filename="gpt_main1.bin" physical_partition_number="1" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 3 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="296" filename="DISK" physical_partition_number="1" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 3 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="296" filename="gpt_backup1.bin" physical_partition_number="1" size_in_bytes="8" start_sector="0" value="NUM_DISK_SECTORS-6." what="Update last partition 3 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="296" filename="DISK" physical_partition_number="1" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-5." value="NUM_DISK_SECTORS-6." what="Update last partition 3 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_main1.bin" physical_partition_number="1" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="1" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_backup1.bin" physical_partition_number="1" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="1" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="gpt_main1.bin" physical_partition_number="1" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="DISK" physical_partition_number="1" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="gpt_backup1.bin" physical_partition_number="1" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="DISK" physical_partition_number="1" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="gpt_backup1.bin" physical_partition_number="1" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="DISK" physical_partition_number="1" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_main1.bin" physical_partition_number="1" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="1" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_backup1.bin" physical_partition_number="1" size_in_bytes="4" start_sector="4" value="CRC32(0,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="1" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-5.,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main1.bin" physical_partition_number="1" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main1.bin" physical_partition_number="1" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="1" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="1" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup1.bin" physical_partition_number="1" size_in_bytes="4" start_sector="4" value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup1.bin" physical_partition_number="1" size_in_bytes="4" start_sector="4" value="CRC32(4,92)" what="Update Backup Header with CRC of Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="1" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="1" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-1.,92)" what="Update Backup Header with CRC of Backup Header."/>
-</patches>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch2.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch2.xml
deleted file mode 100644
index 3a21339..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch2.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" ?>
-<patches>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Patching is in little endian format, i.e. 0xAABBCCDD will look like DD CC BB AA in the file or on disk-->
- <!--NOTE: This file is used by Trace32 - So make sure to add decimals, i.e. 0x10-10=0, *but* 0x10-10.=6.-->
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="296" filename="gpt_main2.bin" physical_partition_number="2" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 3 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="296" filename="DISK" physical_partition_number="2" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 3 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="296" filename="gpt_backup2.bin" physical_partition_number="2" size_in_bytes="8" start_sector="0" value="NUM_DISK_SECTORS-6." what="Update last partition 3 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="296" filename="DISK" physical_partition_number="2" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-5." value="NUM_DISK_SECTORS-6." what="Update last partition 3 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_main2.bin" physical_partition_number="2" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="2" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_backup2.bin" physical_partition_number="2" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="2" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="gpt_main2.bin" physical_partition_number="2" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="DISK" physical_partition_number="2" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="gpt_backup2.bin" physical_partition_number="2" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="DISK" physical_partition_number="2" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="gpt_backup2.bin" physical_partition_number="2" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="DISK" physical_partition_number="2" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_main2.bin" physical_partition_number="2" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="2" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_backup2.bin" physical_partition_number="2" size_in_bytes="4" start_sector="4" value="CRC32(0,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="2" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-5.,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main2.bin" physical_partition_number="2" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main2.bin" physical_partition_number="2" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="2" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="2" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup2.bin" physical_partition_number="2" size_in_bytes="4" start_sector="4" value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup2.bin" physical_partition_number="2" size_in_bytes="4" start_sector="4" value="CRC32(4,92)" what="Update Backup Header with CRC of Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="2" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="2" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-1.,92)" what="Update Backup Header with CRC of Backup Header."/>
-</patches>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch3.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch3.xml
deleted file mode 100644
index e818f40..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch3.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" ?>
-<patches>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Patching is in little endian format, i.e. 0xAABBCCDD will look like DD CC BB AA in the file or on disk-->
- <!--NOTE: This file is used by Trace32 - So make sure to add decimals, i.e. 0x10-10=0, *but* 0x10-10.=6.-->
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="424" filename="gpt_main3.bin" physical_partition_number="3" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 4 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="424" filename="DISK" physical_partition_number="3" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 4 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="424" filename="gpt_backup3.bin" physical_partition_number="3" size_in_bytes="8" start_sector="0" value="NUM_DISK_SECTORS-6." what="Update last partition 4 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="424" filename="DISK" physical_partition_number="3" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-5." value="NUM_DISK_SECTORS-6." what="Update last partition 4 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_main3.bin" physical_partition_number="3" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="3" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_backup3.bin" physical_partition_number="3" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="3" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="gpt_main3.bin" physical_partition_number="3" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="DISK" physical_partition_number="3" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="gpt_backup3.bin" physical_partition_number="3" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="DISK" physical_partition_number="3" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="gpt_backup3.bin" physical_partition_number="3" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="DISK" physical_partition_number="3" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_main3.bin" physical_partition_number="3" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="3" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_backup3.bin" physical_partition_number="3" size_in_bytes="4" start_sector="4" value="CRC32(0,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="3" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-5.,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main3.bin" physical_partition_number="3" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main3.bin" physical_partition_number="3" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="3" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="3" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup3.bin" physical_partition_number="3" size_in_bytes="4" start_sector="4" value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup3.bin" physical_partition_number="3" size_in_bytes="4" start_sector="4" value="CRC32(4,92)" what="Update Backup Header with CRC of Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="3" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="3" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-1.,92)" what="Update Backup Header with CRC of Backup Header."/>
-</patches>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch4.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch4.xml
deleted file mode 100644
index b808e50..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch4.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" ?>
-<patches>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Patching is in little endian format, i.e. 0xAABBCCDD will look like DD CC BB AA in the file or on disk-->
- <!--NOTE: This file is used by Trace32 - So make sure to add decimals, i.e. 0x10-10=0, *but* 0x10-10.=6.-->
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="2088" filename="gpt_main4.bin" physical_partition_number="4" size_in_bytes="8" start_sector="3" value="NUM_DISK_SECTORS-6." what="Update last partition 49 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="2088" filename="DISK" physical_partition_number="4" size_in_bytes="8" start_sector="3" value="NUM_DISK_SECTORS-6." what="Update last partition 49 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="2088" filename="gpt_backup4.bin" physical_partition_number="4" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update last partition 49 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="2088" filename="DISK" physical_partition_number="4" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-4." value="NUM_DISK_SECTORS-6." what="Update last partition 49 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_main4.bin" physical_partition_number="4" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="4" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_backup4.bin" physical_partition_number="4" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="4" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="gpt_main4.bin" physical_partition_number="4" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="DISK" physical_partition_number="4" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="gpt_backup4.bin" physical_partition_number="4" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="DISK" physical_partition_number="4" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="gpt_backup4.bin" physical_partition_number="4" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="DISK" physical_partition_number="4" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_main4.bin" physical_partition_number="4" size_in_bytes="4" start_sector="1" value="CRC32(2,8192)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="4" size_in_bytes="4" start_sector="1" value="CRC32(2,8192)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_backup4.bin" physical_partition_number="4" size_in_bytes="4" start_sector="4" value="CRC32(0,8192)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="4" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-5.,8192)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main4.bin" physical_partition_number="4" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main4.bin" physical_partition_number="4" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="4" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="4" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup4.bin" physical_partition_number="4" size_in_bytes="4" start_sector="4" value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup4.bin" physical_partition_number="4" size_in_bytes="4" start_sector="4" value="CRC32(4,92)" what="Update Backup Header with CRC of Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="4" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="4" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-1.,92)" what="Update Backup Header with CRC of Backup Header."/>
-</patches>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch5.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch5.xml
deleted file mode 100644
index b9ff1fd..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/patch5.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" ?>
-<patches>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Patching is in little endian format, i.e. 0xAABBCCDD will look like DD CC BB AA in the file or on disk-->
- <!--NOTE: This file is used by Trace32 - So make sure to add decimals, i.e. 0x10-10=0, *but* 0x10-10.=6.-->
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="1192" filename="gpt_main5.bin" physical_partition_number="5" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 10 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="1192" filename="DISK" physical_partition_number="5" size_in_bytes="8" start_sector="2" value="NUM_DISK_SECTORS-6." what="Update last partition 10 'last_parti' with actual size in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="1192" filename="gpt_backup5.bin" physical_partition_number="5" size_in_bytes="8" start_sector="0" value="NUM_DISK_SECTORS-6." what="Update last partition 10 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="1192" filename="DISK" physical_partition_number="5" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-5." value="NUM_DISK_SECTORS-6." what="Update last partition 10 'last_parti' with actual size in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_main5.bin" physical_partition_number="5" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="5" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-6." what="Update Primary Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="gpt_backup5.bin" physical_partition_number="5" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="48" filename="DISK" physical_partition_number="5" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-6." what="Update Backup Header with LastUseableLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="gpt_main5.bin" physical_partition_number="5" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="32" filename="DISK" physical_partition_number="5" size_in_bytes="8" start_sector="1" value="NUM_DISK_SECTORS-1." what="Update Primary Header with BackupGPT Header Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="gpt_backup5.bin" physical_partition_number="5" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="24" filename="DISK" physical_partition_number="5" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1." value="NUM_DISK_SECTORS-1." what="Update Backup Header with CurrentLBA."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="gpt_backup5.bin" physical_partition_number="5" size_in_bytes="8" start_sector="4" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="72" filename="DISK" physical_partition_number="5" size_in_bytes="8" start_sector="NUM_DISK_SECTORS-1" value="NUM_DISK_SECTORS-5." what="Update Backup Header with Partition Array Location."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_main5.bin" physical_partition_number="5" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="5" size_in_bytes="4" start_sector="1" value="CRC32(2,4096)" what="Update Primary Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="gpt_backup5.bin" physical_partition_number="5" size_in_bytes="4" start_sector="4" value="CRC32(0,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="88" filename="DISK" physical_partition_number="5" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-5.,4096)" what="Update Backup Header with CRC of Partition Array."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main5.bin" physical_partition_number="5" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_main5.bin" physical_partition_number="5" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="5" size_in_bytes="4" start_sector="1" value="0" what="Zero Out Header CRC in Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="5" size_in_bytes="4" start_sector="1" value="CRC32(1,92)" what="Update Primary Header with CRC of Primary Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup5.bin" physical_partition_number="5" size_in_bytes="4" start_sector="4" value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="gpt_backup5.bin" physical_partition_number="5" size_in_bytes="4" start_sector="4" value="CRC32(4,92)" what="Update Backup Header with CRC of Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="5" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="0" what="Zero Out Header CRC in Backup Header."/>
- <patch SECTOR_SIZE_IN_BYTES="4096" byte_offset="16" filename="DISK" physical_partition_number="5" size_in_bytes="4" start_sector="NUM_DISK_SECTORS-1." value="CRC32(NUM_DISK_SECTORS-1.,92)" what="Update Backup Header with CRC of Backup Header."/>
-</patches>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/prog_firehose_ddr.elf b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/prog_firehose_ddr.elf
deleted file mode 100644
index 15e2d4c..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/prog_firehose_ddr.elf
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/qupv3fw.elf b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/qupv3fw.elf
deleted file mode 100644
index 6236ec4..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/qupv3fw.elf
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram0.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram0.xml
deleted file mode 100644
index f9ec76b..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram0.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" ?>
-<data>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Sector size is 4096bytes-->
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="persist" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0x6000" start_sector="6"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="system_a" num_partition_sectors="1518216" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="6072864.0" sparse="false" start_byte_hex="0x2006000" start_sector="8198"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="system_b" num_partition_sectors="1518216" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="6072864.0" sparse="false" start_byte_hex="0x174a8e000" start_sector="1526414"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="super" num_partition_sectors="3036432" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="12145728.0" sparse="false" start_byte_hex="0x2e7516000" start_sector="3044630"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="systemrw" num_partition_sectors="4096" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="16384.0" sparse="false" start_byte_hex="0x5cca26000" start_sector="6081062"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="cache" num_partition_sectors="16384" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x5cda26000" start_sector="6085158"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="metadata" num_partition_sectors="16384" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x5d1a26000" start_sector="6101542"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="userdata" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="0" readbackverify="false" size_in_KB="0" sparse="false" start_byte_hex="0x5d5a26000" start_sector="6117926"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_main0.bin" label="PrimaryGPT" num_partition_sectors="6" partofsingleimage="true" physical_partition_number="0" readbackverify="false" size_in_KB="24.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_backup0.bin" label="BackupGPT" num_partition_sectors="5" partofsingleimage="true" physical_partition_number="0" readbackverify="false" size_in_KB="20.0" sparse="false" start_byte_hex="(4096*NUM_DISK_SECTORS)-20480." start_sector="NUM_DISK_SECTORS-5."/>
-</data>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram1.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram1.xml
deleted file mode 100644
index 1793287..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram1.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" ?>
-<data>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Sector size is 4096bytes-->
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="xbl.elf" label="xbl_a" num_partition_sectors="896" partofsingleimage="false" physical_partition_number="1" readbackverify="false" size_in_KB="3584.0" sparse="false" start_byte_hex="0x6000" start_sector="6"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="xbl_config.elf" label="xbl_config_a" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="1" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x386000" start_sector="902"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="last_parti" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="1" readbackverify="false" size_in_KB="0" sparse="false" start_byte_hex="0x3a6000" start_sector="934"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_main1.bin" label="PrimaryGPT" num_partition_sectors="6" partofsingleimage="true" physical_partition_number="1" readbackverify="false" size_in_KB="24.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_backup1.bin" label="BackupGPT" num_partition_sectors="5" partofsingleimage="true" physical_partition_number="1" readbackverify="false" size_in_KB="20.0" sparse="false" start_byte_hex="(4096*NUM_DISK_SECTORS)-20480." start_sector="NUM_DISK_SECTORS-5."/>
-</data>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram2.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram2.xml
deleted file mode 100644
index e8aa1b8..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram2.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" ?>
-<data>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Sector size is 4096bytes-->
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="xbl.elf" label="xbl_b" num_partition_sectors="896" partofsingleimage="false" physical_partition_number="2" readbackverify="false" size_in_KB="3584.0" sparse="false" start_byte_hex="0x6000" start_sector="6"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="xbl_config.elf" label="xbl_config_b" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="2" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x386000" start_sector="902"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="last_parti" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="2" readbackverify="false" size_in_KB="0" sparse="false" start_byte_hex="0x3a6000" start_sector="934"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_main2.bin" label="PrimaryGPT" num_partition_sectors="6" partofsingleimage="true" physical_partition_number="2" readbackverify="false" size_in_KB="24.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_backup2.bin" label="BackupGPT" num_partition_sectors="5" partofsingleimage="true" physical_partition_number="2" readbackverify="false" size_in_KB="20.0" sparse="false" start_byte_hex="(4096*NUM_DISK_SECTORS)-20480." start_sector="NUM_DISK_SECTORS-5."/>
-</data>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram3.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram3.xml
deleted file mode 100644
index a37a8b4..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram3.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" ?>
-<data>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Sector size is 4096bytes-->
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="ALIGN_TO_128K_1" num_partition_sectors="26" partofsingleimage="false" physical_partition_number="3" readbackverify="false" size_in_KB="104.0" sparse="false" start_byte_hex="0x6000" start_sector="6"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="cdt" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="3" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x20000" start_sector="32"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="ddr" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="3" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x40000" start_sector="64"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="last_parti" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="3" readbackverify="false" size_in_KB="0" sparse="false" start_byte_hex="0x140000" start_sector="320"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_main3.bin" label="PrimaryGPT" num_partition_sectors="6" partofsingleimage="true" physical_partition_number="3" readbackverify="false" size_in_KB="24.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_backup3.bin" label="BackupGPT" num_partition_sectors="5" partofsingleimage="true" physical_partition_number="3" readbackverify="false" size_in_KB="20.0" sparse="false" start_byte_hex="(4096*NUM_DISK_SECTORS)-20480." start_sector="NUM_DISK_SECTORS-5."/>
-</data>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram4.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram4.xml
deleted file mode 100644
index ff59828..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram4.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" ?>
-<data>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Sector size is 4096bytes-->
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="aop.mbn" label="aop_a" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x6000" start_sector="6"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="tz.mbn" label="tz_a" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x86000" start_sector="134"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="hyp.mbn" label="hyp_a" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x286000" start_sector="646"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="modem_a" num_partition_sectors="30720" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="122880.0" sparse="false" start_byte_hex="0x306000" start_sector="774"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="BTFM.bin" label="bluetooth_a" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x7b06000" start_sector="31494"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="mdtpsecapp_a" num_partition_sectors="1024" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="4096.0" sparse="false" start_byte_hex="0x7c06000" start_sector="31750"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="mdtp_a" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0x8006000" start_sector="32774"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="abl.elf" label="abl_a" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0xa006000" start_sector="40966"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="dspso.bin" label="dsp_a" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0xa106000" start_sector="41222"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="keymaster64.mbn" label="keymaster_a" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0xc106000" start_sector="49414"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="boot-erase.img" label="boot_a" num_partition_sectors="16384" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0xc186000" start_sector="49542"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="cmnlib.mbn" label="cmnlib_a" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x10186000" start_sector="65926"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="cmnlib64.mbn" label="cmnlib64_a" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x10206000" start_sector="66054"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="devcfg.mbn" label="devcfg_a" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x10286000" start_sector="66182"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="qupv3fw.elf" label="qupfw_a" num_partition_sectors="16" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="64.0" sparse="false" start_byte_hex="0x102a6000" start_sector="66214"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="storsec.mbn" label="storsec_a" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x102b6000" start_sector="66230"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="imagefv.elf" label="ImageFv_a" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x102d6000" start_sector="66262"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="aop.mbn" label="aop_b" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x103d6000" start_sector="66518"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="tz.mbn" label="tz_b" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x10456000" start_sector="66646"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="hyp.mbn" label="hyp_b" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x10656000" start_sector="67158"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="modem_b" num_partition_sectors="30720" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="122880.0" sparse="false" start_byte_hex="0x106d6000" start_sector="67286"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="BTFM.bin" label="bluetooth_b" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x17ed6000" start_sector="98006"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="mdtpsecapp_b" num_partition_sectors="1024" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="4096.0" sparse="false" start_byte_hex="0x17fd6000" start_sector="98262"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="mdtp_b" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0x183d6000" start_sector="99286"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="abl.elf" label="abl_b" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x1a3d6000" start_sector="107478"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="dspso.bin" label="dsp_b" num_partition_sectors="8192" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="32768.0" sparse="false" start_byte_hex="0x1a4d6000" start_sector="107734"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="keymaster64.mbn" label="keymaster_b" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x1c4d6000" start_sector="115926"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="boot-erase.img" label="boot_b" num_partition_sectors="16384" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x1c556000" start_sector="116054"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="cmnlib.mbn" label="cmnlib_b" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x20556000" start_sector="132438"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="cmnlib64.mbn" label="cmnlib64_b" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x205d6000" start_sector="132566"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="devcfg.mbn" label="devcfg_b" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x20656000" start_sector="132694"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="qupv3fw.elf" label="qupfw_b" num_partition_sectors="16" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="64.0" sparse="false" start_byte_hex="0x20676000" start_sector="132726"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="storsec.mbn" label="storsec_b" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x20686000" start_sector="132742"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="imagefv.elf" label="ImageFv_b" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x206a6000" start_sector="132774"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="sec.dat" label="sec" num_partition_sectors="4" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="16.0" sparse="false" start_byte_hex="0x207a6000" start_sector="133030"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="devinfo" num_partition_sectors="1" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="4.0" sparse="false" start_byte_hex="0x207aa000" start_sector="133034"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="dip" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x207ab000" start_sector="133035"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="fdemeta" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x208ab000" start_sector="133291"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="apdp" num_partition_sectors="64" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="256.0" sparse="false" start_byte_hex="0x2092b000" start_sector="133419"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="msadp" num_partition_sectors="64" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="256.0" sparse="false" start_byte_hex="0x2096b000" start_sector="133483"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="spunvm" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="8192.0" sparse="false" start_byte_hex="0x209ab000" start_sector="133547"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="splash" num_partition_sectors="8356" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="33424.0" sparse="false" start_byte_hex="0x211ab000" start_sector="135595"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="limits" num_partition_sectors="1" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="4.0" sparse="false" start_byte_hex="0x2324f000" start_sector="143951"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="toolsfv" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x23250000" start_sector="143952"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="logfs_ufs_8mb.bin" label="logfs" num_partition_sectors="2048" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="8192.0" sparse="false" start_byte_hex="0x23350000" start_sector="144208"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="sti" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x23b50000" start_sector="146256"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="rawdump" num_partition_sectors="32768" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="131072.0" sparse="false" start_byte_hex="0x23d50000" start_sector="146768"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="logdump" num_partition_sectors="16384" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="65536.0" sparse="false" start_byte_hex="0x2bd50000" start_sector="179536"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="last_parti" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="4" readbackverify="false" size_in_KB="0" sparse="false" start_byte_hex="0x2fd50000" start_sector="195920"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_main4.bin" label="PrimaryGPT" num_partition_sectors="6" partofsingleimage="true" physical_partition_number="4" readbackverify="false" size_in_KB="24.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_backup4.bin" label="BackupGPT" num_partition_sectors="5" partofsingleimage="true" physical_partition_number="4" readbackverify="false" size_in_KB="20.0" sparse="false" start_byte_hex="(4096*NUM_DISK_SECTORS)-20480." start_sector="NUM_DISK_SECTORS-5."/>
-</data>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram5.xml b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram5.xml
deleted file mode 100644
index ea653dd..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/rawprogram5.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" ?>
-<data>
- <!--NOTE: This is an ** Autogenerated file **-->
- <!--NOTE: Sector size is 4096bytes-->
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="ALIGN_TO_128K_2" num_partition_sectors="26" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="104.0" sparse="false" start_byte_hex="0x6000" start_sector="6"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="modemst1" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x20000" start_sector="32"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="modemst2" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x220000" start_sector="544"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="fsg" num_partition_sectors="512" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="2048.0" sparse="false" start_byte_hex="0x420000" start_sector="1056"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="fsc" num_partition_sectors="32" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="128.0" sparse="false" start_byte_hex="0x620000" start_sector="1568"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="ssd" num_partition_sectors="2" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="8.0" sparse="false" start_byte_hex="0x640000" start_sector="1600"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="misc" num_partition_sectors="256" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="1024.0" sparse="false" start_byte_hex="0x642000" start_sector="1602"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="keystore" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x742000" start_sector="1858"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="frp" num_partition_sectors="128" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="512.0" sparse="false" start_byte_hex="0x7c2000" start_sector="1986"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="" label="last_parti" num_partition_sectors="0" partofsingleimage="false" physical_partition_number="5" readbackverify="false" size_in_KB="0" sparse="false" start_byte_hex="0x842000" start_sector="2114"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_main5.bin" label="PrimaryGPT" num_partition_sectors="6" partofsingleimage="true" physical_partition_number="5" readbackverify="false" size_in_KB="24.0" sparse="false" start_byte_hex="0x0" start_sector="0"/>
- <program SECTOR_SIZE_IN_BYTES="4096" file_sector_offset="0" filename="gpt_backup5.bin" label="BackupGPT" num_partition_sectors="5" partofsingleimage="true" physical_partition_number="5" readbackverify="false" size_in_KB="20.0" sparse="false" start_byte_hex="(4096*NUM_DISK_SECTORS)-20480." start_sector="NUM_DISK_SECTORS-5."/>
-</data>
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/sec.dat b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/sec.dat
deleted file mode 100644
index 2fdcb45..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/sec.dat
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/storsec.mbn b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/storsec.mbn
deleted file mode 100644
index 768f20c..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/storsec.mbn
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/tz.mbn b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/tz.mbn
deleted file mode 100644
index 55cdf8f..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/tz.mbn
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/xbl.elf b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/xbl.elf
deleted file mode 100644
index edcad9a..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/xbl.elf
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/xbl_config.elf b/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/xbl_config.elf
deleted file mode 100644
index c9e7408..0000000
--- a/installer/db845c/dragonboard-845c-bootloader-ufs-aosp/xbl_config.elf
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/flash-all-aosp.sh b/installer/db845c/flash-all-aosp.sh
index e6b1995..0000478 100755
--- a/installer/db845c/flash-all-aosp.sh
+++ b/installer/db845c/flash-all-aosp.sh
@@ -1,30 +1,33 @@
#!/bin/bash
-
INSTALLER_DIR="`dirname ${0}`"
-FIRMWARE_DIR="dragonboard-845c-bootloader-ufs-aosp"
-
# for cases that don't run "lunch db845c-userdebug"
if [ -z "${ANDROID_BUILD_TOP}" ]; then
- ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../
+ ANDROID_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`"
ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/db845c"
fi
if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then
- echo "FLASH-ALL-AOSP: error in locating out/target directory, check if it exist"
+ echo "FLASH-ALL-AOSP: error in locating ${ANDROID_PRODUCT_OUT}/ directory, check if it exist"
exit
fi
-echo "android out dir:${ANDROID_PRODUCT_OUT}"
+. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
+
+FIRMWARE_DIR="${ANDROID_BUILD_TOP}/vendor/linaro/db845c/${EXPECTED_LINARO_VENDOR_VERSION}"
# TODO: Pull one-time recovery/qdl path out of standard install
# Flash bootloader firmware files
-if [ ! -d "${INSTALLER_DIR}/${FIRMWARE_DIR}/" ]; then
- echo "FLASH-ALL-AOSP: No firmware directory? Make sure binaries have been provided"
+if [ ! -d "${FIRMWARE_DIR}/" ]; then
+ echo "FLASH-ALL-AOSP: Missing vendor firmware package?"
+ echo " Make sure the vendor binaries have been downloaded from"
+ echo " ${VND_PKG_URL}"
+ echo " and extracted to $ANDROID_BUILD_TOP."
exit
fi
-pushd "${INSTALLER_DIR}/${FIRMWARE_DIR}" > /dev/null
+pushd "${FIRMWARE_DIR}/dragonboard-845c-bootloader-ufs-aosp" > /dev/null
+echo "FLASH-ALL-AOSP: Flash bootloader images"
./flashall
popd > /dev/null
@@ -33,6 +36,8 @@ echo "FLASH-ALL-AOSP: Set HDMI monitor output"
fastboot oem select-display-panel foobar
fastboot reboot bootloader
+echo "android out dir:${ANDROID_PRODUCT_OUT}"
+
# Slot _a is already marked as active by bootloader but just in case..
echo "FLASH-ALL-AOSP: Mark _a slot as active"
fastboot set_active a
@@ -42,5 +47,10 @@ echo "FLASH-ALL-AOSP: Flash super/dynamic image"
fastboot flash super "${ANDROID_PRODUCT_OUT}"/super.img
echo "FLASH-ALL-AOSP: Flash userdata image"
fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img
+echo "FLASH-ALL-AOSP: Flash vendor_boot image"
+fastboot flash vendor_boot "${ANDROID_PRODUCT_OUT}"/vendor_boot.img
+echo "FLASH-ALL-AOSP: Formatting metadata"
+fastboot format:ext4 metadata
+echo "FLASH-ALL-AOSP: Rebooting"
fastboot reboot
diff --git a/installer/db845c/qdl b/installer/db845c/qdl
deleted file mode 100755
index 3eedf67..0000000
--- a/installer/db845c/qdl
+++ /dev/null
Binary files differ
diff --git a/installer/db845c/recovery.sh b/installer/db845c/recovery.sh
index 20fd45c..e345f3e 100755
--- a/installer/db845c/recovery.sh
+++ b/installer/db845c/recovery.sh
@@ -2,31 +2,31 @@
INSTALLER_DIR="`dirname ${0}`"
-QDL="`readlink -f ${INSTALLER_DIR}/qdl`"
-FIRMWARE_DIR="dragonboard-845c-bootloader-ufs-aosp"
-
# for cases that don't run "lunch db845c-userdebug"
if [ -z "${ANDROID_BUILD_TOP}" ]; then
- ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../
- ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/db845c"
+ ANDROID_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`"
fi
-if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then
- echo "RECOVERY: error in locating out directory, check if it exist"
- exit
-fi
-echo "android out dir:${ANDROID_PRODUCT_OUT}"
+. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
+
+FIRMWARE_DIR="${ANDROID_BUILD_TOP}/vendor/linaro/db845c/${EXPECTED_LINARO_VENDOR_VERSION}"
# TODO: Pull one-time recovery/qdl path out of standard install
# Flash bootloader firmware files
-if [ ! -d "${INSTALLER_DIR}/${FIRMWARE_DIR}/" ]; then
- echo "RECOVERY: No firmware directory? Make sure binaries have been provided"
+if [ ! -d "${FIRMWARE_DIR}/" ]; then
+ echo "RECOVERY: Missing vendor firmware package?"
+ echo " Make sure the vendor binaries have been downloaded from"
+ echo " ${VND_PKG_URL}"
+ echo " and extracted to $ANDROID_BUILD_TOP."
exit
fi
-pushd "${INSTALLER_DIR}/${FIRMWARE_DIR}" > /dev/null
-sudo "${QDL}" prog_firehose_ddr.elf rawprogram[012345].xml patch[012345].xml
+QDL="`readlink -f ${FIRMWARE_DIR}/qdl/qdl`"
+
+pushd "${FIRMWARE_DIR}/dragonboard-845c-bootloader-ufs-aosp" > /dev/null
+echo "RECOVERY: Running QDL board recovery tool"
+sudo ${QDL} prog_firehose_ddr.elf rawprogram[012345].xml patch[012345].xml
popd > /dev/null
echo
diff --git a/installer/rb5/README b/installer/rb5/README
new file mode 100644
index 0000000..ee59bdb
--- /dev/null
+++ b/installer/rb5/README
@@ -0,0 +1,70 @@
+These instructions will help you flashing the prebuilt bootloader
+and AOSP images(built from sources) on rb5.
+
+First, make sure you have built the AOSP images for RB5 by
+running the rb5-userdebug lunch target.
+
+
+Boot the board into fastboot mode:
+----------------------------------
+The easiest way to boot into fastboot mode is to run something
+like "adb reboot bootloader" from the host, or
+"reboot bootloader" on the device. However, this
+functionality may depend on the software installed on the board
+to work, so you may need to manually enter fastboot mode as
+follows.
+
+To manually enter fastboot mode:
+--------------------------------
+* To manually boot the board into fastboot mode, press DOWN arrow
+ key over serial UART console when restarting the board.
+
+ OR
+
+* Follow the instructions here
+https://www.96boards.org/documentation/consumer/dragonboard/qualcomm-robotics-rb5/installation/board-recovery.md.html#booting-into-fastboot
+
+
+Flash the board:
+----------------
+Once the board is in fastboot mode, you can then flash bootloader
+binaries and AOSP images by running the following script from
+device/linaro/dragonboard/installer/rb5/ directory:
+
+ $ ./flash-all-aosp.sh
+
+
+Troubleshooting:
+----------------
+* If you have flashed AOSP images and you can see the boot logs
+ on Serial prompt but no UI then try updating the lt9611uxc
+ firmware version. Factory shipped RB5 has an older version of
+ lt9611uxc firmware flashed on it and it is incompatible with
+ upstream kernel. Try updating the firmware version by running
+ the following adb shell commands:
+
+ $ adb wait-for-device; adb root; adb shell "echo 1 > /sys/bus/i2c/devices/5-002b/lt9611uxc_firmware"
+
+* Make sure the USB-C cable is connected. As it has to be
+ removed to fully power the device down, it is easy to forget
+ to reconnect it!
+
+* If you cannot get the board into fastboot mode, or for some
+ reason the flash-all-aosp.sh script does not work, you can do
+ a full recovery flash of the board using the following
+ instructions.
+
+
+Recovery:
+--------
+First boot into recovery mode by follwing the recovery
+instructions from here:
+https://www.96boards.org/documentation/consumer/dragonboard/qualcomm-robotics-rb5/installation/board-recovery.md.html
+
+Then run the recovery script from the
+device/linaro/dragonboard/installer/rb5/ directory:
+
+ $ ./recovery.sh
+
+This will do a recovery flash of the ptable and bootloader
+binaries.
diff --git a/installer/rb5/flash-all-aosp.sh b/installer/rb5/flash-all-aosp.sh
new file mode 100755
index 0000000..28eb0e4
--- /dev/null
+++ b/installer/rb5/flash-all-aosp.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+INSTALLER_DIR="`dirname ${0}`"
+
+# for cases that don't run "lunch rb5-userdebug"
+if [ -z "${ANDROID_BUILD_TOP}" ]; then
+ ANDROID_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`"
+ ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/rb5"
+fi
+
+if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then
+ echo "FLASH-ALL-AOSP: error in locating ${ANDROID_PRODUCT_OUT}/ directory, check if it exist"
+ exit
+fi
+
+. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
+
+FIRMWARE_DIR="${ANDROID_BUILD_TOP}/vendor/linaro/rb5/${EXPECTED_LINARO_VENDOR_VERSION}"
+
+# TODO: Pull one-time recovery/qdl path out of standard install
+# Flash bootloader firmware files
+if [ ! -d "${FIRMWARE_DIR}/" ]; then
+ echo "FLASH-ALL-AOSP: Missing vendor firmware package?"
+ echo " Make sure the vendor binaries have been downloaded from"
+ echo " ${VND_PKG_URL}"
+ echo " and extracted to $ANDROID_BUILD_TOP."
+ exit
+fi
+
+pushd "${FIRMWARE_DIR}/rb5-bootloader-ufs-aosp" > /dev/null
+echo "FLASH-ALL-AOSP: Flash bootloader images"
+./flashall
+popd > /dev/null
+
+echo "android out dir:${ANDROID_PRODUCT_OUT}"
+
+echo "FLASH-ALL-AOSP: Flash boot img"
+fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img
+echo "FLASH-ALL-AOSP: Flash super/dynamic image"
+fastboot flash super "${ANDROID_PRODUCT_OUT}"/super.img
+echo "FLASH-ALL-AOSP: Flash userdata image"
+fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img
+echo "FLASH-ALL-AOSP: Flash vendor_boot image"
+fastboot flash vendor_boot "${ANDROID_PRODUCT_OUT}"/vendor_boot.img
+echo "FLASH-ALL-AOSP: Formatting metadata"
+fastboot format:ext4 metadata
+
+echo "FLASH-ALL-AOSP: Rebooting"
+fastboot reboot
+
+echo "FLASH-ALL-AOSP: Updating lt9611uxc firmware version"
+echo " Waiting for adb.."
+echo
+adb wait-for-device
+VERSION=`adb shell su 0 cat /sys/bus/i2c/devices/5-002b/lt9611uxc_firmware`
+if [ "$VERSION" -lt "43" ] ; then
+ echo "FLASH-ALL-AOSP: lt9611uxc 5-002b: Updating firmware... May take up to 120 seconds. Do not switch off the device"
+ adb shell "echo 1 | su 0 tee /sys/bus/i2c/devices/5-002b/lt9611uxc_firmware > /dev/null"
+ echo "FLASH-ALL-AOSP: lt9611uxc 5-002b: Firmware updates successfully"
+ echo "FLASH-ALL-AOSP: Rebooting"
+ adb reboot
+fi
+echo "FLASH-ALL-AOSP: Done"
diff --git a/installer/rb5/recovery.sh b/installer/rb5/recovery.sh
new file mode 100755
index 0000000..156a16d
--- /dev/null
+++ b/installer/rb5/recovery.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+INSTALLER_DIR="`dirname ${0}`"
+
+# for cases that don't run "lunch rb5-userdebug"
+if [ -z "${ANDROID_BUILD_TOP}" ]; then
+ ANDROID_BUILD_TOP="`readlink -f ${INSTALLER_DIR}/../../../../../`"
+fi
+
+. "${ANDROID_BUILD_TOP}/device/linaro/dragonboard/vendor-package-ver.sh"
+
+FIRMWARE_DIR="${ANDROID_BUILD_TOP}/vendor/linaro/rb5/${EXPECTED_LINARO_VENDOR_VERSION}"
+
+# TODO: Pull one-time recovery/qdl path out of standard install
+# Flash bootloader firmware files
+if [ ! -d "${FIRMWARE_DIR}/" ]; then
+ echo "RECOVERY: Missing vendor firmware package?"
+ echo " Make sure the vendor binaries have been downloaded from"
+ echo " ${VND_PKG_URL}"
+ echo " and extracted to $ANDROID_BUILD_TOP."
+ exit
+fi
+
+QDL="`readlink -f ${FIRMWARE_DIR}/qdl/qdl`"
+
+pushd "${FIRMWARE_DIR}/rb5-bootloader-ufs-aosp" > /dev/null
+echo "RECOVERY: Running QDL board recovery tool"
+sudo ${QDL} prog_firehose_ddr.elf rawprogram?.xml patch?.xml
+popd > /dev/null
+
+echo
+echo
+echo "RECOVERY: Please boot the RB5 into fastboot mode, and use the flash-all-aosp.sh script!"
+echo
diff --git a/libmemtrack/memtrack_dragonboard.c b/libmemtrack/memtrack_dragonboard.c
deleted file mode 100644
index b7da750..0000000
--- a/libmemtrack/memtrack_dragonboard.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2017 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 <hardware/memtrack.h>
-
-int dragonboard_memtrack_init(const struct memtrack_module *module)
-{
- if (!module)
- return -1;
-
- return 0;
-}
-
-static struct hw_module_methods_t memtrack_module_methods = {
- .open = NULL,
-};
-
-struct memtrack_module HAL_MODULE_INFO_SYM = {
- .common = {
- .tag = HARDWARE_MODULE_TAG,
- .module_api_version = MEMTRACK_MODULE_API_VERSION_0_1,
- .hal_api_version = HARDWARE_HAL_API_VERSION,
- .id = MEMTRACK_HARDWARE_MODULE_ID,
- .name = "Dummy Memory Tracker HAL for Dragonboards",
- .author = "The Android Open Source Project",
- .methods = &memtrack_module_methods,
- },
-
- .init = dragonboard_memtrack_init,
-};
diff --git a/manifest.xml b/manifest.xml
index 897f183..99c8500 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -1,99 +1,69 @@
-<manifest version="1.0" type="device" target-level="2">
+<manifest version="1.0" type="device" target-level="6">
<hal format="hidl">
- <name>android.hardware.graphics.allocator</name>
+ <name>android.hardware.audio</name>
<transport>hwbinder</transport>
- <version>2.0</version>
+ <version>7.0</version>
<interface>
- <name>IAllocator</name>
+ <name>IDevicesFactory</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.graphics.composer</name>
+ <name>android.hardware.audio.effect</name>
<transport>hwbinder</transport>
- <version>2.2</version>
- <interface>
- <name>IComposer</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
- <name>android.hardware.graphics.mapper</name>
- <transport arch="32+64">passthrough</transport>
- <version>2.1</version>
+ <version>7.0</version>
<interface>
- <name>IMapper</name>
+ <name>IEffectsFactory</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.configstore</name>
+ <name>android.hardware.bluetooth</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
- <name>ISurfaceFlingerConfigs</name>
- <instance>default</instance>
- </interface>
- </hal>
- <hal format="hidl">
- <name>android.hardware.drm</name>
- <transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>ICryptoFactory</name>
- <instance>default</instance>
- </interface>
- <interface>
- <name>IDrmFactory</name>
+ <name>IBluetoothHci</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.media.omx</name>
+ <name>android.hardware.bluetooth.audio</name>
<transport>hwbinder</transport>
- <version>1.0</version>
- <interface>
- <name>IOmx</name>
- <instance>default</instance>
- </interface>
+ <version>2.0</version>
<interface>
- <name>IOmxStore</name>
+ <name>IBluetoothAudioProvidersFactory</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.soundtrigger</name>
+ <name>android.hardware.camera.provider</name>
<transport>hwbinder</transport>
- <version>2.0</version>
+ <impl level="generic"></impl>
+ <version>2.4</version>
<interface>
- <name>ISoundTriggerHw</name>
- <instance>default</instance>
+ <name>ICameraProvider</name>
+ <instance>external/0</instance>
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.audio</name>
+ <name>android.hardware.drm</name>
<transport>hwbinder</transport>
- <version>4.0</version>
+ <version>1.3</version>
<interface>
- <name>IDevicesFactory</name>
+ <name>ICryptoFactory</name>
<instance>default</instance>
</interface>
- </hal>
- <hal format="hidl">
- <name>android.hardware.audio.effect</name>
- <transport>hwbinder</transport>
- <version>4.0</version>
<interface>
- <name>IEffectsFactory</name>
+ <name>IDrmFactory</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.bluetooth</name>
+ <name>android.hardware.graphics.composer</name>
<transport>hwbinder</transport>
- <version>1.1</version>
+ <version>2.3</version>
<interface>
- <name>IBluetoothHci</name>
+ <name>IComposer</name>
<instance>default</instance>
</interface>
</hal>
@@ -107,20 +77,24 @@
</interface>
</hal>
<hal format="hidl">
- <name>android.hardware.memtrack</name>
+ <name>android.hardware.media.omx</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
- <name>IMemtrack</name>
+ <name>IOmx</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IOmxStore</name>
<instance>default</instance>
</interface>
</hal>
- <hal format="hidl">
- <name>android.hardware.health</name>
+ <hal format="hidl">
+ <name>android.hardware.soundtrigger</name>
<transport>hwbinder</transport>
- <version>2.0</version>
+ <version>2.3</version>
<interface>
- <name>IHealth</name>
+ <name>ISoundTriggerHw</name>
<instance>default</instance>
</interface>
</hal>
diff --git a/mini-manifest.xml b/mini-manifest.xml
new file mode 100644
index 0000000..6d93a06
--- /dev/null
+++ b/mini-manifest.xml
@@ -0,0 +1,2 @@
+<manifest version="1.0" type="device" target-level="4">
+</manifest>
diff --git a/mini.mk b/mini.mk
new file mode 100644
index 0000000..eb2d366
--- /dev/null
+++ b/mini.mk
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2022 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.
+#
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_no_zygote.mk)
+$(call inherit-product, device/generic/goldfish/minimal_system.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+
+PRODUCT_PACKAGES += \
+ android.hardware.keymaster@4.1-service \
+ android.hidl.allocator@1.0-service \
+ android.system.suspend@1.0-service \
+ com.android.i18n \
+ com.android.runtime \
+ keystore2 \
+ init_vendor \
+ libstatshidl \
+ mediaserver \
+ selinux_policy_nonsystem \
+ system_compatibility_matrix.xml \
+ system_manifest.xml \
+ tune2fs \
+ vdc \
+ vendor_compatibility_matrix.xml \
+ vendor_manifest.xml \
+
+# Disable vintf manifest checking. The mini targets do not have the usual
+# set of hardware interfaces, some of which are required by the vintf
+# compatibility matrix.
+PRODUCT_ENFORCE_VINTF_MANIFEST_OVERRIDE := false
+DEVICE_MANIFEST_FILE := device/linaro/dragonboard/mini-manifest.xml
diff --git a/pixel3_mainline.mk b/pixel3_mainline.mk
deleted file mode 100644
index ed3bee9..0000000
--- a/pixel3_mainline.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-# Inherit the full_base and device configurations
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
-$(call inherit-product, device/linaro/dragonboard/pixel3_mainline/device.mk)
-$(call inherit-product, device/linaro/dragonboard/device-common.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
-
-# Product overrides
-PRODUCT_NAME := pixel3_mainline
-PRODUCT_DEVICE := pixel3_mainline
-PRODUCT_BRAND := Android
diff --git a/pixel3_mainline/BoardConfig.mk b/pixel3_mainline/BoardConfig.mk
deleted file mode 100644
index 03fce75..0000000
--- a/pixel3_mainline/BoardConfig.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-include device/linaro/dragonboard/BoardConfigCommon.mk
-
-# Board Information
-TARGET_BOOTLOADER_BOARD_NAME := pixel3_mainline
-TARGET_BOARD_PLATFORM := pixel3_mainline
-
-# Image Configuration
-BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
-BOARD_FLASH_BLOCK_SIZE := 131072
-# Super partition
-BOARD_SUPER_PARTITION_SIZE := 2952790016
-BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 2952790016
-BOARD_SUPER_PARTITION_METADATA_DEVICE := system_b
diff --git a/pixel3_mainline/device.mk b/pixel3_mainline/device.mk
deleted file mode 100644
index aab118b..0000000
--- a/pixel3_mainline/device.mk
+++ /dev/null
@@ -1,30 +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.
-#
-
-# copied from crosshatch
-# setup dalvik vm configs
-$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
-
-PRODUCT_COPY_FILES := \
- device/linaro/dragonboard/fstab.ramdisk.common:$(TARGET_COPY_OUT_RAMDISK)/fstab.pixel3_mainline \
- device/linaro/dragonboard/fstab.ramdisk.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.pixel3_mainline \
- device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/init/fstab.pixel3_mainline \
- device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.pixel3_mainline.rc \
- device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.pixel3_mainline.usb.rc \
- device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/pixel3_mainline.kl
-
-# Build generic Audio HAL
-PRODUCT_PACKAGES := audio.primary.pixel3_mainline
diff --git a/qcom/init.qcom.rc b/qcom/init.qcom.rc
new file mode 100644
index 0000000..38d8d00
--- /dev/null
+++ b/qcom/init.qcom.rc
@@ -0,0 +1,56 @@
+service set_hw /vendor/bin/set_hw.sh
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+service qrtr-ns /vendor/bin/qrtr-ns -f 1
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+service pd_mapper /vendor/bin/pd-mapper
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+service tqftpserv /vendor/bin/tqftpserv
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+service rmtfs /vendor/bin/rmtfs -o /dev/block/platform/soc@0/1d84000.ufshc/by-name -P -r -s
+ class core
+ user root
+ group system
+ disabled
+ oneshot
+
+on early-init
+ start set_hw
+ exec - root -- /vendor/bin/qrtr-cfg 1
+ start qrtr-ns
+
+on post-fs
+ start pd_mapper
+
+on post-fs-data
+ mkdir /data/vendor
+ mkdir /data/vendor/tmp
+ mkdir /data/vendor/readwrite
+ mkdir /data/vendor/readonly
+ mkdir /data/vendor/readonly/firmware
+ mkdir /data/vendor/readonly/firmware/image
+ write /sys/class/firmware/timeout 1
+ start tqftpserv
+ start rmtfs
+
+on shutdown
+ stop rmtfs
diff --git a/qcom/pd-mapper/Android.bp b/qcom/pd-mapper/Android.bp
new file mode 100644
index 0000000..7e86231
--- /dev/null
+++ b/qcom/pd-mapper/Android.bp
@@ -0,0 +1,30 @@
+package {
+ default_applicable_licenses: [
+ "device_linaro_dragonboard_qcom_pd-mapper_license",
+ ],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "device_linaro_dragonboard_qcom_pd-mapper_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "LICENSE",
+ ],
+}
+
+cc_binary {
+ name: "pd-mapper",
+ vendor: true,
+ srcs: [
+ "pd-mapper.c",
+ "assoc.c",
+ "json.c",
+ "servreg_loc.c",
+ ],
+ shared_libs: ["libqrtr"],
+}
diff --git a/qcom/pd-mapper/LICENSE b/qcom/pd-mapper/LICENSE
new file mode 100644
index 0000000..aa8cb35
--- /dev/null
+++ b/qcom/pd-mapper/LICENSE
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2018, Linaro Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
+ */
+/*
+ * Copyright (c) 2016, Bjorn Andersson <bjorn@kryo.se>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
+ */
diff --git a/qcom/pd-mapper/Makefile b/qcom/pd-mapper/Makefile
new file mode 100644
index 0000000..908dbfd
--- /dev/null
+++ b/qcom/pd-mapper/Makefile
@@ -0,0 +1,28 @@
+PD_MAPPER := pd-mapper
+
+CFLAGS := -Wall -g -O2
+LDFLAGS := -lqrtr
+
+prefix ?= /usr/local
+bindir := $(prefix)/bin
+servicedir := $(prefix)/lib/systemd/system
+
+SRCS := pd-mapper.c \
+ assoc.c \
+ json.c \
+ servreg_loc.c
+
+OBJS := $(SRCS:.c=.o)
+
+$(PD_MAPPER): $(OBJS)
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+pd-mapper.service: pd-mapper.service.in
+ @sed 's+PD_MAPPER_PATH+$(bindir)+g' $< > $@
+
+install: $(PD_MAPPER) pd-mapper.service
+ @install -D -m 755 $(PD_MAPPER) $(DESTDIR)$(bindir)/$(PD_MAPPER)
+ @install -D -m 644 pd-mapper.service $(DESTDIR)$(servicedir)/pd-mapper.service
+
+clean:
+ rm -f $(PD_MAPPER) $(OBJS) pd-mapper.service
diff --git a/qcom/pd-mapper/assoc.c b/qcom/pd-mapper/assoc.c
new file mode 100644
index 0000000..460f0d0
--- /dev/null
+++ b/qcom/pd-mapper/assoc.c
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2013, Bjorn Andersson <bjorn@kryo.se>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "assoc.h"
+
+static unsigned long assoc_hash(const char *value)
+{
+ unsigned long hash = 0;
+ unsigned long g;
+ const char *v = value;
+
+ while (*v) {
+ hash = (hash << 4) + *(v++);
+ g = hash & 0xF0000000L;
+ if (g)
+ hash ^= g >> 24;
+ hash &= ~g;
+ }
+
+ return hash;
+}
+
+void assoc_init(struct assoc *assoc, unsigned long size)
+{
+ assert(size > 0);
+
+ assoc->size = size;
+ assoc->fill = 0;
+ assoc->keys = calloc(size, sizeof(const char *));
+ assoc->values = malloc(size * sizeof(void *));
+}
+
+void *assoc_get(struct assoc *assoc, const char *key)
+{
+ unsigned long hash;
+
+ hash = assoc_hash(key) % assoc->size;
+ while (assoc->keys[hash]) {
+ if (!strcmp(assoc->keys[hash], key))
+ return assoc->values[hash];
+
+ hash = (hash + 1) % assoc->size;
+ }
+
+ return NULL;
+}
+
+static void _assoc_set(struct assoc *assoc, const char *key, void *value)
+{
+ struct assoc new_set;
+ unsigned long hash;
+ unsigned long i;
+
+ assert(assoc->fill < assoc->size);
+
+ /* Grow set at 80% utilization */
+ if (5 * assoc->fill > 4 * assoc->size) {
+ assoc_init(&new_set, assoc->size * 5 / 4);
+
+ for (i = 0; i < assoc->size; i++)
+ if (assoc->keys[i])
+ assoc_set(&new_set, assoc->keys[i],
+ assoc->values[i]);
+
+ free(assoc->keys);
+ free(assoc->values);
+
+ assoc->keys = new_set.keys;
+ assoc->values = new_set.values;
+ assoc->fill = new_set.fill;
+ assoc->size = new_set.size;
+ }
+
+ hash = assoc_hash(key) % assoc->size;
+ while (assoc->keys[hash]) {
+ if (!strcmp(assoc->keys[hash], key)) {
+ assoc->values[hash] = value;
+ return;
+ }
+
+ hash = (hash + 1) % assoc->size;
+ }
+
+ assoc->keys[hash] = key;
+ assoc->values[hash] = value;
+ assoc->fill++;
+}
+
+void assoc_set(struct assoc *assoc, const char *key, void *value)
+{
+ _assoc_set(assoc, strdup(key), value);
+}
+
+const char *assoc_next(struct assoc *assoc, void **value, unsigned long *iter)
+{
+ unsigned long it = *iter;
+
+ while (it < assoc->size && !assoc->keys[it])
+ it++;
+
+ if (it == assoc->size)
+ return NULL;
+
+ *iter = it + 1;
+
+ if (it < assoc->size) {
+ if (value)
+ *value = assoc->values[it];
+ return assoc->keys[it];
+ } else {
+ return NULL;
+ }
+}
+
+void assoc_destroy(struct assoc *assoc)
+{
+ unsigned long i;
+
+ for (i = 0; i < assoc->size; i++)
+ free((void*)assoc->keys[i]);
+
+ free(assoc->keys);
+ free(assoc->values);
+ assoc->size = 0;
+}
diff --git a/qcom/pd-mapper/assoc.h b/qcom/pd-mapper/assoc.h
new file mode 100644
index 0000000..25d00fa
--- /dev/null
+++ b/qcom/pd-mapper/assoc.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2013, Bjorn Andersson <bjorn@kryo.se>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 __ASSOC_H__
+#define __ASSOC_H__
+
+struct assoc {
+ unsigned long size;
+ unsigned long fill;
+
+ const char **keys;
+ void **values;
+};
+
+void assoc_init(struct assoc *assoc, unsigned long size);
+void *assoc_get(struct assoc *assoc, const char *key);
+void assoc_set(struct assoc *assoc, const char *key, void *value);
+const char *assoc_next(struct assoc *assoc, void **value, unsigned long *iter);
+void assoc_destroy(struct assoc *assoc);
+
+#define assoc_foreach(key, value, assoc, iter) \
+ for ((iter) = 0, (key) = assoc_next((assoc), (value), &(iter)); \
+ (key); \
+ (key) = assoc_next((assoc), (value), &(iter)))
+
+#endif
diff --git a/qcom/pd-mapper/json.c b/qcom/pd-mapper/json.c
new file mode 100644
index 0000000..e08afa4
--- /dev/null
+++ b/qcom/pd-mapper/json.c
@@ -0,0 +1,451 @@
+/*
+ * Copyright (c) 2018-2019, Linaro Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/stat.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "json.h"
+
+static const char *input_buf;
+static int input_pos;
+static int input_len;
+
+static int json_parse_array(struct json_value *array);
+static int json_parse_object(struct json_value *object);
+static int json_parse_property(struct json_value *value);
+
+static int input(void)
+{
+ if (input_pos >= input_len)
+ return 0;
+
+ return input_buf[input_pos++];
+}
+
+static void unput(void)
+{
+ input_pos--;
+}
+
+static void json_skip_whitespace(void)
+{
+ int ch;
+
+ while ((ch = input()) && isspace(ch))
+ ;
+ unput();
+}
+
+static int json_parse_string(struct json_value *value)
+{
+ char buf[128];
+ char *b = buf;
+ int ch;
+
+ ch = input();
+ if (ch != '"') {
+ unput();
+ return 0;
+ }
+
+ while ((ch = input()) && ch != '"' && b - buf < sizeof(buf) - 1)
+ *b++ = ch;
+ *b = '\0';
+
+ if (!ch)
+ return -1;
+
+ value->type = JSON_TYPE_STRING;
+ value->u.string = strdup(buf);
+
+ return 1;
+}
+
+static int json_parse_number(struct json_value *value)
+{
+ char buf[20];
+ char *b = buf;
+ int ch;
+
+ while ((ch = input()) && isdigit(ch) && b - buf < sizeof(buf) - 1)
+ *b++ = ch;
+ *b = '\0';
+ unput();
+
+ if (b == buf)
+ return 0;
+
+ value->type = JSON_TYPE_NUMBER;
+ value->u.number = strtod(buf, NULL);
+
+ return 1;
+}
+
+static int json_parse_keyword(struct json_value *value)
+{
+ const char *match;
+ const char *m;
+ int ch;
+
+ ch = input();
+ switch (ch) {
+ case 't':
+ match = "true";
+ value->type = JSON_TYPE_TRUE;
+ break;
+ case 'f':
+ match = "false";
+ value->type = JSON_TYPE_FALSE;
+ break;
+ case 'n':
+ match = "null";
+ value->type = JSON_TYPE_NULL;
+ break;
+ default:
+ unput();
+ return 0;
+ }
+
+ m = match;
+ while (*m && *m++ == ch)
+ ch = input();
+ unput();
+
+ return *m == '\0' ? 1 : -1;
+}
+
+static int json_parse_value(struct json_value *value)
+{
+ int ret;
+
+ json_skip_whitespace();
+
+ ret = json_parse_object(value);
+ if (ret)
+ goto out;
+
+ ret = json_parse_array(value);
+ if (ret)
+ goto out;
+
+ ret = json_parse_string(value);
+ if (ret)
+ goto out;
+
+ ret = json_parse_number(value);
+ if (ret)
+ goto out;
+
+ ret = json_parse_keyword(value);
+ if (ret)
+ goto out;
+
+ fprintf(stderr, "unable to match a value\n");
+ return -1;
+
+out:
+ json_skip_whitespace();
+ return ret;
+}
+
+static int json_parse_array(struct json_value *array)
+{
+ struct json_value *value;
+ struct json_value *last = NULL;
+ int ret;
+ int ch;
+
+ ch = input();
+ if (ch != '[') {
+ unput();
+ return 0;
+ }
+
+ array->type = JSON_TYPE_ARRAY;
+ do {
+ value = calloc(1, sizeof(*value));
+ if (!value)
+ return -1;
+
+ ret = json_parse_value(value);
+ if (ret <= 0) {
+ free(value);
+ return -1;
+ }
+
+ if (!array->u.value)
+ array->u.value = value;
+ if (last)
+ last->next = value;
+ last = value;
+
+ ch = input();
+ if (ch == ']') {
+ return 1;
+ }
+
+ } while (ch == ',');
+
+ fprintf(stderr, "expected ',' got '%c'\n", ch);
+
+ return -1;
+}
+
+static int json_parse_object(struct json_value *object)
+{
+ struct json_value *value;
+ struct json_value *last = NULL;
+ int ret;
+ int ch;
+
+ ch = input();
+ if (ch != '{') {
+ unput();
+ return 0;
+ }
+
+ object->type = JSON_TYPE_OBJECT;
+
+ do {
+ value = calloc(1, sizeof(*value));
+ if (!value)
+ return -1;
+
+ ret = json_parse_property(value);
+ if (ret <= 0) {
+ free(value);
+ return -1;
+ }
+
+ if (!object->u.value)
+ object->u.value = value;
+ if (last)
+ last->next = value;
+ last = value;
+
+ ch = input();
+ if (ch == '}') {
+ return 1;
+ }
+ } while (ch == ',');
+
+ return -1;
+}
+
+static int json_parse_property(struct json_value *value)
+{
+ struct json_value key;
+ int ret;
+ int ch;
+
+ json_skip_whitespace();
+
+ ret = json_parse_string(&key);
+ if (ret <= 0)
+ return -1;
+
+ value->key = key.u.string;
+
+ json_skip_whitespace();
+
+ ch = input();
+ if (ch != ':')
+ return -1;
+
+ ret = json_parse_value(value);
+ if (ret <= 0)
+ return -1;
+
+ return 1;
+}
+
+struct json_value *json_parse(const char *json)
+{
+ struct json_value *root;
+ int ret;
+
+ input_buf = json;
+ input_pos = 0;
+ input_len = strlen(input_buf);
+
+ root = calloc(1, sizeof(*root));
+ if (!root)
+ return NULL;
+
+ ret = json_parse_value(root);
+ if (ret != 1) {
+ free(root);
+ return NULL;
+ }
+
+ return root;
+}
+
+struct json_value *json_parse_file(const char *file)
+{
+ struct json_value *root;
+ struct stat sb;
+ int ret;
+ int fd;
+
+ fd = open(file, O_RDONLY);
+ if (fd < 0) {
+ fprintf(stderr, "failed to open %s: %s\n", file, strerror(errno));
+ return NULL;
+ }
+
+ ret = fstat(fd, &sb);
+ if (ret < 0)
+ return NULL;
+
+ input_pos = 0;
+ input_len = sb.st_size;
+ input_buf = malloc(sb.st_size);
+
+ ret = read(fd, (char *)input_buf, input_len);
+
+ close(fd);
+
+ if (ret != input_len) {
+ fprintf(stderr, "failed to read %d bytes form %s\n", input_len, file);
+ return NULL;
+ }
+
+ root = calloc(1, sizeof(*root));
+ if (!root)
+ return NULL;
+
+ ret = json_parse_value(root);
+ if (ret != 1) {
+ json_free(root);
+ return NULL;
+ }
+
+ return root;
+}
+
+struct json_value *json_get_child(struct json_value *object, const char *key)
+{
+ struct json_value *it;
+
+ if(object->type != JSON_TYPE_OBJECT)
+ return NULL;
+
+ for (it = object->u.value; it; it = it->next) {
+ if (!strcmp(it->key, key))
+ return it;
+ }
+
+ return NULL;
+}
+
+int json_count_children(struct json_value *array)
+{
+ struct json_value *it;
+ int count = 0;
+
+ if (!array || array->type != JSON_TYPE_ARRAY)
+ return -1;
+
+ for (it = array->u.value; it; it = it->next)
+ count++;
+
+ return count;
+}
+
+int json_get_number(struct json_value *object, const char *key, double *number)
+{
+ struct json_value *it;
+
+ if (!object || object->type != JSON_TYPE_OBJECT)
+ return -1;
+
+ for (it = object->u.value; it; it = it->next) {
+ if (!strcmp(it->key, key)) {
+ if (it->type != JSON_TYPE_NUMBER)
+ return -1;
+
+ *number = it->u.number;
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+const char *json_get_string(struct json_value *object, const char *key)
+{
+ struct json_value *it;
+
+ if (!object || object->type != JSON_TYPE_OBJECT)
+ return NULL;
+
+ for (it = object->u.value; it; it = it->next) {
+ if (!strcmp(it->key, key)) {
+ if (it->type != JSON_TYPE_STRING)
+ return NULL;
+
+ return it->u.string;
+ }
+ }
+
+ return NULL;
+}
+
+void json_free(struct json_value *value)
+{
+ struct json_value *next;
+ struct json_value *it;
+
+ free((char *)value->key);
+
+ switch (value->type) {
+ case JSON_TYPE_OBJECT:
+ case JSON_TYPE_ARRAY:
+ it = value->u.value;
+ while (it) {
+ next = it->next;
+ json_free(it);
+ it = next;
+ }
+ break;
+ case JSON_TYPE_STRING:
+ free((char *)value->u.string);
+ break;
+ }
+
+ free(value);
+}
diff --git a/qcom/pd-mapper/json.h b/qcom/pd-mapper/json.h
new file mode 100644
index 0000000..91790a0
--- /dev/null
+++ b/qcom/pd-mapper/json.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2019, Linaro Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 __JSON_H__
+#define __JSON_H__
+
+
+enum {
+ JSON_TYPE_UNKNOWN,
+ JSON_TYPE_TRUE,
+ JSON_TYPE_FALSE,
+ JSON_TYPE_NULL,
+ JSON_TYPE_NUMBER,
+ JSON_TYPE_STRING,
+ JSON_TYPE_ARRAY,
+ JSON_TYPE_OBJECT,
+};
+
+struct json_value {
+ const char *key;
+
+ int type;
+ union {
+ double number;
+ const char *string;
+ struct json_value *value;
+ } u;
+
+ struct json_value *next;
+};
+
+struct json_value *json_parse(const char *json);
+struct json_value *json_parse_file(const char *file);
+int json_count_children(struct json_value *array);
+struct json_value *json_get_child(struct json_value *object, const char *key);
+int json_get_number(struct json_value *object, const char *key, double *number);
+const char *json_get_string(struct json_value *object, const char *key);
+void json_free(struct json_value *value);
+
+#endif
diff --git a/qcom/pd-mapper/pd-mapper.c b/qcom/pd-mapper/pd-mapper.c
new file mode 100644
index 0000000..664b77d
--- /dev/null
+++ b/qcom/pd-mapper/pd-mapper.c
@@ -0,0 +1,387 @@
+/*
+ * Copyright (c) 2018, Linaro Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <err.h>
+#include <errno.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <libgen.h>
+#include <libqrtr.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "assoc.h"
+#include "json.h"
+#include "servreg_loc.h"
+
+struct pd_map {
+ const char *service;
+ const char *domain;
+ int instance;
+};
+
+static struct pd_map *pd_maps;
+
+static void handle_get_domain_list(int sock, const struct qrtr_packet *pkt)
+{
+ struct servreg_loc_get_domain_list_resp resp = {};
+ struct servreg_loc_get_domain_list_req req = {};
+ struct servreg_loc_domain_list_entry *entry;
+ DEFINE_QRTR_PACKET(resp_buf, 256);
+ const struct pd_map *pd_map = pd_maps;
+ unsigned int txn;
+ ssize_t len;
+ int ret;
+
+ ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST,
+ SERVREG_LOC_GET_DOMAIN_LIST,
+ servreg_loc_get_domain_list_req_ei);
+ if (ret < 0) {
+ resp.result.result = QMI_RESULT_FAILURE;
+ resp.result.error = QMI_ERR_MALFORMED_MSG;
+ goto respond;
+ }
+
+ req.name[sizeof(req.name)-1] = '\0';
+
+ resp.result.result = QMI_RESULT_SUCCESS;
+ resp.db_revision_valid = 1;
+ resp.db_revision = 1;
+
+ while (pd_map->service) {
+ if (!strcmp(pd_map->service, req.name)) {
+ entry = &resp.domain_list[resp.domain_list_len++];
+
+ strcpy(entry->name, pd_map->domain);
+ entry->name_len = strlen(pd_map->domain);
+ entry->instance_id = pd_map->instance;
+ }
+
+ pd_map++;
+ }
+
+ if (resp.domain_list_len)
+ resp.domain_list_valid = 1;
+
+ resp.total_domains_valid = 1;
+ resp.total_domains = resp.domain_list_len;
+
+respond:
+ len = qmi_encode_message(&resp_buf,
+ QMI_RESPONSE, SERVREG_LOC_GET_DOMAIN_LIST,
+ txn, &resp,
+ servreg_loc_get_domain_list_resp_ei);
+ if (len < 0) {
+ fprintf(stderr,
+ "[PD-MAPPER] failed to encode get_domain_list response: %s\n",
+ strerror(-len));
+ return;
+ }
+
+ ret = qrtr_sendto(sock, pkt->node, pkt->port,
+ resp_buf.data, resp_buf.data_len);
+ if (ret < 0) {
+ fprintf(stderr,
+ "[PD-MAPPER] failed to send get_domain_list response: %s\n",
+ strerror(-ret));
+ }
+}
+
+static int pd_load_map(const char *file)
+{
+ static int num_pd_maps;
+ struct json_value *sr_service;
+ struct json_value *sr_domain;
+ struct json_value *root;
+ struct json_value *it;
+ const char *subdomain;
+ const char *provider;
+ const char *service;
+ const char *domain;
+ const char *soc;
+ struct pd_map *newp;
+ struct pd_map *map;
+ double number;
+ int count;
+ int ret;
+
+ root = json_parse_file(file);
+ if (!root)
+ return -1;
+
+ sr_domain = json_get_child(root, "sr_domain");
+ soc = json_get_string(sr_domain, "soc");
+ domain = json_get_string(sr_domain, "domain");
+ subdomain = json_get_string(sr_domain, "subdomain");
+ ret = json_get_number(sr_domain, "qmi_instance_id", &number);
+ if (ret)
+ return ret;
+
+ if (!soc || !domain || !subdomain) {
+ fprintf(stderr, "failed to parse sr_domain\n");
+ return -1;
+ }
+
+ sr_service = json_get_child(root, "sr_service");
+ count = json_count_children(sr_service);
+ if (count < 0)
+ return count;
+
+ newp = realloc(pd_maps, (num_pd_maps + count + 1) * sizeof(*newp));
+ if (!newp)
+ return -1;
+ pd_maps = newp;
+
+ for (it = sr_service->u.value; it; it = it->next) {
+ provider = json_get_string(it, "provider");
+ service = json_get_string(it, "service");
+
+ if (!provider || !service) {
+ fprintf(stderr,
+ "failed to parse provdider or service from %s\n",
+ file);
+ return -1;
+ }
+
+ map = &pd_maps[num_pd_maps++];
+
+ map->service = malloc(strlen(provider) + strlen(service) + 2);
+ sprintf((char *)map->service, "%s/%s", provider, service);
+
+ map->domain = malloc(strlen(soc) + strlen(domain) + strlen(subdomain) + 3);
+ sprintf((char *)map->domain, "%s/%s/%s", soc, domain, subdomain);
+
+ map->instance = number;
+ }
+
+ pd_maps[num_pd_maps].service = NULL;
+
+ json_free(root);
+
+ return 0;
+}
+
+#ifndef ANDROID
+#define FIRMWARE_BASE "/lib/firmware/"
+#else
+#define FIRMWARE_BASE "/vendor/firmware/"
+#endif
+
+static int pd_enumerate_jsons(struct assoc *json_set)
+{
+ char firmware_value[PATH_MAX];
+ char json_path[PATH_MAX];
+ char firmware_attr[32];
+ struct dirent *fw_de;
+ char path[PATH_MAX];
+ struct dirent *de;
+ int firmware_fd;
+ DIR *class_dir;
+ int class_fd;
+ DIR *fw_dir;
+ size_t len;
+ size_t n;
+
+ class_fd = open("/sys/class/remoteproc", O_RDONLY | O_DIRECTORY);
+ if (class_fd < 0) {
+ warn("failed to open remoteproc class");
+ return -1;
+ }
+
+ class_dir = fdopendir(class_fd);
+ if (!class_dir) {
+ warn("failed to opendir");
+ goto close_class;
+ }
+
+ while ((de = readdir(class_dir)) != NULL) {
+ if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
+ continue;
+
+ if (strlen(de->d_name) + sizeof("/firmware") > sizeof(firmware_attr))
+ continue;
+
+ strcpy(firmware_attr, de->d_name);
+ strcat(firmware_attr, "/firmware");
+
+ firmware_fd = openat(class_fd, firmware_attr, O_RDONLY);
+ if (firmware_fd < 0)
+ continue;
+
+ n = read(firmware_fd, firmware_value, sizeof(firmware_value));
+ close(firmware_fd);
+ if (n < 0) {
+ continue;
+ }
+
+ firmware_value[n] = '\0';
+
+ if (strlen(FIRMWARE_BASE) + strlen(firmware_value) + 1 > sizeof(path))
+ continue;
+
+ strcpy(path, FIRMWARE_BASE);
+ strcat(path, dirname(firmware_value));
+
+ fw_dir = opendir(path);
+ while ((fw_de = readdir(fw_dir)) != NULL) {
+ if (!strcmp(fw_de->d_name, ".") || !strcmp(fw_de->d_name, ".."))
+ continue;
+
+ len = strlen(fw_de->d_name);
+ if (len < 5 || strcmp(&fw_de->d_name[len - 4], ".jsn"))
+ continue;
+
+ if (strlen(FIRMWARE_BASE) + strlen(firmware_value) + 1 +
+ strlen(fw_de->d_name) + 1 > sizeof(path))
+ continue;
+
+ strcpy(json_path, path);
+ strcat(json_path, "/");
+ strcat(json_path, fw_de->d_name);
+
+ assoc_set(json_set, json_path, NULL);
+ }
+
+ closedir(fw_dir);
+ }
+
+ closedir(class_dir);
+close_class:
+ close(class_fd);
+
+ return 0;
+}
+
+static int pd_load_maps(void)
+{
+ struct assoc json_set;
+ unsigned long it;
+ const char *jsn;
+ int ret = 0;
+
+ assoc_init(&json_set, 20);
+
+ pd_enumerate_jsons(&json_set);
+
+ assoc_foreach(jsn, NULL, &json_set, it) {
+ ret = pd_load_map(jsn);
+ if (ret < 0)
+ break;
+ }
+
+ assoc_destroy(&json_set);
+
+ return ret;
+}
+
+int main(int argc __unused, char **argv __unused)
+{
+ struct sockaddr_qrtr sq;
+ struct qrtr_packet pkt;
+ unsigned int msg_id;
+ socklen_t sl;
+ char buf[4096];
+ int ret;
+ int fd;
+
+ ret = pd_load_maps();
+ if (ret)
+ exit(1);
+
+ if (!pd_maps) {
+ fprintf(stderr, "no pd maps available\n");
+ exit(1);
+ }
+
+ fd = qrtr_open(0);
+ if (fd < 0) {
+ fprintf(stderr, "failed to open qrtr socket\n");
+ exit(1);
+ }
+
+ ret = qrtr_publish(fd, SERVREG_QMI_SERVICE,
+ SERVREG_QMI_VERSION, SERVREG_QMI_INSTANCE);
+ if (ret < 0) {
+ fprintf(stderr, "failed to publish service registry service\n");
+ exit(1);
+ }
+
+ for (;;) {
+ ret = qrtr_poll(fd, -1);
+ if (ret < 0) {
+ if (errno == EINTR) {
+ continue;
+ } else {
+ fprintf(stderr, "qrtr_poll failed\n");
+ break;
+ }
+ }
+
+ sl = sizeof(sq);
+ ret = recvfrom(fd, buf, sizeof(buf), 0, (void *)&sq, &sl);
+ if (ret < 0) {
+ ret = -errno;
+ if (ret != -ENETRESET)
+ fprintf(stderr, "[PD-MAPPER] recvfrom failed: %d\n", ret);
+ return ret;
+ }
+
+ ret = qrtr_decode(&pkt, buf, ret, &sq);
+ if (ret < 0) {
+ fprintf(stderr, "[PD-MAPPER] unable to decode qrtr packet\n");
+ return ret;
+ }
+
+ switch (pkt.type) {
+ case QRTR_TYPE_DATA:
+ ret = qmi_decode_header(&pkt, &msg_id);
+ if (ret < 0)
+ continue;
+
+ switch (msg_id) {
+ case SERVREG_LOC_GET_DOMAIN_LIST:
+ handle_get_domain_list(fd, &pkt);
+ break;
+ case SERVREG_LOC_PFR:
+ printf("[PD-MAPPER] pfr\n");
+ break;
+ };
+ break;
+ };
+ }
+
+ close(fd);
+
+ return 0;
+}
diff --git a/qcom/pd-mapper/pd-mapper.service.in b/qcom/pd-mapper/pd-mapper.service.in
new file mode 100644
index 0000000..09b594b
--- /dev/null
+++ b/qcom/pd-mapper/pd-mapper.service.in
@@ -0,0 +1,11 @@
+[Unit]
+Description=Qualcomm PD mapper service
+Requires=qrtr-ns.service
+After=qrtr-ns.service
+
+[Service]
+ExecStart=PD_MAPPER_PATH/pd-mapper
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/qcom/pd-mapper/servreg_loc.c b/qcom/pd-mapper/servreg_loc.c
new file mode 100644
index 0000000..6309498
--- /dev/null
+++ b/qcom/pd-mapper/servreg_loc.c
@@ -0,0 +1,169 @@
+#include <errno.h>
+#include <string.h>
+#include "servreg_loc.h"
+
+struct qmi_elem_info servreg_loc_qmi_result_ei[] = {
+ {
+ .data_type = QMI_UNSIGNED_2_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint16_t),
+ .offset = offsetof(struct servreg_loc_qmi_result, result),
+ },
+ {
+ .data_type = QMI_UNSIGNED_2_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint16_t),
+ .offset = offsetof(struct servreg_loc_qmi_result, error),
+ },
+ {}
+};
+
+struct qmi_elem_info servreg_loc_domain_list_entry_ei[] = {
+ {
+ .data_type = QMI_STRING,
+ .elem_len = 256,
+ .elem_size = sizeof(char),
+ .offset = offsetof(struct servreg_loc_domain_list_entry, name)
+ },
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .offset = offsetof(struct servreg_loc_domain_list_entry, instance_id),
+ },
+ {
+ .data_type = QMI_UNSIGNED_1_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint8_t),
+ .offset = offsetof(struct servreg_loc_domain_list_entry, service_data_valid),
+ },
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .offset = offsetof(struct servreg_loc_domain_list_entry, service_data),
+ },
+ {}
+};
+
+struct qmi_elem_info servreg_loc_get_domain_list_req_ei[] = {
+ {
+ .data_type = QMI_STRING,
+ .elem_len = 256,
+ .elem_size = sizeof(char),
+ .array_type = VAR_LEN_ARRAY,
+ .tlv_type = 1,
+ .offset = offsetof(struct servreg_loc_get_domain_list_req, name)
+ },
+ {
+ .data_type = QMI_OPT_FLAG,
+ .elem_len = 1,
+ .elem_size = sizeof(bool),
+ .tlv_type = 16,
+ .offset = offsetof(struct servreg_loc_get_domain_list_req, offset_valid),
+ },
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .tlv_type = 16,
+ .offset = offsetof(struct servreg_loc_get_domain_list_req, offset),
+ },
+ {}
+};
+
+struct qmi_elem_info servreg_loc_get_domain_list_resp_ei[] = {
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 1,
+ .elem_size = sizeof(struct servreg_loc_qmi_result),
+ .tlv_type = 2,
+ .offset = offsetof(struct servreg_loc_get_domain_list_resp, result),
+ .ei_array = servreg_loc_qmi_result_ei,
+ },
+ {
+ .data_type = QMI_OPT_FLAG,
+ .elem_len = 1,
+ .elem_size = sizeof(bool),
+ .tlv_type = 16,
+ .offset = offsetof(struct servreg_loc_get_domain_list_resp, total_domains_valid),
+ },
+ {
+ .data_type = QMI_UNSIGNED_2_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint16_t),
+ .tlv_type = 16,
+ .offset = offsetof(struct servreg_loc_get_domain_list_resp, total_domains),
+ },
+ {
+ .data_type = QMI_OPT_FLAG,
+ .elem_len = 1,
+ .elem_size = sizeof(bool),
+ .tlv_type = 17,
+ .offset = offsetof(struct servreg_loc_get_domain_list_resp, db_revision_valid),
+ },
+ {
+ .data_type = QMI_UNSIGNED_2_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint16_t),
+ .tlv_type = 17,
+ .offset = offsetof(struct servreg_loc_get_domain_list_resp, db_revision),
+ },
+ {
+ .data_type = QMI_OPT_FLAG,
+ .elem_len = 1,
+ .elem_size = sizeof(bool),
+ .tlv_type = 18,
+ .offset = offsetof(struct servreg_loc_get_domain_list_resp, domain_list_valid),
+ },
+ {
+ .data_type = QMI_DATA_LEN,
+ .elem_len = 1,
+ .elem_size = sizeof(uint8_t),
+ .tlv_type = 18,
+ .offset = offsetof(struct servreg_loc_get_domain_list_resp, domain_list_len),
+ },
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 255,
+ .elem_size = sizeof(struct servreg_loc_domain_list_entry),
+ .array_type = VAR_LEN_ARRAY,
+ .tlv_type = 18,
+ .offset = offsetof(struct servreg_loc_get_domain_list_resp, domain_list),
+ .ei_array = servreg_loc_domain_list_entry_ei,
+ },
+ {}
+};
+
+struct qmi_elem_info servreg_loc_pfr_req_ei[] = {
+ {
+ .data_type = QMI_STRING,
+ .elem_len = 256,
+ .elem_size = sizeof(char),
+ .array_type = VAR_LEN_ARRAY,
+ .tlv_type = 1,
+ .offset = offsetof(struct servreg_loc_pfr_req, service)
+ },
+ {
+ .data_type = QMI_STRING,
+ .elem_len = 256,
+ .elem_size = sizeof(char),
+ .array_type = VAR_LEN_ARRAY,
+ .tlv_type = 2,
+ .offset = offsetof(struct servreg_loc_pfr_req, reason)
+ },
+ {}
+};
+
+struct qmi_elem_info servreg_loc_pfr_resp_ei[] = {
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 1,
+ .elem_size = sizeof(struct servreg_loc_qmi_result),
+ .tlv_type = 2,
+ .offset = offsetof(struct servreg_loc_pfr_resp, result),
+ .ei_array = servreg_loc_qmi_result_ei,
+ },
+ {}
+};
+
diff --git a/qcom/pd-mapper/servreg_loc.h b/qcom/pd-mapper/servreg_loc.h
new file mode 100644
index 0000000..2ac5faa
--- /dev/null
+++ b/qcom/pd-mapper/servreg_loc.h
@@ -0,0 +1,67 @@
+#ifndef __QMI_SERVREG_LOC_H__
+#define __QMI_SERVREG_LOC_H__
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include "libqrtr.h"
+
+#define SERVREG_QMI_SERVICE 64
+#define SERVREG_QMI_VERSION 257
+#define SERVREG_QMI_INSTANCE 0
+#define QMI_RESULT_SUCCESS 0
+#define QMI_RESULT_FAILURE 1
+#define QMI_ERR_NONE 0
+#define QMI_ERR_INTERNAL 1
+#define QMI_ERR_MALFORMED_MSG 2
+#define SERVREG_LOC_GET_DOMAIN_LIST 33
+#define SERVREG_LOC_PFR 36
+
+struct servreg_loc_qmi_result {
+ uint16_t result;
+ uint16_t error;
+};
+
+struct servreg_loc_domain_list_entry {
+ uint32_t name_len;
+ char name[256];
+ uint32_t instance_id;
+ uint8_t service_data_valid;
+ uint32_t service_data;
+};
+
+struct servreg_loc_get_domain_list_req {
+ uint32_t name_len;
+ char name[256];
+ bool offset_valid;
+ uint32_t offset;
+};
+
+struct servreg_loc_get_domain_list_resp {
+ struct servreg_loc_qmi_result result;
+ bool total_domains_valid;
+ uint16_t total_domains;
+ bool db_revision_valid;
+ uint16_t db_revision;
+ bool domain_list_valid;
+ uint32_t domain_list_len;
+ struct servreg_loc_domain_list_entry domain_list[255];
+};
+
+struct servreg_loc_pfr_req {
+ uint32_t service_len;
+ char service[256];
+ uint32_t reason_len;
+ char reason[256];
+};
+
+struct servreg_loc_pfr_resp {
+ struct servreg_loc_qmi_result result;
+};
+
+extern struct qmi_elem_info servreg_loc_get_domain_list_req_ei[];
+extern struct qmi_elem_info servreg_loc_get_domain_list_resp_ei[];
+extern struct qmi_elem_info servreg_loc_pfr_req_ei[];
+extern struct qmi_elem_info servreg_loc_pfr_resp_ei[];
+
+#endif
diff --git a/qcom/pd-mapper/servreg_loc.qmi b/qcom/pd-mapper/servreg_loc.qmi
new file mode 100644
index 0000000..4dc04e6
--- /dev/null
+++ b/qcom/pd-mapper/servreg_loc.qmi
@@ -0,0 +1,48 @@
+package servreg_loc;
+
+const SERVREG_QMI_SERVICE = 0x40;
+const SERVREG_QMI_VERSION = 0x101;
+const SERVREG_QMI_INSTANCE = 0x0;
+
+const QMI_RESULT_SUCCESS = 0;
+const QMI_RESULT_FAILURE = 1;
+
+const QMI_ERR_NONE = 0;
+const QMI_ERR_INTERNAL = 1;
+const QMI_ERR_MALFORMED_MSG = 2;
+
+const SERVREG_LOC_GET_DOMAIN_LIST = 0x21;
+const SERVREG_LOC_PFR = 0x24;
+
+struct qmi_result {
+ u16 result;
+ u16 error;
+};
+
+struct domain_list_entry {
+ string name;
+ u32 instance_id;
+ u8 service_data_valid;
+ u32 service_data;
+};
+
+request get_domain_list_req {
+ required string name = 1;
+ optional u32 offset = 0x10;
+} = 0x20;
+
+response get_domain_list_resp {
+ required qmi_result result = 2;
+ optional u16 total_domains = 0x10;
+ optional u16 db_revision = 0x11;
+ optional domain_list_entry domain_list[255] = 0x12;
+} = 0x20;
+
+request pfr_req {
+ required string service = 1;
+ required string reason = 2;
+} = 0x24;
+
+response pfr_resp {
+ required qmi_result result = 2;
+} = 0x24;
diff --git a/qcom/qrtr/Android.bp b/qcom/qrtr/Android.bp
new file mode 100644
index 0000000..8103bb6
--- /dev/null
+++ b/qcom/qrtr/Android.bp
@@ -0,0 +1,68 @@
+package {
+ default_applicable_licenses: [
+ "device_linaro_dragonboard_qcom_qrtr_license",
+ ],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "device_linaro_dragonboard_qcom_qrtr_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "LICENSE",
+ ],
+}
+
+cc_library {
+ name: "libqrtr",
+ vendor: true,
+ srcs: [
+ "lib/logging.c",
+ "lib/qrtr.c",
+ "lib/qmi.c",
+ ],
+ cflags: ["-fPIC"],
+ export_include_dirs: ["lib"],
+ local_include_dirs: ["src"],
+}
+
+cc_binary {
+ name: "qrtr-ns",
+ vendor: true,
+ srcs: [
+ "lib/logging.c",
+ "src/addr.c",
+ "src/ns.c",
+ "src/map.c",
+ "src/hash.c",
+ "src/waiter.c",
+ "src/util.c",
+ ],
+ local_include_dirs: ["lib"],
+}
+
+cc_binary {
+ name: "qrtr-cfg",
+ vendor: true,
+ srcs: [
+ "lib/logging.c",
+ "src/addr.c",
+ "src/cfg.c",
+ ],
+ local_include_dirs: ["lib"],
+}
+
+cc_binary {
+ name: "qrtr-lookup",
+ vendor: true,
+ srcs: [
+ "lib/logging.c",
+ "src/lookup.c",
+ "src/util.c",
+ ],
+ local_include_dirs: ["lib"],
+}
diff --git a/qcom/qrtr/LICENSE b/qcom/qrtr/LICENSE
new file mode 100644
index 0000000..afbafbe
--- /dev/null
+++ b/qcom/qrtr/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2015, Sony Mobile Communications Inc.
+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 organization 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 AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
diff --git a/qcom/qrtr/Makefile b/qcom/qrtr/Makefile
new file mode 100644
index 0000000..f814aa2
--- /dev/null
+++ b/qcom/qrtr/Makefile
@@ -0,0 +1,150 @@
+proj := qrtr
+proj-major := 1
+proj-minor := 0
+proj-version := $(proj-major).$(proj-minor)
+
+CFLAGS := -Wall -g
+LDFLAGS :=
+
+prefix := /usr/local
+bindir := $(prefix)/bin
+libdir := $(prefix)/lib
+includedir := $(prefix)/include
+servicedir := $(prefix)/lib/systemd/system
+
+ifneq ($(CROSS_COMPILE),)
+CC := $(CROSS_COMPILE)gcc
+endif
+SFLAGS := -I$(shell $(CC) -print-file-name=include) -Wno-non-pointer-null
+
+$(proj)-cfg-srcs := \
+ lib/logging.c \
+ src/addr.c \
+ src/cfg.c \
+
+$(proj)-cfg-cflags := -Ilib
+
+$(proj)-ns-srcs := \
+ lib/logging.c \
+ src/addr.c \
+ src/ns.c \
+ src/map.c \
+ src/hash.c \
+ src/waiter.c \
+ src/util.c \
+
+$(proj)-ns-cflags := -Ilib
+
+$(proj)-lookup-srcs := \
+ lib/logging.c \
+ src/lookup.c \
+ src/util.c \
+
+$(proj)-lookup-cflags := -Ilib
+
+lib$(proj).so-srcs := \
+ lib/logging.c \
+ lib/qrtr.c \
+ lib/qmi.c
+
+lib$(proj).so-cflags := -fPIC -Isrc
+
+targets := $(proj)-ns $(proj)-cfg $(proj)-lookup lib$(proj).so
+
+out := out
+src_to_obj = $(patsubst %.c,$(out)/obj/%.o,$(1))
+src_to_dep = $(patsubst %.c,$(out)/dep/%.d,$(1))
+
+all-srcs :=
+all-objs :=
+all-deps :=
+all-clean := $(out)
+all-install :=
+
+all: $(targets)
+
+$(out)/obj/%.o: %.c
+ifneq ($C,)
+ @echo "CHECK $<"
+ @sparse $< $(patsubst -iquote=%,-I%,$(CFLAGS)) $(SFLAGS)
+endif
+ @echo "CC $<"
+ @$(CC) -MM -MF $(call src_to_dep,$<) -MP -MT "$@ $(call src_to_dep,$<)" $(CFLAGS) $(_CFLAGS) $<
+ @$(CC) -o $@ -c $< $(CFLAGS) $(_CFLAGS)
+
+define add-inc-target
+$(DESTDIR)$(includedir)/$2: $1/$2
+ @echo "INSTALL $$<"
+ @install -D -m 755 $$< $$@
+
+all-install += $(DESTDIR)$(includedir)/$2
+endef
+
+define add-target-deps
+all-srcs += $($1-srcs)
+all-objs += $(call src_to_obj,$($1-srcs))
+all-deps += $(call src_to_dep,$($1-srcs))
+all-clean += $1
+$(call src_to_obj,$($1-srcs)): _CFLAGS := $($1-cflags)
+endef
+
+define add-bin-target
+
+$(call add-target-deps,$1)
+
+$1: $(call src_to_obj,$($1-srcs))
+ @echo "LD $$@"
+ $$(CC) -o $$@ $$(filter %.o,$$^) $(LDFLAGS)
+
+$(DESTDIR)$(bindir)/$1: $1
+ @echo "INSTALL $$<"
+ @install -D -m 755 $$< $$@
+
+all-install += $(DESTDIR)$(bindir)/$1
+endef
+
+define add-lib-target
+
+$(call add-target-deps,$1)
+
+$1: $(call src_to_obj,$($1-srcs))
+ @echo "LD $$@"
+ $$(CC) -o $$@ $$(filter %.o,$$^) $(LDFLAGS) -shared -Wl,-soname,$1.$(proj-major)
+
+$(DESTDIR)$(libdir)/$1.$(proj-version): $1
+ @echo "INSTALL $$<"
+ @install -D -m 755 $$< $$@
+ @ln -sf $1.$(proj-version) $(DESTDIR)$(libdir)/$1.$(proj-major)
+ @ln -sf $1.$(proj-major) $(DESTDIR)$(libdir)/$1
+
+all-install += $(DESTDIR)$(libdir)/$1.$(proj-version)
+endef
+
+define add-systemd-service-target
+$1: $1.in
+ sed 's+QRTR_NS_PATH+$(bindir)+g' $$< > $$@
+
+$(DESTDIR)$(servicedir)/$1: $1
+ @echo "INSTALL $$<"
+ @install -D -m 755 $$< $$@
+
+all-install += $(DESTDIR)$(servicedir)/$1
+endef
+
+$(foreach v,$(filter-out %.so,$(targets)),$(eval $(call add-bin-target,$v)))
+$(foreach v,$(filter %.so,$(targets)),$(eval $(call add-lib-target,$v)))
+$(eval $(call add-inc-target,lib,libqrtr.h))
+$(eval $(call add-systemd-service-target,qrtr-ns.service))
+
+install: $(all-install)
+
+clean:
+ @echo CLEAN
+ @$(RM) -r $(all-clean)
+
+$(call src_to_obj,$(all-srcs)): Makefile
+
+ifneq ("$(MAKECMDGOALS)","clean")
+cmd-goal-1 := $(shell mkdir -p $(sort $(dir $(all-objs) $(all-deps))))
+-include $(all-deps)
+endif
diff --git a/qcom/qrtr/lib/libqrtr.h b/qcom/qrtr/lib/libqrtr.h
new file mode 100644
index 0000000..87433ed
--- /dev/null
+++ b/qcom/qrtr/lib/libqrtr.h
@@ -0,0 +1,195 @@
+#ifndef _QRTR_LIB_H_
+#define _QRTR_LIB_H_
+
+#include <linux/qrtr.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef offsetof
+#define offsetof(type, md) ((unsigned long)&((type *)0)->md)
+#endif
+
+#ifndef container_of
+#define container_of(ptr, type, member) \
+ ((type *)((char *)(ptr) - offsetof(type, member)))
+#endif
+
+#ifndef AF_QIPCRTR
+#define AF_QIPCRTR 42
+#endif
+
+struct sockaddr_qrtr;
+
+struct qrtr_packet {
+ int type;
+
+ unsigned int node;
+ unsigned int port;
+
+ unsigned int service;
+ unsigned int instance;
+ unsigned int version;
+
+ void *data;
+ size_t data_len;
+};
+
+#define DEFINE_QRTR_PACKET(pkt, size) \
+ char pkt ## _buf[size]; \
+ struct qrtr_packet pkt = { .data = pkt ##_buf, \
+ .data_len = sizeof(pkt ##_buf), }
+
+#define QMI_REQUEST 0
+#define QMI_RESPONSE 2
+#define QMI_INDICATION 4
+
+#define QMI_COMMON_TLV_TYPE 0
+
+enum qmi_elem_type {
+ QMI_EOTI,
+ QMI_OPT_FLAG,
+ QMI_DATA_LEN,
+ QMI_UNSIGNED_1_BYTE,
+ QMI_UNSIGNED_2_BYTE,
+ QMI_UNSIGNED_4_BYTE,
+ QMI_UNSIGNED_8_BYTE,
+ QMI_SIGNED_1_BYTE_ENUM,
+ QMI_SIGNED_2_BYTE_ENUM,
+ QMI_SIGNED_4_BYTE_ENUM,
+ QMI_STRUCT,
+ QMI_STRING,
+};
+
+enum qmi_array_type {
+ NO_ARRAY,
+ STATIC_ARRAY,
+ VAR_LEN_ARRAY,
+};
+
+/**
+ * struct qmi_elem_info - describes how to encode a single QMI element
+ * @data_type: Data type of this element.
+ * @elem_len: Array length of this element, if an array.
+ * @elem_size: Size of a single instance of this data type.
+ * @array_type: Array type of this element.
+ * @tlv_type: QMI message specific type to identify which element
+ * is present in an incoming message.
+ * @offset: Specifies the offset of the first instance of this
+ * element in the data structure.
+ * @ei_array: Null-terminated array of @qmi_elem_info to describe nested
+ * structures.
+ */
+struct qmi_elem_info {
+ enum qmi_elem_type data_type;
+ uint32_t elem_len;
+ uint32_t elem_size;
+ enum qmi_array_type array_type;
+ uint8_t tlv_type;
+ uint32_t offset;
+ struct qmi_elem_info *ei_array;
+};
+
+#define QMI_RESULT_SUCCESS_V01 0
+#define QMI_RESULT_FAILURE_V01 1
+
+#define QMI_ERR_NONE_V01 0
+#define QMI_ERR_MALFORMED_MSG_V01 1
+#define QMI_ERR_NO_MEMORY_V01 2
+#define QMI_ERR_INTERNAL_V01 3
+#define QMI_ERR_CLIENT_IDS_EXHAUSTED_V01 5
+#define QMI_ERR_INVALID_ID_V01 41
+#define QMI_ERR_ENCODING_V01 58
+#define QMI_ERR_INCOMPATIBLE_STATE_V01 90
+#define QMI_ERR_NOT_SUPPORTED_V01 94
+
+/**
+ * qmi_response_type_v01 - common response header (decoded)
+ * @result: result of the transaction
+ * @error: error value, when @result is QMI_RESULT_FAILURE_V01
+ */
+struct qmi_response_type_v01 {
+ uint16_t result;
+ uint16_t error;
+};
+
+extern struct qmi_elem_info qmi_response_type_v01_ei[];
+
+int qrtr_open(int rport);
+void qrtr_close(int sock);
+
+int qrtr_sendto(int sock, uint32_t node, uint32_t port, const void *data, unsigned int sz);
+int qrtr_recvfrom(int sock, void *buf, unsigned int bsz, uint32_t *node, uint32_t *port);
+int qrtr_recv(int sock, void *buf, unsigned int bsz);
+
+int qrtr_new_server(int sock, uint32_t service, uint16_t version, uint16_t instance);
+int qrtr_remove_server(int sock, uint32_t service, uint16_t version, uint16_t instance);
+
+int qrtr_publish(int sock, uint32_t service, uint16_t version, uint16_t instance);
+int qrtr_bye(int sock, uint32_t service, uint16_t version, uint16_t instance);
+
+int qrtr_new_lookup(int sock, uint32_t service, uint16_t version, uint16_t instance);
+int qrtr_remove_lookup(int sock, uint32_t service, uint16_t version, uint16_t instance);
+
+int qrtr_poll(int sock, unsigned int ms);
+
+int qrtr_decode(struct qrtr_packet *dest, void *buf, size_t len,
+ const struct sockaddr_qrtr *sq);
+
+int qmi_decode_header(const struct qrtr_packet *pkt, unsigned int *msg_id);
+int qmi_decode_message(void *c_struct, unsigned int *txn,
+ const struct qrtr_packet *pkt,
+ int type, int id, struct qmi_elem_info *ei);
+ssize_t qmi_encode_message(struct qrtr_packet *pkt, int type, int msg_id,
+ int txn_id, const void *c_struct,
+ struct qmi_elem_info *ei);
+
+/* Initial kernel header didn't expose these */
+#ifndef QRTR_NODE_BCAST
+
+#define QRTR_NODE_BCAST 0xffffffffu
+#define QRTR_PORT_CTRL 0xfffffffeu
+
+enum qrtr_pkt_type {
+ QRTR_TYPE_DATA = 1,
+ QRTR_TYPE_HELLO = 2,
+ QRTR_TYPE_BYE = 3,
+ QRTR_TYPE_NEW_SERVER = 4,
+ QRTR_TYPE_DEL_SERVER = 5,
+ QRTR_TYPE_DEL_CLIENT = 6,
+ QRTR_TYPE_RESUME_TX = 7,
+ QRTR_TYPE_EXIT = 8,
+ QRTR_TYPE_PING = 9,
+ QRTR_TYPE_NEW_LOOKUP = 10,
+ QRTR_TYPE_DEL_LOOKUP = 11,
+};
+
+struct qrtr_ctrl_pkt {
+ __le32 cmd;
+
+ union {
+ struct {
+ __le32 service;
+ __le32 instance;
+ __le32 node;
+ __le32 port;
+ } server;
+
+ struct {
+ __le32 node;
+ __le32 port;
+ } client;
+ };
+} __attribute__((packed));
+
+#endif
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
diff --git a/qcom/qrtr/lib/logging.c b/qcom/qrtr/lib/logging.c
new file mode 100644
index 0000000..0b0f103
--- /dev/null
+++ b/qcom/qrtr/lib/logging.c
@@ -0,0 +1,73 @@
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <syslog.h>
+
+#define QLOG_BUF_SIZE 512
+
+static const char default_tag[] = "libqrtr";
+static const char *current_tag = default_tag;
+static int min_priority = LOG_INFO;
+
+static bool logging_to_syslog = false;
+
+void qlog_setup(const char *tag, bool use_syslog)
+{
+ current_tag = tag;
+ logging_to_syslog = use_syslog;
+
+ openlog(tag, LOG_PID, LOG_USER);
+}
+
+void qlog_set_min_priority(int priority)
+{
+ if (priority < LOG_EMERG || priority > LOG_DEBUG)
+ return;
+
+ min_priority = priority;
+}
+
+static const char *get_priority_string(int priority)
+{
+ switch (priority) {
+ case LOG_EMERG:
+ return "EMERG";
+ case LOG_ALERT:
+ return "ALERT";
+ case LOG_CRIT:
+ return "CRIT";
+ case LOG_ERR:
+ return "ERROR";
+ case LOG_WARNING:
+ return "WARNING";
+ case LOG_NOTICE:
+ return "NOTICE";
+ case LOG_INFO:
+ return "INFO";
+ case LOG_DEBUG:
+ return "DEBUG";
+ }
+ return "";
+}
+
+void qlog(int priority, const char *format, ...)
+{
+ va_list ap;
+
+ if (priority > min_priority)
+ return;
+
+ va_start(ap, format);
+
+ if (logging_to_syslog) {
+ vsyslog(priority, format, ap);
+ } else {
+ char buf[QLOG_BUF_SIZE];
+ vsnprintf(buf, QLOG_BUF_SIZE, format, ap);
+
+ fprintf(stderr, "%s %s: %s\n",
+ get_priority_string(priority), current_tag, buf);
+ }
+
+ va_end(ap);
+}
diff --git a/qcom/qrtr/lib/logging.h b/qcom/qrtr/lib/logging.h
new file mode 100644
index 0000000..8372a8f
--- /dev/null
+++ b/qcom/qrtr/lib/logging.h
@@ -0,0 +1,36 @@
+#ifndef _QRTR_LOGGING_H_
+#define _QRTR_LOGGING_H_
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <syslog.h>
+
+#if defined(__GNUC__) || defined(__clang__)
+#define __PRINTF__(fmt, args) __attribute__((format(__printf__, fmt, args)))
+#else
+#define __PRINTF__(fmt, args)
+#endif
+
+void qlog_setup(const char *tag, bool use_syslog);
+void qlog_set_min_priority(int priority);
+
+void qlog(int priority, const char *format, ...) __PRINTF__(2, 3);
+
+#define LOGD(fmt, ...) qlog(LOG_DEBUG, fmt, ##__VA_ARGS__)
+
+#define LOGW(fmt, ...) qlog(LOG_WARNING, fmt, ##__VA_ARGS__)
+#define PLOGW(fmt, ...) \
+ qlog(LOG_WARNING, fmt ": %s", ##__VA_ARGS__, strerror(errno))
+
+#define LOGE(fmt, ...) qlog(LOG_ERR, fmt, ##__VA_ARGS__)
+#define PLOGE(fmt, ...) qlog(LOG_ERR, fmt ": %s", ##__VA_ARGS__, strerror(errno))
+#define LOGE_AND_EXIT(fmt, ...) do { \
+ qlog(LOG_ERR, fmt, ##__VA_ARGS__); \
+ exit(1); \
+ } while(0)
+#define PLOGE_AND_EXIT(fmt, ...) do { \
+ qlog(LOG_ERR, fmt ": %s", ##__VA_ARGS__, strerror(errno)); \
+ exit(1); \
+ } while(0)
+
+#endif
diff --git a/qcom/qrtr/lib/qmi.c b/qcom/qrtr/lib/qmi.c
new file mode 100644
index 0000000..f1c0293
--- /dev/null
+++ b/qcom/qrtr/lib/qmi.c
@@ -0,0 +1,874 @@
+/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2017-2018 Linaro Ltd.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <errno.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "libqrtr.h"
+#include "logging.h"
+
+/**
+ * qmi_header - wireformat header of QMI messages
+ * @type: type of message
+ * @txn_id: transaction id
+ * @msg_id: message id
+ * @msg_len: length of message payload following header
+ */
+struct qmi_header {
+ uint8_t type;
+ uint16_t txn_id;
+ uint16_t msg_id;
+ uint16_t msg_len;
+} __attribute__((packed));
+
+
+#define QMI_ENCDEC_ENCODE_TLV(type, length, p_dst) do { \
+ *p_dst++ = type; \
+ *p_dst++ = ((uint8_t)((length) & 0xFF)); \
+ *p_dst++ = ((uint8_t)(((length) >> 8) & 0xFF)); \
+} while (0)
+
+#define QMI_ENCDEC_DECODE_TLV(p_type, p_length, p_src) do { \
+ *p_type = (uint8_t)*p_src++; \
+ *p_length = (uint8_t)*p_src++; \
+ *p_length |= ((uint8_t)*p_src) << 8; \
+} while (0)
+
+#define QMI_ENCDEC_ENCODE_N_BYTES(p_dst, p_src, size) \
+do { \
+ memcpy(p_dst, p_src, size); \
+ p_dst = (uint8_t *)p_dst + size; \
+ p_src = (uint8_t *)p_src + size; \
+} while (0)
+
+#define QMI_ENCDEC_DECODE_N_BYTES(p_dst, p_src, size) \
+do { \
+ memcpy(p_dst, p_src, size); \
+ p_dst = (uint8_t *)p_dst + size; \
+ p_src = (uint8_t *)p_src + size; \
+} while (0)
+
+#define UPDATE_ENCODE_VARIABLES(temp_si, buf_dst, \
+ encoded_bytes, tlv_len, encode_tlv, rc) \
+do { \
+ buf_dst = (uint8_t *)buf_dst + rc; \
+ encoded_bytes += rc; \
+ tlv_len += rc; \
+ temp_si = temp_si + 1; \
+ encode_tlv = 1; \
+} while (0)
+
+#define UPDATE_DECODE_VARIABLES(buf_src, decoded_bytes, rc) \
+do { \
+ buf_src = (uint8_t *)buf_src + rc; \
+ decoded_bytes += rc; \
+} while (0)
+
+#define TLV_LEN_SIZE sizeof(uint16_t)
+#define TLV_TYPE_SIZE sizeof(uint8_t)
+#define OPTIONAL_TLV_TYPE_START 0x10
+
+static int qmi_encode(struct qmi_elem_info *ei_array, void *out_buf,
+ const void *in_c_struct, uint32_t out_buf_len,
+ int enc_level);
+
+static int qmi_decode(struct qmi_elem_info *ei_array, void *out_c_struct,
+ const void *in_buf, uint32_t in_buf_len, int dec_level);
+
+/**
+ * skip_to_next_elem() - Skip to next element in the structure to be encoded
+ * @ei_array: Struct info describing the element to be skipped.
+ * @level: Depth level of encoding/decoding to identify nested structures.
+ *
+ * This function is used while encoding optional elements. If the flag
+ * corresponding to an optional element is not set, then encoding the
+ * optional element can be skipped. This function can be used to perform
+ * that operation.
+ *
+ * Return: struct info of the next element that can be encoded.
+ */
+static struct qmi_elem_info *skip_to_next_elem(struct qmi_elem_info *ei_array,
+ int level)
+{
+ struct qmi_elem_info *temp_ei = ei_array;
+ uint8_t tlv_type;
+
+ if (level > 1) {
+ temp_ei = temp_ei + 1;
+ } else {
+ do {
+ tlv_type = temp_ei->tlv_type;
+ temp_ei = temp_ei + 1;
+ } while (tlv_type == temp_ei->tlv_type);
+ }
+
+ return temp_ei;
+}
+
+/**
+ * qmi_calc_min_msg_len() - Calculate the minimum length of a QMI message
+ * @ei_array: Struct info array describing the structure.
+ * @level: Level to identify the depth of the nested structures.
+ *
+ * Return: Expected minimum length of the QMI message or 0 on error.
+ */
+static int qmi_calc_min_msg_len(struct qmi_elem_info *ei_array,
+ int level)
+{
+ int min_msg_len = 0;
+ struct qmi_elem_info *temp_ei = ei_array;
+
+ if (!ei_array)
+ return min_msg_len;
+
+ while (temp_ei->data_type != QMI_EOTI) {
+ /* Optional elements do not count in minimum length */
+ if (temp_ei->data_type == QMI_OPT_FLAG) {
+ temp_ei = skip_to_next_elem(temp_ei, level);
+ continue;
+ }
+
+ if (temp_ei->data_type == QMI_DATA_LEN) {
+ min_msg_len += (temp_ei->elem_size == sizeof(uint8_t) ?
+ sizeof(uint8_t) : sizeof(uint16_t));
+ temp_ei++;
+ continue;
+ } else if (temp_ei->data_type == QMI_STRUCT) {
+ min_msg_len += qmi_calc_min_msg_len(temp_ei->ei_array,
+ (level + 1));
+ temp_ei++;
+ } else if (temp_ei->data_type == QMI_STRING) {
+ if (level > 1)
+ min_msg_len += temp_ei->elem_len <= 256 ?
+ sizeof(uint8_t) : sizeof(uint16_t);
+ min_msg_len += temp_ei->elem_len * temp_ei->elem_size;
+ temp_ei++;
+ } else {
+ min_msg_len += (temp_ei->elem_len * temp_ei->elem_size);
+ temp_ei++;
+ }
+
+ /*
+ * Type & Length info. not prepended for elements in the
+ * nested structure.
+ */
+ if (level == 1)
+ min_msg_len += (TLV_TYPE_SIZE + TLV_LEN_SIZE);
+ }
+
+ return min_msg_len;
+}
+
+/**
+ * qmi_encode_basic_elem() - Encodes elements of basic/primary data type
+ * @buf_dst: Buffer to store the encoded information.
+ * @buf_src: Buffer containing the elements to be encoded.
+ * @elem_len: Number of elements, in the buf_src, to be encoded.
+ * @elem_size: Size of a single instance of the element to be encoded.
+ *
+ * This function encodes the "elem_len" number of data elements, each of
+ * size "elem_size" bytes from the source buffer "buf_src" and stores the
+ * encoded information in the destination buffer "buf_dst". The elements are
+ * of primary data type which include uint8_t - u64 or similar. This
+ * function returns the number of bytes of encoded information.
+ *
+ * Return: The number of bytes of encoded information.
+ */
+static int qmi_encode_basic_elem(void *buf_dst, const void *buf_src,
+ uint32_t elem_len, uint32_t elem_size)
+{
+ uint32_t i, rc = 0;
+
+ for (i = 0; i < elem_len; i++) {
+ QMI_ENCDEC_ENCODE_N_BYTES(buf_dst, buf_src, elem_size);
+ rc += elem_size;
+ }
+
+ return rc;
+}
+
+/**
+ * qmi_encode_struct_elem() - Encodes elements of struct data type
+ * @ei_array: Struct info array descibing the struct element.
+ * @buf_dst: Buffer to store the encoded information.
+ * @buf_src: Buffer containing the elements to be encoded.
+ * @elem_len: Number of elements, in the buf_src, to be encoded.
+ * @out_buf_len: Available space in the encode buffer.
+ * @enc_level: Depth of the nested structure from the main structure.
+ *
+ * This function encodes the "elem_len" number of struct elements, each of
+ * size "ei_array->elem_size" bytes from the source buffer "buf_src" and
+ * stores the encoded information in the destination buffer "buf_dst". The
+ * elements are of struct data type which includes any C structure. This
+ * function returns the number of bytes of encoded information.
+ *
+ * Return: The number of bytes of encoded information on success or negative
+ * errno on error.
+ */
+static int qmi_encode_struct_elem(struct qmi_elem_info *ei_array,
+ void *buf_dst, const void *buf_src,
+ uint32_t elem_len, uint32_t out_buf_len,
+ int enc_level)
+{
+ int i, rc, encoded_bytes = 0;
+ struct qmi_elem_info *temp_ei = ei_array;
+
+ for (i = 0; i < elem_len; i++) {
+ rc = qmi_encode(temp_ei->ei_array, buf_dst, buf_src,
+ out_buf_len - encoded_bytes, enc_level);
+ if (rc < 0) {
+ LOGW("%s: STRUCT Encode failure\n", __func__);
+ return rc;
+ }
+ buf_dst = (char*)buf_dst + rc;
+ buf_src = (char*)buf_src + temp_ei->elem_size;
+ encoded_bytes += rc;
+ }
+
+ return encoded_bytes;
+}
+
+/**
+ * qmi_encode_string_elem() - Encodes elements of string data type
+ * @ei_array: Struct info array descibing the string element.
+ * @buf_dst: Buffer to store the encoded information.
+ * @buf_src: Buffer containing the elements to be encoded.
+ * @out_buf_len: Available space in the encode buffer.
+ * @enc_level: Depth of the string element from the main structure.
+ *
+ * This function encodes a string element of maximum length "ei_array->elem_len"
+ * bytes from the source buffer "buf_src" and stores the encoded information in
+ * the destination buffer "buf_dst". This function returns the number of bytes
+ * of encoded information.
+ *
+ * Return: The number of bytes of encoded information on success or negative
+ * errno on error.
+ */
+static int qmi_encode_string_elem(struct qmi_elem_info *ei_array,
+ void *buf_dst, const void *buf_src,
+ uint32_t out_buf_len, int enc_level)
+{
+ int rc;
+ int encoded_bytes = 0;
+ struct qmi_elem_info *temp_ei = ei_array;
+ uint32_t string_len = 0;
+ uint32_t string_len_sz = 0;
+
+ string_len = strlen(buf_src);
+ string_len_sz = temp_ei->elem_len <= 256 ?
+ sizeof(uint8_t) : sizeof(uint16_t);
+ if (string_len > temp_ei->elem_len) {
+ LOGW("%s: String to be encoded is longer - %d > %d\n",
+ __func__, string_len, temp_ei->elem_len);
+ return -EINVAL;
+ }
+
+ if (enc_level == 1) {
+ if (string_len + TLV_LEN_SIZE + TLV_TYPE_SIZE >
+ out_buf_len) {
+ LOGW("%s: Output len %d > Out Buf len %d\n",
+ __func__, string_len, out_buf_len);
+ return -EINVAL;
+ }
+ } else {
+ if (string_len + string_len_sz > out_buf_len) {
+ LOGW("%s: Output len %d > Out Buf len %d\n",
+ __func__, string_len, out_buf_len);
+ return -EINVAL;
+ }
+ rc = qmi_encode_basic_elem(buf_dst, &string_len,
+ 1, string_len_sz);
+ encoded_bytes += rc;
+ }
+
+ rc = qmi_encode_basic_elem((char*)buf_dst + encoded_bytes, buf_src,
+ string_len, temp_ei->elem_size);
+ encoded_bytes += rc;
+
+ return encoded_bytes;
+}
+
+/**
+ * qmi_encode() - Core Encode Function
+ * @ei_array: Struct info array describing the structure to be encoded.
+ * @out_buf: Buffer to hold the encoded QMI message.
+ * @in_c_struct: Pointer to the C structure to be encoded.
+ * @out_buf_len: Available space in the encode buffer.
+ * @enc_level: Encode level to indicate the depth of the nested structure,
+ * within the main structure, being encoded.
+ *
+ * Return: The number of bytes of encoded information on success or negative
+ * errno on error.
+ */
+static int qmi_encode(struct qmi_elem_info *ei_array, void *out_buf,
+ const void *in_c_struct, uint32_t out_buf_len,
+ int enc_level)
+{
+ struct qmi_elem_info *temp_ei = ei_array;
+ uint8_t opt_flag_value = 0;
+ uint32_t data_len_value = 0, data_len_sz;
+ uint8_t *buf_dst = (uint8_t *)out_buf;
+ uint8_t *tlv_pointer;
+ uint32_t tlv_len;
+ uint8_t tlv_type;
+ uint32_t encoded_bytes = 0;
+ const void *buf_src;
+ int encode_tlv = 0;
+ int rc;
+
+ if (!ei_array)
+ return 0;
+
+ tlv_pointer = buf_dst;
+ tlv_len = 0;
+ if (enc_level == 1)
+ buf_dst = buf_dst + (TLV_LEN_SIZE + TLV_TYPE_SIZE);
+
+ while (temp_ei->data_type != QMI_EOTI) {
+ buf_src = (char*)in_c_struct + temp_ei->offset;
+ tlv_type = temp_ei->tlv_type;
+
+ if (temp_ei->array_type == NO_ARRAY) {
+ data_len_value = 1;
+ } else if (temp_ei->array_type == STATIC_ARRAY) {
+ data_len_value = temp_ei->elem_len;
+ } else if (data_len_value <= 0 ||
+ temp_ei->elem_len < data_len_value) {
+ LOGW("%s: Invalid data length\n", __func__);
+ return -EINVAL;
+ }
+
+ switch (temp_ei->data_type) {
+ case QMI_OPT_FLAG:
+ rc = qmi_encode_basic_elem(&opt_flag_value, buf_src,
+ 1, sizeof(uint8_t));
+ if (opt_flag_value)
+ temp_ei = temp_ei + 1;
+ else
+ temp_ei = skip_to_next_elem(temp_ei, enc_level);
+ break;
+
+ case QMI_DATA_LEN:
+ memcpy(&data_len_value, buf_src, temp_ei->elem_size);
+ data_len_sz = temp_ei->elem_size == sizeof(uint8_t) ?
+ sizeof(uint8_t) : sizeof(uint16_t);
+ /* Check to avoid out of range buffer access */
+ if ((data_len_sz + encoded_bytes + TLV_LEN_SIZE +
+ TLV_TYPE_SIZE) > out_buf_len) {
+ LOGW("%s: Too Small Buffer @DATA_LEN\n",
+ __func__);
+ return -EINVAL;
+ }
+ rc = qmi_encode_basic_elem(buf_dst, &data_len_value,
+ 1, data_len_sz);
+ UPDATE_ENCODE_VARIABLES(temp_ei, buf_dst,
+ encoded_bytes, tlv_len,
+ encode_tlv, rc);
+ if (!data_len_value)
+ temp_ei = skip_to_next_elem(temp_ei, enc_level);
+ else
+ encode_tlv = 0;
+ break;
+
+ case QMI_UNSIGNED_1_BYTE:
+ case QMI_UNSIGNED_2_BYTE:
+ case QMI_UNSIGNED_4_BYTE:
+ case QMI_UNSIGNED_8_BYTE:
+ case QMI_SIGNED_1_BYTE_ENUM:
+ case QMI_SIGNED_2_BYTE_ENUM:
+ case QMI_SIGNED_4_BYTE_ENUM:
+ /* Check to avoid out of range buffer access */
+ if (((data_len_value * temp_ei->elem_size) +
+ encoded_bytes + TLV_LEN_SIZE + TLV_TYPE_SIZE) >
+ out_buf_len) {
+ LOGW("%s: Too Small Buffer @data_type:%d\n",
+ __func__, temp_ei->data_type);
+ return -EINVAL;
+ }
+ rc = qmi_encode_basic_elem(buf_dst, buf_src,
+ data_len_value,
+ temp_ei->elem_size);
+ UPDATE_ENCODE_VARIABLES(temp_ei, buf_dst,
+ encoded_bytes, tlv_len,
+ encode_tlv, rc);
+ break;
+
+ case QMI_STRUCT:
+ rc = qmi_encode_struct_elem(temp_ei, buf_dst, buf_src,
+ data_len_value,
+ out_buf_len - encoded_bytes,
+ enc_level + 1);
+ if (rc < 0)
+ return rc;
+ UPDATE_ENCODE_VARIABLES(temp_ei, buf_dst,
+ encoded_bytes, tlv_len,
+ encode_tlv, rc);
+ break;
+
+ case QMI_STRING:
+ rc = qmi_encode_string_elem(temp_ei, buf_dst, buf_src,
+ out_buf_len - encoded_bytes,
+ enc_level);
+ if (rc < 0)
+ return rc;
+ UPDATE_ENCODE_VARIABLES(temp_ei, buf_dst,
+ encoded_bytes, tlv_len,
+ encode_tlv, rc);
+ break;
+ default:
+ LOGW("%s: Unrecognized data type\n", __func__);
+ return -EINVAL;
+ }
+
+ if (encode_tlv && enc_level == 1) {
+ QMI_ENCDEC_ENCODE_TLV(tlv_type, tlv_len, tlv_pointer);
+ encoded_bytes += (TLV_TYPE_SIZE + TLV_LEN_SIZE);
+ tlv_pointer = buf_dst;
+ tlv_len = 0;
+ buf_dst = buf_dst + TLV_LEN_SIZE + TLV_TYPE_SIZE;
+ encode_tlv = 0;
+ }
+ }
+
+ return encoded_bytes;
+}
+
+/**
+ * qmi_decode_basic_elem() - Decodes elements of basic/primary data type
+ * @buf_dst: Buffer to store the decoded element.
+ * @buf_src: Buffer containing the elements in QMI wire format.
+ * @elem_len: Number of elements to be decoded.
+ * @elem_size: Size of a single instance of the element to be decoded.
+ *
+ * This function decodes the "elem_len" number of elements in QMI wire format,
+ * each of size "elem_size" bytes from the source buffer "buf_src" and stores
+ * the decoded elements in the destination buffer "buf_dst". The elements are
+ * of primary data type which include uint8_t - u64 or similar. This
+ * function returns the number of bytes of decoded information.
+ *
+ * Return: The total size of the decoded data elements, in bytes.
+ */
+static int qmi_decode_basic_elem(void *buf_dst, const void *buf_src,
+ uint32_t elem_len, uint32_t elem_size)
+{
+ uint32_t i, rc = 0;
+
+ for (i = 0; i < elem_len; i++) {
+ QMI_ENCDEC_DECODE_N_BYTES(buf_dst, buf_src, elem_size);
+ rc += elem_size;
+ }
+
+ return rc;
+}
+
+/**
+ * qmi_decode_struct_elem() - Decodes elements of struct data type
+ * @ei_array: Struct info array descibing the struct element.
+ * @buf_dst: Buffer to store the decoded element.
+ * @buf_src: Buffer containing the elements in QMI wire format.
+ * @elem_len: Number of elements to be decoded.
+ * @tlv_len: Total size of the encoded inforation corresponding to
+ * this struct element.
+ * @dec_level: Depth of the nested structure from the main structure.
+ *
+ * This function decodes the "elem_len" number of elements in QMI wire format,
+ * each of size "(tlv_len/elem_len)" bytes from the source buffer "buf_src"
+ * and stores the decoded elements in the destination buffer "buf_dst". The
+ * elements are of struct data type which includes any C structure. This
+ * function returns the number of bytes of decoded information.
+ *
+ * Return: The total size of the decoded data elements on success, negative
+ * errno on error.
+ */
+static int qmi_decode_struct_elem(struct qmi_elem_info *ei_array,
+ void *buf_dst, const void *buf_src,
+ uint32_t elem_len, uint32_t tlv_len,
+ int dec_level)
+{
+ int i, rc, decoded_bytes = 0;
+ struct qmi_elem_info *temp_ei = ei_array;
+
+ for (i = 0; i < elem_len && decoded_bytes < tlv_len; i++) {
+ rc = qmi_decode(temp_ei->ei_array, buf_dst, buf_src,
+ tlv_len - decoded_bytes, dec_level);
+ if (rc < 0)
+ return rc;
+ buf_src = (char*)buf_src + rc;
+ buf_dst = (char*)buf_dst + temp_ei->elem_size;
+ decoded_bytes += rc;
+ }
+
+ if ((dec_level <= 2 && decoded_bytes != tlv_len) ||
+ (dec_level > 2 && (i < elem_len || decoded_bytes > tlv_len))) {
+ LOGW("%s: Fault in decoding: dl(%d), db(%d), tl(%d), i(%d), el(%d)\n",
+ __func__, dec_level, decoded_bytes, tlv_len,
+ i, elem_len);
+ return -EFAULT;
+ }
+
+ return decoded_bytes;
+}
+
+/**
+ * qmi_decode_string_elem() - Decodes elements of string data type
+ * @ei_array: Struct info array descibing the string element.
+ * @buf_dst: Buffer to store the decoded element.
+ * @buf_src: Buffer containing the elements in QMI wire format.
+ * @tlv_len: Total size of the encoded inforation corresponding to
+ * this string element.
+ * @dec_level: Depth of the string element from the main structure.
+ *
+ * This function decodes the string element of maximum length
+ * "ei_array->elem_len" from the source buffer "buf_src" and puts it into
+ * the destination buffer "buf_dst". This function returns number of bytes
+ * decoded from the input buffer.
+ *
+ * Return: The total size of the decoded data elements on success, negative
+ * errno on error.
+ */
+static int qmi_decode_string_elem(struct qmi_elem_info *ei_array,
+ void *buf_dst, const void *buf_src,
+ uint32_t tlv_len, int dec_level)
+{
+ int rc;
+ int decoded_bytes = 0;
+ uint32_t string_len = 0;
+ uint32_t string_len_sz = 0;
+ struct qmi_elem_info *temp_ei = ei_array;
+
+ if (dec_level == 1) {
+ string_len = tlv_len;
+ } else {
+ string_len_sz = temp_ei->elem_len <= 256 ?
+ sizeof(uint8_t) : sizeof(uint16_t);
+ rc = qmi_decode_basic_elem(&string_len, buf_src,
+ 1, string_len_sz);
+ decoded_bytes += rc;
+ }
+
+ if (string_len > temp_ei->elem_len) {
+ LOGW("%s: String len %d > Max Len %d\n",
+ __func__, string_len, temp_ei->elem_len);
+ return -EINVAL;
+ } else if (string_len > tlv_len) {
+ LOGW("%s: String len %d > Input Buffer Len %d\n",
+ __func__, string_len, tlv_len);
+ return -EFAULT;
+ }
+
+ rc = qmi_decode_basic_elem(buf_dst, (char*)buf_src + decoded_bytes,
+ string_len, temp_ei->elem_size);
+ *((char *)buf_dst + string_len) = '\0';
+ decoded_bytes += rc;
+
+ return decoded_bytes;
+}
+
+/**
+ * find_ei() - Find element info corresponding to TLV Type
+ * @ei_array: Struct info array of the message being decoded.
+ * @type: TLV Type of the element being searched.
+ *
+ * Every element that got encoded in the QMI message will have a type
+ * information associated with it. While decoding the QMI message,
+ * this function is used to find the struct info regarding the element
+ * that corresponds to the type being decoded.
+ *
+ * Return: Pointer to struct info, if found
+ */
+static struct qmi_elem_info *find_ei(struct qmi_elem_info *ei_array,
+ uint32_t type)
+{
+ struct qmi_elem_info *temp_ei = ei_array;
+
+ while (temp_ei->data_type != QMI_EOTI) {
+ if (temp_ei->tlv_type == (uint8_t)type)
+ return temp_ei;
+ temp_ei = temp_ei + 1;
+ }
+
+ return NULL;
+}
+
+/**
+ * qmi_decode() - Core Decode Function
+ * @ei_array: Struct info array describing the structure to be decoded.
+ * @out_c_struct: Buffer to hold the decoded C struct
+ * @in_buf: Buffer containing the QMI message to be decoded
+ * @in_buf_len: Length of the QMI message to be decoded
+ * @dec_level: Decode level to indicate the depth of the nested structure,
+ * within the main structure, being decoded
+ *
+ * Return: The number of bytes of decoded information on success, negative
+ * errno on error.
+ */
+static int qmi_decode(struct qmi_elem_info *ei_array, void *out_c_struct,
+ const void *in_buf, uint32_t in_buf_len,
+ int dec_level)
+{
+ struct qmi_elem_info *temp_ei = ei_array;
+ uint8_t opt_flag_value = 1;
+ uint32_t data_len_value = 0, data_len_sz = 0;
+ uint8_t *buf_dst = out_c_struct;
+ const uint8_t *tlv_pointer;
+ uint32_t tlv_len = 0;
+ uint32_t tlv_type;
+ uint32_t decoded_bytes = 0;
+ const void *buf_src = in_buf;
+ int rc;
+
+ while (decoded_bytes < in_buf_len) {
+ if (dec_level >= 2 && temp_ei->data_type == QMI_EOTI)
+ return decoded_bytes;
+
+ if (dec_level == 1) {
+ tlv_pointer = buf_src;
+ QMI_ENCDEC_DECODE_TLV(&tlv_type,
+ &tlv_len, tlv_pointer);
+ buf_src = (uint8_t*)buf_src + (TLV_TYPE_SIZE + TLV_LEN_SIZE);
+ decoded_bytes += (TLV_TYPE_SIZE + TLV_LEN_SIZE);
+ temp_ei = find_ei(ei_array, tlv_type);
+ if (!temp_ei && tlv_type < OPTIONAL_TLV_TYPE_START) {
+ LOGW("%s: Inval element info\n", __func__);
+ return -EINVAL;
+ } else if (!temp_ei) {
+ UPDATE_DECODE_VARIABLES(buf_src,
+ decoded_bytes, tlv_len);
+ continue;
+ }
+ } else {
+ /*
+ * No length information for elements in nested
+ * structures. So use remaining decodable buffer space.
+ */
+ tlv_len = in_buf_len - decoded_bytes;
+ }
+
+ buf_dst = (uint8_t*)out_c_struct + temp_ei->offset;
+ if (temp_ei->data_type == QMI_OPT_FLAG) {
+ memcpy(buf_dst, &opt_flag_value, sizeof(uint8_t));
+ temp_ei = temp_ei + 1;
+ buf_dst = (uint8_t*)out_c_struct + temp_ei->offset;
+ }
+
+ if (temp_ei->data_type == QMI_DATA_LEN) {
+ data_len_sz = temp_ei->elem_size == sizeof(uint8_t) ?
+ sizeof(uint8_t) : sizeof(uint16_t);
+ rc = qmi_decode_basic_elem(&data_len_value, buf_src,
+ 1, data_len_sz);
+ memcpy(buf_dst, &data_len_value, sizeof(uint32_t));
+ temp_ei = temp_ei + 1;
+ buf_dst = (uint8_t*)out_c_struct + temp_ei->offset;
+ tlv_len -= data_len_sz;
+ UPDATE_DECODE_VARIABLES(buf_src, decoded_bytes, rc);
+ }
+
+ if (temp_ei->array_type == NO_ARRAY) {
+ data_len_value = 1;
+ } else if (temp_ei->array_type == STATIC_ARRAY) {
+ data_len_value = temp_ei->elem_len;
+ } else if (data_len_value > temp_ei->elem_len) {
+ LOGW("%s: Data len %d > max spec %d\n",
+ __func__, data_len_value, temp_ei->elem_len);
+ return -EINVAL;
+ }
+
+ switch (temp_ei->data_type) {
+ case QMI_UNSIGNED_1_BYTE:
+ case QMI_UNSIGNED_2_BYTE:
+ case QMI_UNSIGNED_4_BYTE:
+ case QMI_UNSIGNED_8_BYTE:
+ case QMI_SIGNED_1_BYTE_ENUM:
+ case QMI_SIGNED_2_BYTE_ENUM:
+ case QMI_SIGNED_4_BYTE_ENUM:
+ rc = qmi_decode_basic_elem(buf_dst, buf_src,
+ data_len_value,
+ temp_ei->elem_size);
+ UPDATE_DECODE_VARIABLES(buf_src, decoded_bytes, rc);
+ break;
+
+ case QMI_STRUCT:
+ rc = qmi_decode_struct_elem(temp_ei, buf_dst, buf_src,
+ data_len_value, tlv_len,
+ dec_level + 1);
+ if (rc < 0)
+ return rc;
+ UPDATE_DECODE_VARIABLES(buf_src, decoded_bytes, rc);
+ break;
+
+ case QMI_STRING:
+ rc = qmi_decode_string_elem(temp_ei, buf_dst, buf_src,
+ tlv_len, dec_level);
+ if (rc < 0)
+ return rc;
+ UPDATE_DECODE_VARIABLES(buf_src, decoded_bytes, rc);
+ break;
+
+ default:
+ LOGW("%s: Unrecognized data type\n", __func__);
+ return -EINVAL;
+ }
+ temp_ei = temp_ei + 1;
+ }
+
+ return decoded_bytes;
+}
+
+/**
+ * qmi_encode_message() - Encode C structure as QMI encoded message
+ * @type: Type of QMI message
+ * @msg_id: Message ID of the message
+ * @len: Passed as max length of the message, updated to actual size
+ * @txn_id: Transaction ID
+ * @ei: QMI message descriptor
+ * @c_struct: Reference to structure to encode
+ *
+ * Return: Buffer with encoded message, or negative ERR_PTR() on error
+ */
+ssize_t qmi_encode_message(struct qrtr_packet *pkt, int type, int msg_id,
+ int txn_id, const void *c_struct,
+ struct qmi_elem_info *ei)
+{
+ struct qmi_header *hdr = pkt->data;
+ ssize_t msglen = 0;
+ int ret;
+
+ /* Check the possibility of a zero length QMI message */
+ if (!c_struct) {
+ ret = qmi_calc_min_msg_len(ei, 1);
+ if (ret) {
+ LOGW("%s: Calc. len %d != 0, but NULL c_struct\n",
+ __func__, ret);
+ return -EINVAL;
+ }
+ }
+
+ if (pkt->data_len < sizeof(*hdr))
+ return -EMSGSIZE;
+
+ /* Encode message, if we have a message */
+ if (c_struct) {
+ msglen = qmi_encode(ei, (char*)pkt->data + sizeof(*hdr), c_struct,
+ pkt->data_len - sizeof(*hdr), 1);
+ if (msglen < 0)
+ return msglen;
+ }
+
+ hdr->type = type;
+ hdr->txn_id = txn_id;
+ hdr->msg_id = msg_id;
+ hdr->msg_len = msglen;
+
+ pkt->type = QRTR_TYPE_DATA;
+ pkt->data_len = sizeof(*hdr) + msglen;
+
+ return pkt->data_len;
+}
+
+int qmi_decode_header(const struct qrtr_packet *pkt, unsigned int *msg_id)
+{
+ const struct qmi_header *qmi = pkt->data;
+
+ if (qmi->msg_len != pkt->data_len - sizeof(*qmi)) {
+ LOGW("[RMTFS] Invalid length of incoming qmi request\n");
+ return -EINVAL;
+ }
+
+ *msg_id = qmi->msg_id;
+
+ return 0;
+}
+
+/**
+ * qmi_decode_message() - Decode QMI encoded message to C structure
+ * @buf: Buffer with encoded message
+ * @len: Amount of data in @buf
+ * @ei: QMI message descriptor
+ * @c_struct: Reference to structure to decode into
+ *
+ * Return: The number of bytes of decoded information on success, negative
+ * errno on error.
+ */
+int qmi_decode_message(void *c_struct, unsigned int *txn,
+ const struct qrtr_packet *pkt,
+ int type, int id, struct qmi_elem_info *ei)
+{
+ const struct qmi_header *hdr = pkt->data;
+
+ if (!ei)
+ return -EINVAL;
+
+ if (!c_struct || !pkt->data || !pkt->data_len)
+ return -EINVAL;
+
+ if (hdr->type != type)
+ return -EINVAL;
+
+ if (hdr->msg_id != id)
+ return -EINVAL;
+
+ if (txn)
+ *txn = hdr->txn_id;
+
+ return qmi_decode(ei, c_struct, (char*)pkt->data + sizeof(*hdr), pkt->data_len - sizeof(*hdr), 1);
+}
+
+/* Common header in all QMI responses */
+struct qmi_elem_info qmi_response_type_v01_ei[] = {
+ {
+ .data_type = QMI_SIGNED_2_BYTE_ENUM,
+ .elem_len = 1,
+ .elem_size = sizeof(uint16_t),
+ .array_type = NO_ARRAY,
+ .tlv_type = QMI_COMMON_TLV_TYPE,
+ .offset = offsetof(struct qmi_response_type_v01, result),
+ .ei_array = NULL,
+ },
+ {
+ .data_type = QMI_SIGNED_2_BYTE_ENUM,
+ .elem_len = 1,
+ .elem_size = sizeof(uint16_t),
+ .array_type = NO_ARRAY,
+ .tlv_type = QMI_COMMON_TLV_TYPE,
+ .offset = offsetof(struct qmi_response_type_v01, error),
+ .ei_array = NULL,
+ },
+ {
+ .data_type = QMI_EOTI,
+ .elem_len = 0,
+ .elem_size = 0,
+ .array_type = NO_ARRAY,
+ .tlv_type = QMI_COMMON_TLV_TYPE,
+ .offset = 0,
+ .ei_array = NULL,
+ },
+};
diff --git a/qcom/qrtr/lib/qrtr.c b/qcom/qrtr/lib/qrtr.c
new file mode 100644
index 0000000..7c1c389
--- /dev/null
+++ b/qcom/qrtr/lib/qrtr.c
@@ -0,0 +1,258 @@
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <linux/qrtr.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <errno.h>
+#include <poll.h>
+
+#include "libqrtr.h"
+#include "logging.h"
+#include "ns.h"
+
+static int qrtr_getname(int sock, struct sockaddr_qrtr *sq)
+{
+ socklen_t sl = sizeof(*sq);
+ int rc;
+
+ rc = getsockname(sock, (void *)sq, &sl);
+ if (rc) {
+ PLOGE("getsockname()");
+ return -1;
+ }
+
+ if (sq->sq_family != AF_QIPCRTR || sl != sizeof(*sq))
+ return -1;
+
+ return 0;
+}
+
+int qrtr_open(int rport)
+{
+ struct timeval tv;
+ int sock;
+ int rc;
+
+ sock = socket(AF_QIPCRTR, SOCK_DGRAM, 0);
+ if (sock < 0) {
+ PLOGE("socket(AF_QIPCRTR)");
+ return -1;
+ }
+
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+
+ rc = setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
+ if (rc) {
+ PLOGE("setsockopt(SO_RCVTIMEO)");
+ goto err;
+ }
+
+ if (rport != 0) {
+ struct sockaddr_qrtr sq;
+
+ sq.sq_family = AF_QIPCRTR;
+ sq.sq_node = 1;
+ sq.sq_port = rport;
+
+ rc = bind(sock, (void *)&sq, sizeof(sq));
+ if (rc < 0) {
+ PLOGE("bind(%d)", rport);
+ goto err;
+ }
+ }
+
+ return sock;
+err:
+ close(sock);
+ return -1;
+}
+
+void qrtr_close(int sock)
+{
+ close(sock);
+}
+
+int qrtr_sendto(int sock, uint32_t node, uint32_t port, const void *data, unsigned int sz)
+{
+ struct sockaddr_qrtr sq;
+ int rc;
+
+ sq.sq_family = AF_QIPCRTR;
+ sq.sq_node = node;
+ sq.sq_port = port;
+
+ rc = sendto(sock, data, sz, 0, (void *)&sq, sizeof(sq));
+ if (rc < 0) {
+ PLOGE("sendto()");
+ return -1;
+ }
+
+ return 0;
+}
+
+int qrtr_new_server(int sock, uint32_t service, uint16_t version, uint16_t instance)
+{
+ struct qrtr_ctrl_pkt pkt;
+ struct sockaddr_qrtr sq;
+
+ if (qrtr_getname(sock, &sq))
+ return -1;
+
+ memset(&pkt, 0, sizeof(pkt));
+
+ pkt.cmd = cpu_to_le32(QRTR_TYPE_NEW_SERVER);
+ pkt.server.service = cpu_to_le32(service);
+ pkt.server.instance = cpu_to_le32(instance << 8 | version);
+
+ return qrtr_sendto(sock, sq.sq_node, QRTR_PORT_CTRL, &pkt, sizeof(pkt));
+}
+
+int qrtr_remove_server(int sock, uint32_t service, uint16_t version, uint16_t instance)
+{
+ struct qrtr_ctrl_pkt pkt;
+ struct sockaddr_qrtr sq;
+
+ if (qrtr_getname(sock, &sq))
+ return -1;
+
+ memset(&pkt, 0, sizeof(pkt));
+
+ pkt.cmd = cpu_to_le32(QRTR_TYPE_DEL_SERVER);
+ pkt.server.service = cpu_to_le32(service);
+ pkt.server.instance = cpu_to_le32(instance << 8 | version);
+ pkt.server.node = cpu_to_le32(sq.sq_node);
+ pkt.server.port = cpu_to_le32(sq.sq_port);
+
+ return qrtr_sendto(sock, sq.sq_node, QRTR_PORT_CTRL, &pkt, sizeof(pkt));
+}
+
+int qrtr_publish(int sock, uint32_t service, uint16_t version, uint16_t instance)
+{
+ return qrtr_new_server(sock, service, version, instance);
+}
+
+int qrtr_bye(int sock, uint32_t service, uint16_t version, uint16_t instance)
+{
+ return qrtr_remove_server(sock, service, version, instance);
+}
+
+int qrtr_new_lookup(int sock, uint32_t service, uint16_t version, uint16_t instance)
+{
+ struct qrtr_ctrl_pkt pkt;
+ struct sockaddr_qrtr sq;
+
+ if (qrtr_getname(sock, &sq))
+ return -1;
+
+ memset(&pkt, 0, sizeof(pkt));
+
+ pkt.cmd = cpu_to_le32(QRTR_TYPE_NEW_LOOKUP);
+ pkt.server.service = cpu_to_le32(service);
+ pkt.server.instance = cpu_to_le32(instance << 8 | version);
+
+ return qrtr_sendto(sock, sq.sq_node, QRTR_PORT_CTRL, &pkt, sizeof(pkt));
+}
+
+int qrtr_remove_lookup(int sock, uint32_t service, uint16_t version, uint16_t instance)
+{
+ struct qrtr_ctrl_pkt pkt;
+ struct sockaddr_qrtr sq;
+
+ if (qrtr_getname(sock, &sq))
+ return -1;
+
+ memset(&pkt, 0, sizeof(pkt));
+
+ pkt.cmd = cpu_to_le32(QRTR_TYPE_DEL_LOOKUP);
+ pkt.server.service = cpu_to_le32(service);
+ pkt.server.instance = cpu_to_le32(instance << 8 | version);
+ pkt.server.node = cpu_to_le32(sq.sq_node);
+ pkt.server.port = cpu_to_le32(sq.sq_port);
+
+ return qrtr_sendto(sock, sq.sq_node, QRTR_PORT_CTRL, &pkt, sizeof(pkt));
+}
+
+int qrtr_poll(int sock, unsigned int ms)
+{
+ struct pollfd fds;
+
+ fds.fd = sock;
+ fds.revents = 0;
+ fds.events = POLLIN | POLLERR;
+
+ return poll(&fds, 1, ms);
+}
+
+int qrtr_recv(int sock, void *buf, unsigned int bsz)
+{
+ int rc;
+
+ rc = recv(sock, buf, bsz, 0);
+ if (rc < 0)
+ PLOGE("recv()");
+ return rc;
+}
+
+int qrtr_recvfrom(int sock, void *buf, unsigned int bsz, uint32_t *node, uint32_t *port)
+{
+ struct sockaddr_qrtr sq;
+ socklen_t sl;
+ int rc;
+
+ sl = sizeof(sq);
+ rc = recvfrom(sock, buf, bsz, 0, (void *)&sq, &sl);
+ if (rc < 0) {
+ PLOGE("recvfrom()");
+ return rc;
+ }
+ if (node)
+ *node = sq.sq_node;
+ if (port)
+ *port = sq.sq_port;
+ return rc;
+}
+
+int qrtr_decode(struct qrtr_packet *dest, void *buf, size_t len,
+ const struct sockaddr_qrtr *sq)
+{
+ const struct qrtr_ctrl_pkt *ctrl = buf;
+
+ if (sq->sq_port == QRTR_PORT_CTRL){
+ if (len < sizeof(*ctrl))
+ return -EMSGSIZE;
+
+ dest->type = le32_to_cpu(ctrl->cmd);
+ switch (dest->type) {
+ case QRTR_TYPE_BYE:
+ dest->node = le32_to_cpu(ctrl->client.node);
+ break;
+ case QRTR_TYPE_DEL_CLIENT:
+ dest->node = le32_to_cpu(ctrl->client.node);
+ dest->port = le32_to_cpu(ctrl->client.port);
+ break;
+ case QRTR_TYPE_NEW_SERVER:
+ case QRTR_TYPE_DEL_SERVER:
+ dest->node = le32_to_cpu(ctrl->server.node);
+ dest->port = le32_to_cpu(ctrl->server.port);
+ dest->service = le32_to_cpu(ctrl->server.service);
+ dest->version = le32_to_cpu(ctrl->server.instance) & 0xff;
+ dest->instance = le32_to_cpu(ctrl->server.instance) >> 8;
+ break;
+ default:
+ dest->type = 0;
+ }
+ } else {
+ dest->type = QRTR_TYPE_DATA;
+ dest->node = sq->sq_node;
+ dest->port = sq->sq_port;
+
+ dest->data = buf;
+ dest->data_len = len;
+ }
+
+ return 0;
+}
diff --git a/qcom/qrtr/qrtr-ns.service.in b/qcom/qrtr/qrtr-ns.service.in
new file mode 100644
index 0000000..eaa791a
--- /dev/null
+++ b/qcom/qrtr/qrtr-ns.service.in
@@ -0,0 +1,9 @@
+[Unit]
+Description=QIPCRTR Name Service
+
+[Service]
+ExecStart=QRTR_NS_PATH/qrtr-ns -f 1
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/qcom/qrtr/qrtr.py b/qcom/qrtr/qrtr.py
new file mode 100755
index 0000000..ab6189a
--- /dev/null
+++ b/qcom/qrtr/qrtr.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python2.7
+
+import ctypes
+import collections
+
+from ctypes import CDLL, CFUNCTYPE, POINTER, cast, py_object
+from ctypes import c_char_p, c_void_p, c_int, pointer
+
+_qrtr = CDLL("./libqrtr.so")
+
+class qrtr:
+ Result = collections.namedtuple('Result', ['service', 'instance', 'addr'])
+ _cbtype = CFUNCTYPE(None, c_void_p, c_int, c_int, c_int, c_int)
+ def __init__(self, port=0):
+ self.sock = _qrtr.qrtr_open(port)
+ if self.sock < 0:
+ raise RuntimeError("unable to open qrtr socket")
+ self.service = None
+ self._qrtr = _qrtr
+
+ def __del__(self):
+ self._qrtr.qrtr_close(self.sock)
+
+ def _lookup_list_add(self, ptr, srv, instance, node, port):
+ res = qrtr.Result(srv, instance, (node, port))
+ cast(ptr, POINTER(py_object)).contents.value.append(res)
+
+ def lookup(self, srv, instance=0, ifilter=0):
+ results = []
+ err = _qrtr.qrtr_lookup(self.sock, srv, instance, ifilter,
+ qrtr._cbtype(self._lookup_list_add), cast(pointer(py_object(results)), c_void_p))
+ if err:
+ raise RuntimeError("query failed")
+ return results
+
+ def publish(self, service, version, instance):
+ err = _qrtr.qrtr_publish(self.sock, service, version, instance)
+ if err:
+ raise RuntimeError("publish failed")
+ self.service = (service, version, instance)
+
+ def new_server(self, service, version, instance):
+ err = _qrtr.qrtr_new_server(self.sock, service, version, instance)
+ if err:
+ raise RuntimeError("new_server failed")
+ self.service = (service, version, instance)
+
+ return self.service
+
+ def remove_server(self, service):
+ err = _qrtr.qrtr_remove_server(self.sock, *service)
+ if err:
+ raise RuntimeError("remove_server failed")
+ self.service = None
+
+ def new_lookup(self, service, version, instance):
+ err = _qrtr.qrtr_new_lookup(self.sock, service, version, instance)
+ if err:
+ raise RuntimeError("new_lookup failed")
+ return (service, version, instance)
+
+ def remove_lookup(self, lookup):
+ err = _qrtr.qrtr_remove_lookup(self.sock, *lookup)
+ if err:
+ raise RuntimeError("remove_lookup failed")
+
+ def send(self, addr, data):
+ node, port = addr
+ n = _qrtr.qrtr_sendto(self.sock, node, port, c_char_p(data), len(data))
+ if n:
+ raise RuntimeError("sendto failed")
+
+ def recv(self, sz=65536):
+ buf = ctypes.create_string_buffer(sz)
+ n = _qrtr.qrtr_recv(self.sock, c_char_p(ctypes.addressof(buf)), sz)
+ if n <= 0:
+ raise RuntimeError("recv failed")
+ return buf[0:n]
+
+ def recvfrom(self, sz=65536):
+ node = ctypes.c_int()
+ port = ctypes.c_int()
+ buf = ctypes.create_string_buffer(sz)
+ n = _qrtr.qrtr_recvfrom(self.sock, c_char_p(ctypes.addressof(buf)),
+ ctypes.byref(node), ctypes.byref(port))
+ if n <= 0:
+ raise RuntimeError("recvfrom failed")
+ return (buf[0:n], (node.value, port.value))
+
+ def poll(self, tout=0):
+ return _qrtr.qrtr_poll(self.sock, tout)
+
+if __name__ == "__main__":
+ svcs = qrtr().lookup(15) # 15 is the test service
+ print " service instance addr"
+ for svc in svcs:
+ print "% 8d % 8d %s" % (svc.service, svc.instance, svc.addr)
diff --git a/qcom/qrtr/src/addr.c b/qcom/qrtr/src/addr.c
new file mode 100644
index 0000000..61417dd
--- /dev/null
+++ b/qcom/qrtr/src/addr.c
@@ -0,0 +1,77 @@
+#include <err.h>
+#include <errno.h>
+#include <linux/qrtr.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <unistd.h>
+
+#include "libqrtr.h"
+#include "logging.h"
+
+void qrtr_set_address(uint32_t addr)
+{
+ struct {
+ struct nlmsghdr nh;
+ struct ifaddrmsg ifa;
+ char attrbuf[32];
+ } req;
+ struct {
+ struct nlmsghdr nh;
+ struct nlmsgerr err;
+ } resp;
+ struct sockaddr_qrtr sq;
+ struct rtattr *rta;
+ socklen_t sl = sizeof(sq);
+ int sock;
+ int ret;
+
+ /* Trigger loading of the qrtr kernel module */
+ sock = socket(AF_QIPCRTR, SOCK_DGRAM, 0);
+ if (sock < 0)
+ PLOGE_AND_EXIT("failed to create AF_QIPCRTR socket");
+
+ ret = getsockname(sock, (void*)&sq, &sl);
+ if (ret < 0)
+ PLOGE_AND_EXIT("getsockname()");
+ close(sock);
+
+ /* Skip configuring the address, if it's same as current */
+ if (sl == sizeof(sq) && sq.sq_node == addr)
+ return;
+
+ sock = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
+ if (sock < 0)
+ PLOGE_AND_EXIT("failed to create netlink socket");
+
+ memset(&req, 0, sizeof(req));
+ req.nh.nlmsg_len = NLMSG_SPACE(sizeof(struct ifaddrmsg));
+ req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
+ req.nh.nlmsg_type = RTM_NEWADDR;
+ req.ifa.ifa_family = AF_QIPCRTR;
+
+ rta = (struct rtattr *)(((char *) &req) + req.nh.nlmsg_len);
+ rta->rta_type = IFA_LOCAL;
+ rta->rta_len = RTA_LENGTH(sizeof(addr));
+ memcpy(RTA_DATA(rta), &addr, sizeof(addr));
+
+ req.nh.nlmsg_len += rta->rta_len;
+
+ ret = send(sock, &req, req.nh.nlmsg_len, 0);
+ if (ret < 0)
+ PLOGE_AND_EXIT("failed to send netlink request");
+
+ ret = recv(sock, &resp, sizeof(resp), 0);
+ if (ret < 0)
+ PLOGE_AND_EXIT("failed to receive netlink response");
+
+ if (resp.nh.nlmsg_type == NLMSG_ERROR && resp.err.error != 0) {
+ errno = -resp.err.error;
+ PLOGE_AND_EXIT("failed to configure node id");
+ }
+
+ close(sock);
+}
diff --git a/qcom/qrtr/src/addr.h b/qcom/qrtr/src/addr.h
new file mode 100644
index 0000000..524e335
--- /dev/null
+++ b/qcom/qrtr/src/addr.h
@@ -0,0 +1,8 @@
+#ifndef __ADDR_H_
+#define __ADDR_H_
+
+#include <stdint.h>
+
+void qrtr_set_address(uint32_t addr);
+
+#endif
diff --git a/qcom/qrtr/src/cfg.c b/qcom/qrtr/src/cfg.c
new file mode 100644
index 0000000..97a8352
--- /dev/null
+++ b/qcom/qrtr/src/cfg.c
@@ -0,0 +1,44 @@
+#include <err.h>
+#include <errno.h>
+#include <libgen.h>
+#include <limits.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <linux/qrtr.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "addr.h"
+#include "libqrtr.h"
+#include "logging.h"
+
+static void usage(const char *progname)
+{
+ fprintf(stderr, "%s <node-id>\n", progname);
+ exit(1);
+}
+
+int main(int argc, char **argv)
+{
+ unsigned long addrul;
+ uint32_t addr;
+ char *ep;
+ const char *progname = basename(argv[0]);
+
+ qlog_setup(progname, false);
+
+ if (argc != 2)
+ usage(progname);
+
+ addrul = strtoul(argv[1], &ep, 10);
+ if (argv[1][0] == '\0' || *ep != '\0' || addrul >= UINT_MAX)
+ usage(progname);
+ addr = addrul;
+ qrtr_set_address(addr);
+
+ return 0;
+}
diff --git a/qcom/qrtr/src/hash.c b/qcom/qrtr/src/hash.c
new file mode 100644
index 0000000..ecfbc0a
--- /dev/null
+++ b/qcom/qrtr/src/hash.c
@@ -0,0 +1,37 @@
+#include <string.h>
+#include "hash.h"
+
+unsigned int hash_mem(const void *data, unsigned int len)
+{
+ unsigned int h;
+ unsigned int i;
+
+ h = len;
+
+ for (i = 0; i < len; ++i)
+ h = ((h >> 27) ^ (h << 5)) ^ ((const unsigned char *)data)[i];
+
+ return h;
+}
+
+unsigned int hash_string(const char *value)
+{
+ return hash_mem(value, strlen(value));
+}
+
+unsigned int hash_u32(uint32_t value)
+{
+ return value * 2654435761UL;
+}
+
+unsigned int hash_u64(uint64_t value)
+{
+ return hash_u32(value & 0xffffffff) ^ hash_u32(value >> 32);
+}
+
+unsigned int hash_pointer(void *value)
+{
+ if (sizeof(value) == sizeof(uint64_t))
+ return hash_u64((long)value);
+ return hash_u32((long)value);
+}
diff --git a/qcom/qrtr/src/hash.h b/qcom/qrtr/src/hash.h
new file mode 100644
index 0000000..5b004b5
--- /dev/null
+++ b/qcom/qrtr/src/hash.h
@@ -0,0 +1,12 @@
+#ifndef _HASH_H_
+#define _HASH_H_
+
+#include <stdint.h>
+
+unsigned int hash_mem(const void *data, unsigned int len);
+unsigned int hash_string(const char *value);
+unsigned int hash_u32(uint32_t value);
+unsigned int hash_u64(uint64_t value);
+unsigned int hash_pointer(void *value);
+
+#endif
diff --git a/qcom/qrtr/src/list.h b/qcom/qrtr/src/list.h
new file mode 100644
index 0000000..d740743
--- /dev/null
+++ b/qcom/qrtr/src/list.h
@@ -0,0 +1,128 @@
+#ifndef _LIST_H_
+#define _LIST_H_
+
+#ifndef offsetof
+#define offsetof(type, md) ((unsigned long)&((type *)0)->md)
+#endif
+
+#ifndef container_of
+#define container_of(ptr, type, member) \
+ ((type *)((char *)(ptr) - offsetof(type, member)))
+#endif
+
+struct list_item {
+ struct list_item *next;
+ struct list_item *prev;
+};
+
+struct list {
+ struct list_item *head;
+ struct list_item *tail;
+};
+
+#define LIST_INIT(name) { 0, 0 }
+
+#define LIST(name) \
+ struct list name = LIST_INIT(name)
+
+#define list_entry(ptr, type, member) \
+ container_of(ptr, type, member)
+
+static inline void list_init(struct list *list)
+{
+ list->head = 0;
+ list->tail = 0;
+}
+
+static inline void list_append(struct list *list, struct list_item *item)
+{
+ item->next = 0;
+ item->prev = list->tail;
+ if (list->tail != 0)
+ list->tail->next = item;
+ else
+ list->head = item;
+ list->tail = item;
+}
+
+static inline void list_prepend(struct list *list, struct list_item *item)
+{
+ item->prev = 0;
+ item->next = list->head;
+ if (list->head == 0)
+ list->tail = item;
+ list->head = item;
+}
+
+static inline void list_insert(struct list *list, struct list_item *after, struct list_item *item)
+{
+ if (after == 0) {
+ list_prepend(list, item);
+ return;
+ }
+ item->prev = after;
+ item->next = after->next;
+ after->next = item;
+ if (item->next)
+ item->next->prev = item;
+ if (list->tail == after)
+ list->tail = item;
+}
+
+static inline void list_remove(struct list *list, struct list_item *item)
+{
+ if (item->next)
+ item->next->prev = item->prev;
+ if (list->head == item) {
+ list->head = item->next;
+ if (list->head == 0)
+ list->tail = 0;
+ } else {
+ item->prev->next = item->next;
+ if (list->tail == item)
+ list->tail = item->prev;
+ }
+ item->prev = item->next = 0;
+}
+
+static inline struct list_item *list_pop(struct list *list)
+{
+ struct list_item *item;
+ item = list->head;
+ if (item == 0)
+ return 0;
+ list_remove(list, item);
+ return item;
+}
+
+static inline struct list_item *list_last(struct list *list)
+{
+ return list->tail;
+}
+
+static inline struct list_item *list_first(struct list *list)
+{
+ return list->head;
+}
+
+
+static inline struct list_item *list_next(struct list_item *item)
+{
+ return item->next;
+}
+
+#define list_push list_append
+
+#define list_for_each(_list, _iter) \
+ for (_iter = (_list)->head; (_iter) != 0; _iter = (_iter)->next)
+
+#define list_for_each_after(_node, _iter) \
+ for (_iter = (_node)->next; (_iter) != 0; _iter = (_iter)->next)
+
+#define list_for_each_safe(_list, _iter, _bkup) \
+ for (_iter = (_list)->head; (_iter) != 0 && ((_bkup = (_iter)->next) || 1); _iter = (_bkup))
+
+#define list_for_each_safe_after(_node, _iter, _bkup) \
+ for (_iter = (_node)->next; (_iter) != 0 && ((_bkup = (_iter)->next) || 1); _iter = (_bkup))
+
+#endif
diff --git a/qcom/qrtr/src/lookup.c b/qcom/qrtr/src/lookup.c
new file mode 100644
index 0000000..3312e40
--- /dev/null
+++ b/qcom/qrtr/src/lookup.c
@@ -0,0 +1,237 @@
+#include <err.h>
+#include <errno.h>
+#include <libgen.h>
+#include <linux/qrtr.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <unistd.h>
+
+#include "libqrtr.h"
+#include "logging.h"
+#include "ns.h"
+#include "util.h"
+
+#define DIAG_SERVICE 4097
+
+static const struct {
+ unsigned int service;
+ unsigned int ifilter;
+ const char *name;
+} common_names[] = {
+ { 0, 0, "Control service" },
+ { 1, 0, "Wireless Data Service" },
+ { 2, 0, "Device Management Service" },
+ { 3, 0, "Network Access Service" },
+ { 4, 0, "Quality Of Service service" },
+ { 5, 0, "Wireless Messaging Service" },
+ { 6, 0, "Position Determination Service" },
+ { 7, 0, "Authentication service" },
+ { 8, 0, "AT service" },
+ { 9, 0, "Voice service" },
+ { 10, 0, "Card Application Toolkit service (v2)" },
+ { 11, 0, "User Identity Module service" },
+ { 12, 0, "Phonebook Management service" },
+ { 13, 0, "QCHAT service" },
+ { 14, 0, "Remote file system service" },
+ { 15, 0, "Test service" },
+ { 16, 0, "Location service (~ PDS v2)" },
+ { 17, 0, "Specific absorption rate service" },
+ { 18, 0, "IMS settings service" },
+ { 19, 0, "Analog to digital converter driver service" },
+ { 20, 0, "Core sound driver service" },
+ { 21, 0, "Modem embedded file system service" },
+ { 22, 0, "Time service" },
+ { 23, 0, "Thermal sensors service" },
+ { 24, 0, "Thermal mitigation device service" },
+ { 25, 0, "Service access proxy service" },
+ { 26, 0, "Wireless data administrative service" },
+ { 27, 0, "TSYNC control service" },
+ { 28, 0, "Remote file system access service" },
+ { 29, 0, "Circuit switched videotelephony service" },
+ { 30, 0, "Qualcomm mobile access point service" },
+ { 31, 0, "IMS presence service" },
+ { 32, 0, "IMS videotelephony service" },
+ { 33, 0, "IMS application service" },
+ { 34, 0, "Coexistence service" },
+ { 36, 0, "Persistent device configuration service" },
+ { 38, 0, "Simultaneous transmit service" },
+ { 39, 0, "Bearer independent transport service" },
+ { 40, 0, "IMS RTP service" },
+ { 41, 0, "RF radiated performance enhancement service" },
+ { 42, 0, "Data system determination service" },
+ { 43, 0, "Subsystem control service" },
+ { 49, 0, "IPA control service" },
+ { 51, 0, "CoreSight remote tracing service" },
+ { 52, 0, "Dynamic Heap Memory Sharing" },
+ { 64, 0, "Service registry locator service" },
+ { 66, 0, "Service registry notification service" },
+ { 69, 0, "ATH10k WLAN firmware service" },
+ { 224, 0, "Card Application Toolkit service (v1)" },
+ { 225, 0, "Remote Management Service" },
+ { 226, 0, "Open Mobile Alliance device management service" },
+ { 312, 0, "QBT1000 Ultrasonic Fingerprint Sensor service" },
+ { 769, 0, "SLIMbus control service" },
+ { 771, 0, "Peripheral Access Control Manager service" },
+ { DIAG_SERVICE, 0, "DIAG service" },
+};
+
+static const char *diag_instance_base_str(unsigned int instance_base)
+{
+ switch (instance_base) {
+ case 0: return "MODEM";
+ case 1: return "LPASS";
+ case 2: return "WCNSS";
+ case 3: return "SENSORS";
+ case 4: return "CDSP";
+ case 5: return "WDSP";
+ default: return "<unk>";
+ }
+}
+
+static const char *diag_instance_str(unsigned int instance)
+{
+ switch (instance) {
+ case 0: return "CNTL";
+ case 1: return "CMD";
+ case 2: return "DATA";
+ case 3: return "DCI_CMD";
+ case 4: return "DCI";
+ default: return "<unk>";
+ }
+}
+
+static int get_diag_instance_info(char *str, size_t size, unsigned int instance)
+{
+ return snprintf(str, size, "%s:%s",
+ diag_instance_base_str(instance >> 6),
+ diag_instance_str(instance & 0x3f));
+}
+
+static unsigned int read_num_le(const char *str, int *rcp)
+{
+ unsigned int ret;
+ char *e;
+
+ if (*rcp)
+ return 0;
+
+ errno = 0;
+ ret = strtoul(str, &e, 0);
+ *rcp = -(errno || *e);
+
+ return cpu_to_le32(ret);
+}
+
+int main(int argc, char **argv)
+{
+ struct qrtr_ctrl_pkt pkt;
+ struct sockaddr_qrtr sq;
+ unsigned int instance;
+ unsigned int service;
+ unsigned int version;
+ unsigned int node;
+ unsigned int port;
+ socklen_t sl = sizeof(sq);
+ struct timeval tv;
+ int sock;
+ int len;
+ int rc;
+ const char *progname = basename(argv[0]);
+
+ qlog_setup(progname, false);
+
+ rc = 0;
+ memset(&pkt, 0, sizeof(pkt));
+
+ switch (argc) {
+ default:
+ rc = -1;
+ break;
+ case 3: pkt.server.instance = read_num_le(argv[2], &rc);
+ case 2: pkt.server.service = read_num_le(argv[1], &rc);
+ case 1: break;
+ }
+ if (rc) {
+ fprintf(stderr, "Usage: %s [<service> [<instance> [<filter>]]]\n", progname);
+ exit(1);
+ }
+
+ sock = socket(AF_QIPCRTR, SOCK_DGRAM, 0);
+ if (sock < 0)
+ PLOGE_AND_EXIT("sock(AF_QIPCRTR)");
+
+ rc = getsockname(sock, (void *)&sq, &sl);
+ if (rc || sq.sq_family != AF_QIPCRTR || sl != sizeof(sq))
+ PLOGE_AND_EXIT("getsockname()");
+
+ sq.sq_port = QRTR_PORT_CTRL;
+
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+
+ pkt.cmd = cpu_to_le32(QRTR_TYPE_NEW_LOOKUP);
+
+ rc = setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
+ if (rc)
+ PLOGE_AND_EXIT("setsockopt(SO_RCVTIMEO)");
+
+ rc = sendto(sock, &pkt, sizeof(pkt), 0, (void *)&sq, sizeof(sq));
+ if (rc < 0)
+ PLOGE_AND_EXIT("sendto()");
+
+ printf(" Service Version Instance Node Port\n");
+
+ while ((len = recv(sock, &pkt, sizeof(pkt), 0)) > 0) {
+ unsigned int type = le32_to_cpu(pkt.cmd);
+ const char *name = NULL;
+ unsigned int i;
+
+ if (len < sizeof(pkt) || type != QRTR_TYPE_NEW_SERVER) {
+ PLOGW("invalid/short packet");
+ continue;
+ }
+
+ if (!pkt.server.service && !pkt.server.instance &&
+ !pkt.server.node && !pkt.server.port)
+ break;
+
+ service = le32_to_cpu(pkt.server.service);
+ version = le32_to_cpu(pkt.server.instance) & 0xff;
+ instance = le32_to_cpu(pkt.server.instance) >> 8;
+ node = le32_to_cpu(pkt.server.node);
+ port = le32_to_cpu(pkt.server.port);
+
+ for (i = 0; i < sizeof(common_names)/sizeof(common_names[0]); ++i) {
+ if (service != common_names[i].service)
+ continue;
+ if (instance &&
+ (instance & common_names[i].ifilter) != common_names[i].ifilter)
+ continue;
+ name = common_names[i].name;
+ }
+ if (!name)
+ name = "<unknown>";
+
+ if (service == DIAG_SERVICE) {
+ char buf[24];
+ instance = le32_to_cpu(pkt.server.instance);
+ get_diag_instance_info(buf, sizeof(buf), instance);
+ printf("%9d %7s %8d %4d %5d %s (%s)\n",
+ service, "N/A", instance, node, port, name, buf);
+ } else {
+ printf("%9d %7d %8d %4d %5d %s\n",
+ service, version, instance, node, port, name);
+ }
+ }
+
+ if (len < 0)
+ PLOGE_AND_EXIT("recv()");
+
+ close(sock);
+
+ return 0;
+}
diff --git a/qcom/qrtr/src/map.c b/qcom/qrtr/src/map.c
new file mode 100644
index 0000000..eed3488
--- /dev/null
+++ b/qcom/qrtr/src/map.c
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2008-2009, Courtney Cavin
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdlib.h>
+#include "map.h"
+
+struct map_entry {
+ struct map_item *item;
+};
+
+/* Marker for deleted items */
+static struct map_item deleted;
+
+void map_destroy(struct map *map)
+{
+ free(map->data);
+}
+
+void map_clear(struct map *map, void (*release)(struct map_item *))
+{
+ int i;
+
+ for (i = 0; i < map->size; ++i){
+ if (!map->data[i].item)
+ continue;
+ if (map->data[i].item != &deleted)
+ (* release)(map->data[i].item);
+ map->data[i].item = NULL;
+ }
+ map->count = 0;
+}
+
+int map_create(struct map *map)
+{
+ map->size = 0;
+ map->data = 0;
+ map->count = 0;
+ return 0;
+}
+
+static int map_hash(struct map *map, unsigned int key)
+{
+ struct map_entry *e;
+ int idx, i;
+
+ if (map->count == map->size)
+ return -1;
+
+ idx = key % map->size;
+
+ for (i = 0; i < map->size; ++i) {
+ e = &map->data[idx];
+ if (!e->item || e->item == &deleted) {
+ ++map->count;
+ return idx;
+ }
+ if (e->item->key == key)
+ return idx;
+
+ idx = (idx + 1) % map->size;
+ }
+
+ return -2;
+}
+
+static int map_rehash(struct map *map);
+
+int map_reput(struct map *map, unsigned int key, struct map_item *value,
+ struct map_item **old)
+{
+ int rc;
+
+ while ((rc = map_hash(map, key)) < 0) {
+ if ((rc = map_rehash(map)) < 0)
+ return rc;
+ }
+
+ if (old) {
+ if (map->data[rc].item == &deleted)
+ *old = NULL;
+ else
+ *old = map->data[rc].item;
+ }
+ map->data[rc].item = value;
+ if (value)
+ map->data[rc].item->key = key;
+
+ return 0;
+}
+
+int map_put(struct map *map, unsigned int key, struct map_item *value)
+{
+ return map_reput(map, key, value, NULL);
+}
+
+static int map_rehash(struct map *map)
+{
+ struct map_entry *oldt, *newt;
+ int o_size, i;
+ int rc;
+
+ newt = calloc(sizeof(struct map_entry), map->size + 256);
+ if (!newt)
+ return -1;
+
+ oldt = map->data;
+ map->data = newt;
+
+ o_size = map->size;
+ map->size += 256;
+ map->count = 0;
+
+ for (i = 0; i < o_size; ++i){
+ if (!oldt[i].item || oldt[i].item == &deleted)
+ continue;
+ rc = map_put(map, oldt[i].item->key, oldt[i].item);
+ if (rc < 0)
+ return rc;
+ }
+
+ free(oldt);
+
+ return 0;
+}
+
+static struct map_entry *map_find(const struct map *map, unsigned int key)
+{
+ struct map_entry *e;
+ int idx, i;
+
+ if (map->size == 0)
+ return NULL;
+
+ idx = key % map->size;
+
+ for (i = 0; i < map->size; ++i) {
+ e = &map->data[idx];
+ idx = (idx + 1) % map->size;
+
+ if (!e->item)
+ break;
+ if (e->item == &deleted)
+ continue;
+ if (e->item->key == key)
+ return e;
+ }
+ return NULL;
+}
+
+int map_contains(const struct map *map, unsigned int key)
+{
+ return (map_find(map, key) == NULL) ? 0 : 1;
+}
+
+struct map_item *map_get(const struct map *map, unsigned int key)
+{
+ struct map_entry *e;
+
+ e = map_find(map, key);
+ if (e == NULL)
+ return NULL;
+ return e->item;
+}
+
+int map_remove(struct map *map, unsigned int key)
+{
+ struct map_entry *e;
+
+ e = map_find(map, key);
+ if (e) {
+ e->item = &deleted;
+ --map->count;
+ }
+ return !e;
+}
+
+unsigned int map_length(struct map *map)
+{
+ return map ? map->count : 0;
+}
+
+static struct map_entry *map_iter_from(const struct map *map, unsigned int start)
+{
+ unsigned int i = start;
+
+ for (; i < map->size; ++i) {
+ if (map->data[i].item && map->data[i].item != &deleted)
+ return &map->data[i];
+ }
+ return NULL;
+}
+
+struct map_entry *map_iter_next(const struct map *map, struct map_entry *iter)
+{
+ if (iter == NULL)
+ return NULL;
+
+ return map_iter_from(map, (iter - map->data) + 1);
+}
+
+struct map_entry *map_iter_first(const struct map *map)
+{
+ return map_iter_from(map, 0);
+}
+
+
+struct map_item *map_iter_item(struct map_entry *iter)
+{
+ return iter->item;
+}
diff --git a/qcom/qrtr/src/map.h b/qcom/qrtr/src/map.h
new file mode 100644
index 0000000..de68e19
--- /dev/null
+++ b/qcom/qrtr/src/map.h
@@ -0,0 +1,38 @@
+#ifndef _MAP_H_
+#define _MAP_H_
+
+struct map_item {
+ unsigned int key;
+};
+
+struct map_entry;
+
+struct map {
+ unsigned int size;
+ unsigned int count;
+ struct map_entry *data;
+};
+
+int map_create(struct map *map);
+void map_destroy(struct map *map);
+void map_clear(struct map *map, void (*release)(struct map_item *));
+
+int map_put(struct map *map, unsigned int key, struct map_item *v);
+int map_reput(struct map *map, unsigned int key, struct map_item *v,
+ struct map_item **old);
+int map_contains(const struct map *map, unsigned int key);
+struct map_item *map_get(const struct map *map, unsigned int key);
+int map_remove(struct map *map, unsigned int key);
+unsigned int map_length(struct map *map);
+
+struct map_entry *map_iter_first(const struct map *map);
+struct map_entry *map_iter_next(const struct map *map, struct map_entry *iter);
+struct map_item *map_iter_item(struct map_entry *iter);
+
+#define map_for_each(map, iter) \
+ for (iter = map_iter_first(map); iter; iter = map_iter_next(map, iter))
+
+#define map_iter_data(iter, type, member) \
+ container_of(map_iter_item(iter), type, member)
+
+#endif
diff --git a/qcom/qrtr/src/ns.c b/qcom/qrtr/src/ns.c
new file mode 100644
index 0000000..393cc68
--- /dev/null
+++ b/qcom/qrtr/src/ns.c
@@ -0,0 +1,808 @@
+#include <err.h>
+#include <errno.h>
+#include <libgen.h>
+#include <limits.h>
+#include <linux/qrtr.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <unistd.h>
+
+#include "addr.h"
+#include "hash.h"
+#include "list.h"
+#include "map.h"
+#include "ns.h"
+#include "util.h"
+#include "waiter.h"
+
+#include "libqrtr.h"
+#include "logging.h"
+
+static const char *ctrl_pkt_strings[] = {
+ [QRTR_TYPE_HELLO] = "hello",
+ [QRTR_TYPE_BYE] = "bye",
+ [QRTR_TYPE_NEW_SERVER] = "new-server",
+ [QRTR_TYPE_DEL_SERVER] = "del-server",
+ [QRTR_TYPE_DEL_CLIENT] = "del-client",
+ [QRTR_TYPE_RESUME_TX] = "resume-tx",
+ [QRTR_TYPE_EXIT] = "exit",
+ [QRTR_TYPE_PING] = "ping",
+ [QRTR_TYPE_NEW_LOOKUP] = "new-lookup",
+ [QRTR_TYPE_DEL_LOOKUP] = "del-lookup",
+};
+
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
+
+struct context {
+ int sock;
+
+ int local_node;
+
+ struct sockaddr_qrtr bcast_sq;
+
+ struct list lookups;
+};
+
+struct server_filter {
+ unsigned int service;
+ unsigned int instance;
+ unsigned int ifilter;
+};
+
+struct lookup {
+ unsigned int service;
+ unsigned int instance;
+
+ struct sockaddr_qrtr sq;
+ struct list_item li;
+};
+
+struct server {
+ unsigned int service;
+ unsigned int instance;
+
+ unsigned int node;
+ unsigned int port;
+ struct map_item mi;
+ struct list_item qli;
+};
+
+struct node {
+ unsigned int id;
+
+ struct map_item mi;
+ struct map services;
+};
+
+static struct map nodes;
+
+static void server_mi_free(struct map_item *mi);
+
+static struct node *node_get(unsigned int node_id)
+{
+ struct map_item *mi;
+ struct node *node;
+ int rc;
+
+ mi = map_get(&nodes, hash_u32(node_id));
+ if (mi)
+ return container_of(mi, struct node, mi);
+
+ node = calloc(1, sizeof(*node));
+ if (!node)
+ return NULL;
+
+ node->id = node_id;
+
+ rc = map_create(&node->services);
+ if (rc)
+ LOGE_AND_EXIT("unable to create map");
+
+ rc = map_put(&nodes, hash_u32(node_id), &node->mi);
+ if (rc) {
+ map_destroy(&node->services);
+ free(node);
+ return NULL;
+ }
+
+ return node;
+}
+
+static int server_match(const struct server *srv, const struct server_filter *f)
+{
+ unsigned int ifilter = f->ifilter;
+
+ if (f->service != 0 && srv->service != f->service)
+ return 0;
+ if (!ifilter && f->instance)
+ ifilter = ~0;
+ return (srv->instance & ifilter) == f->instance;
+}
+
+static int server_query(const struct server_filter *f, struct list *list)
+{
+ struct map_entry *node_me;
+ struct map_entry *me;
+ struct node *node;
+ int count = 0;
+
+ list_init(list);
+ map_for_each(&nodes, node_me) {
+ node = map_iter_data(node_me, struct node, mi);
+
+ map_for_each(&node->services, me) {
+ struct server *srv;
+
+ srv = map_iter_data(me, struct server, mi);
+ if (!server_match(srv, f))
+ continue;
+
+ list_append(list, &srv->qli);
+ ++count;
+ }
+ }
+
+ return count;
+}
+
+static int service_announce_new(struct context *ctx,
+ struct sockaddr_qrtr *dest,
+ struct server *srv)
+{
+ struct qrtr_ctrl_pkt cmsg;
+ int rc;
+
+ LOGD("advertising new server [%d:%x]@[%d:%d]\n",
+ srv->service, srv->instance, srv->node, srv->port);
+
+ cmsg.cmd = cpu_to_le32(QRTR_TYPE_NEW_SERVER);
+ cmsg.server.service = cpu_to_le32(srv->service);
+ cmsg.server.instance = cpu_to_le32(srv->instance);
+ cmsg.server.node = cpu_to_le32(srv->node);
+ cmsg.server.port = cpu_to_le32(srv->port);
+
+ rc = sendto(ctx->sock, &cmsg, sizeof(cmsg), 0,
+ (struct sockaddr *)dest, sizeof(*dest));
+ if (rc < 0)
+ PLOGW("sendto()");
+
+ return rc;
+}
+
+static int service_announce_del(struct context *ctx,
+ struct sockaddr_qrtr *dest,
+ struct server *srv)
+{
+ struct qrtr_ctrl_pkt cmsg;
+ int rc;
+
+ LOGD("advertising removal of server [%d:%x]@[%d:%d]\n",
+ srv->service, srv->instance, srv->node, srv->port);
+
+ cmsg.cmd = cpu_to_le32(QRTR_TYPE_DEL_SERVER);
+ cmsg.server.service = cpu_to_le32(srv->service);
+ cmsg.server.instance = cpu_to_le32(srv->instance);
+ cmsg.server.node = cpu_to_le32(srv->node);
+ cmsg.server.port = cpu_to_le32(srv->port);
+
+ rc = sendto(ctx->sock, &cmsg, sizeof(cmsg), 0,
+ (struct sockaddr *)dest, sizeof(*dest));
+ if (rc < 0)
+ PLOGW("sendto()");
+
+ return rc;
+}
+
+static int lookup_notify(struct context *ctx, struct sockaddr_qrtr *to,
+ struct server *srv, bool new)
+{
+ struct qrtr_ctrl_pkt pkt = {};
+ int rc;
+
+ pkt.cmd = new ? QRTR_TYPE_NEW_SERVER : QRTR_TYPE_DEL_SERVER;
+ if (srv) {
+ pkt.server.service = cpu_to_le32(srv->service);
+ pkt.server.instance = cpu_to_le32(srv->instance);
+ pkt.server.node = cpu_to_le32(srv->node);
+ pkt.server.port = cpu_to_le32(srv->port);
+ }
+
+ rc = sendto(ctx->sock, &pkt, sizeof(pkt), 0,
+ (struct sockaddr *)to, sizeof(*to));
+ if (rc < 0)
+ PLOGW("send lookup result failed");
+ return rc;
+}
+
+static int annouce_servers(struct context *ctx, struct sockaddr_qrtr *sq)
+{
+ struct map_entry *me;
+ struct server *srv;
+ struct node *node;
+ int rc;
+
+ node = node_get(ctx->local_node);
+ if (!node)
+ return 0;
+
+ map_for_each(&node->services, me) {
+ srv = map_iter_data(me, struct server, mi);
+
+ rc = service_announce_new(ctx, sq, srv);
+ if (rc < 0)
+ return rc;
+ }
+
+ return 0;
+}
+
+static struct server *server_add(unsigned int service, unsigned int instance,
+ unsigned int node_id, unsigned int port)
+{
+ struct map_item *mi;
+ struct server *srv;
+ struct node *node;
+ int rc;
+
+ if (!service || !port)
+ return NULL;
+
+ srv = calloc(1, sizeof(*srv));
+ if (srv == NULL)
+ return NULL;
+
+ srv->service = service;
+ srv->instance = instance;
+ srv->node = node_id;
+ srv->port = port;
+
+ node = node_get(node_id);
+ if (!node)
+ goto err;
+
+ rc = map_reput(&node->services, hash_u32(port), &srv->mi, &mi);
+ if (rc)
+ goto err;
+
+ LOGD("add server [%d:%x]@[%d:%d]\n", srv->service, srv->instance,
+ srv->node, srv->port);
+
+ if (mi) { /* we replaced someone */
+ struct server *old = container_of(mi, struct server, mi);
+ free(old);
+ }
+
+ return srv;
+
+err:
+ free(srv);
+ return NULL;
+}
+
+static int server_del(struct context *ctx, struct node *node, unsigned int port)
+{
+ struct lookup *lookup;
+ struct list_item *li;
+ struct map_item *mi;
+ struct server *srv;
+
+ mi = map_get(&node->services, hash_u32(port));
+ if (!mi)
+ return -ENOENT;
+
+ srv = container_of(mi, struct server, mi);
+ map_remove(&node->services, srv->mi.key);
+
+ /* Broadcast the removal of local services */
+ if (srv->node == ctx->local_node)
+ service_announce_del(ctx, &ctx->bcast_sq, srv);
+
+ /* Announce the service's disappearance to observers */
+ list_for_each(&ctx->lookups, li) {
+ lookup = container_of(li, struct lookup, li);
+ if (lookup->service && lookup->service != srv->service)
+ continue;
+ if (lookup->instance && lookup->instance != srv->instance)
+ continue;
+
+ lookup_notify(ctx, &lookup->sq, srv, false);
+ }
+
+ free(srv);
+
+ return 0;
+}
+
+static int ctrl_cmd_hello(struct context *ctx, struct sockaddr_qrtr *sq,
+ const void *buf, size_t len)
+{
+ int rc;
+
+ rc = sendto(ctx->sock, buf, len, 0, (void *)sq, sizeof(*sq));
+ if (rc > 0)
+ rc = annouce_servers(ctx, sq);
+
+ return rc;
+}
+
+static int ctrl_cmd_bye(struct context *ctx, struct sockaddr_qrtr *from)
+{
+ struct qrtr_ctrl_pkt pkt;
+ struct sockaddr_qrtr sq;
+ struct node *local_node;
+ struct map_entry *me;
+ struct server *srv;
+ struct node *node;
+ int rc;
+
+ node = node_get(from->sq_node);
+ if (!node)
+ return 0;
+
+ map_for_each(&node->services, me) {
+ srv = map_iter_data(me, struct server, mi);
+
+ server_del(ctx, node, srv->port);
+ }
+
+ /* Advertise the removal of this client to all local services */
+ local_node = node_get(ctx->local_node);
+ if (!local_node)
+ return 0;
+
+ memset(&pkt, 0, sizeof(pkt));
+ pkt.cmd = QRTR_TYPE_BYE;
+ pkt.client.node = from->sq_node;
+
+ map_for_each(&local_node->services, me) {
+ srv = map_iter_data(me, struct server, mi);
+
+ sq.sq_family = AF_QIPCRTR;
+ sq.sq_node = srv->node;
+ sq.sq_port = srv->port;
+
+ rc = sendto(ctx->sock, &pkt, sizeof(pkt), 0,
+ (struct sockaddr *)&sq, sizeof(sq));
+ if (rc < 0)
+ PLOGW("bye propagation failed");
+ }
+
+ return 0;
+}
+
+static int ctrl_cmd_del_client(struct context *ctx, struct sockaddr_qrtr *from,
+ unsigned node_id, unsigned port)
+{
+ struct qrtr_ctrl_pkt pkt;
+ struct sockaddr_qrtr sq;
+ struct node *local_node;
+ struct list_item *tmp;
+ struct lookup *lookup;
+ struct list_item *li;
+ struct map_entry *me;
+ struct server *srv;
+ struct node *node;
+ int rc;
+
+ /* Don't accept spoofed messages */
+ if (from->sq_node != node_id)
+ return -EINVAL;
+
+ /* Local DEL_CLIENT messages comes from the port being closed */
+ if (from->sq_node == ctx->local_node && from->sq_port != port)
+ return -EINVAL;
+
+ /* Remove any lookups by this client */
+ list_for_each_safe(&ctx->lookups, li, tmp) {
+ lookup = container_of(li, struct lookup, li);
+ if (lookup->sq.sq_node != node_id)
+ continue;
+ if (lookup->sq.sq_port != port)
+ continue;
+
+ list_remove(&ctx->lookups, &lookup->li);
+ free(lookup);
+ }
+
+ /* Remove the server belonging to this port*/
+ node = node_get(node_id);
+ if (node)
+ server_del(ctx, node, port);
+
+ /* Advertise the removal of this client to all local services */
+ local_node = node_get(ctx->local_node);
+ if (!local_node)
+ return 0;
+
+ pkt.cmd = QRTR_TYPE_DEL_CLIENT;
+ pkt.client.node = node_id;
+ pkt.client.port = port;
+
+ map_for_each(&local_node->services, me) {
+ srv = map_iter_data(me, struct server, mi);
+
+ sq.sq_family = AF_QIPCRTR;
+ sq.sq_node = srv->node;
+ sq.sq_port = srv->port;
+
+ rc = sendto(ctx->sock, &pkt, sizeof(pkt), 0,
+ (struct sockaddr *)&sq, sizeof(sq));
+ if (rc < 0)
+ PLOGW("del_client propagation failed");
+ }
+
+ return 0;
+}
+
+static int ctrl_cmd_new_server(struct context *ctx, struct sockaddr_qrtr *from,
+ unsigned int service, unsigned int instance,
+ unsigned int node_id, unsigned int port)
+{
+ struct lookup *lookup;
+ struct list_item *li;
+ struct server *srv;
+ int rc = 0;
+
+ /* Ignore specified node and port for local servers*/
+ if (from->sq_node == ctx->local_node) {
+ node_id = from->sq_node;
+ port = from->sq_port;
+ }
+
+ /* Don't accept spoofed messages */
+ if (from->sq_node != node_id)
+ return -EINVAL;
+
+ srv = server_add(service, instance, node_id, port);
+ if (!srv)
+ return -EINVAL;
+
+ if (srv->node == ctx->local_node)
+ rc = service_announce_new(ctx, &ctx->bcast_sq, srv);
+
+ list_for_each(&ctx->lookups, li) {
+ lookup = container_of(li, struct lookup, li);
+ if (lookup->service && lookup->service != service)
+ continue;
+ if (lookup->instance && lookup->instance != instance)
+ continue;
+
+ lookup_notify(ctx, &lookup->sq, srv, true);
+ }
+
+ return rc;
+}
+
+static int ctrl_cmd_del_server(struct context *ctx, struct sockaddr_qrtr *from,
+ unsigned int service __unused,
+ unsigned int instance __unused,
+ unsigned int node_id, unsigned int port)
+{
+ struct node *node;
+
+ /* Ignore specified node and port for local servers*/
+ if (from->sq_node == ctx->local_node) {
+ node_id = from->sq_node;
+ port = from->sq_port;
+ }
+
+ /* Don't accept spoofed messages */
+ if (from->sq_node != node_id)
+ return -EINVAL;
+
+ /* Local servers may only unregister themselves */
+ if (from->sq_node == ctx->local_node && from->sq_port != port)
+ return -EINVAL;
+
+ node = node_get(node_id);
+ if (!node)
+ return -ENOENT;
+
+ return server_del(ctx, node, port);
+}
+
+static int ctrl_cmd_new_lookup(struct context *ctx, struct sockaddr_qrtr *from,
+ unsigned int service, unsigned int instance)
+{
+ struct server_filter filter;
+ struct list reply_list;
+ struct lookup *lookup;
+ struct list_item *li;
+ struct server *srv;
+
+ /* Accept only local observers */
+ if (from->sq_node != ctx->local_node)
+ return -EINVAL;
+
+ lookup = calloc(1, sizeof(*lookup));
+ if (!lookup)
+ return -EINVAL;
+
+ lookup->sq = *from;
+ lookup->service = service;
+ lookup->instance = instance;
+ list_append(&ctx->lookups, &lookup->li);
+
+ memset(&filter, 0, sizeof(filter));
+ filter.service = service;
+ filter.instance = instance;
+
+ server_query(&filter, &reply_list);
+ list_for_each(&reply_list, li) {
+ srv = container_of(li, struct server, qli);
+
+ lookup_notify(ctx, from, srv, true);
+ }
+
+ lookup_notify(ctx, from, NULL, true);
+
+ return 0;
+}
+
+static int ctrl_cmd_del_lookup(struct context *ctx, struct sockaddr_qrtr *from,
+ unsigned int service, unsigned int instance)
+{
+ struct lookup *lookup;
+ struct list_item *tmp;
+ struct list_item *li;
+
+ list_for_each_safe(&ctx->lookups, li, tmp) {
+ lookup = container_of(li, struct lookup, li);
+ if (lookup->sq.sq_node != from->sq_node)
+ continue;
+ if (lookup->sq.sq_port != from->sq_port)
+ continue;
+ if (lookup->service != service)
+ continue;
+ if (lookup->instance && lookup->instance != instance)
+ continue;
+
+ list_remove(&ctx->lookups, &lookup->li);
+ free(lookup);
+ }
+
+ return 0;
+}
+
+static void ctrl_port_fn(void *vcontext, struct waiter_ticket *tkt)
+{
+ struct context *ctx = vcontext;
+ struct sockaddr_qrtr sq;
+ int sock = ctx->sock;
+ struct qrtr_ctrl_pkt *msg;
+ unsigned int cmd;
+ char buf[4096];
+ socklen_t sl;
+ ssize_t len;
+ int rc;
+
+ sl = sizeof(sq);
+ len = recvfrom(sock, buf, sizeof(buf), 0, (void *)&sq, &sl);
+ if (len <= 0) {
+ PLOGW("recvfrom()");
+ close(sock);
+ ctx->sock = -1;
+ goto out;
+ }
+ msg = (void *)buf;
+
+ if (len < 4) {
+ LOGW("short packet from %d:%d", sq.sq_node, sq.sq_port);
+ goto out;
+ }
+
+ cmd = le32_to_cpu(msg->cmd);
+ if (cmd < ARRAY_SIZE(ctrl_pkt_strings) && ctrl_pkt_strings[cmd])
+ LOGD("%s from %d:%d\n", ctrl_pkt_strings[cmd], sq.sq_node, sq.sq_port);
+ else
+ LOGD("UNK (%08x) from %d:%d\n", cmd, sq.sq_node, sq.sq_port);
+
+ rc = 0;
+ switch (cmd) {
+ case QRTR_TYPE_HELLO:
+ rc = ctrl_cmd_hello(ctx, &sq, buf, len);
+ break;
+ case QRTR_TYPE_BYE:
+ rc = ctrl_cmd_bye(ctx, &sq);
+ break;
+ case QRTR_TYPE_DEL_CLIENT:
+ rc = ctrl_cmd_del_client(ctx, &sq,
+ le32_to_cpu(msg->client.node),
+ le32_to_cpu(msg->client.port));
+ break;
+ case QRTR_TYPE_NEW_SERVER:
+ rc = ctrl_cmd_new_server(ctx, &sq,
+ le32_to_cpu(msg->server.service),
+ le32_to_cpu(msg->server.instance),
+ le32_to_cpu(msg->server.node),
+ le32_to_cpu(msg->server.port));
+ break;
+ case QRTR_TYPE_DEL_SERVER:
+ rc = ctrl_cmd_del_server(ctx, &sq,
+ le32_to_cpu(msg->server.service),
+ le32_to_cpu(msg->server.instance),
+ le32_to_cpu(msg->server.node),
+ le32_to_cpu(msg->server.port));
+ break;
+ case QRTR_TYPE_EXIT:
+ case QRTR_TYPE_PING:
+ case QRTR_TYPE_RESUME_TX:
+ break;
+ case QRTR_TYPE_NEW_LOOKUP:
+ rc = ctrl_cmd_new_lookup(ctx, &sq,
+ le32_to_cpu(msg->server.service),
+ le32_to_cpu(msg->server.instance));
+ break;
+ case QRTR_TYPE_DEL_LOOKUP:
+ rc = ctrl_cmd_del_lookup(ctx, &sq,
+ le32_to_cpu(msg->server.service),
+ le32_to_cpu(msg->server.instance));
+ break;
+ }
+
+ if (rc < 0)
+ LOGW("failed while handling packet from %d:%d",
+ sq.sq_node, sq.sq_port);
+out:
+ waiter_ticket_clear(tkt);
+}
+
+static int say_hello(struct context *ctx)
+{
+ struct qrtr_ctrl_pkt pkt;
+ int rc;
+
+ memset(&pkt, 0, sizeof(pkt));
+ pkt.cmd = cpu_to_le32(QRTR_TYPE_HELLO);
+
+ rc = sendto(ctx->sock, &pkt, sizeof(pkt), 0,
+ (struct sockaddr *)&ctx->bcast_sq, sizeof(ctx->bcast_sq));
+ if (rc < 0)
+ return rc;
+
+ return 0;
+}
+
+static void server_mi_free(struct map_item *mi)
+{
+ free(container_of(mi, struct server, mi));
+}
+
+static void node_mi_free(struct map_item *mi)
+{
+ struct node *node = container_of(mi, struct node, mi);
+
+ map_clear(&node->services, server_mi_free);
+ map_destroy(&node->services);
+
+ free(node);
+}
+
+static void go_dormant(int sock)
+{
+ close(sock);
+
+ for (;;)
+ sleep(UINT_MAX);
+}
+
+static void usage(const char *progname)
+{
+ fprintf(stderr, "%s [-f] [-s] [<node-id>]\n", progname);
+ exit(1);
+}
+
+int main(int argc, char **argv)
+{
+ struct waiter_ticket *tkt;
+ struct sockaddr_qrtr sq;
+ struct context ctx;
+ unsigned long addr = (unsigned long)-1;
+ struct waiter *w;
+ socklen_t sl = sizeof(sq);
+ bool foreground = false;
+ bool use_syslog = false;
+ bool verbose_log = false;
+ char *ep;
+ int opt;
+ int rc;
+ const char *progname = basename(argv[0]);
+
+ while ((opt = getopt(argc, argv, "fsv")) != -1) {
+ switch (opt) {
+ case 'f':
+ foreground = true;
+ break;
+ case 's':
+ use_syslog = true;
+ break;
+ case 'v':
+ verbose_log = true;
+ break;
+ default:
+ usage(progname);
+ }
+ }
+
+ qlog_setup(progname, use_syslog);
+ if (verbose_log)
+ qlog_set_min_priority(LOG_DEBUG);
+
+ if (optind < argc) {
+ addr = strtoul(argv[optind], &ep, 10);
+ if (argv[1][0] == '\0' || *ep != '\0' || addr >= UINT_MAX)
+ usage(progname);
+
+ qrtr_set_address(addr);
+ optind++;
+ }
+
+ if (optind != argc)
+ usage(progname);
+
+ w = waiter_create();
+ if (w == NULL)
+ LOGE_AND_EXIT("unable to create waiter");
+
+ list_init(&ctx.lookups);
+
+ rc = map_create(&nodes);
+ if (rc)
+ LOGE_AND_EXIT("unable to create node map");
+
+ ctx.sock = socket(AF_QIPCRTR, SOCK_DGRAM, 0);
+ if (ctx.sock < 0)
+ PLOGE_AND_EXIT("unable to create control socket");
+
+ rc = getsockname(ctx.sock, (void*)&sq, &sl);
+ if (rc < 0)
+ PLOGE_AND_EXIT("getsockname()");
+ sq.sq_port = QRTR_PORT_CTRL;
+ ctx.local_node = sq.sq_node;
+
+ rc = bind(ctx.sock, (void *)&sq, sizeof(sq));
+ if (rc < 0) {
+ if (errno == EADDRINUSE) {
+ PLOGE("nameserver already running, going dormant");
+ go_dormant(ctx.sock);
+ }
+
+ PLOGE_AND_EXIT("bind control socket");
+ }
+
+ ctx.bcast_sq.sq_family = AF_QIPCRTR;
+ ctx.bcast_sq.sq_node = QRTR_NODE_BCAST;
+ ctx.bcast_sq.sq_port = QRTR_PORT_CTRL;
+
+ rc = say_hello(&ctx);
+ if (rc)
+ PLOGE_AND_EXIT("unable to say hello");
+
+ /* If we're going to background, fork and exit parent */
+ if (!foreground && fork() != 0) {
+ close(ctx.sock);
+ exit(0);
+ }
+
+ tkt = waiter_add_fd(w, ctx.sock);
+ waiter_ticket_callback(tkt, ctrl_port_fn, &ctx);
+
+ while (ctx.sock >= 0)
+ waiter_wait(w);
+
+ puts("exiting cleanly");
+
+ waiter_destroy(w);
+
+ map_clear(&nodes, node_mi_free);
+ map_destroy(&nodes);
+
+ return 0;
+}
diff --git a/qcom/qrtr/src/ns.h b/qcom/qrtr/src/ns.h
new file mode 100644
index 0000000..d661ac8
--- /dev/null
+++ b/qcom/qrtr/src/ns.h
@@ -0,0 +1,10 @@
+#ifndef __NS_H_
+#define __NS_H_
+
+#include <endian.h>
+#include <stdint.h>
+
+static inline __le32 cpu_to_le32(uint32_t x) { return htole32(x); }
+static inline uint32_t le32_to_cpu(__le32 x) { return le32toh(x); }
+
+#endif
diff --git a/qcom/qrtr/src/util.c b/qcom/qrtr/src/util.c
new file mode 100644
index 0000000..48d9d27
--- /dev/null
+++ b/qcom/qrtr/src/util.c
@@ -0,0 +1,18 @@
+#include <string.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/time.h>
+
+#include "util.h"
+
+uint64_t time_ms(void)
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (uint64_t)tv.tv_sec*1000 + tv.tv_usec/1000;
+}
+
+void util_sleep(int ms)
+{
+ usleep(ms * 1000);
+}
diff --git a/qcom/qrtr/src/util.h b/qcom/qrtr/src/util.h
new file mode 100644
index 0000000..3f371cd
--- /dev/null
+++ b/qcom/qrtr/src/util.h
@@ -0,0 +1,9 @@
+#ifndef __UTIL_H_
+#define __UTIL_H_
+
+#include <stdint.h>
+
+uint64_t time_ms(void);
+void util_sleep(int ms);
+
+#endif
diff --git a/qcom/qrtr/src/waiter.c b/qcom/qrtr/src/waiter.c
new file mode 100644
index 0000000..f21896f
--- /dev/null
+++ b/qcom/qrtr/src/waiter.c
@@ -0,0 +1,378 @@
+/*
+ * Copyright (c) 2013-2014, Sony Mobile Communications Inc.
+ * Copyright (c) 2014, Courtney Cavin
+ *
+ * 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 organization 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <poll.h>
+
+#include "list.h"
+#include "waiter.h"
+#include "util.h"
+
+struct pollset {
+ int nfds;
+ int cause;
+};
+
+static struct pollset *pollset_create(int count)
+{
+ struct pollset *ps;
+
+ ps = calloc(1, sizeof(*ps) + sizeof(struct pollfd) * count);
+ if (ps == NULL)
+ return NULL;
+
+ return ps;
+}
+
+static void pollset_destroy(struct pollset *ps)
+{
+ free(ps);
+}
+
+static void pollset_reset(struct pollset *ps)
+{
+ ps->nfds = 0;
+}
+
+static void pollset_add_fd(struct pollset *ps, int fd)
+{
+ struct pollfd *pfd = (struct pollfd *)(ps + 1);
+ pfd[ps->nfds].fd = fd;
+ pfd[ps->nfds].events = POLLERR | POLLIN;
+ ps->nfds++;
+}
+
+static int pollset_wait(struct pollset *ps, int ms)
+{
+ struct pollfd *pfd = (struct pollfd *)(ps + 1);
+ int rc;
+ int i;
+
+ rc = poll(pfd, ps->nfds, ms);
+ if (rc <= 0)
+ return rc;
+
+ ps->cause = -1;
+ for (i = 0; i < ps->nfds; ++i) {
+ if (pfd[i].revents & (POLLERR | POLLIN)) {
+ ps->cause = i;
+ break;
+ }
+ }
+ return rc;
+
+}
+
+static int pollset_cause_fd(struct pollset *ps, int fd)
+{
+ struct pollfd *pfd = (struct pollfd *)(ps + 1);
+ return (ps->cause >= 0 && pfd[ps->cause].fd == fd);
+}
+
+enum waiter_type {
+ WATCH_TYPE_NULL,
+ WATCH_TYPE_FD,
+ WATCH_TYPE_TIMEOUT,
+};
+
+struct waiter_ticket {
+ enum waiter_type type;
+ union {
+ int filedes;
+ unsigned int event;
+ unsigned int interval;
+ };
+ struct {
+ void (* fn)(void *data, struct waiter_ticket *);
+ void *data;
+ } callback;
+
+ uint64_t start;
+ int updated;
+ struct waiter *waiter;
+ struct list_item list_item;
+};
+
+struct waiter {
+ struct list tickets;
+ struct pollset *pollset;
+ int count;
+};
+
+struct waiter *waiter_create(void)
+{
+ struct waiter *w;
+
+ w = calloc(1, sizeof(*w));
+ if (w == NULL)
+ return NULL;
+
+ list_init(&w->tickets);
+ return w;
+}
+
+void waiter_destroy(struct waiter *w)
+{
+ struct waiter_ticket *ticket;
+ struct list_item *safe;
+ struct list_item *node;
+
+ list_for_each_safe(&w->tickets, node, safe) {
+ ticket = list_entry(node, struct waiter_ticket, list_item);
+ free(ticket);
+ }
+
+ if (w->pollset)
+ pollset_destroy(w->pollset);
+ free(w);
+}
+
+void waiter_synchronize(struct waiter *w)
+{
+ struct waiter_ticket *oticket;
+ struct waiter_ticket *ticket;
+ struct list_item *node;
+
+ list_for_each(&w->tickets, node) {
+ struct list_item *onode;
+ ticket = list_entry(node, struct waiter_ticket, list_item);
+
+ if (ticket->type != WATCH_TYPE_TIMEOUT)
+ continue;
+
+ list_for_each_after(node, onode) {
+ oticket = list_entry(onode, struct waiter_ticket, list_item);
+ if (oticket->type != WATCH_TYPE_TIMEOUT)
+ continue;
+
+ if (oticket->interval == ticket->interval) {
+ oticket->start = ticket->start;
+ break;
+ }
+ }
+ }
+}
+
+void waiter_wait(struct waiter *w)
+{
+ struct pollset *ps = w->pollset;
+ struct waiter_ticket *ticket;
+ struct list_item *node;
+ uint64_t term_time;
+ uint64_t now;
+ int rc;
+
+ pollset_reset(ps);
+
+ term_time = (uint64_t)-1;
+ list_for_each(&w->tickets, node) {
+ ticket = list_entry(node, struct waiter_ticket, list_item);
+ switch (ticket->type) {
+ case WATCH_TYPE_TIMEOUT:
+ if (ticket->start + ticket->interval < term_time)
+ term_time = ticket->start + ticket->interval;
+ break;
+ case WATCH_TYPE_FD:
+ pollset_add_fd(ps, ticket->filedes);
+ break;
+ case WATCH_TYPE_NULL:
+ break;
+ }
+ }
+
+ if (term_time == (uint64_t)-1) { /* wait forever */
+ rc = pollset_wait(ps, -1);
+ } else {
+ now = time_ms();
+ if (now >= term_time) { /* already past timeout, skip poll */
+ rc = 0;
+ } else {
+ uint64_t delta;
+
+ delta = term_time - now;
+ if (delta > ((1u << 31) - 1))
+ delta = ((1u << 31) - 1);
+ rc = pollset_wait(ps, (int)delta);
+ }
+ }
+
+ if (rc < 0)
+ return;
+
+ now = time_ms();
+ list_for_each(&w->tickets, node) {
+ int fresh = 0;
+
+ ticket = list_entry(node, struct waiter_ticket, list_item);
+ switch (ticket->type) {
+ case WATCH_TYPE_TIMEOUT:
+ if (now >= ticket->start + ticket->interval) {
+ ticket->start = now;
+ fresh = !ticket->updated;
+ }
+ break;
+ case WATCH_TYPE_FD:
+ if (rc == 0) /* timed-out */
+ break;
+ if (pollset_cause_fd(ps, ticket->filedes))
+ fresh = !ticket->updated;
+ break;
+ case WATCH_TYPE_NULL:
+ break;
+ }
+ if (fresh) {
+ ticket->updated = 1;
+ if (ticket->callback.fn)
+ (* ticket->callback.fn)(
+ ticket->callback.data,
+ ticket
+ );
+ }
+ }
+}
+
+int waiter_wait_timeout(struct waiter *w, unsigned int ms)
+{
+ struct waiter_ticket ticket;
+ int rc;
+
+ memset(&ticket, 0, sizeof(ticket));
+ waiter_ticket_set_timeout(&ticket, ms);
+ list_append(&w->tickets, &ticket.list_item);
+ w->count++;
+
+ waiter_wait(w);
+ rc = waiter_ticket_check(&ticket);
+
+ list_remove(&w->tickets, &ticket.list_item);
+ w->count--;
+
+ return -!rc;
+}
+
+void waiter_ticket_set_null(struct waiter_ticket *ticket)
+{
+ ticket->type = WATCH_TYPE_NULL;
+}
+
+void waiter_ticket_set_fd(struct waiter_ticket *ticket, int fd)
+{
+ ticket->type = WATCH_TYPE_FD;
+ ticket->filedes = fd;
+}
+
+void waiter_ticket_set_timeout(struct waiter_ticket *ticket, unsigned int ms)
+{
+ ticket->type = WATCH_TYPE_TIMEOUT;
+ ticket->interval = ms;
+ ticket->start = time_ms();
+}
+
+struct waiter_ticket *waiter_add_null(struct waiter *w)
+{
+ struct waiter_ticket *ticket;
+
+ ticket = calloc(1, sizeof(*ticket));
+ if (ticket == NULL)
+ return NULL;
+ ticket->waiter = w;
+
+ list_append(&w->tickets, &ticket->list_item);
+ if ((w->count % 32) == 0) {
+ if (w->pollset)
+ pollset_destroy(w->pollset);
+ w->pollset = pollset_create(w->count + 33);
+ if (w->pollset == NULL)
+ return NULL;
+ }
+ w->count++;
+
+ waiter_ticket_set_null(ticket);
+
+ return ticket;
+}
+
+struct waiter_ticket *waiter_add_fd(struct waiter *w, int fd)
+{
+ struct waiter_ticket *ticket;
+
+ ticket = waiter_add_null(w);
+ if (ticket == NULL)
+ return NULL;
+
+ waiter_ticket_set_fd(ticket, fd);
+
+ return ticket;
+}
+
+struct waiter_ticket *waiter_add_timeout(struct waiter *w, unsigned int ms)
+{
+ struct waiter_ticket *ticket;
+
+ ticket = waiter_add_null(w);
+ if (ticket == NULL)
+ return NULL;
+
+ waiter_ticket_set_timeout(ticket, ms);
+
+ return ticket;
+}
+
+void waiter_ticket_delete(struct waiter_ticket *ticket)
+{
+ struct waiter *w = ticket->waiter;
+ list_remove(&w->tickets, &ticket->list_item);
+ w->count--;
+ free(ticket);
+}
+
+void waiter_ticket_callback(struct waiter_ticket *ticket, waiter_ticket_cb_t cb_fn, void *data)
+{
+ ticket->callback.fn = cb_fn;
+ ticket->callback.data = data;
+}
+
+int waiter_ticket_check(const struct waiter_ticket *ticket)
+{
+ return -(ticket->updated == 0);
+}
+
+int waiter_ticket_clear(struct waiter_ticket *ticket)
+{
+ int ret;
+
+ ret = waiter_ticket_check(ticket);
+ ticket->updated = 0;
+
+ return ret;
+}
diff --git a/qcom/qrtr/src/waiter.h b/qcom/qrtr/src/waiter.h
new file mode 100644
index 0000000..e311453
--- /dev/null
+++ b/qcom/qrtr/src/waiter.h
@@ -0,0 +1,103 @@
+#ifndef _WAITER_H_
+#define _WAITER_H_
+
+/** Waiter type. */
+struct waiter;
+
+/** Create a new waiter.
+ * @return Newly created waiter on success, NULL on failure.
+ */
+struct waiter *waiter_create(void);
+
+/** Destroy existing waiter.
+ * @param w waiter to destroy.
+ */
+void waiter_destroy(struct waiter *w);
+
+/** Wait for next ticket.
+ * @param w waiter.
+ */
+void waiter_wait(struct waiter *w);
+
+/** Wait for next ticket or timeout.
+ * @param w waiter.
+ * @param ms timeout in milliseconds.
+ * @return 0 on ticket; !0 on timeout.
+ */
+int waiter_wait_timeout(struct waiter *w, unsigned int ms);
+
+/** Synchronize timer-based tickets.
+ * @param w waiter.
+ */
+void waiter_synchronize(struct waiter *w);
+
+/** Waiter ticket type. */
+struct waiter_ticket;
+
+/** Add a null wait ticket to pool.
+ * @param w waiter
+ * @return wait ticket on success; NULL on failure.
+ */
+struct waiter_ticket *waiter_add_null(struct waiter *w);
+
+/** Add a file descriptor to the pool.
+ * @param w waiter.
+ * @param fd file descriptor.
+ * @return wait ticket on success; NULL on failure.
+ */
+struct waiter_ticket *waiter_add_fd(struct waiter *w, int fd);
+
+/** Add a timeout to the pool.
+ * @param w waiter.
+ * @param ms duration of timeout in milliseconds.
+ * @return wait ticket on success; NULL on failure.
+ */
+struct waiter_ticket *waiter_add_timeout(struct waiter *w, unsigned int ms);
+
+/** Set ticket type to null.
+ * @param tkt wait ticket.
+ */
+void waiter_ticket_set_null(struct waiter_ticket *tkt);
+
+/** Set ticket type to file descriptor.
+ * @param tkt wait ticket.
+ * @param fd file descriptor.
+ */
+void waiter_ticket_set_fd(struct waiter_ticket *tkt, int fd);
+
+/** Set ticket type to timeout.
+ * @param tkt wait ticket.
+ * @param ms timeout in milliseconds.
+ */
+void waiter_ticket_set_timeout(struct waiter_ticket *tkt, unsigned int ms);
+
+/** Destroy ticket.
+ * @param tkt wait ticket.
+ */
+void waiter_ticket_delete(struct waiter_ticket *tkt);
+
+/** Check to see if ticket has triggered.
+ * @param tkt wait ticket.
+ * @return 0 if triggered, !0 otherwise.
+ */
+int waiter_ticket_check(const struct waiter_ticket *tkt);
+
+
+/** Clear ticket trigger status.
+ * @param tkt wait ticket.
+ * @return 0 if triggered, !0 otherwise.
+ */
+int waiter_ticket_clear(struct waiter_ticket *tkt);
+
+/** Wait ticket callback function type. */
+typedef void (* waiter_ticket_cb_t)(void *, struct waiter_ticket *);
+
+/** Register callback function for ticket trigger.
+ * @param tkt wait ticket.
+ * @param cb_fn callback function.
+ * @param data private data to pass to callback function.
+ */
+void waiter_ticket_callback(struct waiter_ticket *tkt,
+ waiter_ticket_cb_t cb_fn, void *data);
+
+#endif
diff --git a/qcom/rmtfs/Android.bp b/qcom/rmtfs/Android.bp
new file mode 100644
index 0000000..82cf7e1
--- /dev/null
+++ b/qcom/rmtfs/Android.bp
@@ -0,0 +1,32 @@
+package {
+ default_applicable_licenses: [
+ "device_linaro_dragonboard_qcom_rmtfs_license",
+ ],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "device_linaro_dragonboard_qcom_rmtfs_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "LICENSE",
+ ],
+}
+
+cc_binary {
+ name: "rmtfs",
+ vendor: true,
+ srcs: [
+ "qmi_rmtfs.c",
+ "rmtfs.c",
+ "rproc.c",
+ "sharedmem.c",
+ "storage.c",
+ "util.c",
+ ],
+ shared_libs: ["libqrtr"],
+}
diff --git a/qcom/rmtfs/LICENSE b/qcom/rmtfs/LICENSE
new file mode 100644
index 0000000..42c13e9
--- /dev/null
+++ b/qcom/rmtfs/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 2016, Linaro Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
diff --git a/qcom/rmtfs/Makefile b/qcom/rmtfs/Makefile
new file mode 100644
index 0000000..54ae35f
--- /dev/null
+++ b/qcom/rmtfs/Makefile
@@ -0,0 +1,27 @@
+OUT := rmtfs
+
+CFLAGS += -Wall -g -O2
+LDFLAGS += -lqrtr -ludev -lpthread
+prefix = /usr/local
+bindir := $(prefix)/bin
+servicedir := $(prefix)/lib/systemd/system
+
+SRCS := qmi_rmtfs.c rmtfs.c rproc.c sharedmem.c storage.c util.c
+OBJS := $(SRCS:.c=.o)
+
+$(OUT): $(OBJS)
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+%.c: %.qmi
+ qmic -k < $<
+
+rmtfs.service: rmtfs.service.in
+ @sed 's+RMTFS_PATH+$(bindir)+g' $< > $@
+
+install: $(OUT) rmtfs.service
+ @install -D -m 755 $(OUT) $(DESTDIR)$(prefix)/bin/$(OUT)
+ @install -D -m 644 rmtfs.service $(DESTDIR)$(servicedir)/rmtfs.service
+
+clean:
+ rm -f $(OUT) $(OBJS) rmtfs.service
+
diff --git a/qcom/rmtfs/qmi_rmtfs.c b/qcom/rmtfs/qmi_rmtfs.c
new file mode 100644
index 0000000..bda2b78
--- /dev/null
+++ b/qcom/rmtfs/qmi_rmtfs.c
@@ -0,0 +1,256 @@
+#include <errno.h>
+#include <string.h>
+#include "qmi_rmtfs.h"
+
+struct qmi_elem_info rmtfs_qmi_result_ei[] = {
+ {
+ .data_type = QMI_UNSIGNED_2_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint16_t),
+ .offset = offsetof(struct rmtfs_qmi_result, result),
+ },
+ {
+ .data_type = QMI_UNSIGNED_2_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint16_t),
+ .offset = offsetof(struct rmtfs_qmi_result, error),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_iovec_entry_ei[] = {
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .offset = offsetof(struct rmtfs_iovec_entry, sector_addr),
+ },
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .offset = offsetof(struct rmtfs_iovec_entry, phys_offset),
+ },
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .offset = offsetof(struct rmtfs_iovec_entry, num_sector),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_open_req_ei[] = {
+ {
+ .data_type = QMI_STRING,
+ .elem_len = 256,
+ .elem_size = sizeof(char),
+ .array_type = VAR_LEN_ARRAY,
+ .tlv_type = 1,
+ .offset = offsetof(struct rmtfs_open_req, path)
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_open_resp_ei[] = {
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 1,
+ .elem_size = sizeof(struct rmtfs_qmi_result),
+ .tlv_type = 2,
+ .offset = offsetof(struct rmtfs_open_resp, result),
+ .ei_array = rmtfs_qmi_result_ei,
+ },
+ {
+ .data_type = QMI_OPT_FLAG,
+ .elem_len = 1,
+ .elem_size = sizeof(bool),
+ .tlv_type = 16,
+ .offset = offsetof(struct rmtfs_open_resp, caller_id_valid),
+ },
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .tlv_type = 16,
+ .offset = offsetof(struct rmtfs_open_resp, caller_id),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_close_req_ei[] = {
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .tlv_type = 1,
+ .offset = offsetof(struct rmtfs_close_req, caller_id),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_close_resp_ei[] = {
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 1,
+ .elem_size = sizeof(struct rmtfs_qmi_result),
+ .tlv_type = 2,
+ .offset = offsetof(struct rmtfs_close_resp, result),
+ .ei_array = rmtfs_qmi_result_ei,
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_iovec_req_ei[] = {
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .tlv_type = 1,
+ .offset = offsetof(struct rmtfs_iovec_req, caller_id),
+ },
+ {
+ .data_type = QMI_UNSIGNED_1_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint8_t),
+ .tlv_type = 2,
+ .offset = offsetof(struct rmtfs_iovec_req, direction),
+ },
+ {
+ .data_type = QMI_DATA_LEN,
+ .elem_len = 1,
+ .elem_size = sizeof(uint8_t),
+ .tlv_type = 3,
+ .offset = offsetof(struct rmtfs_iovec_req, iovec_len),
+ },
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 255,
+ .elem_size = sizeof(struct rmtfs_iovec_entry),
+ .array_type = VAR_LEN_ARRAY,
+ .tlv_type = 3,
+ .offset = offsetof(struct rmtfs_iovec_req, iovec),
+ .ei_array = rmtfs_iovec_entry_ei,
+ },
+ {
+ .data_type = QMI_UNSIGNED_1_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint8_t),
+ .tlv_type = 4,
+ .offset = offsetof(struct rmtfs_iovec_req, is_force_sync),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_iovec_resp_ei[] = {
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 1,
+ .elem_size = sizeof(struct rmtfs_qmi_result),
+ .tlv_type = 2,
+ .offset = offsetof(struct rmtfs_iovec_resp, result),
+ .ei_array = rmtfs_qmi_result_ei,
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_alloc_buf_req_ei[] = {
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .tlv_type = 1,
+ .offset = offsetof(struct rmtfs_alloc_buf_req, caller_id),
+ },
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .tlv_type = 2,
+ .offset = offsetof(struct rmtfs_alloc_buf_req, buff_size),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_alloc_buf_resp_ei[] = {
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 1,
+ .elem_size = sizeof(struct rmtfs_qmi_result),
+ .tlv_type = 2,
+ .offset = offsetof(struct rmtfs_alloc_buf_resp, result),
+ .ei_array = rmtfs_qmi_result_ei,
+ },
+ {
+ .data_type = QMI_OPT_FLAG,
+ .elem_len = 1,
+ .elem_size = sizeof(bool),
+ .tlv_type = 16,
+ .offset = offsetof(struct rmtfs_alloc_buf_resp, buff_address_valid),
+ },
+ {
+ .data_type = QMI_UNSIGNED_8_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint64_t),
+ .tlv_type = 16,
+ .offset = offsetof(struct rmtfs_alloc_buf_resp, buff_address),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_dev_error_req_ei[] = {
+ {
+ .data_type = QMI_UNSIGNED_4_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint32_t),
+ .tlv_type = 1,
+ .offset = offsetof(struct rmtfs_dev_error_req, caller_id),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_dev_error_resp_ei[] = {
+ {
+ .data_type = QMI_STRUCT,
+ .elem_len = 1,
+ .elem_size = sizeof(struct rmtfs_qmi_result),
+ .tlv_type = 2,
+ .offset = offsetof(struct rmtfs_dev_error_resp, result),
+ .ei_array = rmtfs_qmi_result_ei,
+ },
+ {
+ .data_type = QMI_OPT_FLAG,
+ .elem_len = 1,
+ .elem_size = sizeof(bool),
+ .tlv_type = 16,
+ .offset = offsetof(struct rmtfs_dev_error_resp, status_valid),
+ },
+ {
+ .data_type = QMI_UNSIGNED_1_BYTE,
+ .elem_len = 1,
+ .elem_size = sizeof(uint8_t),
+ .tlv_type = 16,
+ .offset = offsetof(struct rmtfs_dev_error_resp, status),
+ },
+ {}
+};
+
+struct qmi_elem_info rmtfs_force_sync_ei[] = {
+ {
+ .data_type = QMI_DATA_LEN,
+ .elem_len = 1,
+ .elem_size = sizeof(uint8_t),
+ .tlv_type = 1,
+ .offset = offsetof(struct rmtfs_force_sync, caller_id_len),
+ },
+ {
+ .data_type = QMI_UNSIGNED_1_BYTE,
+ .elem_len = 10,
+ .elem_size = sizeof(uint32_t),
+ .array_type = VAR_LEN_ARRAY,
+ .tlv_type = 1,
+ .offset = offsetof(struct rmtfs_force_sync, caller_id),
+ },
+ {}
+};
+
diff --git a/qcom/rmtfs/qmi_rmtfs.h b/qcom/rmtfs/qmi_rmtfs.h
new file mode 100644
index 0000000..03cbc8f
--- /dev/null
+++ b/qcom/rmtfs/qmi_rmtfs.h
@@ -0,0 +1,101 @@
+#ifndef __QMI_RMTFS_H__
+#define __QMI_RMTFS_H__
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include "libqrtr.h"
+
+#define QMI_RMTFS_RESULT_SUCCESS 0
+#define QMI_RMTFS_RESULT_FAILURE 1
+#define QMI_RMTFS_ERR_NONE 0
+#define QMI_RMTFS_ERR_INTERNAL 1
+#define QMI_RMTFS_ERR_MALFORMED_MSG 2
+#define QMI_RMTFS_OPEN 1
+#define QMI_RMTFS_CLOSE 2
+#define QMI_RMTFS_RW_IOVEC 3
+#define QMI_RMTFS_ALLOC_BUFF 4
+#define QMI_RMTFS_GET_DEV_ERROR 5
+#define QMI_RMTFS_FORCE_SYNC_IND 6
+
+struct rmtfs_qmi_result {
+ uint16_t result;
+ uint16_t error;
+};
+
+struct rmtfs_iovec_entry {
+ uint32_t sector_addr;
+ uint32_t phys_offset;
+ uint32_t num_sector;
+};
+
+struct rmtfs_open_req {
+ uint32_t path_len;
+ char path[256];
+};
+
+struct rmtfs_open_resp {
+ struct rmtfs_qmi_result result;
+ bool caller_id_valid;
+ uint32_t caller_id;
+};
+
+struct rmtfs_close_req {
+ uint32_t caller_id;
+};
+
+struct rmtfs_close_resp {
+ struct rmtfs_qmi_result result;
+};
+
+struct rmtfs_iovec_req {
+ uint32_t caller_id;
+ uint8_t direction;
+ size_t iovec_len;
+ struct rmtfs_iovec_entry iovec[255];
+ uint8_t is_force_sync;
+};
+
+struct rmtfs_iovec_resp {
+ struct rmtfs_qmi_result result;
+};
+
+struct rmtfs_alloc_buf_req {
+ uint32_t caller_id;
+ uint32_t buff_size;
+};
+
+struct rmtfs_alloc_buf_resp {
+ struct rmtfs_qmi_result result;
+ bool buff_address_valid;
+ uint64_t buff_address;
+};
+
+struct rmtfs_dev_error_req {
+ uint32_t caller_id;
+};
+
+struct rmtfs_dev_error_resp {
+ struct rmtfs_qmi_result result;
+ bool status_valid;
+ uint8_t status;
+};
+
+struct rmtfs_force_sync {
+ size_t caller_id_len;
+ uint32_t caller_id[10];
+};
+
+extern struct qmi_elem_info rmtfs_open_req_ei[];
+extern struct qmi_elem_info rmtfs_open_resp_ei[];
+extern struct qmi_elem_info rmtfs_close_req_ei[];
+extern struct qmi_elem_info rmtfs_close_resp_ei[];
+extern struct qmi_elem_info rmtfs_iovec_req_ei[];
+extern struct qmi_elem_info rmtfs_iovec_resp_ei[];
+extern struct qmi_elem_info rmtfs_alloc_buf_req_ei[];
+extern struct qmi_elem_info rmtfs_alloc_buf_resp_ei[];
+extern struct qmi_elem_info rmtfs_dev_error_req_ei[];
+extern struct qmi_elem_info rmtfs_dev_error_resp_ei[];
+extern struct qmi_elem_info rmtfs_force_sync_ei[];
+
+#endif
diff --git a/qcom/rmtfs/qmi_rmtfs.qmi b/qcom/rmtfs/qmi_rmtfs.qmi
new file mode 100644
index 0000000..ca350d7
--- /dev/null
+++ b/qcom/rmtfs/qmi_rmtfs.qmi
@@ -0,0 +1,77 @@
+package rmtfs;
+
+const QMI_RMTFS_RESULT_SUCCESS = 0;
+const QMI_RMTFS_RESULT_FAILURE = 1;
+
+const QMI_RMTFS_ERR_NONE = 0;
+const QMI_RMTFS_ERR_INTERNAL = 1;
+const QMI_RMTFS_ERR_MALFORMED_MSG = 2;
+
+const QMI_RMTFS_OPEN = 1;
+const QMI_RMTFS_CLOSE = 2;
+const QMI_RMTFS_RW_IOVEC = 3;
+const QMI_RMTFS_ALLOC_BUFF = 4;
+const QMI_RMTFS_GET_DEV_ERROR = 5;
+const QMI_RMTFS_FORCE_SYNC_IND = 6;
+
+struct qmi_result {
+ u16 result;
+ u16 error;
+};
+
+struct iovec_entry {
+ u32 sector_addr;
+ u32 phys_offset;
+ u32 num_sector;
+};
+
+request open_req {
+ required string path = 1;
+} = 1;
+
+response open_resp {
+ required qmi_result result = 2;
+ optional u32 caller_id = 0x10;
+} = 1;
+
+request close_req {
+ required u32 caller_id = 1;
+} = 2;
+
+response close_resp {
+ required qmi_result result = 2;
+} = 2;
+
+request iovec_req {
+ required u32 caller_id = 1;
+ required u8 direction = 2;
+ required iovec_entry iovec(255) = 3;
+ required u8 is_force_sync = 4;
+} = 3;
+
+response iovec_resp {
+ required qmi_result result = 2;
+} = 3;
+
+request alloc_buf_req {
+ required u32 caller_id = 1;
+ required u32 buff_size = 2;
+} = 4;
+
+response alloc_buf_resp {
+ required qmi_result result = 2;
+ optional u64 buff_address = 0x10;
+} = 4;
+
+request dev_error_req {
+ required u32 caller_id = 1;
+} = 5;
+
+response dev_error_resp {
+ required qmi_result result = 2;
+ optional u8 status = 0x10;
+} = 5;
+
+indication force_sync {
+ required u32 caller_id(10) = 1;
+} = 6;
diff --git a/qcom/rmtfs/qmi_tlv.c b/qcom/rmtfs/qmi_tlv.c
new file mode 100644
index 0000000..c6d8207
--- /dev/null
+++ b/qcom/rmtfs/qmi_tlv.c
@@ -0,0 +1,233 @@
+#include <errno.h>
+#include <string.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+
+#include "qmi_rmtfs.h"
+
+struct qmi_packet {
+ uint8_t flags;
+ uint16_t txn_id;
+ uint16_t msg_id;
+ uint16_t msg_len;
+ uint8_t data[];
+} __attribute__((__packed__));
+
+struct qmi_tlv {
+ void *allocated;
+ void *buf;
+ size_t size;
+ int error;
+};
+
+struct qmi_tlv_item {
+ uint8_t key;
+ uint16_t len;
+ uint8_t data[];
+} __attribute__((__packed__));
+
+struct qmi_tlv *qmi_tlv_init(unsigned txn, unsigned msg_id, unsigned msg_type)
+{
+ struct qmi_packet *pkt;
+ struct qmi_tlv *tlv;
+
+ tlv = malloc(sizeof(struct qmi_tlv));
+ memset(tlv, 0, sizeof(struct qmi_tlv));
+
+ tlv->size = sizeof(struct qmi_packet);
+ tlv->allocated = malloc(tlv->size);
+ tlv->buf = tlv->allocated;
+
+ pkt = tlv->buf;
+ pkt->flags = msg_type;
+ pkt->txn_id = txn;
+ pkt->msg_id = msg_id;
+ pkt->msg_len = 0;
+
+ return tlv;
+}
+
+struct qmi_tlv *qmi_tlv_decode(void *buf, size_t len, unsigned *txn, unsigned msg_type)
+{
+ struct qmi_packet *pkt = buf;
+ struct qmi_tlv *tlv;
+
+ if (pkt->flags != msg_type)
+ return NULL;
+
+ tlv = malloc(sizeof(struct qmi_tlv));
+ memset(tlv, 0, sizeof(struct qmi_tlv));
+
+ tlv->buf = buf;
+ tlv->size = len;
+
+ if (txn)
+ *txn = pkt->txn_id;
+
+ return tlv;
+}
+
+void *qmi_tlv_encode(struct qmi_tlv *tlv, size_t *len)
+{
+
+ struct qmi_packet *pkt;
+
+ if (!tlv || tlv->error)
+ return NULL;
+
+ pkt = tlv->buf;
+ pkt->msg_len = tlv->size - sizeof(struct qmi_packet);
+
+ *len = tlv->size;
+ return tlv->buf;
+}
+
+void qmi_tlv_free(struct qmi_tlv *tlv)
+{
+ free(tlv->allocated);
+ free(tlv);
+}
+
+static struct qmi_tlv_item *qmi_tlv_get_item(struct qmi_tlv *tlv, unsigned id)
+{
+ struct qmi_tlv_item *item;
+ struct qmi_packet *pkt;
+ unsigned offset = 0;
+ void *pkt_data;
+
+ pkt = tlv->buf;
+ pkt_data = pkt->data;
+
+ while (offset < tlv->size) {
+ item = pkt_data + offset;
+ if (item->key == id)
+ return pkt_data + offset;
+
+ offset += sizeof(struct qmi_tlv_item) + item->len;
+ }
+ return NULL;
+}
+
+void *qmi_tlv_get(struct qmi_tlv *tlv, unsigned id, size_t *len)
+{
+ struct qmi_tlv_item *item;
+
+ item = qmi_tlv_get_item(tlv, id);
+ if (!item)
+ return NULL;
+
+ *len = item->len;
+ return item->data;
+}
+
+void *qmi_tlv_get_array(struct qmi_tlv *tlv, unsigned id, unsigned len_size, size_t *len, size_t *size)
+{
+ struct qmi_tlv_item *item;
+ unsigned count;
+ void *ptr;
+
+ item = qmi_tlv_get_item(tlv, id);
+ if (!item)
+ return NULL;
+
+ ptr = item->data;
+ switch (len_size) {
+ case 4:
+ count = *(uint32_t*)ptr++;
+ break;
+ case 2:
+ count = *(uint16_t*)ptr++;
+ break;
+ case 1:
+ count = *(uint8_t*)ptr++;
+ break;
+ }
+
+ *len = count;
+ *size = (item->len - len_size) / count;
+
+ return ptr;
+}
+
+static struct qmi_tlv_item *qmi_tlv_alloc_item(struct qmi_tlv *tlv, unsigned id, size_t len)
+{
+ struct qmi_tlv_item *item;
+ size_t new_size;
+ bool migrate;
+ void *newp;
+
+ /* If using user provided buffer, migrate data */
+ migrate = !tlv->allocated;
+
+ new_size = tlv->size + sizeof(struct qmi_tlv_item) + len;
+ newp = realloc(tlv->allocated, new_size);
+ if (!newp)
+ return NULL;
+
+ if (migrate)
+ memcpy(newp, tlv->buf, tlv->size);
+
+ item = newp + tlv->size;
+ item->key = id;
+ item->len = len;
+
+ tlv->buf = tlv->allocated = newp;
+ tlv->size = new_size;
+
+ return item;
+}
+
+int qmi_tlv_set(struct qmi_tlv *tlv, unsigned id, void *buf, size_t len)
+{
+ struct qmi_tlv_item *item;
+
+ if (!tlv)
+ return -EINVAL;
+
+ item = qmi_tlv_alloc_item(tlv, id, len);
+ if (!item) {
+ tlv->error = ENOMEM;
+ return -ENOMEM;
+ }
+
+ memcpy(item->data, buf, len);
+
+ return 0;
+}
+
+int qmi_tlv_set_array(struct qmi_tlv *tlv, unsigned id, unsigned len_size, void *buf, size_t len, size_t size)
+{
+ struct qmi_tlv_item *item;
+ size_t array_size;
+ void *ptr;
+
+ if (!tlv)
+ return -EINVAL;
+
+ array_size = len * size;
+ item = qmi_tlv_alloc_item(tlv, id, len_size + array_size);
+ if (!item) {
+ tlv->error = ENOMEM;
+ return -ENOMEM;
+ }
+
+ ptr = item->data;
+
+ switch (len_size) {
+ case 4:
+ *(uint32_t*)ptr++ = len;
+ break;
+ case 2:
+ *(uint16_t*)ptr++ = len;
+ break;
+ case 1:
+ *(uint8_t*)ptr++ = len;
+ break;
+ }
+ memcpy(ptr, buf, array_size);
+
+ return 0;
+}
+
+
diff --git a/qcom/rmtfs/rmtfs.c b/qcom/rmtfs/rmtfs.c
new file mode 100644
index 0000000..93965f1
--- /dev/null
+++ b/qcom/rmtfs/rmtfs.c
@@ -0,0 +1,568 @@
+#include <sys/mman.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <libqrtr.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "qmi_rmtfs.h"
+#include "util.h"
+#include "rmtfs.h"
+
+#define RMTFS_QMI_SERVICE 14
+#define RMTFS_QMI_VERSION 1
+#define RMTFS_QMI_INSTANCE 0
+
+static struct rmtfs_mem *rmem;
+static sig_atomic_t sig_int_count;
+
+static bool dbgprintf_enabled;
+static void dbgprintf(const char *fmt, ...)
+{
+ va_list ap;
+
+ if (!dbgprintf_enabled)
+ return;
+
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ va_end(ap);
+}
+
+static void qmi_result_error(struct rmtfs_qmi_result *result, unsigned error)
+{
+ /* Only propagate initial error */
+ if (result->result == QMI_RMTFS_RESULT_FAILURE)
+ return;
+
+ result->result = QMI_RMTFS_RESULT_FAILURE;
+ result->error = error;
+}
+
+static void rmtfs_open(int sock, const struct qrtr_packet *pkt)
+{
+ struct rmtfs_open_resp resp = {};
+ struct rmtfs_open_req req = {};
+ DEFINE_QRTR_PACKET(resp_buf, 256);
+ struct rmtfd *rmtfd;
+ unsigned int txn;
+ ssize_t len;
+ int caller_id = -1;
+ int ret;
+
+ ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST,
+ QMI_RMTFS_OPEN, rmtfs_open_req_ei);
+ if (ret < 0) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_MALFORMED_MSG);
+ goto respond;
+ }
+
+ rmtfd = storage_open(pkt->node, req.path);
+ if (!rmtfd) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_INTERNAL);
+ goto respond;
+ }
+
+ caller_id = storage_get_caller_id(rmtfd);
+ resp.caller_id = caller_id;
+ resp.caller_id_valid = true;
+
+respond:
+ dbgprintf("[RMTFS] open %s => %d (%d:%d)\n",
+ req.path, caller_id, resp.result.result, resp.result.error);
+
+ len = qmi_encode_message(&resp_buf,
+ QMI_RESPONSE, QMI_RMTFS_OPEN, txn, &resp,
+ rmtfs_open_resp_ei);
+ if (len < 0) {
+ fprintf(stderr, "[RMTFS] failed to encode open-response: %s\n",
+ strerror(-len));
+ return;
+ }
+
+ ret = qrtr_sendto(sock, pkt->node, pkt->port,
+ resp_buf.data, resp_buf.data_len);
+ if (ret < 0)
+ fprintf(stderr, "[RMTFS] failed to send open-response: %s\n",
+ strerror(-ret));
+}
+
+static void rmtfs_close(int sock, const struct qrtr_packet *pkt)
+{
+ struct rmtfs_close_resp resp = {};
+ struct rmtfs_close_req req = {};
+ DEFINE_QRTR_PACKET(resp_buf, 256);
+ struct rmtfd *rmtfd;
+ unsigned int txn;
+ ssize_t len;
+ int ret;
+
+ ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST,
+ QMI_RMTFS_CLOSE, rmtfs_close_req_ei);
+ if (ret < 0) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_MALFORMED_MSG);
+ goto respond;
+ }
+
+ rmtfd = storage_get(pkt->node, req.caller_id);
+ if (!rmtfd) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_INTERNAL);
+ goto respond;
+ }
+
+ storage_close(rmtfd);
+ rmtfs_mem_free(rmem);
+
+respond:
+ dbgprintf("[RMTFS] close %s => %d (%d:%d)\n",
+ req.caller_id, resp.result.result, resp.result.error);
+
+ len = qmi_encode_message(&resp_buf,
+ QMI_RESPONSE, QMI_RMTFS_CLOSE, txn, &resp,
+ rmtfs_close_resp_ei);
+ if (len < 0) {
+ fprintf(stderr, "[RMTFS] failed to encode close-response: %s\n",
+ strerror(-len));
+ return;
+ }
+
+ ret = qrtr_sendto(sock, pkt->node, pkt->port,
+ resp_buf.data, resp_buf.data_len);
+ if (ret < 0)
+ fprintf(stderr, "[RMTFS] failed to send close-response: %s\n",
+ strerror(-ret));
+}
+
+static void rmtfs_iovec(int sock, struct qrtr_packet *pkt)
+{
+ struct rmtfs_iovec_entry *entries;
+ struct rmtfs_iovec_resp resp = {};
+ struct rmtfs_iovec_req req = {};
+ DEFINE_QRTR_PACKET(resp_buf, 256);
+ struct rmtfd *rmtfd;
+ uint32_t caller_id = 0;
+ size_t num_entries = 0;
+ off_t sector_base;
+ uint8_t is_write;
+ off_t phys_base;
+ uint8_t force = 0;
+ unsigned txn;
+ off_t offset;
+ ssize_t len;
+ ssize_t n;
+ char buf[SECTOR_SIZE];
+ int ret;
+ int i;
+ int j;
+
+ ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST,
+ QMI_RMTFS_RW_IOVEC, rmtfs_iovec_req_ei);
+ if (ret < 0) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_MALFORMED_MSG);
+ goto respond;
+ }
+
+ caller_id = req.caller_id;
+ is_write = req.direction;
+ entries = req.iovec;
+ num_entries = req.iovec_len;
+ force = req.is_force_sync;
+
+ rmtfd = storage_get(pkt->node, caller_id);
+ if (!rmtfd) {
+ fprintf(stderr, "[RMTFS] iovec request for non-existing caller\n");
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_INTERNAL);
+ goto respond;
+ }
+
+ for (i = 0; i < num_entries; i++) {
+ phys_base = entries[i].phys_offset;
+ sector_base = entries[i].sector_addr * SECTOR_SIZE;
+ offset = 0;
+
+ for (j = 0; j < entries[i].num_sector; j++) {
+ if (is_write) {
+ n = rmtfs_mem_read(rmem, phys_base + offset, buf, SECTOR_SIZE);
+ if (n == SECTOR_SIZE)
+ n = storage_pwrite(rmtfd, buf, n, sector_base + offset);
+ } else {
+ n = storage_pread(rmtfd, buf, SECTOR_SIZE, sector_base + offset);
+ if (n >= 0) {
+ if (n < SECTOR_SIZE)
+ memset(buf + n, 0, SECTOR_SIZE - n);
+ n = rmtfs_mem_write(rmem, phys_base + offset, buf, SECTOR_SIZE);
+ }
+ }
+
+ if (n != SECTOR_SIZE) {
+ fprintf(stderr, "[RMTFS] failed to %s sector %d\n",
+ is_write ? "write" : "read", entries[i].sector_addr + j);
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_INTERNAL);
+ goto respond;
+ }
+
+ offset += SECTOR_SIZE;
+ }
+ }
+
+respond:
+ dbgprintf("[RMTFS] iovec %d, %sforced => (%d:%d)\n", caller_id, force ? "" : "not ",
+ resp.result.result, resp.result.error);
+ for (i = 0; i < num_entries; i++) {
+ dbgprintf("[RMTFS] %s %d:%d 0x%x\n", is_write ? "write" : "read",
+ entries[i].sector_addr,
+ entries[i].num_sector,
+ entries[i].phys_offset);
+ }
+
+ len = qmi_encode_message(&resp_buf,
+ QMI_RESPONSE, QMI_RMTFS_RW_IOVEC, txn, &resp,
+ rmtfs_iovec_resp_ei);
+ if (len < 0) {
+ fprintf(stderr, "[RMTFS] failed to encode iovec-response: %s\n",
+ strerror(-len));
+ return;
+ }
+
+ ret = qrtr_sendto(sock, pkt->node, pkt->port,
+ resp_buf.data, resp_buf.data_len);
+ if (ret < 0)
+ fprintf(stderr, "[RMTFS] failed to send iovec-response: %s\n",
+ strerror(-ret));
+}
+
+static void rmtfs_alloc_buf(int sock, struct qrtr_packet *pkt)
+{
+ struct rmtfs_alloc_buf_resp resp = {};
+ struct rmtfs_alloc_buf_req req = {};
+ DEFINE_QRTR_PACKET(resp_buf, 256);
+ uint32_t alloc_size = 0;
+ uint32_t caller_id = 0;
+ int64_t address = 0;
+ unsigned txn;
+ ssize_t len;
+ int ret;
+
+ ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST,
+ QMI_RMTFS_ALLOC_BUFF, rmtfs_alloc_buf_req_ei);
+ if (ret < 0) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_MALFORMED_MSG);
+ goto respond;
+ }
+
+ caller_id = req.caller_id;
+ alloc_size = req.buff_size;
+
+ address = rmtfs_mem_alloc(rmem, alloc_size);
+ if (address < 0) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_INTERNAL);
+ goto respond;
+ }
+
+ resp.buff_address = address;
+ resp.buff_address_valid = true;
+respond:
+ dbgprintf("[RMTFS] alloc %d, %d => 0x%lx (%d:%d)\n", caller_id, alloc_size, address, resp.result.result, resp.result.error);
+
+ len = qmi_encode_message(&resp_buf,
+ QMI_RESPONSE, QMI_RMTFS_ALLOC_BUFF, txn, &resp,
+ rmtfs_alloc_buf_resp_ei);
+ if (len < 0) {
+ fprintf(stderr, "[RMTFS] failed to encode alloc-buf-response: %s\n",
+ strerror(-len));
+ return;
+ }
+
+ ret = qrtr_sendto(sock, pkt->node, pkt->port,
+ resp_buf.data, resp_buf.data_len);
+ if (ret < 0)
+ fprintf(stderr, "[RMTFS] failed to send alloc-buf-response: %s\n",
+ strerror(-ret));
+}
+
+static void rmtfs_get_dev_error(int sock, struct qrtr_packet *pkt)
+{
+ struct rmtfs_dev_error_resp resp = {};
+ struct rmtfs_dev_error_req req = {};
+ DEFINE_QRTR_PACKET(resp_buf, 256);
+ struct rmtfd *rmtfd;
+ unsigned txn;
+ ssize_t len;
+ int ret;
+
+ ret = qmi_decode_message(&req, &txn, pkt, QMI_REQUEST,
+ QMI_RMTFS_GET_DEV_ERROR,
+ rmtfs_dev_error_req_ei);
+ if (ret < 0) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_MALFORMED_MSG);
+ goto respond;
+ }
+
+ rmtfd = storage_get(pkt->node, req.caller_id);
+ if (rmtfd) {
+ qmi_result_error(&resp.result, QMI_RMTFS_ERR_INTERNAL);
+ goto respond;
+ }
+
+ resp.status = storage_get_error(rmtfd);
+ resp.status_valid = true;
+
+respond:
+ dbgprintf("[RMTFS] dev_error %d => %d (%d:%d)\n", req.caller_id, resp.status, resp.result.result, resp.result.error);
+
+ len = qmi_encode_message(&resp_buf,
+ QMI_RESPONSE, QMI_RMTFS_GET_DEV_ERROR, txn,
+ &resp, rmtfs_dev_error_resp_ei);
+ if (len < 0) {
+ fprintf(stderr, "[RMTFS] failed to encode dev-error-response: %s\n",
+ strerror(-len));
+ return;
+ }
+
+ ret = qrtr_sendto(sock, pkt->node, pkt->port,
+ resp_buf.data, resp_buf.data_len);
+ if (ret < 0)
+ fprintf(stderr, "[RMTFS] failed to send dev-error-response: %s\n",
+ strerror(-ret));
+}
+
+static int rmtfs_bye(uint32_t node)
+{
+ dbgprintf("[RMTFS] bye from %d\n", node);
+
+ return 0;
+}
+
+static int rmtfs_del_client(uint32_t node, uint32_t port)
+{
+ dbgprintf("[RMTFS] del_client %d:%d\n", node, port);
+
+ return 0;
+}
+
+static int handle_rmtfs(int sock)
+{
+ struct sockaddr_qrtr sq;
+ struct qrtr_packet pkt;
+ unsigned int msg_id;
+ socklen_t sl;
+ char buf[4096];
+ int ret;
+
+ sl = sizeof(sq);
+ ret = recvfrom(sock, buf, sizeof(buf), 0, (void *)&sq, &sl);
+ if (ret < 0) {
+ ret = -errno;
+ if (ret != -ENETRESET)
+ fprintf(stderr, "[RMTFS] recvfrom failed: %d\n", ret);
+ return ret;
+ }
+
+ dbgprintf("[RMTFS] packet; from: %d:%d\n", sq.sq_node, sq.sq_port);
+
+ ret = qrtr_decode(&pkt, buf, ret, &sq);
+ if (ret < 0) {
+ fprintf(stderr, "[RMTFS] unable to decode qrtr packet\n");
+ return ret;
+ }
+
+ switch (pkt.type) {
+ case QRTR_TYPE_BYE:
+ return rmtfs_bye(pkt.node);
+ case QRTR_TYPE_DEL_CLIENT:
+ return rmtfs_del_client(pkt.node, pkt.port);
+ case QRTR_TYPE_DATA:
+ ret = qmi_decode_header(&pkt, &msg_id);
+ if (ret < 0)
+ return ret;
+
+ switch (msg_id) {
+ case QMI_RMTFS_OPEN:
+ rmtfs_open(sock, &pkt);
+ break;
+ case QMI_RMTFS_CLOSE:
+ rmtfs_close(sock, &pkt);
+ break;
+ case QMI_RMTFS_RW_IOVEC:
+ rmtfs_iovec(sock, &pkt);
+ break;
+ case QMI_RMTFS_ALLOC_BUFF:
+ rmtfs_alloc_buf(sock, &pkt);
+ break;
+ case QMI_RMTFS_GET_DEV_ERROR:
+ rmtfs_get_dev_error(sock, &pkt);
+ break;
+ default:
+ fprintf(stderr, "[RMTFS] Unknown request: %d\n", msg_id);
+ break;
+ }
+
+ return 0;
+ }
+
+ return ret;
+}
+
+static int sig_int_count;
+
+static int run_rmtfs(int rprocfd)
+{
+ bool sig_int_handled = false;
+ int rmtfs_fd;
+ fd_set rfds;
+ char done;
+ int nfds;
+ int ret;
+
+ rmtfs_fd = qrtr_open(RMTFS_QMI_SERVICE);
+ if (rmtfs_fd < 0) {
+ fprintf(stderr, "failed to create qrtr socket\n");
+ return rmtfs_fd;
+ }
+
+ dbgprintf("registering services\n");
+
+ ret = qrtr_publish(rmtfs_fd, RMTFS_QMI_SERVICE,
+ RMTFS_QMI_VERSION, RMTFS_QMI_INSTANCE);
+ if (ret < 0) {
+ fprintf(stderr, "failed to publish rmtfs service");
+ return ret;
+ }
+
+ if (rprocfd >= 0)
+ rproc_start();
+
+ for (;;) {
+ if (rprocfd >= 0 && sig_int_count == 1 && !sig_int_handled) {
+ rproc_stop();
+ sig_int_handled = true;
+ } else if (sig_int_count > 1) {
+ break;
+ }
+
+ FD_ZERO(&rfds);
+ FD_SET(rmtfs_fd, &rfds);
+ if (rprocfd >= 0)
+ FD_SET(rprocfd, &rfds);
+ nfds = MAX(rmtfs_fd, rprocfd) + 1;
+
+ ret = select(nfds, &rfds, NULL, NULL, NULL);
+ if (ret < 0 && errno != EINTR)
+ break;
+ else if (ret < 0 && errno == EINTR)
+ continue;
+
+ if (rprocfd >= 0 && FD_ISSET(rprocfd, &rfds)) {
+ ret = read(rprocfd, &done, 1);
+ if (!ret || done == 'Y')
+ break;
+ }
+
+ if (FD_ISSET(rmtfs_fd, &rfds)) {
+ ret = handle_rmtfs(rmtfs_fd);
+ if (ret == -ENETRESET)
+ break;
+ }
+ }
+
+ close(rmtfs_fd);
+
+ return ret;
+}
+
+static void sig_int_handler(int signo __unused)
+{
+ sig_int_count++;
+}
+
+int main(int argc, char **argv)
+{
+ struct sigaction action;
+ bool use_partitions = false;
+ bool read_only = false;
+ int rprocfd = -1;
+ int ret;
+ int option;
+ const char *storage_root = NULL;
+
+ while ((option = getopt(argc, argv, "o:Prsv")) != -1) {
+ switch (option) {
+ /*
+ * -o sets the directory where EFS images are stored,
+ * or sets the directory from where raw EFS partitions
+ * can be picked by-name when used with -P option.
+ */
+ case 'o':
+ storage_root = optarg;
+ break;
+
+ /* -P to find and use raw EFS partitions */
+ case 'P':
+ use_partitions = true;
+ break;
+
+ /* -r to avoid writing to storage */
+ case 'r':
+ read_only = true;
+ break;
+
+ /* enable sync for the mss rproc instance */
+ case 's':
+ rprocfd = rproc_init();
+ if (rprocfd < 0) {
+ fprintf(stderr, "Failed to get rprocfd\n");
+ return 1;
+ }
+
+ break;
+
+ /* -v is for verbose */
+ case 'v':
+ dbgprintf_enabled = 1;
+ break;
+
+ case '?':
+ fprintf(stderr, "Unknown option: -%c\n", option);
+ return 1;
+ }
+ }
+
+ sigemptyset(&action.sa_mask);
+ action.sa_handler = sig_int_handler;
+ action.sa_flags = 0;
+
+ sigaction(SIGINT, &action, NULL);
+ sigaction(SIGTERM, &action, NULL);
+
+ rmem = rmtfs_mem_open();
+ if (!rmem)
+ return 1;
+
+ ret = storage_init(storage_root, read_only, use_partitions);
+ if (ret) {
+ fprintf(stderr, "failed to initialize storage system\n");
+ goto close_rmtfs_mem;
+ }
+
+ do {
+ ret = run_rmtfs(rprocfd);
+ } while (ret == -ENETRESET);
+
+ storage_exit();
+close_rmtfs_mem:
+ rmtfs_mem_close(rmem);
+
+ return 0;
+}
diff --git a/qcom/rmtfs/rmtfs.h b/qcom/rmtfs/rmtfs.h
new file mode 100644
index 0000000..242baa5
--- /dev/null
+++ b/qcom/rmtfs/rmtfs.h
@@ -0,0 +1,42 @@
+#ifndef __RMTFS_H__
+#define __RMTFS_H__
+
+#include <stdint.h>
+#include "qmi_rmtfs.h"
+
+#define SECTOR_SIZE 512
+
+struct qmi_packet {
+ uint8_t flags;
+ uint16_t txn_id;
+ uint16_t msg_id;
+ uint16_t msg_len;
+ uint8_t data[];
+} __attribute__((__packed__));
+
+struct rmtfs_mem;
+
+struct rmtfs_mem *rmtfs_mem_open(void);
+void rmtfs_mem_close(struct rmtfs_mem *rmem);
+int64_t rmtfs_mem_alloc(struct rmtfs_mem *rmem, size_t size);
+void rmtfs_mem_free(struct rmtfs_mem *rmem);
+ssize_t rmtfs_mem_read(struct rmtfs_mem *rmem, unsigned long phys_address, void *buf, ssize_t len);
+ssize_t rmtfs_mem_write(struct rmtfs_mem *rmem, unsigned long phys_address, const void *buf, ssize_t len);
+
+struct rmtfd;
+
+int storage_init(const char *storage_root, bool read_only, bool use_partitions);
+struct rmtfd *storage_open(unsigned node, const char *path);
+struct rmtfd *storage_get(unsigned node, int caller_id);
+void storage_close(struct rmtfd *rmtfd);
+int storage_get_caller_id(const struct rmtfd *rmtfd);
+int storage_get_error(const struct rmtfd *rmtfd);
+void storage_exit(void);
+ssize_t storage_pread(const struct rmtfd *rmtfd, void *buf, size_t nbyte, off_t offset);
+ssize_t storage_pwrite(struct rmtfd *rmtfd, const void *buf, size_t nbyte, off_t offset);
+
+int rproc_init(void);
+int rproc_start(void);
+int rproc_stop(void);
+
+#endif
diff --git a/qcom/rmtfs/rmtfs.service.in b/qcom/rmtfs/rmtfs.service.in
new file mode 100644
index 0000000..8384043
--- /dev/null
+++ b/qcom/rmtfs/rmtfs.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=Qualcomm remotefs service
+Requires=qrtr-ns.service
+After=qrtr-ns.service
+
+[Service]
+ExecStart=RMTFS_PATH/rmtfs -r -P -s
+Restart=always
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/qcom/rmtfs/rproc.c b/qcom/rmtfs/rproc.c
new file mode 100644
index 0000000..95b45cb
--- /dev/null
+++ b/qcom/rmtfs/rproc.c
@@ -0,0 +1,137 @@
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "rmtfs.h"
+
+#define RPROC_BASE_PATH "/sys/bus/platform/drivers/qcom-q6v5-mss/"
+
+static pthread_t start_thread;
+static pthread_t stop_thread;
+static int rproc_state_fd;
+static int rproc_pipe[2];
+
+int rproc_init(void)
+{
+ struct dirent *device_de;
+ struct dirent *rproc_de;
+ int rproc_base_fd;
+ DIR *rproc_dir;
+ DIR *base_dir;
+ int device_fd;
+ int rproc_fd;
+ int base_fd;
+ int ret;
+
+ rproc_state_fd = -1;
+
+ base_fd = open(RPROC_BASE_PATH, O_RDONLY | O_DIRECTORY);
+ if (base_fd < 0)
+ return -1;
+
+ base_dir = fdopendir(base_fd);
+ if (!base_dir) {
+ fprintf(stderr, "failed to open mss driver path\n");
+ close(base_fd);
+ return -1;
+ }
+
+ while (rproc_state_fd < 0 && (device_de = readdir(base_dir)) != NULL) {
+ if (!strcmp(device_de->d_name, ".") ||
+ !strcmp(device_de->d_name, ".."))
+ continue;
+
+ device_fd = openat(base_fd, device_de->d_name, O_RDONLY | O_DIRECTORY);
+ if (device_fd < 0)
+ continue;
+
+ rproc_base_fd = openat(device_fd, "remoteproc", O_RDONLY | O_DIRECTORY);
+ if (rproc_base_fd < 0) {
+ close(device_fd);
+ continue;
+ }
+
+ rproc_dir = fdopendir(rproc_base_fd);
+ while (rproc_state_fd < 0 && (rproc_de = readdir(rproc_dir)) != NULL) {
+ if (!strcmp(rproc_de->d_name, ".") ||
+ !strcmp(rproc_de->d_name, ".."))
+ continue;
+
+ rproc_fd = openat(rproc_base_fd, rproc_de->d_name, O_RDONLY | O_DIRECTORY);
+ if (rproc_fd < 0)
+ continue;
+
+ rproc_state_fd = openat(rproc_fd, "state", O_WRONLY);
+ if (rproc_state_fd < 0) {
+ fprintf(stderr,
+ "unable to open remoteproc \"state\" control file of %s\n",
+ device_de->d_name);
+ }
+
+ close(rproc_fd);
+
+ }
+ closedir(rproc_dir);
+ close(rproc_base_fd);
+ close(device_fd);
+ }
+ closedir(base_dir);
+ close(base_fd);
+
+ if (rproc_state_fd < 0)
+ return -1;
+
+ ret = pipe(rproc_pipe);
+ if (ret < 0) {
+ close(rproc_state_fd);
+ return -1;
+ }
+
+ return rproc_pipe[0];
+}
+
+static void *do_rproc_start(void *unused __unused)
+{
+ ssize_t ret;
+
+ ret = pwrite(rproc_state_fd, "start", 5, 0);
+ if (ret < 4)
+ fprintf(stderr, "failed to update start state\n");
+
+ return NULL;
+}
+
+int rproc_start()
+{
+ return pthread_create(&start_thread, NULL, do_rproc_start, NULL);
+}
+
+static void *do_rproc_stop(void *unused __unused)
+{
+ ssize_t ret;
+
+ ret = pwrite(rproc_state_fd, "stop", 4, 0);
+ if (ret < 4)
+ fprintf(stderr, "failed to update stop state\n");
+
+ ret = write(rproc_pipe[1], "Y", 1);
+ if (ret != 1) {
+ fprintf(stderr, "failed to signal event loop about exit\n");
+ exit(0);
+ }
+
+ return NULL;
+}
+
+int rproc_stop(void)
+{
+ return pthread_create(&stop_thread, NULL, do_rproc_stop, NULL);
+}
diff --git a/qcom/rmtfs/sharedmem.c b/qcom/rmtfs/sharedmem.c
new file mode 100644
index 0000000..b6d3279
--- /dev/null
+++ b/qcom/rmtfs/sharedmem.c
@@ -0,0 +1,468 @@
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#ifndef ANDROID
+#include <libudev.h>
+#else
+#include <sys/endian.h>
+#endif
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <string.h>
+#include <unistd.h>
+#include "rmtfs.h"
+
+static int rmtfs_mem_enumerate(struct rmtfs_mem *rmem);
+
+struct rmtfs_mem {
+ uint64_t address;
+ uint64_t size;
+ void *base;
+ int fd;
+};
+
+#ifndef ANDROID
+
+static int parse_hex_sysattr(struct udev_device *dev, const char *name,
+ uint64_t *value)
+{
+ unsigned long long val;
+ const char *buf;
+ char *endptr;
+
+ buf = udev_device_get_sysattr_value(dev, name);
+ if (!buf)
+ return -ENOENT;
+
+ errno = 0;
+ val = strtoull(buf, &endptr, 16);
+ if ((val == ULLONG_MAX && errno == ERANGE) || endptr == buf) {
+ return -errno;
+ }
+
+ *value = val;
+
+ return 0;
+}
+
+static int rmtfs_mem_open_rfsa(struct rmtfs_mem *rmem, int client_id)
+{
+ struct udev_device *dev;
+ struct udev *udev;
+ int saved_errno;
+ struct stat sb;
+ char path[32];
+ int ret;
+ int fd;
+
+ sprintf(path, "/dev/qcom_rmtfs_mem%d", client_id);
+
+ fd = open(path, O_RDWR);
+ if (fd < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to open %s: %s\n", path, strerror(errno));
+ return -saved_errno;
+ }
+ rmem->fd = fd;
+
+ ret = fstat(fd, &sb);
+ if (ret < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to stat %s: %s\n", path, strerror(errno));
+ close(fd);
+ goto err_close_fd;
+ }
+
+ udev = udev_new();
+ if (!udev) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to create udev context\n");
+ goto err_close_fd;
+ }
+
+ dev = udev_device_new_from_devnum(udev, 'c', sb.st_rdev);
+ if (!dev) {
+ saved_errno = errno;
+ fprintf(stderr, "unable to find udev device\n");
+ goto err_unref_udev;
+ }
+
+ ret = parse_hex_sysattr(dev, "phys_addr", &rmem->address);
+ if (ret < 0) {
+ fprintf(stderr, "failed to parse phys_addr of %s\n", path);
+ saved_errno = -ret;
+ goto err_unref_dev;
+ }
+
+ ret = parse_hex_sysattr(dev, "size", &rmem->size);
+ if (ret < 0) {
+ fprintf(stderr, "failed to parse size of %s\n", path);
+ saved_errno = -ret;
+ goto err_unref_dev;
+ }
+
+ udev_device_unref(dev);
+ udev_unref(udev);
+
+ return 0;
+
+err_unref_dev:
+ udev_device_unref(dev);
+err_unref_udev:
+ udev_unref(udev);
+err_close_fd:
+ close(fd);
+ return -saved_errno;
+}
+
+static int rmtfs_mem_open_uio(struct rmtfs_mem *rmem, int client_id)
+{
+ struct udev_device *dev;
+ struct udev *udev;
+ int saved_errno;
+ struct stat sb;
+ char path[32];
+ int ret;
+ int fd;
+
+ snprintf(path, sizeof(path), "/dev/qcom_rmtfs_uio%d", client_id);
+
+ fd = open(path, O_RDWR);
+ if (fd < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to open %s: %s\n", path, strerror(errno));
+ return -saved_errno;
+ }
+ rmem->fd = fd;
+
+ ret = fstat(fd, &sb);
+ if (ret < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to stat %s: %s\n", path, strerror(errno));
+ close(fd);
+ goto err_close_fd;
+ }
+
+ udev = udev_new();
+ if (!udev) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to create udev context\n");
+ goto err_close_fd;
+ }
+
+ dev = udev_device_new_from_devnum(udev, 'c', sb.st_rdev);
+ if (!dev) {
+ saved_errno = errno;
+ fprintf(stderr, "unable to find udev device\n");
+ goto err_unref_udev;
+ }
+
+ ret = parse_hex_sysattr(dev, "maps/map0/addr", &rmem->address);
+ if (ret < 0) {
+ fprintf(stderr, "failed to parse phys_addr of %s\n", path);
+ saved_errno = -ret;
+ goto err_unref_dev;
+ }
+
+ ret = parse_hex_sysattr(dev, "maps/map0/size", &rmem->size);
+ if (ret < 0) {
+ fprintf(stderr, "failed to parse size of %s\n", path);
+ saved_errno = -ret;
+ goto err_unref_dev;
+ }
+
+ rmem->base = mmap(0, rmem->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+ if (rmem->base == MAP_FAILED) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to mmap: %s\n", strerror(errno));
+ goto err_unref_dev;
+ }
+
+ udev_device_unref(dev);
+ udev_unref(udev);
+
+ return 0;
+
+err_unref_dev:
+ udev_device_unref(dev);
+err_unref_udev:
+ udev_unref(udev);
+err_close_fd:
+ close(fd);
+ return -saved_errno;
+}
+
+#else
+
+#define PAGE_SIZE 4096
+
+static int rmtfs_mem_open_rfsa(struct rmtfs_mem *rmem, int client_id)
+{
+ int saved_errno;
+ int fd;
+ char path[PATH_MAX];
+ char val[PAGE_SIZE];
+ char *endptr;
+
+ errno = 0;
+
+ snprintf(path, sizeof(path), "/dev/qcom_rmtfs_mem%d", client_id);
+ rmem->fd = open(path, O_RDWR);
+ if (rmem->fd < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to open %s: %s\n", path, strerror(errno));
+ return -saved_errno;
+ }
+
+ snprintf(path, sizeof(path), "/sys/class/rmtfs/qcom_rmtfs_mem%d/phys_addr", client_id);
+ fd = open(path, O_RDONLY);
+ if (fd < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to open %s: %s\n", path, strerror(errno));
+ return -saved_errno;
+ }
+ read(fd, val, sizeof(val));
+ rmem->address = strtoull(val, &endptr, 16);
+ if ((rmem->address == ULLONG_MAX && errno == ERANGE) || endptr == val) {
+ saved_errno = errno;
+ goto err_close_fd;
+ }
+ close(fd);
+
+ snprintf(path, sizeof(path), "/sys/class/rmtfs/qcom_rmtfs_mem%d/size", client_id);
+ fd = open(path, O_RDONLY);
+ if (fd < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "failed to open %s: %s\n", path, strerror(errno));
+ return -saved_errno;
+ }
+ read(fd, val, sizeof(val));
+ rmem->size = strtoull(val, &endptr, 16);
+ if ((rmem->size == ULLONG_MAX && errno == ERANGE) || endptr == val) {
+ saved_errno = errno;
+ goto err_close_fd;
+ }
+ close(fd);
+
+ return 0;
+
+err_close_fd:
+ close(fd);
+ return -saved_errno;
+}
+
+static int rmtfs_mem_open_uio(struct rmtfs_mem *rmem __unused, int client_id __unused)
+{
+ fprintf(stderr, "uio access is not supported on ANDROID yet\n");
+ return -EINVAL;
+}
+
+#endif
+
+struct rmtfs_mem *rmtfs_mem_open(void)
+{
+ struct rmtfs_mem *rmem;
+ void *base;
+ int ret;
+ int fd;
+
+ rmem = malloc(sizeof(*rmem));
+ if (!rmem)
+ return NULL;
+
+ memset(rmem, 0, sizeof(*rmem));
+
+ ret = rmtfs_mem_open_rfsa(rmem, 1);
+ if (ret < 0 && ret != -ENOENT) {
+ goto err;
+ } else if (ret < 0) {
+ fprintf(stderr, "falling back to uio access\n");
+ ret = rmtfs_mem_open_uio(rmem, 1);
+ if (ret < 0 && ret != -ENOENT) {
+ goto err;
+ } else if (ret < 0) {
+ fprintf(stderr, "falling back to /dev/mem access\n");
+
+ ret = rmtfs_mem_enumerate(rmem);
+ if (ret < 0)
+ goto err;
+
+ fd = open("/dev/mem", O_RDWR|O_SYNC);
+ if (fd < 0) {
+ fprintf(stderr, "failed to open /dev/mem\n");
+ goto err;
+ }
+
+ base = mmap(0, rmem->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, rmem->address);
+ if (base == MAP_FAILED) {
+ fprintf(stderr, "failed to mmap: %s\n", strerror(errno));
+ goto err_close_fd;
+ }
+
+ rmem->base = base;
+ rmem->fd = fd;
+ }
+ }
+
+ return rmem;
+
+err_close_fd:
+ close(fd);
+err:
+ free(rmem);
+ return NULL;
+}
+
+int64_t rmtfs_mem_alloc(struct rmtfs_mem *rmem, size_t alloc_size)
+{
+ if (alloc_size > rmem->size) {
+ fprintf(stderr,
+ "[RMTFS] rmtfs shared memory not large enough for allocation request 0x%zx vs 0x%lx\n",
+ alloc_size, rmem->size);
+ return -EINVAL;
+ }
+
+ return rmem->address;
+}
+
+void rmtfs_mem_free(struct rmtfs_mem *rmem __unused)
+{
+}
+
+static void *rmtfs_mem_ptr(struct rmtfs_mem *rmem, unsigned long phys_address, ssize_t len)
+{
+ uint64_t start;
+ uint64_t end;
+
+ if (len < 0)
+ return NULL;
+
+ start = phys_address;
+ end = start + len;
+
+ if (start < rmem->address || end > rmem->address + rmem->size)
+ return NULL;
+
+ return (char*)rmem->base + phys_address - rmem->address;
+}
+
+ssize_t rmtfs_mem_read(struct rmtfs_mem *rmem, unsigned long phys_address, void *buf, ssize_t len)
+{
+ off_t offset;
+ void *ptr;
+
+ if (rmem->base) {
+ ptr = rmtfs_mem_ptr(rmem, phys_address, len);
+ if (!ptr)
+ return -EINVAL;
+
+ memcpy(buf, ptr, len);
+ } else {
+ offset = phys_address - rmem->address;
+ len = pread(rmem->fd, buf, len, offset);
+ }
+
+ return len;
+}
+
+ssize_t rmtfs_mem_write(struct rmtfs_mem *rmem, unsigned long phys_address, const void *buf, ssize_t len)
+{
+ off_t offset;
+ void *ptr;
+
+ if (rmem->base) {
+ ptr = rmtfs_mem_ptr(rmem, phys_address, len);
+ if (!ptr)
+ return -EINVAL;
+
+ memcpy(ptr, buf, len);
+ } else {
+ offset = phys_address - rmem->address;
+ len = pwrite(rmem->fd, buf, len, offset);
+ }
+
+ return len;
+}
+
+void rmtfs_mem_close(struct rmtfs_mem *rmem)
+{
+ if (rmem->base)
+ munmap(rmem->base, rmem->size);
+
+ close(rmem->fd);
+
+ free(rmem);
+}
+
+static int rmtfs_mem_enumerate(struct rmtfs_mem *rmem)
+{
+ union {
+ uint32_t dw[2];
+ uint64_t qw[2];
+ } reg;
+ struct dirent *de;
+ int basefd;
+ int dirfd;
+ int regfd;
+ DIR *dir;
+ int ret = 0;
+ int n;
+
+ basefd = open("/proc/device-tree/reserved-memory/", O_DIRECTORY);
+ dir = fdopendir(basefd);
+ if (!dir) {
+ fprintf(stderr,
+ "Unable to open reserved-memory device tree node: %s\n",
+ strerror(-errno));
+ close(basefd);
+ return -1;
+ }
+
+ while ((de = readdir(dir)) != NULL) {
+ if (strncmp(de->d_name, "rmtfs", 5) != 0)
+ continue;
+
+ dirfd = openat(basefd, de->d_name, O_DIRECTORY);
+ if (dirfd < 0) {
+ fprintf(stderr, "failed to open %s: %s\n",
+ de->d_name, strerror(-errno));
+ ret = -1;
+ goto out;
+ }
+
+ regfd = openat(dirfd, "reg", O_RDONLY);
+ if (regfd < 0) {
+ fprintf(stderr, "failed to open reg of %s: %s\n",
+ de->d_name, strerror(-errno));
+ ret = -1;
+ goto out;
+ }
+
+ n = read(regfd, &reg, sizeof(reg));
+ if (n == 2 * sizeof(uint32_t)) {
+ rmem->address = be32toh(reg.dw[0]);
+ rmem->size = be32toh(reg.dw[1]);
+ } else if (n == 2 * sizeof(uint64_t)) {
+ rmem->address = be64toh(reg.qw[0]);
+ rmem->size = be64toh(reg.qw[1]);
+ } else {
+ fprintf(stderr, "failed to read reg of %s: %s\n",
+ de->d_name, strerror(-errno));
+ ret = -1;
+ }
+
+ close(regfd);
+ close(dirfd);
+ break;
+ }
+
+out:
+ closedir(dir);
+ close(basefd);
+ return ret;
+}
diff --git a/qcom/rmtfs/storage.c b/qcom/rmtfs/storage.c
new file mode 100644
index 0000000..c8e69ed
--- /dev/null
+++ b/qcom/rmtfs/storage.c
@@ -0,0 +1,288 @@
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "rmtfs.h"
+
+#define MAX_CALLERS 10
+#define STORAGE_MAX_SIZE (16 * 1024 * 1024)
+
+#define BY_PARTLABEL_PATH "/dev/disk/by-partlabel"
+
+#define MIN(x, y) ((x) < (y) ? (x) : (y))
+
+struct partition {
+ const char *path;
+ const char *actual;
+ const char *partlabel;
+};
+
+struct rmtfd {
+ unsigned id;
+ unsigned node;
+ int fd;
+ unsigned dev_error;
+ const struct partition *partition;
+
+ void *shadow_buf;
+ size_t shadow_len;
+};
+
+static const char *storage_dir = "/boot";
+static int storage_read_only;
+static int storage_use_partitions;
+
+static const struct partition partition_table[] = {
+ { "/boot/modem_fs1", "modem_fs1", "modemst1" },
+ { "/boot/modem_fs2", "modem_fs2", "modemst2" },
+ { "/boot/modem_fsc", "modem_fsc", "fsc" },
+ { "/boot/modem_fsg", "modem_fsg", "fsg" },
+ {}
+};
+
+static struct rmtfd rmtfds[MAX_CALLERS];
+
+static int storage_populate_shadow_buf(struct rmtfd *rmtfd, const char *file);
+
+int storage_init(const char *storage_root, bool read_only, bool use_partitions)
+{
+ int i;
+
+ if (storage_root)
+ storage_dir = storage_root;
+
+ if (use_partitions) {
+ if (!storage_root)
+ storage_dir = BY_PARTLABEL_PATH;
+ storage_use_partitions = true;
+ }
+
+ storage_read_only = read_only;
+
+ for (i = 0; i < MAX_CALLERS; i++) {
+ rmtfds[i].id = i;
+ rmtfds[i].fd = -1;
+ rmtfds[i].shadow_buf = NULL;
+ }
+
+ return 0;
+}
+
+struct rmtfd *storage_open(unsigned node, const char *path)
+{
+ char *fspath;
+ const struct partition *part;
+ struct rmtfd *rmtfd = NULL;
+ const char *file;
+ size_t pathlen;
+ int saved_errno;
+ int ret;
+ int fd;
+ int i;
+
+ for (part = partition_table; part->path; part++) {
+ if (strcmp(part->path, path) == 0)
+ goto found;
+ }
+
+ fprintf(stderr, "[RMTFS storage] request for unknown partition '%s', rejecting\n", path);
+ return NULL;
+
+found:
+ /* Check if this node already has the requested path open */
+ for (i = 0; i < MAX_CALLERS; i++) {
+ if ((rmtfds[i].fd != -1 || rmtfds[i].shadow_buf) &&
+ rmtfds[i].node == node &&
+ rmtfds[i].partition == part)
+ return &rmtfds[i];
+ }
+
+ for (i = 0; i < MAX_CALLERS; i++) {
+ if (rmtfds[i].fd == -1 && !rmtfds[i].shadow_buf) {
+ rmtfd = &rmtfds[i];
+ break;
+ }
+ }
+ if (!rmtfd) {
+ fprintf(stderr, "[storage] out of free rmtfd handles\n");
+ return NULL;
+ }
+
+ if (storage_use_partitions)
+ file = part->partlabel;
+ else
+ file = part->actual;
+
+ pathlen = strlen(storage_dir) + strlen(file) + 2;
+ fspath = alloca(pathlen);
+ snprintf(fspath, pathlen, "%s/%s", storage_dir, file);
+ if (!storage_read_only) {
+ fd = open(fspath, O_RDWR);
+ if (fd < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "[storage] failed to open '%s' (requested '%s'): %s\n",
+ fspath, part->path, strerror(saved_errno));
+ errno = saved_errno;
+ return NULL;
+ }
+ rmtfd->fd = fd;
+ rmtfd->shadow_len = 0;
+ } else {
+ ret = storage_populate_shadow_buf(rmtfd, fspath);
+ if (ret < 0) {
+ saved_errno = errno;
+ fprintf(stderr, "[storage] failed to open '%s' (requested '%s'): %s\n",
+ fspath, part->path, strerror(saved_errno));
+ errno = saved_errno;
+ return NULL;
+ }
+ }
+
+ rmtfd->node = node;
+ rmtfd->partition = part;
+
+ return rmtfd;
+}
+
+void storage_close(struct rmtfd *rmtfd)
+{
+ close(rmtfd->fd);
+ rmtfd->fd = -1;
+
+ free(rmtfd->shadow_buf);
+ rmtfd->shadow_buf = NULL;
+ rmtfd->shadow_len = 0;
+
+ rmtfd->partition = NULL;
+}
+
+struct rmtfd *storage_get(unsigned node, int caller_id)
+{
+ struct rmtfd *rmtfd;
+
+ if (caller_id >= MAX_CALLERS)
+ return NULL;
+
+ rmtfd = &rmtfds[caller_id];
+ if (rmtfd->node != node)
+ return NULL;
+
+ return rmtfd;
+}
+
+int storage_get_caller_id(const struct rmtfd *rmtfd)
+{
+ return rmtfd->id;
+}
+
+int storage_get_error(const struct rmtfd *rmtfd)
+{
+ return rmtfd->dev_error;
+}
+
+void storage_exit(void)
+{
+ int i;
+
+ for (i = 0; i < MAX_CALLERS; i++) {
+ if (rmtfds[i].fd >= 0)
+ close(rmtfds[i].fd);
+ }
+}
+
+ssize_t storage_pread(const struct rmtfd *rmtfd, void *buf, size_t nbyte, off_t offset)
+{
+ ssize_t n;
+
+ if (!storage_read_only) {
+ n = pread(rmtfd->fd, buf, nbyte, offset);
+ } else {
+ n = MIN(nbyte, rmtfd->shadow_len - offset);
+ if (n > 0)
+ memcpy(buf, (char*)rmtfd->shadow_buf + offset, n);
+ else
+ n = 0;
+ }
+
+ if (n < nbyte)
+ memset((char*)buf + n, 0, nbyte - n);
+
+ return nbyte;
+}
+
+ssize_t storage_pwrite(struct rmtfd *rmtfd, const void *buf, size_t nbyte, off_t offset)
+{
+ size_t new_len = offset + nbyte;
+ void *new_buf;
+
+ if (!storage_read_only)
+ return pwrite(rmtfd->fd, buf, nbyte, offset);
+
+ if (new_len >= STORAGE_MAX_SIZE) {
+ fprintf(stderr, "write to %zd bytes exceededs max size\n", new_len);
+ errno = -EINVAL;
+ return -1;
+ }
+
+ if (new_len > rmtfd->shadow_len) {
+ new_buf = realloc(rmtfd->shadow_buf, new_len);
+ if (!new_buf) {
+ errno = -ENOMEM;
+ return -1;
+ }
+
+ rmtfd->shadow_buf = new_buf;
+ rmtfd->shadow_len = new_len;
+ }
+
+ memcpy((char*)rmtfd->shadow_buf + offset, buf, nbyte);
+
+ return nbyte;
+}
+
+static int storage_populate_shadow_buf(struct rmtfd *rmtfd, const char *file)
+{
+ ssize_t len;
+ ssize_t n;
+ void *buf;
+ int ret;
+ int fd;
+
+ fd = open(file, O_RDONLY);
+ if (fd < 0)
+ return -1;
+
+ len = lseek(fd, 0, SEEK_END);
+ if (len < 0) {
+ ret = -1;
+ goto err_close_fd;
+ }
+
+ lseek(fd, 0, SEEK_SET);
+
+ buf = calloc(1, len);
+ if (!buf) {
+ ret = -1;
+ goto err_close_fd;
+ }
+
+ n = read(fd, buf, len);
+ if (n < 0) {
+ ret = -1;
+ goto err_close_fd;
+ }
+
+ rmtfd->shadow_buf = buf;
+ rmtfd->shadow_len = n;
+
+ ret = 0;
+
+err_close_fd:
+ close(fd);
+
+ return ret;
+}
diff --git a/qcom/rmtfs/util.c b/qcom/rmtfs/util.c
new file mode 100644
index 0000000..5ca5bba
--- /dev/null
+++ b/qcom/rmtfs/util.c
@@ -0,0 +1,48 @@
+#include <ctype.h>
+#include <stdint.h>
+#include <stdio.h>
+#include "util.h"
+
+static uint8_t to_hex(uint8_t ch)
+{
+ ch &= 0xf;
+ return ch <= 9 ? '0' + ch : 'a' + ch - 10;
+}
+
+void print_hex_dump(const char *prefix, const void *buf, size_t len)
+{
+ const uint8_t *ptr = buf;
+ size_t linelen;
+ uint8_t ch;
+ char line[16 * 3 + 16 + 1];
+ int li;
+ int i;
+ int j;
+
+ for (i = 0; i < len; i += 16) {
+ linelen = MIN(16, len - i);
+ li = 0;
+
+ for (j = 0; j < linelen; j++) {
+ ch = ptr[i + j];
+ line[li++] = to_hex(ch >> 4);
+ line[li++] = to_hex(ch);
+ line[li++] = ' ';
+ }
+
+ for (; j < 16; j++) {
+ line[li++] = ' ';
+ line[li++] = ' ';
+ line[li++] = ' ';
+ }
+
+ for (j = 0; j < linelen; j++) {
+ ch = ptr[i + j];
+ line[li++] = isprint(ch) ? ch : '.';
+ }
+
+ line[li] = '\0';
+
+ printf("%s %04x: %s\n", prefix, i, line);
+ }
+}
diff --git a/qcom/rmtfs/util.h b/qcom/rmtfs/util.h
new file mode 100644
index 0000000..3a9ec3e
--- /dev/null
+++ b/qcom/rmtfs/util.h
@@ -0,0 +1,9 @@
+#ifndef __UTIL_H__
+#define __UTIL_H__
+
+#define MIN(x, y) ((x) < (y) ? (x) : (y))
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+
+void print_hex_dump(const char *prefix, const void *buf, size_t len);
+
+#endif
diff --git a/qcom/set_hw.sh b/qcom/set_hw.sh
new file mode 100644
index 0000000..98f76c3
--- /dev/null
+++ b/qcom/set_hw.sh
@@ -0,0 +1,12 @@
+#! /vendor/bin/sh
+# Set vendor.hw property to run device specific services
+#
+# grep the device name from /proc/device-tree/compatible
+
+HW=`/vendor/bin/cat /proc/device-tree/compatible | /vendor/bin/grep rb5`
+
+if [ -z "${HW}" ]; then
+ setprop vendor.hw db845c
+else
+ setprop vendor.hw rb5
+fi
diff --git a/qcom/set_udc.sh b/qcom/set_udc.sh
new file mode 100755
index 0000000..571c25d
--- /dev/null
+++ b/qcom/set_udc.sh
@@ -0,0 +1,17 @@
+#! /vendor/bin/sh
+# Grep and set the vendor.usb.controller property from
+# /sys/class/udc at the boot time.
+#
+# Upstream commit eb9b7bfd5954 ("arm64: dts: qcom: Harmonize DWC
+# USB3 DT nodes name") (v5.14-rc1) changed the DTS USB node names,
+# breaking the sys.usb.controller property hardcoded in the
+# platform specific init.usb.common.rc
+#
+# This script will get rid of the static/hardcoded property name
+# which we set in init.<hw>.usb.rc and set it to the available
+# on-board USB controller from /sys/class/udc instead.
+
+# Searching for db845c's DWC3 UDC explicitly
+UDC_ADDRESS=a600000
+UDC=`/vendor/bin/ls /sys/class/udc/ | /vendor/bin/grep $UDC_ADDRESS`
+setprop vendor.usb.controller $UDC
diff --git a/qcom/tqftpserv/Android.bp b/qcom/tqftpserv/Android.bp
new file mode 100644
index 0000000..248c323
--- /dev/null
+++ b/qcom/tqftpserv/Android.bp
@@ -0,0 +1,28 @@
+package {
+ default_applicable_licenses: [
+ "device_linaro_dragonboard_qcom_tqftpserv_license",
+ ],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "device_linaro_dragonboard_qcom_tqftpserv_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "LICENSE",
+ ],
+}
+
+cc_binary {
+ name: "tqftpserv",
+ vendor: true,
+ srcs: [
+ "tqftpserv.c",
+ "translate.c",
+ ],
+ shared_libs: ["libqrtr"],
+}
diff --git a/qcom/tqftpserv/LICENSE b/qcom/tqftpserv/LICENSE
new file mode 100644
index 0000000..cd92517
--- /dev/null
+++ b/qcom/tqftpserv/LICENSE
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2018, Linaro Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
+ */
diff --git a/qcom/tqftpserv/Makefile b/qcom/tqftpserv/Makefile
new file mode 100644
index 0000000..60ad687
--- /dev/null
+++ b/qcom/tqftpserv/Makefile
@@ -0,0 +1,25 @@
+TQFTPSERV := tqftpserv
+
+CFLAGS := -Wall -g -O2
+LDFLAGS := -lqrtr
+
+prefix ?= /usr/local
+bindir := $(prefix)/bin
+servicedir := $(prefix)/lib/systemd/system
+
+SRCS := tqftpserv.c translate.c
+
+OBJS := $(SRCS:.c=.o)
+
+$(TQFTPSERV): $(OBJS)
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+tqftpserv.service: tqftpserv.service.in
+ @sed 's+TQFTPSERV_PATH+$(bindir)+g' $< > $@
+
+install: $(TQFTPSERV) tqftpserv.service
+ @install -D -m 755 $(TQFTPSERV) $(DESTDIR)$(bindir)/$(TQFTPSERV)
+ @install -D -m 644 tqftpserv.service $(DESTDIR)$(servicedir)/tqftpserv.service
+
+clean:
+ rm -f $(TQFTPSERV) $(OBJS) tqftpserv.service
diff --git a/qcom/tqftpserv/list.h b/qcom/tqftpserv/list.h
new file mode 100644
index 0000000..c3488e3
--- /dev/null
+++ b/qcom/tqftpserv/list.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2016, Linaro Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 __LIST_H__
+#define __LIST_H__
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#ifndef container_of
+#define container_of(ptr, type, member) ({ \
+ const typeof(((type *)0)->member)*__mptr = (ptr); \
+ (type *)((char *)__mptr - offsetof(type, member)); \
+ })
+#endif
+
+struct list_head {
+ struct list_head *prev;
+ struct list_head *next;
+};
+
+#define LIST_INIT(list) { &(list), &(list) }
+
+static inline void list_init(struct list_head *list)
+{
+ list->prev = list->next = list;
+}
+
+static inline bool list_empty(struct list_head *list)
+{
+ return list->next == list;
+}
+
+static inline void list_add(struct list_head *list, struct list_head *item)
+{
+ struct list_head *prev = list->prev;
+
+ item->next = list;
+ item->prev = prev;
+
+ prev->next = list->prev = item;
+}
+
+static inline void list_del(struct list_head *item)
+{
+ item->prev->next = item->next;
+ item->next->prev = item->prev;
+}
+
+#define list_for_each(item, list) \
+ for (item = (list)->next; item != list; item = item->next)
+
+#define list_for_each_safe(item, next, list) \
+ for (item = (list)->next, next = item->next; item != list; item = next, next = item->next)
+
+#define list_entry(item, type, member) \
+ container_of(item, type, member)
+
+#define list_entry_first(list, type, member) \
+ container_of((list)->next, type, member)
+
+#define list_entry_next(item, member) \
+ container_of((item)->member.next, typeof(*(item)), member)
+
+#define list_for_each_entry(item, list, member) \
+ for (item = list_entry_first(list, typeof(*(item)), member); \
+ &item->member != list; \
+ item = list_entry_next(item, member))
+
+#define list_for_each_entry_safe(item, next, list, member) \
+ for (item = list_entry_first(list, typeof(*(item)), member), \
+ next = list_entry_next(item, member); \
+ &item->member != list; \
+ item = next, \
+ next = list_entry_next(item, member)) \
+
+#endif
diff --git a/qcom/tqftpserv/tqftpserv.c b/qcom/tqftpserv/tqftpserv.c
new file mode 100644
index 0000000..fa6e3c9
--- /dev/null
+++ b/qcom/tqftpserv/tqftpserv.c
@@ -0,0 +1,609 @@
+/*
+ * Copyright (c) 2018, Linaro Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <arpa/inet.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <libgen.h>
+#include <libqrtr.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "list.h"
+#include "translate.h"
+
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+
+enum {
+ OP_RRQ = 1,
+ OP_WRQ,
+ OP_DATA,
+ OP_ACK,
+ OP_ERROR,
+ OP_OACK,
+};
+
+struct tftp_client {
+ struct list_head node;
+
+ struct sockaddr_qrtr sq;
+
+ int sock;
+ int fd;
+
+ size_t block;
+
+ size_t blksize;
+ size_t rsize;
+ size_t wsize;
+ unsigned int timeoutms;
+};
+
+static struct list_head readers = LIST_INIT(readers);
+static struct list_head writers = LIST_INIT(writers);
+
+static ssize_t tftp_send_data(struct tftp_client *client,
+ unsigned int block, size_t offset)
+{
+ ssize_t len;
+ char *buf;
+ char *p;
+
+ buf = malloc(4 + client->blksize);
+ p = buf;
+
+ *p++ = 0;
+ *p++ = OP_DATA;
+
+ *p++ = (block >> 8) & 0xff;
+ *p++ = block & 0xff;
+
+ len = pread(client->fd, p, client->blksize, offset);
+ if (len <= 0) {
+ if (len < 0)
+ printf("[TQFTP] failed to read data\n");
+ free(buf);
+ return len;
+ }
+
+ p += len;
+
+ // printf("[TQFTP] Sending %zd bytes of DATA\n", p - buf);
+ len = send(client->sock, buf, p - buf, 0);
+
+ free(buf);
+
+ return len;
+}
+
+
+static int tftp_send_ack(int sock, int block)
+{
+ struct {
+ uint16_t opcode;
+ uint16_t block;
+ } ack = { htons(OP_ACK), htons(block) };
+
+ return send(sock, &ack, sizeof(ack), 0);
+}
+
+static int tftp_send_oack(int sock, size_t *blocksize, size_t *tsize,
+ size_t *wsize, unsigned int *timeoutms, size_t *rsize)
+{
+ char buf[512];
+ char *p = buf;
+ int n;
+
+ *p++ = 0;
+ *p++ = OP_OACK;
+
+ if (blocksize) {
+ strcpy(p, "blksize");
+ p += 8;
+
+ n = sprintf(p, "%zd", *blocksize);
+ p += n;
+ *p++ = '\0';
+ }
+
+ if (timeoutms) {
+ strcpy(p, "timeoutms");
+ p += 10;
+
+ n = sprintf(p, "%d", *timeoutms);
+ p += n;
+ *p++ = '\0';
+ }
+
+ if (tsize && *tsize != -1) {
+ strcpy(p, "tsize");
+ p += 6;
+
+ n = sprintf(p, "%zd", *tsize);
+ p += n;
+ *p++ = '\0';
+ }
+
+ if (wsize) {
+ strcpy(p, "wsize");
+ p += 6;
+
+ n = sprintf(p, "%zd", *wsize);
+ p += n;
+ *p++ = '\0';
+ }
+
+ if (rsize) {
+ strcpy(p, "rsize");
+ p += 6;
+
+ n = sprintf(p, "%zd", *rsize);
+ p += n;
+ *p++ = '\0';
+ }
+
+ return send(sock, buf, p - buf, 0);
+}
+
+static int tftp_send_error(int sock, int code, const char *msg)
+{
+ size_t len;
+ char *buf;
+ int rc;
+
+ len = 4 + strlen(msg) + 1;
+
+ buf = calloc(1, len);
+ if (!buf)
+ return -1;
+
+ *(uint16_t*)buf = htons(OP_ERROR);
+ *(uint16_t*)(buf + 2) = htons(code);
+ strcpy(buf + 4, msg);
+
+ rc = send(sock, buf, len, 0);
+ free(buf);
+ return rc;
+}
+
+static void handle_rrq(const char *buf, size_t len, struct sockaddr_qrtr *sq)
+{
+ struct tftp_client *client;
+ const char *filename;
+ const char *value;
+ const char *mode;
+ const char *opt;
+ struct stat sb;
+ const char *p;
+ ssize_t tsize = -1;
+ size_t blksize = 512;
+ unsigned int timeoutms = 1000;
+ size_t rsize = 0;
+ size_t wsize = 0;
+ bool do_oack = false;
+ int sock;
+ int ret;
+ int fd;
+
+ p = buf + 2;
+
+ filename = p;
+ p += strlen(p) + 1;
+
+ mode = p;
+ p += strlen(p) + 1;
+
+ if (strcasecmp(mode, "octet")) {
+ /* XXX: error */
+ printf("[TQFTP] not octet, reject\n");
+ return;
+ }
+
+ printf("[TQFTP] RRQ: %s (%s)\n", filename, mode);
+
+ if (p < buf + len) {
+ do_oack = true;
+
+ while (p < buf + len) {
+ /* XXX: ensure we're not running off the end */
+ opt = p;
+ p += strlen(p) + 1;
+
+ /* XXX: ensure we're not running off the end */
+ value = p;
+ p += strlen(p) + 1;
+
+ if (!strcmp(opt, "blksize")) {
+ blksize = atoi(value);
+ } else if (!strcmp(opt, "timeoutms")) {
+ timeoutms = atoi(value);
+ } else if (!strcmp(opt, "tsize")) {
+ tsize = atoi(value);
+ } else if (!strcmp(opt, "rsize")) {
+ rsize = atoi(value);
+ } else if (!strcmp(opt, "wsize")) {
+ wsize = atoi(value);
+ } else {
+ printf("[TQFTP] Ignoring unknown option '%s'\n", opt);
+ }
+ }
+ }
+
+ sock = qrtr_open(0);
+ if (sock < 0) {
+ /* XXX: error */
+ printf("[TQFTP] unable to create new qrtr socket, reject\n");
+ return;
+ }
+
+ ret = connect(sock, (struct sockaddr *)sq, sizeof(*sq));
+ if (ret < 0) {
+ /* XXX: error */
+ printf("[TQFTP] unable to connect new qrtr socket to remote\n");
+ return;
+ }
+
+ fd = translate_open(filename, O_RDONLY);
+ if (fd < 0) {
+ printf("[TQFTP] unable to open %s (%d), reject\n", filename, errno);
+ tftp_send_error(sock, 1, "file not found");
+ return;
+ }
+
+ if (tsize != -1) {
+ fstat(fd, &sb);
+ tsize = sb.st_size;
+ }
+
+ client = calloc(1, sizeof(*client));
+ client->sq = *sq;
+ client->sock = sock;
+ client->fd = fd;
+ client->blksize = blksize;
+ client->rsize = rsize;
+ client->wsize = wsize;
+ client->timeoutms = timeoutms;
+
+ // printf("[TQFTP] new reader added\n");
+
+ list_add(&readers, &client->node);
+
+ if (do_oack) {
+ tftp_send_oack(client->sock, &blksize,
+ tsize ? (size_t*)&tsize : NULL,
+ wsize ? &wsize : NULL,
+ &client->timeoutms,
+ rsize ? &rsize: NULL);
+ } else {
+ tftp_send_data(client, 1, 0);
+ }
+}
+
+static void handle_wrq(const char *buf, size_t len __unused, struct sockaddr_qrtr *sq)
+{
+ struct tftp_client *client;
+ const char *filename;
+ const char *mode;
+ int sock;
+ int ret;
+ int fd;
+
+ filename = buf + 2;
+ mode = buf + 2 + strlen(filename) + 1;
+
+ if (strcasecmp(mode, "octet")) {
+ /* XXX: error */
+ printf("[TQFTP] not octet, reject\n");
+ return;
+ }
+
+ printf("[TQFTP] WRQ: %s (%s)\n", filename, mode);
+
+ fd = translate_open(filename, O_WRONLY | O_CREAT);
+ if (fd < 0) {
+ /* XXX: error */
+ printf("[TQFTP] unable to open %s (%d), reject\n", filename, errno);
+ return;
+ }
+
+ sock = qrtr_open(0);
+ if (sock < 0) {
+ /* XXX: error */
+ printf("[TQFTP] unable to create new qrtr socket, reject\n");
+ return;
+ }
+
+ ret = connect(sock, (struct sockaddr *)sq, sizeof(*sq));
+ if (ret < 0) {
+ /* XXX: error */
+ printf("[TQFTP] unable to connect new qrtr socket to remote\n");
+ return;
+ }
+
+ client = calloc(1, sizeof(*client));
+ client->sq = *sq;
+ client->sock = sock;
+ client->fd = fd;
+
+ ret = tftp_send_ack(client->sock, 0);
+ if (ret < 0) {
+ printf("[TQFTP] unable to send ack\n");
+ close(sock);
+ close(fd);
+ free(client);
+ return;
+ }
+
+ // printf("[TQFTP] new writer added\n");
+
+ list_add(&writers, &client->node);
+}
+
+static int handle_reader(struct tftp_client *client)
+{
+ struct sockaddr_qrtr sq;
+ uint16_t block;
+ uint16_t last;
+ char buf[128];
+ socklen_t sl;
+ ssize_t len;
+ ssize_t n = 0;
+ int opcode;
+ int ret;
+
+ sl = sizeof(sq);
+ len = recvfrom(client->sock, buf, sizeof(buf), 0, (void *)&sq, &sl);
+ if (len < 0) {
+ ret = -errno;
+ if (ret != -ENETRESET)
+ fprintf(stderr, "[TQFTP] recvfrom failed: %d\n", ret);
+ return -1;
+ }
+
+ /* Drop unsolicited messages */
+ if (sq.sq_node != client->sq.sq_node ||
+ sq.sq_port != client->sq.sq_port) {
+ printf("[TQFTP] Discarding spoofed message\n");
+ return -1;
+ }
+
+ opcode = buf[0] << 8 | buf[1];
+ if (opcode == OP_ERROR) {
+ buf[len] = '\0';
+ printf("[TQFTP] Remote returned an error: %s\n", buf + 4);
+ return -1;
+ } else if (opcode != OP_ACK) {
+ printf("[TQFTP] Expected ACK, got %d\n", opcode);
+ return -1;
+ }
+
+ last = buf[2] << 8 | buf[3];
+ // printf("[TQFTP] Got ack for %d\n", last);
+
+ for (block = last; block < last + client->wsize; block++) {
+ n = tftp_send_data(client, block + 1,
+ block * client->blksize);
+ if (n < 0) {
+ printf("[TQFTP] Sent block %d failed: %zd\n", block + 1, n);
+ break;
+ }
+ // printf("[TQFTP] Sent block %d of %zd\n", block + 1, n);
+ if (n == 0)
+ break;
+ }
+
+ return 1;
+}
+
+static int handle_writer(struct tftp_client *client)
+{
+ struct sockaddr_qrtr sq;
+ uint16_t block;
+ size_t payload;
+ char buf[516];
+ socklen_t sl;
+ ssize_t len;
+ int opcode;
+ int ret;
+
+ sl = sizeof(sq);
+ len = recvfrom(client->sock, buf, sizeof(buf), 0, (void *)&sq, &sl);
+ if (len < 0) {
+ ret = -errno;
+ if (ret != -ENETRESET)
+ fprintf(stderr, "[TQFTP] recvfrom failed: %d\n", ret);
+ return -1;
+ }
+
+ /* Drop unsolicited messages */
+ if (sq.sq_node != client->sq.sq_node ||
+ sq.sq_port != client->sq.sq_port)
+ return -1;
+
+ opcode = buf[0] << 8 | buf[1];
+ block = buf[2] << 8 | buf[3];
+ if (opcode != OP_DATA) {
+ printf("[TQFTP] Expected DATA opcode, got %d\n", opcode);
+ tftp_send_error(client->sock, 4, "Expected DATA opcode");
+ return -1;
+ }
+
+ payload = len - 4;
+
+ ret = write(client->fd, buf + 4, payload);
+ if (ret < 0) {
+ /* XXX: report error */
+ printf("[TQFTP] failed to write data\n");
+ return -1;
+ }
+
+ tftp_send_ack(client->sock, block);
+
+ return payload == 512 ? 1 : 0;
+}
+
+static void client_close_and_free(struct tftp_client *client)
+{
+ list_del(&client->node);
+ close(client->sock);
+ close(client->fd);
+ free(client);
+}
+
+int main(int argc __unused, char **argv __unused)
+{
+ struct tftp_client *client;
+ struct tftp_client *next;
+ struct sockaddr_qrtr sq;
+ struct qrtr_packet pkt;
+ socklen_t sl;
+ ssize_t len;
+ char buf[4096];
+ fd_set rfds;
+ int nfds;
+ int opcode;
+ int ret;
+ int fd;
+
+ fd = qrtr_open(0);
+ if (fd < 0) {
+ fprintf(stderr, "failed to open qrtr socket\n");
+ exit(1);
+ }
+
+ ret = qrtr_publish(fd, 4096, 1, 0);
+ if (ret < 0) {
+ fprintf(stderr, "failed to publish service registry service\n");
+ exit(1);
+ }
+
+ for (;;) {
+ FD_ZERO(&rfds);
+ FD_SET(fd, &rfds);
+ nfds = fd;
+
+ list_for_each_entry(client, &writers, node) {
+ FD_SET(client->sock, &rfds);
+ nfds = MAX(nfds, client->sock);
+ }
+
+ list_for_each_entry(client, &readers, node) {
+ FD_SET(client->sock, &rfds);
+ nfds = MAX(nfds, client->sock);
+ }
+
+ ret = select(nfds + 1, &rfds, NULL, NULL, NULL);
+ if (ret < 0) {
+ if (errno == EINTR) {
+ continue;
+ } else {
+ fprintf(stderr, "select failed\n");
+ break;
+ }
+ }
+
+ list_for_each_entry_safe(client, next, &writers, node) {
+ if (FD_ISSET(client->sock, &rfds)) {
+ ret = handle_writer(client);
+ if (ret <= 0)
+ client_close_and_free(client);
+ }
+ }
+
+ list_for_each_entry_safe(client, next, &readers, node) {
+ if (FD_ISSET(client->sock, &rfds)) {
+ ret = handle_reader(client);
+ if (ret <= 0)
+ client_close_and_free(client);
+ }
+ }
+
+ if (FD_ISSET(fd, &rfds)) {
+ sl = sizeof(sq);
+ len = recvfrom(fd, buf, sizeof(buf), 0, (void *)&sq, &sl);
+ if (len < 0) {
+ ret = -errno;
+ if (ret != -ENETRESET)
+ fprintf(stderr, "[TQFTP] recvfrom failed: %d\n", ret);
+ return ret;
+ }
+
+ /* Ignore control messages */
+ if (sq.sq_port == QRTR_PORT_CTRL) {
+ ret = qrtr_decode(&pkt, buf, len, &sq);
+ if (ret < 0) {
+ fprintf(stderr, "[TQFTP] unable to decode qrtr packet\n");
+ return ret;
+ }
+
+ switch (pkt.type) {
+ case QRTR_TYPE_BYE:
+ // fprintf(stderr, "[TQFTP] got bye\n");
+ list_for_each_entry_safe(client, next, &writers, node) {
+ if (client->sq.sq_node == sq.sq_node)
+ client_close_and_free(client);
+ }
+ break;
+ case QRTR_TYPE_DEL_CLIENT:
+ // fprintf(stderr, "[TQFTP] got del_client\n");
+ list_for_each_entry_safe(client, next, &writers, node) {
+ if (!memcmp(&client->sq, &sq, sizeof(sq)))
+ client_close_and_free(client);
+ }
+ break;
+ }
+ } else {
+ if (len < 2)
+ continue;
+
+ opcode = buf[0] << 8 | buf[1];
+ switch (opcode) {
+ case OP_RRQ:
+ handle_rrq(buf, len, &sq);
+ break;
+ case OP_WRQ:
+ // printf("[TQFTP] write\n");
+ handle_wrq(buf, len, &sq);
+ break;
+ default:
+ printf("[TQFTP] unhandled op %d\n", opcode);
+ break;
+ }
+ }
+ }
+ }
+
+ close(fd);
+
+ return 0;
+}
diff --git a/qcom/tqftpserv/tqftpserv.service.in b/qcom/tqftpserv/tqftpserv.service.in
new file mode 100644
index 0000000..2cf828c
--- /dev/null
+++ b/qcom/tqftpserv/tqftpserv.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=QRTR TFTP service
+Requires=qrtr-ns.service
+After=qrtr-ns.service
+
+[Service]
+ExecStart=TQFTPSERV_PATH/tqftpserv
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/qcom/tqftpserv/translate.c b/qcom/tqftpserv/translate.c
new file mode 100644
index 0000000..63161a0
--- /dev/null
+++ b/qcom/tqftpserv/translate.c
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2019, Linaro Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder 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 AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <libgen.h>
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "translate.h"
+
+#define READONLY_PATH "/readonly/firmware/image/"
+#define READWRITE_PATH "/readwrite/"
+
+#ifndef ANDROID
+#define FIRMWARE_BASE "/lib/firmware/"
+#define TQFTPSERV_TMP "/tmp/tqftpserv"
+#else
+#define FIRMWARE_BASE "/vendor/firmware/"
+#define TQFTPSERV_TMP "/data/vendor/tmp/tqftpserv"
+#endif
+
+/**
+ * translate_readonly() - open "file" residing with remoteproc firmware
+ * @file: file requested, stripped of "/readonly/image/" prefix
+ *
+ * It is assumed that the readonly files requested by the client resides under
+ * /lib/firmware in the same place as its associated remoteproc firmware. This
+ * function scans through all entries under /sys/class/remoteproc and read the
+ * dirname of each "firmware" file in an attempt to find, and open(2), the
+ * requested file.
+ *
+ * As these files are readonly, it's not possible to pass flags to open(2).
+ *
+ * Return: opened fd on success, -1 otherwise
+ */
+static int translate_readonly(const char *file)
+{
+ char firmware_value[PATH_MAX];
+ char firmware_attr[32];
+ char path[PATH_MAX];
+ struct dirent *de;
+ int firmware_fd;
+ DIR *class_dir;
+ int class_fd;
+ ssize_t n;
+ int fd = -1;
+
+ class_fd = open("/sys/class/remoteproc", O_RDONLY | O_DIRECTORY);
+ if (class_fd < 0) {
+ warn("failed to open remoteproc class");
+ return -1;
+ }
+
+ class_dir = fdopendir(class_fd);
+ if (!class_dir) {
+ warn("failed to opendir");
+ goto close_class;
+ }
+
+ while ((de = readdir(class_dir)) != NULL) {
+ if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
+ continue;
+
+ if (strlen(de->d_name) + sizeof("/firmware") > sizeof(firmware_attr))
+ continue;
+ strcpy(firmware_attr, de->d_name);
+ strcat(firmware_attr, "/firmware");
+
+ firmware_fd = openat(class_fd, firmware_attr, O_RDONLY);
+ if (firmware_fd < 0)
+ continue;
+
+ n = read(firmware_fd, firmware_value, sizeof(firmware_value));
+ close(firmware_fd);
+ if (n < 0) {
+ continue;
+ }
+ firmware_value[n] = '\0';
+
+ if (strlen(FIRMWARE_BASE) + strlen(firmware_value) + 1 +
+ strlen(file) + 1 > sizeof(path))
+ continue;
+
+ strcpy(path, FIRMWARE_BASE);
+ strcat(path, dirname(firmware_value));
+ strcat(path, "/");
+ strcat(path, file);
+
+ fd = open(path, O_RDONLY);
+ if (fd >= 0)
+ break;
+
+ if (errno != ENOENT)
+ warn("failed to open %s", path);
+ }
+
+ closedir(class_dir);
+
+close_class:
+ close(class_fd);
+
+ return fd;
+}
+
+/**
+ * translate_readwrite() - open "file" from a temporary directory
+ * @file: relative path of the requested file, with /readwrite/ stripped
+ * @flags: flags to be passed to open(2)
+ *
+ * Return: opened fd on success, -1 otherwise
+ */
+static int translate_readwrite(const char *file, int flags)
+{
+ int base;
+ int ret;
+ int fd;
+
+ ret = mkdir(TQFTPSERV_TMP, 0700);
+ if (ret < 0 && errno != EEXIST) {
+ warn("failed to create temporary tqftpserv directory");
+ return -1;
+ }
+
+ base = open(TQFTPSERV_TMP, O_RDONLY | O_DIRECTORY);
+ if (base < 0) {
+ warn("failed top open temporary tqftpserv directory");
+ return -1;
+ }
+
+ fd = openat(base, file, flags, 0600);
+ close(base);
+ if (fd < 0)
+ warn("failed to open %s", file);
+
+ return fd;
+}
+
+/**
+ * translate_open() - open file after translating path
+ *
+
+ * Strips /readonly/firmware/image and search among remoteproc firmware.
+ * Replaces /readwrite with a temporary directory.
+
+ */
+int translate_open(const char *path, int flags)
+{
+ if (!strncmp(path, READONLY_PATH, strlen(READONLY_PATH)))
+ return translate_readonly(path + strlen(READONLY_PATH));
+ else if (!strncmp(path, READWRITE_PATH, strlen(READWRITE_PATH)))
+ return translate_readwrite(path + strlen(READWRITE_PATH), flags);
+
+ fprintf(stderr, "invalid path %s, rejecting\n", path);
+ errno = ENOENT;
+ return -1;
+}
diff --git a/qcom/tqftpserv/translate.h b/qcom/tqftpserv/translate.h
new file mode 100644
index 0000000..ade2d09
--- /dev/null
+++ b/qcom/tqftpserv/translate.h
@@ -0,0 +1,6 @@
+#ifndef __TRANSLATE_H__
+#define __TRANSLATE_H__
+
+int translate_open(const char *path, int flags);
+
+#endif
diff --git a/rb5.mk b/rb5.mk
new file mode 100644
index 0000000..8d4f174
--- /dev/null
+++ b/rb5.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/full.mk)
+$(call inherit-product, device/linaro/dragonboard/rb5/device.mk)
+
+# Product overrides
+PRODUCT_NAME := rb5
+PRODUCT_DEVICE := rb5
+PRODUCT_BRAND := Android
diff --git a/rb5/BoardConfig.mk b/rb5/BoardConfig.mk
new file mode 100644
index 0000000..53b21f0
--- /dev/null
+++ b/rb5/BoardConfig.mk
@@ -0,0 +1,44 @@
+include device/linaro/dragonboard/BoardConfigCommon.mk
+
+# Primary Arch
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-2a
+TARGET_CPU_VARIANT := kryo385
+TARGET_CPU_ABI := arm64-v8a
+
+# Secondary Arch
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-2a
+TARGET_2ND_CPU_VARIANT := kryo385
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+
+# Board Information
+TARGET_BOOTLOADER_BOARD_NAME := rb5
+TARGET_BOARD_PLATFORM := rb5
+
+TARGET_NO_KERNEL := false
+BOARD_KERNEL_BASE := 0x80000000
+BOARD_KERNEL_PAGESIZE := 4096
+
+BOARD_INCLUDE_DTB_IN_BOOTIMG := true
+BOARD_BOOT_HEADER_VERSION := 3
+BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOT_HEADER_VERSION)
+
+BOARD_KERNEL_CMDLINE := earlycon firmware_class.path=/vendor/firmware/ androidboot.hardware=rb5
+BOARD_KERNEL_CMDLINE += init=/init androidboot.boot_devices=soc@0/1d84000.ufshc printk.devkmsg=on
+BOARD_KERNEL_CMDLINE += pcie_pme=nomsi #For WiFi to work
+BOARD_KERNEL_CMDLINE += deferred_probe_timeout=30
+BOARD_KERNEL_CMDLINE += qcom_geni_serial.con_enabled=1
+
+# Image Configuration
+BOARD_BOOTIMAGE_PARTITION_SIZE := 103079215104 #96M
+BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 103079215104 #96M
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 21474836480
+BOARD_FLASH_BLOCK_SIZE := 131072
+
+# Super/Dynamic partition
+BOARD_SUPER_PARTITION_SIZE := 12437225472
+BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 12433031168 # Reserve 4M for DAP metadata
+BOARD_SUPER_PARTITION_METADATA_DEVICE := super
+BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
diff --git a/rb5/device.mk b/rb5/device.mk
new file mode 100644
index 0000000..8fc29a5
--- /dev/null
+++ b/rb5/device.mk
@@ -0,0 +1,54 @@
+#
+# 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.
+#
+
+# setup dalvik vm configs
+$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
+
+include $(LOCAL_PATH)/../vendor-package-ver.mk
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk)
+
+PRODUCT_COPY_FILES := \
+ $(LOCAL_PATH)/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
+
+# Build generic Audio HAL
+PRODUCT_PACKAGES := audio.primary.rb5
+
+# BootControl HAL
+PRODUCT_PACKAGES += \
+ android.hardware.boot@1.2-impl \
+ android.hardware.boot@1.2-impl.recovery \
+ android.hardware.boot@1.2-service
+
+# Install scripts to set vendor.* properties
+PRODUCT_COPY_FILES += \
+ device/linaro/dragonboard/qcom/set_hw.sh:$(TARGET_COPY_OUT_VENDOR)/bin/set_hw.sh
+
+PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=Qualcomm
+PRODUCT_VENDOR_PROPERTIES += ro.soc.model=QRB5165
+
+PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=160
+
+# Copy firmware files
+$(call inherit-product-if-exists, vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)/device.mk)
+
+TARGET_DTB := qrb5165-rb5.dtb
+TARGET_HARDWARE := rb5
+TARGET_KERNEL_USE ?= 5.15
+
+include device/linaro/dragonboard/device-common.mk
+
+PRODUCT_COPY_FILES += $(TARGET_KERNEL_DIR)/qrb5165-rb5.dtb:dtb.img
diff --git a/rb5/mixer_paths.xml b/rb5/mixer_paths.xml
new file mode 100644
index 0000000..86e67fc
--- /dev/null
+++ b/rb5/mixer_paths.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<mixer>
+ <!-- Enable HDMI out -->
+ <ctl name="TERT_MI2S_RX Audio Mixer MultiMedia1" value="1" />
+</mixer>
diff --git a/rb5_mini.mk b/rb5_mini.mk
new file mode 100644
index 0000000..302e217
--- /dev/null
+++ b/rb5_mini.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/mini.mk)
+$(call inherit-product, device/linaro/dragonboard/rb5/device.mk)
+
+# Product overrides
+PRODUCT_NAME := rb5_mini
+PRODUCT_DEVICE := rb5
+PRODUCT_BRAND := Android
diff --git a/seccomp_policy/mediaswcodec.policy b/seccomp_policy/mediaswcodec.policy
new file mode 100644
index 0000000..4c148fb
--- /dev/null
+++ b/seccomp_policy/mediaswcodec.policy
@@ -0,0 +1,3 @@
+# device specific syscalls
+# extension of frameworks/av/services/mediacodec/seccomp_policy/mediaswcodec-arm64.policy
+sysinfo: 1
diff --git a/sepolicy/eth_mac_addr.te b/sepolicy/eth_mac_addr.te
new file mode 100644
index 0000000..d2e4e1a
--- /dev/null
+++ b/sepolicy/eth_mac_addr.te
@@ -0,0 +1,12 @@
+type eth_mac_addr, domain, coredomain;
+type eth_mac_addr_exec, exec_type, system_file_type, file_type;
+init_daemon_domain(eth_mac_addr);
+
+allow eth_mac_addr proc_cmdline:file { open read };
+allow eth_mac_addr rootfs:dir { open read };
+allow eth_mac_addr self:capability net_admin;
+allow eth_mac_addr self:netlink_route_socket { bind create getattr nlmsg_readpriv nlmsg_write read setopt write };
+allow eth_mac_addr self:udp_socket { create ioctl };
+allow eth_mac_addr shell_exec:file { execute getattr map read };
+allow eth_mac_addr system_file:file execute_no_trans;
+allow eth_mac_addr toolbox_exec:file { execute execute_no_trans getattr map open read };
diff --git a/sepolicy/file.te b/sepolicy/file.te
index 4d9988f..b149497 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -1,2 +1,9 @@
-type sysfs_gpu, fs_type, sysfs_type;
+type sysfs_mss, fs_type, sysfs_type;
+type sysfs_rmtfs, fs_type, sysfs_type;
+type sysfs_remoteproc, fs_type, sysfs_type;
+type sysfs_udc, fs_type, sysfs_type;
+type sysfs_dt_compatible, fs_type, sysfs_type;
type dri_device, dev_type;
+type rmtfs_device, dev_type;
+type modem_block_device, dev_type;
+type tqftpserv_vendor_data_file, file_type, data_file_type, mlstrustedobject;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 81edb8c..d7419dc 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -1,21 +1,77 @@
-/dev/block/by-name/metadata u:object_r:metadata_block_device:s0
+/dev/block/platform/soc@0/1d84000\.ufshc/by-name/fsc u:object_r:modem_block_device:s0
+/dev/block/platform/soc@0/1d84000\.ufshc/by-name/fsg u:object_r:modem_block_device:s0
+/dev/block/platform/soc@0/1d84000\.ufshc/by-name/modemst[12] u:object_r:modem_block_device:s0
+/dev/block/platform/soc@0/1d84000\.ufshc/by-name/metadata u:object_r:metadata_block_device:s0
+/dev/block/platform/soc@0/1d84000\.ufshc/by-name/super u:object_r:super_block_device:s0
+/dev/block/platform/soc@0/1d84000\.ufshc/by-name/userdata u:object_r:userdata_block_device:s0
+/dev/block/platform/soc@0/1d84000\.ufshc/by-name/misc u:object_r:misc_block_device:s0
+
/dev/dri u:object_r:dri_device:s0
/dev/dri/card0 u:object_r:graphics_device:s0
/dev/dri/renderD128 u:object_r:gpu_device:s0
+/dev/qcom_rmtfs_mem1 u:object_r:rmtfs_device:s0
/dev/ttyMSM0 u:object_r:console_device:s0
-/sys/devices/platform/soc/ae00000.mdss u:object_r:sysfs_gpu:s0
-/sys/devices/platform/soc/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc u:object_r:sysfs_rtc:s0
+/sys/bus/platform/drivers/qcom-q6v5-mss u:object_r:sysfs_mss:s0
+/sys/module/qcom_q6v5_mss u:object_r:sysfs_mss:s0
+/sys/devices/platform/88f00000.memory/rmtfs u:object_r:sysfs_rmtfs:s0
-# sysfs path changed in v5.4+ kernel for sdm845 devices
+/sys/devices/platform/soc@0/4080000.remoteproc u:object_r:sysfs_remoteproc:s0
+/sys/devices/platform/soc@0/8300000.remoteproc u:object_r:sysfs_remoteproc:s0
+/sys/devices/platform/soc@0/17300000.remoteproc u:object_r:sysfs_remoteproc:s0
/sys/devices/platform/soc@0/ae00000.mdss u:object_r:sysfs_gpu:s0
-/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc u:object_r:sysfs_rtc:s0
+#wakeups on db845c
+/sys/devices/platform/soc@0/1c00000.pci/pci0000:00/0000:00:00.0/0000:01:00.0/wakeup/wakeup1 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/a6f8800.usb/wakeup/wakeup2 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/a8f8800.usb/wakeup/wakeup3 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:pon@800/c440000.spmi:pmic@0:pon@800:pwrkey/wakeup/wakeup4 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:pon@800/c440000.spmi:pmic@0:pon@800:resin/wakeup/wakeup5 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/wakeup/wakeup6 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc/rtc0/alarmtimer.2.auto/wakeup/wakeup7 u:object_r:sysfs_wakeup:s0
+
+#wakeups on RB5
+/sys/devices/platform/soc@0/a6f8800.usb/wakeup/wakeup0 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/a8f8800.usb/wakeup/wakeup1 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/wakeup/wakeup3 u:object_r:sysfs_wakeup:s0
+/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc/rtc0/alarmtimer.1.auto/wakeup/wakeup4 u:object_r:sysfs_wakeup:s0
+
+/sys/class/remoteproc u:object_r:sysfs_remoteproc:s0
+/sys/devices/platform/remoteproc-adsp/remoteproc u:object_r:sysfs_remoteproc:s0
+/sys/devices/platform/remoteproc-cdsp/remoteproc u:object_r:sysfs_remoteproc:s0
+
+/sys/class/udc u:object_r:sysfs_udc:s0
+
+/sys/firmware/devicetree/base/compatible u:object_r:sysfs_dt_compatible:s0
+
+/data/vendor/tmp(/.*)? u:object_r:tqftpserv_vendor_data_file:s0
+/data/vendor/readwrite(/.*)? u:object_r:tqftpserv_vendor_data_file:s0
+/data/vendor/readonly(/.*)? u:object_r:tqftpserv_vendor_data_file:s0
+
+/system/bin/eth_mac_addr\.sh u:object_r:eth_mac_addr_exec:s0
+/system/bin/tinymix u:object_r:tinymix_exec:s0
+
+/vendor/bin/grep u:object_r:vendor_toolbox_exec:s0
/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service\.software u:object_r:hal_gatekeeper_default_exec:s0
+/vendor/bin/hw/android\.hardware\.graphics\.allocator@4\.0-service\.minigbm_msm u:object_r:hal_graphics_allocator_default_exec:s0
+/vendor/bin/pd-mapper u:object_r:pd_mapper_exec:s0
+/vendor/bin/qrtr-cfg u:object_r:qrtr_exec:s0
+/vendor/bin/qrtr-ns u:object_r:qrtr_exec:s0
+/vendor/bin/rmtfs u:object_r:rmtfs_exec:s0
+/vendor/bin/tqftpserv u:object_r:tqftpserv_exec:s0
+/vendor/bin/suspend_blocker u:object_r:suspend_blocker_exec:s0
+/vendor/bin/set_hw\.sh u:object_r:set_hw_exec:s0
+/vendor/bin/set_udc\.sh u:object_r:set_udc_exec:s0
/vendor/lib(64)?/dri/.* u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/gralloc\.gbm\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/android\.hardware\.health@2\.0-impl-2\.1-cuttlefish\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/gralloc\.minigbm_msm\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/android\.hardware\.graphics\.mapper@4\.0-impl\.minigbm_msm\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/vulkan\.freedreno\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libdrm\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libdrm_freedreno\.so u:object_r:same_process_hal_file:s0
-/vendor/lib(64)?/libgbm\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libgbm_mesa\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libglapi\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libminigbm_gralloc_msm\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libqrtr\.so u:object_r:same_process_hal_file:s0
diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts
index 0816df9..2a50d9c 100644
--- a/sepolicy/genfs_contexts
+++ b/sepolicy/genfs_contexts
@@ -1,6 +1,25 @@
-genfscon sysfs /devices/platform/soc/ae00000.mdss u:object_r:sysfs_gpu:s0
-genfscon sysfs /devices/platform/soc/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000 u:object_r:sysfs_rtc:s0
+genfscon sysfs /devices/platform/88f00000.memory/rmtfs u:object_r:sysfs_rmtfs:s0
+genfscon sysfs /devices/platform/88f00000.rmtfs/rmtfs u:object_r:sysfs_rmtfs:s0
+genfscon sysfs /devices/platform/remoteproc-adsp/remoteproc u:object_r:sysfs_remoteproc:s0
+genfscon sysfs /devices/platform/remoteproc-cdsp/remoteproc u:object_r:sysfs_remoteproc:s0
+genfscon sysfs /devices/platform/soc@0/4080000.remoteproc u:object_r:sysfs_remoteproc:s0
+genfscon sysfs /devices/platform/soc@0/8300000.remoteproc u:object_r:sysfs_remoteproc:s0
+genfscon sysfs /devices/platform/soc@0/17300000.remoteproc u:object_r:sysfs_remoteproc:s0
+genfscon sysfs /devices/platform/soc@0/ae00000.mdss u:object_r:sysfs_gpu:s0
+genfscon sysfs /class/udc u:object_r:sysfs_udc:s0
+genfscon sysfs /firmware/devicetree/base/compatible u:object_r:sysfs_dt_compatible:s0
-# sysfs path changed in v5.4+ kernel for sdm845 devices
-genfscon sysfs /devices/platform/soc@0/ae00000.mdss u:object_r:sysfs_gpu:s0
-genfscon sysfs /devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000 u:object_r:sysfs_rtc:s0
+#wakeups on db845c
+genfscon sysfs /devices/platform/soc@0/1c00000.pci/pci0000:00/0000:00:00.0/0000:01:00.0/wakeup/wakeup1 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/a6f8800.usb/wakeup/wakeup2 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/a8f8800.usb/wakeup/wakeup3 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:pon@800/c440000.spmi:pmic@0:pon@800:pwrkey/wakeup/wakeup4 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:pon@800/c440000.spmi:pmic@0:pon@800:resin/wakeup/wakeup5 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/wakeup/wakeup6 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc/rtc0/alarmtimer.2.auto/wakeup/wakeup7 u:object_r:sysfs_wakeup:s0
+
+#wakeups on RB5
+genfscon sysfs /devices/platform/soc@0/a6f8800.usb/wakeup/wakeup0 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/a8f8800.usb/wakeup/wakeup1 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/wakeup/wakeup3 u:object_r:sysfs_wakeup:s0
+genfscon sysfs /devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc/rtc0/alarmtimer.1.auto/wakeup/wakeup4 u:object_r:sysfs_wakeup:s0
diff --git a/sepolicy/hal_audio_default.te b/sepolicy/hal_audio_default.te
new file mode 100644
index 0000000..cede442
--- /dev/null
+++ b/sepolicy/hal_audio_default.te
@@ -0,0 +1,2 @@
+# audit2allow
+allow hal_audio_default vendor_hw_prop:file { getattr map open read };
diff --git a/sepolicy/hal_camera.te b/sepolicy/hal_camera.te
new file mode 100644
index 0000000..6bbc346
--- /dev/null
+++ b/sepolicy/hal_camera.te
@@ -0,0 +1,15 @@
+vndbinder_use(hal_camera_default);
+
+allow hal_camera_default hal_graphics_mapper_hwservice:hwservice_manager find;
+hal_client_domain(hal_camera_default, hal_graphics_allocator);
+hal_client_domain(hal_camera_default, hal_graphics_composer);
+
+# for external camera
+allow cameraserver device:dir r_dir_perms;
+allow cameraserver video_device:dir r_dir_perms;
+allow cameraserver video_device:chr_file rw_file_perms;
+
+allow hal_camera_default gpu_device:chr_file { open read write ioctl map getattr };
+allow hal_camera_default dri_device:dir { open read search };
+allow cameraserver dri_device:dir { open read write search getattr };
+allow cameraserver gpu_device:chr_file { open read write ioctl map getattr };
diff --git a/sepolicy/hal_graphics_composer.te b/sepolicy/hal_graphics_composer.te
index 40dbe25..cc45ebf 100644
--- a/sepolicy/hal_graphics_composer.te
+++ b/sepolicy/hal_graphics_composer.te
@@ -1 +1,3 @@
+allow hal_graphics_composer_server hal_graphics_allocator_default_tmpfs:file read;
+
gpu_access(hal_graphics_composer_server)
diff --git a/sepolicy/hal_graphics_composer_default.te b/sepolicy/hal_graphics_composer_default.te
index 9c310f6..56e03aa 100644
--- a/sepolicy/hal_graphics_composer_default.te
+++ b/sepolicy/hal_graphics_composer_default.te
@@ -1,3 +1,8 @@
+hal_client_domain(hal_graphics_composer_default, hal_graphics_allocator);
vndbinder_use(hal_graphics_composer_default)
allow hal_graphics_composer_default self:netlink_kobject_uevent_socket { bind create read };
+
+# Suppress warnings for drm_hwcomposer trying to read some vendor.hwc.*
+# properties as dragonboard never configures these properties.
+dontaudit hal_graphics_composer_default default_prop:file read;
diff --git a/sepolicy/kernel.te b/sepolicy/kernel.te
index 3fad122..176d6f6 100644
--- a/sepolicy/kernel.te
+++ b/sepolicy/kernel.te
@@ -2,6 +2,10 @@
allow kernel device:chr_file { create setattr };
allow kernel device:dir { add_name create write };
allow kernel self:capability mknod;
-allow kernel vendor_file:file { open read };
+allow kernel vendor_file:file { open read getattr};
+allow kernel vendor_file:dir read;
allow kernel self:system module_request;
allow vendor_init kernel:system module_request;
+allow kernel sepolicy_file:file getattr;
+allow kernel system_bootstrap_lib_file:dir getattr;
+allow kernel system_bootstrap_lib_file:file getattr;
diff --git a/sepolicy/mediacodec.te b/sepolicy/mediacodec.te
new file mode 100644
index 0000000..6119c90
--- /dev/null
+++ b/sepolicy/mediacodec.te
@@ -0,0 +1 @@
+gpu_access(mediacodec)
diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te
new file mode 100644
index 0000000..922af2c
--- /dev/null
+++ b/sepolicy/mediaserver.te
@@ -0,0 +1 @@
+gpu_access(mediaserver)
diff --git a/sepolicy/mediaswcodec.te b/sepolicy/mediaswcodec.te
new file mode 100644
index 0000000..57fb75c
--- /dev/null
+++ b/sepolicy/mediaswcodec.te
@@ -0,0 +1,2 @@
+gpu_access(mediaswcodec)
+allow mediaswcodec gpu_device:chr_file { getattr ioctl map open read write };
diff --git a/sepolicy/pd_mapper.te b/sepolicy/pd_mapper.te
new file mode 100644
index 0000000..597d7db
--- /dev/null
+++ b/sepolicy/pd_mapper.te
@@ -0,0 +1,8 @@
+type pd_mapper, domain;
+
+type pd_mapper_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(pd_mapper);
+
+allow pd_mapper self:qipcrtr_socket { create getattr read setopt write };
+allow pd_mapper sysfs_remoteproc:dir { open read search };
+allow pd_mapper sysfs_remoteproc:file { open read };
diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts
new file mode 100644
index 0000000..9c495ab
--- /dev/null
+++ b/sepolicy/property_contexts
@@ -0,0 +1,2 @@
+vendor.usb.controller u:object_r:vendor_usb_prop:s0
+vendor.hw u:object_r:vendor_hw_prop:s0
diff --git a/sepolicy/qrtr.te b/sepolicy/qrtr.te
new file mode 100644
index 0000000..8344398
--- /dev/null
+++ b/sepolicy/qrtr.te
@@ -0,0 +1,8 @@
+type qrtr, domain;
+type qrtr_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(qrtr)
+
+allow qrtr self:capability net_admin;
+allow qrtr self:capability sys_admin;
+allow qrtr self:qipcrtr_socket create_socket_perms_no_ioctl;
+allow qrtr self:netlink_route_socket { create nlmsg_write read write };
diff --git a/sepolicy/rmtfs.te b/sepolicy/rmtfs.te
new file mode 100644
index 0000000..7cef38f
--- /dev/null
+++ b/sepolicy/rmtfs.te
@@ -0,0 +1,15 @@
+type rmtfs, domain;
+type rmtfs_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(rmtfs)
+
+allow rmtfs block_device:dir search;
+allow rmtfs modem_block_device:blk_file { open read };
+allow rmtfs rmtfs_device:chr_file { open read write };
+allow rmtfs self:capability net_admin;
+allow rmtfs self:qipcrtr_socket { bind create getattr read setopt write };
+allow rmtfs sysfs_mss:dir { open read search };
+allow rmtfs sysfs_remoteproc:dir { open read search };
+allow rmtfs sysfs_remoteproc:file { open write };
+allow rmtfs sysfs_rmtfs:dir search;
+allow rmtfs sysfs_rmtfs:file { open read };
diff --git a/sepolicy/set_hw.te b/sepolicy/set_hw.te
new file mode 100644
index 0000000..996e574
--- /dev/null
+++ b/sepolicy/set_hw.te
@@ -0,0 +1,11 @@
+type set_hw, domain;
+type set_hw_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(set_hw);
+
+vendor_public_prop(vendor_hw_prop)
+set_prop(set_hw, vendor_hw_prop)
+get_prop(vendor_init, vendor_hw_prop)
+
+allow set_hw vendor_shell_exec:file rx_file_perms;
+allow set_hw vendor_toolbox_exec:file rx_file_perms;
+allow set_hw sysfs_dt_compatible:file { open read };
diff --git a/sepolicy/set_udc.te b/sepolicy/set_udc.te
new file mode 100644
index 0000000..d810bd2
--- /dev/null
+++ b/sepolicy/set_udc.te
@@ -0,0 +1,11 @@
+type set_udc, domain;
+type set_udc_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(set_udc);
+
+vendor_public_prop(vendor_usb_prop)
+set_prop(set_udc, vendor_usb_prop)
+get_prop(vendor_init, vendor_usb_prop)
+
+allow set_udc vendor_shell_exec:file rx_file_perms;
+allow set_udc vendor_toolbox_exec:file rx_file_perms;
+allow set_udc sysfs_udc:dir { open read search };
diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te
index 17b66a8..9bffa3f 100644
--- a/sepolicy/surfaceflinger.te
+++ b/sepolicy/surfaceflinger.te
@@ -1 +1,2 @@
gpu_access(surfaceflinger)
+allow surfaceflinger vendor_file:dir read;
diff --git a/sepolicy/suspend_blocker.te b/sepolicy/suspend_blocker.te
new file mode 100644
index 0000000..fa6e02a
--- /dev/null
+++ b/sepolicy/suspend_blocker.te
@@ -0,0 +1,6 @@
+type suspend_blocker, domain;
+type suspend_blocker_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(suspend_blocker);
+
+wakelock_use(suspend_blocker);
diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te
index 80957cc..e801436 100644
--- a/sepolicy/system_server.te
+++ b/sepolicy/system_server.te
@@ -1 +1,3 @@
gpu_access(system_server)
+allow system_server wifi_hal_prop:file {open read getattr map};
+allow system_server vendor_file:dir read;
diff --git a/sepolicy/te_macros b/sepolicy/te_macros
index 322827a..a50bec1 100644
--- a/sepolicy/te_macros
+++ b/sepolicy/te_macros
@@ -4,5 +4,7 @@
define(`gpu_access', `
allow $1 dri_device:dir { open read search };
allow $1 sysfs_gpu:dir search;
+allow $1 gpu_device:chr_file { getattr ioctl map open read write };
+allow $1 graphics_device:chr_file { getattr };
allow $1 sysfs_gpu:file { getattr open read };
')
diff --git a/sepolicy/tinymix.te b/sepolicy/tinymix.te
new file mode 100644
index 0000000..75dc071
--- /dev/null
+++ b/sepolicy/tinymix.te
@@ -0,0 +1,7 @@
+type tinymix, domain, coredomain;
+type tinymix_exec, exec_type, system_file_type, file_type;
+
+init_daemon_domain(tinymix)
+
+allow tinymix audio_device:chr_file { ioctl open read write };
+allow tinymix audio_device:dir search;
diff --git a/sepolicy/tqftpserv.te b/sepolicy/tqftpserv.te
new file mode 100644
index 0000000..d437c0d
--- /dev/null
+++ b/sepolicy/tqftpserv.te
@@ -0,0 +1,10 @@
+type tqftpserv, domain;
+
+type tqftpserv_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(tqftpserv);
+
+allow tqftpserv self:qipcrtr_socket { connect create getattr read setopt write };
+allow tqftpserv sysfs_remoteproc:dir { open read search };
+allow tqftpserv sysfs_remoteproc:file { open read };
+allow tqftpserv tqftpserv_vendor_data_file:dir { add_name create open read search write };
+allow tqftpserv tqftpserv_vendor_data_file:file { create open write };
diff --git a/sm8450/BoardConfig.mk b/sm8450/BoardConfig.mk
new file mode 100644
index 0000000..de61cea
--- /dev/null
+++ b/sm8450/BoardConfig.mk
@@ -0,0 +1,58 @@
+#
+# Copyright (C) 2022 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 device/linaro/dragonboard/BoardConfigCommon.mk
+
+# Primary Arch
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a-branchprot
+TARGET_CPU_VARIANT := kryo385
+TARGET_CPU_ABI := arm64-v8a
+
+# Secondary Arch
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-2a
+TARGET_2ND_CPU_VARIANT := kryo385
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+
+# Board Information
+TARGET_BOOTLOADER_BOARD_NAME := sm8450
+TARGET_BOARD_PLATFORM := sm8450
+
+TARGET_NO_KERNEL := false
+BOARD_KERNEL_BASE := 0x80000000
+BOARD_KERNEL_PAGESIZE := 4096
+
+BOARD_INCLUDE_DTB_IN_BOOTIMG := true
+BOARD_BOOT_HEADER_VERSION := 2
+BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOT_HEADER_VERSION)
+
+BOARD_KERNEL_CMDLINE := earlycon firmware_class.path=/vendor/firmware/ androidboot.hardware=sm8450
+BOARD_KERNEL_CMDLINE += init=/init androidboot.boot_devices=soc@0/1d84000.ufshc printk.devkmsg=on
+BOARD_KERNEL_CMDLINE += allow_mismatched_32bit_el0
+
+# Image Configuration
+BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 #64M
+BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 67108864 #64M
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 21474836480
+BOARD_FLASH_BLOCK_SIZE := 131072
+
+# Super/Dynamic partition
+BOARD_SUPER_PARTITION_SIZE := 6442450944
+BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 6438256640 # Reserve 4M for DAP metadata
+BOARD_SUPER_PARTITION_METADATA_DEVICE := super
+BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
diff --git a/libmemtrack/Android.mk b/sm8450/device.mk
index 913cb22..90b5c12 100644
--- a/libmemtrack/Android.mk
+++ b/sm8450/device.mk
@@ -1,4 +1,5 @@
-# Copyright (C) 2017 The Android Open Source Project
+#
+# Copyright (C) 2022 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.
@@ -11,19 +12,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+#
+
+# setup dalvik vm configs
+$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
-LOCAL_PATH := $(call my-dir)
+TARGET_HARDWARE := sm8450
+TARGET_KERNEL_USE ?= mainline
-# HAL module implemenation stored in
-# hw/<POWERS_HARDWARE_MODULE_ID>.<ro.hardware>.so
-include $(CLEAR_VARS)
+include device/linaro/dragonboard/device-common.mk
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_C_INCLUDES += hardware/libhardware/include
-LOCAL_CFLAGS := -Wconversion -Wall -Werror -Wno-sign-conversion
-LOCAL_CLANG := true
-LOCAL_SHARED_LIBRARIES := liblog libhardware
-LOCAL_SRC_FILES := memtrack_dragonboard.c
-LOCAL_MODULE := memtrack.default
-include $(BUILD_SHARED_LIBRARY)
+PRODUCT_COPY_FILES += $(TARGET_KERNEL_DIR)/sm8450-qrd.dtb:dtb.img
diff --git a/sm8450_mini.mk b/sm8450_mini.mk
new file mode 100644
index 0000000..c286d32
--- /dev/null
+++ b/sm8450_mini.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/mini.mk)
+$(call inherit-product, device/linaro/dragonboard/sm8450/device.mk)
+
+# Product overrides
+PRODUCT_NAME := sm8450_mini
+PRODUCT_DEVICE := sm8450
+PRODUCT_BRAND := Android
diff --git a/ueventd.common.rc b/ueventd.common.rc
index b87dccf..8ae7d94 100644
--- a/ueventd.common.rc
+++ b/ueventd.common.rc
@@ -1,4 +1,5 @@
-modalias_handling enabled
+subsystem usbmisc
+ devname uevent_devname
/dev/sw_sync 0660 root graphics
@@ -8,3 +9,7 @@ modalias_handling enabled
# media.codec2
/dev/ion 0664 system system
+
+# usb webcam?
+/dev/video0 0660 system camera
+/dev/video1 0660 system camera
diff --git a/utils.mk b/utils.mk
deleted file mode 100644
index 04679fe..0000000
--- a/utils.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Put common makefile/build helper Macros here
-
-# $(1): The source file name in LOCAL_PATH.
-# It also serves as the module name and the dest file name.
-# $(2): Module installation path.
-define add-qcom-firmware
-$(eval include $(CLEAR_VARS))\
-$(eval LOCAL_MODULE := $(1))\
-$(eval LOCAL_SRC_FILES := $(1))\
-$(eval LOCAL_MODULE_STEM := $(1))\
-$(eval LOCAL_MODULE_CLASS := DATA)\
-$(eval LOCAL_MODULE_TAGS := optional)\
-$(eval LOCAL_MODULE_PATH := $(2))\
-$(eval include $(BUILD_PREBUILT))
-endef
diff --git a/vendor-package-ver.mk b/vendor-package-ver.mk
new file mode 100644
index 0000000..df1284e
--- /dev/null
+++ b/vendor-package-ver.mk
@@ -0,0 +1,4 @@
+HELPER_SCRIPT=./device/linaro/dragonboard/vendor-package-ver.sh
+EXPECTED_LINARO_VENDOR_VERSION := $(shell $(HELPER_SCRIPT) ver)
+VND_PKG_URL := $(shell $(HELPER_SCRIPT) url)
+LINARO_VENDOR_PATH := vendor/linaro/
diff --git a/vendor-package-ver.sh b/vendor-package-ver.sh
new file mode 100755
index 0000000..6179fc9
--- /dev/null
+++ b/vendor-package-ver.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+export EXPECTED_LINARO_VENDOR_VERSION=20220303
+#make sure to use sha512sum here
+export EXPECTED_LINARO_VENDOR_SHA=1119c59e80094fc11624b19531f584e798fd048f0adfdbb5113d2539202898c7d2b13dc1d2ad679c555f1c79a64d3ffc1b45cdf414787e5a821499276ca0b36c
+export VND_PKG_URL=https://releases.linaro.org/android/aosp-linaro-vendor-package/extract-linaro_devices-20220303.tgz
+
+if [ "$1" = "url" ]; then
+ echo $VND_PKG_URL
+elif [ "$1" = "ver" ]; then
+ echo $EXPECTED_LINARO_VENDOR_VERSION
+elif [ "$1" = "sha" ]; then
+ echo $EXPECTED_LINARO_VENDOR_SHA
+fi