Commit graph

786 commits

Author SHA1 Message Date
Kevin Rocard
350ce29826 Audio service: Refactor register interface
Remove all per interface version boilerplate.
Adding a new version now requires only including the file
and adding the version name to the list.

Bug: 134940862
Test: adb shell lshal
Change-Id: Ib6b99d7a2c2079d914970fbe804aaf3c78c143ce
Merged-In: Ib6b99d7a2c2079d914970fbe804aaf3c78c143ce
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:11:45 -08:00
Kevin Rocard
c581b41569 Version dependant target should included version in name
As a V6.0 version needs to be created.

Note that this target is not used anywhere explicitly.
There seem to be some magic to "xsd_config", probably has to do with the
package_name.

Bug: 134940862
Test: build
Change-Id: Id6935c5458294981cb778f3647ec01ee34a34e2f
Merged-In: Id6935c5458294981cb778f3647ec01ee34a34e2f
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:11:07 -08:00
Steven Moreland
077b73b7ab update-makefiles.sh: for partial Java pkgs
Packages which contain some non-supported Java types can still have
their Java-supported types used in Java.

Bug: 143566068
Test: mma
Change-Id: I2afc5cc8d0a1bd981108ee2b87d6033fd48bdb37
2019-11-04 12:50:41 -08:00
Mikhail Naganov
0553d0615c audio: Extract utility functions
Move common code out of the test source.

Test: atest VtsHalAudioV5_0TargetTest
Merged-In: I86cf399029a0a5f3f08c7e82713ae62df03dee3f
Change-Id: I86cf399029a0a5f3f08c7e82713ae62df03dee3f
2019-10-25 15:36:24 -07:00
Mikhail Naganov
5aa2002a38 Audio VTS: Wait after stream close
Due to asynchronous nature of the destruction of server-side objects
it is required to flush IPC messages to the server and wait to avoid
flakiness due to an attempt to open the stream while it's still not
closed on the server side.

Test: atest VtsHalAudioV5_0TargetTest
Bug: 118655804
Change-Id: Ibd6bb2e20ffe95b83228982c2f2e9232d280e5ff
2019-10-22 14:08:01 -07:00
Treehugger Robot
f49cfb4462 Merge "audio: Skip tests if audio HAL service lacks "primary" device" 2019-10-17 10:11:42 +00:00
Mikhail Naganov
0b457ad126 audio: Skip tests if audio HAL service lacks "primary" device
Non-default audio service (e.g. MSD) is allowed not to have
a "primary" device. In this case tests that require it can be
skipped.

Manage static objects of a test suite in a canonical gtest way
using SetUp/TearDownTestSuite.

Bug: 139321356
Bug: 141433379
Test: vts-tradefed run commandAndExit vts -m VtsHalAudioV5_0Target
      on a device with "msd" audio HAL module

Change-Id: I08a11b2caa9a913e812f1c203007070e4e68c44e
2019-10-16 17:26:45 -07:00
Treehugger Robot
d405ef1c19 Merge "Audio: Ensure input stream gets closed on the audio HAL server side" 2019-10-16 00:19:46 +00:00
Mikhail Naganov
d3f6a41150 Audio HAL: Add missing device to XSD
The XSD has to be kept manually synced to the HAL definition. When some
formats were introduced and the corresponding enum values were added in
the HAL .hal, the XSD was not updated.

