Commit graph

531 commits

Author SHA1 Message Date
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
Paul Keith
df4a1d6c77 macloader: Add default NVRAM calibration path
* This also causes NVMRAM calibration to be on by default
* Most devices should be using this, so don't make them override

Change-Id: Ied6e8f4ebd131ae992814bf83c9e7bb379ca9d79
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
2017-02-09 18:41:40 +00:00
Paul Keith
59ba89e0d0 macloader: Allow overriding non-standard paths
* Follow the rest of the hals

Change-Id: Ib3bf92b3e975d96586802a1473c589fc9536ad40
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
2017-02-09 18:41:18 +00:00
Jesse Chan
cd60dd84b0 fingerprint: bauth: convert % completed to remaining
* Samsung uses fingerprint enrollment % completed
  while AOSP uses fingerprint sample remaining.

* This patch converts this data to AOSP-friendly one via (x = 100 - x).

Change-Id: I27034cb148e0f33f7d3efae9c75123715452f178
Signed-off-by: Jesse Chan <jc@linux.com>
2017-02-09 17:31:48 +00:00
Jesse Chan
b23aaf793d add Samsung BAUTH Fingerprint HAL
Change-Id: I3c0d3e2a0f9b77f0202cbdb0a75a00b760afcd8c
2017-02-09 17:29:54 +00:00
Christopher N. Hesse
650848675d ril: Align to AOSP libril
* Adjusted whitespace to minimize diffs
 * Plugged memory leaks
 * Fix use-after-free
 * Use calloc instead of alloca
 * Reworked the Samsung request/response code to be
   more readable

Change-Id: Ifd07b525fc84e8a3fca584d4d412785974ca3482
2017-02-09 11:12:02 +00:00
Andreas Schneider
928ddca2ec libsecril-client: Fix logging
Change-Id: I370e70ebfb8fca3d610cdf58c8ac793844d23cb8
2017-02-08 18:46:29 +01:00
Fevax
86ac23487e audio: Allow playback on earpiece too
For VoIP we need to have output on the earpiece.

Change-Id: I5c5488a184b3efe4f95a2d0602ad286b1eba7780
2017-02-08 10:19:23 +00:00
Paul Keith
6e35157bd6 macloader: Decapitalize wisol MAC addresses
* These should be lowercase, otherwise detection will fail

Change-Id: Ibdc446a8f9c58bc9b17b8e9c6cfd5f4894f7ecff
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
2017-02-07 15:17:17 -06:00
Andreas Schneider
6d31bae512 audio: in_call is a bool type
Change-Id: Ie8db6ddac7f3cb64acd4bf95be00744754a2907d
2017-02-07 13:05:54 +00:00
Andreas Schneider
7cc49b4fb2 audio: Remove unused audio routes
Change-Id: Ia3670f075369eb721e12588c5c6f0b3525a51e67
2017-02-06 18:23:51 +01:00
Andreas Schneider
a366011f60 libsecril-client: Turn off logging by default
Change-Id: I4fabfafbf593c9a08e33698adbe488998c610610
2017-02-06 18:23:50 +01:00
Andreas Schneider
560e37ac0a libsecril-client: Use RLOG
The radio log prints use-Rlog/RLOG-RILClient as the prefix, so we should
use RLOG and not ALOG.

Change-Id: I5c217cca9510948871b4157f69361c869dea2a01
2017-02-06 18:21:05 +01:00
Andreas Schneider
0130b88891 libril: Use RLOG
Change-Id: I6b7ed9fc11b03669c3cb4405c25509c6b00401e3
2017-02-06 18:18:49 +01:00
Simon Shields
fc68d3abb8 exynos4x12: use common samsung liblights
Change-Id: I5615413d5427177af0d161cfac24e98e18bf017b
2017-02-06 03:02:48 +00:00
Abhisek Devkota
9227fbea9f Automatic translation import
Change-Id: I3bb868755965b072319ff5a4ddaebb32c2f3c4ac
2017-02-04 16:22:02 -08:00
Jesse Chan
67a74448ff add a common mkbootimg.mk to quiet "KERNEL IS NOT SEANDROID ENFORCING" warning
* dtimage part is taken from vendor/cm

