diff options
author | Kausik Sinnaswamy <kausik@broadcom.com> | 2012-06-25 15:37:15 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-25 01:08:24 -0700 |
commit | b280b2fc2bc025e0fb2cc2eb03b31574ceb3bdfc (patch) | |
tree | bfa27833f468e7488658d67c750df1718b9666d2 /audio_a2dp_hw | |
parent | 03378a55ba4c099e53d838d2beb2bc09910cee98 (diff) | |
download | external_bluetooth_bluedroid-b280b2fc2bc025e0fb2cc2eb03b31574ceb3bdfc.zip external_bluetooth_bluedroid-b280b2fc2bc025e0fb2cc2eb03b31574ceb3bdfc.tar.gz external_bluetooth_bluedroid-b280b2fc2bc025e0fb2cc2eb03b31574ceb3bdfc.tar.bz2 |
Do not auto-resume when A2DPSuspended is FALSE
Instead if music was streaming prior to the suspend, we just set the
state to STANDBY and expect the AVDTP start to be triggered when the
first data packet is sent
Change-Id: Ia1486033c251c637b1560c41f7e8e07ca2201136
Diffstat (limited to 'audio_a2dp_hw')
-rw-r--r-- | audio_a2dp_hw/audio_a2dp_hw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/audio_a2dp_hw/audio_a2dp_hw.c b/audio_a2dp_hw/audio_a2dp_hw.c index 6bfec3c..fcbe718 100644 --- a/audio_a2dp_hw/audio_a2dp_hw.c +++ b/audio_a2dp_hw/audio_a2dp_hw.c @@ -640,9 +640,13 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs) } else { - /* only start stream if we were previously suspended */ + /* Do not start the streaming automatically. If the phone was streaming + * prior to being suspended, the next out_write shall trigger the + * AVDTP start procedure */ if (out->state == AUDIO_A2DP_STATE_SUSPENDED) - retval = start_audio_datapath(out); + out->state = AUDIO_A2DP_STATE_STANDBY; + /* Irrespective of the state, return 0 */ + retval = 0; } } |