summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Kumar Alamanda <ralama@codeaurora.org>2014-12-02 19:21:51 -0800
committerSteve Kondik <steve@cyngn.com>2014-12-23 13:00:14 -0800
commit3e98fd72e1984f45389af2d00927a71b6c8154f7 (patch)
tree8c08f0b233d1e769ce622a9fdbe408a99e391f08
parent1f10f550b6d3d4ae583827b7118f1664582411b2 (diff)
downloadandroid_hardware_qcom_audio-3e98fd72e1984f45389af2d00927a71b6c8154f7.tar.gz
android_hardware_qcom_audio-3e98fd72e1984f45389af2d00927a71b6c8154f7.tar.bz2
android_hardware_qcom_audio-3e98fd72e1984f45389af2d00927a71b6c8154f7.zip
hal: Fix progress bar issue during compress offload playback
During MP3 (with no gapless meta data) playback in 'repeat one song' mode observed that from second iteration onwards the progress bar continues to increase beyond the clip duration. At the end of second iteration the drain command is not reaching the driver as the compress_set_gapless_metadata() is not called. Fix the issue by ensuring that it gets called for every iteration. Change-Id: If71c145c5a02c99ff55f528522f1f36e20ec8871
-rw-r--r--hal/audio_hw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index a3b39fb6..7e78713c 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1179,6 +1179,8 @@ static void *offload_thread_loop(void *context)
ALOGE("%s: Next track returned error %d",__func__, ret);
send_callback = true;
event = STREAM_CBK_EVENT_DRAIN_READY;
+ /* Resend the metadata for next iteration */
+ out->send_new_metadata = 1;
break;
case OFFLOAD_CMD_DRAIN:
ALOGD("copl(%p):calling compress_drain", out);
@@ -1195,6 +1197,7 @@ static void *offload_thread_loop(void *context)
out->offload_thread_blocked = false;
pthread_cond_signal(&out->cond);
if (send_callback) {
+ ALOGVV("%s: sending offload_callback event %d", __func__, event);
out->offload_callback(event, NULL, out->offload_cookie);
}
free(cmd);