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
Initial VTS commit for the bluetooth.audio@2.0 HAL
Bug: 111519504
Test: VTS (VtsHalBluetoothAudioV2_0TargetTest) passed
Change-Id: Id607979724182de242c29747218f6b12880d6295
Add the ability to get a list of supported codecs and their capabilites
through the HIDL interface.
Bug: 111519504
Test: Compile
Change-Id: I61dff240a98d59cb99b526d8988d0d0245140ee4
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)
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
* Add a 200ms sleep after BluetoothHci->close() to give HAL an ample
time to shutdown
* Add override modifier to certain serviceDied() callback
* Change from return to break in handle_no_ops
* Add more logging to TearDown()
Test: make, VtsHalBluetoothV1_0TargetTest
Bug: 119071943
Change-Id: I5c919a99fb651f8f52d1d34847e1f9b4325efcd5
* Unfortunately, glob pattern in OWNERS file cannot include
directory paths and hence **/vts/** mechanism doesn't work
* For now, we need an individual OWNERS file for each VTS directory that
we have
Test: make
Change-Id: Iacad2cb78152c06829632126c210c9585dce2a31
* Remove the action on property vts.native_server.on, the current one
will actually turn off the BT HAL service
Bug: 118637723
Test: make vts
vts-tradefed run vts -m VtsHalBluetoothV1_0Target
Change-Id: I5bcc0532d57c2f5f3b01a8df1bab8c358270ca73
- */vts/* only matches one layer of directories
e.g. a/vts/b is matched, a/b/vts/c is not matched
- **/vts/** matches everything up to a/b/c/vts/d/e/f
Test: make
Change-Id: I57ea4f2ab2fdeef5929895c7443a1d1097985dba
* Add Bluetooth related persons to OWNERS file for Bluetooth VTS tests
so that it is easier to develop VTS tests in the future
Test: make
Change-Id: I202145344582f9a5ad9dd367da897f5982db57eb
This is needed for some platforms
Bug: 74554159
Bug: 77213213
Test: walleye BT works
Change-Id: If0033c5a7fc09057415b27196fa4541e9aadfb4b
(cherry picked from commit 2d46875666)
When a device is restarted, the UART may go away before the
packetizer. Print an error and sleep in case it isn't really
a restart.
Bug: 70855323
Test: Repeated restarts, check for Bluetooth tombstones
Change-Id: I2b4e677451e826d40dcc9d063d80dc0e17fc9aca
Add mutex in function Send() and OnTimeout() to do mutual
exclusive access on lpm_wake_deasserted.
If lpm_wake_deasserted is out of sync with the actual
wake state, then platforms which use the lpm hint
will break.
Bug: 64299848
Test: run affected platform for a long period of time
and find that hci commands do not time out
Change-Id: I9f630d6f40f84b9c047c6488632cd44d6602bb14
hardware/interfaces/bluetooth/1.0/default/test/bluetooth_address_test.cc:59:39:
error: 'open' called with O_CREAT or O_TMPFILE, but missing mode
Bug: 31559095
Test: out/host/linux-x86/nativetest{,64}/bluetooth-address-unit-tests/bluetooth-address-unit-tests
Change-Id: I913c78e25eccaecf8830f1caf8e92f834ab8bb76
Removing whenever I see these in code reviews.
Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
Removing whenever I see these in code reviews.
Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
Removing whenever I see these in code reviews.
Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
Automatic mk -> bp conversion for all modules here
which can be converted and built automatically.
Test: Soong resolves all dependencies
Bug: 37512442
Change-Id: Ib789212cb88d55731397c600d132e7c672c0d8be
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.
Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I4e8fbee791ec917a8f627a1366f4d44ec7e6febc
The Bluetooth specification doesn't require data credits
to come back within a specific timeframe, so the VTS test
can not require it.
Bug: 65269854
Test: VtsHalBlueoothV1_0TargetTest with simulated chip (no credits)
Change-Id: If2fc052d3b5236f6a3097f3d5403882226561404
AsyncFdWatcher thread notification pipe fds without close
which causes FD leak under Bluetooth on/off stress test.
Close the notification pipe fds when shut down Bluetooth.
Test: Bluetooth on/off stress test
Change-Id: I7575adec49161f9764f0e070ef3c1043b8295a97
Do not crash in the vendor layer. The stack will crash
when it fails to initialize.
Bug: 64535243
Test: Bluetooth starts/stops
Change-Id: I69fdd2879c80fa2f006c50f0a42a85e9289b14fe
An invalid type byte can cause an access outside
the bounds of the array.
Bug: 64565737
Test: Bluetooth On/Off
Change-Id: Ie11dd62942f66b9fc60ebce2e4339c37d597fdf0
This reverts commit 8ac1971678.
Reason for revert: Didn't remove automotive changes from this CL.
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Change-Id: I1c660cffc8817ad0b33da9f6eceb3d88e7c48416
Opening the serial port(s) returns -1 when it fails, check
that the number of file descriptors is greater than 0 and
less than the size of the array.
Test: VtsHalBluetoothV1_0TargetTest, Bluetooth start/stop
Bug: 64420262
Change-Id: Icbffa5bd8c02030e389bac03aa5e1e78cc3c6057
Removes redundant "java-static" target.
Note, targets aren't removed here which have internal
targets that depend on them.
Bug: 36376126
Test: pass
Change-Id: I830f02e5f219d2d58721132c358d2783c3942eac
Allow them to be static.
This is required for a couple of reasons:
- enabling HIDL passthrough in recovery
- enabling VTS tests to be static blobs
Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Merged-In: I1b2401fb273ab80819e3870aa71fe742269674ba
Change-Id: I1b2401fb273ab80819e3870aa71fe742269674ba
(cherry picked from commit 7206708528)
hwbinder.jar will be used instead of framework.jar on build-time, but
on runtime framework.jar will be used.
This is to cut the circular dependency when using configstore from
Android framework.
Bug: 35771640
Test: no test.
Change-Id: I04cab676c91d2ea423f5e2c1b2b9efa15e522f37
Allow them to be static.
This is required for a couple of reasons:
- enabling HIDL passthrough in recovery
- enabling VTS tests to be static blobs
Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1b2401fb273ab80819e3870aa71fe742269674ba
The byte offsets for Packet Boundary (PB) and Broadcast (BC) flags
in the HCI ACL Header is swapped. This will fixed it so that it matches
the Bluetooth Specifications.
Bug: 63241720
Test: Run manual VTS tests for Bluetooth
Change-Id: Ifc1f4d4f054a1dab13458c563e47bfb884f39d92
(cherry picked from commit 7915b71fb9)
The byte offsets for Packet Boundary (PB) and Broadcast (BC) flags
in the HCI ACL Header is swapped. This will fixed it so that it matches
the Bluetooth Specifications.
Bug: 63241720
Test: Run manual VTS tests for Bluetooth
Change-Id: Ifc1f4d4f054a1dab13458c563e47bfb884f39d92
Add missing headers that aren't automatically included when
BOARD_VNDK_VERSION is set.
Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j <module> where <module> is
android.hardware.bluetooth-async.vendor,
android.hardware.bluetooth@1.0-impl.vendor, and
android.hardware.bluetooth-hci.vendor
Change-Id: Ifb14d254fa358fbd2b9fbeecb028d6efd18e9483
* Add libbluetooth-types - library containing types implementation, that
is common between stystem/bt and packages/apps/Bluetooth. It must be
included in every project using btif interface.
* Put Raw Address implementation into libbluetooth-types
* Unify all "to/from string" helper methods into ToString and FromString
* bd_addr_empty -> RawAddress::kEmpty
* bd_addr_any -> RawAddress::kAny
Also fix leaks in jni str2addr by adding ReleaseStringUTFChars
Test: types_unittest
Change-Id: I7dca82ec2293ae5338a9500dd6aa43b59d25657a
Merged-In: I7dca82ec2293ae5338a9500dd6aa43b59d25657a
If to send type and data separately for one HCI packet,
it will cause two system call context switch to kernel space,
which will introduce software overhead on data path.
Plus, if vendor does not use pure UART interface, it causes different
data behavior on BUS and may not adapt to all vendors as legacy HAL did.
Considering backward-compatibility, to use writev to send
type and data together once as legacy BT HAL did.
Bug: 63391357
Test: H4 UTTest, BT VTS test, Bluetooth on/off
Change-Id: I2d93085fe0c01b48d0e3729a3fa85b5b27335b2c
(cherry picked from commit 92afd74a15)
If to send type and data separately for one HCI packet,
it will cause two system call context switch to kernel space,
which will introduce software overhead on data path.
Plus, if vendor does not use pure UART interface, it causes different
data behavior on BUS and may not adapt to all vendors as legacy HAL did.
Considering backward-compatibility, to use writev to send
type and data together once as legacy BT HAL did.
Test: H4 UTTest, BT VTS test, Bluetooth on/off
Change-Id: I2d93085fe0c01b48d0e3729a3fa85b5b27335b2c
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: I424371932af129bba9d58dcf8652c64297f35f05