Commit graph

416 commits

Author SHA1 Message Date
Kevin Rocard
e93e38a91d Merge "Audio policy config xsd: add missing gains and address in ports" into oc-dev
am: 90e68d31cf

Change-Id: I0aa31b2996c8aae97d0b7ba16d9943f47d70a1fe
2017-08-01 00:05:16 +00:00
Kevin Rocard
488beb2db1 Audio policy config xsd: add missing gains and address in ports
No nexus/pixel device uses port gains and their configuration were taken
as reference for the xsd creation.

Gains in mixPort and devicePort are supported by the code and use by
oem. As a result the xsd should allow them.

For validation of this path, the xsd was run against the example xml in
the audiopolicy source. Several other misalignment were found. They will
be fix in an other patch.

The address is also an optional field that was forgotten for the same
reason.

Bug: b/63827061
Test: -noout xmllint --schema hardware/interfaces/audio/2.0/config/audio_policy_configuration.xsd frameworks/av/services/audiopolicy/config/audio_policy_configuration.xml
Test: the above command fails for some other xml node unrelated to this bug
Test: this is tracked by b/38184704
Change-Id: I8dae15eb85a6a6d43c87aa747daf92a88d3fdcc0
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-07-27 15:51:04 -07:00
Kevin Rocard
60012203d3 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
(cherry picked from commit 921d12ea6d)
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-07-20 10:01:44 -07: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
Tomasz Wasilczyk
bb5f29c9fb Use broadcastradio 1.1 default implementation by default.
Also, remove a warning for 1.1 interface, as the hidl freeze mechanism
is now in place.

Bug: b/34348946
Test: VTS, instrumentalization
Change-Id: I82025a7de8abd0758ba8b196bbbfc48b9322ac3b
2017-07-12 12:23:41 -07:00
Mikhail Naganov
6301fc325e Add VTS test for validating audio effects config against XML schema
If the device contains /vendor/etc/audio_effects.xml (the new XML
format for the audio effects configuration), the test validates
this config against the schema contained in
audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd
(pushed to the device by the VTS test runner)

Change-Id: Ib57d30e3c1e32ce5d74f906a216f9bb8f635a28c
Test: this is a test
Bug: 37492580
2017-07-07 17:45:15 -07:00
Kevin Rocard
6a0af3c51b Can not specify an audio effect for the default stream
The default stream is an alias to an other stream.
One can not allocate effects for it in the configuration
as it could conflict with the stream it aliases.

Test: run xmllint against all audio effect configs
Bug: 37492580
Change-Id: Ia2bbc13b5cf2a0a40e5eeff7ee22a7423ec16767
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-07-07 17:45:15 -07:00
Kevin Rocard
3296cee7e5 Configure audio effects libraries with relative path
audio effects.conf legacy format had the libraries specified
in absolute path.
Nevertheless those libraries must be in specific folders.
The .conf loader used to strip the prefix of the paths then
try to load the libraries in those specific folders.

With new xml format the user only has to specify the name of the library
and the loader will load it from the known folders.

Test: run xmllint against a config with absolute paths
Bug: 37492580
Change-Id: I2863e04b3cdf0c6758d9f7be33796621fee527ed
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-07-07 17:45:15 -07:00
Kevin Rocard
627fdaae3d Audio effect XSD: Give effect proxy its own tag
Effect and effect proxy do not have the same xml structure.
As they had the same xml tag, it was impossible to discriminate them in
the xsd. Leading to xsd validating incorrect xml.

This patch changes the xsd to force proxy effect to have the type
<effectProxy> instead of <element>.

With this patch, effects have to be explicit about being a proxy and
they are forced to have a hw *and* a sw library.

Bug: 37492580
Test: validated xsd against converted effects.conf
Test: vendor/box/user/mnaganov/audio-effects-conf/test.sh
Change-Id: Idf8a1040feccbfd6a346ab9bc892f3b7e87df530
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-07-07 17:45:15 -07:00
Mikhail Naganov
7a5614bc9e Revert "Revert of "Audio: Add XML schema for audio effects configuration""
Add the configuration back on the master development branch.

This reverts commit d5196af814.

Bug: 37492580
Change-Id: Ie2d3218d942a995aec4d6b73fb7813e76604066b
Test: not needed
2017-07-07 17:45:03 -07:00
Mikhail Naganov
d5196af814 Revert of "Audio: Add XML schema for audio effects configuration"
The schema file isn't used anywhere, safe to revert.

Bug: 37492580
Bug: 63169864
Test: not needed
Change-Id: I97e6e2d5be5324efe87475e04a916afeeec53631
2017-07-05 12:46:12 -07:00
Mikhail Naganov
e1af2bc940 Merge "audiohal: Prevent logspam when calling get_presentation_position" into oc-dev
am: 80e9912183

Change-Id: Ic211f5bfb3d5762e972f3801686aeb20ed086f8a
2017-06-08 22:54:52 +00:00
TreeHugger Robot
80e9912183 Merge "audiohal: Prevent logspam when calling get_presentation_position" into oc-dev 2017-06-08 22:47:02 +00:00
Chih-Hung Hsieh
d3bc681f26 Remove unused lambda capture
New clang compiler gives warning to unused lambda captures.
Apply clang-format.

Bug: 37423073
Test: Build

Change-Id: Icdf019df1a6c9dcadeb35551377d7afa09eebb3e
(cherry picked from commit 7eb57b60ab)
2017-06-07 12:57:20 -07:00
Kevin Rocard
cbf9c08116 Audio VTS: Enforce policy configuration format
Validate the audio_policy_configuration.xml supplied in /vendor against
the format schema.

Test: Run the VTS test on target
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Bug: 35700978
Change-Id: I800e692a6ff4f64655007c33af7e34d879ee1132
Signed-off-by: Kevin Rocard <krocard@google.com>
(cherry picked from commit 06a2a40309)
2017-06-06 01:55:49 +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
Kevin Rocard
19b3e43fb4 Audio VTS: Enforce policy configuration format
Validate the audio_policy_configuration.xml supplied in /vendor against
the format schema.

Test: Run the VTS test on target
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Bug: 35700978
Change-Id: I800e692a6ff4f64655007c33af7e34d879ee1132
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-06-02 16:43:32 -07:00
Kevin Rocard
88e8f90e7f Audio VTS: Test now use Android.mk
To validate the audio_policy_configuration.xml against a schema,
libxml2 is used.
Unfortunately, libxml2 uses Android.mk in oc-dev thus can not be used
from the tests which uses Android.bp.

It has been deemed safer to transform the tests to use Android.mk rather
than backporting the Android.bp patch from master.

Test: Compile
Bug: 35700978
Merged-In: I800e692a6ff4f64655007c33af7e34d879ee1132
Change-Id: Ie3f2069d60be369b4c37c27e9c1cf9372323a19c
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-06-02 16:43:21 -07:00
Kevin Rocard
06a2a40309 Audio VTS: Enforce policy configuration format
Validate the audio_policy_configuration.xml supplied in /vendor against
the format schema.

Test: Run the VTS test on target
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalAudioV2_0Target -t CheckConfig.audioPolicyConfigurationValidation
Bug: 35700978
Change-Id: I800e692a6ff4f64655007c33af7e34d879ee1132
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-06-02 16:24:43 -07:00
Mikhail Naganov
7cd76c1469 VTS Audio Effect: Do not check the result of IEffect::offload method am: 5abb15e987
am: dd5605c4fb