Change-Id: I243af7a0158ea64fe4c524e98f084b073944f5bb
2017-02-04 18:58:24 +00:00
Andreas Schneider
3b643835f9 audio: Disable support for IRQ affinity by default
Change-Id: I410f0037747149471a1d5fe7cf38720121938822
2017-02-02 13:15:09 +01:00
Andreas Schneider
56204f6d19 audio: Correctly handle out of memory conditions
Change-Id: Id7e0ab1085d3e38c1eaa7905a17726e9d1a68cc9
2017-02-02 13:15:04 +01:00
Andreas Schneider
dc15cec22a audio: Make speaker swap on screen rotation optional
Change-Id: I73623629c4418bff8178793d856d8da98b694283
2017-02-02 12:39:54 +01:00
Andreas Schneider
cdad20da45 audio: Remove unused screen_state parameter
Change-Id: I3359e5e6c0d49bc5067f3a78f2f5a1b087c7ae4b
2017-02-02 12:39:54 +01:00
Andreas Schneider
a2b77321b1 audio: Remove tty_mode which we do not support
Change-Id: Ifdde7e0ae6b6f1a293d6fa50625ab70ba1fc63a1
2017-02-02 12:39:54 +01:00
Christopher N. Hesse
530cf0d012 audio: s/handset/earpiece/g
HANDSET is too similar to HEADSET.
Choose a better name instead and call it EARPIECE
like everyone else.

Change-Id: Ida986366e2ef16cb422cba6ecaeedbe8c1ae9908
2017-02-02 11:39:00 +00:00
Christopher N. Hesse
ce6d5afbcd audio: Implement get_capture_position()
Change-Id: Ib9f637d30774b2a9aa23e6958ce5465d90eae467
2017-02-02 11:37:05 +00:00
Christopher N. Hesse
e6b3a3eae4 audio: improve read/write timing for streams
Change-Id: Ic4231c4b44369a9438c6c94622b90862047e9a32
Reference: 0caeee8ac4
2017-02-02 11:36:32 +00:00
Andreas Schneider
b7f32128dc audio: Use C99 initializers in read_frames()
Change-Id: I69d9ac00dbd7126682c66087804c2b33cf6c86bc
2017-02-02 11:35:48 +00:00
Andreas Schneider
cabe5e6aef audio: Fix memory leak when preprocessing is disabled
Change-Id: Ia168de215200ae9e1f4740cf5623b39058b3797c
2017-01-30 22:51:15 +01:00
Christopher N. Hesse
8414bd240a audio: Allow targets to override the deep buffer device
Change-Id: I539403661e40e5be7eb5cc130a4b8ad8331d2a4a
2017-01-30 21:49:42 +00:00
Christopher N. Hesse
d23c6b5fcd audio: Move card specfic defines to a header
Change-Id: Iec74ee5c4c0cf93e3a7413901e128b76cf708dbb
2017-01-30 21:47:10 +00:00
Christopher N. Hesse
757ac41a40 audio: Factor out offload code
Change-Id: I94a592262016d954318dab3d1339504e54f83681
2017-01-30 21:46:10 +00:00
Christopher N. Hesse
0612a4efc0 audio: Rename header guard macro
Change-Id: I350616da3ba98965d2dcdd533e57d77b0ac7e41a
2017-01-30 21:40:15 +00:00
Christopher N. Hesse
c8502b9ea8 audio: Update module name/author
Change-Id: I744742d6be18a4b599e58f3c005154d5a944bd0f
2017-01-30 21:39:20 +00:00
Christopher N. Hesse
052094be3b audio: Remove dummybuf headphone GPIO code
Change-Id: I004ac324df61f37083858c6a5f01f093ad19f98b
2017-01-30 21:38:30 +00:00