2008-09-13 17:26:56

by Choi Sonim

[permalink] [raw]
Subject: [Bluez-devel] A2DP over DBUS

Hi all,

I have a question about how Bluez works with A2DP over DBUS.

How does the application sends the data packets (the actual music) to
bluez ? via dbus ? isn't this slow ?

thank you all,
Choi

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2008-09-16 16:56:00

by Nick Pelly

[permalink] [raw]
Subject: Re: [Bluez-devel] A2DP over DBUS

On Sat, Sep 13, 2008 at 11:54 AM, Choi Sonim <[email protected]> wrote:

> Hi Marcel,
>
> On Sat, Sep 13, 2008 at 9:47 PM, Marcel Holtmann <[email protected]>
> wrote:
> >> Can you please explain briefly what's the underlying method that the
> >> plugin uses to send the data to bluez then ? does it directly uses
> >> sockets and sends it to the kernel ?
> >
> > direct SCO or L2CAP sockets to have a low latency and to avoid copying
> > data around.
>
> That's interesting. What about platforms like Android that are only
> Java (If I am not wrong) ?


Android is definitely not pure Java, although third party apps for Android
are recommended to use the Java API's.

The built in Android profiles currently open sockets with the kernel in C
code.

Can they connect directly to those sockets
> from Java applications ?


In Android v1.0 we will not have stable Java API's to use Bluetooth :(

In the near future we intend to expose RFCOMM, L2CAP and SCO (control only)
via a Java Socket-like API for third party app development.


> Thank you a lot
> Choi
>
> >
> > Regards
> >
> > Marcel
> >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > Bluez-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/bluez-devel
> >
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>


Attachments:
(No filename) (2.18 kB)
(No filename) (3.58 kB)
(No filename) (363.00 B)
(No filename) (164.00 B)
Download all attachments

2008-09-13 19:54:42

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] A2DP over DBUS

Hi Choi,

> >> Can you please explain briefly what's the underlying method that the
> >> plugin uses to send the data to bluez then ? does it directly uses
> >> sockets and sends it to the kernel ?
> >
> > direct SCO or L2CAP sockets to have a low latency and to avoid copying
> > data around.
>
> That's interesting. What about platforms like Android that are only
> Java (If I am not wrong) ? Can they connect directly to those sockets
> from Java applications ?

that is an issue of their applications. However if they integrate with
common Linux standards like ALSA, GStreamer etc. then it is hidden from
the actual audio application.

Regards

Marcel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-09-13 19:12:15

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] A2DP over DBUS

Choi

> That's interesting. What about platforms like Android that are only
> Java (If I am not wrong) ? Can they connect directly to those sockets
> from Java applications ?

Check the android API docs. I'd heard the API for bluetooth was
incomplete in the latest android but I haven't read up.

The sun embedded java APIs specify a way to run L2CAP (at least) using
java. Can't remember about SCO. Android breaks with the sun API (for
good reason).

The right way to do it in android would be integrating the bt audio
services with their multimedia hooks, so you wouldn't deal with the
underlying implementation.

--
Brad

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-09-13 18:54:55

by Choi Sonim

[permalink] [raw]
Subject: Re: [Bluez-devel] A2DP over DBUS

Hi Marcel,

On Sat, Sep 13, 2008 at 9:47 PM, Marcel Holtmann <[email protected]> wrote:
>> Can you please explain briefly what's the underlying method that the
>> plugin uses to send the data to bluez then ? does it directly uses
>> sockets and sends it to the kernel ?
>
> direct SCO or L2CAP sockets to have a low latency and to avoid copying
> data around.

That's interesting. What about platforms like Android that are only
Java (If I am not wrong) ? Can they connect directly to those sockets
from Java applications ?

Thank you a lot
Choi

>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-09-13 18:47:56

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] A2DP over DBUS

Hi Choi,

> >> How does the application sends the data packets (the actual music) to
> >> bluez ? via dbus ? isn't this slow ?
> >
> > for that we have plugins for ALSA, GStreamer and PulseAudio. They will
> > take care of the actual sending of the data. The full mechanism is a
> > little bit more complex. Looks at the source code to see how it works.
>
> That's interesting, I will look it up.
>
> Can you please explain briefly what's the underlying method that the
> plugin uses to send the data to bluez then ? does it directly uses
> sockets and sends it to the kernel ?

direct SCO or L2CAP sockets to have a low latency and to avoid copying
data around.

Regards

Marcel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-09-13 18:32:31

by Choi Sonim

[permalink] [raw]
Subject: Re: [Bluez-devel] A2DP over DBUS

Hi Marcel,

On Sat, Sep 13, 2008 at 9:27 PM, Marcel Holtmann <[email protected]> wrote:
>> How does the application sends the data packets (the actual music) to
>> bluez ? via dbus ? isn't this slow ?
>
> for that we have plugins for ALSA, GStreamer and PulseAudio. They will
> take care of the actual sending of the data. The full mechanism is a
> little bit more complex. Looks at the source code to see how it works.

That's interesting, I will look it up.

Can you please explain briefly what's the underlying method that the
plugin uses to send the data to bluez then ? does it directly uses
sockets and sends it to the kernel ?

Thank you Marcel,
Choi
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-09-13 18:27:20

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] A2DP over DBUS

Hi Choi,

> I have a question about how Bluez works with A2DP over DBUS.
>
> How does the application sends the data packets (the actual music) to
> bluez ? via dbus ? isn't this slow ?

for that we have plugins for ALSA, GStreamer and PulseAudio. They will
take care of the actual sending of the data. The full mechanism is a
little bit more complex. Looks at the source code to see how it works.

Regards

Marcel



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel