Skip to content
Snippets Groups Projects
Commit 05b206d3 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov
Browse files

Reset the A2DP coding parameters when switching codecs

Bug: 77281039
Test: Manual - connect Headset and switch codecs while playing audio
Change-Id: Icb89b0d78195fd654d66bc1334b121cf62c55be1
parent 49901647
No related branches found
No related tags found
No related merge requests found
......@@ -222,6 +222,7 @@ static void a2dp_aac_encoder_update(uint16_t peer_mtu,
LOG_DEBUG(LOG_TAG, "%s: sample_rate=%u bits_per_sample=%u channel_count=%u",
__func__, p_feeding_params->sample_rate,
p_feeding_params->bits_per_sample, p_feeding_params->channel_count);
a2dp_aac_feeding_reset();
// The codec parameters
p_encoder_params->sample_rate =
......
......@@ -222,6 +222,7 @@ static void a2dp_sbc_encoder_update(uint16_t peer_mtu,
LOG_DEBUG(LOG_TAG, "%s: sample_rate=%u bits_per_sample=%u channel_count=%u",
__func__, p_feeding_params->sample_rate,
p_feeding_params->bits_per_sample, p_feeding_params->channel_count);
a2dp_sbc_feeding_reset();
// The codec parameters
p_encoder_params->s16ChannelMode = A2DP_GetChannelModeCodeSbc(p_codec_info);
......
......@@ -263,8 +263,7 @@ static void a2dp_vendor_aptx_encoder_update(uint16_t peer_mtu,
LOG_DEBUG(LOG_TAG, "%s: sample_rate=%u bits_per_sample=%u channel_count=%u",
__func__, p_feeding_params->sample_rate,
p_feeding_params->bits_per_sample, p_feeding_params->channel_count);
aptx_init_framing_params(&a2dp_aptx_encoder_cb.framing_params);
a2dp_vendor_aptx_feeding_reset();
}
void a2dp_vendor_aptx_encoder_cleanup(void) {
......
......@@ -264,8 +264,7 @@ static void a2dp_vendor_aptx_hd_encoder_update(
LOG_DEBUG(LOG_TAG, "%s: sample_rate=%u bits_per_sample=%u channel_count=%u",
__func__, p_feeding_params->sample_rate,
p_feeding_params->bits_per_sample, p_feeding_params->channel_count);
aptx_hd_init_framing_params(&a2dp_aptx_hd_encoder_cb.framing_params);
a2dp_vendor_aptx_hd_feeding_reset();
}
void a2dp_vendor_aptx_hd_encoder_cleanup(void) {
......
......@@ -381,6 +381,7 @@ static void a2dp_vendor_ldac_encoder_update(uint16_t peer_mtu,
LOG_DEBUG(LOG_TAG, "%s: sample_rate=%u bits_per_sample=%u channel_count=%u",
__func__, p_feeding_params->sample_rate,
p_feeding_params->bits_per_sample, p_feeding_params->channel_count);
a2dp_vendor_ldac_feeding_reset();
// The codec parameters
p_encoder_params->sample_rate =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment