This component implements the Advanced Audio Distribution Profile (A2DP) as specified by the Bluetooth SIG in the official specification. This means that you can use your Fuchsia device with audio support as an bluetooth speaker or (very not-portable) headphones.
This profile currently only supports the mandatory SBC audio decoder.
The bt-a2dp-sink
component requires some services to be reachable when it is run to be useful. For audio playback, a provider of the fuchsia.media.playback.Player
service must be available. In current Fuchsia the the mediaplayer
package located at //src/media/playback/player:mediaplayer
is one provider.
The Player must in turn be able to decode SBC audio and play it. Currently SBC decoding is provided internally if you are using the mediaplayer
package. For most players to play audio, the fuchsia.media.Audio
and fuchsia.media.AudioCore
services will be used.
Without too many extra dependencies, adding the media_audio
package group and mediaplayer
package to the available packages will provide all the required services so adding the following to your Fuchsia set configuration should build them all and make them available:
--with //src/connectivity/bluetooth/profiles/bt-a2dp-sink --with //garnet/packages/prod:media_audio --with //garnet/packages/prod:mediaplayer
The profile makes an effort to determine if playing media will fail, and crash with a log message on startup.
To listen to Audio through the bt-a2dp-sink component, start the component, connect and pair from an audio source.
bt-a2dp-sink
with run -d fuchsia-pkg://fuchsia.com/bt-a2dp-sink#meta/bt-a2dp-sink.cmx
bt-cli
discoverable
command within the CLI to make the fuchsia device discoverablebt-cli
running until you have finished connectingTroubleshooting:
tones
test package.vol
command)