Commit graph

1771 commits

Author SHA1 Message Date
Michael Sun
da329da599 Merge "Update to use new android.system.suspend.control AIDL interface" am: 307c8e8d53 am: 55d8f268a9 am: 2e4633d238 am: cadb0b395e
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1480617

Change-Id: I9ac920d1abd0fd42ab68973caf4bdab5286e9bcb
2020-11-06 19:40:26 +00:00
Michael Sun
cadb0b395e Merge "Update to use new android.system.suspend.control AIDL interface" am: 307c8e8d53 am: 55d8f268a9 am: 2e4633d238
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1480617

Change-Id: I2681b7ad8b87965ff4fe8fd38118ffcfc35d1435
2020-11-06 19:20:04 +00:00
Michael Sun
2e4633d238 Merge "Update to use new android.system.suspend.control AIDL interface" am: 307c8e8d53 am: 55d8f268a9
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1480617

Change-Id: If27d8017873ad3e802b3a57b3d9c5e1069341470
2020-11-06 19:05:53 +00:00
Michael Sun
55d8f268a9 Merge "Update to use new android.system.suspend.control AIDL interface" am: 307c8e8d53
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1480617

Change-Id: I84df993d0c1b15769d60e2dcbf2c86fa66d97195
2020-11-06 17:39:23 +00:00
Michael Sun
307c8e8d53 Merge "Update to use new android.system.suspend.control AIDL interface" 2020-11-06 17:35:58 +00:00
Michael Sun
2ab27a5e1e Update to use new android.system.suspend.control AIDL interface
The suspend_control_aidl_interface is updated, renamed, and splitted
into android.system.suspend.control and
android.system.suspend.control.internal. Update to use the correct
interfaces.

Test: atest libpower_test
Bug: 171598743
Change-Id: I707f5cb868e6756147587e0e097e77ec50995bd4
2020-11-03 04:34:38 +00:00
Roshan Pius
85bac74511 Merge "libhardware_legacy(wifi): Add STA + STA APIs" 2020-10-20 23:18:30 +00:00
Nate Jiang
4eb8117537 Merge "[Aware] Add instant mode support" 2020-10-20 16:19:00 +00:00
Roshan Pius
354fe63de7 libhardware_legacy(wifi): Add STA + STA APIs
Bug: 170305665
Test: Compiles
Change-Id: I23633ee79b27a602a609edf84efec49b39af0ac9
2020-10-19 17:33:46 -07:00
TreeHugger Robot
937a6813c3 Merge "Convert mask types from uint32_t to enum type" 2020-10-13 05:05:42 +00:00
Xin Li
c8c9cb64c0 [automerger skipped] Skip ab/6749736 in stage. am: be29278c3c -s ours am: 64b3ae3cad -s ours am: a4bb7bd5a1 -s ours
am skip reason: Change-Id Ie1c3b77e7aa7b41121aa855e294459e8fc32c58f with SHA-1 1021e13396 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/12797393

Change-Id: Idb402a10e109c2118631a6d8b8bded6938d59cad
2020-10-12 03:17:28 +00:00
Xin Li
a4bb7bd5a1 [automerger skipped] Skip ab/6749736 in stage. am: be29278c3c -s ours am: 64b3ae3cad -s ours
am skip reason: Change-Id Ie1c3b77e7aa7b41121aa855e294459e8fc32c58f with SHA-1 1021e13396 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/12797393

Change-Id: I24190625b667a1c6bc3da40ea89822a52f7ee701
2020-10-09 03:42:35 +00:00
Xin Li
64b3ae3cad [automerger skipped] Skip ab/6749736 in stage. am: be29278c3c -s ours
am skip reason: Change-Id Ie1c3b77e7aa7b41121aa855e294459e8fc32c58f with SHA-1 1021e13396 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/12797393

Change-Id: Ic257767606e96e64204868b747198ac216fff046
2020-10-09 03:23:00 +00:00
Xin Li
be29278c3c Skip ab/6749736 in stage.
Merged-In: Ie1c3b77e7aa7b41121aa855e294459e8fc32c58f
Change-Id: Id1d0fa3001c520f80d1f95605f7e13213db562b5
2020-10-08 17:22:38 -07:00
Mikhail Naganov
afea6a410f Convert mask types from uint32_t to enum type
This applies to the following types:

- audio_gain_mode_t;
- audio_flags_mask_t;
- audio_channel_representation_t;
- audio_channel_mask_t;
- audio_devices_t.

Enum types are distinct thus proper overloading on the type
is possible in C++. Also, assignments to enum types are
less prone to errors.

Bug: 169889714
Test: basic audio functionality
Change-Id: I6366511b421ccab2782310ecc15a13e08d9c17af
2020-10-08 17:25:28 +00:00
Treehugger Robot
ad5602aa0c Merge "block_suspend: avoid CPU spinloop" am: 9a3f98fe6d am: ca1925f900 am: e780e61a65 am: 3fe3db2c92
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1453335

Change-Id: I0821ad7ca3045ff217cafcebdcd30bbc6c4998a8
2020-10-07 23:20:18 +00:00
Treehugger Robot
3fe3db2c92 Merge "block_suspend: avoid CPU spinloop" am: 9a3f98fe6d am: ca1925f900 am: e780e61a65
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1453335

Change-Id: I8a893e0603b8b8225728057ca3368f8ac70d713d
2020-10-07 22:57:01 +00:00
Treehugger Robot
e780e61a65 Merge "block_suspend: avoid CPU spinloop" am: 9a3f98fe6d am: ca1925f900
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1453335

Change-Id: I587d0fa6338f9a31be1a04f95efc8f583622cf9a
2020-10-07 22:37:40 +00:00
Treehugger Robot
ca1925f900 Merge "block_suspend: avoid CPU spinloop" am: 9a3f98fe6d
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1453335

Change-Id: I64dc4f201be5a5c37ddfa5194c276a3c421003bd
2020-10-07 22:11:31 +00:00
Treehugger Robot
9a3f98fe6d Merge "block_suspend: avoid CPU spinloop" 2020-10-07 21:58:30 +00:00
Steven Moreland
0e63fb5593 block_suspend: avoid CPU spinloop
For verification of blocked suspend or other unit testing, the spinloop
is fine. However, making it sleep so that it is more viable to assist
with power testing or for any other test where avoiding changes to
device performance is important.

Bug: N/A
Test: run, and ps:
root          4179  4168   18720   4724 __se_sys_nanosleep_time32 0 S block_suspend

Change-Id: I81545ae7db1c1fad2cb94d00456d1a6773868111
2020-10-07 18:03:00 +00:00
Xin Li
00a4952e17 [automerger skipped] Merge "Merge Android R" am: cff73710d4 -s ours am: b8799f91f5 -s ours am: fb376639c3 -s ours am: 12db30c415 -s ours am: 4537fb436c -s ours
am skip reason: Change-Id Ia45f259338a1f8255e22c7ba6125e8149eaa9081 with SHA-1 936c77642d is in history

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1422399

Change-Id: I1a12dfb59139354bd728d3585345f8fa0716cba2
2020-09-11 21:27:15 +00:00
Xin Li
4537fb436c [automerger skipped] Merge "Merge Android R" am: cff73710d4 -s ours am: b8799f91f5 -s ours am: fb376639c3 -s ours am: 12db30c415 -s ours
am skip reason: Change-Id Ia45f259338a1f8255e22c7ba6125e8149eaa9081 with SHA-1 936c77642d is in history

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1422399

Change-Id: I3494c35ec5ed13116ce250afcfbe99c3a8776a81
2020-09-11 03:58:46 +00:00
Xin Li
12db30c415 [automerger skipped] Merge "Merge Android R" am: cff73710d4 -s ours am: b8799f91f5 -s ours am: fb376639c3 -s ours
am skip reason: Change-Id Ia45f259338a1f8255e22c7ba6125e8149eaa9081 with SHA-1 936c77642d is in history

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1422399

Change-Id: I0245f892a00f5c51c8d0a0d9bdf2e53de833b6ec
2020-09-11 03:33:15 +00:00
Xin Li
fb376639c3 [automerger skipped] Merge "Merge Android R" am: cff73710d4 -s ours am: b8799f91f5 -s ours
am skip reason: Change-Id Ia45f259338a1f8255e22c7ba6125e8149eaa9081 with SHA-1 936c77642d is in history

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1422399

Change-Id: I7d8055b131b1a51714aca201f347a5e3f36028eb
2020-09-11 02:02:24 +00:00
Xin Li
b8799f91f5 [automerger skipped] Merge "Merge Android R" am: cff73710d4 -s ours
am skip reason: Change-Id Ia45f259338a1f8255e22c7ba6125e8149eaa9081 with SHA-1 936c77642d is in history

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1422399

Change-Id: Iee6dab710c007de5b0f841a87004163aa2fc3e28
2020-09-11 00:39:43 +00:00
Xin Li
cff73710d4 Merge "Merge Android R" 2020-09-10 17:22:41 +00:00
Xin Li
5c585b6aed Merge Android R
Bug: 168057903
Merged-In: Ia45f259338a1f8255e22c7ba6125e8149eaa9081
Change-Id: I780a337f81956c8fb9b33b2034e62f89ac3cf3e0
2020-09-08 16:55:30 -07:00
Xin Li
f2a3bdbe11 [automerger skipped] Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709) am: 936c77642d -s ours am: aa6ee6a69a -s ours am: ea9f4a294f -s ours am: 8f8ba91d47 -s ours
am skip reason: Change-Id I5081765a1f7067786819df994029cd37a56ec570 with SHA-1 241bea678f is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/12470018

Change-Id: I71fc9b0e529a394dfde3244dac482347bfd1fa15
2020-09-02 01:59:09 +00:00
Xin Li
8f8ba91d47 [automerger skipped] Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709) am: 936c77642d -s ours am: aa6ee6a69a -s ours am: ea9f4a294f -s ours
am skip reason: Change-Id I5081765a1f7067786819df994029cd37a56ec570 with SHA-1 241bea678f is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/12470018

Change-Id: Iaadab5c4458d21648f7885078030853357dff132
2020-09-01 22:09:43 +00:00
Xin Li
ea9f4a294f [automerger skipped] Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709) am: 936c77642d -s ours am: aa6ee6a69a -s ours
am skip reason: Change-Id I5081765a1f7067786819df994029cd37a56ec570 with SHA-1 241bea678f is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/12470018

Change-Id: I7c30a598562fcdce228fa715621e79a4981718f6
2020-09-01 21:46:28 +00:00
Xin Li
aa6ee6a69a [automerger skipped] Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709) am: 936c77642d -s ours
am skip reason: Change-Id I5081765a1f7067786819df994029cd37a56ec570 with SHA-1 241bea678f is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/12470018

Change-Id: I0ce66766b166fc58d5408d4b7bc44732bd8eb7f0
2020-09-01 20:36:53 +00:00
Xin Li
936c77642d Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I5081765a1f7067786819df994029cd37a56ec570
Change-Id: Ia45f259338a1f8255e22c7ba6125e8149eaa9081
2020-08-27 10:16:42 -07:00
Nate Jiang
9e25034006 [Aware] Add instant mode support
Bug: 160725208
Test: build
Change-Id: Ia123cba1669c71317723831385d9c5b234155563
2020-08-26 14:41:52 -07:00
Jimmy Chen
ba1d91c5fd Wifi: add 60GHz feature bit
Added a new feature code INFRA_60G for chips that operate
on the 60GHz band.

Bug: 146922967
Test: atest VtsHalWifiV1_0TargetTest VtsHalWifiNanV1_0TargetTest VtsHalWifiApV1_0TargetTest \
            VtsHalWifiV1_1TargetTest \
            VtsHalWifiV1_2TargetTest VtsHalWifiNanV1_2TargetTest \
            VtsHalWifiV1_3TargetTest \
            VtsHalWifiApV1_4TargetTest VtsHalWifiNanV1_4TargetTest VtsHalWifiRttV1_4TargetTest

