2006-11-18 11:44:39

by Frédéric DALLEAU

[permalink] [raw]
Subject: [Bluez-devel] RE : RE : SCO on bluez : some architectural tips

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


Attachments:
winmail.dat (3.30 kB)
(No filename) (347.00 B)
(No filename) (164.00 B)
Download all attachments

2006-11-19 16:54:24

by Fabien Chevalier

[permalink] [raw]
Subject: Re: [Bluez-devel] RE : RE : SCO on bluez : some architectural tips

Hi Frederic,

> =

> We won't be able to use +/- in a game or system sound!

Of course we can't :-). But a2dp has never been designed for that =

either. It has been designed so that handset makers be able to stream =

music over headsets.

> =

>> Let' say you use a unix socket. Sco sockets have a fixed queue length
>> (something like 1 kb if i remember : this should be checked). Each SCO
>> packets is 48 bytes, with 'lasts' 3 msec. Which means we can fit
>> 20 packets, or 60 ms data.
>> Congratulations, we just added more delay that the network itself !! ;-)
> =

> Did you mean Unix socket have a fixed queue length? =


Yes they did. I had to dig into kernel sources to find that :-)

> If buffering takes place
> inside the SCO socket, then work is due to the socket itself. In both cas=
es,
> I would be surprised if this wasn't tunable.

SCO socket queue is tunable, provided you use my flow control patch... =

otherwise it's not.

> =

> Nevertheless, there is no need to know the buffer size : if the buffer was
> 1 Mb long would you wait for it to be full before reading data? =


Frederic, this is not the point. Of course we won't wait the buffer to =

be full before sending audio data to the remote device.
But if buffer is 1 MB long, then the application that plays sound will =

fill up the buffer faster that the device reads. Which means at one =

point or another, the buffer will be full, thus introducing audio =

latency equal to the time it takes to empty the buffer

> =

> Last, benchmarks on the net measure unix socket latency using =B5s unit.
> =


That easy to say. Just give it a try and you might have some surprises :-)

> =

> Probably the best way to figure out the best architecture is to have both=
and
> measure.

I 100% agree with that. :-)

I can provide wome source code that doe just that to whoever is =

interested in testing this daemon approach.

Cheers,

Fabien

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-11-19 05:30:08

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] RE : RE : SCO on bluez : some architectural tips

Frederic

> We won't be able to use +/- in a game or system sound!

multiplayer gaming would not be acceptable with a2dp latencies. System
sounds like taps that are supposed to be an immediate feedback would
have to be turned off probably.

I want to have the bluetooth audio daemon keep track of latency for a
given headset and leave it up to the app to do something about it.
System sounds like tap feedback would be turned off for significant
delay but single-player gaming and video playing could accommodate the
delay.

Brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel