From 97fa7f1c5c74ed79eb01fafd113306f7ea16bfd8 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 11 Feb 2017 14:21:56 +0100 Subject: [PATCH] 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 --- audio/audio_hw.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/audio/audio_hw.c b/audio/audio_hw.c index cc04a95c..d43fecbd 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -3084,6 +3084,12 @@ static int out_get_presentation_position(const struct audio_stream_out *stream, 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;