Test: xmllint --noout --schema hardware/interfaces/audio/4.0/config/audio_policy_configuration.xsd  --xinclude out/target/product/*/vendor/etc/audio_policy_configuration.xml
Bug: 128967080
Change-Id: I8cf36c7717a0dd15fb4f6261f9bb61c88b27a959
2019-10-11 23:32:30 +00:00
Mikhail Naganov
eb794151c6 Audio: Ensure input stream gets closed on the audio HAL server side
As IStream::close only releases internal resources of the stream,
deferring actual stream closing to IStream server object
destruction, which is delivered to the audio HAL server
asynchronously, there is a possibility for a race condition
when streams gets opened and closed in a tight loop as in the VTS
test.

Work around this problem by flushing RPC messages between
the client and the server, and inserting a delay before opening
a new stream.

Bug: 139329877
Test: VtsHalAudioV5_0TargetTest#AudioPrimaryHidlTest.GetMicrophonesTest
Change-Id: Id8744f6f21fd3bfa607f489364925eccbab17b5e
(cherry picked from commit 26f868bb02)
2019-10-11 19:32:57 +00:00
Mikhail Naganov
36678b2b16 Fix the name of the constant for device [dis]connect parameter
During the transition to Treble, "device connect" / "disconnect"
parameter was erroneously attributed to audio streams. This
issue got fixed in Audio HAL V4.0, but AudioParameter file
was still using incorrect name for the constant.

Test: make
Change-Id: I18e1e3fccad3d41372f3c5c046af4f6ffd83328b
Merged-In: I18e1e3fccad3d41372f3c5c046af4f6ffd83328b
2019-10-03 09:46:13 -07:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
Daniel Norman
3a6c4696bd Merge "Replaces 'oneshot' and 'interface' with 'onrestart restart audioserver'."
am: 5bb99e24ad

Change-Id: I38708e1b102546d6024a1f80d2c7d7a7e1c18ee9
2019-07-31 15:21:08 -07:00
Daniel Norman
fb4aadf622 Replaces 'oneshot' and 'interface' with 'onrestart restart audioserver'.
This default service should still restart on audioserver restart because
audioserver uses 'onrestart restart vendor.audio-hal-2-0' for restarts.

Bug: 138114550
Bug: 80227481
Test: for i in {0..100}; do \
      adb shell 'ps|grep audio;killall audioserver;ps|grep audio' \
      && sleep 2; \
      done
Test: Ran steps mentioned in http://b/80227481#comment1, device did not
get stuck in boot animation. Killing either audioserver or audio-hal
caused both to restart (just once) and the device booted correctly after
the sleep finished.
Change-Id: Ice128b51f79d3a9de22a719e6d897c8dca915e28
2019-07-31 21:08:02 +00:00
Kevin Rocard
d123e015b2 Merge "Audio: Document channel order convention" into qt-dev
am: d05b62368b

Change-Id: Ic63ff46c6461aa2bec27c4ca1d562a348d3d0f53
2019-05-28 21:07:12 -07:00
Kevin Rocard
64a35d0d16 Audio: Document channel order convention
This patch restores the documentation on the channel order convention
that was present in the Audio HAL 2.0 but remove by mistake in 4.0.

This is a vendor feedback.

Test: mm
Bug: 133453897
Change-Id: I8eabd8883612d39ced21481fc44661b0808754bb
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-05-29 00:34:38 +00:00
Kevin Rocard
d1e4213133 Merge "Validate HAL mic input" into qt-dev
am: 91309a04c8

Change-Id: I687415ab199765c83c130d81e948f6051c3a5e9c
2019-05-20 21:23:07 -07:00
Kevin Rocard
dbb7d0d304 Validate HAL mic input
Input value were not checked, resulting in out of range input accepted.
This was checked by test but never implemented in the default HAL.

Bug: 133105753
Test: atest VtsHalAudioV5_0Target
Change-Id: Ie6dae638b60daff6923668dc9637067f29e48b21
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-05-21 00:27:09 +00:00
Steven Moreland
6d494b2346 Merge "Update hidl makefiles for bpfmt" am: ff0bd741ca
am: 96f40f7b02

Change-Id: Idbf030e4993067bdb8181321bca2de00c9b6f7ef
2019-04-18 14:34:45 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -07:00
Paul McLean
8c394f0fb1 API changes in MicrophoneDirection
Bug: 128523813
Test: build, flash, testbed app.
Change-Id: I1bcc9bb667224cebb401d9506853d5c650e7d68d
2019-03-22 11:58:07 -06:00
Eric Laurent
872ace84c6 audio HAL: restore HOTWORD audio source
HOTWORD audio source was removed from HAL V4.0 by mistake.

Bug: 129001649
Test: make
Change-Id: I664eb6ca2a6c30bc6f48a752cb7300aac6c4294b
2019-03-20 15:58:38 -07:00
Aniket Kumar Lata
aa5d491075 audio: Add APTX_TWSP audio format
Add APTX_TWSP audio format support.

Bug: 111812273
Bug: 128825638
Test: make
Change-Id: Id8ba35d8aeea3d0c02be6c63ed3d05b039b0bb4f
2019-03-19 10:39:56 -07:00
TreeHugger Robot
95d9b50f0d Merge "audio: Fix and enhance channel mask enums" 2019-03-12 18:26:43 +00:00
Mikhail Naganov
ce6f1cf448 audio: Fix and enhance channel mask enums
Add AUDIO_CHANNEL_INDEX_MASK_{9..24}

Fix channel order for AUDIO_CHANNEL_OUT_3POINT{0,1}POINT2

Bug: 126455009
Test: make
Change-Id: I36a89c9903ad1702c5c0bdb0632c3f3234bb75d7
2019-03-08 16:31:28 -08:00
Mikhail Naganov
0637e1339b audio: Make 'surroundSound' element optional
This element makes sense only for TV platforms. The deserializer
treats it as optional. Update the schema to match this.

Bug: 116356348
Test: xmllint --noout --xinclude --schema \
      hardware/interfaces/audio/5.0/config/audio_policy_configuration.xsd \
      frameworks/av/services/audiopolicy/config/audio_policy_configuration.xml

Change-Id: I822c3ff10a6becc859d3d44fd58ef2ebcd3d40b1
2019-03-06 12:28:15 -08:00
Steven Moreland
7f4e21adda Merge "Update makefies: no 'types'" am: 4ee5ec1469 am: bab622f6a6
am: 7224bc9bcf

Change-Id: I434939e0770afa436c532a945542fce30a71ef7d
2019-03-04 16:05:59 -08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Mikhail Naganov
0d7a65f71d Merge "audio: Add support for dumping info from effect HAL modules" 2019-02-27 17:01:34 +00:00
Kevin Rocard
c3a712bef4 Audio HAL: add address documentation am: 3cdb31ee57 am: 6420797904
am: 7e2aa9b955

Change-Id: I205bd30ffa969b090d507ea5791b0413bc0e4ff4
2019-02-26 09:18:58 -08:00
Kevin Rocard
3cdb31ee57 Audio HAL: add address documentation
Test: compile
Change-Id: I108d512cf3381c5b87c76d152252050d309e46a6
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-02-26 09:00:23 -08:00
Steven Moreland
63bf69427b Make audio HAL consistent.
Bug: 124459302
Test: hidl-gen -Lcheck ...
Change-Id: I319fb00ef3a2da3944094228d4801bd9f88c16bb
Merged-In: Ie125d9bb014ee747ce56a59feaca577ab2d9e96c
2019-02-26 09:00:14 -08:00
Eric Laurent
bfb49a5cb0 Revert "Revert "Fix audio VTS build""
This reverts commit 6735fea712.

Test: make.
2019-02-22 18:18:55 -08:00
Eric Laurent
6735fea712 Revert "Fix audio VTS build"
This reverts commit 22ab6f2feb.

Bug; 125937703
Test: make

Change-Id: Iead87b0e1b8078262d7e370b050c2a75dbcda387
2019-02-22 17:47:20 -08:00
Mikhail Naganov
fa02144f8d audio: Add support for dumping info from effect HAL modules
The implementation uses IBase::debug() method which can write
debugging info into the provided file descriptor (same model
as used for devices and streams).

Bug: 69939533
Test: adb shell dumpsys media.audio_flinger
Change-Id: I7876fd43a7066c0f081ea2ca0b3b4b37bbdf8e6c
2019-02-22 14:30:56 -08:00
Eric Laurent
22ab6f2feb Fix audio VTS build
Update AudioPrimaryHidlHalTest to reflect changes in AudioPolicyConfig
class.

Test: make
Change-Id: Iab5cb85ff8e79fb5387d5e8ad2f85748342e80fa
2019-02-22 10:24:42 -08:00
TreeHugger Robot
71bb1d6ea1 Merge "Change class and variable names" 2019-02-15 04:53:54 +00:00
Eric Laurent
955b94e1d5 [Master port]audio: add new audio formats
This patch ports a change to the HAL interfaces done in master in
order to have the same Audio common HAL interface in both AOSP and master.
This is needed as the Bluetooth HAL uses the audio common HAL and needs
to be frozen in the same state in both AOSP and MASTER.

Add audio format for LHDC Bluetooth codec.
Also add missing audio sources and devices in xsd.

Bug: 124247199
Bug: 120395342
Test: make
Change-Id: Ib55c7d351074d8ef75747bcb1195e1ce15ed8b20
Merged-In: Ib55c7d351074d8ef75747bcb1195e1ce15ed8b20
2019-02-15 01:52:02 +00:00
Eric Laurent
36274db4e5 [Master port]audio: add new audio formats
This patch ports a change to the HAL interfaces done in master in
order to have the same Audio common HAL interface in both AOSP and master.
This is needed as the Bluetooth HAL uses the audio common HAL and needs
to be frozen in the same state in both AOSP and MASTER.

Add AAC_LATM*, CELT and APTX_ADAPTIVE to the list
of audio formats.

Bug: 124247199
Bug: 123082414
Test: make
Change-Id: Id75e1f5016929d5a67e777774aaa892df6f91e78
Merged-In: Id75e1f5016929d5a67e777774aaa892df6f91e78
2019-02-15 01:51:45 +00:00
Eric Laurent
c32a993999 [Master port]Add new audio sources for audio capture
This patch ports a change to the HAL interfaces done in master in
order to have the same Audio common HAL interface in both AOSP and master.
This is needed as the Bluetooth HAL uses the audio common HAL and needs
to be frozen in the same state in both AOSP and MASTER.

This commit adds the following audio capture sources:
- AUDIO_SOURCE_VOICE_PERFORMANCE: for real time live performances like Karaoke.
- AUDIO_SOURCE_ECHO_REFERENCE: for capturing the reference signal to suppress by an echo
canceller. Protected by privileged permission CAPTURE_AUDIO_OUTPUT.

Also added device AUDIO_DEVICE_IN_ECHO_REFERENCE selected when the requested
capture source is AUDIO_SOURCE_ECHO_REFERENCE.

Bug: 124247199
Bug: 118203066
Test: CTS tests for audio capture
Change-Id: Ia93550b278733ae9cc5cda731b014421002fde35
Merged-In: Ia93550b278733ae9cc5cda731b014421002fde35
2019-02-15 01:51:23 +00:00
Mikhail Naganov
9c140b452a [Master port] Audio HAL: Add optional Destination to SinkMetadata
This patch ports a change to the HAL interfaces done in master in
order to have the same Audio common HAL interface in both AOSP and master.
This is needed as the Bluetooth HAL uses the audio common HAL and needs
to be frozen in the same state in both AOSP and MASTER.

Currently this is used to indicate the output device
when the input stream is from an intermediate processing
module like MSD.

Bug: 124247199
Bug: 120859615
Test: make
Change-Id: I60bac5c24a263ab0b8965e9dbf9514445e88c270
Merged-In: I60bac5c24a263ab0b8965e9dbf9514445e88c270
2019-02-15 01:50:58 +00:00
jiabin
d42361e3d1 [Master port] Add haptic channel mask.
This patch ports a change to the HAL interfaces done in master in
order to have the same Audio common HAL interface in both AOSP and master.
This is needed as the Bluetooth HAL uses the audio common HAL and needs
to be frozen in the same state in both AOSP and MASTER.

Bug: 111454766
Bug: 124247199
Test: build
Change-Id: I00c28aa02473ce83b0d9b404b5cf33410c73a2c8
Merged-In: I00c28aa02473ce83b0d9b404b5cf33410c73a2c8
2019-02-15 01:50:28 +00:00
Steven Moreland
f8a47b7f01 Update makefiles.
Bug: 123976090
Test: N/A
Change-Id: I5fb6c126a090a3fe0fa4829ea9224564133dc1ae
2019-02-11 21:14:16 -08:00
Sundong Ahn
4001118df8 Change class and variable names
The rule to generate class and variable names is changed.
So update api names according to this rule.

Test: make update-api && make checkapi
Bug: 123777669
Change-Id: I5ba41679c863d8f57e9c43821b311ca09e9b4ea2
2019-02-11 15:00:43 +09:00
Cheney Ni
3899315c00 Merge "Register Bluetooth Audio Hal v2 within Audio HAL" am: f7b6c73725 am: 6cef9b0a49
am: 1c9ef33a17

Change-Id: I1868f8093259855c2331231678dc71f3f2522735
2019-02-06 19:14:51 -08:00
Treehugger Robot
f7b6c73725 Merge "Register Bluetooth Audio Hal v2 within Audio HAL" 2019-02-07 02:51:28 +00:00
Cheney Ni
4f6882ff4b Register Bluetooth Audio Hal v2 within Audio HAL
Register Bluetooth Audio Hal v2 by Audio HAL service so Bluetooth stack
can fetch the service interface as well.

Bug: 111519504
Test: manual

Change-Id: I3ac8c0472c58dd4d8a9b1ad8408313b80282cc85
2019-02-06 23:30:26 +00:00
Steven Moreland
941f105b60 Update makefiles.
Some of these are out of date.

Bug: N/A
Test: N/A
Change-Id: Ibf87fad9981d4e430a0bf797feadbb0bede232fc
2019-02-05 13:14:26 -08:00
Victor Chang
58062e0d41 Remove the dependency on ICU
Static libxml2 no longer requires ICU4C. Remove
the depedency from the build file.

Bug: 121468463
Test: vts-tradefed run vts -m VtsHalAudioEffectV4_0Target
Test: vts-tradefed run vts -m VtsHalAudioV4_0Target
Merged-In: Ib843fb1071a634f25e27e5291b00d11852ac08a9
Change-Id: Ib843fb1071a634f25e27e5291b00d11852ac08a9
2019-01-31 14:05:15 +00:00
Victor Chang
811024860a Remove the dependency on ICU
Static libxml2 no longer requires ICU4C. Remove
the depedency from the build file.

Bug: 121468463
Test: Treehugger
Change-Id: Ib843fb1071a634f25e27e5291b00d11852ac08a9
2019-01-31 13:59:10 +00:00
TreeHugger Robot
39b29ac05b Merge "VTS test for MicrophoneDirection API (HAL V 5.0)" 2019-01-30 21:14:42 +00:00
Paul McLean
0f1c40ce46 VTS test for MicrophoneDirection API (HAL V 5.0)
Bug: 121201996
Test: atest VtsHalAudioV5_0TargetTest

Change-Id: Icf8a054b50568f51a49b74f15de64232d1dc1c39
2019-01-30 11:17:00 -07:00
Jasmine Cha
4aa0f07420 Effects: add new effect volume flag
Add new effect flag to monitor requested volume from
audio framework.

Bug: 123251705
Test: on/off equalizer on spotify/google music
      switch songs with equalizer

Change-Id: Id89f6921923e7d55fa06c52579357fcd2f1c1fd0
Signed-off-by: Jasmine Cha <chajasmine@google.com>
2019-01-28 07:07:39 +00:00
Eric Laurent
f2b77b0705 audio: add new audio formats
Add audio format for LHDC Bluetooth codec.
Also add missing audio sources and devices in xsd.

Bug: 120395342
Test: make
Change-Id: Ib55c7d351074d8ef75747bcb1195e1ce15ed8b20
2019-01-22 15:45:05 -08:00
Eric Laurent
1f702cac1f audio: add new audio formats
Add AAC_LATM*, CELT and APTX_ADAPTIVE to the list
of audio formats.

Bug: 123082414
Test: make
Change-Id: Id75e1f5016929d5a67e777774aaa892df6f91e78
2019-01-22 15:31:00 -08:00
Eric Laurent
a9ccf13d9b Merge "audio vts: update with new audio policy class" 2019-01-21 18:49:03 +00:00
Eric Laurent
7f877d427f audio vts: update with new audio policy class
Bug: 111812273
Test: make
Change-Id: I2daae7401269d2fff59f0ecf69a45b62873ef1a1
2019-01-19 14:53:55 -08:00
Tor Norbye
c9ea9f66de Update signature files to the new format
The new format is described in tools/metalava/FORMAT.md.

Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: I2943d9a65c24e7ca8fb9ae9b69f7edf06173f467
2019-01-18 22:09:18 -08:00
Tor Norbye
0074475ccf Update signature files to the new format
The new format is described in tools/metalava/FORMAT.md.

Fixes: 116589402 Switch signature files over to the v2 format
Fixes: 112626813 Drop "synchronized" modifier from the signature format
Fixes: 122358225 Omit overriding methods that only differ in final [...]
Fixes: 73088715 API Review: Need doclava to output nullability
Fixes: 79739773 API Review: Metalava enforcing constants are constant
Exempt-From-Owner-Approval: Large-scale tooling change
Test: make sdk, make update-api, make checkapi
Change-Id: I767f9fb2941789615c9513072a381e79a5654373
Merged-In: I2943d9a65c24e7ca8fb9ae9b69f7edf06173f467
2019-01-18 22:08:52 -08:00
TreeHugger Robot
1a6565607c Merge "audio: Add 'encodedFormats' field to 'devicePort'" 2019-01-19 00:14:29 +00:00
Mikhail Naganov
ee6772e138 audio: Add 'encodedFormats' field to 'devicePort'
This is used to specify the list of codecs that the device
supports.

Bug: 120860184
Test: xmllint --noout --xinclude --schema \
      hardware/interfaces/audio/5.0/config/audio_policy_configuration.xsd \
      frameworks/av/services/audiopolicy/config/audio_policy_configuration*.xml

Change-Id: Ifb80afed7947dc2332a8188defa86db98851188e
2019-01-18 11:13:38 -08:00
Michael Dooley
58828095fb Merge "Enabling sound trigger V2_2" 2019-01-18 04:00:39 +00:00
Paul Mclean
559f16e1b6 Merge "Adding Audio HAL V5: Direction API" 2019-01-17 21:34:35 +00:00
mike dooley
2f0da26cd5 Enabling sound trigger V2_2
V2_2 has the same functionality as V2_1 except it adds one new
api, getModelState.

Note: V2_1 will be removed in a subsequent cl.

Test: built android and tested using SoundTriggerTestApp

Bug: 70206501
Change-Id: Ia1567bfc988482195b89b8d6a0901d51e870bfbf
2019-01-17 20:49:38 +01:00
Paul McLean
d983fe2a86 Adding Audio HAL V5: Direction API
Bug: 119137468
Test: Testbed App

Change-Id: Ief74abab49b68ac13e0433f5fe29dd25379c7aec
2019-01-16 21:00:05 -07:00
Eric Laurent
20b0e102b0 Merge "add new audio sources for audio capture" 2019-01-16 23:58:05 +00:00
Eric Laurent
ff08074227 add new audio sources for audio capture
This commit adds the following audio capture sources:
- AUDIO_SOURCE_VOICE_PERFORMANCE: for real time live performances like Karaoke.
- AUDIO_SOURCE_ECHO_REFERENCE: for capturing the reference signal to suppress by an echo
canceller. Protected by privileged permission CAPTURE_AUDIO_OUTPUT.

Also added device AUDIO_DEVICE_IN_ECHO_REFERENCE selected when the requested
capture source is AUDIO_SOURCE_ECHO_REFERENCE.

Bug: 118203066
Test: CTS tests for audio capture
Change-Id: Ia93550b278733ae9cc5cda731b014421002fde35
2019-01-16 09:54:45 -08:00
TreeHugger Robot
09ade87318 Merge "Add audio_effects_conf" 2019-01-16 04:32:30 +00:00
Mikhail Naganov
5404a00739 audio: Update source / sink metadata after opening stream
Since open input / output stream functions in legacy audio
HAL API do not have parameters for source / sink metadata,
make a call to update metadata right after opening a stream
in the default implementation.

Bug: 120859615
Test: audio still works
Change-Id: Ie81f861a024261a1f13fb6aa23976a92658e679c
2019-01-15 13:46:33 -08:00
Victor Chang
fdd3300306 Add libandroidicu as static lib in the VtsHalAudio
libxml2 now depends on libandroidicu.
Add the same dependency into the VTS.

TODO: b/121468463 to remove ICU from VtsHalAudio

Bug: 117094880
Test: m checkbuild
Merged-In: I105e7ad1517ecf8780adfb730650e1ad82f65857
Change-Id: I105e7ad1517ecf8780adfb730650e1ad82f65857
2019-01-08 19:40:59 +00:00
Sundong Ahn
1fce092b90 Add audio_effects_conf
This module is for API check of java file generated from
audio_effects_conf.xsd.

Bug: 80453829
Test: m -j && make update-api && make check-api
Change-Id: I0be0176a1d63db0ccc8c4bb38705a76a0070c981
2019-01-08 12:04:24 +09:00
Victor Chang
2c12b89651 Add libandroidicu as static lib in the VtsHalAudio
VtsHalAudio statically links libxml2.
libxml2 depends on libandroidicu now,
and it should statically links libandroidicu as well.

TODO: b/121468463 to remove ICU from VtsHalAudio

Bug: 117094880
Test: m checkbuild
Change-Id: I105e7ad1517ecf8780adfb730650e1ad82f65857
2019-01-02 17:01:20 +00:00
Mikhail Naganov
1503a98940 Audio HAL: Add optional Destination to SinkMetadata
Currently this is used to indicate the output device
when the input stream is from an intermediate processing
module like MSD.

Bug: 120859615
Test: make
Change-Id: I60bac5c24a263ab0b8965e9dbf9514445e88c270
2018-12-19 16:12:39 -08:00
Mikhail Naganov
00a44c0fc2 Audio HAL: More generalization for types imports
Complement imports of audio::CPP_VERSION with audio::common::CPP_VERSION
for core.

Import namespaces in VTS tests.

Remove "using namespace" from .cpp files where there
are already imports in the .h file.

Test: try moving types between audio/types.hal and common/types.hal.
Change-Id: I49c2e2466c8175f2516c2273f5c26d125afd4801
2018-12-14 16:34:28 -08:00
TreeHugger Robot
57efd5bd0d Merge "Audio HAL: Simplify types updates for 'common' and 'effect' packages" 2018-12-13 22:14:59 +00:00
Sundong Ahn
2280e96317 Merge "Add audio_policy_configuration" am: 0f2911a5d6 am: f7362ac27d
am: 79dc724ea0

Change-Id: I6b6739be513428b34cd33d018594f1b8fec834ac
2018-12-13 11:50:29 -08:00
Mikhail Naganov
3907f767d9 Audio HAL: Simplify types updates for 'common' and 'effect' packages
Instead of importing every single type individually ("using <type>"),
import entire namespaces of
::android::hardware::audio::common::CPP_VERSION and
::android::hardware::audio::effect::CPP_VERSION
inside the "implementation" namespace in the default implementation.

This simplifies modifying types, as it is not needed anymore
to surround "using <type>" directives with #if MAJOR_VERSION ...

Note that the contents of the namespaces are imported inside
the "implementation" namespace, which reduces risks of name collision

Test: make
Change-Id: I5daa0ed91203726d1df67408ac9af728c247704a
2018-12-13 09:42:17 -08:00
Treehugger Robot
0f2911a5d6 Merge "Add audio_policy_configuration" 2018-12-13 05:20:08 +00:00
Keun Soo Yim
d6fe421895 Merge "pack VTS cc_test binaries as general-tests" 2018-12-12 17:13:03 +00:00
Mikhail Naganov
543bf9cb16 Audio HAL: Simplify types updates for 'common' and 'audio' packages
Instead of importing every single type individually ("using <type>"),
import entire namespaces of
::android::hardware::audio::CPP_VERSION and
::android::hardware::audio::common::CPP_VERSION
inside the "implementation" namespace in the default implementation.

This simplifies modifying types, as it is not needed anymore
to surround "using <type>" directives with #if MAJOR_VERSION ...

Note that the contents of the namespaces are imported inside
the "implementation" namespace, which reduces risks of name collision

Also, fixed the namespace for HidlUtils--it needs to be in
'implementation'.

Test: make
Change-Id: I81bbb3074b5763717ae72e747a075fd46dc36d18
2018-12-11 16:54:29 -08:00
TreeHugger Robot
315002043a Merge "Add haptic channel mask." 2018-12-11 17:33:03 +00:00
Sundong Ahn
3541f0a17b Add audio_policy_configuration
This module is for API check of java file generated from
audio_policy_configuration.xsd.
audio_policy_configuration.docs is added to required in
impl library because API check whenever building impl
library.

Bug: 80453829
Test: m -j && make update-api && make check-api

Change-Id: I49499ec244c390ed1e6e9e8ca77d08d7da69ac59
2018-12-11 11:21:53 +09:00
jiabin
df0f1c1e61 Add haptic channel mask.
Bug: 111454766
Test: build
Change-Id: I00c28aa02473ce83b0d9b404b5cf33410c73a2c8
2018-12-10 12:39:50 -08:00
Kevin Rocard
bbe017d750 Merge "Audio V5 XSD: Allow vendor extension for audio devices" am: c1892e6527 am: 7021af2045
am: 33a68081f9

Change-Id: I8bd9865817ab1f550edcf1cc6f29f727d16a684c
2018-12-07 13:31:46 -08:00
Treehugger Robot
c1892e6527 Merge "Audio V5 XSD: Allow vendor extension for audio devices" 2018-12-07 21:03:15 +00:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Treehugger Robot
d8ebd25073 Merge changes from topic "audio-v5-api"
* changes:
  Audio V5: move Stream Metadata to common
  Audio HAL V5: Introduce HAL V5, equal to V4 for now
2018-12-04 17:44:07 +00:00
Kevin Rocard
7b7f206da4 Revert "Temporally remove audio V5 from the VNDK to save space"
This reverts commit 947bd54234.

Reason for revert: push V5 bash in the VNDK

Change-Id: Ic532b59bfcb234fb573390fd427754c2b63badcc
2018-12-04 02:33:41 +00:00
Kevin Rocard
947bd54234 Temporally remove audio V5 from the VNDK to save space
The HAL V5 is adding too much code that leads to maxing out the system
space on Pixel 1.
When a way to reduce the system file size will be found, the V5 will be
added back.

Test: compile
Change-Id: I479d63c325fd44c7b5c9d18b2b9a318ff56762fe
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-12-03 16:30:11 -08:00
Kevin Rocard
94b4aac252 Audio XSD: Allow vendor extension for audio devices am: 0d5121609a am: 0ac0b6b25a
am: 8333b96ead

Change-Id: I710966b5bc593597572779d4d199cd1c1630e4ef
2018-12-03 15:38:25 -08:00
Kevin Rocard
8333b96ead Audio XSD: Allow vendor extension for audio devices am: 0d5121609a
am: 0ac0b6b25a

Change-Id: I3ebc1bc8b8ac65c64f1caaff355afcce9faf45cd
2018-12-03 15:09:09 -08:00
Kevin Rocard
b2c093cecc Audio XSD: Allow vendor extension for audio devices
am: 0d5121609a

Change-Id: I8532884bd544fdce8680e0a14e3f3281f91931b6
2018-12-03 14:58:00 -08:00
Kevin Rocard
0ac0b6b25a Audio XSD: Allow vendor extension for audio devices
am: 0d5121609a

Change-Id: Ibd91421a27393c931a3c81f858b10291da624779
2018-12-03 14:55:58 -08:00
Kevin Rocard
0fecc8ded0 Audio V5 XSD: Allow vendor extension for audio devices
Without this patch vendors can not do any vendor extension extending
the audio enums as it would fails the XSD validation.

Long term, the config xml parsing should be moved in the HAL, until then
allow extension if they are prefixed with EX_.

Test: xmllint --noout --schema hardware/interfaces/audio/5.0/config/audio_policy_configuration.xsd  --xinclude out/target/product/*/vendor/etc/audio_policy_configuration.xml
Bug: 117967786
Change-Id: Ie44490824b5b50fdebb50a82299ea348d2a34b84
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-12-03 14:49:55 -08:00
Kevin Rocard
2dc552a755 Audio V5: move Stream Metadata to common
So that it can be used by the Bluetooth HAL.