Change-Id: I98d3bd958af9266b97830c098d282f4760974cef
2017-06-02 18:31:08 +00:00
Mikhail Naganov
dd5605c4fb VTS Audio Effect: Do not check the result of IEffect::offload method
am: 5abb15e987

Change-Id: I266ac43808d0e9002822ea4d589d17bfc9995d84
2017-06-02 18:23:54 +00:00
Mikhail Naganov
5abb15e987 VTS Audio Effect: Do not check the result of IEffect::offload method
HAL may not support offloading, and a call to IEffect::offload
is allowed to return an error code.

Update the test to only check that the call to the method doesn't
crash.

Bug: 38437110
Test: still passes
Change-Id: I6cfd25998edb9c68d2e585e572ba8ba3a3427e98
2017-06-02 15:54:43 +00:00
Eric Laurent
9c21837d1f Merge "Audio: Add XML schema for audio policy configuration" into oc-dev am: 49f3b03348
am: e18fdf9ea7

Change-Id: I91958de424207ceac6bb3a8a3f662e6f814b6e84
2017-06-01 20:28:10 +00:00
Eric Laurent
e18fdf9ea7 Merge "Audio: Add XML schema for audio policy configuration" into oc-dev
am: 49f3b03348

Change-Id: Ifc0584bb4c03deb9ed2139f9b5f9b5c5df1c6782
2017-06-01 20:01:20 +00:00
TreeHugger Robot
49f3b03348 Merge "Audio: Add XML schema for audio policy configuration" into oc-dev 2017-06-01 19:56:21 +00:00
Mikhail Naganov
25e11c3a7e Merge "Revert "audiohal: Add diagnostics to investigate HAL call crashes"" into oc-dev am: 5482fe026c
am: f652c9e031

Change-Id: I7de1922316cb85789cc4cbf13fe70509de61032e
2017-06-01 16:40:08 +00:00
Mikhail Naganov
f652c9e031 Merge "Revert "audiohal: Add diagnostics to investigate HAL call crashes"" into oc-dev
am: 5482fe026c

Change-Id: I2a0d9aa82ec5cc2d6c593ae08f7b58ca91747860
2017-06-01 16:37:07 +00:00
TreeHugger Robot
5482fe026c Merge "Revert "audiohal: Add diagnostics to investigate HAL call crashes"" into oc-dev 2017-06-01 16:32:29 +00:00
Mikhail Naganov
f74df70fd7 audiohal: Prevent logspam when calling get_presentation_position
get_presentation_position can return ENODATA if the stream
has stopped but the write is still querying the position.

Bug: 38376424
Change-Id: I9d516a19fb347843a8ec8e8e9a0f5eab0b0798e6
Test: no log messages from StreamHAL about get_presentation_position
(cherry picked from commit 96a3a19bed)
2017-05-31 23:01:59 +00:00
Eric Laurent
524bdd39bf Audio: Add XML schema for audio policy configuration
The schema describes the XML format for audio policy
configuration.
It will be enforced in a follow up vts test.

Bug: 35700978
Test: schema is parsed with xmllint with no errors
Test: xmllint  --xinclude --noout --schema audio_policy_configuration.xsd  out/target/product/sailfish/vendor/etc/audio_policy_configuration.xml

Change-Id: Ic6830446b54b3e02e4bca9b0a392523a8fb359e1
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-31 15:29:17 -07:00
Mikhail Naganov
f811acf049 Revert "audiohal: Add diagnostics to investigate HAL call crashes"
This reverts commit 6c0f76a684.

Since the root cause of the crash has been established, there is no need to keep this code around.

Bug: 36225019
Change-Id: I74e570e863a0cdec5d9029f1672e2e8066c246b5
2017-05-31 19:59:21 +00:00
Kevin Rocard
07fb7363bc Revert "Temporary disable tests failing tests for O"
This commit was never intended to be merged in master but it could not
be avoided due to an automerger limitation.

This reverts commit fd297c6f8e.
Test: Run VTS
Bug: 36311550

Change-Id: I6ee23a6282c29b125e53cced0cfcc6b697754ce0
2017-05-26 17:41:31 -07:00
Mikhail Naganov
61de2b1f4a Audio: Add XML schema for audio effects configuration
The schema describes the new XML format for audio effects
configuration.

Bug: 37492580
Test: schema is parsed with xmllint with no errors
Change-Id: I5dd33c6806cace5cb66457e1a072bda51ee11294
2017-05-24 20:02:29 +00:00
TreeHugger Robot
9b15ddfff5 Merge "audiohal: Prevent logspam when calling get_presentation_position" 2017-05-23 22:34:13 +00:00
Kevin Rocard
54b4d1b2d0 Merge "Temporary disable tests failing tests for O" into oc-dev am: ed8c71e480
am: b7e2957ad5

Change-Id: I639e310bbcd1da5f12263d39dbec54e7aa8ebe0d
2017-05-23 21:53:19 +00:00
Kevin Rocard
b7e2957ad5 Merge "Temporary disable tests failing tests for O" into oc-dev
am: ed8c71e480

Change-Id: Ib0681b212b0e9e568004c6b07e66a61bb31ea371
2017-05-23 21:48:04 +00:00
TreeHugger Robot
ed8c71e480 Merge "Temporary disable tests failing tests for O" into oc-dev 2017-05-23 21:39:11 +00:00
Mikhail Naganov
96a3a19bed audiohal: Prevent logspam when calling get_presentation_position
get_presentation_position can return ENODATA if the stream
has stopped but the write is still querying the position.

Bug: 38376424
Change-Id: I9d516a19fb347843a8ec8e8e9a0f5eab0b0798e6
Test: no log messages from StreamHAL about get_presentation_position
2017-05-23 21:03:36 +00:00
Steven Moreland
7708449766 Update makefiles. (2/2) am: 76cfb84140
am: f203167814

Change-Id: I1f13401266f3c2f78c627088b09c79cd7c8d0276
2017-05-22 17:29:04 +00:00
Steven Moreland
f203167814 Update makefiles. (2/2)
am: 76cfb84140

Change-Id: I24d21438a5b2f447d2160929c6ff6e17b2b66820
2017-05-22 17:15:20 +00: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
Mikhail Naganov
95fa26f096 Merge "VTS Audio Effect: Allow 'NOT_SUPPORTED' from IEffect::offload method" into oc-dev am: 2bb2add8a9
am: 2d6f470495

Change-Id: Ibc558b4ca5af3e03c7eddff43450779c2026b118
2017-05-19 20:40:49 +00:00
Mikhail Naganov
2d6f470495 Merge "VTS Audio Effect: Allow 'NOT_SUPPORTED' from IEffect::offload method" into oc-dev
am: 2bb2add8a9

Change-Id: I4002f571964e615ec0e8357468cbf037fbdb0a43
2017-05-19 20:35:34 +00:00
Mikhail Naganov
c11724572e VTS Audio Effect: Allow 'NOT_SUPPORTED' from IEffect::offload method
HAL may not support offloading, and a call to IEffect::offload
is allowed to return an error code.

Update the test to accept either OK or NOT_SUPPORTED.

Bug: 38437110
Test: still passes
Change-Id: I1822010eed73f61bb0e0ae1852739b47fa72eade
2017-05-19 11:29:28 -07:00
Eric Laurent
3510657437 Merge "audio HAL: fix getParameters status check." into oc-dev am: af7bc59c0a
am: 7f7a0a880c

Change-Id: Ib1663485edb5abf7322ad0ef197e821ba5e21ba8
2017-05-18 17:47:36 +00:00
Eric Laurent
7f7a0a880c Merge "audio HAL: fix getParameters status check." into oc-dev
am: af7bc59c0a

Change-Id: Icd5926031ace47bc0dc1b1f24cb48e107851fcd7
2017-05-18 17:37:02 +00:00
Eric Laurent
45d4032215 audio HAL: fix getParameters status check.
Bug: 38326193
Test: VTS tests for module VtsHalAudioV2_0TargetTest.

Change-Id: If4109cea68120d722a3b1084ad583170e950cfa0
2017-05-17 18:38:47 -07:00
Kevin Rocard
fd297c6f8e Temporary disable tests failing tests for O
Those tests are failing because their fix
(I0ea1a4bf952527ac0711ed3cdd31c6aa53db4d2e) is dangerous to merge in O
so close to the final release.

The fix implements a rejection feature for unsupported audio format.
This rejection is required by the hal interface
but was only partially implemented in the hal.
The problem is that the framework was never tested with a hal supporting
this behavior nor some calls implemented with this requirement.
As a result I do not feel confident in merging it in oc-dev,
it might complex, hard to detect bugs.

The fix will be merged in master thus will be part of mr1.
The current patch will be reverted in master after the fix is merged.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Ia9e1dcec5442e2755f0bcb13d8d502663f507dbe
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-17 15:54:09 -07:00
Kevin Rocard
6ade5e3c1b Merge changes from topic 'audio-primary-hal-vts-fix' into oc-dev am: c558ddf3fa
am: cdf142d8dd

Change-Id: I3429df38464282106bef8464a4852bd5b29f763d
2017-05-16 19:33:39 +00:00
Kevin Rocard
cdf142d8dd Merge changes from topic 'audio-primary-hal-vts-fix' into oc-dev
am: c558ddf3fa

Change-Id: I15868923cdfd165e20468d1c885a256fefd0eeca
2017-05-16 19:13:11 +00:00
Kevin Rocard
a1d6ea4ba7 Audio HAL: A speech volume outside of [0,1] is an error
Hals are supposed to received normalized volumes, between 0 and 1.
Previously volumes outside [0,1] were clamp to this range.
This clamping has the capability to hide bugs thus return an error if
such volume is received.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Iab70f9c651540ea2434d10939d28c1c842db19e0
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-15 14:51:28 -07:00
Chih-Hung Hsieh
7eb57b60ab Remove unused lambda capture
New clang compiler gives warning to unused lambda captures.
Apply clang-format.

Bug: 37423073
Test: Build

Change-Id: Icdf019df1a6c9dcadeb35551377d7afa09eebb3e
2017-05-15 14:02:45 -07:00
Kevin Rocard
fcf186bd59 Audio HAL VTS: Some methods are not optional
Some mandatory methods were allowed to return NOT_SUPPORTED
although their implementations is mandatory.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Ibe4b3cf73257309975ed11269a38315051fa9064
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-12 16:02:30 -07:00
Kevin Rocard
c8e1b1dadc Merge changes from topic 'audio-primary-hal-vts-fix' into oc-dev
am: 257c2f1a43

Change-Id: Ic8850d915b5672e7529f99e7d57845b2de44857a
2017-05-12 06:57:47 +00:00
Kevin Rocard
257c2f1a43 Merge changes from topic 'audio-primary-hal-vts-fix' into oc-dev
* changes:
  Audio HAL: A volume/gain outside of [0,1] is an error
  Audio HAL VTS: Log test unexpected behaviour
  Audio HAL VTS: Improve ASSERT of Result and Return
  Audio HAL VTS: stopped stream state getters may return INVALID_STATE
  Audio HAL VTS: setGain allow -0.0
  Audio HAL VTS: Some methods are optional
  Audio HAL VTS: GetPresentationPosition may return 0 on stop stream
  Audio HAL VTS: getDevice() == NONE => not supported
  Audio HAL VTS: Getter test assert logic was incorrect
  Audio HAL VTS: debugDump can only test for crash
  Audio HAL VTS: Sanitize prepareFor{Writing,Reading} input size
  Audio HAL VTS: refactor prepareFor{Reading,Writing}
  Audio HAL VTS: Sanitize setMode input
  Audio HAL VTS: Allow OK when setting a non existing parameter
  Audio HAL VTS: differentiate getParam success/failure/not_implemented
  Audio HAL VTS: Fix style on modified files
2017-05-11 22:34:40 +00:00
Steven Moreland
a32ebce372 Update makefiles for c++-sources and c++-headers. (2/2)
am: bc71124120

Change-Id: Icf36068a4d863a8520854c7a83e51f960c188e12
2017-05-11 00:48:55 +00: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
Kevin Rocard
4c030024df Audio HAL: A volume/gain outside of [0,1] is an error
Hals are supposed to received normalized volumes, between 0 and 1.
Previously volumes outside [0,1] were clamp to this range.
This clamping has the capability to hide bugs thus return an error if
such volume is received.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Ia4880bdff6111cbcdae6a4ebee921eddae141ee4
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 18:28:12 -07:00
Kevin Rocard
96f46c4a23 Audio HAL VTS: Log test unexpected behaviour
Some test output infos that are useful to understand how they run.
Unfortunately the xml report does not seem to be saved by VTS tradefed.
Thus output them in logcat.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I9a2cc10160c3b1c8f81db0464efbc6b26600cadc
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:03 -07:00
Kevin Rocard
f26f67a16b Audio HAL VTS: Improve ASSERT of Result and Return
Previously tests on Result and Return were using ASSERT_NO_FATAL_FAILURE
and helper methods.
This leaded to complex error messages were the error did not pointed to
the helper methods instead of the ASSERT_RESULT call.
Additionally SCOPE_TRACE messages are repeated
for each ASSERT_NO_FATAL_FAILURE level.

Use ::testing::AssertionResult to improve drastically the error messages.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: If705502546606d678df3f1966b0cd9f3ef8c2529
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
304b6c810e Audio HAL VTS: stopped stream state getters may return INVALID_STATE
A never started stream should have its render position and next write
timestamp at 0 or indicate that the state is invalid.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I62e16066bb22101ee8f75154fc6c85a66be2f402
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
c4f1b2f86a Audio HAL VTS: setGain allow -0.0
Previously -0.0 was consider an invalid value as not in the range [0,1].
But it is quite difficult in C++ to differentiate -0.0 and 0.0 as -0.0 == 0.0
and such difference has no impact in practice.

Thus leave the implementation support or not -0.0.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Ia0ebcb325f77adcf8471620f418da1cbe8995e36
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
98390a6c2c Audio HAL VTS: Some methods are optional
Although the method documentation does not say it,
some HIDL interface methods are optional.

