summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2019-11-12 02:20:38 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-11-12 02:20:38 +0000
commit3fe18ca38f1c6b6d27b9322dab9f0c77eb1000b2 (patch)
treef5ba1816b2dac674e64247a32160a63d5678bb87 /modules
parentb833bfbd5fcd039b6cb01c4865c01278de800cb9 (diff)
parent09064195179ebadcc540ae2afd82223dbd7cc57a (diff)
Merge "r_submix: Fix get_next_write_timestamp and get_input_buffer_size"
Diffstat (limited to 'modules')
-rw-r--r--modules/audio_remote_submix/audio_hw.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/audio_remote_submix/audio_hw.cpp b/modules/audio_remote_submix/audio_hw.cpp
index f7786938..dda0d0ef 100644
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -962,7 +962,7 @@ static int out_get_next_write_timestamp(const struct audio_stream_out *stream,
{
(void)stream;
(void)timestamp;
- return -EINVAL;
+ return -ENOSYS;
}
/** audio_stream_in implementation **/
@@ -1554,6 +1554,9 @@ static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
}
const size_t frame_size_in_bytes = audio_channel_count_from_in_mask(config->channel_mask) *
audio_bytes_per_sample(config->format);
+ if (max_buffer_period_size_frames == 0) {
+ max_buffer_period_size_frames = DEFAULT_PIPE_SIZE_IN_FRAMES;
+ }
const size_t buffer_size = max_buffer_period_size_frames * frame_size_in_bytes;
SUBMIX_ALOGV("adev_get_input_buffer_size() returns %zu bytes, %zu frames",
buffer_size, max_buffer_period_size_frames);