OSDN Git Service

Delay A2DP HAL out stream open process
authorAnubhav Gupta <anubhavg@codeaurora.org>
Mon, 14 Apr 2014 08:59:25 +0000 (14:29 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Tue, 23 Jun 2015 17:02:34 +0000 (10:02 -0700)
Delay A2DP HAL out stream open process to ensure that the
Headset is in proper state when START is initiated from DUT
immediately after the connection due to ongoing music playback.
Jawbone speaker goes to bad state unless it gets enough time
between AVDTP OPEN and START.

Bug: 22028876
Change-Id: I79a895a85ac7d37208192acf9064fd5c979dd28b

audio_a2dp_hw/audio_a2dp_hw.c

index b4760e1..bd153a3 100644 (file)
@@ -1070,6 +1070,9 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
     }
 
     DEBUG("success");
+    /* Delay to ensure Headset is in proper state when START is initiated
+       from DUT immediately after the connection due to ongoing music playback. */
+    usleep(250000);
     return 0;
 
 err_open: