Skip to content
Snippets Groups Projects
  1. Apr 17, 2018
    • Pavlin Radoslavov's avatar
      Fix a memory leak when disabling AVDTP · a70403d7
      Pavlin Radoslavov authored
      Added new function bta_av_free_scb() to explicitly
      free tBTA_AV_SCB struct.
      
      Bug: 78034873
      Test: Code compilation
      Change-Id: Ic738c64f61fd273bc2988fa98cb7cedebf1c4b76
      a70403d7
    • Jakub Pawlowski's avatar
      New GATT cache storage format · f719457e
      Jakub Pawlowski authored
      We will need characteristic definition handle, and handle of end of
      included service in the future. Store it properly.
      
      Bug: 67056747
      Test: GattCacheTest.nv_attr_to_binary_test
      Change-Id: I170e1a39d3c055efddd91639f756d74eb4ecc304
      f719457e
    • Pavlin Radoslavov's avatar
      Include only the Basic Capability for AVDTP GetCapabilities response · 94c2ceb9
      Pavlin Radoslavov authored
      AVDTP GetCapabilities request should return only the Basic
      Capabilities, as defined in the AVDTP 1.3 spec.
      Otherwise, returning a capability such as Delay Reporting would
      result in some remote devices droping the AVDTP connection
      
      Also:
       * Print SEP protocol service capabilities per Stream Control
         Block when dumping the state to a bugreport
       * Add extra log messages
      
      Bug: 77668253
      Test: Manual: connect with Momentum M2 Headset and examine the
            AVDTP GetCapabilities response.
      
      Change-Id: I34f2e8ff586115a38c3436b2b6300514f65346a9
      94c2ceb9
    • Pavlin Radoslavov's avatar
      Handle properly AVDTP SetConfig from the A2DP Sink device · e86055ad
      Pavlin Radoslavov authored
      If the remote device is proactive and sends AVDTP SetConfig after
      re-connection before the local device gets the chance to do it, the
      internal codec setup state might be inconsistent.
      
      * Fix the internal logic when the local device is Acceptor inside
        file bta_av_co.cc, and simplify some of the code.
      * Fix the handling of p_scb->sep_info_idx inside bta_av_save_caps()
        when receiving capabilities from the remote device.
      * Add new A2dpCodecConfig::setPeerCodecCapabilities() method that is
        implemented by each codec.
      
      Bug: 77525584
      Test: Manual - initiate connection by Momentum 2.0 Wireless Headset.
            Connect/disconnect/reconnect multiple headsets.
      
      Change-Id: I456df7c8a2fa0758c0908a4628c4dfae3259dbdb
      e86055ad
    • Jakub Pawlowski's avatar
      GATT: make last service end group handle equal to 0xFFFF · 82eb6b35
      Jakub Pawlowski authored
      ESR06 (errata 4065) added sentence:
      "The End Group Handle of the last service in a device can be 0xFFFF."
      It talks about last service, not last primary service. Right now,
      secondary service added after last primary service will result in in
      last primary service being corrupted - descriptor added to last
      characteristic, and some characteristics added.
      
      Bug: 78107486
      Change-Id: I6a146fce2c946cdff176ff79f147830e29d3b807
      82eb6b35
  2. Apr 16, 2018
  3. Apr 13, 2018
    • Ajay Panicker's avatar
      AVRCP: Inform upper layer if absolute volume isn't supported · 3a69b38e
      Ajay Panicker authored
      Before, the upper layers would be informed when a device connected that
      supported absolute volume. Now even devices that don't support absolute
      volume get reported.
      
      Bug: 33962015
      Test: Run host native test net-test-avrcp
      Change-Id: If083ccbb9ba9a170c5bca359e632585d826c6fa5
      3a69b38e
  4. Apr 12, 2018
  5. Apr 11, 2018
    • Stanley Tng's avatar
      Pass new LE CoC min_ce/max_ce parameters to native stack · f61988fe
      Stanley Tng authored
      Add new test connection event (ce) parameters, min_ce and max_ce, to
      the SL4A tests for LE Connection-oriented Channel (CoC) feature.
      
      Test: Run cmd: act.py -c $MY_SL4A_CONFIG -tc BleCoc2ConnTest
      Bug: 77528723
      
      Change-Id: Ifea040f0eb105f89539e6b74f5c2edc76147a065
      f61988fe
    • Joseph Pirozzo's avatar
      AVRCP controller browsing deep copy and get folder range · 42522c24
      Joseph Pirozzo authored
      AVRCP browsing was unstable on the sink side due to bytes
      being used instead of integers for get_folder_items_cmd
      and a lack of deep copy in the data buffers.  This patch
      allows both browse and vendor commands to work correctly.
      
      Bug: 72496280
      Test: stream music and browse at the same time.
      Change-Id: Id4d34101c918947450923b68e087e6851ce99130
      42522c24
    • Jack He's avatar
      Metrics: Add metrics item for profile usage · 7ebb85a9
      Jack He authored
      Item A: Add messages to log profile connections
      * Add ProfileUsageStats message in bluetooth.proto
      * Add BluetoothProfileId enum to represent each profile
      * Add num_times_connected item to log how many times a profile is
        connected
      
      Item B: Add messages to log headset profile connections for HSP and HFP
      * Add HeadsetProfileConnectionStats message in bluetooth.proto
      * Add HeadsetProfileType enum to represent each headset profile type
      * Add num_times_connected item to log how many times each headset
        profile is connected
      
      * Add unit tests in metrics_tests
      * Remove "clear" flag in various metrics dumping methods to make sure
        that we clean up metrics every time we dump
      
      Bug: 77476285
      Test: make, net_test_osi, BtFunhausMetricsTest,
            adb shell dumpsys bluetooth_manager --proto-bin
      Change-Id: Ib18948c50ddb98ab7472f7b51a9bb98d153071c7
      Merged-In: Ib18948c50ddb98ab7472f7b51a9bb98d153071c7
      7ebb85a9
    • Jack He's avatar
      DM: Add error logs for failed discovery attempt · 42c66b40
      Jack He authored
      Bug: 72817086
      Test: make, no functional change
      Change-Id: I0df4efa62de00956eea1b5b5d244f4821bcaf6fc
      42c66b40
    • Ajay Panicker's avatar
      Call AVRC_close when an AVRCP connection is closed · 21aacc80
      Ajay Panicker authored
      AVRC_Close needs to be called whenever a connection is closed otherwise
      the AVCT control block is never cleaned up.
      
      Bug: 77633048
      Test: Run host native test net_test_avrcp and connect/disconnect from a
      device multiple times.
      
      Change-Id: Ia6a1b2606a87803316aad41ae27db858bf922548
      21aacc80
  6. Apr 10, 2018
    • Pavlin Radoslavov's avatar
      Improve A2DP codec run-time debug-abilitity · 0ffadf70
      Pavlin Radoslavov authored
      Rename A2DP_DumpCodecInfo() to A2DP_CodecInfoString() and change
      the usage. Previously, A2DP_DumpCodecInfo() would print the
      the codec information only if LOG_VERBOSE() was enabled in compile time.
      The new A2DP_CodecInfoString() now returns human-readable std::string
      with the codec information.
      That string can be used in debug log messages that can be enabled
      in run-time.
      
      Bug: 77525584
      Test: Manual - Examine log messages when A2DP streaming with and
            without debug log messages enabled.
      
      Change-Id: Idd440d6c9e908520132feeeb5388d3e6aefa26db
      0ffadf70
    • Ajay Panicker's avatar
      Set default AVRCP version to 1.4 · cf3b1710
      Ajay Panicker authored
      Bug: 77874113
      Test: Check snoop logs to see that the broadcasted AVRCP version is 1.4
      Change-Id: If36bccc58d04dffe46286ee8d18785b680b9de8a
      cf3b1710
  7. Apr 09, 2018
  8. Apr 06, 2018
  9. Apr 05, 2018
  10. Apr 04, 2018
  11. Apr 03, 2018
  12. Apr 02, 2018
  13. Mar 30, 2018
    • Jack He's avatar
      RFCOMM: Add more logging on failure cases · 0f5a1da4
      Jack He authored
      * Log every instance of RFCOMM unexpected disconnection
      * Log every time when RFCOMM channel (DLCI) is changed
      * Refactor some RFCOMM code to be more readable and easier for logging
      * Remove excessive logging in power manager
      * Assign HSP default version more appropriate location
      * Replace some usage of NULL with nullptr
      
      Bug: 77224743
      Test: make, no functional changes
      Change-Id: I5e62dd6d338f7e92a8b8d39c1fe155b71396034c
      0f5a1da4
    • Pavlin Radoslavov's avatar
      Reduce the number of PCM data reads for aptX and aptX HD · fbfffe53
      Pavlin Radoslavov authored
      For every periodic aptX / aptX HD data packet, use a single read
      operation for all PCM data that needs to be encoded, instead of
      using multiple reads of smaller blocks of data.
      
      Bug: 70899260
      Test: Manual: stream to aptX/aptX HD headset, change the sample rate
      Change-Id: Ifcb8302589f24f5d7ab89c645c50d6905197fb7f
      fbfffe53
  14. Mar 29, 2018
    • Hansong Zhang's avatar
      Hearing Aid: change get/set active device (1/3) · 65589121
      Hansong Zhang authored
      * setActiveDevice() returns false in error case, e.g. when the device is
      not connected
      * add getActiveDevices() instead of isActiveDevice(), which returns a list
      that must have two elements: left and right, or empty list on error
      
      Test: manual
      Bug: 69623109
      Change-Id: I6f872dd88422e9d7e5187603d3ad33628726e1ca
      65589121
    • Jakub Pawlowski's avatar
      Use RawAddress.ToString() instead of manual conversion · cd418ea6
      Jakub Pawlowski authored
      Test: compilation
      Change-Id: I66040a4f3d339ac0473052d916b9a0b4e3045e8e
      cd418ea6
    • Jakub Pawlowski's avatar
      Unpair both transports of dual mode device, when LE address provided · cf3d2d85
      Jakub Pawlowski authored
      In bta_dm_remove_device, if the device is not connected, and we don't
      know the transport for given address, we make two calls to
      BTM_ReadConnectedTransportAddress, to determine the device address on
      the other transport.
      If the address provided is LE, first call will fill the other_address
      variable with the Classic address, and the second call will fill it back
      with LE addres. This mean we never try to remove Classic entry, instead
      we remove LE entry twice.
      
      Bug: 67907612
      Test: establish LE connnection between two phones, trigger Bonding.
        After bonding complete, try to remove bond using LE address. Verify
        config file is cleaned of both LE and classic entry.
      
      Change-Id: Ia5dd53f96b95478a07009cecc5b4a3c79f15c59b
      cf3d2d85
    • Ajay Panicker's avatar
      Use proper media ID when changing path · 3c25e8d1
      Ajay Panicker authored
      Use the current media ID on the path stack to retrieve folder contents.
      
      Bug: 77237565
      Test: run host native test net-test-avrcp
      Change-Id: I88d0862f76d18a071a8530cd31954447b4e180fc
      3c25e8d1
  15. Mar 28, 2018
    • Ajay Panicker's avatar
      Add missing AVRCP Set Addressed Player Response · c3ad060f
      Ajay Panicker authored
      Bug: 77237301
      Test: run host native tests net-test-btpackets and net-test-avrcp
      Change-Id: Ic9a2c8d8cf5dd4c5be02a83975caa92e335ca2b9
      c3ad060f
    • Joseph Pirozzo's avatar
      AVRCP play status change updates · 5a6d6815
      Joseph Pirozzo authored
      Process play status updates when seeking forward and backward.
      
      Bug: 67568875
      Test: seek forward and backward on paired phone and observe updates.
      Change-Id: Id280f0e877cfea0a0da7603ab6d7bcfaf667d482
      5a6d6815
    • Hansong Zhang's avatar
      Revert "HID: Fix the behavior of virtual_cable_unplug" · af608cc9
      Hansong Zhang authored
      This reverts commit 87b96013.
      
      Reason for revert: Connected HID keyboard won't unpair
      Bug: 76907578
      Test: SL4A
      Change-Id: I7d289183ac05b5f926c145799418461377228569
      af608cc9
    • Pavlin Radoslavov's avatar
      Changed the default configured sample rate for aptX/aptX-HD to 48.0kHz · 50a8659e
      Pavlin Radoslavov authored
      Previously, the default configured sample rate for aptX and aptX-HD
      was 44.1kHz. However, during AVDTP codec setup, the initial codec
      setup to 44.1kHz was followed immediately with automatic codec
      reconfiguration to 48.0kHz (if supported by the remote device)
      so the highest possible sample rate will be used.
      
      Changing the default sample rate to 48.0kHz eliminates the
      transient initial codec setup of 44.1kHz, because it is unnecessary
      and error-prone.
      
      Bug: 69276823
      Test: Manual: connect to aptX / aptX-HD headsets and examine the AVDTP codec
            configuration in the btsnoop logs.
      Change-Id: I9e22365e0f07690c87503ea52fd9bb4d1ad4d5ff
      50a8659e
    • Joseph Pirozzo's avatar
      AVRCP register for addressed player changed · 43d6f51a
      Joseph Pirozzo authored
      Register to be notified when the addressed media player changes so we
      can update the AVRCP controller.
      
      Bug: 72495854
      Test: Change media player on phone, verify media source is updated.
      Change-Id: I932a25b9861734ecc6e1fdcf40f02cdde1fd049a
      43d6f51a
    • Joseph Pirozzo's avatar
      Fix crash in Log · bbd4f009
      Joseph Pirozzo authored
      Correct parameter order.
      
      Bug: 77009945
      Test: observe log message
      Change-Id: I69d4bc04936c322707111c825864007b7f257cc4
      bbd4f009
  16. Mar 27, 2018
    • AnubhavGupta's avatar
      Open acceptor channel for RC on cleanup · aeae74ce
      AnubhavGupta authored
      Usecase:
      1. Install Fitbit app
      2. Pair and connect with RD1
      3. Start streaming
      4. Pair and connect Fitbit watch
      
      Failure:
      No Stable Avctp connection with Fitbit Watch after pairing
      
      Rootcause:
      If there will be no listening acceptor
      then some Remotes unable to connect AVRC
      connection upon remote restart.
      
      Fix:
      Open acceptor channel for RC on cleanup
      as if there will be no listening acceptor
      then some Remotes unable to connect AVRC
      connection upon remote restart.
      
      Test: 1. Install Fitbit app
      2. Pair and connect with RD1
      3. Start streaming
      4. Pair and connect Fitbit watch
      
      Fixes: 63605621
      Change-Id: Ia6cefc29ca64b00f2f5fe2f9816d71604c511415
      aeae74ce
    • Srinu Jella's avatar
      Serialize the commands during Pairing process · 485f6429
      Srinu Jella authored
      Steps:
      1. Pair and connect with HID mouse.
      2. Once the settings UI shows paired and connected
      3. Try to unpair the device, but UI still shows connected.
      
      Failure: Unable to unpair HID mouse due to LMP
      response timeout occurred for  remote version and remote
      feature request.
      
      Root Cause: Remote version, Remote features, Authentication
      requested commands go simultaneously to the remote device
      which can't handle the multiple commands at a time.
      
      Fix: Serialize the Remote version, Remote features, Authentication
      requested commands.
      
      Test: Tested manually with apple magic mouse.
      Bug: 35125883
      
      Change-Id: I4448c291a60ee637dc5927806547e67f26571d86
      485f6429
    • Pavlin Radoslavov's avatar
      Suppress unnecessary A2DP codec reconfiguration · d578ae12
      Pavlin Radoslavov authored
      If OTA A2DP codec configuration is accepted from the remote
      device, then don't trigger codec reconfiguration.
      
      Bug: 74521894
      Test: Manual: accept connection and codec config from A2DP Sink
      Change-Id: Ic2f6ff08d130adf85cad68a54ab9fbc0a711534c
      d578ae12
Loading