audio: fix wrong latency reported by audio HAL

Commit 355afe9a broke the calculation of the latency returned by A2DP,
leading to incorrect A/V sync.

The latency must take into account the intermediate buffering added in audio HAL.

Change-Id: I1f3d7494fe58517151c5dba0a4883f583d7a6ef2
diff --git a/audio/android_audio_hw.c b/audio/android_audio_hw.c
index d6a3347..e8a3df6 100644
--- a/audio/android_audio_hw.c
+++ b/audio/android_audio_hw.c
@@ -180,7 +180,7 @@
 {
     const struct astream_out *out = (const struct astream_out *)stream;
 
-    return (out->buffer_duration_us / 1000) + 200;
+    return ((out->buffer_duration_us * BUF_NUM_PERIODS) / 1000) + 200;
 }
 
 static int out_set_volume(struct audio_stream_out *stream, float left,