Commit graph

563 commits

Author SHA1 Message Date
Andrea Arcangeli
a322ea2bdd macloader: Drop semcove case and enum
The all_ranges structure has one entry less than MAX_TYPES because
semcove type is not defined there, but there's no check for NULL and if
the mac isn't found it segfaults.

Change-Id: Ie218ea0a82b03992085db0f2d1cfc7079e7415a0
2017-07-26 18:02:32 -06:00
Basil Gello
72aac79216 secril-client: Fix RIL client token management in SendOemRequestHookRaw()
On some devices, like SM-T805 (Galaxy Tab S 10.5 LTE), the RIL client
code produces errors "SendOemRequestHookRaw: No token" due to large
amount of tokens allocated by OEM messages requiring no response from
RIL daemon (like set call audio path, set call volume, set mite etc).

The indicator of an OEM message with no response expected is:

     RegisterRequestCompleteHandler(client, REQ_XXX, NULL);

inside the RIL client message method. To prevent the token pool from
overflows, the proposed patch de-registers the token and frees its call
history if the handler for this message req_id is set to NULL.

Change-Id: Id414263bf471115797cae1a9ed628249734b9347
2017-07-17 22:15:16 +00:00
Basil Gello
338942b188 secril-client: return exact error code from blockingWrite()
Change-Id: Ibb6d3636648480c53a2fd19044eefe5b97f1eceb
2017-07-13 19:19:56 +00:00
Christopher N. Hesse
1146f1a616 Revert "power: Temporary logging fix"
This reverts commit ff86846e97.

