Commits on May 14, 2010
  1. Build pand and hidd

    Change-Id: Iceb26cb2347c5265c98e66f047c8b4c70e22bd15
    cyanogen committed May 14, 2010
Commits on Feb 5, 2010
  1. reconcile main tree with open-source eclair

    The Android Open Source Project committed Feb 5, 2010
Commits on Jan 29, 2010
  1. reconcile android-2.1_r1 snapshot

    The Android Open Source Project committed Jan 29, 2010
Commits on Jan 12, 2010
  1. android-2.1_r1 snapshot

    The Android Open Source Project committed Jan 12, 2010
Commits on Dec 17, 2009
  1. Use monotonically increasing clock for A2DP timing.

    This is to avoid skips when the system time changes.
    Nick Pelly committed Dec 17, 2009
Commits on Dec 15, 2009
  1. Stop trying to send A2DP packets quickly to catch-up on missed write(…

    …)'s after
    falling behind by 200ms, or on poll() timeout.
    This allows us to recover more quickly from a situation where an A2DP headset
    rejects A2DP packets for a short time. We now reset to regular packet metering
    Nick Pelly committed Dec 15, 2009
Commits on Dec 10, 2009
  1. Changes flush timeout from 60 ms to 120 ms.

    Less A2DP drop-outs due to unnecessary flushing.
    BCM recommend 120-150ms for lazy flushing.
    Nick Pelly committed Dec 10, 2009
Commits on Dec 9, 2009
  1. Fix liba2dp.c compiler warnings.

    Nick Pelly committed Dec 9, 2009
  2. Set A2DP L2CAP socket to flushable while streaming A2DP, and set the …

    flush timeout.
    Remove the (ahead < 0) logic that was designed to skip forwards when streaming
    was lagging. This logic was not working properly, and ACL flushing does its
    Nick Pelly committed Dec 9, 2009
  3. Add L2CAP_LM_FLUSHABLE to Bluez header.

    Nick Pelly committed Dec 9, 2009
  4. Add ACL flow control state (MTU, packets available, packets total) fo…

    …r debug.
    Accessed with the debug tool 'hcitool con'
    Nick Pelly committed Dec 9, 2009
Commits on Nov 13, 2009
  1. eclair snapshot

    Jean-Baptiste Queru committed Nov 13, 2009
Commits on Nov 5, 2009
  1. Send SBC frames if output buffer is nearly full.

    This is to address an A2DP issue seen with the Mazda carkit, where A2DP audio
    cannot be played. The MTU size (8200) requested by this carkit is much greater
    than the output buffer size (2048) allocated by the Bluez A2DP profile. The
    output buffer being full is giving an SBC encode error. This patch checks for
    the buffer full condition.
    Change-Id: Idded504d085c760baef15cd3cef84fcf57165e4f
    Signed-off-by: Yu Kang Ku <>
    Signed-off-by: Nick Pelly <>
    Yu Kang Ku committed with Nick Pelly Nov 5, 2009
Commits on Oct 31, 2009
  1. Add support for sending Broadcom coexistance setup commands for A2DP …

    Enabled on platforms with BOARD_HAVE_BLUETOOTH_BCM.
    Change-Id: Ic223955ac3580e5a9430f96e069f686a7afdbef8
    Nick Pelly committed Oct 31, 2009
Commits on Oct 30, 2009
  1. Fix handling of SDP records.

    Delete SDP records when device is deleted.
    Update cache whenever SDP is performed.
    Remove SDP records even when there is no driver associated with the UUID.
    Bug: 2173752
    Dr No: Eastham
    Jaikumar Ganesh committed Oct 30, 2009
Commits on Oct 26, 2009
  1. do not merge - Fix for issue 2184627 cherry picked from eclair-mr2

    Bluetooth A2DP suspend-resume improvements.
    This change will reduce the occurence rate of A2DP sink suspend resume failures observed in issues 2184627, 2181005 and possibly 2189628.
    Avoid lockups in case of BT device disconnection during the A2DP start process by using a timeout when reading from bluetooth command socket.
    Correct a typo causing potential deadlock in wait_for_start().
    Eric Laurent committed Oct 16, 2009
Commits on Oct 3, 2009
  1. Add DBUS interfaces AddRfcommServiceRecord() and RemoveServiceRecord().

    org.bluez.Adapter.AddRfcommServiceRecord takes a name, uuid and channel
    and creates a record like:
    Service Name: MyApplication
    Service RecHandle: 0x10009
    Service Class ID List:
      UUID 128: 42999bc0-ac5e-11de-8a39-0800200c9a66
    Protocol Descriptor List:
      "L2CAP" (0x0100)
      "RFCOMM" (0x0003)
        Channel: 26
    It returns the integer Record Handle, that can be used with
    org.bluez.Adapter.RemoveServiceRecord to remove that record.
    Bug: 2158900
    DrNo: eastham
    Change-Id: Ie375d5ccd24b5faf067a26b8a04a1449b3f56ce2
    Nick Pelly committed Oct 1, 2009
