summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranois Gaffie <francois.gaffie@renault.com>2019-04-15 19:00:01 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-04-15 19:00:01 -0700
commit4fba9711a5eb356f718b5575f7bd856fbfcb5da5 (patch)
tree36ab96129eb2414b05ee6c2ee12e002dc071f037
parentf9539ce315082b3c756213153eb8b6ad991e5977 (diff)
parent71832e785ca8a596907f627635331553c9c2d721 (diff)
downloadlibhardware-4fba9711a5eb356f718b5575f7bd856fbfcb5da5.tar.gz
Fix remote submix MIX_RECORD stop
am: 71832e785c Change-Id: I670bb3bdc9454d8e2aca2d0f05739c36622b38fa
-rw-r--r--modules/audio_remote_submix/audio_hw.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/audio_remote_submix/audio_hw.cpp b/modules/audio_remote_submix/audio_hw.cpp
index 6fac56f0..833c12bb 100644
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -805,6 +805,11 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
// the pipe has already been shutdown, this buffer will be lost but we must
// simulate timing so we don't drain the output faster than realtime
usleep(frames * 1000000 / out_get_sample_rate(&stream->common));
+
+ pthread_mutex_lock(&rsxadev->lock);
+ out->frames_written += frames;
+ out->frames_written_since_standby += frames;
+ pthread_mutex_unlock(&rsxadev->lock);
return bytes;
}
} else {