public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: hal@lists.freedesktop.org,
	"BlueZ development" <bluez-devel@lists.sourceforge.net>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Lennart Poettering" <mztfg@0pointer.de>
Subject: [patch] spec: Update alsa namespace to include virtual device
Date: Thu, 23 Aug 2007 19:22:17 +0300	[thread overview]
Message-ID: <e29894ca0708230922n69a68aedqfb979c67042a965f@mail.gmail.com> (raw)

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

             reply	other threads:[~2007-08-23 16:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23 16:22 Marc-André Lureau [this message]
2007-08-23 17:06 ` [Bluez-devel] [patch] spec: Update alsa namespace to include virtual device 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

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=e29894ca0708230922n69a68aedqfb979c67042a965f@mail.gmail.com \
    --to=marcandre.lureau@gmail.com \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=hal@lists.freedesktop.org \
    --cc=mztfg@0pointer.de \
    --cc=tiwai@suse.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