Commit graph

242 commits

Author SHA1 Message Date
Mikhail Naganov
fda20429b4 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
Merged-In: I986b9bccdade5fa850b06b033143388715a656af
2020-11-20 01:41:38 +00:00
Mikhail Naganov
a8814e51be 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
Merged-In: I6c891893398617a36f4748f185e189064ba4d4ee
2020-10-27 15:24:36 +01:00
Mikhail Naganov
60ced768f3 Audio: Copy HAL V6 into V7
This is an automated copy performed using copyHAL.sh script.

Bug: 142480271
Test: m
Change-Id: Ifd91cc0bb59608cd92d1d8e4e76c3abea0a8da5e
Merged-In: Ifd91cc0bb59608cd92d1d8e4e76c3abea0a8da5e
2020-10-27 15:24:36 +01:00
Mikhail Naganov
3b1172dfe4 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
Merged-In: I5bc2344dae611fbf7e3e0fef185deee999c4aefa
2020-10-27 15:24:36 +01:00
Grzegorz Kolodziejczyk
b5f2d23e26 Introduce LE Audio software provider for bluetooth audio 2.1
Patch introduces LE Audio software encoding provider for bluetooth audio 2.1.

Bug: 150670922
Tag: #feature
Test: vts-tradefed run vts -m VtsHalBluetoothAudioV2_1TargetTest
Sponsor: jpawlowski@
Change-Id: If668593be7a46c9abcc45d21c5bdb9b493864cc1
2020-10-09 17:54:44 +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
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
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
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
09f4f0b61b Merge "audio: Centralize audio configuration paths specification" am: c2e1f3baef am: fefefa63a6
Change-Id: I029ebd83595381768858cbb3efe92c2f3b09ffac
2020-04-16 23:35:46 +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
Dan Shi
daa2999781 Merge "Convert VtsHalAudioV*_0TargetTest to parameterized gtest" am: 1b03269ec7 am: e904793d4b
Change-Id: Ib7d0098575ca6f5fd6b963e5f016956b7fb6d2ba
2020-03-17 23:07:14 +00:00
Dan Shi
82cf1f1bb2 Convert VtsHalAudioV*_0TargetTest to parameterized gtest
For version 2, 4 and 5.

Bug: 150299743
Test: atest VtsHalAudioV2_0TargetTest \
  VtsHalAudioV4_0TargetTest \
  VtsHalAudioV5_0TargetTest
Change-Id: I09be1dc79b69caadd2a5468c4e6ed9c1efd76ffd
2020-03-17 13:12:42 -07:00
Andy Hung
7aab1010d4 audio hal: Update offload configuration
Test: no regression with offloaded Play Music
Bug: 133526565
Merged-In: Ie655a96503be5a4ad1660d4b2183b01e514452fd
Change-Id: Ie655a96503be5a4ad1660d4b2183b01e514452fd
(cherry picked from commit c91b679ac1)
2020-02-25 09:06:09 -08:00
Automerger Merge Worker
294e681ded Merge "Update copyHAL.sh after changes in libaudiohal" am: f2212ca85c am: 2bd5e654fb am: 981837366e
Change-Id: Idde37ba245a46a265a3697b14c3f0a90cc956d43
2020-02-10 23:09:41 +00:00
Mikhail Naganov
d432d51627 Update copyHAL.sh after changes in libaudiohal
Bug: 148118201
Test: copyHAL.sh 5.0 6.0
Change-Id: I7cb2f7c5216c4095fa36c2c96ebbe2a2255b0691
2020-02-10 12:46:23 -08:00
Mikhail Naganov
40549fae50 audio: Provide documentation for enums in 'common' package
Bug: 148617378
Test: N/A
Change-Id: Ia28c9217527509430f2daf274e14380bfe79f145
2020-02-04 18:59:12 -08:00
Mikhail Naganov
e74b571711 audio: Remove dynamic dependency on HIDL interface libs from service
This is intended to reduce memory footprint of the default HAL
service. The inteface libraries were only used to retrieve
interface descriptors and use generated code to register as
service. This code was replaced with static code from
HIDL transport library.

Bug: 148115870
Test: check audio on devices
Change-Id: Ie8713d513cfbde64120546ba0db1cf80fd366138
Merged-In: Ie8713d513cfbde64120546ba0db1cf80fd366138
2020-01-31 14:57:07 -08:00
Mikhail Naganov
2801b037cd audio: Fix invalid BT A2DP interface name
The correct name is:
android.hardware.bluetooth.a2dp@1.0::IBluetoothAudioOffload

Bug: 148648456
Bug: 148648729
Bug: 148648469
Bug: 148648355
Test: DeviceBootTest.DeviceBootTest#SELinuxUncheckedDenialBootTest
Change-Id: I50d3486159f17697b06e9680b85586b1935a9ccc
2020-01-31 14:48:23 -08:00
Mikhail Naganov
f3e4d217ee audio: Remove dynamic dependency on HIDL interface libs from service
This is intended to reduce memory footprint of the default HAL
service. The inteface libraries were only used to retrieve
interface descriptors and use generated code to register as
service. This code was replaced with static code from
HIDL transport library.

Bug: 148115870
Test: check audio on devices
Change-Id: Ie8713d513cfbde64120546ba0db1cf80fd366138
2020-01-29 16:35:51 -08:00
Automerger Merge Worker
f74cf07880 Merge "audio: Update copyHAL script to update dump_utils.cpp" am: 232a1d7831 am: 6b35310cbc am: 7b318ecf7f
Change-Id: I2a8f88b1b2d41b3445c99cd93bcd5c289e359534
2020-01-28 18:45:50 +00:00
Mikhail Naganov
51c87bc4c5 audio: Update copyHAL script to update dump_utils.cpp
dump_utils.cpp contains a list of interfaces that
need to be dumped.

Test: copyHAL.sh 6.0 7.0
Change-Id: I4444a5013852ea7362f3dba420c2c5c5c0f2a5c3
2020-01-28 08:48:28 -08:00
Hayden Gomes
9c38bc988d Expanding AudioUsage to include new system usages
Bug: 141006627
Test: make
Change-Id: Ica8ada8e95e7d49bfcf7501cae2c356f68da8e3b
2020-01-17 22:27:49 +00:00
Eric Laurent
5f9bb1b027 audio: add audio session for device effects
Add specific audio session ID for effects applied to a
particular audio device.

Bug: 136294538
Test: make
Change-Id: Iea3e3a07f404e1075844422c740d2dc4d5163598
Merged-In: Iea3e3a07f404e1075844422c740d2dc4d5163598
2020-01-10 11:16:12 -08:00
Baekgyeong Kim
09e665e61c Add audio stream and usage for virtual assistant
New stream type: AUDIO_STREAM_ASSISTANT
This is intended to be used by a virtual assistant like
Google Assistant, Bixby, etc.

The audio stream has own volume alias and the volume
does not change by volume changes of other streams.

Bug: 123745215
Test: make
Change-Id: I3696d8fba32070954cc6a330574af8507fea7a74
Merged-In: I3696d8fba32070954cc6a330574af8507fea7a74
2020-01-08 11:53:59 -08:00
Baekgyeong Kim
3bc7741e91 Add audio stream and usage for virtual assistant
New stream type: AUDIO_STREAM_ASSISTANT
This is intended to be used by a virtual assistant like
Google Assistant, Bixby, etc.

The audio stream has own volume alias and the volume
does not change by volume changes of other streams.

Bug: 123745215
Test: make
Change-Id: I3696d8fba32070954cc6a330574af8507fea7a74
2019-12-16 11:39:27 -08:00
Nicholas Ambur
ad84668d29 Merge "add SoundTrigger HAL V2.3" 2019-12-12 21:37:00 +00:00
Nicholas Ambur
1e90019220 add SoundTrigger HAL V2.3
add support for model parameter control APIs with THRESHOLD_FACTOR
as the first supported parameter

Bug: 141929369
Test: Tested manually with test app, GTS test
gts-tradefed run gts-dev -m GtsAssistIntentTestCases
and VTS test
vts-tradefed run vts-hal -m VtsHalSoundtriggerV2_3Target
Change-Id: I79d2b6365cc63fbdfe06fa94f1d0878903cbf554
2019-12-11 19:42:51 -08:00
Eric Laurent
3c181a6fd6 audio: add call assistant usage
Add audio usage for call assistant use cases.
Used by apps playing over call uplink path for call
screening or other in call assitant features.

Bug: 135213843
Test: make
Change-Id: I7eeea676fe188946ff86f1e11e8e00a624a4ec5c
2019-12-11 13:51:13 -08:00
Mikhail Naganov
d334593715 Add AUDIO_INPUT_FLAG_DIRECT to Audio HAL constants
This flag used to be framework only. To simplify constants
management it's better to have it defined at all layers.
Currently it is only used for MSD module but potentially
can be used for HDMI inputs.

Bug: 141273649
Test: use AOSP MSD on Pixel
      atest VtsHalAudioV6_0TargetTest

Change-Id: I3b853d5d0a05cc4d4bacd0a9ae432099bb47fad9
2019-12-10 16:47:00 -08:00
Eric Laurent
6d48565360 audio: add audio session for device effects
Add specific audio session ID for effects applied to a
particular audio device.

Bug: 136294538
Test: make
Change-Id: Iea3e3a07f404e1075844422c740d2dc4d5163598
2019-12-06 12:26:26 -08:00
Steven Moreland
c2a2995047 Merge "./update-makefiles.sh, for union changes/memory" am: 00daede4d5 am: 0942e33017
am: 87fe284668

Change-Id: I3a331b5e1c5418426a084f1c7bfe436214a1b68f
2019-11-26 15:00:11 -08:00
Steven Moreland
7696aa885f ./update-makefiles.sh, for union changes/memory
Many more types can be used in Java.

Bug: 143566068
Test: N/A
Change-Id: Ie18e1e0f9c22f2ea15b755df3b048c9d651c4945
2019-11-26 09:24:31 -08:00
Lloyd Pique
43286a882b Merge "audio: Remove redundant PrintTo definitions" am: 7582ba18ee am: c93cb2e4b4
am: b72d057e24