Update the tests to allow NOT_SUPPORTED to be returned.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: If31acc2dbdb6d1d563910e85c99401c48f4f3f86
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
476e38fd31 Audio HAL VTS: GetPresentationPosition may return 0 on stop stream
GetPresentationPosition returns the last time a sample was written to
the hardware.
Calling it on a stop stream should return 0 sample written, but the
timestamps of that measure is of little importance.
Thus allow this timestamp to be 0 indicating that the measure was never
actually made.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I3c33b60f98e8cbea269a7739cc1889af932dcff5
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
8f8730c762 Audio HAL VTS: getDevice() == NONE => not supported
getDevice does not return a Result, thus it can not return NOT_SUPPORTED.
Consider NONE as not supported.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I3b6f7a1fbc1d1535faf549f5b031461cb39d1722
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
4aefd1c1ff Audio HAL VTS: Getter test assert logic was incorrect
Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Iaf2d71829a15b12dcf56e825773c8a697896a264
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
5e5783daef Audio HAL VTS: debugDump can only test for crash
DebugDump does not return an error code, thus the implementation can not
return not implemented.

As a result, the test can not expect any output from the function.
Only test that the call does not crash and add a log if the function is
probably not implemented in the test.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I2c18958bceb1eb638491f9afce9d8e8025ccd3ec
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
195205b323 Audio HAL VTS: Sanitize prepareFor{Writing,Reading} input size
Return an error if framesCount or frameSize are null to avoid a division
by zero when calculating the buffer size.

The message queues are allocated with a buffer size but if two big they will
assert not return an error.
Thus take some margin on the buffer size check.

Note that both function should be refactored as 99% identical.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I0576e9016ef2e567c8d4e171c6237883d9865db9
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
c07df49e45 Audio HAL VTS: refactor prepareFor{Reading,Writing}
Those functions had lots of copy paste on errors and
the following patch will even add more error detections.
Refactor the hidl_cb call to avoid all duplication.
Note that both function should be refactored as 99% identical.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I40d6926b4f9f5e3aba51e878f55fb013f4ca09c1
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:43:02 -07:00
Kevin Rocard
04364edefc Audio HAL VTS: Sanitize setMode input
Some values of AudioMode are exposed although implementation detail.
Make sure the client can not use them.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: If513c2a06efa8a92459f0af80c63232fc63302b0
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:42:39 -07:00
Kevin Rocard
f8500dcb5a Audio HAL VTS: Allow OK when setting a non existing parameter
setHwAvSync and setParameters were implemented in the pre-hidl interface
as set_parameters.
Unfortunately set_parameters did not return an error if a key was not
implemented.

As most HIDL implementation will be a wrapper around the pre-hidl
interface, allow those functions to return OK on not implemented key.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Icfcaa02b7d63e03375fddc90dc5a803754c1874f
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 14:42:39 -07:00
Kevin Rocard
fa3b4a9334 Audio HAL VTS: differentiate getParam success/failure/not_implemented
When sending parameters to the HAL (and some getters are implemented
with getParameters), the client expect a status consistent
with the other HIDL methods. Ie: not implemented or success and failure.

Unfortunately, the legacy get_parameter interface, which currently most
Audio HIDL implementation are a wrapper around, do not return such error
code.

Get parameters return a list of key values.
 - If a requested key does not return a key value pair, consider it not
   implemented
 - If a requested key returns a key not followed by a correct value,
   consider it a failure
 - otherwise it is a success

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: Id6711e9c1974fe5a336b6de83a9b6d14f74437c9
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-05-08 12:42:14 -07:00
Kevin Rocard
72e50e2ef1 Audio HAL VTS: Fix style on modified files
In order to avoid style inconsistency as well as non functional
modification in following patches,
fix the style of all files modified for the fix of the VTS tests.

Patch generated with:
$ clang-format -i --style file -- <file list>

Bug: 36311550
Test: compile
Change-Id: I53dbcdabf959a6100e34a2ee4d0f951d525049cb
2017-05-08 12:41:57 -07:00
Mikhail Naganov
43266a7691 Merge "audiohal: Add diagnostics to investigate HAL call crashes" into oc-dev
am: 65f7dbc9a9

Change-Id: I1f0d90fa7705d2716dbd3358418706ccae8dccb9
2017-05-05 00:08:46 +00:00
Mikhail Naganov
6c0f76a684 audiohal: Add diagnostics to investigate HAL call crashes
This is intended to clarify whether surprising zeroing out of HAL
control structures happens to a particular HAL module, or to any
HAL module at random.

Unfortunately, the crash itself can't be prevented as
audioflinger can't work around a HAL outage, and needs to be
restarted anyway.

Bug: 36225019
Test: verified that the logged string contains the information
Change-Id: I5843d89b4e5385b4ce269f72b5891ccb646daeba
2017-05-04 14:34:37 -07:00
Mikhail Naganov
63a3014646 Merge "audiohal: Fix incorrect parameter handling in IDevicesFactory::openDevice" into oc-dev
am: f66f505bc6

Change-Id: Ie6a32e496f723413421bef285a4370ddef7214bc
2017-05-04 21:34:06 +00:00
Mikhail Naganov
8604a738a7 audiohal: Fix incorrect parameter handling in IDevicesFactory::openDevice
Check for possibly invalid values of IDevicesFactory::Device enum.

Bug: 37592306
Change-Id: I4a2300d3be9ab38e6c51ba8a3b5bbbb606a11c2b
Test: VTS
(cherry picked from commit 8c16d85122)
2017-05-04 18:30:31 +00:00
Mikhail Naganov
62ce08c3a2 Merge "Revert "audiohal: Get rid of multiple inheritance in IDevice implementation"" into oc-dev
am: ed84acb9ff

Change-Id: Id618a6d2d483e805a3ad9d6991d2ae782de00da3
2017-05-03 19:15:49 +00:00
Mikhail Naganov
86685f56da Revert "audiohal: Get rid of multiple inheritance in IDevice implementation"
This reverts commit e4228e7aa6.

Further analysis of the bug has shown that the problem is not related
to the use of multiple inheritance.

Bug: 36225019
Change-Id: Icdcaf84061c0ecf29f891521bd961c3ee89f1cfc
2017-05-03 16:40:27 +00:00
Steven Moreland
5c63b11f76 Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Merged-In: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
Change-Id: I08aaad80f7e2fc262aa3a8b66fe932e8133a928d
2017-05-02 15:29:30 -07:00
Mikhail Naganov
e4228e7aa6 audiohal: Get rid of multiple inheritance in IDevice implementation
We still not sure what causes crashes in Device::get|setParam*,
but it seems that it is somehow caused by the fact that the parameters
code is in a separate class with virtual methods, from which
Device class inherits along with IDevice interface.

The workaround is to substitute multiple inheritance with
delegation in Device class. Hopefully this will either eliminate
crashes or make the underlying reasons more clear.

Some of the code got reformatted by clang-format as a presubmit
requirement.

Bug: 36225019
Test: make
Change-Id: Id785c3565bbebd5acc26ca46472961698d9c6208
2017-04-29 00:48:57 +00:00
Mikhail Naganov
c8c6a81f0f audiohal: Support stateful downmixer effects
Fraunhofer's downmixer has additional buffering, this is incompatible
with how DownmixerBufferProvider used to process incomplete buffers.

Now the effects HIDL wrapper delivers frameCount updates in
audiobuffers to the server side. This fixes playback of multichannel
sound streams.

