Commit graph

22 commits

Author SHA1 Message Date
Grzegorz Kołodziejczyk
103d790df8 Update supported sampling frequencies for LC3 codec
LC3 specification extends current supported sampling frequencies with
8kHz and 32kHz for LC3 codec for session and does not support yet higher
than 48kHz.
Along with additional supported session frequencies, valid software pcm
configuration is extended with missing frequencies for LC3 and extended
8kHz and 32kHz. Frequncies above not supported by LC3 are removed also.

Tag: #feature
Test: vts-tradefed run vts -m VtsHalBluetoothAudioV2_1TargetTest
Sponsor: jpawlowski@
Change-Id: If36c9c9aa102008adff7f77c58e272b79f7e2482
2021-01-12 15:45:53 +00:00
Grzegorz Kołodziejczyk
0f0c5d17d2 Use safe_union correctly
As described in source.android.com/devices/architecture/hidl/safe_union
value must be assigned through generated getter, rather than assigning it directly.

Test: vts-tradefed run vts -m VtsHalBluetoothAudioV2_1TargetTest
Sponsor: jpawlowski@
Bug: 150670922
Change-Id: Iefc7ee98163ec2b3387fc01c3d69c1dcd15e94bc
2020-12-15 11:08:16 +00:00
Grzegorz Kołodziejczyk
d7f04f9f06 Copy audioConfig according to config discriminator
Audio configuration as safe union is guarded to not violate its discriminator
usage. Only one member can be set.

Change-Id: I98a94d81ea5bacca2407286746432b972aac4488
2020-11-19 22:51:42 +00:00
Grzegorz Kołodziejczyk
7fa9659923 Check if no queue is set in negative config cases
Data queue pointer should be checked if it's nullptr if codec
configuration is invalid. This covers more code in case of invalid pcm
configuration.

Tag: #stability
Test: vts-tradefed run vts -m VtsHalBluetoothAudioV2_1TargetTest
Sponsor: jpawlowski@
Bug: 173353147
Change-Id: Ib78f1615e7a15603dc6d73188edf1df7eab12b8b
2020-11-19 22:51:35 +00:00
Grzegorz Kołodziejczyk
e01b0f7c5a Reset data queue pointer in negative config cases
Data queue should be set to nullptr if pcm configuration is invalid.
Otherwise previously set queue would be cosidered during check.

Tag: #stability
Test: vts-tradefed run vts -m VtsHalBluetoothAudioV2_1TargetTest
Sponsor: jpawlowski@
Fixes: 173353147
Bug: 173353147
Change-Id: I10ee061e1c75f73410a9d0a0b1eaace0e536addd
2020-11-19 22:51:29 +00: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
Dan Shi
ba4d532fee Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I8c1a48e6fbd7c8161137902b5332911fa0d7b8b3
2020-07-28 15:12:32 -07:00
Cheney Ni
9dfdb686aa BTAudio: report session ended after cleaning up
While Bluetooth stack ending a session, this CL does clean up first, and
then reports the change. All observers are able to get the correct
session state by invoking IsSessionReady() within the change callback.

Bug: 162065063
Test: manually
Change-Id: I920ea578d626d2e5844eb7c8a701636e20d7a219
2020-07-24 22:07:28 +08: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
Ray Kuo
525050c8e6 A2DP: Enable AAC VBR Offloading
Bug: 155826682
Test: Manual
Change-Id: I55df55bbad18ab561493ec9d4d930345056d8c72
2020-06-17 20:25:40 +08:00
Dan Shi
ba894f81db Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 15:17:02 -07:00
Dan Shi
4d9b6fef99 Convert VtsHalBluetoothAudioV2_0TargetTest to be parameterized test
Bug: 142397658
Test: atest VtsHalBluetoothAudioV2_0TargetTest
Change-Id: I024abca2330ffb1fab709c97b01896ce9decba76
2019-12-02 13:47:43 -08:00
Nick Desaulniers
0fd95b2473 [hardware][interfaces][bluetooth] fix -Wreorder-init-list
C++20 will require members in a designated initializer to be in order
unlike C99.

Bug: 139945549
Test: mm
Change-Id: Ie34b4f3400439817bebd30ee0356e35a87c971e5
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-14 11:04:50 -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
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
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -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
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
Cheney Ni
47a8309706 Implementation of Bluetooth Audio HAL interface v2
This is the default implementation of Bluetooth Audio Hal v2, and 3
providers are defined.

* BluetoothAudioProvider is the default provider, which is a stub when
  no SessionType matched.
* A2dpSoftwareAudioProvider uses to replace the old A2DP legacy module
  and uses IPC via HIDL interface between Bluetooth stack and Audio HAL.
* HearingAidAudioProvider uses to replace the Hearing Aids module which
  uses UNIX socket as IPC and now there is HIDL based interface.

There is also a shared library named "libbluetooth_audio_session.so" to
provide the linkage directly between this HIDL and its HAL module,
bluetooth_audio. With this library, we can break the library dependency
and guarantee those symbols of libraries while compiling.

Bug: 111519504
Bug: 122503379
Test: boot and manual test

Change-Id: I54d86291482b7fb041a3ac3e171b68a4ed7bfa07
2019-01-31 18:16:54 +00:00
Cheney Ni
56d54f1655 VTS for Bluetooth Audio HAL v2
Initial VTS commit for the bluetooth.audio@2.0 HAL

Bug: 111519504
Test: VTS (VtsHalBluetoothAudioV2_0TargetTest) passed

Change-Id: Id607979724182de242c29747218f6b12880d6295
2019-01-30 17:18:32 -08:00
Ajay Panicker
5f0e90ece7 Add getCodecCapabilities as a supported function.
Add the ability to get a list of supported codecs and their capabilites
through the HIDL interface.

Bug: 111519504
Test: Compile
Change-Id: I61dff240a98d59cb99b526d8988d0d0245140ee4
2019-01-23 15:33:59 -08:00
Pavlin Radoslavov
1ea96a3802 Bluetooth Audio HAL interface v2
Generalized Bluetooth Audio HAL interface.
It is similar to the original android.hardware.bluetooth.a2dp@1.0
interface with the following modifications:

* The session type can be one of the following:
  - A2DP Software Encoding Datapath
  - A2DP Hardware Encoding Datapath
  - Hearing Aid Software Encoding Datapath
* For Hardware Offload Datapath (A2DP), the HAL interface is used only
  for the control path
* For Software Encoding Datapath (A2DP or Hearing Aid), the HAL
  interface is used for both the control and data paths
* Added Delay Report support: IBluetoothAudioHost.getPresentationPosition()
  that was missing in the original android.hardware.bluetooth.a2dp@1.0
  HAL interface.
* Removed "oneway" calls to avoid potential reordering of HAL calls:
  b/111244402
* Updated SBC-specific codec configuration
* Added AAC-specific and LDAC-specific codec configuration
* Reorganized the original CodecConfiguration into two sections:
  - PcmDataConfiguration: Audio PCM data configuration
  - EncodedDataConfiguration: Encoded audio data codec configuration.
    It is used only if the HAL is responsible for encoding the PCM audio
    data.
* Added new HAL IBluetoothAudioProvidersFactory.
  It is used to open an audio provider for an audio session as specified by
  the session type and the codec configuration as negotiated with the
  remote device.

Bug: 111519504
Test: manual
Change-Id: I2ee4cf50b177baee077cf0b5143dbeadda57c8fb
Merged-In: I2ee4cf50b177baee077cf0b5143dbeadda57c8fb
(cherry picked from commit fcc0732db4)
2019-01-14 03:55:18 +08:00