This commit is contained in:
Ben V. Brown 2022-12-27 10:27:11 +11:00
parent 29b195e12d
commit 503d630b07
6 changed files with 54 additions and 3 deletions

View File

@ -33,6 +33,7 @@
#include "anc_assist.h"
#include "app_ibrt_keyboard.h"
#include "app_ibrt_ui.h"
#include "apps.h"
#include "app_status_ind.h"
#ifdef __SIMPLE_INTERNAL_PLAYER_SUPPORT__
@ -1423,11 +1424,15 @@ static int app_anc_handle_process(APP_MESSAGE_BODY *msg_body)
{
anc_work_status = ANC_STATUS_ON;
//recommand to play "ANC ON" prompt here...
app_voice_report(APP_STATUS_INDICATION_ALEXA_START,0);//close latlatency mode
}
if (evt == ANC_EVENT_FADE_OUT)
{
anc_work_status = ANC_STATUS_INIT_ON;
//recommand to play "ANC OFF" prompt here...
app_voice_report(APP_STATUS_INDICATION_ALEXA_STOP,0);//close latlatency mode
}
break;
case ANC_EVENT_CHANGE_SAMPLERATE:

View File

@ -2297,7 +2297,7 @@ extern int rpc_service_setup(void);
usb_os_init();
#endif
nRet = app_battery_open();
TRACE(1,"BATTERY %d",nRet);
TRACE(1,"Yin BATTERY %d",nRet);
if (pwron_case != APP_POWERON_CASE_TEST){
#ifdef USER_REBOOT_PLAY_MUSIC_AUTO
TRACE(0,"hal_sw_bootmode_clear HAL_SW_BOOTMODE_LOCAL_PLAYER!!!!!!");
@ -2320,6 +2320,8 @@ extern int rpc_service_setup(void);
#elif defined(BTUSB_AUDIO_MODE)
goto exit;
#endif
goto exit;
break;
case APP_BATTERY_OPEN_MODE_CHARGING_PWRON:
TRACE(0,"CHARGING PWRON!");
@ -2366,6 +2368,14 @@ extern int rpc_service_setup(void);
#ifdef AUDIO_LOOPBACK
while (1)
{
/* code */
uint8_t gpio_val = hal_gpio_pin_get_val((enum HAL_GPIO_PIN_T)app_battery_ext_charger_detecter_cfg.pin);
osDelay(500);
TRACE(1,"gpio val is:%d \n\r",gpio_val);
}
#ifdef WL_DET
app_mic_alg_audioloop(true,APP_SYSFREQ_78M);
#endif

View File

@ -4,6 +4,6 @@ num=$(ls -l /dev/ttyUSB* | rev | cut -c 1)
#num=3
echo com is:$num
#sudo -S dldtool -c $num -f out/2300_open_source/2300_open_source.bin
sudo -S dldtool -c $num -f out/mic_alg/mic_alg.bin
sudo -S dldtool -c $num -f out/open_source/open_source.bin
sudo minicom port$num

8
log.txt Normal file
View File

@ -0,0 +1,8 @@
MAKE START: 2022-11-28 10:41:11.124503821
make[1]: Entering directory '/home/caoyin/doc/jisheng_code/js_customer_code/shenzhen_meng_23000yp/best2300yp_open_source/out/open_source'
-------------------------------
REVISION_INFO: 29b195e-dirty:open_source
-------------------------------
make[1]: Leaving directory '/home/caoyin/doc/jisheng_code/js_customer_code/shenzhen_meng_23000yp/best2300yp_open_source/out/open_source'
MAKE END: 2022-11-28 10:41:11.262680315
MAKE TIME: 0.14 seconds

28
notes.txt Normal file
View File

@ -0,0 +1,28 @@
说明文档:
1 核心函数在这个函数里面:
void vol_state_process(uint32_t db_val)
{
TRACE(2,"db value is:%d volume_is:%d ",db_val,app_bt_stream_local_volume_get());
if((db_val < 52) && (app_bt_stream_local_volume_get() > 10))
{
app_bt_volumedown();
}
else if((db_val > 60) && (app_bt_stream_local_volume_get() < 13))
{
app_bt_volumeup();
}
else if((db_val > 72) && (app_bt_stream_local_volume_get() < 15))
{
app_bt_volumeup();
}
}
该函数的含义是当前db小于52db的时候i且音量目前大于10,就降低音量,只要这个满足,会一直降低的
当周围噪声大于60db且目前音量小于13就增加音量。
当目前噪声音量大于72db且目前音量小于15,就增加音量。
假如想改变场景,只需要调整这个函数的里面的这几个数据即可。假如不知道怎么调整,把场景的日志发给我即可。
假如需要按键开关控制只需要在这个函数vol_state_process((uint32_t)db_sum);被调用的地方使用一个全局变量控制是否调用这个函数即可。

View File

@ -380,7 +380,7 @@ void app_bt_sleep(APP_KEY_STATUS *status, void *param)
{
TRACE(3,"%s %d,%d",__func__, status->code, status->event);
//app_ibrt_ui_event_entry(IBRT_CLOSE_BOX_EVENT);
a2dp_handleKey(AVRCP_KEY_PAUSE);
bt_key_handle_func_click();
}