Commit graph

563 commits

Author SHA1 Message Date
Christopher N. Hesse
b5b9500a62 lights: Remove superfluous log newlines
Change-Id: Id1522dfe92c9e585000edd7067b50968f38c07ca
2017-03-04 15:04:16 +01:00
Christopher N. Hesse
354f713a56 power: Remove superfluous log newlines
Change-Id: I33da39a89544f3580d395f4165b8cff4de5a4224
2017-03-04 14:58:48 +01:00
Christopher N. Hesse
0fdef0cbd6 audio: Add support for Audience EarSmart ICs
Some devices (often T-Mobile variants) have extra hardware for
incall audio processing.
Audio must be routed to the ES IC properly so it can be passed to
ALSA, otherwise the RX/TX streams are lost.

Change-Id: Ib29c747d5728a09726e14bab00f26ad273400aba
2017-03-03 21:49:59 +00:00
Michael W
68f8fb65aa Automatic translation import
Change-Id: I1e390ecacd03d6c97ea1bfe14474a37bbfe29fb2
2017-03-03 18:40:43 +00:00
Christopher N. Hesse
a13e517a69 audio: Add error logging to ril_interface
Change-Id: I447d1bf2745990bd71688847d3e9cdb432c57f47
2017-03-01 11:22:04 +01:00
Andreas Schneider
e9a44a2d55 audio: Restart the voice call on device change
When we change the device during a phone call we need to completely
restart it. This is required by the modem.

Change-Id: I902c78bf50dfb5dc3da51fca0fb862f872df86ca
2017-02-24 22:50:27 +00:00
Simon Shields
310d1999e5 liblights: add support for adjusting notification LED brightness
The old exynos4x12 lights HAL had logic for scaling the brightness of
lights according to the light's type and also scaling each R/G/B colour.

Bring this logic across, and make the battery LED not eye-searing at
night.

Based on work by Daniel Hillenbrand.

REGRESSION-66

Change-Id: Ia6108468f57c3b6c6a1a68da76a1c3362fd982a5
2017-02-24 12:53:18 +00:00
Christopher N. Hesse
5eda55f20a libsecril-client: Expose MSIM functions by default
Recent devices (zero, noble, others) link audio-ril
against this.

Change-Id: If774ff378f519b221594e8b793a95831cacd4ae4
2017-02-22 11:01:04 +00:00
Simon Shields
a9d8bf6af4 libril: use responseInts for LAST_CALL_FAIL_CAUSE on Exynos4
Exynos4 devices send two ints as a response to this request,
causing responseFailCause to think the result is a LastCallFailCause struct,
which it then tries to treat as a Java UTF-8 encoded string, causing a
crash.

Work around this by forcing responseInts (the original behaviour)
on Exynos4 devices.

Change-Id: Ied14948db3049066ffc760b6d3df09b4cefa2df0
2017-02-19 13:39:36 +00:00
Andreas Schneider
dd8a36941b audio: Improve logging in out_set_parameters()
Change-Id: I5800307905870ca836383e7d492a7472a9a386be
2017-02-19 11:47:26 +00:00
Andreas Schneider
49b9dcb284 audio: Implement WB_AMR callback correctly
Change-Id: Ib2392c8a122d07b40814ca2eeaecf30f9bdb0f99
2017-02-19 11:46:55 +00:00
Martin Bouchet
3ac2971b52 macloader: Fix default NVRAM param path
* Not sure why this was ever the default path

Change-Id: I3ae7ab2a4fc0c84d78b8eba1ec8a132f5be531e9
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
2017-02-17 11:38:13 +00:00
Abhisek Devkota
037d0779db Automatic translation import
Change-Id: I58d0e1a5a3bfb2ed098b8d31684f1c9558748c2a
2017-02-16 10:43:09 -08:00
Andreas Schneider
dde54c0469 audio: Fix get_snd_device_name() for earpiece
SND_DEVICE_MIN_OUT_EARPIECE is set to SND_DEVICE_MIN.

Change-Id: I3a442df7f388b72d433257f6ac1db473e4cb14a6
2017-02-16 14:50:48 +01:00
Christopher N. Hesse
130da9f065 audio: Cleanup and fix voicecall preparation
* if (usecase == NULL) should actually be if (vc_usecase == NULL)
 * Avoid unnecessary if-block indentation by updating the control
   flow

Change-Id: If00ac405a1eac429862b953580e8614227015134
2017-02-16 14:50:48 +01:00
Martin Bouchet
8794541f19 macloader: Add one more SEMCO3RD half address
reference here:
http://hwaddress.com/company/samsung-electro-mechanicsthailand-2

Change-Id: Iee368306bf9387b743fb77aa8d83d73c70c51f3e
2017-02-16 04:46:59 +00:00
Christopher N. Hesse
74c317d1bd audio: Guard WB_AMR callback
Some devices do not support this; some devices are WiFi only
and obviously do not have it.

