Commit Graph

33 Commits

Author SHA1 Message Date
Dante Russo
8483bcb6c9
msm8974-common: gps: Default apn ip type to ipv4
If a apn ip type is not found for a agps
data connection, default to using ipv4
instead of invalid.

CRs-fixed: 1007417

Bug: 28986221

Change-Id: Icc71de1fab3fd5967901c39a5c11eaea17b7766c
Signed-off-by: D. Andrei Măceș <Andrei.Maces@alumni.nd.edu>
2020-06-26 18:33:09 -06:00
Aurimas Liutikas
9f30bd7912
msm8974-common: gps: Suppress unused-parameter warnings
Bug: 26936282
Change-Id: I7fdf58d232a59c0ba0d5f52c0f958f6eab0c4514
2020-06-26 18:33:09 -06:00
Dante Russo
0830f02f9e
msm8974-common: gps: Remove owner of gps hal modules
Owner does not need to be specified for
this project.

Change-Id: I918a767ed3b83e134c5e63ded5b25070b3399ac8
2020-06-26 18:23:52 -06:00
jlask
b5d2115316
msm8974-common: gps: Correct week rollover timestamps
This adjustment will help with applications checking the time coming from gps.
Some applictions will consider times in the far past as an error.

Change-Id: I69d6971249c4898ac3895f725e46f268cdb2b00d
2020-06-26 09:50:03 -06:00
Harikrishnan Hariharan
2a42d86692
msm8974-common: gps: Fix race condition when GPS app is closed around an SSR event
Fix race condition to get avoid stuck in modem if GPS application
is closed right around a SSR event.This fix will prevent resume the
session once HAL loc_stop has been called.

Change-Id: I4e5c3f09c097b835d8a685a8b465eb86dd06cd7a
CRs-Fixed: 1058559
2020-06-26 09:50:03 -06:00
Saurabh Srivastava
6b9221934a
msm8974-common: gps: Adding fix for KW warning
Fix for buffer overflow possibility for the thread name passed in to
pthread_setname_np() method.

Change-Id: Id323dd058eddcf50d6fd9ec8908e9997b30c561b
CRs-Fixed: 999457
2020-06-26 09:50:03 -06:00
Dante Russo
e2e1b9d26a
msm8974-common: gps: Assure event mask is set properly to get positions
The event mask can be retrieved in the context of
client thread as zero and then queued up to go to
msg task thread. By the time the msg is actually
handled in msg task thread, the actual event
mask at LOC API layer may have already changed, but
this mask would then be overridden by zero. This
can cause no modem events to ever come, including
position reports.

The fix is to not retrieve the event mask in the
client thread, but instead wait for msg to be
handled in msg task thread before retrieving it.

Change-Id: I48562d028bbfa187732686c060b5cdd62c6d5a89
CRs-fixed: 2219519
2020-06-26 09:50:03 -06:00
Katz Yamada
23fc0afe5a
msm8974-common: gps: Fix unable to clear existing event bitmasks
Fix for an issue updateEvtMask call chain is
unable to clear existing event bitmasks stored
in LocApiV02.

Change-Id: Id34e2d92a506e7300f3d9b3ec74a80a1f6822787
CRs-Fixed: 2085379
2020-06-26 09:50:03 -06:00
haohuang
a48754615a
msm8974-common: gps: Add tech_mask in UlpLocation to support report
NLP position source to Android Framework.

Change-Id: I3811e03dddb721b64b5fa4330996087f6c17efec
2020-06-26 09:50:03 -06:00
Naresh Munagala
98b9fa2f33
msm8974-common: gps: NMEA report indication to ULP
Enabled NMEA report indication to ulp

Change-Id: Ia27fe0d805f53bf17c86f7c27eaaedd960101370
CRs-Fixed: 1055201
2020-06-26 09:50:03 -06:00
Kevin Tang
09c85861d6
msm8974-common: gps: Making SUPL ES run time configurable
SUPL ES gets updated as part of the sim specific
AGPS config hot swap update. We keep that lastest
SUPL ES and send that as part of the NI request,
to let NI handler to know the config status.

