From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: Carl Orsborn <cjo@csr.com>
Cc: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] snd-bt-sco development teamup...
Date: Tue, 10 Aug 2004 16:51:07 +0100 [thread overview]
Message-ID: <4118EEEB.4010602@superbug.demon.co.uk> (raw)
In-Reply-To: <4118DAF9.2080204@csr.com>
Carl Orsborn wrote:
> I know nothing of snd-bt-sco or alsa, so some of my comments
> below will doubtless expose my ignorance, but I know something
> of how CSR devices handle SCO traffic (or, at least, how
> they're *supposed* to handle SCO traffic).
>
> I can't find anything in this thread that reveals whether you're
> trying to send SCO traffic over USB or UART. The data handling
> for the two cases have subtle differences.
>
> Over USB, there's an isochronous connection - the bus provides
> capacity for 8 ksamples/second in each direction. If a CSR
> device somehow fails to receive SCO traffic from air it fills
> the embarrassing gap in the USB to-host flow with dummy
> data. Thus, the host continues to receive 8 ksamples/second.
>
> Over UART, the same compensation mechanism applies - the CSR
> device makes up data for any from-air gaps. This allows the
> host to match its tx sample rate to the connection's rx
> sample rate, and so removes the need for the host to maintain
> an accurate 8 kHz clock.
>
> The Bluetooth device has a pair of *small* ring buffers for each
> SCO connection - one for each direction. They are small to
> keep audio latency low; manufacturers of audio devices insist
> on low latency. Keeping latency low for audio traffic flowing
> over HCI (USB or UART) is hard. Most of our customers route
> SCO traffic over the Bluetooth device's separate audio interface
> (PCM port), bypassing the HCI transport.
>
> As I noted above, the USB/SCO path is isochronous. This means
> packets can be lost silently. If the path is carrying 16-bit
> samples (the normal case), and if a USB packet can hold an
> odd number of bytes, this can lead to a 1 byte offset in
> the audio stream. This sounds ghastly. We fixed this in the
> Bluetooth device's firmware ages ago - spotting the loss of
> sync by looking for SCO packet headers. However, many host
> USB device drivers can still suffer this problem.
>
> Much of this is discussed in CSR's "HCI Implementation" document,
> bcore-me-026, though this is normally only made available to
> CSR's (direct) customers.
>
> Regards,
>
> Carl
>
Carl seems to hint that sending SCO packets over HCI is hard achieve low
latency.
So this seems to support my assertions all this time, that sending HCI
SCO packets with the other HCI packets as we current do is going to fail.
So, I suggest we might do better if we provide a number of different
ways to get sound to bluetooth devices, in order of preference.
1) PCM as Carl suggests
2) Bypass HCI stack and send SCO direct to USB devices. I don't think
one can do that for UART based devices. I don't know what is best for
PCI devices, as I have not looked at the PCI source code. I concentrated
on the USB source code when I tried before.
3) Current HCI stack method. <- Last resort.
Cheers
James
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2004-08-10 15:51 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-09 16:51 [Bluez-devel] snd-bt-sco development teamup Lars Grunewaldt
2004-08-09 17:09 ` Marcel Holtmann
2004-08-09 17:12 ` Lars Grunewaldt
2004-08-09 17:39 ` Marcel Holtmann
2004-08-09 18:21 ` James Courtier-Dutton
2004-08-09 22:26 ` Marcel Holtmann
2004-08-09 23:53 ` Lars Grunewaldt
2004-08-10 12:14 ` Marcel Holtmann
2004-08-10 12:53 ` James Courtier-Dutton
2004-08-10 13:39 ` Jonathan Paisley
2004-08-10 14:26 ` Carl Orsborn
2004-08-10 14:48 ` Marcel Holtmann
2004-08-10 15:31 ` Jonathan Paisley
2004-08-11 8:58 ` Roderick Taylor
2004-08-11 6:40 ` Marcel Holtmann
2004-08-10 15:51 ` James Courtier-Dutton [this message]
2004-08-10 18:43 ` Jonathan Paisley
2004-08-10 19:22 ` Carl Orsborn
2004-08-10 12:56 ` [Bluez-devel] snd-bt-sco development teamup | ALSA connection Lars Grunewaldt
2004-08-10 13:45 ` Marcel Holtmann
2004-08-10 13:53 ` [snd-bt-sco] " Jonathan Paisley
2004-08-10 14:36 ` Marcel Holtmann
2004-08-10 14:39 ` Jonathan Paisley
2004-08-10 14:21 ` Lars Grunewaldt
2004-08-10 15:01 ` Marcel Holtmann
2004-08-10 16:02 ` Lars Grunewaldt
2004-08-10 14:53 ` James Courtier-Dutton
2004-08-10 13:03 ` [Bluez-devel] snd-bt-sco development teamup Jonathan Paisley
2004-08-10 13:11 ` Marcel Holtmann
2004-08-10 13:18 ` Lars Grunewaldt
2004-08-10 13:20 ` Jonathan Paisley
2004-08-10 13:22 ` Lars Grunewaldt
2004-08-10 13:54 ` James Courtier-Dutton
2004-08-10 13:28 ` Marcel Holtmann
2004-08-10 13:40 ` James Courtier-Dutton
2004-08-10 13:49 ` Marcel Holtmann
2004-08-10 14:07 ` James Courtier-Dutton
2004-08-10 14:34 ` Marcel Holtmann
2004-08-10 15:15 ` James Courtier-Dutton
2004-08-10 15:25 ` Marcel Holtmann
2004-08-10 16:46 ` James Courtier-Dutton
2004-08-10 22:58 ` Marcel Holtmann
2004-08-10 11:48 ` Lars Grunewaldt
2004-08-10 12:08 ` Marcel Holtmann
2004-08-10 12:40 ` Lars Grunewaldt
2004-08-10 13:03 ` Marcel Holtmann
2004-08-10 13:10 ` Lars Grunewaldt
2004-08-10 13:30 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4118EEEB.4010602@superbug.demon.co.uk \
--to=james@superbug.demon.co.uk \
--cc=bluez-devel@lists.sourceforge.net \
--cc=cjo@csr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.