diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2014-11-05 10:41:20 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-11-05 12:25:11 +0100 |
commit | fb4877a22f618b4c951f39928ea1db9f892e3ef1 (patch) | |
tree | c4c480abcc67d4f2cf7d82bc6825dd374454d89d /android/hal-sco.c | |
parent | 3b2445be8b1731353bec394ac59b2e1f2e4f2a16 (diff) | |
download | bluez-fb4877a22f618b4c951f39928ea1db9f892e3ef1.tar.gz |
android/hal-sco: Save bd_addr for input 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 e84dae08f..442e2d057 100644 --- a/android/hal-sco.c +++ b/android/hal-sco.c @@ -103,6 +103,8 @@ struct sco_stream_in { struct resampler_itfe *resampler; int16_t *resample_buf; uint32_t resample_frame_num; + + bt_bdaddr_t bd_addr; }; struct sco_dev { @@ -1158,6 +1160,14 @@ static int sco_open_input_stream_real(struct audio_hw_device *dev, in->stream.read = in_read; in->stream.get_input_frames_lost = in_get_input_frames_lost; +#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0) + if (address) { + DBG("address %s", address); + + str2bt_bdaddr_t(address, &in->bd_addr); + } +#endif + if (config) { DBG("config: rate %u chan mask %x format %d offload %p", config->sample_rate, config->channel_mask, |