Change-Id: I566725d5db9b3abdbd9a423b86c10b819217f4f6
CRs-Fixed: 1024879
2020-06-26 09:50:02 -06:00
Kevin Tang
7379550ef9
msm8974-common: gps: Fixes SUPL_MODE
Carrier specific SUPL_MODE is not updated upon sim card insert.
gpc_conf must be updated with the new value for config to be
updated.

Change-Id: I2a5f10fa7d27be9253e9ca6f34c0c886285d1b11
CRs-Fixed: 953942
2020-06-26 09:50:02 -06:00
Madhanraj Chelladurai
9886edc317
msm8974-common: gps: Consider nsec while ranking the timer objects
We need to consider nsec as well while ranking timer objects

Change-Id: Ieaad5dfa80b26b90e998618b3cbe1e590fc00839
CRs-Fixed: 991345
2020-06-26 09:50:02 -06:00
Saurabh Srivastava
ee76952f5e
msm8974-common: gps: Adding a new NMEA sentence : $GNGSA.
Currently only $GPGSA was being generated for GPS satellites.
This change adds $GNGSA for GLONASS satellites as well.

Change-Id: I7ab0e92c7ed4ce73be11909eefe0d570a1a0fc1e
CRs-Fixed: 978745
2020-06-26 09:50:02 -06:00
Arne Coucheron
62261a55b5
msm8974-common: gps: Set correct target for msm baseband
Change-Id: Ie52feed022db511abb6813f20418d23c0f5b3ba9
2020-06-26 09:50:02 -06:00
Arne Coucheron
8441090408
msm8974-common: gps: Add Cleanstep.mk
Change-Id: I1af155718ae4f48c15317b0d05303d22ec458084
2020-06-26 09:50:02 -06:00
Gareth Kitchen
d3810f950a Localise NTP to improve GPS TTFF
Testing response times to time.android.com from around the globe reveals
in ms:-

Europe			 <30
Middle East		 <68
North America		<150
Johannesburg		 183
Buenos Aires		 220
Tokyo			 226
Sydney			 276
Hong Kong		 285
Brisbane		 295
Mumbai			 349
Beijing			4691
Shanghai		4906
Russia			 n/a

Whilst time.android.com is NOT used for GPS NTP, North American time servers
are, by specifying north-america.pool.ntp.org as default in the framework,
to align with pixel devices.  I am assuming similar response times to these
servers from around the world.

Great for North America and it appears Europe but it does not address the
global issue. Also, the pool.ntp.org project forbids both hardware and
software vendors from using these default zone names.
http://www.pool.ntp.org/en/vendors.html

It makes sense, therefore, to leverage the ntp.org's existing 'android' vendor
name to make the default ntp server for GPS purposes:
1.android.pool.ntp.org this will return a random but accurate NTP server in
close geopraphic proximity to the device.

Testing on my own build in the UK seems to improve hot and cold TTFF
considerably.

Change-Id: I144af45757efa35b32daf034eece6e046d2bde79
2018-07-17 19:28:25 -06:00
Kevin F. Haggerty
399e9af90a msm8974-common: Move XTRA_SERVER entries to overlays
* XTRA_SERVERs are important, right? Like to get the almanac data
  necessary for aGPS. Without the XTRA download, the chip needs to
  collect sufficient navigation messages from the birds to compute
  where they are in order to make sense of the ranging signals.
* Well, it seems that O doesn't like reading these entries from the
  gps.conf file.

  When in gps.conf:
  GpsXtraDownloader: No XTRA servers were specified in the GPS configuration

  When in overlay:
  <that noise doesn't exist>

* This seems to, finally, return GPS fix performance to what we had
  in N.

Change-Id: I70679835ec5dea053c5aa3750acee628906d6390
2018-03-07 06:44:43 -07:00
Kevin F. Haggerty
772578a15a msm8974-common: gps: Import configs from klte-common
Change-Id: I92fbf38ecac658fa69191b89890b79e82e05acec
2018-01-18 04:37:20 -07:00
Christopher R. Palmer
c911560316 msm8974-common: gps: Unlock the GPS
[haggertk]:
 * During bring-up of O, GPS was exhibiting different behavior from
   N -- an appropriate number of satellites would immediately lock,
   but a fix would not resolve for 30-90 seconds. Digging up this
   change from the L-era allows GPS to resolve a fix in a nominal
   amount of time.

