Commit graph

947 commits

Author SHA1 Message Date
Mikhail Naganov
58d9942ade Remove PREUPLOAD.cfg from audio HAL example
As suggested by the comment on ag/12691153

Bug: 142480271
Test: N/A
Change-Id: Ic9e2b986d3f9734dd884a2c88ca86d251147126b
2020-09-30 00:09:16 +00:00
TreeHugger Robot
6a73ac5b4a Merge changes from topic "nullzero-hal-v7"
* changes:
  audio: Implement VTS tests for V7.0
  audio: Add example HAL implementation
  audio: Reformat README as Markdown
  audio: HAL V7 tweaks
2020-09-29 21:02:17 +00:00
Mikhail Naganov
343450a074 audio: Implement VTS tests for V7.0
The major change in V7.0 is use of enum values defined
in the Audio Policy Configuration XSD schema. This allows
decoupling types used at the HIDL layer from system/audio.h.
Added a header audio_policy_configuration_V7_0-enums.h
with utility functions analogous to ones from system/audio.h
but defined for the types generated from XSD schema.

Since the code of VTS tests is shared between versions,
ensured that the VTS tests for the previous HAL versions
didn't regress.

Bug: 142480271
Test: atest VtsHalAudioV6_0TargetTest
      atest VtsHalAudioEffectV6_0TargetTest
      atest VtsHalAudioV7_0TargetTest
      atest VtsHalAudioEffectV7_0TargetTest
Change-Id: Ia7c2d49a02783725080c8fed6a25853e91bba487
2020-09-29 17:45:13 +00:00
TreeHugger Robot
082aabe644 Merge "Make getPresentationPosition mandatory." 2020-09-29 00:10:24 +00:00
Mikhail Naganov
c9e1607de4 audio: Add example HAL implementation
This is partial implementation of the example V7.0 audio HAL
which passes VTS tests. Note that the 'core' part
of the HAL (IDevice/IStream) isn't implemented yet.
It passes VTS because it doesn't provide any devices
(modules) and the audio HAL isn't the 'default' instance.

Bug: 142480271
Test: atest VtsHalAudioV7_0TargetTest
      atest VtsHalAudioEffectV7_0TargetTest
Change-Id: Ie3dd62c5db1cdb5534df4dd7f326c4c8776bf3c4
2020-09-28 23:18:37 +00:00
Mikhail Naganov
108e702dc7 audio: Reformat README as Markdown
Rename README -> README.md, reformat it as Markdown.
Provide missing descriptions for some directories.

Bug: 142480271
Test: N/A
Change-Id: Ic6f60a21def4bf210a7e1446454d709f68a13422
2020-09-28 18:55:50 +00:00
Mikhail Naganov
648ec5b750 audio: HAL V7 tweaks
- rename AudioBasicConfig -> AudioConfigBase to better
  match a similar structure in audio.h;

- define AudioProfile structure for defining an I/O profile;

- use AudioProfile to replace IStream.getSupported* methods
  with a single IStream.getSupportedProfiles method;

- define AudioDevice type for convenience and clarity;

- move enums definition for AudioInputFlags and AudioOutputFlags
  into XSD. This allows parsing APM config w/o depending on
  the framework code.

Bug: 142480271
Test: m
Change-Id: I1951b2de383751fe53b96954dfd02cdd1ab6cc8f
2020-09-28 18:55:50 +00:00
jiabin
c3b3f81272 Make getPresentationPosition mandatory.
GetPresentationPosition is marked as optional method at audio HAL v4.0.
This method return a recent count of number of audio frames presented to
an external observer. Making it mandatory can help improve the timestamp
reporting.

Test: make
Bug: 158609200
Change-Id: Ic164c10e4c406e7382cdc676f13c64de49e48734
2020-09-11 23:14:42 +00:00
Dan Shi
6b0fd062bb Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I627d6790aa08aa9c6e3c5b8bdc533213ee08de21
2020-09-08 10:42:38 -07:00
Mikhail Naganov
7dd87f42f1 Audio: Rearrange types in V7
Update channel mask and SR lists to conform to XSD.
Added a script for converting existing APM XML files.

Bug: 142480271
Test: m
Change-Id: I986b9bccdade5fa850b06b033143388715a656af
2020-08-17 18:06:46 +00:00
Mikhail Naganov
6cd03bfdb9 Audio: Build file updates
Add target for the library with code generated by xsdc.

Temporarily disable default implementation and VTS targets.

Bug: 142480271
Test: m
Change-Id: I6c891893398617a36f4748f185e189064ba4d4ee
2020-08-14 18:13:31 +00:00
Mikhail Naganov
159260c586 Audio: Copy HAL V6 into V7
This is an automated copy performed using copyHAL.sh script.

Bug: 142480271
Test: m
Change-Id: Ifd91cc0bb59608cd92d1d8e4e76c3abea0a8da5e
2020-08-14 18:13:31 +00:00
Mikhail Naganov
5ebbfe417c Audio: Update and fix copyHAL script
Make necessary updates and fixes to produce HAL V7 and VTS.

Bug: 142480271
Test: audio/common/all-versions/copyHAL.sh 6.0 7.0 &&
      atest --rebuild-module-info -b VtsHalAudioV7_0TargetTest &&
      m
Change-Id: I5bc2344dae611fbf7e3e0fef185deee999c4aefa
2020-08-14 18:13:22 +00:00
Jasmine Cha
10828b9168 Audio VTS: Fix empty parameter list failures for AudioV6 am: 1eb1f36877 am: 0c0bdf4db2 am: 58a2095cc0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1382482

Change-Id: I6711731b080eed56c7605194fa83faa8e76367cc
2020-08-03 21:01:37 +00:00
Jasmine Cha
58a2095cc0 Audio VTS: Fix empty parameter list failures for AudioV6 am: 1eb1f36877 am: 0c0bdf4db2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1382482

Change-Id: I7798e6c080a090459a646d9ee3013f3d101b5978
2020-08-03 20:33:06 +00:00
Jasmine Cha
1eb1f36877 Audio VTS: Fix empty parameter list failures for AudioV6
For AudioV6, OptionalInputBufferSizeTest isn't included in macro
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST.

Bug: 162715033
Test: atest VtsHalAudioV6_0TargetTest

Signed-off-by: Jasmine Cha <chajasmine@google.com>
Change-Id: I526fe166594283540804ee61265c6000de5a89e8
2020-08-03 08:49:38 +00:00
Treehugger Robot
b4a1b4f93a Merge "Provide defaults for android.hardware.audio@6.0-impl" am: 3f5116a1f6 am: 5912212c62 am: 3ef9947624
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1366502

Change-Id: I6bfc3c3cc6209c93721d490d644f5babf10682cc
2020-07-22 17:31:46 +00:00
Treehugger Robot
3ef9947624 Merge "Provide defaults for android.hardware.audio@6.0-impl" am: 3f5116a1f6 am: 5912212c62
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1366502

Change-Id: Ib211fdb5c61f6ad1893561d9bd6d86bff0b28178
2020-07-22 17:05:44 +00:00
Treehugger Robot
3f5116a1f6 Merge "Provide defaults for android.hardware.audio@6.0-impl" 2020-07-22 16:37:39 +00:00
Mikhail Naganov
cc4656f5a8 Audio VTS: Suppress empty parameter list failures am: b9743d4728 am: 948929d067 am: 4084fa17b5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1368656

Change-Id: I6384554bbd26a38c8b3e947b1db313e841d4cd56
2020-07-22 00:47:30 +00:00
Mikhail Naganov
4084fa17b5 Audio VTS: Suppress empty parameter list failures am: b9743d4728 am: 948929d067
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1368656

Change-Id: I3d5925bd34bd84cbf65cf6f86797c1a4f4263ac6
2020-07-22 00:33:45 +00:00
Mikhail Naganov
b9743d4728 Audio VTS: Suppress empty parameter list failures
GTest has introduced a check verifying that the parameter list
for TEST_P tests isn't empty. Having an empty parameter list
isn't actually a problem when the VTS test runs on a device
that lacks the corresponding HAL version.

Bug: 161758075
Test: atest VtsHalAudioV4_0TargetTest
Test: atest VtsHalAudioV5_0TargetTest
Test: atest VtsHalAudioV6_0TargetTest
Test: atest VtsHalAudioEffectV4_0TargetTest
Test: atest VtsHalAudioEffectV5_0TargetTest
Test: atest VtsHalAudioEffectV6_0TargetTest
Change-Id: Ib2a017b74f69b1608d8985f403e9b2a8e54b8311
2020-07-21 10:57:03 -07:00
Roman Kiryanov
411edccbb3 Provide defaults for android.hardware.audio@6.0-impl
This will allow vendors to create instances of
this library with other names. A different name
is required if a vendor wants to provide a custom
version (e.g. in HIDL) of
android.hardware.audio@6.0-impl and still
be able to use the library itself (e.g. to load
audio.r_submix.default) -
android.hardware.audio.service does not load both
libraries and prefers the default one.

