Re: [Bluez-devel] [patch] spec: Update alsa namespace to include virtual device
From: Matthias Kretz <hidden>
Date: 2007-08-23 17:06:46
On Thursday 23 August 2007, Marc-André Lureau wrote:
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
Hi, 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? Anyway, great to hear that bluetooth ALSA support is progressing! I'm really looking forward to supporting it (now all I need is bluetooth devices...) -- ________________________________________________________ Matthias Kretz (Germany) <>< http://Vir.homelinux.org/ MatthiasKretz@gmx.net, kretz@kde.org, Matthias.Kretz@urz.uni-heidelberg.de