Commit graph

1319 commits

Author SHA1 Message Date
Yifan Hong
c33bb7455b Update overflowed values for audio.common@2.0::types.
Test: not tested. Manually inspect the generated file.

Bug: 32741002
Change-Id: Id6d3681ecb30298c3a0198d852ad3f56f83071c1
2016-11-09 10:42:28 -08:00
Yifan Hong
c2f2779d9d Update Android.bp to reexport dependent packages.
Test: mma
Change-Id: Iaca7300c366c2c9e860a29e6a111248d315cc5b4
2016-11-09 10:28:38 -08:00
Keun Soo Yim
04e3b482c1 add vts file for audio common
which is needed by a tv hal for example.

Test: mma
Bug: 32640245
Change-Id: Ie490fe811f2ee37d3d7943083d2afa1911e40906
2016-11-07 15:10:48 -08:00
Mikhail Naganov
0522f89c8e Merge "Implement audio effects HAL delegating to legacy HAL" 2016-11-07 18:50:54 +00:00
Colin Cross
b785f5b82e Support genrules with multiple tools
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
2016-11-04 22:49:15 -07:00
Mikhail Naganov
7cbf2f1fb1 Implement audio effects HAL delegating to legacy HAL
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
2016-11-04 10:55:42 -07:00
Colin Cross
0dc44bd1d4 Remove unecessary include that no longer exists
I11496e4c3dd6d0d43f635886b46609cb8e430efc removed
hidl/IServiceManager.h, remove it from service.cpp.

Test: m -j android.hardware.audio@2.0-service
Change-Id: I9e45345b345acb1cc15343c889361c2775933cc3
2016-11-02 23:28:29 -07:00
Steven Moreland
fcd74ebcdc Running update makefiles.
https://android-review.googlesource.com/#/c/298160/

Test: pass
Change-Id: I14fcde2d3aacc8f8cd9221f2d69e2feae9ae1226
2016-11-02 10:24:33 -07:00
Steven Moreland
69727778a7 Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
2016-10-26 12:04:37 +02:00
Eric Laurent
27ef4d872d audio: add audio HAL service and sound trigger HAL implementation
Audio HAL service is common to audio, audio effect, sound trigger and
bradcast radio HALs.

Bug: 32022304
Change-Id: I3952b9c6de3a6b34e757942120320cf8ae036ed5
2016-10-19 16:11:32 -07:00
Mikhail Naganov
96b30be9d0 Define audio HAL
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
2016-10-12 17:01:32 -07:00
Mikhail Naganov
c115895154 Remove redundant prefixes from enums in audio common types and effects HAL
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
2016-10-11 08:54:01 -07:00
Mikhail Naganov
40be06cdf3 Define HAL for audio effects
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
2016-10-07 15:11:25 -07:00
Eric Laurent
4d2f157ffc Merge "audio hal: add exports to audio-base.h" 2016-10-07 21:13:22 +00:00
Eric Laurent
8b194934f8 audio hal: add exports to audio-base.h
Fixes build errors with double definitions of
some constants here and in audio.h

Change-Id: I1569b86216c6502a20ff6f39a991cd6087be8a23
2016-10-07 12:13:46 -07:00
Steven Moreland
c2962f7c1f Ran update-makefiles.sh.
Audio common and vibrator hals were not in the build system.

Test: hardware/interfaces mma -j64
Change-Id: I9faa3f4692e8778cab7864c94725198c015352a8
2016-10-07 08:23:59 -07:00
Andreas Huber
8d34eec6b2 Annotated android.hardware.audio.common@2.0 package to prepare for automated
extraction of constants into utility header.

Bug: 31800672
Change-Id: If261127a0108536a95ef7f94cca27a313aa21ace
Test: make
2016-10-05 16:24:15 -07:00
Mikhail Naganov
cb700ec199 Remove provisional types from common audio definitions
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
2016-10-05 13:08:59 -07:00
Mikhail Naganov
f0a5a94fad Add common types for audio
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
2016-09-30 14:42:16 -07:00