Bug: 36181621
Test: play 5.1 track from Play Music
Change-Id: Iffe3327c6eedef85151eec2b41e0aedfb7ffa6dc
2017-04-27 12:37:28 -07:00
Mikhail Naganov
95344ba2f5 Merge "audiohal: Fix handling of invalid arguments in 'debugDump' methods" into oc-dev 2017-04-26 22:53:33 +00:00
Mikhail Naganov
3e6fe754f6 audiohal: Fix handling of invalid arguments in 'debugDump' methods
Add checks for validity of the passed in native handle.

Bug: 37590777
Change-Id: If906f0086c3442819e1844cc521215d5b74af015
Test: VTS
(cherry picked from commit 7bae6a0b63)
2017-04-25 20:21:37 +00:00
Mikhail Naganov
3a2470f82d audiohal: Fix typos in comments, add missing comments
These changes are in comments only, no ABI breaking changes.

Bug: 32238101
Test: make
Change-Id: Iead4ba01dae1a1c05d8fbed7f194182128e9e6ad
2017-04-25 10:59:53 -07:00
Derek Chen
ab24ecd952 audio hal: initialize audio patch handle
Initialize audio patch handle to avoid
uninitialized value causing validation
failure in vendor hal audio patch.

Bug: 36994757
Test: Initiate voice call, no audio heard from other end

Change-Id: I4cf57210432430af89109f605813645ff332bfbb
2017-04-20 23:48:52 +00:00
Kevin Rocard
34b44cd7db Audio primary hal: fix member function used before init
prepare for write was refactor by Ib4170eb6a9f88f9352d0912083b43d600771bb8e
to use temporary variable in a rai pattern.
Nevertheless the member variable was still used too early in
prepareForRead resulting in a crash for capture.

Test: assistant, camcorder
Bug: 37492059

Change-Id: I08140834959c440798cd40700dd089adca2f3e40
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-04-19 09:38:42 -07:00
TreeHugger Robot
d7e88525a7 Merge changes from topic 'vts-audio-fix' into oc-dev
* changes:
  Audio HAL: Destroy EventFlag on failed prepareTo{write,read}
  Audio HAL: Check for buffer size overflow
  Audio HAL: Detect buffer memory allocation failure
  Audio HAL: Detect openDevice failure
  Audio HAL VTS: Fix documentation
2017-04-19 00:44:34 +00: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
Mikhail Naganov
3acaa668c1 soundtrigger: Use "default" instance name for HAL service
"default" implies using "primary" legacy device module.
This doesn't change anything for binderized mode, because
the server was only registering itself as "sound_trigger.primary",
so it was the only possibility anyways.

Usage of "stub" (debugging) module is still possible
if audioflinger and corresponding services are built with
USE_LEGACY_LOCAL_AUDIO_HAL=true (added makefile check to ensure
that).

Test: "Ok Google" from screen off state on sailfish
Bug: 36570720
Change-Id: I88f1ebd4c1efd0f91e37458746c336a4beef33ae
2017-04-14 15:52:11 +00: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
Kevin Rocard
40343061d5 Audio HAL: Destroy EventFlag on failed prepareTo{write,read}
If prepareToWrite or prepareToRead fails after EventFlag is created, it
is not destroyed. This lead to strange random crashes (double free it seems).

Use the RAII pattern to manage the EventFlag life cycle.

Test: Run test on target
Bug: 36311550

Change-Id: I53a04a62b7d12fdcc94afd8ced3e547aa6edff50
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-04-07 14:35:47 -07:00
Kevin Rocard
b6498cbdf6 Audio HAL: Check for buffer size overflow
The audio buffer size is not provided by the client, it is computed from
the sample size and the number of sample.

No check was done as if the multiplication of these two numbers would
produce an overflow. This leaded to erroneous memory access crashing the
media server.

Test: Run on target
Bug: 36311550

Change-Id: I3436800ab6ac1b5e6a6aa4d03d6b96910eb54652
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-04-07 13:10:01 -07:00
Kevin Rocard
67d550888a Audio HAL: Detect buffer memory allocation failure
If the requested buffer was too big, memory allocation would fail,
resulting if a audio hal crash (uncatch exception thrown by new).

Properly hadle the failure by retuning INVALID_PARAMETERS in such case.

Bug: 36311550
Test: Run test on target

Change-Id: Ib4170eb6a9f88f9352d0912083b43d600771bb8e
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-04-07 13:10:01 -07:00
Kevin Rocard
fba442a60d Audio HAL: Detect openDevice failure
The result status was not checked.

Test: Run test on target
Bug: 36311550

Change-Id: I197b52d0b5a1276d3e3beba105bb91639f89e060
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-04-07 13:10:01 -07:00
Kevin Rocard
6f22680db6 Audio HAL VTS: Fix documentation
Some test did not have any documentation

Test: compile & run
Bug: 36311550

Change-Id: I37c40f6f17993a275e5c40b9a835ac04acf4f8e6
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-04-07 13:10:01 -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
Mikhail Naganov
936279e1ff audiohal: Fix UAF of HAL devices in Stream objects
Stream objects used to hold a pointer to underlying HAL device
object which they didn't own. Since destruction of server side
objects is asynchronous, it was possible that a Device object
gets destroyed before Stream objects, making all the HAL device
object pointer to become stale.

Fixed by adding a strong reference to Device objects into Stream
objects.

Bug: 36702804
Change-Id: I3da3611afbb91d6fd6410ac5b8af2a2eebfa6dac
Test: ran Loopback app and HAL VTS tests
(cherry picked from commit 96d3573cda)
2017-03-30 15:52:30 +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
TreeHugger Robot
8b624737d7 Merge "audiohal: Add crash tests for some methods of IEffect" 2017-03-27 17:57:55 +00:00
Mikhail Naganov
05fa0d0312 audiohal: Add crash tests for some methods of IEffect
For methods that can't be meaningfully tested, add tests
verifying that they at least don't crash.

Bug: 32022706
Change-Id: I234c2ae4b6bc173450cf50e8749ea966cbc2d2a2
Test: this is a test
2017-03-24 17:06:25 -07:00
TreeHugger Robot
d4762a75b4 Merge "audiohal: Remove stale TODOs" 2017-03-23 00:57:16 +00:00
TreeHugger Robot
8f991deed1 Merge "Audio HAL VTS: test leftover calls" 2017-03-22 19:25:55 +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
be47eaf8cf Merge "audio: fix mistake in AudioDevice enum" 2017-03-21 23:41:09 +00:00
Kevin Rocard
e9a8fb7371 Audio HAL VTS: test leftover calls
Test: run on target

Bug: 34170075
Change-Id: I9529d3b8db7388332dde3ea7d5940d58e010e449
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-21 12:01:12 -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
Kevin Rocard
9657c056de Merge changes Ie3e9e23c,I5e13eb47
* changes:
  Audio HAL VTS: Add test for IStreamOut
  Audio HAL VTS: Avoid copying Return in helper
2017-03-17 01:14:57 +00:00
Mikhail Naganov
049331f6f7 Merge "audiohal: Rename output flag VOIP_CALL_RX -> VOIP_RX" 2017-03-16 23:57:14 +00:00
Kevin Rocard
624800c073 Audio HAL VTS: Add test for IStreamOut
Some test are only negative.

Test: run test on board

Bug: 34170075
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-16 16:00:08 -07:00
Kevin Rocard
24db65c0ec Audio HAL VTS: Avoid copying Return in helper
Return are movable only, thus the fact that assertResult took a copy of
the value meant that the callee had to provide an rvalue.

This was not needed as the Result was not modified. Change it to a const
reference.

Test: run test on board

Bug: 34170075
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-16 16:00:02 -07:00
TreeHugger Robot
ef92f74a55 Merge "Add VTS tests for audio effects" 2017-03-15 02:03:00 +00:00
Mikhail Naganov
9f2890458a Add VTS tests for audio effects
Added tests covering IEffect, IEqualizerEffect, and
ILoudnessEnhancer interfaces.

Minor corrections in the interface definitions and implementations:

 - fixed descriptions and @callflow annotations in IEffect;

 - fixed type used for band levels in IEqualizerEffect;

 - fixed specification of frequencies in IEqualizerEffect;

 - fixed some bugs in previously non-execrices Effects code;

 - warning messages changed to error messages.

Test: this is a test
Bug: 32022706
Change-Id: I0e0bc111b07d944ad8a0321e8b1ec703f8d1a73e
2017-03-14 17:25:17 -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
Kevin Rocard
c9963526d9 Audio HAL VTS: Add tests for IStreamIn
For now most tests are negative.

Test: run test on board

Bug: 34170075
Change-Id: Id207ae310e0fa5a3ab4db49122249594cd2c2703
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-14 09:49:15 -07:00
Kevin Rocard
8878b4ba1f Audio HAL VTS: Add at least negative tests for IStream
Add negative test for the remaining methods of IStream
and positive one for most.

Test: run test on board

Bug: 34170075
Change-Id: Ib18c6d2e4d0a14ee4517f31319ddecf5e23ac8de
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-14 09:49:15 -07:00
Kevin Rocard
b903124b36 Audio HAL VTS: Test IStream::debugDump
Test: run it on target
Bug: 34170075
Change-Id: I4af190806f79e0c03b59e1cd60b6f58a08b05322
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-14 09:49:15 -07:00
Kevin Rocard
a7df7fc097 Audio HAL VTS: Split big test for better traceability
As some part of this big test were failing, it was difficult to actually
track on the dashboard what was wrong.

Split it in small independent equivalent tests.

Test: mm & run on target

Bug: 34170075
Change-Id: I03686e55ec112f0f0c0ef2683c5dc1ae79ff8d5e
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-14 09:49:15 -07:00
Kevin Rocard
de8cbffd47 Audio hal VTS: pretty print AudioDevice and ChannelMask
This eases the debuging of failing tests.
Also print hex value of the enums as well of their literal values.

Test: run the test on target
Bug: 34170075
Change-Id: Iea1d7d2269e0e5b413240aaa905daae755846e74
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-14 09:49:15 -07:00
Kevin Rocard
20e7af6159 Audio Hal VTS: Refactor ASSERT_RESULT helper
ASSERT_INVALID_ARGUMENTS was a macro that asserted that a given Result
or Return contained INVALID_ARGUMENT. The problem was that a result can
have lots of other values like INVALID_STATE or NOT_SUPPORTED.
Additionally not all test expect only one possible result.

Introduce two overload of ASSERT_RESULT()
The first one takes an expected Result value and compare it to the
obtained one.
The second take a list and expect the obtained one to be in this list.

Test: run the test on target
Bug: 34170075
Change-Id: I798729f27f723c98292610bfb43dbdb2724ec2ca
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-14 09:49:15 -07:00
Kevin Rocard
9c36914983 Audio hal VTS: generate names for parametrized tests
The gtest dashboard only shows test names, not their parameters.
This mean that parametrized tests are names 0,1,2...
Thus when one test fails, the dashboard info is not very useful.

This patch appends the audio config to the test name.

Test: run the test on target
Bug: 34170075
Change-Id: I77090a3a17e4a3e97ecb72a8a89ad2d88626d96f
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-13 09:18:22 -07:00
Kevin Rocard
92ce35df94 Audio hal VTS: factorize master volume test
Master volume was the first pair of getter/setter tested
and did not use the generic test*Accessor function.

Test: run the corresponding vts test
Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target

Bug: 34170075
Change-Id: I77080a3a17e4a3e97ecb72a8a89ad2d88626d96f
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-13 09:18:19 -07:00
Kevin Rocard
ee771e9cfa Fix potentiel deadlock in audio VTS
The IDevice::debugDump method dumps debug info in a file descriptor.
Such file descriptor was previously the writing end of a pipe.

As the test is not multithreaded, if the dump was bigger than the pipe
buffer, a deadlock would occur.

With this patch, the test uses a file instead of a pipe. Thus write
will never block infinitely.

Test: run the corresponding vts test
Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target

Bug: 34170075
Change-Id: I928cae712a1cb4411f907b3a9583014ba6486abc
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-13 09:18:16 -07:00
Yuexi Ma
161b564b35 audio: use vts target test base class
Test: make vts succeed
Change-Id: I8008392e016e0604f8aa9a292f1ec6c6e7c3b384
2017-03-10 21:53:53 +00:00
Yuexi Ma
ed2bb4e8f8 Change vts target base test class name
Test: make vts succeed, vts kernel tests and nfc hal tests passed
Change-Id: I95f10ad7a66f261c9030357edd411fe6d94150e8
2017-03-10 21:14:48 +00:00
Kevin Rocard
3c405a7acf Add VTS for the audio primary device
Its base class was tested but not the primary
device getters and setters.

Test: run the corresponding vts test
Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target

Bug: 34170075
Change-Id: Ic451761c7b8b29fd302a62aba83be6ce7be35f64
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-09 18:23:42 -08:00
Kevin Rocard
fd067c3f54 Fix segfault in Primary audio hal hidl wrapper getDevice
Test: run the corresponding vts test
Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target

Bug: 34170075
Change-Id: I0652f1bf748de99a8a2594630daf5ea2acec8934
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-09 18:23:41 -08:00
Kevin Rocard
d1e98aef14 Do not skip failing Audio vts tests
Previously failing tests were commented because I thought
our implementation had to pass all tests.

As a mater of facts, it is not the case and tests are allowed to fail.
Bugs will be raised for those failure.
This is much better way to track the fixes that FIXMEs.

Test: run the corresponding vts test
Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target

Bug: 34170075
Change-Id: I928cae712a1cb4411f907b3a9583014ba6487abd
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-09 18:23:29 -08:00
Steven Moreland
48c52249e4 hidl_default to all targets.
find hardware/interfaces -type f -not -path "*/.git/*" \
-exec sed -i -e '/cc_[A-Za-z_]\+/ { N; s/$/\n    defaults:
\["hidl_defaults"\],/ }' {} \;
./hardware/interfaces/update-makefiles.sh

Test: pass
Bug: 35840847
Change-Id: If10c464d2f000b85c8d698fe11a4f3fc4cfad282
2017-03-08 19:31:53 -08:00
Eric Laurent
d0fbfd8e7e Merge "audio: fix IStream.createMmapBuffer()" 2017-03-08 16:42:33 +00:00
Keun Soo Yim
89dc24e624 Merge "Add VTS tests for the primary audio hal" 2017-03-07 17:29:41 +00:00
Eric Laurent
0e3ae991b6 Merge "audio: add missing flags and devices" 2017-03-07 01:22:40 +00:00
Mikhail Naganov
cd4837f5f9 Merge "Revert "audiohal: Add diagnostic message to check the number of bytes written"" 2017-03-06 23:54:39 +00:00
Eric Laurent
a6f40c84ae audio: fix IStream.createMmapBuffer()
Do not close the native fd for shared memory passed by
the legacy HAL as it is owned by tinyalsa implementation.

