• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/bt


コミットメタ情報

リビジョン8587f4f9a808dc15c1b949c10a5b049f83fda2f8 (tree)
日時2016-10-05 08:24:56
作者Steve Kondik <steve@cyng...>
コミッターSteve Kondik

ログメッセージ

Android 7.0.0 Release 14 (NBD90Z)
-----BEGIN PGP SIGNATURE-----

iEYEABECAAYFAlfz9GMACgkQ6K0/gZqxDniztACcCXYJhyKu/kYqT6b8cZ/1Ceau
AnEAnjcawrQlJbnI/BJC53f1MmlMmRu+
=jjbE
-----END PGP SIGNATURE-----

Merge tag 'android-7.0.0_r14' of https://android.googlesource.com/platform/system/bt into cm-14.0

Android 7.0.0 Release 14 (NBD90Z)

Change-Id: I634414c79b6cb207d22bb29dfb2854e96ae77e46

変更サマリ

差分

--- a/audio_a2dp_hw/audio_a2dp_hw.c
+++ b/audio_a2dp_hw/audio_a2dp_hw.c
@@ -671,8 +671,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
671671 size_t bytes)
672672 {
673673 struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream;
674- int sent;
675- int us_delay;
674+ int sent = -1;
676675 #ifdef BT_AUDIO_SYSTRACE_LOG
677676 char trace_buf[512];
678677 #endif
@@ -682,8 +681,8 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
682681 pthread_mutex_lock(&out->common.lock);
683682 if (out->common.state == AUDIO_A2DP_STATE_SUSPENDED ||
684683 out->common.state == AUDIO_A2DP_STATE_STOPPING) {
685- INFO("stream suspended or closing");
686- goto error;
684+ DEBUG("stream suspended or closing");
685+ goto finish;
687686 }
688687
689688 /* only allow autostarting if we are in stopped or standby */
@@ -696,13 +695,13 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
696695 if (start_audio_datapath(&out->common) < 0)
697696 #endif
698697 {
699- goto error;
698+ goto finish;
700699 }
701700 }
702701 else if (out->common.state != AUDIO_A2DP_STATE_STARTED)
703702 {
704703 ERROR("stream not in stopped or standby");
705- goto error;
704+ goto finish;
706705 }
707706 #ifdef BT_AUDIO_SAMPLE_LOG
708707 if (outputpcmsamplefile)
@@ -751,26 +750,24 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
751750 } else {
752751 ERROR("write failed : stream suspended, avoid resetting state");
753752 }
754- goto error;
753+ goto finish;
755754 }
756755
756+finish: ;
757757 const size_t frames = bytes / audio_stream_out_frame_size(stream);
758758 out->frames_rendered += frames;
759759 out->frames_presented += frames;
760760 pthread_mutex_unlock(&out->common.lock);
761- return bytes;
762761
763-error:
764- pthread_mutex_unlock(&out->common.lock);
765- us_delay = calc_audiotime(out->common.cfg, bytes);
766-
767- DEBUG("emulate a2dp write delay (%d us)", us_delay);
768-
769- usleep(us_delay);
762+ // If send didn't work out, sleep to emulate write delay.
763+ if (sent == -1) {
764+ const int us_delay = calc_audiotime(out->common.cfg, bytes);
765+ DEBUG("emulate a2dp write delay (%d us)", us_delay);
766+ usleep(us_delay);
767+ }
770768 return bytes;
771769 }
772770
773-
774771 static uint32_t out_get_sample_rate(const struct audio_stream *stream)
775772 {
776773 struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream;
--- a/btif/src/btif_dm.c
+++ b/btif/src/btif_dm.c
@@ -1051,7 +1051,6 @@ static void btif_dm_pin_req_evt(tBTA_DM_PIN_REQ *p_pin_req)
10511051 return;
10521052 }
10531053 if (check_cod(&bd_addr, COD_AV_HEADSETS) ||
1054- check_cod(&bd_addr, COD_AV_HANDSFREE) ||
10551054 check_cod(&bd_addr, COD_AV_HEADPHONES) ||
10561055 check_cod(&bd_addr, COD_AV_PORTABLE_AUDIO) ||
10571056 check_cod(&bd_addr, COD_AV_HIFI_AUDIO) ||