Change-Id: I46aa4d6606c3c519322b2e2cd048bd312a15fa4d
2017-07-13 21:17:23 +02:00
Christopher N. Hesse
7ad73bc372 power: Allow for a dynamic cluster configuration
Change-Id: I542b36d26cad23f29e70ab70d996c95ca3ab11a7
2017-07-13 19:13:51 +00:00
Christopher N. Hesse
ff86846e97 power: Temporary logging fix
This will be reverted once the more advanced mechanism
(https://review.lineageos.org/#/c/179092/) goes in.

The boost fd logging will be restored once
https://review.lineageos.org/#/c/180313/ makes it into
the code base.

Change-Id: Ifc1b4a2ba3e1c4283d74eafec45c5fbf07153f03
2017-07-09 23:08:10 +02:00
Christopher N. Hesse
775bce8f14 power: Print information on boot
Change-Id: I1a8ba54f1b27c2e96c6bae77046dc207cdf35025
2017-07-09 20:40:38 +00:00
Christopher N. Hesse
0da5fbf3e2 power: sysfs_read: Do not store newlines
Change-Id: If20b509b489b056ac3b37c208c42bc5407f61802
2017-07-09 20:36:32 +00:00
Luca Stefani
f6e983c722 AdvancedDisplay: Refactor
* Integrate with Settings
* Remove back button

Change-Id: Ie3bcd43ef7225bdc3b177446906335f59561b584
2017-06-26 18:56:40 +00:00
Abhisek Devkota
5b0f1435a0 Automatic translation import
Change-Id: I352dfea4f441b2b1a7d14b4e665f1fe77eecc99c
2017-06-22 20:56:50 -07:00
Dheeraj CVR
601bcef48e exynos: multimedia: add support for OMX_IndexParamVideoIntraRefresh parameter
filiprrs: This fixes miracast, and possibly resolves issues with features
like chromecast, screen recording, wifi display etc.

Change-Id: I35f789a9ae29df0198b21c98dc866d8886799893
2017-06-22 06:18:25 +00:00
Jason Vidal
e95e9c31a1 liblights: Fix fast blinking notification LEDs.
Seems that the fast blinking notification LEDs experienced on some
Samsung devices was due to the removal of these two lines that clean
the 'blink' array. Propose re-inserting to correct the fast blinking
LED issue.

Change-Id: I88ea828a50468aae494b1dd54290607308de543a
2017-06-19 13:54:09 +00:00
Dominggoes Isakh
df15802d15 liblights: Add BLN support
Change-Id: I3745b7c4ca7adadd62e116c71cd7357a4e8ed015
2017-06-15 22:17:47 +02:00
Paul Keith
ab9abf68b7 liblights: Fix variable button brightness code
* Because we're using #ifdef in set_light_buttons(),
  defining VAR_BUTTON_BRIGHTNESS to anything, including 0,
  results in the button brightness code being enabled
* That results in broken touchkey backlight for devices
  that don't override the samsung_lights header, or defined
  this macro to 0 in their device's samsung_lights header
* Comment out the macro to correct this logic

Change-Id: Icf554b0deac975f729f1a70e517341dae74f3657
2017-06-02 21:23:51 -05:00
Abhisek Devkota
ec8569b990 Automatic translation import
Change-Id: I376a4f179af4bd395ca9c17da93f5101aca4c68c
2017-05-31 20:10:28 -07:00
Dominggoes Isakh
d81a0a3b06 liblights: Add support for variable touchkey brightness
Change-Id: Icc5c589e88dc342ae50b432187bae65a9b3a23d7
2017-05-30 22:14:32 +00:00
Christopher N. Hesse
63b5bd7d6b power: Write IO busy parameter for big cluster
Change-Id: I9e09f640b956be87729df735225fcfe8f066ab48
2017-05-29 20:45:14 +02:00
Christopher N. Hesse
b0d8610bdb modemloader: Add support for recent devices
* Try to read the hardware revision from the
   bootloader before parsing /proc/cpuinfo
 * Set more properties to catch all recent device
   needs as well
 * Introduce a property to let other services (cbd)
   know they can start

Change-Id: I50d8ec37921ec2559bdd7fe852d830f10fe1c12e
2017-05-25 17:46:35 +02:00
Abhisek Devkota
b1d4bcbadd Automatic translation import
Change-Id: I15bc33336962fd84fcb328d5fda461e5ce0bd495
2017-05-17 22:23:14 -07:00
Christopher N. Hesse
5eca5aa565 power: Allow POWER_HINT_LOW_POWER hint to disable power save mode
Change-Id: I3b4c90f05267ca4182187361e5d373adb6de25d7
2017-05-06 20:27:04 +00:00
Abhisek Devkota
8920be7d43 Automatic translation import
Change-Id: I7cdf0153bcb66bf25d80c694022018b5d89287e2
2017-04-28 15:17:09 -07:00
Abhisek Devkota
a58b7d9f98 AdvancedDisplay - Rename default scenario
Change-Id: I6122234ef08b78958e28d3a127b3c73757a43445
2017-04-27 10:54:53 -07:00
Jesse Chan
9432ff3385 mkbootimg: add exynos subdir to possible_dtb_dirs
Change-Id: I70e5e0817ff0b63da7df3ab63f42b815170096e4
2017-04-25 17:40:04 +08:00
Paul Keith
5e4fbe091d power: Sanity check touchscreen path
* Let's not always assume this isn't NULL

Change-Id: I181cb014fc06d0f0ca795c3ecc374ccf9dbb57f1
Signed-off-by: Paul Keith <javelinanddart@bestas.gr>
2017-04-24 14:14:53 -05:00
Abhisek Devkota
1961bdbc43 Automatic translation import
Change-Id: I201d7c8ce8c9495085e68a76e14aa8d67caa31de
2017-04-20 12:10:52 -07:00
Christopher N. Hesse
3fa2b6951e power: Align to AOSP API
AOSP power hints can have a NULL data parameter,
only our custom hints are guaranteed to provide data.

Change-Id: Ibea874e75a7092b3f9c1c56dc5182cdf73f35532
2017-04-05 18:58:09 +02:00
Christopher N. Hesse
5781c8ec57 power: Remove unused variables
Change-Id: I805a12837bd013e71c098479279dcc5895ea1e1d
2017-04-05 18:58:09 +02:00
Christopher N. Hesse
e37aedde2e lights: Put back fd checks before closing
While close(NULL) is indeed a harmless noop, fd can
end up being < 0 for us.

Change-Id: I56dcd7fb61c72d3ce750b13329ff42e11ab63c84
2017-04-05 18:58:09 +02:00
Christopher N. Hesse
235c298767 lights_helper: I/O API cleanup
* buf => buffer for consistency
 * explicitly cast strtol retval to int
 * close(NULL) is a no-op, remove superfluous checking
 * replace variying buffer sizes by INT_MAX_STRLEN
 * always return signed errno codes

Change-Id: I972e33e2435ec7d68a8ffdc5ab88a14d8005ff55
2017-04-02 17:27:58 +02:00
Christopher N. Hesse
d483dd7898 audience: Cleanup write_int()
Change-Id: Idfec2093c63a864d5f9d37353adbf6f8fc5d4fcd
2017-04-02 14:14:46 +02:00
Christopher N. Hesse
658f447ad3 audience: Use O_WRONLY flag for write_int()
Change-Id: I9a0bdc78644e7a4875d7e49051722fff3d47ee6b
2017-04-02 14:12:54 +02:00
Christopher N. Hesse
2036814f43 audience: Always log write_int() fails
Change-Id: I747c38646599ae3f687279ca8a95db804f3ad015
2017-04-02 14:11:25 +02:00
Christopher N. Hesse
705246055a audience: Warn when we cannot handle the output device
Change-Id: I0cddd94f22c5e912436682d713a1ae441723cfee
2017-04-02 14:07:46 +02:00
Christopher N. Hesse
f9b8e83975 power: Add POWER_HINT_DISABLE_TOUCH support
Change-Id: I363df278598e3402692424539638f3547c648e26
2017-04-02 13:15:40 +02:00
Abhisek Devkota
047075e2a7 Automatic translation import
Change-Id: I58d68d3bc81f39d0b452a9aa1f408a0e6830de63
2017-03-29 14:27:17 -07:00
Martin Bouchet
4bf8a7978e PowerHAL: Update the hispeed_freq value before using it
The hispeed_freq value is read only in the inizialization process.
If we decide to change it later writing a new value to the node
this new value wont be taken into consideration by the power hal.
Lets update the hispeed_freq value in the power hal before using
it to limit the max cpu freq when we go into power save mode.

Change-Id: I4b8c7f67259750b2931b18c3871874022aa6054d
2017-03-28 19:28:29 +00:00
Christopher N. Hesse
56caa269d2 audio: Split BT SCO media/incall paths
Change-Id: I23a621855e8b96edcd92d8740dfec270ff7e7407
2017-03-20 19:48:35 +01:00
Fevax
51bd12c20d audio: add support for bluetooth wideband voice calls
Change-Id: I02bf23a83c52389cc02ba1f61572eb651418fe24
2017-03-20 14:44:03 +00:00
Christopher N. Hesse
81f714d57a power: Rework governor path abstraction
Construct the paths for the driver based on the device
specific header data.

Change-Id: Ic7c72a2bbe6f199e1297f41817840059595f516d
2017-03-18 17:48:13 +00:00
Abhisek Devkota
c9bdb4d506 Automatic translation import
Change-Id: Ib6bc0641aa25b3f4071b3ad2e57a5c084d418916
2017-03-15 13:38:37 -07:00
Christopher N. Hesse
2981f792c4 power: Cleanup hint handling
Change-Id: I828a68105272fef3fe454561d98825f8703bca0b
2017-03-14 08:05:53 +00:00
Christopher N. Hesse
15b63090f2 power: Discard hints in power save mode
Change-Id: I9c3701261e49023761599ebaa8cd3e09a88a40c6
2017-03-14 08:05:31 +00:00
Christopher N. Hesse
f70cf8ac6b power: Keep boostpulse fd opened
No one else should be writing to this, so keep the fd
opened.

Change-Id: I4258f7f7d69250f4832a67807031ab3faa9ff586
2017-03-14 08:05:13 +00:00
Christopher N. Hesse
f21fbdb02e power: Keep boostpulse fd opened
No one else should be writing to this, so keep the fd
opened.

Change-Id: I4258f7f7d69250f4832a67807031ab3faa9ff586
2017-03-14 08:04:43 +00:00
Luca Stefani
a042209f66 liblights: Always apply linear scaling if max brightness isn't 255
* As of now the code account only max_brightness > 255
  -> Check if max_brightness != 255 and apply the scaling
     even if the max_brightness is less then 255

Change-Id: I809ece5844c8ccf20ae6507f23d308fe3ddfe94b
2017-03-13 15:11:53 +01:00
Abhisek Devkota
3c99507fb6 Automatic translation import
Change-Id: I27a0fd483b301f46556d5e37819ee2bdcf346046
2017-03-08 14:06:35 -08:00
Christopher N. Hesse
65c65bd186 power: Initialize device power paths
Change-Id: I56481946e2e3f4a80f2d3a7713ce61ed7923666d
2017-03-07 23:02:10 +01:00
Christopher N. Hesse
d9106e98b2 power: Cleanup touchkey handling
* Simplify interactive changes
 * Better support for non-touchkey devices
 * Only perform read I/O in samsung_power_set_interactive
   if needed (improves wake->panel_on delay)

Change-Id: If7bd6a1833ac7605db437ef3664230f9a452d58b
2017-03-07 22:50:41 +01:00
Christopher N. Hesse
f154b17b79 lights: Add a log tag
Change-Id: I7f4643324ed5c52b60ceede5f1ad8f24131cf3c0
2017-03-04 16:03:33 +01:00
Christopher N. Hesse
209f5deec3 lights: Cleanup read/write API
* Use O_WRONLY for write
 * Return errno for write
 * Log all failures
 * Fix read_int():
   We would always treat strtol(...) = 0 as an error,
   although the real value can very well be 0.
   Check the end pointer to fix this.

Change-Id: Id2bc9acc103a7a6400dd06f3904af37cbb0b5174
2017-03-04 15:42:49 +01:00