audio: Leave out_get_presentation_position() early when switching to WB
When the voice session switches from NB to WB we should just leave
early.
Change-Id: Ib4bfe336f6e51fa469fee50c96a81c819f58678b
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index cc04a95..d43fecb 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -3084,6 +3084,12 @@
if (out->usecase == USECASE_AUDIO_PLAYBACK_OFFLOAD) {
ret = out_get_presentation_offload_position(out, frames, timestamp);
} else {
+ if (out->dev->voice.in_call) {
+ ALOGVV("%s: in_call, do not handle PCMs", __func__);
+ ret = 0;
+ goto done;
+ }
+
/* FIXME: which device to read from? */
if (!list_empty(&out->pcm_dev_list)) {
struct pcm_device *pcm_device;