Re: [Bluez-devel] CVS audio-api.txt : 1st question

Fabien Chevalier
2007-07-05T12:53:00Z

Luiz Augusto von Dentz wrote:
> Hi Fabien,
>
> Yep, you are right we cannot stop application using alsa plugin while in
> PCM mode,
> Im not so familiar with alsa so I have no clue about slave pcm, but if
> we can make
> it to just open/close the device (the only thing left in PCM mode) that
> is the way
> to go.

Yes that's possible :-)
We just have to make the hardware pcm a slave of the headset pcm.
This basically mean that we would have to call the alsa API function
inside each bluetooth PCM plugin function, except for open/close/start/stop.

In this case we can kiss Play()/Stop() byebye :-)

>
> Another point I would like to discuss is about not having the
> intermediate state when
> we are connected to the rfcomm but not yet to the sco socket, it seems
> useless
> to have to Connect() and then Play(), the alsa plugin already goes
> direct to Play the
> stream. Do you guys see any value in having a device connected but not
> streaming?

Yes there is *great* value to this.
There are multiple uses to it:
* Basically in the long term Connect() could be called by a GUI. That
would trigger the bluetooth audio deamon to notify a sound routing
daemon that rerouting the audio is now an option. Sound routing deamon
would then call Play() or whatever else if it chooses to use the newly
available device. [Note : this is just an option, i'm not saying here
that's what's gonna be done :-)]
* Another reason is that bluetooth audio daemon has to be able to
accept incoming RFCOMM connection from the headset. In this case there
is no need to call Connect(), but we can go straight to play mode.

So yes that's *very* important :-), RFCOMM connected but not SCO yet is
a valid state.

Cheers,

Fabien