Test: compile
Change-Id: I2e2b1e12e1f837183c4edbd1d330a13a67d1ecae
Merged-In: I2e2b1e12e1f837183c4edbd1d330a13a67d1ecaf
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-12-02 18:21:01 -08:00
Kevin Rocard
35c0de8085 Audio HAL V5: Introduce HAL V5, equal to V4 for now
Port audio HAL V5 to AOSP for BT HAL.
The implementation is not ported as that would require to port an
additional ~30 patches and is not needed by the BT team.

Bug: 118203066
Test: Compile
Change-Id: If99a5645d19c9780019704ea4f51f8114d83ee8e
Merged-In: If99a5645d19c9780019704ea4f51f8114d83ee8f
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-12-02 18:20:51 -08:00
Kevin Rocard
9be7bde296 Audio V5: move Stream Metadata to common
So that it can be used by the Bluetooth HAL.

Test: compile
Change-Id: I2e2b1e12e1f837183c4edbd1d330a13a67d1ecaf
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-12-02 17:59:45 -08:00
Kevin Rocard
20614ba604 Audio HAL V5: Introduce HAL V5, equal to V4 for now
find -name 4.0 | xargs -I@ cp -r @ @/../5.0
find 5.0 */5.0 -type f | xargs sed -Ei 's/V4/V5/;s#(@|/)4.0#\15.0#'
find -name *cpp -o -name *.h | xargs sed -i 's/VERSION == 4/VERSION >= 4/g'
mv {4.1,5.0}/config/audio_policy_configuration.xsd