Bug: 161485545
Test: boot emulator, check if audio works
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I55c4f9b1386be3464ad0f5f2568423843e7eae88
2020-07-20 16:08:17 -07:00
Inseob Kim
e396a3d004 Use shared variant of VNDK libmedia_helper
Vendor modules should use shared VNDK.

Bug: 137178339
Test: m && boot blueline
Change-Id: I56ad69125811ff768d8064af34acf5603b575b4b
Merged-In: I56ad69125811ff768d8064af34acf5603b575b4b
2020-07-20 16:08:00 -07:00
Victor Khimenko
bc17fa5b94 Make android.hardware.renderscript@1.0 buildable for native_bridge am: 7cac9425b0 am: d454bfb695 am: 7d537ae398
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1358405

Change-Id: I706673f510b982658d1d20aa05d34cae07ef97e6
2020-07-09 20:37:45 +00:00
Victor Khimenko
7d537ae398 Make android.hardware.renderscript@1.0 buildable for native_bridge am: 7cac9425b0 am: d454bfb695
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1358405

Change-Id: I9b3d2a48add5c2dd65948dbd1e779cc29b5a2fb9
2020-07-09 20:26:55 +00:00
Victor Khimenko
7cac9425b0 Make android.hardware.renderscript@1.0 buildable for native_bridge
Bug: http://b/153609531

Test: m android.hardware.renderscript@1.0.native_bridge

Change-Id: If11376cdd583629c8edfea17efb130dd68dc9b8f
2020-07-08 21:20:03 +00:00
Jooyung Han
d610435ac4 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-07 16:22:36 +09:00
Jooyung Han
cd47c5e12f Merge "update hidl .bp" into rvc-dev-plus-aosp am: 84ff4f4640
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/12066061

Change-Id: I7c9b5b977b92536c33c901fb91e0048c414c5bfc
2020-07-06 21:53:06 +00:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Treehugger Robot
5afb2c148a Merge "Build 64-bit audio service on 64-bit-only" am: 01937cb938 am: a0ac5fce1e am: 4a432b55c2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1327194

Change-Id: I197f4cd6d203ed0b151943b66a6dd6d05bb796ef
2020-06-26 23:24:41 +00:00
Treehugger Robot
4a432b55c2 Merge "Build 64-bit audio service on 64-bit-only" am: 01937cb938 am: a0ac5fce1e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1327194

Change-Id: Icbba8512e69264181b8ed68f84064f1563f54cb9
2020-06-26 23:10:19 +00:00
Alistair Delva
cc8dabbf51 Build 64-bit audio service on 64-bit-only
Bug: 158659988
Change-Id: I30f692537971bfafb6bcd931488cf6869477f62e
2020-06-25 09:45:35 -07:00
Dan Shi
f1e1ac586d Use StopServicesSetup to stop/start framework. am: 8a648312f8 am: 95d430d6c8 am: 3b6534e36d
Change-Id: I108cc384109f24ba1c77d2d23a29204b8c76b801
2020-05-13 18:31:59 +00:00
Dan Shi
3b6534e36d Use StopServicesSetup to stop/start framework. am: 8a648312f8 am: 95d430d6c8
Change-Id: I96a02ab530d4efd386c5f835bbb932e62ea8ea7d
2020-05-13 18:19:37 +00:00
Dan Shi
8a648312f8 Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: none
Exempt-From-Owner-Approval: This CL replaces target preparer, shouldn't
change test behavior.

Change-Id: I83cffadfff15e6352a69641c3227efb63e7a34e4
2020-05-12 14:07:30 -07:00
Andy Hung
868465dfba Merge "AudioMetadata: Add documentation" into rvc-dev am: 425e365256 am: 86c4afc1aa
Change-Id: Ic47caf630f6ef9e887dc2e2cef97f0d09ae188a1
2020-05-11 22:09:00 +00:00
Andy Hung
86c4afc1aa Merge "AudioMetadata: Add documentation" into rvc-dev am: 425e365256
Change-Id: I6eccb936048721536462760cba4303001ad6e089
2020-05-11 21:56:03 +00:00
Andy Hung
e6b9c77789 AudioMetadata: Add documentation
Update comments only for IStreamOutEventCallback::onCodecFormatChanged