Change-Id: If9fd67483fedee915d46f7b9d2a7e0851400de3c
2018-01-18 04:37:20 -07:00
Diego Wilson
f5411b66d1 msm8974-common: gps: Move device dependent modules to /vendor
Change-Id: I8229a6e4a9512a03cbc6c9522bb1dc0ce988d1c9
2018-01-18 04:37:20 -07:00
Kevin Tang
581ea51a62 msm8974-common: gps: LOC logging macro changes
The current logging macro always uses LOGE, which is
confusing to external developer looking at our logs.
Also changed LOC_LOGx definition to follow the same
syntax as that of LOC_LOGX.

Bug: 29499503

Change-Id: I803233a9d0b241bf9aeb2ee0d4bd2e7cc52ed75b
CRs-Fixed: 1113702
2018-01-18 04:37:20 -07:00
David Ng
b4741134f2 msm8974-common: gps: Add explicit liblog dependency
Explicitly add liblog as dependency for modules that use Android
logging.  Also remove obsolete build flag.

Change-Id: I91a458b44ff34c91a8f6875f5c3e931f620c613a
2018-01-18 04:37:20 -07:00
Saurabh Srivastava
08edaade5f msm8974-common: gps: Enabling CLANG compilation and fixing all resulting errors
Removing statement to set LOCAL_CLANG flag explicity to
true. It will be true by default.

Change-Id: I2eaba5a89e64088e3383b962dceaaa7e975e997a
CRs-Fixed: 989476
2018-01-18 04:37:20 -07:00
Michael Bestas
0551f61a2a msm8974-common: gps: Hack HAL for N
* Replace GnssSvStatus with HaxxSvStatus

Change-Id: Ib96e5caff7db7cf2a7bd1cd5d9ef147c9c4b70d7
2018-01-18 04:37:20 -07:00
Scott Mertz
f066fa2e3a msm8974-common: gps: Fix build for OSS builds
gps: Correct forward declaration in proprietary definitions

Fix gps runtime error

The qcom prebuilt binary relies on FlpExtLocation_s,
so we cannot change it to FlpExtLocation.
This patch fixes it.

gps: fix remove trailing space

In setXtraUserAgent,
size_t is unsigned and never being negative.
Will cause segmentation fault, if string is all space.

Change-Id: I1cf1f956943b0739640afe909954ade6921e28a1
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
4dd7fbc1e4 msm8974-common: gps: Remove etc/Android.mk
* We don't need the target, we'll PRODUCT_COPY_FILES like sane people

Change-Id: I7f4a79d95791d974cb4b6642ef3ba76fa93a5172
2018-01-18 04:37:20 -07:00
Michael Bestas
1a49af68a6 msm8974-common: gps: Cleanup makefiles and remove useless files
Change-Id: I66848d2e220817ae61642d7211f7eabf5e4efcea
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
9cf367bddf msm8974-common: gps: Delete libloc_api-rpc
* This isn't needed

Change-Id: I7b4b33256fac5ae71b2e556ed04f0069d1aa9f39
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
29b6ae6ad8 msm8974-common: gps: Add top-level Android.mk
Change-Id: I04b2ab8c5f348dcfce23cb49b0dfeb1d3e335641
2018-01-18 04:37:20 -07:00
Kevin F. Haggerty
9433f7ab16 msm8974-common: gps: Import CAF HAL
* https://source.codeaurora.org/quic/la/platform/hardware/qcom/gps
* Tag: LA.BF.1.1.3_rb1.13

Change-Id: Ied5197b459ccc51c8b7c8288a8b1d4a6839685e4
2018-01-18 04:37:20 -07:00
slayher
d9bf9d68f9 Let the specific devices handle GPS. 2014-05-22 21:21:56 -04:00
Christopher R. Palmer
f2767f1956 msm8974-common: Add gps from hlte
Change-Id: I0a3d0df72ac2652ad1d320b31c08b260bcfa5b1c
2014-05-19 20:19:41 -04:00