public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Lars Grunewaldt <lgw@dark-reality.de>
Cc: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] snd-bt-sco development teamup | ALSA connection
Date: Tue, 10 Aug 2004 17:01:18 +0200	[thread overview]
Message-ID: <1092150078.4564.178.camel@pegasus> (raw)
In-Reply-To: <4118D9ED.4030705@dark-reality.de>

Hi Lars,

> Please, let me try it again:

ok, lets start over ;)

> [STRUCTURE]
> 
> so we get three parts, bluez kernel (BZ), user space daemon (USD) and
> alsa driver (AD).
> 
> kernel/bluez kernel stuff (BZ):
> This part resides in the kernel. It already does. It handles what
> happens to the devices, i.e. converts the SCO device into an alsa device
> node on request. It builds (not requests!) the connections for RFCOMM
> and SCO (of course, that is what it does now too).
> 
> user space daemon (USD):
> requests headset RFCOMM connect (from the user, like "bthsd --connect
> <BTADDR>" or something alike, just an example) and handles the AT
> commands. This is what our btsco program does right now, but I'd like to
> have a real daemon here that is once started and then runs totally in
> the background. Most AT handling that is needed is already implemented.
> 
> alsa driver (AD):
> the alsa-specific stuff, like reporting to alsa applications what
> channels exist, what audio props they have and so on

actually only two parts are needed. The SCO kernel driver and a headset
userspace daemon.

The SCO module register the SCO socket and register for handling SCO
packets with the BlueZ core. The SCO raw socket can be used for control
other things. It can also register the ALSA device, because most stuff
will be only moving data packets from the BlueZ core to ALSA and vice
versa. So the SCO module will depend on the ALSA and BlueZ core.

The other part is the userspace daemon that includes the SDP, RFCOMM, AT
handling, ALSA setup etc.

> [INTEROPERABILITY]
> 
> There are two main sources that may demand things and that must be
> supported:
> 1. the headset: if the user presses the button, an AT is send. This must
> be caught by USD, that opens the SCO connection in the usual way. Now
> some ioctl kernel mojo happens to make the SCO connection usable for
> alsa programs (I'm not sure how it works, but is sounds easy)
> 
> 2. the AD itself: a program might open the audio channel, than the AD
> must notice the USD (or BZ?) to ring the headset bell so the user
> notices, or open the SCO channel directly, depending on configuration;
> also we must be able to change volume and stuff.
> 
> those two must be able to communicate in some way. The HS sends AT
> commands that are handled by the USD, but how can the alsa driver i.e.
> request an channel open? Or, from whom (USD or BZ?)

If it is possible to poll the ALSA hwdep in some way this will be
possible, but you must remeber that every kernel releated stuff will
never be profile related. The kernel stuff is about protocol and all
profile specific parts are done in userspace.

> Of course it's not that easy, but concerning the device existing problem
> the device is reported by the alsa driver, and that one does not depend
> on an existing RFCOMM connection or something, so it should be possible
> to load the "snd-bt-sco" alsa module (like it is now) so the program
> thinks that the driver exists. Audio data should be taken from /dev/null
> or something alike to make sure the application does not break when
> trying to access the dummy device.

Every SCO link depend on an existing ACL connection. In case of the
headset and handsfree profiles these means no SCO link without the
RFCOMM connection.

Regards

Marcel




-------------------------------------------------------
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

  reply	other threads:[~2004-08-10 15:01 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
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 [this message]
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=1092150078.4564.178.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=lgw@dark-reality.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