Linux bluetooth development
 help / color / mirror / Atom feed
From: Max Krasnyansky <maxk@qualcomm.com>
To: James Courtier-Dutton <James@superbug.demon.co.uk>,
	Marcel Holtmann <marcel@rvs.uni-bielefeld.de>
Cc: bluez Dev <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] Re: Bluetooth headset with Bluetooth usb dongle status.
Date: Mon, 21 Jul 2003 17:18:14 -0700	[thread overview]
Message-ID: <5.1.0.14.2.20030721165726.09720d38@unixmail.qualcomm.com> (raw)
In-Reply-To: <3F17FD1A.9050003@superbug.demon.co.uk>

At 06:58 AM 7/18/2003, James Courtier-Dutton wrote:
>>The integration of audio is not part of the Bluetooth drivers, because
>>every Bluetooth HCI driver is only a transport driver which have to
>>transport the HCI command, event, ACL and SCO data between the hardware
>>and the HCI core layer. The SCO data would send from the HCI core
>>through the hdev->send() callback and the driver can send the SCO data
>>it gets from the hardware back with hci_recv_frame(). This means that
>>all needed modifications for ALSA and OSS integration have to done in
>>the HCI core or the SCO layer. And all other HCI drivers will still work
>>with SCO like they do now.
>The recv_frame() parts seem to work ok at the moment. (with some modifications as outlined in a previous email)
>The main problem is the send_frame() parts. hdev->send() is the wrong thing to do for ISOC connections (one runs into scheduling problems, buffer underruns and no flow control.).
I'm still not sure what scheduler problems you're talking about.
Current send process looks like this:
        app -> sco socket layer -> hci core -> (soft irq) -> hci tx tasklet -> hci driver -> HW
I guess by scheduler you mean scheduling tasklet. But tasklet is extremely fast (we can elevate 
tasklet priority if needed) it doesn't go via normal process scheduler, it's softirq within the
kernel itself no context switching, etc.

>A callback method from the hardware is much beter. (e.g. Give me X number of samples NOW!). This is why I suggest a ring buffer and tx/rx complete callbacks from HCI to SCO layer to update ring buffer pointers, and then the alsa or oss layer above that.
>I will do alsa first because there is much less work involved.
>I know the callback/ringbuffer approach works well over usb, because alsa has a usb-audio driver, and it works fine.
The problem is that with PCMCIA, UART, etc based devices you don't know when transfer completes.
ie In USB you submit URB, it completes, you get a callback, in PCMCIA you're not going to get any
completion callbacks.
Also one Bluetooth device can have up to 3 SCO connections information about connection handles and
stuff is maintained by the HCI core. Which means HCI driver has to talk to the core anyway.

Max

  parent reply	other threads:[~2003-07-22  0:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E19a5DI-0002jL-00@sc8-sf-list2.sourceforge.net>
     [not found] ` <3F1752C5.5020701@dsto.defence.gov.au>
2003-07-18 12:15   ` [Bluez-devel] Re: Bluetooth headset with Bluetooth usb dongle status James Courtier-Dutton
2003-07-18 13:04     ` Marcel Holtmann
2003-07-18 13:58       ` James Courtier-Dutton
2003-07-20 14:33         ` [Bluez-devel] " Jonathan Paisley
2003-07-22  0:23           ` Max Krasnyansky
2003-07-22  1:10             ` James Courtier-Dutton
2003-07-22 17:46               ` Max Krasnyansky
2003-07-22 17:56                 ` jp-www
2003-07-22 13:35             ` jp-www
2003-07-22  0:18         ` Max Krasnyansky [this message]
2003-07-21 23:53       ` [Bluez-devel] " Max Krasnyansky
2003-07-21 23:49     ` Max Krasnyansky

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=5.1.0.14.2.20030721165726.09720d38@unixmail.qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=James@superbug.demon.co.uk \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=marcel@rvs.uni-bielefeld.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox