Skip to contentSkip to conversation

Thoughts about AVDTP support

Bluez-devel Marcel Holtmann 2 participants 3 messages May 30, 2004 – Jun 4, 2004 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

Hi Folks,

I think one of the next major goals of BlueZ should be the support of the Audio/Video Distribution Transport Protocol (AVDTP). So I spent some time in reading the protocol specification. The specification is very complex and I think most of the products will only support the basic mode with signal and media channel. However it took me some time to realize that they are using multiple L2CAP channels between two devices with the same PSM. I never thought that this was possible, but our L2CAP core already supports such configuration. Now I asked myself, why HID and HCRP needed two different PSM values?

To be capable of handling multiple audio and video streams nicely, I think we need to implement AVDTP as a kernel module. In that case we can make use of two different interfaces to AVDTP. One for the A2DP support that is directly connected to ALSA and the second should be a simple socket interface. I am no audio/video streaming expert, so what socket type is the best for this case?

Before I start writing any source code, I would like to get my hands on a product that already uses AVDTP. I need to know what parts of this protocol are in use and how they handle it. Searching for an end user product I found one from Air2U (www.air2u.com.tw). The german reseller is Aiptek and they call it BT MusiCool 300

	http://www.aiptek.de/index.php?mapid=31&katid1=4&detailid=11

I asked them to donate one of these to me, but they said no. Actually not a nice company. Searching a little bit more I found out that Amazon is selling it for 99 EUR. This is fair price for two Bluetooth devices (SNK and SRC), but I decided not to buy them. My conclusion was that if I should really start working on AVDTP, someone else should buy me an end user device for testing any of my code. However there is always the possibility to donate money (www.bluez.org/sponsors.html) which I can use to buy unsupported hardware.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#1 lore raw

Hi Marcel,

The bluetooth avdtp specification is complex but the if we are dealing with the basic functionality part itself and it reduces a lot of complexities.

What makes you think that avdtp is using Multiple l2cap channels between same devices with same PSM - is it beacuse of the siganlling link and data transfer link ?

Using AVDTP as kernel module is good idea (much better than using it at user space).

I think the connection oriented socket is required for avdtp. Its also mentioned in the specification.

I would like to help with coding and testing if it fine with you. I had started with the AVDTP implementation, but it was at the user level only and I have not much experience coding at kernel level.

Thats it for now.

Aarti.

Quoted 32 lines · --- Marcel Holtmann

Hi Folks,

I think one of the next major goals of BlueZ should be the support of
the Audio/Video Distribution Transport Protocol (AVDTP). So I spent some
time in reading the protocol specification. The specification is very
complex and I think most of the products will only support the basic
mode with signal and media channel. However it took me some time to
realize that they are using multiple L2CAP channels between two devices
with the same PSM. I never thought that this was possible, but our L2CAP
core already supports such configuration. Now I asked myself, why HID
and HCRP needed two different PSM values?

To be capable of handling multiple audio and video streams nicely, I
think we need to implement AVDTP as a kernel module. In that case we can
make use of two different interfaces to AVDTP. One for the A2DP support
that is directly connected to ALSA and the second should be a simple
socket interface. I am no audio/video streaming expert, so what socket
type is the best for this case?

Quoted 12 lines

Before I start writing any source code, I would like to get my hands on
a product that already uses AVDTP. I need to know what parts of this
protocol are in use and how they handle it. Searching for an end user
product I found one from Air2U (www.air2u.com.tw). The german reseller
is Aiptek and they call it BT MusiCool 300

http://www.aiptek.de/index.php?mapid=31&katid1=4&detailid=11

Quoted 17 lines

I asked them to donate one of these to me, but they said no. Actually
not a nice company. Searching a little bit more I found out that Amazon
is selling it for 99 EUR. This is fair price for two Bluetooth devices
(SNK and SRC), but I decided not to buy them. My conclusion was that if
I should really start working on AVDTP, someone else should buy me an
end user device for testing any of my code. However there is always the
possibility to donate money (www.bluez.org/sponsors.html) which I can use to buy unsupported hardware.

Quoted 8 lines

Regards

Marcel

-------------------------------------------------------

Quoted 6 lines

This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.

http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

Quoted 4 lines

_______________________________________________
Bluez-devel mailing list
[email protected]

https://lists.sourceforge.net/lists/listinfo/bluez-devel

__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/

author maintainer
#2 lore raw

Hi Aarti,

Quoted 3 lines

The bluetooth avdtp specification is complex but the if we are dealing with the basic functionality part itself and it reduces a lot of complexities.

you can leave reporting and recovery out, but it will be still complex and at some point you must include these features. So we must think about them from the start.

Quoted 4 lines

What makes you think that avdtp is using Multiple l2cap channels between same devices with same PSM - is it beacuse of the siganlling link and data transfer link ?

As I read the specification, between two devices there is always one signal channel (and only one). This is the first L2CAP channel opened on the PSM 25. It also assigns the roles of initiator and acceptor. For the streaming between two endpoints it has to open at least another L2CAP channel for the media transport. This channel uses the same PSM and so the order of the L2CAP channel creation tells us what they are for.

Quoted 2 lines

Using AVDTP as kernel module is good idea (much better than using it at user space).

No. Doing something in userspace is almost better and easier, but with the definition of the streaming endpoints a kernel based socket design makes sense.

Quoted 2 lines

I think the connection oriented socket is required for avdtp. Its also mentioned in the specification.

For the L2CAP connection, yes, but I was asking for the socket type of our AVDTP socket. I think it should be SOCK_DGRAM or SOCK_SEQPACKET.

Quoted 4 lines

I would like to help with coding and testing if it fine with you. I had started with the AVDTP implementation, but it was at the user level only and I have not much experience coding at kernel level.

How far did you came? Any code that you can share with us?

Do anyone started implementing the SBC audio codec? The specification of this codec is in the A2DP document and the test document contains sample *.sbc files and a DOS decoder and encoder (works fine with wine). I like to see an open source implementation of SBC for FFMPEG or a separate library.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.

Quoted 1 line

From Windows to Linux, servers to mobile, InstallShield X is the one

installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel