On 02/04/2013 05:06 PM, Tanu Kaskinen wrote:
On Mon, 2013-02-04 at 16:30 +0100, David Henningsson wrote:
On 02/04/2013 04:07 PM, Tanu Kaskinen wrote:
On Mon, 2013-02-04 at 15:50 +0100, David Henningsson wrote:
If A2DP and HSP audio go through different sound cards, we have no
possibility to merge them right now.
Not that I have ever seen such a setup. Can it happen on desktop/laptop
computers you buy in the store, or only on highly specialised embedded
environments (which are likely to have their own UI anyway)?
I have no idea about desktop/laptop machines. I know that 100% of
smartphones that I've worked with (i.e. 3 Nokia models) have used ALSA
for HSP,
...and at the same time BlueZ for A2DP? Or everything through ALSA?
At the same time BlueZ for A2DP.
but I expect there to be phones that use the "normal"
everything-through-BlueZ setup. I don't consider phone UIs any more
specialized than desktop UIs: in both cases, one UI codebase should work
with a wide variety of hardware. I don't think the Ubuntu Phone UI
developers, for example, want to care about the Bluetooth hardware
details.
Okay, so how would PulseAudio autodetect that HSP and A2DP, even though
belonging to different cards, actually are connections to the same
physical headset?
If the phone uses PulseAudio path configuration files for the ALSA
configuration, the Bluetooth port could be flagged with a property. If
the phone uses UCM, I think the UCM configuration should provide the
information, and the port flagged accordingly. If an ALSA port is
flagged that way, I guess alsa-card should not create a routing endpoint
in that case. The endpoint would be created by module-bluetooth-device.
Routing endpoints aside, if it is a technical impossibility / major
inconvenience to have a single port for a single physical entity, one
could have a port property "master-port" which would link the ports
together.
But how is exclusivity handled here? I mean, how would you encode the
fact that A2DP should not be used at the same time as HSP, if they don't
belong to the same card?
I mean, one of the basic properties of two different cards is that they
are independent of each other, if this is not the case, should we
consider merging the bluetooth and ALSA cards instead? (That is just
brainstorming, not an actual proposal)
module-bluetooth-device in turn knows whether to use the ALSA port for
its routing endpoint based on the Routing property of MediaTransport1.
If the routing is "PCM" (as opposed to the normal "HCI"), it should
search for an ALSA port with the magic property, and if found, associate
that port with the new routing endpoint.
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss