[pulseaudio-discuss] [RFC v0 0/5] Add card profile availability

Mikel Astiz mikel.astiz.oss at gmail.com
Wed Feb 13 05:48:11 PST 2013


From: Mikel Astiz <mikel.astiz at bmw-carit.de>

It has been recently discussed how ports should be used in the Bluetooth card module, whether they should be merged or not, and how the bluetooth-related information is exposed to both external components (i.e. UI) and internal policy modules.

In a nutshell, the problem is as follows: the internal policies are interested in profile-specific information (HSP/HFP vs A2DP) while the ports should ideally be associated to physical entities (and the Bluetooth profile should make no difference).

A natural way to solve this problem is by adding a new flag to the card profiles, representing the availability of each profile. This is similar to port-availability but with different semantics, representing the state of each invidivual Bluetooth profile.

This patchset extends the core with such a flag, which sounds useful even beyond the scope of this specific problem (a UI could use this information to gray out profiles).

If the core adopted such a flag, the merge of the Bluetooth ports would be straightforward, as implemented in patch v0 5/5.

Mikel Astiz (5):
  card: Add card profile availability
  cli: Show card profile availability status
  bluetooth: Expose card profile availability
  bluetooth: Use profile availability to auto-switch profiles
  bluetooth: Merge all ports into "bluetooth-input" and
    "bluetooth-output"

 src/modules/bluetooth/module-bluetooth-device.c | 306 ++++++------------------
 src/modules/bluetooth/module-bluetooth-policy.c |  98 ++++----
 src/pulse/def.h                                 |  14 ++
 src/pulsecore/card.c                            |  20 ++
 src/pulsecore/card.h                            |   4 +
 src/pulsecore/cli-text.c                        |  16 +-
 src/pulsecore/core.h                            |   1 +
 7 files changed, 175 insertions(+), 284 deletions(-)

-- 
1.8.1



More information about the pulseaudio-discuss mailing list