Erik Staats
9b8bc0f7c1
dynamic_sensor: Support timing out sensor operations.
...
Bug: 226012902
Test: Used uhid-sample to add a dynamic sensor and verified it can be
sampled.
Test: Simulated start sampling ioctl timeout and verified operation
completes with a timeout and eventually cleans up.
Test: Simulated start sampling ioctl timeout with device removal before
completion and verified operation completes with a timeout and
eventually cleans up.
Change-Id: I9a957bc1e4000b2c587278146ecbe6e903010616
2022-04-06 12:42:06 +00:00
Brian Duddie
b9769d799c
Change dynamic sensors handle base to 1
...
Fixes: 227766975
Test: load on device, confirm handle number changed
Change-Id: I0466784d7e468bd785f2525f1ab7cd02cc5436e8
2022-04-01 17:22:31 +00:00
Jean-Michel Trivi
71834f3775
r_submix module: pipe size changes with sample rate
...
Adapt the pipe size based on the sample rate.
Behavior is unchanged for the default sample rate (48kHz), size
is adjusted by the ratio relative to the default rate.
Bug: 141604269
Test: atest AudioHostTest#testTwoChannelCapturingMediaConversion
Change-Id: I0ba45af18ef02dc0ef77d480e1203d2cd1db9864
2022-02-02 08:27:24 -08:00
Erik Staats
cbcdc02ef4
dynamic_sensor: Support Android head tracker sensor type.
...
Bug: 189507742
Test: Verified head tracker sensor type and sampling.
Test: Verified custom Android sensor sampling.
Change-Id: Id403de916111ed737b9cebebe9850d5e5845cf56
2022-01-27 20:10:57 +00:00
Zhaoming Yin
c76c1d5799
Fix opendir NULL dirp return issue
...
Bug: 206035991
Test: use forrest to run boottest
Change-Id: I9e77b7d6184a0ee132b8f058f7f83302c54bcb4a
2022-01-16 08:13:00 -08:00
Erik Staats
8262a62fb2
dynamic_sensor: Use HID unique ID for head tracker UUID.
...
Also, don't require 16-bit strings for HID name, manufacturer, and
unique ID. Also change dump of HID unique ID to be in hex.
Bug: 213483369
Test: Verified that the standard Android head tracker sensor uses the
HID unique ID for the sensor UUID.
Test: Verified that custom Android sensors use a fabricated UUID.
Change-Id: I125f84187868543dccab758e22dce744c013578e
2022-01-06 12:28:06 -08:00
Greg Kaiser
3f7bbbb4f1
r_submix HAL: Remove unused variable
...
We no longer set force_pipe_creation after the removal of
legacy code for in-pipe conversions, so we remove it.
Test: TreeHugger
Bug: 141604269
Change-Id: I82393ba0ad3142aa75d482cc6b0edbaeebbd8116
2022-01-05 07:00:42 -08:00
Jean-Michel Trivi
61d799a5e1
Merge "r_submix HAL: remove legacy code for in-pipe conversions"
2022-01-04 16:36:02 +00:00
Treehugger Robot
eaf73c934e
Merge "r_submix: add owners file" am: 593bff82da
am: eba0d7f70e
am: a66b1a2486
am: 140613a961
...
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1935497
Change-Id: I50f08b51fbc69e8262f7cc005fc5de3f1b74739e
2022-01-03 11:35:04 +00:00
Treehugger Robot
140613a961
Merge "r_submix: add owners file" am: 593bff82da
am: eba0d7f70e
am: a66b1a2486
...
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1935497
Change-Id: Ib2386d226b0708a6ed0118bad02189d3ac33a4ba
2022-01-03 11:18:33 +00:00
Jean-Michel Trivi
16699d13ec
r_submix: add owners file
...
Bug: 141604269
Test: see gerrit
Change-Id: I975390f8f495267ef0cd24dc8e73db859e541146
2021-12-30 16:29:03 -08:00
Jean-Michel Trivi
a33c1654fb
r_submix HAL: remove legacy code for in-pipe conversions
...
Old hacky uses of this HAL required channel and sample
rate conversion, which were never expected when this HAL
is used for its real application as the backend for
dynamic audio policies. In that context conversions are
performed in audio_flinger in the mixer.
Bug: 141604269
Test: atest AudioHostTest#testTwoChannelCapturing
Change-Id: I333e981fb3db403ab2da6f77debe49bc7d132ebc
2021-12-23 11:49:28 -08:00
Erik Staats
75fb5d739e
Add dynamic sensor README.md.
...
Bug: 207008609
Test: Verified in gitiles.
Change-Id: I7bb8575aef0a8764390a6dc8f4ca785f49a1eb61
2021-12-16 20:09:59 +00:00
YiMing Tseng
d2299dd03b
Add GRALLOC_FRAMEBUFFER_NUM configuration am: 0b5ab223e1
am: 56747f919a
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/16235226
Change-Id: I235c7d209671734473f9e5885b49e1670a19fcf2
2021-12-16 03:32:23 +00:00
Erik Staats
4b4cb8dab3
dynamic_sensor: Fix report item offset calculation.
...
Bug: 207008609
Test: Verified dynamic sensor sampling with proposed standard Android
head tracker.
Change-Id: I163b79c2c99f02961adebcb5dcb7e39603944e24
2021-12-10 12:20:22 -08:00
YiMing Tseng
0b5ab223e1
Add GRALLOC_FRAMEBUFFER_NUM configuration
...
Add config to set the NUM_BUFFERS. Set NUM_BUFFERS to 1 can
prevent page flipping and set it to a larger number can allow
userspace to fill up the following frame earlier.
Bug: 205917753
Change-Id: Ibf4a52a1e35f4a2404008a48b637cb82c4b46365
2021-12-09 09:09:25 +00:00
Erik Staats
0d8677fa4d
dynamic_sensor: Support recognizing head tracker sensor. am: dbf2545214
am: ec9039d20a
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/16382054
Change-Id: Iaf36409f05f4c8e3f62fd61323f573575bed0cb7
2021-12-03 14:43:46 +00:00
Erik Staats
dbf2545214
dynamic_sensor: Support recognizing head tracker sensor.
...
Bug: 207008609
Test: Verified dynamic sensor sampling with proposed standard Android
head tracker.
Test: Verified dynamic sensor sampling with custom Android sensor.
Change-Id: Ia9b991d4a8f7de132cb8509bcc84c51f62e56b31
2021-12-02 15:48:00 -08:00
Erik Staats
7007ba93ef
dynamic_sensor: Support non-8-bit sized HID report items. am: 4cb45aba7f
am: 99ad5c01bb
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/16359454
Change-Id: I33e8fb34157fcfd27f649b1b956a4c28dddad6a3
2021-12-02 16:42:09 +00:00
Erik Staats
4cb45aba7f
dynamic_sensor: Support non-8-bit sized HID report items.
...
Bug: 207008609
Test: Verified dynamic sensor sampling.
Test: Verified unit tests pass.
Change-Id: I797ccabadefa0dde59fd0f3e8541f9853d657f3f
2021-12-01 14:45:36 -08:00
Erik Staats
82bbf6dc12
dynamic_sensor: Support report and power usage collections. am: f99f73ceeb
am: 2978c08ef0
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/16323898
Change-Id: I45025e510e2a836b6f43949fea7955dafd601755
2021-11-23 14:14:18 +00:00
Erik Staats
f99f73ceeb
dynamic_sensor: Support report and power usage collections.
...
Bug: 207008609
Test: Verified dynamic sensor sampling.
Change-Id: If0bef3647d5c52f9bf1d92a2a0ead72e98c70b8c
2021-11-22 10:56:57 -08:00
Erik Staats
157ae479bc
dynamic_sensor: Don't hold mgr lock when operating sensor. am: 24ead9d84a
am: 9ec6c4dcf7
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/16185557
Change-Id: I8023f1d8f67ab5de14e1b7c1b7631f43f8f35fd0
2021-11-04 16:46:44 +00:00
Erik Staats
24ead9d84a
dynamic_sensor: Don't hold mgr lock when operating sensor.
...
Bug: 205041452
Test: Verified that multiple subscriptions can be made with sensor_test
to a dynamic sensor without hanging.
Change-Id: Ie7671df8294bee04a0ebe1940242c2a83105f897
2021-11-03 15:32:49 -07:00
Erik Staats
f3852875e7
dynamic_sensor: Add multi-HAL 2.1 flush support. am: 35964ba076
am: d30ecf1f7d
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15974606
Change-Id: Ie329b87fa137b389231aac7b467a1d13652c5f76
2021-10-05 13:10:03 +00:00
Erik Staats
35964ba076
dynamic_sensor: Add multi-HAL 2.1 flush support.
...
Bug: 201730055
Test: Verified that flush, batch, and activate sensor VTS tests pass.
Change-Id: I6721d9f8976b3ef9f6af02b2320833025b479ee6
2021-10-04 15:17:32 -07:00
Erik Staats
747b0e0592
dynamic_sensor: Add multi-HAL 2.1 sampling support. am: 43bc7bccdc
am: 157804a3f7
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15949542
Change-Id: Iccd67a723e6298812fe2b462e0b15b4ca1daa4de
2021-09-30 17:42:00 +00:00
Erik Staats
43bc7bccdc
dynamic_sensor: Add multi-HAL 2.1 sampling support.
...
Bug: 195964858
Test: Paired a Sony PS4 controller and verified it can be sampled as an
accelerometer. The first subscription always returns all 0's, but
subsequent subscriptions return proper accel samples.
Change-Id: I4bbc4695c988f600a62502f9fccabaa68f42c72b
2021-09-30 06:50:43 -07:00
Erik Staats
43c3fc4afe
dynamic_sensor: Notify multi-HAL 2.1 of connected sensors. am: 7b29add5f7
am: 67ca088321
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15933544
Change-Id: Id9cd784cd5467b46facda754b31e4cdcec817bff
2021-09-29 19:35:35 +00:00
Erik Staats
7b29add5f7
dynamic_sensor: Notify multi-HAL 2.1 of connected sensors.
...
Bug: 195964858
Test: Paired a Sony PS4 controller and verified it is present in sensor
list as an accelerometer. It can't be sampled, but the LSM6DSR
accelerometer may still be sampled.
Change-Id: I182291cebdf84e5f6cd44d16debd6a07c4bc5281
2021-09-29 10:07:03 -07:00
Erik Staats
16fc5d543e
dynamic_sensor: Add sensor manager init to sub-HAL 2.1. am: 3c7a12d8f1
am: bf866d6dd4
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15905535
Change-Id: Icee05924819530890d509e990958af559811ea47
2021-09-24 18:05:32 +00:00
Erik Staats
3c7a12d8f1
dynamic_sensor: Add sensor manager init to sub-HAL 2.1.
...
Bug: 195964858
Test: Verified dynamic sensor manager is present in sensor list and that
no SELinux violations occur on sc-v2-dev and master.
$ make -j28 && \
vendor/google/tools/flashall -w -s 14281FDEE000A5 --disable_verity && \
sleep 90 && adb root
.
.
.
$ adb shell sensor_test list | grep "sensor_test\|Type\|Dynamic"
sensor_test version 74
Type Subtype Name
32 0 Dynamic Sensor Manager
$ adb logcat -d | grep avc | grep sensor
$
Change-Id: Ib3da287e4f4118ad6b19498248e263f8c1662b3a
2021-09-24 06:16:51 -07:00
Erik Staats
372bc142dd
Revert "dynamic_sensor: Add sensor manager init to sub-HAL 2.1." am: 1d509cf815
am: fb74ed236c
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15886139
Change-Id: I774582c61e10555535317eb679b9d731b2ebea25
2021-09-22 18:28:17 +00:00
Erik Staats
1d509cf815
Revert "dynamic_sensor: Add sensor manager init to sub-HAL 2.1."
...
Revert submission 15874906-bug_195964858.2
Reason for revert: b/200815351
Reverted Changes:
I76a60f7fb:Allow the sensor HAL to access dynamic sensor prop...
I5d587dc46:dynamic_sensor: Add sensor manager init to sub-HAL...
Change-Id: I26b95614bb276e5c2a686de78d73ab48767176a3
2021-09-22 17:53:58 +00:00
Erik Staats
023e2f2294
dynamic_sensor: Add sensor manager init to sub-HAL 2.1. am: c7038f8a78
am: 409c42afad
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15874906
Change-Id: I790c826f327c71520a7ad20850686c41f7aaa0c5
2021-09-22 12:58:02 +00:00
Erik Staats
c7038f8a78
dynamic_sensor: Add sensor manager init to sub-HAL 2.1.
...
Bug: 195964858
Test: Verified dynamic sensor manager is present in sensor list and that
no SELinux violations occur.
Test: See details in testing done comment in
https://googleplex-android-review.git.corp.google.com/15874906 .
Change-Id: I5d587dc46bdec66c3162bf222d36b285b8d2ca3d
2021-09-20 16:58:27 -07:00
Erik Staats
ec9795eec1
Revert "dynamic_sensor: Add sensor manager init to sub-HAL 2.1." am: 3482ca5bf7
am: d1f1fbbcbc
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15847974
Change-Id: I8452563bf0d49f7f767b0deb1097d586f2fef806
2021-09-16 23:22:23 +00:00
Erik Staats
3482ca5bf7
Revert "dynamic_sensor: Add sensor manager init to sub-HAL 2.1."
...
This reverts commit 28b58c62b5
.
Reason for revert: 200210164
Change-Id: I6be2c972a29ec7943dbdf450ef3e491065b011a6
2021-09-16 22:58:51 +00:00
Erik Staats
913254ad60
dynamic_sensor: Add sensor manager init to sub-HAL 2.1. am: 28b58c62b5
am: e9155bf1ab
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15831086
Change-Id: Id605f4fae90edd7b297242e097e06603baa0ec19
2021-09-16 22:04:51 +00:00
Erik Staats
28b58c62b5
dynamic_sensor: Add sensor manager init to sub-HAL 2.1.
...
Bug: 195964858
Test: Verified dynamic sensor manager is present in sensor list.
Test: Test: See details in testing done comment in
https://googleplex-android-review.git.corp.google.com/15831086 .
Change-Id: Ia34596d79f8a6c6985b35dcae75126e456f6009e
2021-09-15 13:48:11 -07:00
Erik Staats
bbc958cf17
dynamic_sensor: Add stubbed sensor multi-HAL 2.1 support. am: 2ac7393bd8
am: c939db938c
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15806307
Change-Id: I1e7f9e8a1dc30765c4e06e7e76600a24238e5583
2021-09-14 17:38:15 +00:00
Erik Staats
2ac7393bd8
dynamic_sensor: Add stubbed sensor multi-HAL 2.1 support.
...
Bug: 195964858
Test: Verified the dynamic sensor sub-HAL initializes and non-dynamic
sensors can sample.
Test: See details in testing done comment in
https://googleplex-android-review.git.corp.google.com/15806307 .
Change-Id: I59934814cc61c7319731eb840ff2132a8c5ce241
2021-09-13 15:03:51 -07:00
Andy Hung
8c6e35a9d8
USB Audio Hal: Fix CTS timestamp handling am: 61583424ff
am: 07c80fdaa0
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/15190378
Change-Id: I03d7042c652c6494ad4a8dd085a3895eba9b3c46
2021-07-05 07:41:36 +00:00
Andy Hung
61583424ff
USB Audio Hal: Fix CTS timestamp handling
...
Bug: 192702566
Test: atest AudioRecordTest#testTimestamp
Change-Id: I3f045b309c8a95ecbe042fd9222e627cac2cb1c9
2021-07-02 17:57:16 -07:00
Andy Hung
50c2941276
USB audio hal: Support FCC_LIMIT for 22.2 testing am: df51120802
am: 6c4ceb6471
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/libhardware/+/14894689
Change-Id: Id54f20770e527e4b1201be394de9b33c944262c5
2021-06-09 20:05:20 +00:00
Andy Hung
df51120802
USB audio hal: Support FCC_LIMIT for 22.2 testing
...
Test: dedicated test with FCC_LIMIT = 12, 24
Bug: 189325443
Change-Id: I4a54b77c013e44bef02d612a2b93dfe71b300e32
2021-06-08 07:13:16 -07:00
TreeHugger Robot
481e40bc75
Merge "Distinguish input and output profile/proxy when dumpping."
2021-06-03 19:07:10 +00:00
jiabin
0269a9d1df
Distinguish input and output profile/proxy when dumpping.
...
Bug: 188843084
Test: adb shell dumpsys media.audio_flinger
Change-Id: I1883905c2edeb0208be129aca79396106f5ea6d3
2021-06-03 17:39:43 +00:00
jiabin
4bc5f25296
No need to update devices when they are the same as original ones.
...
The audio framework will call create_audio_patch to update the new
input/output devices. When the new devices are the same as the original
ones, there is no need to update.
Bug: 188843084
Test: play audio via USB
Change-Id: I4bf2a51a0e88797f2d78513962e18009c59f46c3
2021-06-02 22:53:32 +00:00
Yifan Hong
b562c5633e
Merge "Use libgtest_prod_headers." am: 7749ef2a4a
am: fc3c4d6cb4
am: 09df2e2c96
...
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1687225
Change-Id: I19e5fa41a24414e66153b8cf868c04f97983f330
2021-04-28 22:12:03 +00:00