Edit config for mics
This commit is contained in:
parent
6f1c846969
commit
11b9eb7fc5
|
@ -104,7 +104,7 @@ const struct HAL_KEY_GPIOKEY_CFG_T cfg_hw_gpio_key_cfg[CFG_HW_GPIOKEY_NUM] = {
|
||||||
// bt config
|
// bt config
|
||||||
// const char *BT_LOCAL_NAME = TO_STRING(BT_DEV_NAME) "\0";
|
// const char *BT_LOCAL_NAME = TO_STRING(BT_DEV_NAME) "\0";
|
||||||
const char *BT_LOCAL_NAME = "PineBuds Pro";
|
const char *BT_LOCAL_NAME = "PineBuds Pro";
|
||||||
const char *BLE_DEFAULT_NAME = "BES_BLE";
|
const char *BLE_DEFAULT_NAME = "PineBuds Pro BLE";
|
||||||
uint8_t ble_addr[6] = {
|
uint8_t ble_addr[6] = {
|
||||||
#ifdef BLE_DEV_ADDR
|
#ifdef BLE_DEV_ADDR
|
||||||
BLE_DEV_ADDR
|
BLE_DEV_ADDR
|
||||||
|
@ -122,6 +122,7 @@ uint8_t bt_addr[6] = {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// True Wireless side configuration using resistor fitment
|
||||||
const struct HAL_IOMUX_PIN_FUNCTION_MAP cfg_hw_tws_channel_cfg = {
|
const struct HAL_IOMUX_PIN_FUNCTION_MAP cfg_hw_tws_channel_cfg = {
|
||||||
HAL_IOMUX_PIN_P1_4, HAL_IOMUX_FUNC_AS_GPIO, HAL_IOMUX_PIN_VOLTAGE_VIO,
|
HAL_IOMUX_PIN_P1_4, HAL_IOMUX_FUNC_AS_GPIO, HAL_IOMUX_PIN_VOLTAGE_VIO,
|
||||||
HAL_IOMUX_PIN_PULLUP_ENABLE};
|
HAL_IOMUX_PIN_PULLUP_ENABLE};
|
||||||
|
@ -159,21 +160,23 @@ const struct CODEC_DAC_VOL_T codec_dac_vol[TGT_VOLUME_LEVEL_QTY] = {
|
||||||
{TX_PA_GAIN, 0x03, -3}, {TX_PA_GAIN, 0x03, 0}, // 0dBm
|
{TX_PA_GAIN, 0x03, -3}, {TX_PA_GAIN, 0x03, 0}, // 0dBm
|
||||||
};
|
};
|
||||||
|
|
||||||
#if SPEECH_CODEC_CAPTURE_CHANNEL_NUM == 2
|
// MIC and channel configurations
|
||||||
#define CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV \
|
// Pinebuds pro have the following mic's and biases
|
||||||
(AUD_CHANNEL_MAP_CH0 | AUD_CHANNEL_MAP_CH4 | AUD_VMIC_MAP_VMIC2 | \
|
/*
|
||||||
AUD_VMIC_MAP_VMIC3)
|
|
||||||
#elif SPEECH_CODEC_CAPTURE_CHANNEL_NUM == 3
|
* User Voice (Talking) = MIC5 input and VMIC3 Bias
|
||||||
#define CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV \
|
* ANC Feed Forward = MIC1 input and VMIC2 Bias
|
||||||
(AUD_CHANNEL_MAP_CH0 | AUD_CHANNEL_MAP_CH1 | AUD_CHANNEL_MAP_CH4 | \
|
* ANC Feed Backward = MIC3 input and VMIC2 Bias
|
||||||
AUD_VMIC_MAP_VMIC1)
|
*
|
||||||
#else
|
* Note that AUD_CHANNEL_MAP is offset by 1 (0 start)
|
||||||
#define CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV \
|
*/
|
||||||
(AUD_CHANNEL_MAP_CH4 | AUD_VMIC_MAP_VMIC3)
|
|
||||||
#endif
|
|
||||||
|
#define USER_TALK_MIC AUD_CHANNEL_MAP_CH4
|
||||||
|
#define USER_TALK_VMIC_CFG AUD_VMIC_MAP_VMIC3
|
||||||
|
|
||||||
|
#define CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV (USER_TALK_MIC | USER_TALK_VMIC_CFG)
|
||||||
|
|
||||||
#define CFG_HW_AUD_INPUT_PATH_LINEIN_DEV \
|
|
||||||
(AUD_CHANNEL_MAP_CH0 | AUD_CHANNEL_MAP_CH1)
|
|
||||||
#ifdef VOICE_DETECTOR_EN
|
#ifdef VOICE_DETECTOR_EN
|
||||||
#define CFG_HW_AUD_INPUT_PATH_VADMIC_DEV \
|
#define CFG_HW_AUD_INPUT_PATH_VADMIC_DEV \
|
||||||
(AUD_CHANNEL_MAP_CH4 | AUD_VMIC_MAP_VMIC1)
|
(AUD_CHANNEL_MAP_CH4 | AUD_VMIC_MAP_VMIC1)
|
||||||
|
@ -184,32 +187,23 @@ const struct CODEC_DAC_VOL_T codec_dac_vol[TGT_VOLUME_LEVEL_QTY] = {
|
||||||
|
|
||||||
const struct AUD_IO_PATH_CFG_T
|
const struct AUD_IO_PATH_CFG_T
|
||||||
cfg_audio_input_path_cfg[CFG_HW_AUD_INPUT_PATH_NUM] = {
|
cfg_audio_input_path_cfg[CFG_HW_AUD_INPUT_PATH_NUM] = {
|
||||||
#if defined(SPEECH_TX_AEC_CODEC_REF)
|
|
||||||
// NOTE: If enable Ch5 and CH6, need to add channel_num when setup
|
|
||||||
// audioflinger stream
|
|
||||||
{
|
|
||||||
AUD_INPUT_PATH_MAINMIC,
|
|
||||||
CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV | AUD_CHANNEL_MAP_CH4,
|
|
||||||
},
|
|
||||||
#else
|
|
||||||
{
|
{
|
||||||
AUD_INPUT_PATH_MAINMIC,
|
AUD_INPUT_PATH_MAINMIC,
|
||||||
CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV,
|
CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV,
|
||||||
},
|
},
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
AUD_INPUT_PATH_LINEIN,
|
AUD_INPUT_PATH_LINEIN,
|
||||||
CFG_HW_AUD_INPUT_PATH_LINEIN_DEV,
|
CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV,
|
||||||
},
|
},
|
||||||
#ifdef VOICE_DETECTOR_EN
|
#ifdef VOICE_DETECTOR_EN
|
||||||
{
|
{
|
||||||
AUD_INPUT_PATH_VADMIC,
|
AUD_INPUT_PATH_VADMIC,
|
||||||
CFG_HW_AUD_INPUT_PATH_VADMIC_DEV,
|
CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV,
|
||||||
},
|
},
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
AUD_INPUT_PATH_ASRMIC,
|
AUD_INPUT_PATH_ASRMIC,
|
||||||
CFG_HW_AUD_INPUT_PATH_ASRMIC_DEV,
|
CFG_HW_AUD_INPUT_PATH_MAINMIC_DEV,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -233,16 +227,6 @@ HAL_IOMUX_PIN_PULLUP_ENABLE
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// const struct HAL_IOMUX_PIN_FUNCTION_MAP TOUCH_I2C_SDA ={
|
|
||||||
// HAL_IOMUX_PIN_P2_1, HAL_IOMUX_FUNC_AS_GPIO, HAL_IOMUX_PIN_VOLTAGE_VIO,
|
|
||||||
// HAL_IOMUX_PIN_PULLUP_ENABLE
|
|
||||||
// };
|
|
||||||
|
|
||||||
// const struct HAL_IOMUX_PIN_FUNCTION_MAP TOUCH_I2C_SCL ={
|
|
||||||
// HAL_IOMUX_PIN_P2_0, HAL_IOMUX_FUNC_AS_GPIO, HAL_IOMUX_PIN_VOLTAGE_VIO,
|
|
||||||
// HAL_IOMUX_PIN_PULLUP_ENABLE
|
|
||||||
// };
|
|
||||||
|
|
||||||
#define IIR_COUNTER_FF_L (6)
|
#define IIR_COUNTER_FF_L (6)
|
||||||
#define IIR_COUNTER_FF_R (6)
|
#define IIR_COUNTER_FF_R (6)
|
||||||
#define IIR_COUNTER_FB_L (5)
|
#define IIR_COUNTER_FB_L (5)
|
||||||
|
|
|
@ -96,10 +96,25 @@ extern const struct HAL_KEY_GPIOKEY_CFG_T cfg_hw_gpio_key_cfg[CFG_HW_GPIOKEY_NUM
|
||||||
#define ANC_COEF_LIST_NUM (ANC_COEF_NUM)
|
#define ANC_COEF_LIST_NUM (ANC_COEF_NUM)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// MIC and channel configurations
|
||||||
|
// Pinebuds pro have the following mic's and biases
|
||||||
|
/*
|
||||||
|
|
||||||
|
* User Voice (Talking) = MIC5 input and VMIC3 Bias
|
||||||
|
* ANC Feed Forward = MIC1 input and VMIC2 Bias
|
||||||
|
* ANC Feed Backward = MIC3 input and VMIC2 Bias
|
||||||
|
*
|
||||||
|
* Note that AUD_CHANNEL_MAP is offset by 1 (0 start)
|
||||||
|
*/
|
||||||
|
|
||||||
#define ANC_FF_MIC_CH_L AUD_CHANNEL_MAP_CH0
|
#define ANC_FF_MIC_CH_L AUD_CHANNEL_MAP_CH0
|
||||||
#define ANC_FF_MIC_CH_R AUD_CHANNEL_MAP_CH1
|
#define ANC_FF_MIC_CH_R 0
|
||||||
#define ANC_FB_MIC_CH_L AUD_CHANNEL_MAP_CH2
|
#define ANC_FB_MIC_CH_L AUD_CHANNEL_MAP_CH2
|
||||||
#define ANC_FB_MIC_CH_R AUD_CHANNEL_MAP_CH3
|
#define ANC_FB_MIC_CH_R 0
|
||||||
|
|
||||||
|
#define ANC_FF_MIC AUD_CHANNEL_MAP_CH0
|
||||||
|
#define ANC_FB_MIC AUD_CHANNEL_MAP_CH2
|
||||||
|
#define ANC_VMIC_CFG AUD_VMIC_MAP_VMIC2
|
||||||
|
|
||||||
// audio codec
|
// audio codec
|
||||||
#define CFG_HW_AUD_INPUT_PATH_NUM 3
|
#define CFG_HW_AUD_INPUT_PATH_NUM 3
|
||||||
|
@ -139,8 +154,6 @@ extern const struct HAL_IOMUX_PIN_FUNCTION_MAP app_battery_ext_charger_indicator
|
||||||
|
|
||||||
extern bool tgt_tws_get_channel_is_right(void);
|
extern bool tgt_tws_get_channel_is_right(void);
|
||||||
|
|
||||||
extern const struct HAL_IOMUX_PIN_FUNCTION_MAP TOUCH_I2C_SDA;
|
|
||||||
extern const struct HAL_IOMUX_PIN_FUNCTION_MAP TOUCH_I2C_SCL;
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue