Let epoll_wait() wake up healthd if a receive buffer overflow has
happened. If a receive buffer overflow happened, this indicates that one
or more power supply uevent messages have been discarded. Handle this by
updating the battery statistics. This is the approach recommended in the
netlink(7) man page. From that manual page: "However, reliable
transmissions from kernel to user are impossible in any case. The kernel
can't send a netlink message if the socket buffer is full: the message
will be dropped and the kernel and the user-space process will no longer
have the same view of kernel state. It is up to the application to
detect when this happens (via the ENOBUFS error returned by recvmsg(2))
and resynchronize."
Bug: 362986353
Change-Id: I0c89907eaa014f9e2859a73b29239e82f066f03f
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Make the code somewhat easier to read by using designated initializers.
No functionality has been changed.
Bug: 362986353
Change-Id: I707ea158c9c45eeb2662d7b5c1efc9b63f0375cb
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Instead of calling ScheduleBatteryUpdate() every time a uevent has been
received, only call it after the netlink socket receive buffer has been
drained. This change is safe because the contents of the power supply
uevent messages is ignored.
A subtle change in this CL is that an additional call to
uevent_kernel_multicast_recv() is introduced after all the receive
buffer has been drained. In case of a receive buffer overflow, this
extra call will receive and clear the socket error (sk_err).
Bug: 362986353
Change-Id: Ic1c489dde3338f0142def743b4cd654363517486
Signed-off-by: Bart Van Assche <bvanassche@google.com>
KLOG messages are sent to /dev/kmsg and hence must be terminated with a
newline character.
Bug: 362986353
Change-Id: I7484b7722f05d8defb9529788324ac51228b7ea6
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Instead of hard-coding input lengths, let the compiler calculate the
input length.
Change-Id: I47d849b85dd983706bfada0293ccbdd04c8a597a
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This reverts commit cf0a2dd5b0.
Reason for revert: b/363215494, breaks WiFi for at least some devices
Change-Id: I5137957087dde51c0049416404f410f53dd912f3
Make non functional changes to the AIDL files to improve the readability
of the files. Make syntax improvements and fix typos.
Bug: 355621930
Test: m
Change-Id: I9f12bab6d32b3ad204a3b88feb778b5cdd8484d7
Revert this CL because there are several signs that too much time
is spent in healthd and because CL "libhealthloop: Handle netlink
receive buffer overflows" is suspected of causing an infinite loop.
Bug: 359559224
Change-Id: Iaec132da47284d662b357b901b81b21fb6d7cd9e
Signed-off-by: Bart Van Assche <bvanassche@google.com>
1. allow_any_mode is set as true when the VM RKP instance is being
tested (since the bootloader is unlocked for VTS tests and therefore
the VM DICE chain will necessarily have at least one non-normal
mode.)
2. allow_any_mode is set as true for non-user type builds.
Bug: 318483637
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Change-Id: I15ec3ad32f08eecd8478df14f8efa71fdb0b5d08
It was added in aosp/3038254 and removed in a merge conflict resolution in ag/27273371
Test: m
Bug: 346861728
Change-Id: Ie1d3897697e40fca1067442348d400bf6bdee880
There are changes in common audio libraries that force the sounddose
implementation to be bumped if any of the other audio implementations
are bumped.
Since we want to deprecate the sounddose interface and remove it from
FCMs > 202404, we need to retroactively allow the new sounddose version.
The other audio interfaces don't need this treatment because the newer
versions are added to the newer FCMs and we allow older devices to
implement them.
Test: m
Bug: 361383071
Change-Id: I195053bb6c5b6cb01584398eafc86f8fbcdd1148
Stub output stream is like a /dev/null audio device, however
for synchronous transfers it must block for the duration of
the audio chunk being transferred. Implement more accurate
accounting for the blocking time using the same approach as
employed by the remote submix stream implementation.
Bug: 356719263
Test: atest CtsNativeMediaAAudioTestCases
on aosp_cf_x86_64_auto target
Change-Id: I137aed397246bcf2b5ef6789aa4d2d27ead64467
When supporting the audio AIDL HAL, we do not use the ISoundDoseFactory
anymore. Removing it from the compatibility matrix.
Flag: EXEMPT bugfix
Test: trivial
Bug: 356641174
Change-Id: I241c4b93ea6aa4e5499bc9e924d6df4f4bd464a7
It was noted that calling 'ABinderProcess_startThreadPool'
results in the audio HAL service having more Binder pool
threads than without it. This is preferred to having
just one thread via 'ABinderProcess_joinThreadPool'
as in the latter case clients may seemingly be blocked
instead of being served by a newly spawned thread from
the pool.
Bug: 357669241
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia8ed52b3c5a95cea12d063a0e75ac908af9260f8
Move the cleanup of the stream worker thread from '~StreamCommonImpl'
up to concrete stream implementations. This is because when
the worker thread is stopping, it calls 'DriverInterface::shutdown'
method of the stream. At the time when '~StreamCommonImpl' is
running, the concrete stream class has already been destroyed.
The cleanup actually only happens in the case when the client
did not close the stream properly via 'IStreamCommon.close', or
when the stream creation has failed in the middle.
Bug: 355804294
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie86f682af202976ed48d24338b2dffcfd20d9a76
Add a new attribute type which value could only be device_fcm and
product_fcm if set to the vintf_compatibility_matrix module type which
could be used to generate framework_compatibility_matrix.device.xml and
product_compatibility_matrix.xml in soong to convert the original Android.mk
Bug: 352234038
Bug: 344445679
Test: lunch aosp_cheetah-trunk_staging-userdebug
m framework_compatibility_matrix.device.xml \
product_compatibility_matrix.xml
Test: lunch aosp_trout_x86_64-trunk_staging-userdebug
m framework_compatibility_matrix.device.xml \
product_compatibility_matrix.xml
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug
m framework_compatibility_matrix.device.xml \
product_compatibility_matrix.xml
diff $ANDROID_PRODUCT_OUT/system/etc/vintf/compatibility_matrix.device.xml \
device/google/cuttlefish/system_image/compatibility_matrix.device.xml
Change-Id: I1690cf29462c91f5ab80f7a78f6df9cdb6abbf2f
Define vintf_fragments as modules if the file is shared among multiple
modules to avoid any conflicts.
Bug: 322089980
Test: aosp_cf_x86_64_phone build succeeded
Change-Id: I1d00623e3e6da6bb787a152d81eb94822153388f
After most compatibility_matrices Make modules have been moved to Android.bp there are some unused variables and logic, so remove them to reduce the complexity which helps conversion to Android.bp and reviewing.
Bug: 352234038
Test: CIs
Change-Id: Ic2f4538b3e50cc1ca573634cd46eb64c4013420a