Test: test MMAP NO IRQ playback and capture streams
Bug: 31458351
Change-Id: Ie0c2a38574e5ac5c13fdb8a5c81fd02cf7d0e47a
2017-03-06 15:09:48 -08: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
Kevin Rocard
f0357884b5 Add VTS tests for the primary audio hal
Test: run the vts test on target
Test: vts-tradefed r vts-hal-hidl -m VtsHalAudioV2_0Target

Bug: 34170075
Change-Id: I4bd6cb0aa5b7cc628537cd7c024542c4db8b592d
Signed-off-by: Kevin Rocard <krocard@google.com>
2017-03-03 14:33:40 -08:00
Mikhail Naganov
476930c978 Revert "audiohal: Add diagnostic message to check the number of bytes written"
Diagnostic logging can be removed now as we have figured out that the problem isn't with the legacy hal.

This reverts commit 8d391c8eed.

Change-Id: I70a3454c05a0f49f3a3bed06e5a11616ed90ddf3
2017-03-03 19:01:44 +00:00
TreeHugger Robot
1f611dc93d Merge "change all vts hidl tests to use VtsHalHidlTargetBaseTest (internal master)" 2017-03-01 17:26:27 +00:00
Yuexi Ma
50d7e27b3c change all vts hidl tests to use VtsHalHidlTargetBaseTest (internal master)
Bug: 33385836
Test: mma
Change-Id: Ide3ebc4a9db76257f33bcfb0c1f13d2ee33eeaa8
2017-02-28 22:27:28 +00:00
Mikhail Naganov
8d391c8eed audiohal: Add diagnostic message to check the number of bytes written
Temporary change for investigating b/35813113. Need to test
the hypothesis that sometimes either legacy HAL, or the wrapper
reports more bytes written than being asked for.

Bug: 35813113
Change-Id: I6596403e0ddcdcc8b061d1977e329f67670f30db
Test: make
2017-02-28 09:12:19 -08:00
Tomasz Wasilczyk
213170b663 Create Broadcast radio HAL 1.1; implement DigitalStatus enum.
Test: VTS
Change-Id: I338c467c4e373cae547f331ba876afa040238376
2017-02-27 13:13:26 -08:00
Steven Moreland
7e73d5b908 Remove viral dependency on libhwbinder. (2/2)
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Note, automotive has some actual dependencies on libhwbinder, filed
b/35758626 for this.

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6d0726c8130d00684b978efbdd48e3ae396f12e5
2017-02-24 12:18:01 -08:00
Chris Phoenix
f609010707 BroadcastRadio HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: I49622132d25c15597f46c19330a9d0b8dbffa704
2017-02-22 18:31:55 -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
8422f6aa04 Update the test binary and source file name on master.
* To confirm with Vts naming convention.

Bug: 35273456
Test: mma
Change-Id: I845da64085253cd02480465479618308045a52ed
2017-02-21 20:47:18 -08:00
TreeHugger Robot
63a3bd158a Merge "audio_effect HAL uses "default" service name" 2017-02-22 03:28:06 +00:00
Chris Phoenix
549ca2bbe8 audio_effect HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds; VTS HalAudioEffectHidlTargetBasicTest passes

Bug: 33844934
Change-Id: I7796982c4cad976aeeabf7708ec0104505332cad
2017-02-21 17:09:58 -08:00
Yifan Hong
55f7247d63 AudioDevices HAL uses "default" service name
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.

Test: builds

Bug: 33844934
Change-Id: I7ccbf802fcded790b4be325f36a34a3af6b42052
2017-02-21 16:19:52 -08:00
Zhuoyao Zhang
f008f8fdc4 Merge "Update .vts files on master based on the latest .hal file and hidl-gen" 2017-02-14 18:51:27 +00: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
Steven Moreland
a0da1a1c3d Move hidl shims to the vendor partition. (2/2)
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.

Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
2017-02-13 15:03:41 -08:00
TreeHugger Robot
86fa244c12 Merge "Update makefiles to use filgroup syntax." 2017-02-10 23:25:52 +00:00
TreeHugger Robot
b2e8954c7c Merge "audio: Remove timeout from waits on event flags in HAL driver threads" 2017-02-10 23:24:54 +00: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
1de5e2b326 Merge "audio: Check status of registerPassthroughServiceImplementation" 2017-02-10 20:28:06 +00:00
Mikhail Naganov
e867456982 audio: Remove timeout from waits on event flags in HAL driver threads
This fixes a power regression caused by periodic wakeups of
the driver threads even when the device is idle.

The timeout is really not needed, it used to be there to ensure that
the thread exits its loop, but then an explicit wake-up call before
closing the thread had been added for this purpose.

Bug: 34682579
Test: Follow repro steps from the bug, compare power consumption
      to the legacy version of the audio HAL.

Change-Id: I0bfc2079a449894c5d0bd6ef19b53ca425795a9e
2017-02-10 08:37: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
Mikhail Naganov
3c25646562 audio: Check status of registerPassthroughServiceImplementation
Make sure the server aborts if it can't register the main audio
service and the effects service.

Soundtrigger and FM radio are optional, thus their failure to
register is only logged.

Bug: 34634573
Change-Id: If96e3238fe4d986e91581cc1ea0d9b36c24a8b9c
Test: restart audio service
2017-02-08 16:56:33 -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
Mikhail Naganov
9bb90a55d6 Merge "audiohal: Make closing of effects and streams fast" 2017-02-06 16:34:42 +00:00
Mikhail Naganov
a7426f7147 Merge "audiohal: Make sure audio data transfer related commands go via FMQ" 2017-02-06 16:33:55 +00:00
Keun Soo Yim
7b9b6ca18f move VTS stub files and non-functional tests
Test: mma
Bug: 34976004
Change-Id: I20273bdc3a05e2986fcf921f65d2afd6d72781e4
2017-02-04 02:45:25 +00:00
Zhuoyao Zhang
60a3eee183 Merge "Update Andriod.bp for hals." 2017-02-03 23:46:49 +00:00
Mikhail Naganov
0dfa551440 Merge "Audio HAL default implementation: reduce logspam" 2017-02-03 18:27:39 +00:00
Mikhail Naganov
a468fa84d1 audiohal: Make sure audio data transfer related commands go via FMQ
When outputting audio, the framework issues several HAL calls
from the same thread that writes into data FMQ. These calls
also need to be served on the same thread that writes audio data
to HAL. The same thing happens when audio input is commenced.

Add a command FMQ for passing different commands to the HAL thread.
This way, depending on the calling thread, the same call may go
either via hwbinder or via the command queue.

