diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2014-07-18 12:48:01 +0300 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-07-18 13:41:21 +0200 |
commit | 69dae655037e76d200b5043431c928eb398c3335 (patch) | |
tree | fe6d312edc1607b56e776d7778d582aa98cf75d6 /android/hal-sco.c | |
parent | cf0f491d9259103654bbde315a9c0d8c6db415dc (diff) | |
download | bluez-69dae655037e76d200b5043431c928eb398c3335.tar.gz |
android/hal-sco: Move mtu assignment to open_stream()
mtu shall be assigned when opening stream to be logically correct.
Diffstat (limited to 'android/hal-sco.c')
-rw-r--r-- | android/hal-sco.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/android/hal-sco.c b/android/hal-sco.c index 701d15ed9..ecf7a0924 100644 --- a/android/hal-sco.c +++ b/android/hal-sco.c @@ -300,7 +300,7 @@ static bool write_data(struct sco_stream_out *out, const uint8_t *buffer, struct pollfd pfd; size_t len, written = 0; int ret; - uint16_t mtu = /* out->cfg.mtu */ 48; + uint16_t mtu = out->cfg.mtu; uint64_t audio_sent_us, audio_passed_us; pfd.fd = out->fd; @@ -594,7 +594,9 @@ static int sco_open_output_stream(struct audio_hw_device *dev, out->cfg.channels = AUDIO_CHANNEL_OUT_STEREO; out->cfg.rate = AUDIO_STREAM_DEFAULT_RATE; out->cfg.frame_num = OUT_STREAM_FRAMES; - out->cfg.mtu = mtu; + + /* we get wrong mtu size for some reason */ + out->cfg.mtu = /* mtu */ 48; out->downmix_buf = malloc(out_get_buffer_size(&out->stream.common)); if (!out->downmix_buf) { |