All of lore.kernel.org
 help / color / mirror / Atom feed
* Hardware interface constant for Bluetooth
@ 2004-11-08  1:24 Marcel Holtmann
  2004-11-08 10:54 ` Jaroslav Kysela
  0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2004-11-08  1:24 UTC (permalink / raw)
  To: alsa-devel

Hi guys,

I like to drive the Bluetooth audio support a little bit and it would be
great if you can add a hardware interface constant for us. I don't know
what is the correct procedure to do it, but from my first analysis it
seems that it is enough to add a patch like the one below to the kernel
code and the library code. Everything else can be developed outside the
ALSA core.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

===== include/sound/asound.h 1.30 vs edited =====
--- 1.30/include/sound/asound.h 2004-09-03 11:08:15 +02:00
+++ edited/include/sound/asound.h       2004-11-08 02:12:44 +01:00
@@ -110,9 +110,10 @@
        SNDRV_HWDEP_IFACE_MIXART,       /* Digigram miXart cards */
        SNDRV_HWDEP_IFACE_USX2Y,        /* Tascam US122, US224 & US428 usb */
        SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */
+       SNDRV_HWDEP_IFACE_BLUETOOTH,    /* Bluetooth audio */
 
        /* Don't forget to change the following: */
-       SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_EMUX_WAVETABLE,
+       SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_BLUETOOTH,
 };
 
 struct sndrv_hwdep_info {

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hardware interface constant for Bluetooth
  2004-11-08  1:24 Hardware interface constant for Bluetooth Marcel Holtmann
@ 2004-11-08 10:54 ` Jaroslav Kysela
  2004-11-08 12:03   ` Marcel Holtmann
  0 siblings, 1 reply; 7+ messages in thread
From: Jaroslav Kysela @ 2004-11-08 10:54 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: alsa-devel

On Mon, 8 Nov 2004, Marcel Holtmann wrote:

> Hi guys,
> 
> I like to drive the Bluetooth audio support a little bit and it would be
> great if you can add a hardware interface constant for us. I don't know
> what is the correct procedure to do it, but from my first analysis it
> seems that it is enough to add a patch like the one below to the kernel
> code and the library code. Everything else can be developed outside the
> ALSA core.
> 
> +       SNDRV_HWDEP_IFACE_BLUETOOTH,    /* Bluetooth audio */

Do you need really this change? This identifier is only used for hardware 
independent API (hwdep) - mostly for firmware / DSP code handling and 
other things which don't fall into abstract APIs.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hardware interface constant for Bluetooth
  2004-11-08 10:54 ` Jaroslav Kysela
@ 2004-11-08 12:03   ` Marcel Holtmann
  2004-11-08 12:18     ` Jaroslav Kysela
  0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2004-11-08 12:03 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel

Hi Jaroslav,

> > I like to drive the Bluetooth audio support a little bit and it would be
> > great if you can add a hardware interface constant for us. I don't know
> > what is the correct procedure to do it, but from my first analysis it
> > seems that it is enough to add a patch like the one below to the kernel
> > code and the library code. Everything else can be developed outside the
> > ALSA core.
> > 
> > +       SNDRV_HWDEP_IFACE_BLUETOOTH,    /* Bluetooth audio */
> 
> Do you need really this change? This identifier is only used for hardware 
> independent API (hwdep) - mostly for firmware / DSP code handling and 
> other things which don't fall into abstract APIs.

this is a little bit tricky. Besides the native support for transporting
PCM data over a Bluetooth SCO channel, the headset/handsfree profile
uses a RFCOMM channel (serial port emulation) for additional settings.
On this channel they use AT commands and actually I don't wanna put a AT
parser into the kernel. It is in somekind possible, but I still think
that it does not belong there, because it is profile specific and a
Bluetooth profile is an application and applications should run in user
space. On the other hand you still need to create that SCO channel from
user space with somekind of ioctl, because the kernel can't know when
this channel must be established. It depends on some AT commands that
are send over the RFCOMM channel.

So my plan is to write a kernel module that is reponsible for the SCO
audio traffic. This registers as a soundcard with the ALSA subsystem and
it also registers a Bluetooth HWDEP. There is no initial PCM device
registered with this soundcard. These are only added when a SCO channel
is opened from the peer side or requested through an ioctl on the HWDEP
interface. Besides this the HWDEP would also control the mixer settings,
because these are exchanged over the RFCOMM channel.

Do you think this makes sense?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hardware interface constant for Bluetooth
  2004-11-08 12:03   ` Marcel Holtmann
@ 2004-11-08 12:18     ` Jaroslav Kysela
  2004-11-08 12:28       ` Marcel Holtmann
  2004-11-09 12:16       ` Marcel Holtmann
  0 siblings, 2 replies; 7+ messages in thread
From: Jaroslav Kysela @ 2004-11-08 12:18 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: alsa-devel

On Mon, 8 Nov 2004, Marcel Holtmann wrote:

> this is a little bit tricky. Besides the native support for transporting
> PCM data over a Bluetooth SCO channel, the headset/handsfree profile
> uses a RFCOMM channel (serial port emulation) for additional settings.
> On this channel they use AT commands and actually I don't wanna put a AT
> parser into the kernel. It is in somekind possible, but I still think
> that it does not belong there, because it is profile specific and a
> Bluetooth profile is an application and applications should run in user
> space. On the other hand you still need to create that SCO channel from
> user space with somekind of ioctl, because the kernel can't know when
> this channel must be established. It depends on some AT commands that
> are send over the RFCOMM channel.
> 
> So my plan is to write a kernel module that is reponsible for the SCO
> audio traffic. This registers as a soundcard with the ALSA subsystem and
> it also registers a Bluetooth HWDEP. There is no initial PCM device
> registered with this soundcard. These are only added when a SCO channel
> is opened from the peer side or requested through an ioctl on the HWDEP
> interface. Besides this the HWDEP would also control the mixer settings,
> because these are exchanged over the RFCOMM channel.
> 
> Do you think this makes sense?

Yep, the management of PCM devices belongs into the hwdep API - except the
mixer controls. You should map the possible mixer and other controls using
the universal control API.

The SNDRV_HWDEP_IFACE_BLUETOOTH definition was added to the ALSA CVS tree.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hardware interface constant for Bluetooth
  2004-11-08 12:18     ` Jaroslav Kysela
@ 2004-11-08 12:28       ` Marcel Holtmann
  2004-11-09 12:16       ` Marcel Holtmann
  1 sibling, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2004-11-08 12:28 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel

Hi Jaroslav,

> > this is a little bit tricky. Besides the native support for transporting
> > PCM data over a Bluetooth SCO channel, the headset/handsfree profile
> > uses a RFCOMM channel (serial port emulation) for additional settings.
> > On this channel they use AT commands and actually I don't wanna put a AT
> > parser into the kernel. It is in somekind possible, but I still think
> > that it does not belong there, because it is profile specific and a
> > Bluetooth profile is an application and applications should run in user
> > space. On the other hand you still need to create that SCO channel from
> > user space with somekind of ioctl, because the kernel can't know when
> > this channel must be established. It depends on some AT commands that
> > are send over the RFCOMM channel.
> > 
> > So my plan is to write a kernel module that is reponsible for the SCO
> > audio traffic. This registers as a soundcard with the ALSA subsystem and
> > it also registers a Bluetooth HWDEP. There is no initial PCM device
> > registered with this soundcard. These are only added when a SCO channel
> > is opened from the peer side or requested through an ioctl on the HWDEP
> > interface. Besides this the HWDEP would also control the mixer settings,
> > because these are exchanged over the RFCOMM channel.
> > 
> > Do you think this makes sense?
> 
> Yep, the management of PCM devices belongs into the hwdep API - except the
> mixer controls. You should map the possible mixer and other controls using
> the universal control API.
> 
> The SNDRV_HWDEP_IFACE_BLUETOOTH definition was added to the ALSA CVS tree.

I will look at the universal control API when the basics of the PCM
handling are done. Thanks.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hardware interface constant for Bluetooth
  2004-11-08 12:18     ` Jaroslav Kysela
  2004-11-08 12:28       ` Marcel Holtmann
@ 2004-11-09 12:16       ` Marcel Holtmann
  2004-11-09 13:10         ` Jaroslav Kysela
  1 sibling, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2004-11-09 12:16 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel

Hi Jaroslav,

> The SNDRV_HWDEP_IFACE_BLUETOOTH definition was added to the ALSA CVS tree.

I checked the CVS HEAD version of the ALSA library and I think it must
be added there too. Is this correct or is there another way you keep
these in sync between the kernel and the userspace? Looking at the file
"include/hwdep.h", I realized that the previous entry for the "EmuX
wavetable" is also missing.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hardware interface constant for Bluetooth
  2004-11-09 12:16       ` Marcel Holtmann
@ 2004-11-09 13:10         ` Jaroslav Kysela
  0 siblings, 0 replies; 7+ messages in thread
From: Jaroslav Kysela @ 2004-11-09 13:10 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: alsa-devel

On Tue, 9 Nov 2004, Marcel Holtmann wrote:

> Hi Jaroslav,
> 
> > The SNDRV_HWDEP_IFACE_BLUETOOTH definition was added to the ALSA CVS tree.
> 
> I checked the CVS HEAD version of the ALSA library and I think it must
> be added there too. Is this correct or is there another way you keep
> these in sync between the kernel and the userspace? Looking at the file
> "include/hwdep.h", I realized that the previous entry for the "EmuX
> wavetable" is also missing.

Thanks. Fixed now.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-11-09 13:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-08  1:24 Hardware interface constant for Bluetooth Marcel Holtmann
2004-11-08 10:54 ` Jaroslav Kysela
2004-11-08 12:03   ` Marcel Holtmann
2004-11-08 12:18     ` Jaroslav Kysela
2004-11-08 12:28       ` Marcel Holtmann
2004-11-09 12:16       ` Marcel Holtmann
2004-11-09 13:10         ` Jaroslav Kysela

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.