1. 26 Apr, 2020 7 commits
  2. 15 Apr, 2020 1 commit
    • pali's avatar
      bluetooth: Implement A2DP codec switching and backchannel support · efef94a8
      pali authored
      Some A2DP codecs (like FastStream or aptX Low Latency) are bi-directional
      and can be used for both music playback and audio calls. This patch
      implements usage of backchannel if A2DP codec provided by pulseaudio API
      supports it.
      A2DP codec switching needs new version of bluez as older version does not
      provide needed org.freedesktop.DBus.ObjectManager and RegisterApplication
      DBus APIs.
      Pulseaudio use for each A2DP codec separate pulseaudio profile, therefore
      codec switching is implemented via changing pulseaudio profile and
      currently used A2DP codec is visible in pulseaudio profile.
      Getting list of supported codecs by remote device is supported only by new
      version of bluez daemon.
      If old bluez version is detected then only one SBC codec is supported.
  3. 02 Jul, 2019 1 commit
    • Frédéric Danis's avatar
      bluetooth: Fix crash when disabling Bluetooth adapter · f89d64b9
      Frédéric Danis authored
      This crash occurs when PA is connected to a phone through the oFono
      When disabling the Bluetooth adapter, pa_bluetooth_device is removed before
      hf_audio_card. Both keep refs on pa_bluetooth_transport. Those removal will
      call pa_bluetooth_transport_free() from device_free() (bluez5-util.c) and
      hf_audio_card_free() (backend-ofono.c).
      In the end, the call to pa_bluetooth_transport_free() calls
      pa_hasmap_remove() through pa_bluetooth_transport_unlink(), but since
      memory has already been freed, the second try results in a segfault.
      Triggering hf_audio_card removal during pa_bluetooth_device removal allows
      hf_audio_card to be freed at the right time.
  4. 12 Apr, 2019 1 commit
    • pali's avatar
      bluetooth: Modular API for A2DP codecs · 106aa914
      pali authored
      This patch introduce new modular API for bluetooth A2DP codecs. Its
      benefits are:
      * bluez5-util and module-bluez5-device does not contain any codec specific
        code, they are codec independent.
      * For adding new A2DP codec it is needed just to adjust one table in
        a2dp-codec-util.c file. All codec specific functions are in separate
        codec file.
      * Support for backchannel (microphone voice). Some A2DP codecs (like
        FastStream or aptX Low Latency) are bi-directional and can be used for
        both music playback and audio call.
      * Support for more configurations per codec. This allows to implement low
        quality mode of some codec together with high quality.
      Current SBC codec implementation was moved from bluez5-util and
      module-bluez5-device to its own file and converted to this new A2DP API.
  5. 05 Sep, 2017 1 commit
  6. 11 Mar, 2017 1 commit
    • Georg Chini's avatar
      bluetooth: use native and ofono backends in parallel with headset=auto · adc2e8cd
      Georg Chini authored
      This patch changes the behavior of the headset=auto switch for module-bluez5-discover.
      With headset=auto now both backends will be active at the same time for the AG role and
      the switching between the backends is only done for the HS role.
      headset=ofono and headset=native remain unchanged.
      This allows to use old HSP only headsets while running ofono and to have headset support
      via pulseaudio if ofono is started with the --noplugin=hfp_ag_bluez5 option.
  7. 14 Feb, 2017 1 commit
    • Georg Chini's avatar
      bluetooth: Make use of getsockopt() to determine MTU configurable · 1c80af14
      Georg Chini authored
      A recent patch changed the MTU size from the default value of 48 to the value
      returned by getsockopt(). This breaks HSP for some setups. To circumvent the
      problem, this patch introduces a boolean parameter "autodetect_mtu" for
      module-bluetooth-discover, module-bluez5-discover and module-bluez5-device to
      make this use of getsockopt() configurable.
  8. 10 Aug, 2016 2 commits
    • Tanu Kaskinen's avatar
      bluetooth: unify BlueZ 4 and BlueZ 5 UUID handling · 52a9ee61
      Tanu Kaskinen authored
      A hashmap is more convenient than a linked list for storing the UUIDs,
      so change the BlueZ 4 code accordingly.
      Rename the BlueZ 4 UUID constants to match the BlueZ 5 naming.
      The only changes to the BlueZ 5 code are the addition of one comment
      and making another comment a bit clearer.
    • Tanu Kaskinen's avatar
      bluetooth: wait for all profiles to connect before creating card · d9b885e0
      Tanu Kaskinen authored
      The CONNECTION_CHANGED hook is used to notify the discovery module
      about new and removed devices. When a bluetooth device connects, the
      hook used to be called immediately when the first profile connected.
      That meant that only one profile was marked as available during the
      card creation, other profiles would get marked as available later.
      That makes it hard for module-card-restore to restore the saved
      profile, if the saved profile becomes available with some delay.
      module-card-restore has a workaround for this problem, but that turned
      out to interfere with module-bluetooth-policy, so the workaround will
      be removed in the next patch.
      The BlueZ 4 code doesn't need changes, because we use the
      org.bluez.Audio interface to get a notification when all profiles are
  9. 14 Jan, 2015 1 commit
  10. 14 Nov, 2014 3 commits
  11. 31 Oct, 2014 2 commits
    • Wim Taymans's avatar
      backend-native: implement volume control · 34a5c754
      Wim Taymans authored
      Parse the gain changed AT commands from the headset and fire 2 new
      hooks as a result. The device will connect to those hooks and change the
      source/sink volumes.
      When the source/sink volume changes, set the gain on the microphone or
      speaker respectively. Make sure we do nothing if the transport can not
      handle the gain changes.
    • Wim Taymans's avatar
      bluez5-util: add destroy function · d7199baf
      Wim Taymans authored
      Add a destroy function to the transport that is called before freeing
      the transport. Useful for cleaning up extra userdata.
  12. 10 Sep, 2014 1 commit
  13. 08 Sep, 2014 2 commits
  14. 22 Aug, 2014 2 commits
  15. 06 Jun, 2014 2 commits
    • Tanu Kaskinen's avatar
      bluetooth: Refactor device validity management · de0d803e
      Tanu Kaskinen authored
      There are several intertwined changes that I couldn't separate into
      nicer commits. This is mostly just refactoring, but this also fixes
      a bug: the old code set the device valid in parse_device_properties()
      even if the device's adapter was invalid (had NULL address).
      To improve the clarity of the code, I split the device_info_valid
      variable into two booleans: properties_received and valid.
      I added function device_update_valid() that checks all conditions that
      affect the device validity. The function can then be called from any
      place where something changes that potentially affects the device
      validity. However, currently the only validity-affecting thing that
      can change is the device adapter, so device_update_valid() is only
      called from set_device_adapter().
      I added the aforementioned set_device_adapter() function so that
      whenever the adapter is set, the device validity gets updated
      The new properties_received variable allowed me to remove the
      is_property_update function parameters.
    • Tanu Kaskinen's avatar
      bluetooth: Add "valid" flag to pa_bluetooth_adapter · a61d065d
      Tanu Kaskinen authored
      This is a cosmetic change. There are a couple of places where we check
      whether the adapter object is valid, and while checking whether the
      address property is set works just fine, I find it nicer to have a
      dedicated flag for the object validity. This improves maintainability
      too, because if there will ever be more adapter properties that affect
      the adapter validity, the places that check if the adapter is valid
      don't need to be updated.
  16. 29 Sep, 2013 8 commits
  17. 03 Mar, 2009 1 commit
  18. 18 Jun, 2008 1 commit
  19. 13 Feb, 2007 1 commit
  20. 04 Jan, 2007 1 commit