From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Cc: Takashi Iwai <tiwai@suse.de>,
Lennart Poettering <mztfg@0pointer.de>,
hal@lists.freedesktop.org
Subject: Re: [Bluez-devel] [patch] spec: Update alsa namespace to include virtual device
Date: Thu, 23 Aug 2007 20:20:05 +0200 [thread overview]
Message-ID: <1187893205.15402.75.camel@violet> (raw)
In-Reply-To: <200708231906.50942.kretz@kde.org>
Hi Matthias,
> I don't agree with this approach, i.e. the listing of virtual ALSA devices
> through HAL, especially the forcing of the device_name. The application might
> be smarter than HAL, once it knows enough about the hardware. For example the
> hw: devices in many cases are not what you want...
>
> Since libasound 1.0.14 we have snd_device_name_hint available to list virtual
> devices (they get listed once you add a hint section in your .asoundrc file).
> What we're missing is a way to link virtual devices to hardware, meaning if
> Hardware "xy" becomes available virtual device "foo" starts to be useful
> (only "polling" works from what I know).
>
> So what I'd like to see is something along the lines of:
> - HAL notifies me that a Bluetooth device with audio support became available.
> - With the id I get from HAL I can query libasound which virtual devices are
> using this device, or if that's not possible iterate over all virtual devices
> that didn't work before and try to open them and see whether they work now.
>
> You made the example "bluetooth:00:19:4F:DB:04:40,hifi" in the patch. Is it
> possible to always access ALSA bluetooth devices that way? Then perhaps the
> HAL entry on the bluetooth device should list give me the necessary hints to
> construct that string myself?
when it comes to Bluetooth and other virtual devices with no real
hardware as backend the world changes a bit. You really do have to
change your way of thinking here since ALSA isn't the central place of
information anymore. Actually ALSA has no clue whatsoever.
The Bluetooth audio support is designed around a central audio daemon
that takes care of mono headsets and high quality stereo headsets. This
daemon does all needed protocol handling and can be controlled via
D-Bus. Without this daemon you don't get any sound at all. This daemon
however handles only the control part of the audio protocol. All the
real audio data encoding and decoding is done in a plugin. Besides the
currently existing ALSA plugin, we have plans for GStreamer and
PulseAudio plugins.
In case of the ALSA plugin you can use it to connect to the default
headset or using a specific remote device address. This all works in the
background and yes, if you get the hint listing right it would show up
in applications that can list virtual devices. However the .asoundrc is
user specific and not touched by the audio daemon. The daemon is a
system process that can handle multiple headsets at one time which could
be used by different users on the same system.
So for the audio daemon, we don't know anything about the user and its
settings and we actually don't care at all. We know that we have a
configured device that can be used via the ALSA plugin with this
specific Bluetooth address. That is what we know and that is what we
will give to HAL. What the user does with this information is fully up
to the user and not the daemons responsibility.
This means whatever kind of hint system you have or don't have, it
doesn't give us any advantage. Please remember that virtual sounds cards
are totally dynamic. They come and go as they like. The daemon is fully
integrated into the Bluetooth authorization framework and for example a
headset can decide to connect back to your machine when you press its
button and it becomes available and usable at exactly that point.
The .asoundrc is to static for this. The only unique identifier that can
be used to identify a Bluetooth headset is its address. The profile to
use (mono or stereo) can be a second parameter, but the daemon can
determine the best profile to use by itself.
Regards
Marcel
_______________________________________________
hal mailing list
hal@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
next prev parent reply other threads:[~2007-08-23 18:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=1187893205.15402.75.camel@violet \
--to=marcel@holtmann.org \
--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