From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> For 8k choose buffer size 576 which is multiple from 48 and 64. --- android/hal-sco.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/hal-sco.c b/android/hal-sco.c index 2c1aeed..05dbddb 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; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html