Test: compiles, this is a comment change only.
Bug: 150175043
Change-Id: I1895c737997fbf3cb509b4078b545658d11df198
2020-05-08 13:43:56 -07:00
Suren Baghdasaryan
b74f6423f5 Replace direct pid writes with setting task profiles for audio interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
Merged-In: Ide373c283359cf4b73af4cb0813d8c0306942595
2020-05-02 00:34:04 +00:00
Suren Baghdasaryan
17850806ef Replace direct pid writes with setting task profiles for audio interfaces am: 3c6f2df90a am: b1c906ff99 am: fd2cb35456
Change-Id: Ib88618d2017f467bdee589b67f94aee817a4541b
2020-05-01 17:12:23 +00:00
Suren Baghdasaryan
fd2cb35456 Replace direct pid writes with setting task profiles for audio interfaces am: 3c6f2df90a am: b1c906ff99
Change-Id: I2663aa7a9d1c51f90a1830b44d59c2bab31887c4
2020-05-01 17:03:55 +00:00
Suren Baghdasaryan
3c6f2df90a Replace direct pid writes with setting task profiles for audio interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
2020-04-30 13:45:13 -07:00
TreeHugger Robot
84fdc1567d Merge "add context_hub into audio hal group" into rvc-d1-dev am: b0dce89ec0
Change-Id: I37fc8cccec6031c81609e93efdf10289212c7335
2020-04-30 16:07:38 +00:00
emilchung
e815ecd6b2 add context_hub into audio hal group
While implementing the capo nanoapp for audio configuration, we met
some chre socket connected error due to the access group denied.

Add context_hub group for audio hal to connect chre socket.

go/capo-algo

Bug: 141128522
Bug: 149069556
Test: FULL build with audio hal part and local prebuilts nanoapp.
Test: Audio HAL communicates normally with CHRE socket.
Change-Id: Iea84411682f4c3e08f8b37a5b21818b0e9b04983
2020-04-29 09:58:33 +00:00
Mikhail Naganov
0dd9a6bacc audio: Centralize audio configuration paths specification
The list of possible paths for the audio configuration
files is now retrieved using audio_get_configuration_paths()
function. All duplicated lists of known configuration
directories have been removed.

Bug: 153680356
Test: atest VtsHalAudioV6_0TargetTest \
            VtsHalAudioPolicyV1_0TargetTest \
            VtsHalAudioEffectV6_0TargetTest
Change-Id: I1e40fdf8d6e3a5ac339f7f138f62063bb87bd3da
Merged-In: I1e40fdf8d6e3a5ac339f7f138f62063bb87bd3da
2020-04-17 01:55:48 +00:00
Treehugger Robot
09f4f0b61b Merge "audio: Centralize audio configuration paths specification" am: c2e1f3baef am: fefefa63a6
Change-Id: I029ebd83595381768858cbb3efe92c2f3b09ffac
2020-04-16 23:35:46 +00:00
Steven Moreland
cedd3f387b VtsHalAudio*TargetTest in vts.
Bug: 139438327
Test: N/A
Change-Id: I0fb6c966c70cc51cbfd13fd27d6224c9fd07ec20
2020-04-15 23:54:45 +00:00
Mikhail Naganov
5a6ffb21a5 audio: Centralize audio configuration paths specification
The list of possible paths for the audio configuration
files is now retrieved using audio_get_configuration_paths()
function. All duplicated lists of known configuration
directories have been removed.

Bug: 153680356
Test: atest VtsHalAudioV5_0TargetTest \
            VtsHalAudioPolicyV1_0TargetTest \
            VtsHalAudioEffectV5_0TargetTest
Change-Id: I1e40fdf8d6e3a5ac339f7f138f62063bb87bd3da
2020-04-15 10:09:38 -07:00
TreeHugger Robot
25e1181101 Merge "Convert VtsHalAudioV*_0TargetTest to parameterized gtest" into rvc-dev 2020-04-08 20:30:00 +00:00