Commits on Sep 30, 2009
  1. Remove redundant call to bluetooth_init().

    This is a cleanup to Ian Kent's preceeding patchset.
    Change-Id: I8ff00530fdd337873ff898b7fd9009b0fc13f0b4
    Nick Pelly committed Sep 30, 2009
  2. Add Bluetooth A2DP suspend/resume to DBUS API.

    Change-Id: Icef1729957ed55e491e63d74d14a2c0c93984c4d
    Zhu Lan committed with Nick Pelly Jun 23, 2009
  3. bluez a2dp - use a sensible write timeout

    The 500 msec write timeout is extremely optimistic, a 1000 msec
    timeout is closer to reality.
    raven-au committed with Nick Pelly Sep 28, 2009
  4. bluez a2dp - fix wait_for_start() spurious wakeup

    When waiting on a condition is is possble to receive spurious
    wake ups. Deal with this in wait_for_start().
    Change-Id: I678e9d7831333d9b8baa31e9b0ec2597ca9263cd
    raven-au committed with Nick Pelly Sep 28, 2009
  5. bluez a2dp - fix wait_for_start() synchronization

    On entry to wait_for_start() it's possible we are in state
    A2DP_STATE_NONE if a2dp_thread() has not completed bluetooth_init().
    Also, we call the pthread_mutex_*() functions more frequently than
    we really need to.
    Move the mutex locking outside the loop and let condition wait
    take care of the locking. Also move the A2DP_STATE_NONE check
    below the condition wait so we can be sure the state machine
    has been poked before we test it.
    Change-Id: I020bea365a623e88cb1a5f7e5fccd8f8aa948518
    raven-au committed with Nick Pelly Sep 28, 2009
  6. bluez a2dp - destroy thread attr after thread create

    Pthread resources may be used by the thread attributes object.
    We should destroy this after thread creation.
    raven-au committed with Nick Pelly Sep 28, 2009
  7. bluez a2dp - destroy thread resources at exit

    The dynamically created pthread mutex and condition variables
    consume pthread resources. They should be destroyed prior to
    freeing the structure containing them.
    raven-au committed with Nick Pelly Sep 28, 2009
  8. bluez a2dp - fix a2dp_thread() spurious wakeup

    When waiting on a condition is is possble to receive spurious
    wake ups. Use the fact that when we poke the state machine the
    command must have changed to deal with this.
    Change-Id: I0ed2f2a15c15dea30cb1d5cf3b67c8549d6802d4
    raven-au committed with Nick Pelly Sep 28, 2009
  9. bluez a2dp - fix state machine synchronization

    Using a worker thread implementation for A2DP means that if we don't
    have some way to syncroniize state transitions we can get overlap of
    requested command functions or lost signals. In order for the A2DP
    state machine to function each command operation must complete before
    the next is initiated or we will get errors caused by these out of
    sequence commands. And if we signal the thread when it is not waiting
    on the condition the signal will be missed.
    This could be partly resolved by implementing a queue but then there
    is an overhead with also implementing a wait mechamism for state
    transitions. It's much easier and simpler to just hold the mutex
    during command processing which also deals with the lost signals issue.
    This may well not achieve the original goal of the worker thread
    implementation but neither would a queue implementation. It looks
    like this is just the way things are!
    raven-au committed with Nick Pelly Sep 28, 2009
Commits on Sep 29, 2009
  1. bluez a2dp - syncronize worker thread start

    There is an order of execution assumption made when starting the
    a2dp worker thread. Add an additional condition variable to allow
    us to make sure we have reached the thread_wait condition wait
    before returning from a2dp_init().
    raven-au committed with Nick Pelly Sep 28, 2009
  2. Rename audio_device_is_connected more appropriately

    Johan Hedberg committed with Jaikumar Ganesh Sep 3, 2009
  3. Fix AVDTP Abort when transport closes before response

    Change-Id: I5d2bced52514eb14fd8236a9262ae5c71e68f524
    Johan Hedberg committed with Jaikumar Ganesh Sep 3, 2009
  4. Fix agent_free call due to the picking up of upmerge fixes.

    Change-Id: Ia0a12ec45dd498572e4a4f2354d383ba5ea436ce
    Jaikumar Ganesh committed Sep 29, 2009
  5. Fix AVDTP suspend while closing

    We should reject any suspend request if we've already started the close
    procedure for a stream.
    Johan Hedberg committed with Jaikumar Ganesh Sep 16, 2009
  6. Fix command timeout handling when there's no stream

    The media stream could be gone by the time that the AVDTP command timeout
    expires (e.g. if the media transport channel gets closed prematurely). In
    such a case there's no need to send a separate ABORT command but we can
    directly proceed with closing the signalling channel.
    Johan Hedberg committed with Jaikumar Ganesh Sep 15, 2009
  7. Fix AVDTP ABORTING state transition

    The transition to ABORTING state when acting as initiator should happen
    when we receive the ABORT reply and not when we send the initial ABORT
    command. The reply handling is already correct but since there's a state
    change also in the sending part the later state change request would fail.
    This patch fixes the issue by removing the state change when sending the
    ABORT command.
    Change-Id: I9cf9f27924b7d348523125ddccff7c8ecebacf93
    Johan Hedberg committed with Jaikumar Ganesh Sep 15, 2009
  8. Fix stream handling when the media transport disconnects prematurely

    We might not have a stream anymore when receiving the reply to a AVDTP
    command that assumes that there is an existing stream. So ignore the
    replies to these commands if we don't have a stream anymore.
    Johan Hedberg committed with Jaikumar Ganesh Sep 15, 2009
  9. Fixed duplicate attempt from device to connect 'signalling' channel

    A device may attempt to initiate a duplicate avdtp channel while
    a host-initiated channel connection is still pending. This
    situation is referred to as 'XCASE connect:connect' in sink.c and
    source.c. This fix rejects the device-initiated connection in this
    Peter Hurley committed with Jaikumar Ganesh Sep 9, 2009