public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] spec: Update alsa namespace to include virtual device
@ 2007-08-23 16:22 Marc-André Lureau
  2007-08-23 17:06 ` [Bluez-devel] " Matthias Kretz
  2007-08-27 14:11 ` Lennart Poettering
  0 siblings, 2 replies; 11+ messages in thread
From: Marc-André Lureau @ 2007-08-23 16:22 UTC (permalink / raw)
  To: hal, BlueZ development, Takashi Iwai, Lennart Poettering

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

Hi

Thanks to the great work of Bluez-guys, bluez-utils audio service is
now able to deal with several audio devices. Those Bluetooth devices
are accessed by a "bluetooth" ALSA plugin (see
http://wiki.bluez.org/wiki/HOWTO/AudioDevices)

There is only a few missing pieces to make those devices discoverable with HAL.

The following patch changes the "alsa" namespace so that "virtual
devices" can also be described (a former approach was to use
alsa.virtual or alsa_virtual new namespace, but alsa.virtual does not
inherit alsa property, and both namespaces have a lot in common).

Thus, a  mandatory property "is_hardware" is introduced. If this value
is true, the current mandatory keys remain mandatory. If not, then the
client should use "device_name" to "open" the device.

Arguable:
- should "device_name" be optional? (currently, application hard-code
the prefix "hw")
- "service" is used to make a difference between a2dp and hfp/hsp
- "device_name", and "service" key naming

Cheers,
-- 
Marc-André Lureau

[-- Attachment #2: 0001-spec-Update-alsa-namespace-to-include-virtual-devic.patch --]
[-- Type: text/x-diff, Size: 5086 bytes --]

From 229891a1a31882575a7c3d625801ffebad7fa5bd Mon Sep 17 00:00:00 2001
From: Marc-Andre Lureau (elmarco) <marcandre.lureau@gmail.com>
Date: Thu, 23 Aug 2007 19:21:04 +0300
Subject: [PATCH] spec: Update alsa namespace to include virtual device

---
 doc/spec/hal-spec-properties.xml |   45 ++++++++++++++++++++++++++++++++------
 1 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/doc/spec/hal-spec-properties.xml b/doc/spec/hal-spec-properties.xml
index 94bc171..0a65d5d 100644
--- a/doc/spec/hal-spec-properties.xml
+++ b/doc/spec/hal-spec-properties.xml
@@ -5007,7 +5007,7 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
       </title>
       <para>
         Device objects with the capability <literal>alsa</literal>
-        represent all the streams available through ALSA on a soundcard.
+        represent all the audio devices available through ALSA. Those could be hardware or software "virtual devices".
       </para>
       <informaltable>
         <tgroup cols="2">
@@ -5025,7 +5025,7 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
                 <literal>alsa.card</literal> (int)
               </entry>
               <entry></entry>
-              <entry>Yes</entry>
+              <entry>If <literal>alsa.is_hardware</literal> is set to TRUE</entry>
               <entry>
                 Card number in system as registered by ALSA.
               </entry>
@@ -5037,7 +5037,7 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
               <entry>
                 Examples: <literal>I82801DBICH4</literal>, <literal>MP3</literal>
               </entry>
-              <entry>No</entry>
+              <entry>If <literal>alsa.is_hardware</literal> is set to TRUE</entry>
               <entry>
                 Textual description of the card.
               </entry>
@@ -5047,7 +5047,7 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
                 <literal>alsa.device</literal> (int)
               </entry>
               <entry></entry>
-              <entry>Yes</entry>
+              <entry>If <literal>alsa.is_hardware</literal> is set to TRUE</entry>
               <entry>
                 Device number assigned by ALSA for a current card.
               </entry>
@@ -5057,13 +5057,24 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
                 <literal>alsa.device_file</literal> (string)
               </entry>
               <entry></entry>
-              <entry>Yes</entry>
+              <entry>If <literal>alsa.is_hardware</literal> is set to TRUE</entry>
               <entry>
                 The device node to access the ALSA device.
               </entry>
             </row>
             <row>
               <entry>
+                <literal>alsa.device_name</literal> (string)
+              </entry>
+	      <entry>Examples: <literal>plug:"hw:0,1"</literal>, <literal>bluetooth:00:19:4F:DB:04:40,hifi</literal>
+	      </entry>
+	      <entry>Yes</entry>
+              <entry>
+                The device name to access the ALSA device. 
+              </entry>
+            </row>
+            <row>
+              <entry>
                 <literal>alsa.device_id</literal> (string)
               </entry>
               <entry>
@@ -5071,7 +5082,7 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
               </entry>
               <entry>No</entry>
               <entry>
-                Textual description of the specific device for a card
+                Textual description of the specific device for a card, or virtual device
               </entry>
             </row>
             <row>
@@ -5139,13 +5150,33 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
                 <literal>alsa.originating_device</literal> (string)
               </entry>
               <entry></entry>
-              <entry>Yes</entry>
+              <entry>If <literal>alsa.is_hardware</literal> is set to TRUE</entry>
               <entry>
                 UDI of the device the ALSA device is bound to.
               </entry>
             </row>
             <row>
               <entry>
+                <literal>alsa.is_hardware</literal> (bool)
+              </entry>
+              <entry></entry>
+              <entry>Yes</entry>
+              <entry>
+                TRUE if it is an hardware device. FALSE if it is a "virtual device".
+              </entry>
+            </row>
+            <row>
+              <entry>
+                <literal>alsa.service</literal> (string)
+              </entry>
+              <entry>example: <literal>Hifi</literal>, <literal>Voice</literal></entry>
+              <entry>No</entry>
+              <entry>
+		Hint of use case of this device.
+              </entry>
+            </row>
+            <row>
+              <entry>
                 <literal>alsa.type</literal> (string)
               </entry>
               <entry></entry>
-- 
1.5.2.3


[-- Attachment #3: Type: text/plain, Size: 141 bytes --]

_______________________________________________
hal mailing list
hal@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal

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

end of thread, other threads:[~2007-08-27 15:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-23 16:22 [patch] spec: Update alsa namespace to include virtual device Marc-André Lureau
2007-08-23 17:06 ` [Bluez-devel] " Matthias Kretz
2007-08-23 18:20   ` Marcel Holtmann
2007-08-23 18:56     ` Matthias Kretz
2007-08-23 19:27       ` Marcel Holtmann
2007-08-27 14:11 ` Lennart Poettering
2007-08-27 14:34   ` Marcel Holtmann
2007-08-27 14:47     ` Lennart Poettering
2007-08-27 15:09       ` Marcel Holtmann
2007-08-27 15:15         ` Lennart Poettering
2007-08-27 15:24           ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox