OSDN Git Service

Compute the audio data buffer size based on stream characteristics
authorPavlin Radoslavov <pavlin@google.com>
Tue, 4 Apr 2017 18:31:29 +0000 (11:31 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Wed, 5 Apr 2017 03:03:44 +0000 (20:03 -0700)
commitae9db0f8fa596cfcb919ce7a2dc76eff96533e3f
treeeab52c8253d1b8541c4de5e7593ceecedb1e035d
parentb24adecb51878353f8c1789b8a7917a36b4e7e00
Compute the audio data buffer size based on stream characteristics

Use the audio data stream characteristics (sample rate, bits per sample,
channel mode) to compute the audio stream output buffer size from
the Audio A2DP HAL to the Bluetooth stack.

Previously, the buffer size was pre-computed based on the original
(44.1kHz, 16 bits per sample, Stereo) PCM audio stream used by SBC.
NOTE: We cannot change the buffer size on the receiver side (Bluetooth),
because SO_RCVBUF option does not have effect for Domain Sockets.

Also, removed uipc_linux.h header file, because it is not used.

Test: A2DP streaming and switching the codecs, sample rate, bits per sample
Bug: 35849921
Change-Id: Ib6772f7564442ac18a02876a5aa5e3208e5aade1
(cherry picked from commit b32704f424e0ab4cd33ad670173997f8e3a0a31c)
audio_a2dp_hw/audio_a2dp_hw.cc
audio_a2dp_hw/audio_a2dp_hw.h
udrv/ulinux/uipc_linux.h [deleted file]