Change-Id: I6d245eee447bd87849cbdfd41c0cf73c6af714e6
2017-02-15 11:25:45 +01:00
Andreas Schneider
e0058816e9 libsecril-client: Rename SOUND_AUDIO_PATH_HANDSET to EARPIECE
This still keeps SOUND_AUDIO_PATH_HANDSET in the _AudioPath enum to not
break the API.

Change-Id: If82520ff630ceb099c570e299685caef03b0d01b
2017-02-15 10:38:30 +01:00
Andreas Schneider
e6286b9208 audio: Rename HANDSET to EARPIECE to follow libsecril-client
Change-Id: I9e99e1bdf8c8c29aca4d753269190dd34c229d8a
2017-02-15 10:38:30 +01:00
Christopher N. Hesse
86f7ea8e9f Revert "audio: Disable voice log by default"
This was intentionally left enabled and does not spam anyways,
but allows users to extract helpful information without
recompiling.

This reverts commit e06577dc81.

Change-Id: I604ee674a1db466b3d3e364cb95f5688edd4947c
2017-02-15 09:42:05 +01:00
Paul Keith
f114e2ee35 audio: Use labs() instead of abs()
* abs() accepts ints as parameters,
  but this breaks compile since
  the times are longs, not ints
* Use labs() instead, which accepts
  longs as parameters, to fix compile

Change-Id: I8f980a78380cdae18abd5b9602e281beae3ee4d3
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
2017-02-14 21:31:26 -06:00
Sean hoyt
e3800acf0e Add another semco mac address
Needed for n1a3g

Change-Id: I420ddcd860351a0de0841ec5071fa0fcbd745822
2017-02-14 17:33:07 +00:00
Andreas Schneider
e06577dc81 audio: Disable voice log by default
Change-Id: I56c54fe1f3d75cbd05693f98f2f2210ea13295dc
2017-02-14 17:42:15 +01:00
Andreas Schneider
d44edaa261 audio: Log error if we fail to set the audio path
Change-Id: Ide469d644aaab2a97dd72244bd316c2ff497d9db
2017-02-14 17:42:15 +01:00
Andreas Schneider
df6fc8a6a9 audio: Add missing deep buffer to use_case_table
Change-Id: I5216838e0de257241206546f2e9f71896292fe9e
2017-02-14 17:42:15 +01:00
Andreas Schneider
adb788d97c audio: Fix device table access in get_snd_device_name()
We have a value for SND_DEVICE_NONE so we should use that. There is no
field for SND_DEVICE_MIN so we need to check it is bigger.

Change-Id: I041930c8c4b552d45804a178aeb1aa981ae7c13f
2017-02-14 17:42:14 +01:00
Andreas Schneider
58735a9cf9 audio: Fix time diff to always return positive numbers
Change-Id: I62f835f95fc1d1a671cfdb2e6e6ac1758524235f
2017-02-14 17:42:14 +01:00
Simon Shields
5b75c5763c libril: fix parceling of DataCallListV6 on xmm626x
Change-Id: I32fee851e65f8f5af3d57fc4fc588139ff6ded35
2017-02-13 10:26:17 +11:00
Christopher N. Hesse
caece2d972 ril: Fix unsol response array mapping
* Instead of messing around with indices, look up
   the requestNumber in the array.
 * This has a cost of O(N) instead of O(1) with the
   previous implementation, but we don't receive unsol
   response codes frequently enough to be worried about
   this.
 * This was needed because a few vendor reponses, aka
   RIL_UNSOL_SNDMGR_WB_AMR_REPORT at index 33 and
   RIL_UNSOL_SNDMGR_CLOCK_CTRL at index 34
   could not be addressed by their array indices anymore
   because we cannot calculate their index by the unsol
   response code we receive from the modem.

Change-Id: I27319e621c777fe19ae8908d7e0c4a46d6dd6d3b
2017-02-12 12:12:17 +00:00
Andreas Schneider
7c367c0adf audio: Update comments for voice mics
Change-Id: I3fc888a4046a2b49bc887088750dd0e5be1c543c
2017-02-12 11:57:02 +00:00
Andreas Schneider
05bc1882e2 audio: Add support for bluetooth voice calls
Change-Id: Ic63b7c09ed7401ab72824a406db333e3fbce780b
2017-02-12 11:56:30 +00:00
Abhisek Devkota
1983165ec8 Automatic translation import
Change-Id: Ia9d34e6c3621b41d1fc58812d17bae1700c7ea67
2017-02-11 12:43:38 -08:00
Andreas Schneider
757e2d8a77 audio: Remove device bit only on active_input
This makes the code less confusing.

