Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-bluetooth-sbc: Commit

external/bluetooth/sbc


Commit MetaInfo

Revision7110480576985842a7f7f3dbb4d432f0098d51ad (tree)
Time2014-10-24 23:56:46
AuthorAurélien Zanelli <aurelien.zanelli@parr...>
CommiterLuiz Augusto von Dentz

Log Message

sbc: fix frame length calculation for DUAL_CHANNEL mode

According to A2DP specification, section 12.9, for DUAL_CHANNEL mode, we
shall use the same formula as for MONO mode.

Change Summary

Incremental Difference

--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -1402,7 +1402,7 @@ SBC_EXPORT size_t sbc_get_frame_length(sbc_t *sbc)
14021402
14031403 ret = 4 + (4 * subbands * channels) / 8;
14041404 /* This term is not always evenly divide so we round it up */
1405- if (channels == 1)
1405+ if (channels == 1 || sbc->mode == SBC_MODE_DUAL_CHANNEL)
14061406 ret += ((blocks * channels * bitpool) + 7) / 8;
14071407 else
14081408 ret += (((joint ? subbands : 0) + blocks * bitpool) + 7) / 8;
Show on old repository browser