This dramatically reduces jitter in RTT measurements (although
doesn't improve the latency).

Bug: 30222631
Test: scripted RTT app
Change-Id: I04c826e2479d8210fd9c99756241156cda3143b6
2017-02-03 10:25:32 -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
b0abafbf0a audiohal: Make closing of effects and streams fast
There were two problems:

1. Joining of reader / writer / process threads (the threads that
   interact with HAL) was taking up to 1 second because the thread
   was usually waiting for an event flag to be toggled, or a 1s
   timeout.

2. Calling IStream.close or IEffect.close shouldn't tax the caller.
   Changed the code so a call to close only signals the thread that
   it's time to exit, and then the thread is only joined in the
   effect or stream destructor.

Bug: 34800063
Bug: 34499806
Test: see repro steps in the bugs
Change-Id: Ife20524a1eba4ec9a78152e89862526e8cd5c960
2017-02-02 17:00:42 -08:00
Mikhail Naganov
1fb94c71c3 Merge "Audio HAL: extensions for new SoC features" 2017-01-31 19:38:08 +00:00
Mikhail Naganov
d63e79022a Audio HAL default implementation: reduce logspam
Legacy BT A2DP implementation of Audio HAL may be returning EAGAIN
from get_presentation_position, this is normal and shouldn't be
logged. Otherwise we create logspam as this HAL function is called
often.

Bug: 30222631
Change-Id: I9394dbc1d53c1f4136c2d538fccd519964ff1697
Test: play music via BT A2DP
2017-01-30 17:05: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
Keun Soo Yim
b21bdc8b9f use the device's default binder/passthrough mode in vts tests
Test: mma
Change-Id: I3f2775873f5b6c091f70413adbdf7b7ae298ff44
2017-01-25 15:08:12 -08:00
Martijn Coenen
e5b2271717 Merge "hidl_memory no longer owns passed-in handles." 2017-01-25 13:52:33 +00:00
TreeHugger Robot
6b058752c5 Merge "Use MQDescriptor typedefs for cleanup" 2017-01-23 15:56:44 +00:00
Hridya Valsaraju
790db1074c Use MQDescriptor typedefs for cleanup
Test: mm
Bug: 33815422

Change-Id: I41ca833231622a5a72970014cfcac400b512e44a
2017-01-23 15:56:24 +00:00
Martijn Coenen
45d4d3025d hidl_memory no longer owns passed-in handles.
So clean them up when done.

Bug: 33812533
Test: mma
Change-Id: Ic2fdfa703547a210b9915288d5a77dc8e329a1c6
2017-01-23 13:00:19 +01:00
Mikhail Naganov
d9d72acd62 Merge "audiohal: Fix volume changes handling" 2017-01-19 23:57:48 +00:00
Eric Laurent
0a54f77bad Merge "audio: add support for stub HAL in HIDL mode" 2017-01-19 23:19:50 +00:00
TreeHugger Robot
9968f30f01 Merge "Remove useless Android.mk files." 2017-01-19 21:37:37 +00:00
Mikhail Naganov
f4f2ff3974 audiohal: Fix volume changes handling
Some legacy implementations of the effects HAL use the condition
of the reply buffer being NULL as an indication that they shouldn't
apply attenuation to the input audio data. Therefore, separate
methods are needed to distinguish the use cases of delegating the
volume control to the effect, and just informing the effect of the
volume changes.

A new method added to IEffect: volumeChangeNotification that implements
the second use case. The contract of setAndGetVolume method has been
updated to indicate that it is only called in the first use case.

Also updated the wrapper for a generic IEffect commands to pass NULL
pointers to the command and reply buffers in case when the size
of the input or output data is 0, to preserve compatibility with
direct calls from the framework.

Bug: 34368451
Test: volume control works when both Bass Boost and Equalizer are
      enabled in the NXP implementation of the effects

Change-Id: I3c9a5bbdff561802bc94080c51703385a8903282
2017-01-19 12:52:27 -08:00
Keun Soo Yim
5d406a3a37 Merge "add target-side profiling test for multimedia HIDL HALs" 2017-01-19 02:25:34 +00:00
Eric Laurent
f247b8df08 audio: add support for stub HAL in HIDL mode
Fixed broken functionality for some devices relying on
a stub HAL module to be present (e.g Fugu).

Bug: 34360879
Test: make and check stub HAL is loaded in HIDL passthrough mode

Change-Id: Ibad050d63827c4e49604273efd76ac8074bb00d2
2017-01-18 17:08:57 -08:00
Keun Soo Yim
e64871a894 add target-side profiling test for multimedia HIDL HALs
Test: mma
Change-Id: I14aeb000e2a17381c28ea2115d67a7e8eb84e375
2017-01-18 23:23:49 +00:00
Steven Moreland
66816de87f Remove useless Android.mk files.
Test: none
Change-Id: I99f4d3e5b943742009e366b13bee2c32e38a3fba
2017-01-18 11:49:08 -08:00
Steven Moreland
96232e327f Revert "Revert "move VTS HIDL HAL tests to the corresponding interface directories""
This reverts commit 070e8d2116.

Change-Id: I66dd4e6cf875e39e58b0d91724a603b37d32c0ac
2017-01-14 00:00:26 +00:00
Ruchi Kandoi
070e8d2116 Revert "move VTS HIDL HAL tests to the corresponding interface directories"
Test: No
This reverts commit ec7746fa80.

Change-Id: I9ec4493403d71419df99fe9761211eab057cdb0a
2017-01-13 15:17:32 -08:00
Mikhail Naganov
3881d9362f Merge "audiohal: Fix incompatibility with legacy hal for writes" 2017-01-12 20:55:00 +00:00
Mikhail Naganov
ee901e3fd8 audiohal: Fix incompatibility with legacy hal for writes
The combo call to stream_out->write + get_presentation_position
wasn't delivering the results of these calls entirely
correctly. Since the 'WriteResult' struct was lacking the field
for returning the status of the call to
'get_presentation_position', the client could erroneously update
the presentation position to bogus values if the call to the
legacy HAL had failed.

Updated IStreamOut.WriteStatus to include the missing field,
and updated the code to fill it out.

Also fixed logspam resulting from calling a stubbed
stream_in->get_capture_position.

Bug: 30222631
Test: Loopback RTT, media CTS
Change-Id: I38ac3b01beb095e176b54608e11e71ae5d5eafb6
2017-01-12 09:39:56 -08:00
Ryan Campbell
f276d1923e Remove coverage from test configurations.
Remove converage from test configs or entire config if not used
to define other test params. Tested each one individually to ensure
coverage still works.

Test: run vts -m (each test affected)
Change-Id: Ic1495a38ae9d1b32e851bc646f9c8e778eee2df1
2017-01-11 16:20:44 -08:00
TreeHugger Robot
a8d358fb63 Merge changes from topic 'bphwfoo'
* changes:
  Bp/nFoo -> Bp/nHwFoo.
  Bp/nFoo -> Bp/nHwFoo
2017-01-11 23:43:16 +00:00
Yifan Hong
a18049ad13 Bp/nFoo -> Bp/nHwFoo.
Test: mma
Bug: 33554989
Change-Id: I4b3f852d20fdfc49f2da671dd3c12d618ffb4140
2017-01-11 13:14:59 -08:00
Mikhail Naganov
a331de1421 audiohal: Re-implement effect process using FMQ and IMemory
Result: no hwbinder calls due music processing.

Added IEffect.close method for explicitly freeing up of resources
consumed by the effect before automatic server objects reaping
gets to it.

Added IEffect.setProcessBuffers method for updating the input /
output buffers on the go.

Test: make, use Play Music with effects, check traces
Bug: 30222631
Change-Id: Ia1e1bc7098fab59aa970e0ce4acdb48007409644
2017-01-09 18:21:21 -08:00
Mikhail Naganov
5c88cf74ce Merge "audiohal: Re-implement stream read and write using FMQ" 2017-01-06 00:37:48 +00:00