Change-Id: I6020f892f5165a6c784b05737e29b24d7121b8c9
2017-02-11 13:59:48 +00:00
Andreas Schneider
04037e7121 audio: Add a mixer_path_0.xml template for the HAL
Change-Id: Iec0976cf7d9d54edb850b972c44b7159a2374ef2
2017-02-11 14:24:35 +01:00
Andreas Schneider
107a848bc3 audio: Add support for voice session mic mute
Change-Id: I5277736fffcb4511e4a7adb2e3e10090dcab484c
2017-02-11 14:23:16 +01:00
Andreas Schneider
59486fa48c audio: Add voice call wideband support
Change-Id: Idf6725aaaf906109ce973a8109b7c252a997dead
2017-02-11 14:23:16 +01:00
Andreas Schneider
82f3248400 audio: Add support for two mic control
Change-Id: I0176b41b071577e9e55f5177ec1219d4e9aa91a2
2017-02-11 14:23:16 +01:00
Andreas Schneider
97fa7f1c5c audio: Leave out_get_presentation_position() early when switching to WB
When the voice session switches from NB to WB we should just leave
early.

Change-Id: Ib4bfe336f6e51fa469fee50c96a81c819f58678b
2017-02-11 14:21:56 +01:00
Andreas Schneider
d6359186ea audio: Do not segfault in out_get_presentation_position()
When a voice call is stopped we switch back to the default primary
output (speaker). Then this function gets executed and as ther was
no active PCM because voice_session is handling that it segfaults
because the PCM is NULL.

Change-Id: I927504b7962b096c0d4c3642b48aee55c85ec013
2017-02-11 14:20:24 +01:00
Christopher N. Hesse
696959dda1 audio: Enable voice call support
Pair-Programmed-With: Andreas Schneider <asn@cryptomilk.org>

Change-Id: I284f21240e56dda93cb8a2ab98b903ff712504a6
2017-02-10 21:41:49 +01:00
Andreas Schneider
5a2f10031a audio: Remove unused variables and function
The unused functions have just been commented out.
This also sets the CFLAGS to -Wall and -Werror.

Change-Id: Iea097426313a68a01a074627115853fccc680579
2017-02-10 21:35:24 +01:00
Andreas Schneider
ecd17ce8ba Revert "audio: Remove unused screen_state parameter"
We want that to avoid an error message in the log, so revert the
revomal.

This reverts commit cdad20da45.

Change-Id: Ic90cd6b02e5b3e8aae73d824153c3084643a8acc
2017-02-10 21:33:14 +01:00
Andreas Schneider
9c195610df audio: Improve error message for RILD connection
We need to make it more prominent so people recognize it and fix their
connection.

Change-Id: I36218ac130351b053f7fda2319d797885ac0930e
2017-02-10 21:33:04 +01:00
Christopher N. Hesse
41c9f3d2bc audio: Initialize the radio voice session
This just allocates the structre and creates the RIL connection. This is
per audio_device structure to make sure we to not run into issues with
audioserver threading.

Change-Id: I42e1b7ae57579f39c5f76566ef5b67d4e2c13e3f
2017-02-10 20:31:20 +00:00
Christopher N. Hesse
bc52af5471 audio: Add ril_interface to talk to radio
This is based on previous work for tuna, i9300,
i9500 and many other devices.

Change-Id: Ie94f12ee7940ffae84aec5e409a2a831b34d616f
2017-02-10 20:30:35 +00:00
Andreas Schneider
74ef3a12fc audio: Create a structure for voice to group values
Change-Id: I184d39460aa8a9a3ee5efc5fe3aa63e99a2e9d12
2017-02-10 20:29:56 +00:00
Christopher N. Hesse
afec0fd5ca macloader: Rework mac address half classification
* Don't return in the middle of a function, set the
   return code and jump to the exit point instead.
 * Close file pointers properly.
 * Unify error code returns (macloader will always exit
   with -1 on error now).

Change-Id: I32ac8ea85fcbabed45550a4d176ac999eff9f9e9
2017-02-10 20:29:26 +00:00
Andreas Schneider
759368fbc0 audio: Add a delay for DSP firmware loading
This is turned off by default.

Change-Id: Idf764933c67e6666cb2cc0043fa7a7e86935488d
2017-02-10 16:18:59 +00:00
Christopher N. Hesse
5fada9b0c8 power: Add support for POWER_HINT_CPU_BOOST
Change-Id: I75030eb2dabfed518e961d71efb9d55670d2808a
2017-02-09 19:54:30 +00:00
Christopher N. Hesse
c7dd07ab9b macloader: Add another SEMCO mac address half
http://hwaddress.com/?q=d8%3Ac4%3Ae9

Change-Id: I80c7be6cb61d8eea1be72118104b1cd2397d48a1
2017-02-09 18:44:07 +00:00