Change-Id: I4248c6d5e086305a7628497675fbd5b2a5b52e1b
2020-08-11 14:18:42 +08:00
Jimmy Chen
28f471d3bf Wifi: enhanced API to support multiple WIFI chips
Enhance the API to support multiple WIFI chips.
Each WIFI chip is represented by a separate and independent
vendor HAL library providing its own function table
(wifi_hal_fn structure).
New functions added to the function table in order to
better support multiple WIFI chips:
1. In the existing hardware/interfaces/wifi implementation,
WIFI chip modes and concurrency combinations are hard-coded.
Since each WIFI chip can have its own concurrency
combinations, it is no longer possible to hard-code the
modes/combinations.
Add new function wifi_get_chip_modes for reporting
chip modes/concurrency combinations. For backward compatibility,
if the vendor HAL does not implement this function,
the previous hard-coded chip modes and concurrency combinations
will be used.
2. In the existing hardware/interfaces/wifi implementation,
when creating a new interface, it will use a fixed name
such as wlan0 or wlan1. This does not extend well to
multiple WIFI chips, as different WIFI chips may want
to use their own interface names, or the suggested interface
name may have been pre-created by another chip.
In order to better support interface creation on multiple
WIFI chips, add a function wifi_get_supported_interface_name
that allows the vendor HAL to specify its own interface
name for upcoming interface creation. If the vendor HAL returns
an interface name, it should be passed to
wifi_virtual_interface_create to create the interface
with the provided name.
3. In the existing hardware/interfaces/wifi implementation,
wifi_initialize is only called when creating the first
interface (typically when enabling WIFI). However some
chips may want to perform early initialization and provide
some functionality while WIFI is still disabled. One example
is reporting chip-global capabilities that may affect
the UI even before WIFI is enabled.
In order to support this, add a new function
wifi_early_initialize which will perform early initialization.
The function should be called as soon as possible after
loading the vendor HAL, and if it returns a failure, the vendor
HAL should not be considered usable and no WIFI chip should
be created based on it.
4. In some cases it is needed to query chip features before
creating any interfaces. For example, for trying to start
a SoftAP on the 60GHz band, it is needed to detect a chip
which supports the 60GHz band, and only if such chip was detected,
then an AP interface can be created on it.
The wifi_get_supported_feature_set function only works on
a created interface so it is not suitable for this scenario.
To support such scenarios, add a new function
wifi_get_chip_feature_set which returns a set of chip-global
features which are independent of any created interface.

Bug: 146922967
Test: atest VtsHalWifiV1_0TargetTest VtsHalWifiNanV1_0TargetTest VtsHalWifiApV1_0TargetTest \
            VtsHalWifiV1_1TargetTest \
            VtsHalWifiV1_2TargetTest VtsHalWifiNanV1_2TargetTest \
            VtsHalWifiV1_3TargetTest \
            VtsHalWifiApV1_4TargetTest VtsHalWifiNanV1_4TargetTest VtsHalWifiRttV1_4TargetTest
Change-Id: If0b4934002c5687024c9fc2e65e15c466f94acd2
2020-08-11 14:18:39 +08:00
Ahmed ElArabawy
87805a2f0d Wifi: Add a vendor function to set subsystem restart handler
This commit adds a method to set the handler for wifi subsystem
restart callback.

Bug: 159367026
Test: force a firmware restart and make sure Wifi is recovered.
Change-Id: Id125b85a697a0cdd5cf2677abb0006c85053fd43
2020-07-02 17:36:02 +00:00
Glenn Kasten
95c70fb8fc Merge "Include what you use: <cutils/bitops.h> for popcount" am: a44935a15e am: f1c3aef751 am: 241bea678f am: 1021e13396 am: 997cf74b26
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1353827

