diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2014-07-18 12:48:12 +0300 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-07-18 13:41:22 +0200 |
commit | 8d324852fd9e75401af490220e0108e961dad654 (patch) | |
tree | 7966d00169086b7426408e39f367e89e6d4ff297 /android/hal-sco.c | |
parent | baf59474e3b8451e1c27279536906e989a41a676 (diff) | |
download | bluez-8d324852fd9e75401af490220e0108e961dad654.tar.gz |
android/hal-sco: Choose buffer size
For 8k choose buffer size 576 which is multiple from 48 and 64.
Diffstat (limited to 'android/hal-sco.c')
-rw-r--r-- | android/hal-sco.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/hal-sco.c b/android/hal-sco.c index 2c1aeed12..05dbddb90 100644 --- a/android/hal-sco.c +++ b/android/hal-sco.c @@ -492,6 +492,10 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) size_t size = audio_stream_frame_size(&out->stream.common) * out->cfg.frame_num; + /* buffer size without resampling */ + if (out->cfg.rate == AUDIO_STREAM_SCO_RATE) + size = 576 * 2; + DBG("buf size %zd", size); return size; @@ -838,6 +842,10 @@ static size_t in_get_buffer_size(const struct audio_stream *stream) size_t size = audio_stream_frame_size(&in->stream.common) * in->cfg.frame_num; + /* buffer size without resampling */ + if (in->cfg.rate == AUDIO_STREAM_SCO_RATE) + size = 576; + DBG("buf size %zd", size); return size; |