Merge "r_submix: Fix get_next_write_timestamp and get_input_buffer_size" am: 3fe18ca38f
am: fda30476da
Change-Id: I73309c0cf35410213a1678ec0d487f768a81f731
diff --git a/modules/audio_remote_submix/audio_hw.cpp b/modules/audio_remote_submix/audio_hw.cpp
index f778693..dda0d0e 100644
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -962,7 +962,7 @@
{
(void)stream;
(void)timestamp;
- return -EINVAL;
+ return -ENOSYS;
}
/** audio_stream_in implementation **/
@@ -1554,6 +1554,9 @@
}
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);