Then a manual update to Android.bp to add V5 support.
Then a manual update to service.cpp to add support for loading 5.0.

If someone knows a way to avoid copying the .hal, it would be great.
They will be 99% identical between V4 and V5.

Bug: 118203066
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioEffectV2_0Target
      vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
      vts-tradefed run commandAndExit vts --module VtsHalAudioEffectV4_0Target
      vts-tradefed run commandAndExit vts --module VtsHalAudioV4_0Target
Change-Id: If99a5645d19c9780019704ea4f51f8114d83ee8f
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-12-02 17:59:45 -08:00
Kevin Rocard
681846f009 Audio VTS: Reset HAL after setConnectionState
There is no way of restoring the HAL state without restarting it.

Bug: 111681420
Test: atest VtsHalAudioV4_0TargetTest
      Check that the HAL is restarting after the test in the logcat
Change-Id: I9e3d9da08ed9e8dc25c7fc05c2bafa5455727508
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00
Kevin Rocard
575c63f7f0 Audio HAL: do not test input stream if no Built-in mic on primary
The test use to always test input stream, assuming that all devices had
built-in device on the primary Module.

Nevertheless, although uncommon, the mic could be on any module or even
not exist.

This patch makes sure that the input stream tests are only run if there
is a Built-in mic on the primary module.

As the policy config is now imported, it will be easy for the next HAL
version to add tests to test all supported audio config for each device.

Test: adb shell
      cd /data/nativetest64/VtsHalAudioV4_0TargetTest
      VtsHalAudioV4_0TargetTest --gtest_list_tests | grep Input
      VtsHalAudioV4_0TargetTest
      // Remove Mic from the available devices, the input tests should be skipped
      sed -i /item.*Built-In.Mic/d /vendor/etc/audio_policy_configuration.xml
      ! VtsHalAudioV4_0TargetTest --gtest_list_tests | grep Input
      VtsHalAudioV4_0TargetTest
      // Remove the primary hal, test should fail
      sed -i 's/"primary"/"notPrimary"/' /vendor/etc/audio_policy_configuration.xml
      ! VtsHalAudioV4_0TargetTest

Bug: 114303641
Bug: 111681420
Change-Id: Ibc1c1dadd6bcad18f184ab8c3bc75216c9f66adb
Signed-off-by: Kevin Rocard <krocard@google.com>
2018-11-28 20:29:52 -08:00