Change-Id: I759f0e3a808780eb8b686d2553efeb96e46c3b7f
2019-11-20 15:02:12 -08:00
Lloyd Pique
97bc3fba7b audio: Remove redundant PrintTo definitions
hidl-gen now generates them for use by all Google Tests, calling
toString().

The local audio PrintTo definitions in PrettyPrintAudioTypes.h are now
redundant with the generated versions, and the entire header can be
removed.

Test: Verified the generated PrintTo functions work in a different GTest
Change-Id: I80d100907e3c6c638608b0b8b34232b02decac19
2019-11-19 14:45:32 -08:00
Eric Laurent
ac3a62a66a Merge "audio: Add CALL_SCREEN audio mode." 2019-11-08 22:39:10 +00:00
Mikhail Naganov
ccd484bb80 audio: Parametrize core VTS tests
Parametrize tests to accept IDevicesFactory instance name
and IDevice instance name. For audio HAL versions 2..5
the factory instance name is taken from the VTS environment,
and the device is always "primary". For the next versions
the factories are discovered by the test, and the devices
are taken from the audio policy configuration
(to be implemented, see added FIXME comments).

Split the Environment class into two versions: for HAL 2..5
and for next versions. They use different base class.

Move device factories and device caching into dedicated
classes DevicesFactoryManager and DeviceManager. They deal
with instance caching and proper release of server resources.

Bug: 141847510
Bug: 141989952
Test: atest VtsHalAudioV5_0TargetTest
      atest VtsHalAudioV6_0TargetTest
Change-Id: I92c44e0c3f900164dded7e9c4bfc642ca2c335db
Merged-In: I92c44e0c3f900164dded7e9c4bfc642ca2c335db
2019-11-08 13:45:45 -08:00
Kevin Rocard
2a515e1c27 Introduce Audio V6
Generate with ./newHal.sh 5.0

+ some typo fix in the .hal
+ some clang-tidy run

This new HAL is an exact copy of the V5.
It will be modified in following patches while R is developed.

Test: push V6 to device and check audio works fine
Bug: 134940862
Change-Id: Ic25d30175032e76e0d3208fb876451de9ae6b7b4
Merged-In: Ic25d30175032e76e0d3208fb876451de9ae6b7b4
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:19:12 -08:00
Kevin Rocard
55a451825c Change some formatting for better script parsing
Test: Compile
Bug: 134940862
Change-Id: Ibbafdcaa6e0bfa8fd2b80f4a6c9ac6ac95058f93
Merged-In: Ibbafdcaa6e0bfa8fd2b80f4a6c9ac6ac95058f93
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:18:45 -08:00
Kevin Rocard
82d3a0b3c7 Script to generate new audio HAL version
Mostly automated script to generate a new Audio HAL major version.

Test: push V6 to device and check audio works fine
Bug: 134940862
Change-Id: I0da621e747eb48e75901a2a10cfc224f33864c3b
Merged-In: I0da621e747eb48e75901a2a10cfc224f33864c3b
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:12:52 -08:00
Kevin Rocard
ad17f58e50 Convert audio HAL service mk to bp and rename the service
The service supports multiple versions and its name should not be
version dependant.

For backward compatibility, keep the target name
android.hardware.audio@2.0-service (32bit only), existing
PRODUCT_PACKAGES do not have to be updated.
New products should depend on android.hardware.audio.service:32.

Additionally migrate to Android.bp, dropping support for
AUDIOSERVER_MULTILIB. Previously the HAL service architecture (32 vs 64)
would be the same as the audio server. This in not wanted as all android
audio HAL are 32 bits.

Bug: 121208203
Test: # Compare following commands before and after patch:
      find $ANDROID_PRODUCT_OUT/vendor -name 'android.hardware.audio*'|xargs file
            adb shell reboot # check device boots to UI and
      # check the HAL restarts after the audioserver is killed
      adb shell ps |grep audio; adb shell killall audioserver; adb shell ps
Change-Id: I25f41735175a6687a051ca1e5a7fee670eb8115e
Merged-In: I25f41735175a6687a051ca1e5a7fee670eb8115e
Signed-off-by: Kevin Rocard <krocard@google.com>
2019-11-07 14:12:30 -08:00
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
Eric Laurent
040bfea972 audio: Add CALL_SCREEN audio mode.
Add new audio mode AudioMode.CALL_SCREEN allowing call screening
to take place while other audio use cases are still active.

Also add audio policy configuration attribute indicating if the
vendor implementation supports this audio mode.

Bug: 140384450
Test: make
Change-Id: I2714a9949f2c45b1f8e5a5c40368a6152bd91572
2019-11-06 12:39:46 -08:00
Steven Moreland
856e1d3874 Merge "update-makefiles.sh: for partial Java pkgs" am: cbd3f444c7 am: 7eebf74e97
am: b2b3af540f

Change-Id: Ib6374f3dc3a00ebcb0fac50bfcd5eda479692565
2019-11-05 11:13:18 -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