Loading system/stack/a2dp/a2dp_sbc_encoder.cc +14 −7 Original line number Original line Diff line number Diff line Loading @@ -753,15 +753,22 @@ static uint8_t calculate_max_frames_per_packet(void) { LOG_VERBOSE(LOG_TAG, "%s: original AVDTP MTU size: %d", __func__, LOG_VERBOSE(LOG_TAG, "%s: original AVDTP MTU size: %d", __func__, a2dp_sbc_encoder_cb.TxAaMtuSize); a2dp_sbc_encoder_cb.TxAaMtuSize); if (a2dp_sbc_encoder_cb.is_peer_edr && !a2dp_sbc_encoder_cb.peer_supports_3mbps) { // This condition would be satisfied only if the remote device is // EDR and supports only 2 Mbps, but the effective AVDTP MTU size // exceeds the 2DH5 packet size. LOG_VERBOSE(LOG_TAG, "%s: The remote device is EDR but does not support 3 Mbps", __func__); // Restrict the MTU - even though some Sink devices are advertising large // MTU, they are not able to handle the packets and are stuttering. if (effective_mtu_size > MAX_2MBPS_AVDTP_MTU) { if (effective_mtu_size > MAX_2MBPS_AVDTP_MTU) { LOG_WARN(LOG_TAG, "%s: Restricting AVDTP MTU size to %d", __func__, LOG_WARN(LOG_TAG, "%s: Restricting AVDTP MTU size to %d", __func__, MAX_2MBPS_AVDTP_MTU); MAX_2MBPS_AVDTP_MTU); effective_mtu_size = MAX_2MBPS_AVDTP_MTU; effective_mtu_size = MAX_2MBPS_AVDTP_MTU; a2dp_sbc_encoder_cb.TxAaMtuSize = effective_mtu_size; a2dp_sbc_encoder_cb.TxAaMtuSize = effective_mtu_size; } } } if (!p_encoder_params->s16NumOfSubBands) { if (!p_encoder_params->s16NumOfSubBands) { LOG_ERROR(LOG_TAG, "%s: SubBands are set to 0, resetting to %d", __func__, LOG_ERROR(LOG_TAG, "%s: SubBands are set to 0, resetting to %d", __func__, Loading Loading
system/stack/a2dp/a2dp_sbc_encoder.cc +14 −7 Original line number Original line Diff line number Diff line Loading @@ -753,15 +753,22 @@ static uint8_t calculate_max_frames_per_packet(void) { LOG_VERBOSE(LOG_TAG, "%s: original AVDTP MTU size: %d", __func__, LOG_VERBOSE(LOG_TAG, "%s: original AVDTP MTU size: %d", __func__, a2dp_sbc_encoder_cb.TxAaMtuSize); a2dp_sbc_encoder_cb.TxAaMtuSize); if (a2dp_sbc_encoder_cb.is_peer_edr && !a2dp_sbc_encoder_cb.peer_supports_3mbps) { // This condition would be satisfied only if the remote device is // EDR and supports only 2 Mbps, but the effective AVDTP MTU size // exceeds the 2DH5 packet size. LOG_VERBOSE(LOG_TAG, "%s: The remote device is EDR but does not support 3 Mbps", __func__); // Restrict the MTU - even though some Sink devices are advertising large // MTU, they are not able to handle the packets and are stuttering. if (effective_mtu_size > MAX_2MBPS_AVDTP_MTU) { if (effective_mtu_size > MAX_2MBPS_AVDTP_MTU) { LOG_WARN(LOG_TAG, "%s: Restricting AVDTP MTU size to %d", __func__, LOG_WARN(LOG_TAG, "%s: Restricting AVDTP MTU size to %d", __func__, MAX_2MBPS_AVDTP_MTU); MAX_2MBPS_AVDTP_MTU); effective_mtu_size = MAX_2MBPS_AVDTP_MTU; effective_mtu_size = MAX_2MBPS_AVDTP_MTU; a2dp_sbc_encoder_cb.TxAaMtuSize = effective_mtu_size; a2dp_sbc_encoder_cb.TxAaMtuSize = effective_mtu_size; } } } if (!p_encoder_params->s16NumOfSubBands) { if (!p_encoder_params->s16NumOfSubBands) { LOG_ERROR(LOG_TAG, "%s: SubBands are set to 0, resetting to %d", __func__, LOG_ERROR(LOG_TAG, "%s: SubBands are set to 0, resetting to %d", __func__, Loading