summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-02-11 14:21:56 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-02-11 14:21:56 +0100
commit97fa7f1c5c74ed79eb01fafd113306f7ea16bfd8 (patch)
treea243b42c619b8e26e1fc0f62ba885c4ce85f6a22
parentd6359186eaa049305af685f4ed978ab2668a694d (diff)
downloadandroid_hardware_samsung-97fa7f1c5c74ed79eb01fafd113306f7ea16bfd8.tar.gz
android_hardware_samsung-97fa7f1c5c74ed79eb01fafd113306f7ea16bfd8.tar.bz2
android_hardware_samsung-97fa7f1c5c74ed79eb01fafd113306f7ea16bfd8.zip
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
-rw-r--r--audio/audio_hw.c6
1 files changed, 6 insertions, 0 deletions
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 @@ 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;