diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2014-11-05 10:41:19 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-11-05 12:25:11 +0100 |
commit | 3b2445be8b1731353bec394ac59b2e1f2e4f2a16 (patch) | |
tree | aab74487e601d99f920f3f44eb732ecdda1ddf37 /android/hal-sco.c | |
parent | b772cf6b03123d4cc62f7880180cd11078abe299 (diff) | |
download | bluez-3b2445be8b1731353bec394ac59b2e1f2e4f2a16.tar.gz |
android/hal-sco: Save bd_addr for output stream of Audio SCO HAL
Make use of address field which makes possible to query right SCO fd
from handsfree multi-client code.
Diffstat (limited to 'android/hal-sco.c')
-rw-r--r-- | android/hal-sco.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/android/hal-sco.c b/android/hal-sco.c index c5b86b0c2..e84dae08f 100644 --- a/android/hal-sco.c +++ b/android/hal-sco.c @@ -79,6 +79,8 @@ struct sco_stream_out { struct resampler_itfe *resampler; int16_t *resample_buf; uint32_t resample_frame_num; + + bt_bdaddr_t bd_addr; }; static void sco_close_socket(void) @@ -667,6 +669,14 @@ static int sco_open_output_stream_real(struct audio_hw_device *dev, out->stream.write = out_write; out->stream.get_render_position = out_get_render_position; +#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0) + if (address) { + DBG("address %s", address); + + str2bt_bdaddr_t(address, &out->bd_addr); + } +#endif + if (config) { DBG("config: rate %u chan mask %x format %d offload %p", config->sample_rate, config->channel_mask, |