Change-Id: I77cf1faa6a2b56909d43bfbf342c9917556939b1
2020-07-02 00:06:26 +00:00
Glenn Kasten
997cf74b26 Merge "Include what you use: <cutils/bitops.h> for popcount" am: a44935a15e am: f1c3aef751 am: 241bea678f am: 1021e13396
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1353827

Change-Id: I311140709697779fe38376257f9ecc9ffc5d2bdd
2020-07-01 23:49:52 +00:00
Glenn Kasten
1021e13396 Merge "Include what you use: <cutils/bitops.h> for popcount" am: a44935a15e am: f1c3aef751 am: 241bea678f
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1353827

Change-Id: Ie1c3b77e7aa7b41121aa855e294459e8fc32c58f
2020-07-01 23:35:22 +00:00
Glenn Kasten
241bea678f Merge "Include what you use: <cutils/bitops.h> for popcount" am: a44935a15e am: f1c3aef751
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1353827

Change-Id: I5081765a1f7067786819df994029cd37a56ec570
2020-07-01 23:11:01 +00:00
Glenn Kasten
f1c3aef751 Merge "Include what you use: <cutils/bitops.h> for popcount" am: a44935a15e
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware_legacy/+/1353827

Change-Id: Ibbe1d358bf78ecd8900e9a38dacd0d60b25a6fbc
2020-07-01 22:56:38 +00:00
Glenn Kasten
a44935a15e Merge "Include what you use: <cutils/bitops.h> for popcount" 2020-07-01 22:40:40 +00:00
Glenn Kasten
75957b03d2 Include what you use: <cutils/bitops.h> for popcount
Test: builds OK
Change-Id: Ia469ef1b53b96e14a348405f269009c93394661e
2020-07-01 12:18:21 -07:00
Treehugger Robot
90a13d2bb0 Merge "Add METADATA to libhardware_legacy: Apache2=NOTICE" am: 8d345978f3 am: 16d0ab9898 am: 23e327fdfd am: 091508d4a9 am: 36d3a725e5
Change-Id: I1910bcd6fffc3a0bec9f30db2c92695c99b0a198
2020-05-04 21:01:05 +00:00
Treehugger Robot
f4fd153565 Merge "Remove MODULE_LICENSE_APACHE2 from libhardware_legacy" am: dd5a89e9fd am: 0cee190367 am: 4d91ff3f1f am: 6aa4d874cd am: 439a7ff027
Change-Id: I237d1c2472f44f7fc0ae1c9660bcf8d2fbde4d7c
2020-05-04 21:00:30 +00:00
Treehugger Robot
36d3a725e5 Merge "Add METADATA to libhardware_legacy: Apache2=NOTICE" am: 8d345978f3 am: 16d0ab9898 am: 23e327fdfd am: 091508d4a9
Change-Id: I201e57b099c6ba87f7bb246abf3f64455d5f75e3
2020-05-04 20:44:27 +00:00
Treehugger Robot
439a7ff027 Merge "Remove MODULE_LICENSE_APACHE2 from libhardware_legacy" am: dd5a89e9fd am: 0cee190367 am: 4d91ff3f1f am: 6aa4d874cd
Change-Id: I2204a0a9e6bee7fdf95a96f4787578a37b41cdac
2020-05-04 20:43:58 +00:00
Treehugger Robot
091508d4a9 Merge "Add METADATA to libhardware_legacy: Apache2=NOTICE" am: 8d345978f3 am: 16d0ab9898 am: 23e327fdfd
Change-Id: Iae310a0b593cc4d394f6e33ee595b03c8b6f8850
2020-05-04 20:23:42 +00:00
Treehugger Robot
6aa4d874cd Merge "Remove MODULE_LICENSE_APACHE2 from libhardware_legacy" am: dd5a89e9fd am: 0cee190367 am: 4d91ff3f1f
Change-Id: I8520c946a8bcb199b2fa0ee17d8eb09b231373bf
2020-05-04 20:23:14 +00:00