mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(bt/bqb): Set SBC encoder as PTS required for BQB test
1: set SBC encoder as PTS required. The encoder is effective first. But it changes to default after media start.
This commit is contained in:
parent
4ea52074b4
commit
87135459a7
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -42,6 +42,13 @@
|
||||
|
||||
#if BTC_AV_SRC_INCLUDED
|
||||
|
||||
/*****************************************************************************
|
||||
** BQB global variables
|
||||
*****************************************************************************/
|
||||
#if A2D_SRC_BQB_INCLUDED
|
||||
bool a2dp_src_bqb_set_sbc_encoder_flag = FALSE;
|
||||
#endif /* A2D_SRC_BQB_INCLUDED */
|
||||
|
||||
/*****************************************************************************
|
||||
** Constants
|
||||
*****************************************************************************/
|
||||
@ -928,6 +935,27 @@ static void btc_a2dp_source_enc_update(BT_HDR *p_msg)
|
||||
}
|
||||
}
|
||||
|
||||
#if A2D_SRC_BQB_INCLUDED
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btc_a2dp_source_bqb_sbc_encoder_set
|
||||
**
|
||||
** Description Set SBC encoder for bqb test cases A2DP/SRC/SET/BV-04-I and A2DP/SRC/SET/BV-06-I
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
void btc_a2dp_source_bqb_sbc_encoder_set(void)
|
||||
{
|
||||
a2dp_source_local_param.btc_aa_src_cb.encoder.s16NumOfSubBands = 8;
|
||||
a2dp_source_local_param.btc_aa_src_cb.encoder.s16NumOfBlocks = 8;
|
||||
a2dp_source_local_param.btc_aa_src_cb.encoder.s16AllocationMethod = SBC_LOUDNESS;
|
||||
a2dp_source_local_param.btc_aa_src_cb.encoder.s16ChannelMode = SBC_MONO;
|
||||
a2dp_source_local_param.btc_aa_src_cb.encoder.s16SamplingFreq = SBC_sf44100;
|
||||
SBC_Encoder_Init(&(a2dp_source_local_param.btc_aa_src_cb.encoder));
|
||||
}
|
||||
#endif /* A2D_SRC_BQB_INCLUDED */
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btc_a2dp_source_pcm2sbc_init
|
||||
@ -998,6 +1026,12 @@ static void btc_a2dp_source_pcm2sbc_init(tBTC_MEDIA_INIT_AUDIO_FEEDING *p_feedin
|
||||
} else {
|
||||
APPL_TRACE_DEBUG("%s no SBC reconfig needed", __FUNCTION__);
|
||||
}
|
||||
|
||||
#if A2D_SRC_BQB_INCLUDED
|
||||
if (a2dp_src_bqb_set_sbc_encoder_flag) {
|
||||
btc_a2dp_source_bqb_sbc_encoder_set();
|
||||
}
|
||||
#endif /* A2D_SRC_BQB_INCLUDED */
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
@ -2082,6 +2082,12 @@
|
||||
#define A2D_INCLUDED FALSE
|
||||
#endif
|
||||
|
||||
#if (BTC_AV_SRC_INCLUDED == TRUE) && (BT_CLASSIC_BQB_INCLUDED == TRUE)
|
||||
#define A2D_SRC_BQB_INCLUDED TRUE
|
||||
#else
|
||||
#define A2D_SRC_BQB_INCLUDED FALSE
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
**
|
||||
** AVCTP
|
||||
|
Loading…
Reference in New Issue
Block a user