audioserver receives a change that makes it to crash once it
detects that audiohal server has crashed (because audioflinger
can't gracefully restore the state of the audio system).
As audioserver.rc file prescribes restaring the audiohal on
audioserver restart, there is no need to rely on the init process
to restart the audiohal. Moreover, asking the init process to do
that causes a double restart of the audiohal service if it crashes.
Test: kill audio-hal process, watch dmesg and logcat
Change-Id: Iac4cc79cdc1a3debd2b9cfcdf42f11451d7ce24c
This happens often, and it's normal. Avoid logging it down as this
causes logspam.
Bug: 33353073
Change-Id: Ia3b1b8af61bdf83e9bcde0e5bed0285af037df45
Test: cause the system to play some sounds (e.g. UI clicks), watch logcat
Extended audio offload structure: added support to add bit_width,
offload buffer size and usage info.
Add support for direct PCM audio stream. Direct PCM stream
is used when pcm data required post processing in DSP. Direct PCM
stream is used for both track offload and PCM offload.
Add audio proxy source device.
Add support for additional audio formats: EVRC, QCELP, WMA, WMA,
AAC_ADIF, AMR, MP2, FLAC, ALAC, APE, DSD, LDAC.
Extend audio channel mask.
Test: make
Change-Id: I02d2f1fff6fa467688c1bad158ae18b5fa8c0f5b
Several issues addressed:
-- added IDevice.supportsAudioPatches to query whether
create/removeAudioPatch is actually supported by HAL;
-- IStreamOutCallback proxy needs to be owned by IStreamOut
implementation. In order for the client to reset the reference,
added method IStreamOut.clearCallback;
-- IDevice.open{Input|Output}Stream need to return a "suggested" audio
config from HAL;
-- code for converting between system/audio.h and HIDL
data structures has been moved to
android.hardware.audio.common@2.0-util library for reuse;
-- added a workaround for the issue with QC effects HAL trying to write
into the input parameters buffer, which is r/o by Binder design.
Bug: 30222631
Change-Id: I64af24d79c12d6ac3b0f87d085a821913e29237b
Test: tried using with WIP HIDL client on N5X
find . -name "*.h" -exec sed -i 's/HIDL_GENERATED_\(.*\)_H_/\U\1_H/g' {}
+
They now match what would be generated by -Lc++-impl. This prevents
confusion over whether or not the files are autogenerated.
Change-Id: I4aa89a39907024aa9525df71ff3715979f431357
Similar commit: https://android-review.googlesource.com/#/c/305996/
Test: pass
Changes made to the .hal definition:
- introduce Effect ID returned by the IEffectsFactory that
needs to be passed to IStream.{add|remove}Effect; otherwise
it's impossible to retrieve the underlying HAL effect handle;
- change "bus address" in DeviceAddress to "string" type;
- fix signature of some methods w.r.t. returning Result;
- remove unused "struct AudioPatch".
Bug: 30222631
Test: make
Change-Id: Icb51729ef57bb2a5b0b78609735e7481bc04f95c
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.
Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
Changes made to the .hal definition:
- added missing generated Result for methods implemented via legacy
"command" function;
- fixed Aux Channels feature definition;
- added "size" parameter for reply data in cases where the wrapper
needs to allocate a reply buffer;
- added method for generic support of feature configs;
- added new Result type;
- use arrays instead of strings in effect descriptor to ease
conversion from / to legacy HAL;
- added missing method to the Preset Reverb interface;
- fixed names of the Visualizer enums to avoid clashes with defines
from the legacy HAL file.
The implementation isn't hooked up to the server yet. Need to implement
devices and streams first.
Bug: 30222631
Change-Id: I75bb42f19ac3303759e918b6d6a91646b1555f8c
Test: make
I11496e4c3dd6d0d43f635886b46609cb8e430efc removed
hidl/IServiceManager.h, remove it from service.cpp.
Test: m -j android.hardware.audio@2.0-service
Change-Id: I9e45345b345acb1cc15343c889361c2775933cc3
Audio HAL service is common to audio, audio effect, sound trigger and
bradcast radio HALs.
Bug: 32022304
Change-Id: I3952b9c6de3a6b34e757942120320cf8ae036ed5
Created after hardware/audio.h with the following changes:
- names changed to satisfy HAL style guide;
- defined getter / setter methods for properties, and interfaces
for devices where needed;
- stream out callback changed to be used over RPC;
- 'dump' method is already defined by BBinder, so in HAL
interfaces it is replaced by 'debugDump'.
Note that audio data is currently transferred using byte buffer,
which is not effective due to memory copy and HwBinder transaction
involved. The transfer method will be changed to FastMessageQueue.
Bug: 30222631
Test: make
Change-Id: Ibb3bd940a91820e81d1a2b53b38d63b9e3de148a
Since in generated C++ code class enums are used, the names of enum
values are scoped anyway, thus carrying the prefix only clutters
code.
For C enums, newly introduced "value_prefix" annotation is used
to add the required prefix.
Added annotations for effects HAL types are just informational,
but can be used would C headers generation ever be required.
Also:
- renamed AudioInputFlags -> AudioInputFlag for consistency;
- moved AUDIO_INTERLEAVE_... constants into their own enum.
Bug: 31800672
Change-Id: I5b325f3440e0057ca98c4617040c7e5a89d2283d
Test: make
Created after hardware/audio_effect.h with the following changes:
- names changed to satisfy HAL style guide;
- defined an interface per effect, an interface method
per command, and getter / setter methods for properties;
- retained methods for executing proprietary commands
and accessing proprietary properties, only to be used
for third-party software effects;
- HIDL vector type is used instead of count / array pairs;
- provider callback changed to be used over RPC;
- 'dump' is method is already defined by generated code.
Note that audio data is currently transferred using AudioBuffers,
which is not effective due to memory copy and HwBinder transaction
involved. The transfer method will be changed to FastMessageQueue.
Bug: 30222631
Test: make
Change-Id: Ic8ea5c19688610ebe642c7597d2bcfa3226977e7
The following types are not used in HAL and being removed:
- AudioContentType;
- AudioUsage;
- AudioFlagsMask;
- AudioAttributes.
This is in order to reduce synchronization burden and also
allow extending framework without updating HAL.
Bug: 30222631
Change-Id: Ic5df1800224fd1506dcf624b0cd20f9fd36cb949
Test: make
These types are migrated from system/audio.h. The order and syntax
of declarations is preserved where available. The following
changes have been made:
- names changed to satisfy HAL style guide;
- some previously separate enums grouped into one to allow
using values between them (HIDL doesn't allow using values
of one enum in another, and even if it would, that will
probably be incompatible with C++11 enum classes it generates;
- as HIDL doesn't have sizeof, these were substituted with values;
- unions can't contain HIDL string type, thus some names are
expressed as uint8_t arrays;
- "handle" is a reserved word in HIDL;
- HIDL vector type is used instead of count / array pairs;
- obviously, macros and inline functions not migrated.
Bug: 30222631
Test: make
Change-Id: If55de3774deaa0b3f68ca6100e61ccaf79f29183