Index: format/app_mouse.format
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/format/app_mouse.format	(revision 5946)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/format/app_mouse.format	(working copy)
@@ -10,7 +10,7 @@
 
 //audio
 0 mem_voice_raw_start
-719 mem_voice_raw
+959 mem_voice_raw
 1 mem_voice_raw_end
 
 120 mem_adpcm
@@ -418,12 +418,13 @@
 
 //audio buf len
 (
-720 	AUDIO_BUF_LEN
+// 720 	AUDIO_BUF_LEN
+960     AUDIO_BUF_LEN
 240 	AUDIO_BUF_UINT
 
 300 	VOICE_QUEUE_SIZE
 60 	VOICE_QUEUE_UNIT
-5	VOICE_QUEUE_MAX_COUNT
+4	VOICE_QUEUE_MAX_COUNT
 )
 
 (
Index: output/eeprom.dat
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/output/eeprom.dat	(revision 5946)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/output/eeprom.dat	(working copy)
@@ -1002,8 +1002,8 @@
 d2
 bd
 02
-aa
-f3
+ab
+c3
 50
 c1
 49
@@ -2974,8 +2974,8 @@
 6c
 66
 dc
-83
-7e
+82
+4e
 e8
 53
 2b
@@ -3662,8 +3662,8 @@
 8e
 84
 9b
-56
-b7
+57
+87
 f5
 95
 61
@@ -4786,8 +4786,8 @@
 a6
 56
 0e
-89
-66
+88
+56
 b0
 f9
 ac
@@ -5198,8 +5198,8 @@
 3b
 2c
 de
-77
-70
+76
+40
 98
 02
 9d
@@ -5242,8 +5242,8 @@
 2c
 44
 b2
-97
-9b
+96
+ab
 84
 fe
 84
@@ -5634,8 +5634,8 @@
 b3
 d8
 bf
-67
-5e
+66
+6e
 ac
 25
 7f
@@ -5726,8 +5726,8 @@
 84
 b5
 54
-54
-54
+55
+44
 4a
 93
 c7
@@ -6697,8 +6697,8 @@
 60
 aa
 2f
-a7
-9c
+a6
+ac
 b2
 bd
 bc
@@ -7038,12 +7038,12 @@
 f2
 84
 34
-54
-8b
+55
+bb
 12
 26
 3f
-81
+80
 1f
 a3
 52
@@ -7066,16 +7066,16 @@
 2b
 d4
 33
-e1
-8d
+e2
+9d
 38
 d4
 ef
 3b
 55
 f2
-dc
-a1
+dd
+b1
 d4
 54
 82
@@ -7086,16 +7086,16 @@
 da
 8b
 5f
-35
-8d
+34
+bd
 21
 5d
 39
 d9
 e8
 35
-e8
-84
+e9
+b4
 12
 63
 12
@@ -7138,8 +7138,8 @@
 6f
 c5
 ca
-b5
-02
+b4
+12
 e0
 4e
 6e
@@ -7158,8 +7158,8 @@
 77
 6c
 66
-d5
-b0
+d4
+a0
 8c
 10
 a3
@@ -7206,8 +7206,8 @@
 bd
 58
 40
-c8
-a9
+c9
+99
 9d
 3f
 09
@@ -7230,8 +7230,8 @@
 6d
 34
 b0
-bd
-06
+be
+16
 a0
 fb
 74
@@ -7242,36 +7242,36 @@
 dd
 bc
 f4
-48
-5d
+49
+6d
 10
 10
 54
 0a
 21
 e2
-22
-4e
+23
+7e
 cd
 32
 04
 de
 6a
 28
-35
-f2
+34
+c2
 20
 5c
-6c
-d6
+6d
+e6
 70
 3b
 1e
 9d
 fe
 d7
-be
-5d
+bd
+4d
 dd
 69
 46
@@ -7281,8 +7281,8 @@
 05
 85
 d6
-43
-d2
+42
+e2
 72
 2d
 5d
@@ -7302,8 +7302,8 @@
 7d
 f2
 a7
-41
-2e
+40
+3e
 de
 37
 b5
@@ -8160,8 +8160,8 @@
 72
 6e
 2a
-79
-bd
+ba
+ec
 95
 18
 aa
@@ -9255,8 +9255,8 @@
 4c
 26
 0a
-f5
-0c
+e5
+0d
 aa
 55
 74
@@ -10135,7 +10135,7 @@
 aa
 aa
 55
-7e
+6f
 f8
 ff
 20
@@ -11787,8 +11787,8 @@
 4e
 01
 70
-0e
-a2
+0f
+92
 00
 70
 48
@@ -11934,8 +11934,8 @@
 00
 00
 00
-68
-58
+b6
+9f
 ff
 1e
 f0
Index: output/memmap.format
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/output/memmap.format	(revision 5946)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/output/memmap.format	(working copy)
@@ -206,14 +206,14 @@
 0x06f2 mem_ui_le_uuid_table_new
 0x0a26 mem_voice_raw_start
 0x0a26 mem_voice_raw
-0x0cf5 mem_voice_raw_end
-0x0cf6 mem_adpcm
-0x0d6e mem_voice_adpcm_buf_config
-0x0d76 mem_voice_adpcm_buf_start
-0x0d76 mem_voice_adpcm_buf
-0x0ea2 mem_voice_queue_count
-0x0ea3 mem_queue_buf
-0x0edf mem_memalloc_mouse_param_end
+0x0de5 mem_voice_raw_end
+0x0de6 mem_adpcm
+0x0e5e mem_voice_adpcm_buf_config
+0x0e66 mem_voice_adpcm_buf_start
+0x0e66 mem_voice_adpcm_buf
+0x0f92 mem_voice_queue_count
+0x0f93 mem_queue_buf
+0x0fcf mem_memalloc_mouse_param_end
 0x06e7 mem_malloc_rec_start
 0x06e7 mem_rec_queue_ota_sptr
 0x06e9 mem_rec_queue_ota_eptr
Index: output/otp.dat
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/output/otp.dat	(revision 5946)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/output/otp.dat	(working copy)
@@ -1011,8 +1011,8 @@
 d2
 bd
 02
-aa
-f3
+ab
+c3
 50
 c1
 49
@@ -2983,8 +2983,8 @@
 6c
 66
 dc
-83
-7e
+82
+4e
 e8
 53
 2b
@@ -3671,8 +3671,8 @@
 8e
 84
 9b
-56
-b7
+57
+87
 f5
 95
 61
@@ -4795,8 +4795,8 @@
 a6
 56
 0e
-89
-66
+88
+56
 b0
 f9
 ac
@@ -5207,8 +5207,8 @@
 3b
 2c
 de
-77
-70
+76
+40
 98
 02
 9d
@@ -5251,8 +5251,8 @@
 2c
 44
 b2
-97
-9b
+96
+ab
 84
 fe
 84
@@ -5643,8 +5643,8 @@
 b3
 d8
 bf
-67
-5e
+66
+6e
 ac
 25
 7f
@@ -5735,8 +5735,8 @@
 84
 b5
 54
-54
-54
+55
+44
 4a
 93
 c7
@@ -6706,8 +6706,8 @@
 60
 aa
 2f
-a7
-9c
+a6
+ac
 b2
 bd
 bc
@@ -7047,12 +7047,12 @@
 f2
 84
 34
-54
-8b
+55
+bb
 12
 26
 3f
-81
+80
 1f
 a3
 52
@@ -7075,16 +7075,16 @@
 2b
 d4
 33
-e1
-8d
+e2
+9d
 38
 d4
 ef
 3b
 55
 f2
-dc
-a1
+dd
+b1
 d4
 54
 82
@@ -7095,16 +7095,16 @@
 da
 8b
 5f
-35
-8d
+34
+bd
 21
 5d
 39
 d9
 e8
 35
-e8
-84
+e9
+b4
 12
 63
 12
@@ -7147,8 +7147,8 @@
 6f
 c5
 ca
-b5
-02
+b4
+12
 e0
 4e
 6e
@@ -7167,8 +7167,8 @@
 77
 6c
 66
-d5
-b0
+d4
+a0
 8c
 10
 a3
@@ -7215,8 +7215,8 @@
 bd
 58
 40
-c8
-a9
+c9
+99
 9d
 3f
 09
@@ -7239,8 +7239,8 @@
 6d
 34
 b0
-bd
-06
+be
+16
 a0
 fb
 74
@@ -7251,36 +7251,36 @@
 dd
 bc
 f4
-48
-5d
+49
+6d
 10
 10
 54
 0a
 21
 e2
-22
-4e
+23
+7e
 cd
 32
 04
 de
 6a
 28
-35
-f2
+34
+c2
 20
 5c
-6c
-d6
+6d
+e6
 70
 3b
 1e
 9d
 fe
 d7
-be
-5d
+bd
+4d
 dd
 69
 46
@@ -7290,8 +7290,8 @@
 05
 85
 d6
-43
-d2
+42
+e2
 72
 2d
 5d
@@ -7311,8 +7311,8 @@
 7d
 f2
 a7
-41
-2e
+40
+3e
 de
 37
 b5
@@ -8169,8 +8169,8 @@
 72
 6e
 2a
-79
-bd
+ba
+ec
 95
 18
 aa
@@ -9264,8 +9264,8 @@
 4c
 26
 0a
-f5
-0c
+e5
+0d
 aa
 55
 74
@@ -10144,7 +10144,7 @@
 aa
 aa
 55
-7e
+6f
 f8
 ff
 20
@@ -11796,8 +11796,8 @@
 4e
 01
 70
-0e
-a2
+0f
+92
 00
 70
 48
@@ -11943,6 +11943,6 @@
 00
 00
 00
-68
-58
+b6
+9f
 24
Index: output/program.lis
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/output/program.lis	(revision 5946)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/output/program.lis	(working copy)
@@ -305,7 +305,7 @@
 
 p_mouse_lpm_wake_param_init:
 00f4 58000000 setarg 0 
-00f5 67e08ea2 store 1 ,mem_voice_queue_count 
+00f5 67e08f92 store 1 ,mem_voice_queue_count 
 00f6 20600000 rtn 
 
 p_app_init:
@@ -962,7 +962,7 @@
 02df 5800003c setarg voice_queue_unit 
 02e0 e7e08005 istore 1 ,contw 
 02e1 df20003c arg voice_queue_unit ,loopcnt 
-02e2 d8c00ea3 arg mem_queue_buf ,contr 
+02e2 d8c00f93 arg mem_queue_buf ,contr 
 02e3 20407cdc call memcpy 
 02e4 58000000 setarg 0 
 02e5 e7e10005 istore 2 ,contw 
@@ -1196,7 +1196,7 @@
 038b 20403224 call g24_timer_check 
 038c 24740000 nrtn user 
 038d 204036b5 call g24_interval_calibrate 
-038e 6fe08ea2 fetch 1 ,mem_voice_queue_count 
+038e 6fe08f92 fetch 1 ,mem_voice_queue_count 
 038f 245a0420 ncall p_g24_send_audio_info_enable ,blank 
 0390 6fe14630 fetch 2 ,mem_24g_transmit_by_interrupt_exit_count 
 0391 1fe0fe01 increase 1 ,pdata 
@@ -1613,7 +1613,7 @@
 p_g24_audio_data_out_from_queue:
 04a5 6fe0cc6f fetch 1 ,mem_voice_enable 
 04a6 207a0000 rtn blank 
-04a7 6fe08ea2 fetch 1 ,mem_voice_queue_count 
+04a7 6fe08f92 fetch 1 ,mem_voice_queue_count 
 04a8 207a0000 rtn blank 
 04a9 2020070a branch p_voice_out_queue 
 
@@ -1752,7 +1752,7 @@
 050b 79207e05 set1 audio_bit ,pdata 
 050c 67e0cc76 store 1 ,mem_ms_24g_temp_buff 
 050d df20003c arg voice_queue_unit ,loopcnt 
-050e d8c00ea3 arg mem_queue_buf ,contr 
+050e d8c00f93 arg mem_queue_buf ,contr 
 050f d8a04c77 arg mem_ms_24g_temp_buff + 1 ,contw 
 0510 20407cdc call memcpy 
 0511 d840003d arg 61 ,temp 
@@ -1765,7 +1765,7 @@
 0516 79207e05 set1 audio_bit ,pdata 
 0517 67e0c7c2 store 1 ,mem_24g_txbuf_new 
 0518 df20003c arg voice_queue_unit ,loopcnt 
-0519 d8c00ea3 arg mem_queue_buf ,contr 
+0519 d8c00f93 arg mem_queue_buf ,contr 
 051a d8a047c3 arg mem_24g_txbuf_new + 1 ,contw 
 051b 20207cdc branch memcpy 
 
@@ -1887,7 +1887,7 @@
 p_mouse_g24_hop_set:
 0579 6fe0c678 fetch 1 ,mem_device_flag 
 057a c1800000 rtnne mode_24g_device 
-057b 6fe08ea2 fetch 1 ,mem_voice_queue_count 
+057b 6fe08f92 fetch 1 ,mem_voice_queue_count 
 057c 203a057f branch p_mouse_default_hop_set ,blank 
 
 p_mouse_audio_hop_set:
@@ -1922,7 +1922,7 @@
 p_audio_data_get_enable:
 0590 704c6f01 jam 1 ,mem_voice_enable 
 0591 d8a00a26 arg mem_voice_raw_start ,contw 
-0592 df2002d0 arg audio_buf_len ,loopcnt 
+0592 df2003c0 arg audio_buf_len ,loopcnt 
 0593 20207ca3 branch clear_mem 
 
 p_mouse_audio_key_scan:
@@ -2241,7 +2241,7 @@
 0682 704c6f00 jam 0 ,mem_voice_enable 
 0683 70442700 jam 0 ,mem_adc_dma_enable 
 0684 7046380f jam 0x0f ,mem_24g_fast_hop_count 
-0685 700ea200 jam 0 ,mem_voice_queue_count 
+0685 700f9200 jam 0 ,mem_voice_queue_count 
 0686 7080cc00 jam 0 ,core_sadc_ctrl 
 0687 704c6e00 jam adc_battery ,mem_ms_adc_mode 
 0688 20406fb2 call enable_adc 
@@ -2350,21 +2350,21 @@
 06d9 20610000 rtn positive 
 
 p_voice_enter_queue:
-06da 6fe08ea2 fetch 1 ,mem_voice_queue_count 
-06db d8400005 arg voice_queue_max_count ,temp 
+06da 6fe08f92 fetch 1 ,mem_voice_queue_count 
+06db d8400004 arg voice_queue_max_count ,temp 
 06dc 184085ff increase -1 ,temp 
 06dd 98467c00 isub temp ,null 
 06de 20610000 rtn positive 
 06df 20400719 call p_audio_adpcm_encode 
 06e0 204006f6 call p_audio_update_adc_rptr 
-06e1 58000d76 setarg mem_voice_adpcm_buf_start 
+06e1 58000e66 setarg mem_voice_adpcm_buf_start 
 06e2 204060ac call rec_queue_enter_config 
-06e3 d8c00cf6 arg mem_adpcm ,contr 
+06e3 d8c00de6 arg mem_adpcm ,contr 
 06e4 df20003c arg voice_queue_unit ,loopcnt 
 06e5 204060c0 call rec_enter_queue 
-06e6 6fe08ea2 fetch 1 ,mem_voice_queue_count 
+06e6 6fe08f92 fetch 1 ,mem_voice_queue_count 
 06e7 1fe0fe01 increase 1 ,pdata 
-06e8 67e08ea2 store 1 ,mem_voice_queue_count 
+06e8 67e08f92 store 1 ,mem_voice_queue_count 
 06e9 20600000 rtn 
 
 p_audio_get_len:
@@ -2379,14 +2379,14 @@
 06f0 1a220400 copy rega ,temp 
 06f1 6fe14c70 fetch 2 ,mem_adc_dma_rptr 
 06f2 98460400 isub temp ,temp 
-06f3 580002d0 setarg audio_buf_len 
+06f3 580003c0 setarg audio_buf_len 
 06f4 98467e00 isub temp ,pdata 
 06f5 20600000 rtn 
 
 p_audio_update_adc_rptr:
 06f6 6fe14c70 fetch 2 ,mem_adc_dma_rptr 
 06f7 1fe0fef0 increase audio_buf_uint ,pdata 
-06f8 d8400cf5 arg mem_voice_raw_end ,temp 
+06f8 d8400de5 arg mem_voice_raw_end ,temp 
 06f9 18408401 increase 1 ,temp 
 06fa 98467c00 isub temp ,null 
 06fb 202286fd branch p_audio_adc_dma_ptr_over ,zero 
@@ -2404,7 +2404,7 @@
 0701 c1000000 rtneq mode_24g_device 
 0702 6fe0cc6f fetch 1 ,mem_voice_enable 
 0703 207a0000 rtn blank 
-0704 6fe08ea2 fetch 1 ,mem_voice_queue_count 
+0704 6fe08f92 fetch 1 ,mem_voice_queue_count 
 0705 207a0000 rtn blank 
 0706 20402a06 call le_fifo_check_nearly_full 
 0707 247a0000 nrtn blank 
@@ -2412,29 +2412,29 @@
 0709 202002dc branch p_ms_le_tx_audio_data 
 
 p_voice_out_queue:
-070a 58000d76 setarg mem_voice_adpcm_buf_start 
+070a 58000e66 setarg mem_voice_adpcm_buf_start 
 070b 204060b6 call rec_queue_out_config 
 070c df20003c arg voice_queue_unit ,loopcnt 
-070d d8a00ea3 arg mem_queue_buf ,contw 
+070d d8a00f93 arg mem_queue_buf ,contw 
 070e 20406068 call rec_out_queue 
-070f 6fe08ea2 fetch 1 ,mem_voice_queue_count 
+070f 6fe08f92 fetch 1 ,mem_voice_queue_count 
 0710 1fe0ffff increase -1 ,pdata 
-0711 67e08ea2 store 1 ,mem_voice_queue_count 
-0712 58000ea3 setarg mem_queue_buf 
+0711 67e08f92 store 1 ,mem_voice_queue_count 
+0712 58000f93 setarg mem_queue_buf 
 0713 20600000 rtn 
 
 p_voice_queue_init:
-0714 58000d76 setarg mem_voice_adpcm_buf_start 
+0714 58000e66 setarg mem_voice_adpcm_buf_start 
 0715 d840012c arg voice_queue_size ,temp 
 0716 20406048 call rec_queue_init_config 
-0717 700ea200 jam 0 ,mem_voice_queue_count 
+0717 700f9200 jam 0 ,mem_voice_queue_count 
 0718 20600000 rtn 
 
 p_audio_adpcm_encode:
 0719 704c4478 jam 120 ,mem_ad_in_numsamples1 
 071a 6fe14c70 fetch 2 ,mem_adc_dma_rptr 
 071b 67e14c45 store 2 ,mem_ad_in_ptr1 
-071c 58000cf6 setarg mem_adpcm 
+071c 58000de6 setarg mem_adpcm 
 071d 67e14c47 store 2 ,mem_ad_out_ptr1 
 
 p_adpcm_encode:
@@ -35096,7 +35096,7 @@
 10019 20400020 call z_g24_pair_param_init 
 1001a 7045e101 jam 1 ,mem_24g_disable_fec1 
 1001b 70444e01 jam 1 ,mem_power_ctrl_disable 
-1001c 700ea200 jam 0 ,mem_voice_queue_count 
+1001c 700f9200 jam 0 ,mem_voice_queue_count 
 1001d 7048fa01 jam 1 ,mem_mouse_sleep_deal_type 
 1001e 7048ef10 jam 0x10 ,mem_mouse_24g_tx_time_sum_count 
 1001f 20600000 rtn 
Index: program/patch.prog
===================================================================
--- /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/program/patch.prog	(revision 5946)
+++ /1121s/1121se/branch/mouse/AI_Project/baidu_project/xzr_ai_mouse/XZR_ai_voice_baidu_public/program/patch.prog	(working copy)
@@ -4,7 +4,7 @@
 //define UART_LOG
 ifdef UART_LOG
 define LOG_RAW
-define LOG_ENCODE
+// define LOG_ENCODE
 endif
 define AUDIO_DEMO
 
@@ -2579,7 +2579,7 @@
 	// branch p_audio_init
 p_audio_init:
 	call sadc_calibration
-	jam 0x00,mem_adc_channel//gpio9
+	jam 0x00,mem_adc_channel
 	jam 1,mem_adc_clkdiv
 	jam 1,mem_adc_dma_enable
 	jam ADC_AUDIO,mem_ms_adc_mode
@@ -2605,8 +2605,8 @@
 p_enable_adc_audio:
 	jam 0x1b,0x8ac6	//micbias enable
 	// jam 0x1f,0x8ac7	//micbias gain control 1.65v
-	// jam 0x3f,0x8ac7 //2V
-	jam 0x3f,0x8ac7 //2.4v
+	jam 0x3f,0x8ac7 //2V
+	// jam 0x5f,0x8ac7 //2.4v
 	// jam 0x7f,0x8ac7 //2.8v
 	call sadc_cal_write
 	fetch 1,core_gpadc_cfg1
