Commit Graph

7 Commits

Author SHA1 Message Date
Peter Cai
420f583758 gsi: sysbta: Implement all existing audio HAL versions
This is needed because libaudiohal.so can only interact with one HAL
version at a time (loading only one of the libaudiohal@version.so
implementations), so only the interface that matches the stock HAL
version will be used. libaudiohal decides which version to use by
looking through the interfaces whose variant is `default` and picking
the highest versioned one, so our hal will not interfere in the process
(because we use `sysbta` as our variant).
2022-10-04 16:28:05 -04:00
Peter Cai
4f1e4824dc gsi: sysbta: Separate audio interfaces from bluetooth
This will allow us to dynamically load multiple different versions of
audio interface implementation into the same sysbta hal process. Note
that since we are using a weird suffix here, the default
`registerPassthroughServiceImplementation` will not work, and we will
have to define our own dynamic symbol for it.
2022-10-04 16:27:57 -04:00
Peter Cai
978ccd40f9 gsi: Initial implementation of sysbta, a system-side bluetooth audio HAL
On platform release T, the legacy `audio.a2dp.default` HAL no longer
exists, and cannot be trivially restored for generic system-side A2DP
audio support. Rather than trying to cling on to its existence (which
does not even work anymore even if one did so), it is time to come up
with a new solution.

This commit introduces a system-side implementation of the generic
bluetooth audio HAL. The HAL itself is modelled after the default
bluetooth audio HAL, while substantial components of the default audio
HAL are also included as it has to also implement the audio HAL
interfaces.

The audio HAL implementation is delegated to `audio.sysbta.default`,
forked from `audio.bluetooth.default` from the Bluetooth apex package.
It then communicates with the bluetooth audio HAL interfaces, which need
to live in the same process (in this case, the process of the sysbta
HAL). This is why we cannot just load `audio.sysbta.default` into the
default audio HAL or the audioserver process directly, but rather have
to include our own simplistic audio HAL implementation.

For now, the audio HAL implementation only includes one for the 6.0
version, but technically, an interface for *every* audio HAL version
needs to exist. This, along with other messiness in the sysbta
implementation, will be addressed in a future commit.

Note that to actually make use of the sysbta audio hal, patches in
frameworks/av and packages/modules/Bluetooth are required to introduce
support for the property `persist.bluetooth.system_audio_hal.enabled`.
2022-10-04 16:26:52 -04:00
Pierre-Hugues Husson
341d5d9e59 P WIP 2018-08-07 13:09:49 +02:00
Pierre-Hugues Husson
c0fbb023db P WIP 2018-08-07 12:50:47 +02:00
Pierre-Hugues Husson
7b82dab9d2 P WIP 2018-08-07 12:49:42 +02:00
Pierre-Hugues Husson
c4ccbd9752 Add dynamic bluetooth config (requires system/bt changes) 2018-02-20 23:03:30 +01:00