Re: [Bluez-devel] New A2DP support : HOWTO ?

Marcel Holtmann
2007-08-17T14:02:59Z

Hi Frederic,

> > >> Maybe the start command could be used to launch the
> > >> audio player and start playback. Then rejecting should only occur if
> > >> launching failed.
> > >
> > > Won't happen. It's just not how the architecture is. User
> > > applications initiate access to the system wide audio service, not
> > > the other way around.
> >
> > Just a little clarification to this so you don't think we loose all
> > usefulness of doing stuff automatically when a headset connects to
> > us: The audio service sends (D-Bus) signals when devices connect and
> > disconnect and the plan is to also integrate with HAL (a patch is
> > already in the works) to provide a object which HAL aware
> > applications (e.g. pulseaudio) could automatically use. This way the
> > applications or a sound server can automatically recognize the
> > connected headset and switch their audio routing accordingly.
>
> Oh I see, then there is no need to write a pulseaudio specific plugin.

we might have to do this for latency purposes. We don't wanna copy our
audio data around. While it would work on the desktop, on an embedded
device it would be overkill.

> However, A2DP Test Suite check SNK initiated stream start.
>
> 4.2.4.1 TP/SET/BV-04-I [Start Stream. - SNK]
> To verify that SNK can start audio streaming.
>
> A reject would probably make the test fail.

In the long run we need to accept it and then suspend the stream if no
client is attached. However in the long run we also have to tell the
plugin to simply discard data (if no A2DP connection is open) and not
fail with various stupid reasons. In that case the start command would
tell the plugin that a connection is now present and has to use it. It
is a really complex system and needs a lots of testing to get the right
and expected behavior for the end user.

Regards

Marcel