Commit graph

233 commits

Author SHA1 Message Date
Andreas Gampe
52be9f0549 Merge "Audio: Do not sanitize android.hardware.audio@2.0-service"
am: f06fb17cd7

Change-Id: I743c1afaae84f560879cab6afba0fe31978ef871
2018-10-11 18:09:56 -07:00
Andreas Gampe
34e4fb2a84 Audio: Do not sanitize android.hardware.audio@2.0-service
Until the underlying bug is fixed, do not produce a sanitized
binary.

Bug: 117506164
Bug: 117580200
Test: m && SANITIZE_TARGET=address m
Change-Id: I4e6d1206512513c687f7ae065d2974c55c617b61
2018-10-10 20:26:39 -07:00
Mikhail Naganov
317a9ed5ba audio: Allow vendors to configure hwbinder RPC buffer size
If persist.vendor.audio.hw.binder.size_kbyte property is set, its
value is used to configure the size of hwbinder's MMap buffer.

Bug: 114776290
Test: set the property, check logcat
Change-Id: Icb6a4d0ebe98eb702201f8a9f0fed3a91a24f7ba
2018-09-26 10:11:26 -07:00
Kevin Rocard
c7f433314a Merge "VTS: Do not require XML for Audio effect V2" into pie-vts-dev am: 5e6dd1288e
am: 2642ddb86f

Change-Id: I3716d72d762fe481eae9c82f8123ef45b5053768
2018-08-28 13:09:25 -07:00
Kevin Rocard
8ca56c3dee VTS: Do not require XML for Audio effect V2
In O, the Audio effect V2 HAL allows not to have an audio effect XML
configuration but to use a .conf format.

In P, before this patch, the Audio effect V2 HAL _requires_ to have an
audio effect XML configuration and forbids the use of a .conf format.

This is discouraged by Treble as it means that an unchanged HAL V2
implementation that was compatible with O VTS will not be with P VTS.

As a result, revert to the Oreo behavior for Audio Effect V2 VTS.

Note that the audio effect V4 VTS is not changed by this patch and
still requires an audio effect XML configuration.
Aka device _updating_ to P will not have to upgrade to XML but new
devices lunching on P are still required to have an audio effect
XML configuration.

This commit only changes VTS code.

Test: cd hardware/interfaces/audio/effect/
      mmm 2.0/vts/functional 4.0/vts/functional && adb sync data
      adb push *.0/xml/audio_effects_conf_V*.xsd /data/local/tmp/
      adb shell
      cd /data/nativetest64
      OPS=--gtest_filter=CheckConfig.audioEffectsConfigurationValidation
      VtsHalAudioEffectV2_0TargetTest/VtsHalAudioEffectV2_0TargetTest $OPS
      VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest $OPS
      rm /{odm,vendor,system}/etc/audio_effects.xml || true
      VtsHalAudioEffectV2_0TargetTest/VtsHalAudioEffectV2_0TargetTest $OPS
      ! VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest $OPS
Bug: 111421676
Change-Id: Ifb15d65ae4aa65759c8ebaa91cbc8c02234030dc
Merged-In: Ifb15d65ae4aa65759c8ebaa91cbc8c02234030dc
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit b41b575475)
2018-08-28 18:18:21 +00:00
Kevin Rocard
5381192973 Audio VTS: run tear-down hooks in LIFO instead of FIFO
am: cfab8dac2b

Change-Id: Ibd24dda91b5d334a62553dfe980d6559743688b8
2018-08-10 14:29:43 -07:00
Kevin Rocard
bc41f7d731 Merge "VTS: Do not require XML for Audio effect V2" into pi-dev am: ad3acdc14f
am: 330410e82a

Change-Id: I17cc493d1b230b134b94c61fd9181a56c73f9178
2018-07-23 09:54:51 -07:00
Kevin Rocard
b41b575475 VTS: Do not require XML for Audio effect V2
In O, the Audio effect V2 HAL allows not to have an audio effect XML
configuration but to use a .conf format.

In P, before this patch, the Audio effect V2 HAL _requires_ to have an
audio effect XML configuration and forbids the use of a .conf format.

This is discouraged by Treble as it means that an unchanged HAL V2
implementation that was compatible with O VTS will not be with P VTS.

As a result, revert to the Oreo behavior for Audio Effect V2 VTS.

Note that the audio effect V4 VTS is not changed by this patch and
still requires an audio effect XML configuration.
Aka device _updating_ to P will not have to upgrade to XML but new
devices lunching on P are still required to have an audio effect
XML configuration.

This commit only changes VTS code.

Test: cd hardware/interfaces/audio/effect/
      mmm 2.0/vts/functional 4.0/vts/functional && adb sync data
      adb push *.0/xml/audio_effects_conf_V*.xsd /data/local/tmp/
      adb shell
      cd /data/nativetest64
      OPS=--gtest_filter=CheckConfig.audioEffectsConfigurationValidation
      VtsHalAudioEffectV2_0TargetTest/VtsHalAudioEffectV2_0TargetTest $OPS
      VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest $OPS
      rm /{odm,vendor,system}/etc/audio_effects.xml || true
      VtsHalAudioEffectV2_0TargetTest/VtsHalAudioEffectV2_0TargetTest $OPS
      ! VtsHalAudioEffectV4_0TargetTest/VtsHalAudioEffectV4_0TargetTest $OPS
Bug: 111421676
Change-Id: Ifb15d65ae4aa65759c8ebaa91cbc8c02234030dc
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-07-23 16:41:40 +00:00
Carter Hsu
197583fc69 Merge "audio: add wakelock capability for audiohalservice" into pi-dev am: 3ce3c9127a
am: de8ad1bdb3

Change-Id: Ib860875335c0598adb6523e551c725e3ecfcd53c
2018-07-17 14:13:33 -07:00
Carter Hsu
8284636fec audio: add wakelock capability for audiohalservice
1. wake_lock group
2. BLOCK_SUSPEND capability

int pm_wake_lock(const char *buf)
{
	const char *str = buf;
	struct wakelock *wl;
	u64 timeout_ns = 0;
	size_t len;
	int ret = 0;

	if (!capable(CAP_BLOCK_SUSPEND))
		return -EPERM;
Bug: 111018819
Test: manual
Change-Id: I1283e4b1ab2b95e4e94df045240001485593f1ab
Signed-off-by: Carter Hsu <carterhsu@google.com>
2018-07-13 06:46:10 +00:00
Mikhail Naganov
93b5778e9c Fix audio port "mix" role parameter conversion
'usecase.source' field is used for AUDIO_PORT_ROLE_SINK,
'usecase.stream' field is used for AUDIO_PORT_ROLE_SOURCE.

The HIDL<->legacy conversion code was doing it opposite.

Test: make
Change-Id: I93722f422a8f226f11a6be97215453af3234029c
2018-07-09 14:28:57 -07:00
Kevin Rocard
714ddf05d7 Audio VTS: run tear-down hooks in LIFO instead of FIFO am: cfab8dac2b
am: 4595c66a1e

Change-Id: Idb84f4a8259683b825a02051264d0a6a89af24c5
2018-06-29 14:36:14 -07:00
Kevin Rocard
cfab8dac2b Audio VTS: run tear-down hooks in LIFO instead of FIFO
The audio tests use a static cache of some HAL objects for
performance reasons (speed up by 10x on Pixel).
Those object are destroy during the test environment tear-down.

This tear-down was destroying the objects in a FIFO instead of LIFO
order. Thus the DeficesFactory was destroyed before the Device it
created.

Bug: 79889318
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
      check that the device destructor is called before the
      devicesFactory one.
Change-Id: I1b4345158139ba14a8779a9508f7ebdc41129d1d
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-06-29 20:09:50 +00:00
Mikhail Naganov
2c484238d1 audio hal: Add 'interface' declarations for IDeviceFactory into .rc
Declaring the interfaces allows HIDL hwservicemanager to start
the HAL service in case it has crashed before audioserver
has called 'getService'.

Bug: 80227481
Test: use the repro case from the bug
Change-Id: Ibb46beb714b3985ab373d56d92da1105cfda28c6
2018-05-25 13:02:25 -07:00
Kevin Rocard
c1d89888b9 Audio V4 VTS: test setter even if getter is NOT_SUPPORTED
Previously, the setter of optional properties were not tested
if the getter was not supported.
This was an issue as the framework rarely gets, most
often only sets as it consider having the ownership of those properties.
Thus implementation tend to only support set.

As a result optional setter were not tested although called by the
framework.

For example the default impl setTtyMode has a bug that was not detected
because the Pixel HAL does not support getTtyMode.

This patch makes sure to always test getter and setter.

Test: atest VtsHalAudioV4_0TargetTest
Bug: 71486871
Change-Id: Ib0b03fb6eb77cc0428a33eb463166dd7c339bd3d
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-05-01 17:07:29 -07:00
Kevin Rocard
dea4c3803f Audio V4: setMode VTS incorrectly assume 0 was invalid
Thus the test was always incorrectly failing.
Also improve the test error messages.

Bug: 77307068
Test: VtsHalAudioV4_0TargetTest
Change-Id: I95db94ed99f7ca32af35422e36a95084e72279d8
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-04-21 01:32:34 -07:00
Kevin Rocard
16d6547901 Audio V4: Improve VTS error messages
This does not change the test logic or constraints.
It only improves the error messages.

Bug: 77307068
Test: atest VtsHalAudioV4_0TargetTest
Change-Id: I6c79ddd014d4ab8aba4f1d0b918888f83dfb63ad
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-04-21 01:32:34 -07:00
TreeHugger Robot
14dc815cdc Merge changes from topic "audio-hal-v4" into pi-dev
* changes:
  Audio V4: Update V2 tests to V4
  Fix issues in ReturnIn
  Audio V4: Duplicate V2 tests
2018-03-21 03:13:53 +00:00
Dean Wheatley
ce8b2734f7 Add 5.1.2, 5.1.4, 7.1.2, 7.1.4 output channel masks
They were supposed to be added by the change with id
I2f488462614114e4c82149460b030585981ae15e
but actually were not.

Also, rename OUT_TOP_CENTER_... to OUT_TOP_SIDE_...
according to Dean's suggestion.

Bug: 38184704
Bug: 63901775
Test: make
Change-Id: Ib263b06e4f3aa84525c2255f7a52f9bb39dbebcd
2018-03-19 09:38:00 -07:00
Kevin Rocard
e3afd40e91 Audio V4: Update V2 tests to V4
Bug: 74037175
Bug: 38184704
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV4_0Target
Change-Id: Ic8da941fc042b7ef838edf8fdac36b2f0fa1fd32
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-14 19:38:03 -07:00
Kevin Rocard
8532f6b2cc Fix issues in ReturnIn
Bug: 74037175
Test: compile
Change-Id: Icc3a0d1d489474de7c6255a014dccecc4dda4aa2
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-14 19:38:03 -07:00
Aniket Kumar Lata
d93a3adab5 audio: Register Bluetooth service with audio HAL
Register Bluetooth audio library with audio HIDL service.
Changes required for A2DP offload implementation.

Bug: 63932139
Bug: 68824150
Test: A2DP offload verified on supported codecs
Change-Id: Idd89f0d28903579d42bd0f33b0194fb8dc2ceaaa
(cherry picked from commit c5a5203114)
2018-03-12 19:18:21 +00:00
Mikhail Naganov
b7e7ccc648 audio HAL: Add missing input channel masks
The following masks added for input: 2.0.2, 2.1.2, 3.0.2, 3.1.2

Bug: 38184704
Bug: 63901775
Test: make
Change-Id: I9ffc2a1858068fdd9fe0777184ea8464e7ab0e3b
2018-03-07 19:27:02 +00:00
Kevin Rocard
bee7f4eb1e Audio V4: Declare support for 4.0 interface
Declare that the audio HAL service supports 4.0 as well as 2.0
interface.
Formatting done by clang-format.

Test: compile
Bug: 38184704
Change-Id: Iee842b141e1218f4f3779187339bde40680ec78a
Merged-In: Iee842b141e1218f4f3779187339bde40680ec78a
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
5ec293316e Audio V4: Implement the shim core 4.0 -> legacy
All the new files added are a copy of the 2.0 ones, with just the
version 2 that was changed to 4.

Due to the rollback on the retrocompatiblity breakage,
the split of implementation is not strictly needed any more.
This makes the current split in .impl.h and double include
unnecessary complicated.
This will need to be factorized in a future patch.

Bug: 38184704
Test: compile
Change-Id: I0d699ade7558ed68125b300f8522e2767ae1ee37
Merged-In: I0d699ade7558ed68125b300f8522e2767ae1ee37
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
2696030063 Audio V4: Move service entry point to common
The HAL audio service entry point is not version dependant
and is common to core and effect.

Bug: 38184704
Test: compile
Change-Id: I143cf28490afc978791ccd7e8aeee2106cbb2ebd
Merged-In: I143cf28490afc978791ccd7e8aeee2106cbb2ebd
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
af7f78daa6 Audio V4: Implement the shim effect 4.0 -> legacy
All the new files added are a copy of the 2.0 ones, with just the
version 2 that was changed to 4.

Due to the rollback on the retrocompatiblity breakage,
the split of implementation is not strictly needed any more.
This makes the current split in .impl.h and double include
unnecessary complicated.
This will need to be factorized in a future patch.

Bug: 38184704
Test: compile
Change-Id: If412eb55ebf6afc773593547af9395a09b6825c2
Merged-In: If412eb55ebf6afc773593547af9395a09b6825c2
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
2b275704bc Fix potential missing '\0' when wrapping to legacy
The HAL API for port name is a C++ string of arbitrary
length.
Nevertheless the legacy API name had a maximum length.
Thus when wrapping from the new to legacy, the string
was truncated but no '\0' was added.

Bug: 38184704
Test: compile
Change-Id: I482363809718281e022041c2d5042e5800c5a617
Merged-In: I482363809718281e022041c2d5042e5800c5a617
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
f0878685d7 Audio V4: Cast conversion now deduce both types
That avoids to repeat the destination type which
can change between versions.

Bug: 38184704
Test: compile
Change-Id: I55c881afe5f6fc511ea01b19c5d46de12fb1e0d2
Merged-In: I55c881afe5f6fc511ea01b19c5d46de12fb1e0d2
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
c5af419ef2 Audio V4: Add V4 common utils
Bug: 38184704
Test: compile
Change-Id: I935fe4343ab517f7a8dc65e1b9720097a3ab34da
Merged-In: I935fe4343ab517f7a8dc65e1b9720097a3ab34da
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
63410e8da4 Audio V4: Do not forward notification detail
Those values are only for the framework, thus they should not be
available to the vendor.

Bug: 38184704
Test: compile
Change-Id: I05d3e506a85dbe66d51b7024fa9de45865bcf9db
Merged-In: I05d3e506a85dbe66d51b7024fa9de45865bcf9db
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
4b6169eec6 Audio V4: Remove system only enum values
Some enum values only used by the system were exposed to the vendor for
legacy reason. Remove them.

Bug: 38184704
Test: compile
Change-Id: I78254047a74d08bcdf2d7b285e874dbd497d5407
Merged-In: I78254047a74d08bcdf2d7b285e874dbd497d5407
Cherry-picked from master
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-06 11:30:51 -08:00
Kevin Rocard
4d46cea59c Audio V4: Add owner files for implementations
Bug: 38184704
Test: none
Change-Id: If45a4d7e16ecd045866230b48fde477d21f124e0
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-03-02 12:55:48 -08:00
Kevin Rocard
ace0b02fd9 Audio HAL V4: Add Hearing aid output device
This output is used to send audio to earring aid device
(usually through Bluetooth).

Bug: 38184704
Test: mm
Change-Id: I09ec4d2853ef04300fcda45bddb4a42209f19be0
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-02-14 17:44:33 -08:00
Kevin Rocard
bb90d89746 Audio HAL V4: Switch back to 32 bit AudioDevice
Switching to 64 bit has proven to be too much refactor
and the need is not immediate.

Instead in the next version of the Audio HAL,
AudioDevice will no longer be a bitfield and when multiple
devices will need to be passed, a list will be used.

Bug: 38184704
Test: mm
Change-Id: I8de14fc4ee69fb70fc1c4275b568093a5d0aec1b
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-02-14 17:44:12 -08:00
Kevin Rocard
87ac081930 Audio V4: Create audio V4.0 .hal makefiles
Run update-makefiles.sh to create all HAL makefiles.

Test: update-makefiles.sh
Bug: 38184704
Change-Id: I2532c4b9d1f0f6252ceaffbfb0c5d0a615400c72
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-02-01 16:17:34 -08:00
Kevin Rocard
eacb99697f Audio V4: More fixes of the audio 2.0 API
Remove unnecessary Result typedef.
Make bufferSizeFrames and burstSizeFrames unsigned
as they should not be negative.
Remove legacy AudioInterleave.
Remove implicit callflow annotation.
Make EffectConfigParameters a bitfield.

Bug: 38184704
Test: hardware/interfaces/update-makefiles.py
Change-Id: I33e6f7869d20ca0cad4123f32347754e5a514caa
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-02-01 16:17:34 -08:00
Kevin Rocard
c8d7bb7c84 Audio V4: Only expose one notification usage
Too many usages detail were previously exposed to the HAL.
All usages that should be handled identically by the HAL
are now the same value.

 - All notification types are now the same usages

Test: build
Bug: 38184704
Change-Id: I2096f995e249ab02bc29449c6d1a65b521dc13f7
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-02-01 16:17:34 -08:00
Kevin Rocard
14dbb1edce Audio V4: Forward tracks attributes to the hal
Forward to the HAL the audio usage, audio content types and volume
of playback tracks to the stream out they are playing to.

Forward to the HAL the audio source and volume of record tracks
to the stream in they are playing to.

This will allow the HAL to better tune its effects and remove the need
to inject a fake effect (volume listener) to get the tracks volume.

Bug: 38184704
Test: none
Change-Id: Iede0f7aa518608c3b3ce1497f059f672aac109b2
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-02-01 16:17:34 -08:00
Kevin Rocard
0fd5bc2dce Audio V4: Remove deprecated function and enum
The debugDump function was deprecated by the introduction of the
debug method in the IBase.

AudioMode CURRENT and INVALID should not be passed to the
vendor.

Bug: 38184704
Test: none
Change-Id: I0e14c71ce7216524587a6ba28cae0cdb821bae23
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-02-01 15:24:25 -08:00
Kevin Rocard
79c574082d Audio V4: bitfield enum now use the bitfield class
The audio HAL has lots of enums were each value is a specific bit
pattern (usually a single bit) and are expected to be used as a
combination of value (kind of like a bitfield).

Nevertheless the 2.0 methods only had the enums themselves in their
signatures which leads the HIDL API checkers to warn that invalid values
were passed.

Currently, there are no way to express a value which is a combination
of enum values. The closest thing is the bitfield type.

Thus transition all enums combination to bitfield.

Note that AudioDevice as NOT been transition systematically
as both the enums and the combination are meaningful:
 - the enum is one device
 - the combination is a list of device.

Test: none
Bug: 38184704
Change-Id: I155cf7bc5d88fc5cf8954903d55aa8d7ca458a4b
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-02-01 15:24:25 -08:00
Dean Wheatley
fd64afb0fd Audio V4: Add MSD formats and Device
Add MAT 1.0, 2.0, 2.1 audio formats
Add 5.1.2, 5.1.4, 7.1.2, 7.1.4 output channel masks
Add E_AC3_JOC audio format
Add MSD Device to allow an MSD HAL implementation separated from the
primary.

Bug: 38184704
Test: none
Change-Id: I2f488462614114e4c82149460b030585981ae15e
Original author:
Signed-off-by: Dean Wheatley <dwhea@dolby.com>
Ported to HAL 4.0:
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-31 23:09:23 -08:00
Kevin Rocard
8b010d2421 Audio V4: Add new Audio HAL API
Add new device to the device factory to allow vendors to split
their HAL implementations more.

AudioDevice bitfield is now 64bit to allow more devices to be added.

Add a new AudioDevice to support playing music to distant during voice
call.

A HAL can now declare if its MMAP buffer can be securely accessed
directly by untrusted apps.

Add AAC_XHE format.

Add BLE input source.

Bug: 38184704
Test: none
Change-Id: Ic2fbec4db71c7f688c8847ba39c72f51480c0727
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-31 23:09:23 -08:00
Kevin Rocard
71afcf1f87 Audio V4: Remove all non extensible enum value
The CNT, MAX enum values had two drawbacks:
 - they were invalid enum value that were part of the enum
   thus enum validity check would validate them although those values
   are only expected to be use in loops/validation code.
 - they are not extensible by vendors

The *_ALL enum values were not extensible by vendors.

Those values can instead be replaced by treble enum iterator and
helper functions.

Bug: 38184704
Test: none
Change-Id: I1a9527bb7311088e0abe22eceee92d21d9171ca4
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-31 23:09:23 -08:00
Kevin Rocard
260470f7b7 Audio V4: Fix doc comments for hidl-doc
hidl-doc does not support two consecutive documentation comments
/** ... */
/** ... */

In such case make the first one a non-doc comment.

This is a port of: http://android-review.googlesource.com/432140

Bug: 38184704
Test: none
Change-Id: I86cb10c655036ca49055ee007813c3e5af743eb5
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-31 23:09:23 -08:00
Kevin Rocard
74980b56eb Audio V4: Fix documentation and useable/untestable bugs
Add missing documentation, especially for failure cases
and methods that are optional.
Add missing operation status for testability.
Add format for getSupported* methods as they could not
be implemented in 2.0 for multi-format stream (HDMI).

Test: compile
Bug: 38184704
Change-Id: I14ee5e02ef70a82df6de732f88b065810e9b032f
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-31 23:09:23 -08:00
Kevin Rocard
a4e6d8b1de Audio V4: Copy 2.0 .hal files in 4.0
That will ease review of the changes.
The only changes are:
 - replace all @2.0 by 4.0
   $ sed -i 's/@2\.0/@4\.0/g' */4.0/*.hal
 - replace all licence 2016 by 2018
   $ sed -i 's/2016/2018/g' */4.0/*.hal

Moving the .hal in a subfolder forces the package name and the
namespace to change.

This mean that the audio HAL 2.0 and 4.0 will not be consider
different version of the same HAL but two different HALs.

As a result to minimize code change due to tight deadline,
keep the 4.0 core in the audio folder.

Bug: 38184704
Test: hardware/interfaces/update-makefiles.sh
Change-Id: I7c7a826270c9933091f037b795806787e1284583
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-31 10:39:47 -08:00
Zhuoyao Zhang
f62c91f057 Convert audio hal test to use VtsHalHidlTargetTestEnvBase
Bug: 64203181
Test: make vts
      vts-tradefed run vts -m VtsHalAudioV2_0Target

Change-Id: I1f85216c992eabf70f7e907b5d2afc4fb59cbb4a
2018-01-23 18:20:56 -08:00
Kevin Rocard
3887e24436 Audio V4: Rename audio/device to audio/core
The name device has already too many meaning, thus rename the main audio
api to core.

Bug: 38184704
Test: compile
Change-Id: I178dfef05af8f8579196affbe2cbc5f6c3f9af55
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-20 10:49:57 -08:00
Kevin Rocard
e9e4e16564 Audio V4: Make device default wrapper device independent
Bug: 38184704
Test: compile
Change-Id: I077d2d6176ba5d60c1994345b3164641ed5b4608
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-20 10:49:57 -08:00
Kevin Rocard
1ae0401179 Audio V4: Move common test code in common folder
The previous patch made the test independent of the HAL version
As a result, move them in the version common folder.

Note that this patch is separated from the previous patch to ease
review.

Bug: 38184704
Test: compile
Change-Id: I98a46eb0b88ea786656200ab613afd2d36ed222d
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-20 10:49:57 -08:00
Kevin Rocard
b34af7c192 Audio V4: Make test helper version independent
Bug: 38184704
Test: compile
Change-Id: Ia9ec81ccbad1d7411fdc570ae6dd728dd1520065
2018-01-20 10:49:57 -08:00
Kevin Rocard
6891d7ec28 Audio V4: Make common helper version independent
The implementation uses the version provided by macro.

Bug: 38184704
Test: compile
Change-Id: Ib5565bdf77ed9e42fc8271a4317eb88681aefcd5
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-20 10:49:57 -08:00
Kevin Rocard
649142becc Audio V4: Move common files before refactor
This will make diff much more clear and allow git to follow the files.

Bug: 38184704
Test: compile
Change-Id: I41ccb41c334aa56d3935be333e6227dd99773766
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-20 10:49:57 -08:00
Kevin Rocard
dc874e08c6 Audio V4: Fix issues in common raised by clang-format
This patch only contains cosmetic reformatting imposed by clang-format.

Bug: 38184704
Test: compile
Change-Id: I2f8c74d1b976e1e4e74f85dd0e8350f9b16fb31a
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-01-20 10:49:57 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
TreeHugger Robot
2aa5fe9241 Merge "Audio VTS: improve audio policy validation error messages" 2017-10-28 07:11:23 +00:00
TreeHugger Robot
7e156d1512 Merge "Add the audio team as owner of the audio VTS" 2017-10-24 02:31:10 +00:00
Kevin Rocard
f16fabef5d Add the audio team as owner of the audio VTS
Change-Id: I514c37b3c9da3df700fa208e79ff6597f8914092
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-10-23 21:26:16 +00:00
Steven Moreland
116161d94e Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1
am: 6c811964a1

Change-Id: I85ccbb4a15cd18938607f5bca4e065b9d7e0182b
2017-10-11 16:31:07 +00:00
Steven Moreland
0fff75dee1 Update for Soong java makefiles.
am: c3e80fa01e

Change-Id: Ia8835f9c95bd98a96f5fd3aff11191e7d3726fb9
2017-10-11 16:23:54 +00:00
Steven Moreland
c3e80fa01e Update for Soong java makefiles.
Test: pass
Bug: 33420795
Change-Id: Id9b1919a19b8ff682738cfb0869a479b4dbb4293
2017-10-10 23:07:20 +00:00
Steven Moreland
0653f3b212 Merge "Remove useless Android.mk files." am: 75d5cf515a am: f27cfa15d7
am: 33dc30ce49

Change-Id: Ia35d20e0fc1df6f7c46b5581537d7ed387965899
2017-10-05 21:51:13 +00:00
Steven Moreland
f27cfa15d7 Merge "Remove useless Android.mk files."
am: 75d5cf515a

Change-Id: I8c0918c4a787cc3f4c7c69f52737d3a0d9d64426
2017-10-05 21:44:26 +00:00
Steven Moreland
4b60470f1a Remove useless Android.mk files.
These have been c/p'd all over the place.

Test: m -j nothing
Bug: 33420795
Change-Id: I77979866dbb2345a41a873c84ec3fccd7b127510
2017-10-04 15:52:40 -07:00
Chih-hung Hsieh
9890348480 Merge "Use -Werror in hardware/interfaces" am: 85bb01dd6b am: 3ed04cd35d
am: baf19e17b3

Change-Id: I8806a9887178a7f778cc556c804a5b7a05d59836
2017-10-04 21:04:44 +00:00
Chih-hung Hsieh
3ed04cd35d Merge "Use -Werror in hardware/interfaces"
am: 85bb01dd6b

Change-Id: I9169eb99a256f3a1db9e6f82e11fd96228d9558a
2017-10-04 20:40:30 +00:00
Chih-Hung Hsieh
3da5b01946 Use -Werror in hardware/interfaces
* Remove unused local variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I48dbbf670cc9eeff2391983788983420f8547cc9
2017-10-04 11:16:31 -07:00
Kevin Rocard
69a76b1dfa Audio VTS: improve audio policy validation error messages
If multiple config are found, each will be validated before failing the
test.
Also add a missing new line before dumping libxml2 errors.

Test: run the following script to check for regressions and test that
      invalid config make the test fail.

    runTest() {(
      set -xu
      local readonly MODULE=$1
      local readonly TEST=$2
      local readonly XML=$3
      runVTS() { vts-tradefed run commandAndExit vts \
            --skip-all-system-status-check --primary-abi-only \
            --skip-preconditions --module $MODULE -t $TEST |
                 awk '/FAILED: 0/{e=1} {print} END {exit !e}'; }

      local FAIL=0 # used instead of return if clean up is needed

      echo "# Test valid config"
      runVTS || return 1

      echo "# Test multiple invalid match"
      adb shell touch /system/etc/$XML
      runVTS && FAIL=2
      adb shell rm /system/etc/$XML

      echo "# Test multiple valid match (not supported if xinclude)"
      if !adb shell grep -q xi:include /vendor/etc/$XML; then
        adb shell cp /{vendor,system}/etc/$XML
        runVTS || FAIL=3
        adb shell rm /system/etc/$XML
      fi

      echo "# Test invalid config"
      adb shell sed -i "'2i<fuu/>'" /vendor/etc/$XML
      runVTS && FAIL=4
      adb shell sed -i 2d /vendor/etc/$XML

      echo "#Test no config"
      adb shell mv /vendor/etc/$XML{,.hide}
      runVTS && FAIL=5
      adb shell mv /vendor/etc/$XML{.hide,}

      echo "# Test that the test did not break the config"
      runVTS || FAIL=6

      return $FAIL
    )}
    runTest VtsHalAudioV2_0Target CheckConfig.audioPolicyConfigurationValidation audio_policy_configuration.xml &&
    runTest VtsHalAudioEffectV2_0Target CheckConfig.audioEffectsConfigurationValidation audio_effects.xml &&
    echo TEST PASSED

Bug: 64881365
Change-Id: If0443f85e0d687eed04819337519e4d9f09f5ca9
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-09-26 17:15:59 +00:00
Steven Moreland
dfd8287506 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Merged-In: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
Change-Id: I170fa1c4fe39f8109b1670db58ef99bb11afc0be
2017-08-14 20:25:09 +00:00
Steven Moreland
ff308ea6ba Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Merged-In: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
Change-Id: Ifdc3c17cb2b85c18b37dac2d03bb5c8935c23180
2017-08-11 22:58:47 +00:00
Justin Yun
eff28dc3ba Mark hidl utils as vndk
As a VNDK module, Android.bp must have 'vndk' tag as well as
'vendor_available: true'.

The 'vndk' tag for VNDK module is formated as below:
vndk: {
    enabled: true,
},

VNDK modules will be installed both in system/lib(64) as normal and
in system/lib(64)/vndk as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Change-Id: If0eb0c1bddfa5bdc7ea0ca4635d4e53b59836582
2017-08-04 15:25:13 +09:00
Justin Yun
608d773ef8 Update make file for vndk enabled.
Update the Android.bp generated with hidl-gen.

Test: build with and without BOARD_VNDK_VERSION=current
Bug: 63866913
Change-Id: I1a9db1df49e0f13c5790da2b118ae9ec63ba34a7
2017-08-04 14:12:23 +09:00
Tri Vo
f5d136c231 Update Android.bp HIDL makefiles
Allow HAL definition libs to be static.

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1483d572bea6799717d1614fb7d52fe225e31104
2017-08-03 00:30:01 +00:00
Kevin Rocard
01cafe7771 Audio VTS: Change test utility from dyn to static lib
am: 0718333765

Change-Id: Ia59ec0ce0f5a60aea1a53845caae51dac44651a9
2017-07-20 16:29:56 +00:00
Kevin Rocard
0718333765 Audio VTS: Change test utility from dyn to static lib
Bug: 63801053

In order to avoid having to instruct vts-tradefed to push the test
utility library on the target before runing the audio VTS,
duplicating the makefile declaration,
make the library static.

Test: make vts
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
Change-Id: I7a98b2aaf0e0f6f91a92b7f01df1c630540ad697
Merged-In: I7a98b2aaf0e0f6f91a92b7f01df1c630540ad697
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-07-19 16:40:57 -07:00
Mikhail Naganov
afae464376 Add OWNERS for audio-related HAL default implementations
Test: not needed
Change-Id: Idefe7be10bde22866be82f87118b9b54e74c3f40
2017-07-14 17:14:53 +00:00
Kevin Rocard
b6d79ff112 Audio VTS: Create utility lib
Move code that can be reuse between audio tests of the HIDL interface in
an utility library.

Test: run vts tests
Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Bug: 35700978

Change-Id: Ia930ad2b0a3ca31628b2cb767b265d54b210756b
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-06-05 11:22:24 -07:00
Steven Moreland
76cfb84140 Update makefiles. (2/2)
Adds default configuration for all hals.

Bug: 38415912
Test: pass
Change-Id: Idd1f3a2b7b16ad956d31784a513e93a066cdd02e
2017-05-19 15:54:03 -07:00
Steven Moreland
bc71124120 Update makefiles for c++-sources and c++-headers. (2/2)
Test: pass
Bug: 38174080
Change-Id: Icad451f9f9ad5f46412356a4171a8a1222f8e545
2017-05-09 19:58:43 -07:00
Steven Moreland
a8a9cc6606 audio hal: explicitly import headers
Test: works with BOARD_VNDK_VERSION := current
Bug: 33241851
Change-Id: I34983a5527a16e8e9f5a6a87edac0b741aeb67d6
2017-04-17 15:56:52 -07:00
TreeHugger Robot
5df7894213 Merge "audio.common@2.0-util: vendor_available + in Soong" into oc-dev 2017-04-14 04:00:09 +00:00
Andreas Huber
6fa374ad30 Changed the naming scheme for Treble java libraries (both static and dynamic)
android.hardware.foo@1.0-java => android.hardware.foo-V1.0-java

Bug: 37207894
Test: make
Change-Id: I177f4cfd42f635aaf096107af8309d1a82ed41c0
Merged-In: I8b91881dfaf507c0d852d56ebbb53ff0987e5a34
2017-04-13 15:23:46 -07:00
Steven Moreland
c2ed729e78 audio.common@2.0-util: vendor_available + in Soong
vendor_available: separate copy built on the vendor partition for
BOARD_VNDK_VERSION := current devices.

**************************************************
See full implications + warning on:
https://android-review.googlesource.com/#/c/369995/

(Ia4eb5378d941033b07673daf682e66051cd3c075)
***************************************************

Test: (sanity) audio works on internal marlin
Test: (sanity) hangouts call on internal marlin
Test: warnings don't show up on BOARD_VNDK_VERSION := current devices.
Bug: 33241851

Change-Id: I2de1b789a44d238e31108312b4ec0dd5d404b1e6
2017-04-13 16:04:54 +00:00
Steven Moreland
3b36a83a2e Update makefiles (2/2).
Test: pass
Change-Id: Ic7e6289c7b69785491708ce0acbb657f4c704229
2017-04-11 09:58:03 -07:00
vivek mehta
9236036285 audiohal: init and send all offloadinfo related element
- init all offloadInfo element in audioOffloadInfoFromHal

Bug: 37158321
Test: make
Change-Id: I59d2f6dcd63f95a44465ee8ce8767351fae80521
2017-04-07 18:27:12 +00:00
Andreas Huber
40d3a9bd8c Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
2017-03-29 08:53:58 -07:00
Steven Moreland
561b602a99 Update makefiles for hwtypes.h
Test: pass
Change-Id: I8e17eb8fec5d2f04c526476a866c8dd54ccb556c
2017-03-28 15:18:20 +00:00
Mikhail Naganov
b0dd076c60 audiohal: Remove stale TODOs
Bug: 34109709
Change-Id: I9b30ffa2ed06be8cf31cdbfbcc0f4cb0dac7be54
Test: make
2017-03-22 10:36:14 -07:00
Eric Laurent
0fc208d2ca audio: fix mistake in AudioDevice enum
commit e6653b5d failed to include devices (IN|OUT)_USB_HEADSET
in (IN|OUT)_ALL and (IN|OUT)_ALL_USB masks

Test: audio playback and capture regression tests on marlin
Change-Id: I218b0c3ff868f3e1434e93a9e2fb07b3e16a2df8
2017-03-17 17:34:44 -07:00
Mikhail Naganov
9f61b29a62 audiohal: Rename output flag VOIP_CALL_RX -> VOIP_RX
Makes the constant name consistent with non-Pixel HALs

Change-Id: I42d0f6eea2408ebd155848b85582a844687f106a
Test: make
2017-03-14 09:57:19 -07:00
Eric Laurent
e6653b5d51 audio: add missing flags and devices
Add missing devices for USB headset to allow distinction
between USB sound cards and simple USB headsets.
Add output and input flags indicating special output
and input profiles to used for VoIP streams.

Test: make.
Change-Id: I7967866e15991dbf2f4349daa3ff3baa87c1c062
2017-03-03 16:39:48 -08:00
Tri Vo
d94a7d2df9 Remove .vts spec files
Test: mmma hardware/interfaces
Change-Id: Idae97ce60a6368cfa685ae6b2d71b9ad163e8605
2017-02-22 12:53:52 -08:00
Zhuoyao Zhang
3bef939f94 Update .vts files on master based on the latest .hal file and hidl-gen
Test: mma
Change-Id: I9558f300505db83e26f7c241c5cf729cd005a07b
2017-02-13 18:03:06 -08:00
Tri Vo
85120c9490 Update makefiles to use filgroup syntax.
Test: mmma hardware/interfaces
Change-Id: I9f4457c78b7820c242d46359f0debe05d1b3e482
2017-02-10 12:45:19 -08:00
Mikhail Naganov
57108a0dc9 Merge "audiohal: Pass thread identifiers to the client for priority adjustment" 2017-02-10 16:19:42 +00:00
Andreas Huber
d38f147c35 Updated makefiles
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.

Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
2017-02-09 17:20:45 -08:00
Tri Vo
ce608bec74 Migrate driver/profiler to test/vts-testcase/hal.
Bug: 34893894
Test: mmma hardware/interfaces

Change-Id: Ic72716577a5f93700c5056986aff55a76b170b5d
2017-02-07 19:13:28 -08:00
Mikhail Naganov
a1db22a3e5 audiohal: Pass thread identifiers to the client for priority adjustment
HALs are prohibited from using framework binder, and there is
no equivalent scheduling policy service in hwbinder. Thus, in order
to match priorities of FastCapture / Mixer threads with their
counterparts in the HAL, it is needed to request the priority boost
from audioflinger on behalf of the HAL.

Bug: 34131400
Change-Id: I7c8db9d520b4cf272d2896ad875752b109b57ab7
Test: check priority match between audioflinger's and hal's threads
2017-02-07 10:49:18 -08:00
Zhuoyao Zhang
e9b43bbe2d Update Andriod.bp for hals.
* Add driver/profiler build rule for all hals.

Test: mma
Change-Id: I98325f7af14fec7dd1bb64b1668de8c7c20ace92
2017-02-03 10:03:01 -08:00
Mikhail Naganov
ac5012a193 Audio HAL: extensions for new SoC features
Extend audio channel mask.

Added AC4 format.

Change-Id: I8d365d60127eeea2939fcf6094c5306fa36ab648
Test: make
2017-01-26 17:54:04 -08:00
TreeHugger Robot
4a6bc70009 Merge "update audio common generated vts file" 2016-12-29 22:32:03 +00:00
Yuexi Ma
474b61e5fc update audio common generated vts file
Test: mma

Change-Id: I983cdd883c284d20af95390b38a98541fb6f943b
2016-12-29 20:45:10 +00:00
Jean-Michel Trivi
71280e50b3 Define AUDIO_USAGE_ASSISTANT in list of audio attributes usage
Used hardware/interfaces/update-base-files.sh to update
   file system/media/audio/include/system/audio-base.h

Test: make
Bug: 30947943

Change-Id: Id1f6971a1e40ab963c19f42a95516e6d8a26fc60
2016-12-29 12:11:58 -08:00
Mikhail Naganov
fcbb5d2213 Merge "Fix offload tracks playback" 2016-12-19 16:59:00 +00:00
Mikhail Naganov
685f0e36a1 Fix offload tracks playback
Translation between audio_offload_info_t and AudioOffloadInfo
was missing a field. This was causing compressed tracks to play
using 'deep_buffer' mode instead of 'offload'.

Changing output stream async callback methods to 'oneway',
since they don't require anything from the callee.

Change-Id: I27fe7fb715e421f102db21a10d34e1dc3134cf01
Test: play MP3 file with Play Music, check audioflinger dump
2016-12-16 17:18:08 -08:00
Eric Laurent
d5c2cef024 Merge "audio HAL: add definitions for MMAP stream mode" 2016-12-15 17:26:06 +00:00
Eric Laurent
e1333d8604 audio HAL: add definitions for MMAP stream mode
Bug: 33398120
Test: make marlin-eng with ENABLE_TREBLE

Change-Id: I288005055bee9268bb1eff481e410aad0bfcfdd1
2016-12-14 15:50:44 -08:00
Yifan Hong
f35ee3b192 Revert "Revert "Update makefiles for Java package path.""
This reverts commit a8789f27cb.

Change-Id: I69980b580a556188ba868bb096ae1590b01759f5
2016-12-13 22:20:16 +00:00
Yifan Hong
a8789f27cb Revert "Update makefiles for Java package path."
This reverts commit ab0792ccdc.

Change-Id: I47fc272d9fa8875e3d7ccb10cb748c738fbf8135
2016-12-13 22:18:34 +00:00
Yifan Hong
ab0792ccdc Update makefiles for Java package path.
use V1_0 instead of 1.0.

Bug: 33554192

Test: hidl_test_java
Change-Id: Ic2d95265df10914a60a5bb743d75e839948838c3
2016-12-13 11:32:56 -08:00
Mikhail Naganov
c29205662a Audio HAL: extensions for new SoC features
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
2016-12-06 09:57:35 -08:00
Yifan Hong
501839495f Update makefiles for hidlizing IBase.
A new dependency android.hidl.base@1.0 is added for
all projects.

Test: mma

Change-Id: Ia70d0eb0d74de06475a339698386d383d491a43a
2016-12-03 01:01:14 -08:00
Mikhail Naganov
a9a58c150d Merge "Audio HAL: fixes for issues discovered after client conversion" 2016-12-02 00:06:16 +00:00
Mikhail Naganov
6e81e9bb3c Audio HAL: fixes for issues discovered after client conversion
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
2016-12-01 13:48:58 -08:00
Steven Moreland
d26dc50abb Always specify underlying enum type.
Bug: 33197891
Test: compiles
Change-Id: I3d4822ea9a665708302d3bd1460425fddf1dcda9
2016-11-29 14:22:10 -08:00
Steven Moreland
bbff14d4bb Merge "Update makefiles for logging." 2016-11-22 17:25:36 +00:00
Steven Moreland
f8d68ec855 Update makefiles for logging.
Bug: 32943424
Test: pass
Change-Id: Ic88ce6adf04e0e36db53e4cc06ac2ec5a90c011c
2016-11-21 16:28:54 -08:00
Keun Soo Yim
9ea2824097 add Android.mk to audio/common for audio/common/2.0/Android.mk
Test: mma
Change-Id: I503406aee87a3401e58343921746cd376f76af24
2016-11-19 04:57:31 +00:00
Yifan Hong
6b920e43d3 Split libhidl into base and transport.
Bug: 32756130

Test: mma
Change-Id: Id21cf23abe2910f26bb7895511862443b93dc112
2016-11-18 00:00:54 -08:00
Mikhail Naganov
1054829502 Implement audio devices and streams HAL delegating to legacy HAL
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
2016-11-15 08:52:39 -08:00
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
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
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
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
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
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