合入sws调试pathc,降低雷鸟LCD MIPICLK,打开n9 230 低电提醒 2668/1 2668/head 2669/target/1
authorpenglei <1624952103@qq.com>
Sun, 2 Nov 2025 11:12:27 +0000 (19:12 +0800)
committerpenglei <1624952103@qq.com>
Sun, 2 Nov 2025 11:12:27 +0000 (19:12 +0800)
19 files changed:
code/sdk/application/wearable/fd230/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp
code/sdk/application/wearable/n9/service/msg_center/src/msg_center_customer.cpp
code/sdk/build/config/target_config/brandy/hdb_config/database_template/acore/system/hdbcfg/mss_cmd_db.xml
code/sdk/drivers/drivers/driver/lcd/lcd_config.c
code/sdk/middleware/chips/brandy/dfx/dfx_system_init.c
code/sdk/middleware/chips/brandy/dfx/diag_audio.c
code/sdk/middleware/chips/brandy/dfx/diag_audio.h
code/sdk/middleware/chips/brandy/dfx/include/soc_diag_cmd_id.h
code/sdk/middleware/chips/brandy/nv/nv_config/cfg/eng/acore/app.json
code/sdk/middleware/chips/brandy/nv/nv_config/cfg/user/acore/app.json
code/sdk/middleware/chips/brandy/nv/nv_config/include/common.h
code/sdk/middleware/chips/brandy/nv/nv_config/include/key_id.h
code/sdk/middleware/services/gpu/drv/dpu/hal/dpu_hal_crg.c
code/sdk/middleware/services/media/foundation/sample/wrapper/audio_manager_c_wrapper.cpp
code/sdk/middleware/services/media/foundation/sample/wrapper/audio_manager_c_wrapper.h
code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/include/plugin_common.h
code/sdk/middleware/services/media/hal/audio/plugins/brandy/common/src/plugin_common.c
code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_out.c

index c39a6e1..e003c56 100644 (file)
@@ -675,7 +675,7 @@ void MsgCenterNotifyChargeUnPlugProc(const Topic topic, Request* req)
 void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req)
 {
     WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: LowPower Alarm !");
-    #if 0
+    #if 1
     uint8 *x= (uint8 *)(req->data);
     const power_display_svr_api_t *display_api = power_display_svr_get_api();
  
index fbda45d..f09ea4f 100644 (file)
  void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req)
  {
      WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: LowPower Alarm !");
-     #if 0
+     #if 1
      uint8 *x= (uint8 *)(req->data);
      const power_display_svr_api_t *display_api = power_display_svr_get_api();
   
index a1a56e2..06cf214 100644 (file)
  void MsgCenterNotifyLowPowerAlarmProc(const Topic topic, Request* req)
  {
      WEARABLE_LOGI(WEARABLE_LOG_MODULE_APP, "MsgCenterNotifyProc:: LowPower Alarm !");
-     #if 0
+     #if 1
      uint8 *x= (uint8 *)(req->data);
      const power_display_svr_api_t *display_api = power_display_svr_get_api();
   
index 07b05e1..b4e57bb 100644 (file)
       <REQ STRUCTURE="audio_sws_mobile_para" TYPE="Auto" PARAM_VALUE="" />\r
       <IND STRUCTURE="audio_sws_mobile_para" TYPE="Auto" RESULT_CODE="" />\r
     </CMD>\r
+    <CMD ID="0x2e05" NAME="audio_aef_sws_save" DESCRIPTION="" PLUGIN="0x100,0x102(2),0x259" TYPE="REQ_IND">\r
+      <REQ STRUCTURE="audio_sws_mobile_para" TYPE="Auto" PARAM_VALUE="" />\r
+      <IND STRUCTURE="audio_sws_mobile_para" TYPE="Auto" RESULT_CODE="" />\r
+    </CMD>\r
     <CMD ID="0x3005" NAME="nv_read" DESCRIPTION="" PLUGIN="0x100,0x102(2),0x121" TYPE="REQ_IND">\r
       <REQ STRUCTURE="nv_read_input_t" TYPE="Auto" PARAM_VALUE="" />\r
       <IND STRUCTURE="nv_read_output_t" TYPE="Auto" RESULT_CODE="" />\r
index 3e8f573..416089d 100644 (file)
-/*\r
- * Copyright (c) @CompanyNameMagicTag 2022-2022. All rights reserved.\r
- * Description: Lcd driver configuration.\r
- * Author: @CompanyNameTag\r
- * Create: 2022-03-05\r
- */\r
-\r
-#include <stdint.h>\r
-#include "common_def.h"\r
-#include "lcd_config.h"\r
-\r
-#define LCD_EDO_502X410_SCREEN_ID  0xFFFF //CH13613\r
-#define LCD_EDO_466X466_SCREEN_ID  0x1133\r
-#define LCD_JD_360X360_SCREEN_ID   0x5598\r
-#define LCD_EDO_454X454_SCREEN_ID  0xf00\r
-#define LCD_BOE_454X454_SCREEN_ID  0x500\r
-#define LCD_SH_240X296_SCREEN_ID   0x101\r
-#define LCD_BOE_194X368_SCREEN_ID  0x4a00\r
-/* manufacturer id - driver version id - driver id (don't care for the moment) */\r
-#define LCD_ST7367_360X480_SCREEN_ID 0xFFFFFF\r
-\r
-const combo_dev_cfg_t g_panel_st7367_360x480_60_config = {\r
-    .devno = 0,\r
-    .lane_id = {0, -1},\r
-    .out_mode = OUT_MODE_DSI_VIDEO,\r
-    .out_format = OUT_FORMAT_RGB_24BIT,\r
-    .sync_info = {\r
-        .hsa_pixels   = 2,    // hsa 2 pixels\r
-        .hbp_pixels   = 20,   // hbp 20 pixels\r
-        .hact_pixels  = 360,  // hact 360 pixels\r
-        .hfp_pixels   = 20,   // hfp 20 pixels\r
-        .vsa_lines    = 1,    // vsa 1 lines\r
-        .vbp_lines    = 6,    // vbp 6 lines\r
-        .vact_lines   = 480,  // vact 480 lines\r
-        .vfp_lines    = 6,    // vfp 6 lines\r
-    },\r
-    .phy_data_rate = 288,     // 288Mbps\r
-    .pixel_clk = 12000,       // 12000KHz\r
-};\r
-\r
-/*\r
-pixel_clk 需要大于 sync_info 中的(hsa+hbp+hact+hfp)* \r
-(vsa+vbp+vact+vfp)* 60 / 1000 (帧率配置 60fps)\r
-\r
-. phy_data_rate=pixel_clk * 24 / 1000, 如果计算出来的值大于 500,需要调\r
-整降低帧率,减小 pixel_clk。\r
-\r
-当修改了 pixel_clk 时,需要同步修改\r
-“middleware\services\gpu\drv\dpu\hal\dpu_hal_crg.c”中函数\r
-dpu_crg_set_vedio_mclk_div_ctl 的 dpu_mclk_div 值,该值的后两位需要与\r
-pixel_clk 的 16 进制值保持一致,如下 pixel_clk=20000kHZ,换算为 MHZ 为 20,\r
-对应的 16 进制为 0x14。\r
-*/\r
-const combo_dev_cfg_t g_panel_502x410_50_config = {\r
-    .devno = 0,\r
-    .lane_id = {0, -1},\r
-    .out_mode = OUT_MODE_DSI_CMD,\r
-    .out_format = OUT_FORMAT_RGB_24BIT,\r
-    .sync_info = {\r
-        .hsa_pixels   = 4,   // hsa 4 pixels\r
-        .hbp_pixels   = 32,   // hbp 32 pixels\r
-        .hact_pixels  = 410,  // hact 410 pixels\r
-        .hfp_pixels   = 32,   // hfp 32 pixels\r
-        .vsa_lines    = 2,    // vsa 4 lines\r
-        .vbp_lines    = 7,   // vbp 7 lines\r
-        .vact_lines   = 502,  // vact 502 lines\r
-        .vfp_lines    = 7,   // vfp 7 lines\r
-    },\r
-    //pixel_clk*24/1000\r
-    .phy_data_rate = 300,     // 480Mbps\r
-    // (4+32+32+410)*(2+7+7+502)*50/1000\r
-    .pixel_clk = 12380,       // 20000KHz\r
-};\r
-const combo_dev_cfg_t g_panel_466x466_60_config = {\r
-    .devno = 0,\r
-    .lane_id = {0, -1},\r
-    .out_mode = OUT_MODE_DSI_CMD,\r
-    .out_format = OUT_FORMAT_RGB_24BIT,\r
-    .sync_info = {\r
-        .hsa_pixels   = 10,   // hsa 10 pixels\r
-        .hbp_pixels   = 10,   // hbp 10 pixels\r
-        .hact_pixels  = 466,  // hact 454 pixels\r
-        .hfp_pixels   = 10,   // hfp 10 pixels\r
-        .vsa_lines    = 4,    // vsa 4 lines\r
-        .vbp_lines    = 12,   // vbp 12 lines\r
-        .vact_lines   = 466,  // vact 454 lines\r
-        .vfp_lines    = 10,   // vfp 10 lines\r
-    },\r
-    .phy_data_rate = 480,     // 480Mbps\r
-    .pixel_clk = 20000,       // 20000KHz\r
-};\r
-\r
-const combo_dev_cfg_t g_panel_360x360_60_config = {\r
-    .devno = 0,\r
-    .lane_id = {0, -1},\r
-    .out_mode = OUT_MODE_DSI_CMD,\r
-    .out_format = OUT_FORMAT_RGB_24BIT,\r
-    .sync_info = {\r
-        .hsa_pixels   = 8,   // hsa 10 pixels\r
-        .hbp_pixels   = 40,   // hbp 10 pixels\r
-        .hact_pixels  = 360,  // hact 454 pixels\r
-        .hfp_pixels   = 40,   // hfp 10 pixels\r
-        .vsa_lines    = 2,    // vsa 4 lines\r
-        .vbp_lines    = 14,   // vbp 12 lines\r
-        .vact_lines   = 360,  // vact 454 lines\r
-        .vfp_lines    = 16,   // vfp 10 lines\r
-    },\r
-    .phy_data_rate = 480,     // 480Mbps\r
-    .pixel_clk = 20000,       // 20000KHz\r
-};\r
-\r
-const combo_dev_cfg_t g_panel_454x454_60_config = {\r
-    .devno = 0,\r
-    .lane_id = {0, -1},\r
-    .out_mode = OUT_MODE_DSI_CMD,\r
-    .out_format = OUT_FORMAT_RGB_24BIT,\r
-    .sync_info = {\r
-        .hsa_pixels   = 10,   // hsa 10 pixels\r
-        .hbp_pixels   = 10,   // hbp 10 pixels\r
-        .hact_pixels  = 454,  // hact 454 pixels\r
-        .hfp_pixels   = 10,   // hfp 10 pixels\r
-        .vsa_lines    = 4,    // vsa 4 lines\r
-        .vbp_lines    = 12,   // vbp 12 lines\r
-        .vact_lines   = 454,  // vact 454 lines\r
-        .vfp_lines    = 10,   // vfp 10 lines\r
-    },\r
-    .phy_data_rate = 480,     // 480Mbps\r
-    .pixel_clk = 20000,       // 20000KHz\r
-};\r
-\r
-const combo_dev_cfg_t g_panel_240x296_60_config = {\r
-    .devno = 0,\r
-    .lane_id = {0, -1},\r
-    .out_mode = OUT_MODE_DSI_CMD,\r
-    .out_format = OUT_FORMAT_RGB_24BIT,\r
-    .sync_info = {\r
-        .hsa_pixels   = 4,   // hsa 14 pixels hpw\r
-        .hbp_pixels   = 11,   // hbp 11 pixels HBP\r
-        .hact_pixels  = 368,  // hact 240 pixels HPX\r
-        .hfp_pixels   = 14,   // hfp 14 pixels hfp\r
-        .vsa_lines    = 2,    // vsa 2 lines vpw\r
-        .vbp_lines    = 6,   // vbp 6 lines vbp\r
-        .vact_lines   = 448,  // vact 296 lines vpx\r
-        .vfp_lines    = 8,   // vfp 8 lines vfp\r
-    },\r
-    .phy_data_rate = 480,     // 480Mbps\r
-    .pixel_clk = 20000,       // 20000KHz\r
-};\r
-\r
-const combo_dev_cfg_t g_panel_194x368_qspi_config = {\r
-    .out_format = OUT_FORMAT_RGB_24BIT,\r
-    .sync_info = {\r
-        .hact_pixels  = 194,  // hact 368 pixels\r
-        .vact_lines   = 368,  // vact 368 lines\r
-    },\r
-};\r
-\r
-\r
-const lcd_cmd_sequ g_common_466x466_cmd_display_off[] = {\r
-#if defined(BOARD_W9) || defined(BOARD_N9)\r
-    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */\r
-    {1, 1, {0x28}, 10},         /* display off */\r
-    {1, 1, {0x10}, 120},       /* sleep in */\r
-    {1, 2, {0x4f, 0x01}, 100},        /* sleep in */\r
-#else\r
-    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */\r
-    {1, 1, {0x28}, 0},         /* display off */\r
-    {1, 1, {0x10}, 120},       /* sleep in */\r
-    {1, 2, {0x4f, 0x01}, 0},   /* ��deepstandby ״̬ */\r
-#endif\r
-};\r
-\r
-#ifdef LCD_JD9885\r
-\r
-/* display off sequence for common lcd */\r
-const lcd_cmd_sequ g_common_cmd_display_off[] = {\r
-    {1, 2, {0xde, 0x00}, 0},   /* select default cmd page */\r
-    {1, 1, {0x28}, 0},         /* display off */\r
-    {1, 1, {0x10}, 120},       /* sleep in */\r
-};\r
-\r
-/* sleep in sequence for common lcd */\r
-const lcd_cmd_sequ g_common_cmd_sleep_in[] = {\r
-    {1, 2, {0xde, 0x00}, 0},   /* select default cmd page */\r
-    {1, 1, {0x28}, 0},         /* display off */\r
-    {1, 1, {0x10}, 120},       /* sleep in */\r
-};\r
-\r
-/* sleep in sequence for common lcd */\r
-const lcd_cmd_sequ g_common_cmd_sleep_out[] = {\r
-    {1, 2, {0xde, 0x00}, 0},   /* select default cmd page */\r
-    {1, 1, {0x11}, 120},       /* sleep out */\r
-    {1, 1, {0x29}, 0},         /* display on */\r
-};\r
-\r
-/* idle in sequence for EDO and BOE 454*454 lcd */\r
-lcd_cmd_sequ g_common_cmd_idle_in[] = {\r
-    {1, 2, {0xde, 0x00}, 0},\r
-    {1, 1, {0x39}, 0},\r
-};\r
-\r
-/* idle out sequence for EDO and BOE 454*454 lcd */\r
-const lcd_cmd_sequ g_common_cmd_idle_out[] = {\r
-    {1, 2, {0xde, 0x00}, 0},\r
-    {1, 1, {0x38}, 0},\r
-};\r
-\r
-/* te on sequence for EDO and BOE 454*454 lcd */\r
-const lcd_cmd_sequ g_common_cmd_te_on[] = {\r
-    {1, 2, {0xde, 0x00}, 0},\r
-    {1, 1, {0x35}, 0},\r
-};\r
-\r
-/* te off sequence for EDO and BOE 454*454 lcd */\r
-const lcd_cmd_sequ g_common_cmd_te_off[] = {\r
-    {1, 2, {0xde, 0x00}, 0},\r
-    {1, 1, {0x34}, 0},\r
-};\r
-\r
-/* set brightness sequence for EDO and BOE 454*454 lcd */\r
-lcd_cmd_sequ g_common_cmd_brightness[] = {\r
-    {1, 2, {0xde, 0x00}, 0},\r
-    {1, 2, {0x51, 0xff}, 0},\r
-};\r
-#else\r
-\r
-/* display off sequence for common lcd */\r
-const lcd_cmd_sequ g_common_cmd_display_off[] = {\r
-    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */\r
-    {1, 1, {0x28}, 0},         /* display off */\r
-    {1, 1, {0x10}, 120},       /* sleep in */\r
-};\r
-\r
-/* sleep in sequence for common lcd */\r
-const lcd_cmd_sequ g_common_cmd_sleep_in[] = {\r
-    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */\r
-    {1, 1, {0x28}, 0},         /* display off */\r
-    {1, 1, {0x10}, 120},       /* sleep in */\r
-};\r
-\r
-/* sleep in sequence for common lcd */\r
-const lcd_cmd_sequ g_common_cmd_sleep_out[] = {\r
-    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */\r
-    {1, 1, {0x11}, 120},       /* sleep out */\r
-    {1, 1, {0x29}, 0},         /* display on */\r
-};\r
-\r
-/* idle in sequence for EDO and BOE 454*454 lcd */\r
-lcd_cmd_sequ g_common_cmd_idle_in[] = {\r
-    {1, 2, {0xfe, 0x00}, 0},\r
-    {1, 1, {0x39}, 0},\r
-};\r
-\r
-/* idle out sequence for EDO and BOE 454*454 lcd */\r
-const lcd_cmd_sequ g_common_cmd_idle_out[] = {\r
-    {1, 2, {0xfe, 0x00}, 0},\r
-    {1, 1, {0x38}, 0},\r
-};\r
-\r
-/* te on sequence for EDO and BOE 454*454 lcd */\r
-const lcd_cmd_sequ g_common_cmd_te_on[] = {\r
-    {1, 2, {0xfe, 0x00}, 0},\r
-    {1, 1, {0x35}, 0},\r
-};\r
-\r
-/* te off sequence for EDO and BOE 454*454 lcd */\r
-const lcd_cmd_sequ g_common_cmd_te_off[] = {\r
-    {1, 2, {0xfe, 0x00}, 0},\r
-    {1, 1, {0x34}, 0},\r
-};\r
-\r
-/* set brightness sequence for EDO and BOE 454*454 lcd */\r
-lcd_cmd_sequ g_common_cmd_brightness[] = {\r
-    {1, 2, {0xfe, 0x00}, 0},\r
-    {1, 2, {0x51, 0xff}, 0},\r
-};\r
-#endif\r
-/* init sequence for ST7367 360*480 lcd */\r
-const lcd_cmd_sequ g_st7367_360x480_screen_init_on[] = {\r
-    {1, 2, {0xF0, 0xC3}, 0},\r
-    {1, 2, {0xF0, 0x96}, 0},\r
-    {1, 2, {0xF0, 0xA5}, 0},\r
-    {1, 5, {0xC1, 0x11, 0x08, 0xAD, 0x13}, 0},\r
-    {1, 5, {0xC2, 0x11, 0x08, 0xAD, 0x13}, 0},\r
-    {1, 5, {0xC3, 0x22, 0x02, 0x44, 0x04}, 0},\r
-    {1, 5, {0xC4, 0x44, 0x04, 0x44, 0x04}, 0},\r
-    {1, 3, {0xC5, 0x4E, 0x80}, 0},  /* #VCOM 0.975 2025 4 28 */\r
-    {1, 2, {0xD6, 0x00}, 0},\r
-    {1, 2, {0xD7, 0x00}, 0},\r
-    {1, 15, {0xE0, 0xD0, 0x08, 0x0D, 0x0A, 0x08, 0x05, 0x35, 0x33, 0x4C, 0x08, 0x13, 0x14, 0x2D, 0x32}, 0},\r
-    {1, 15, {0xE1, 0xD0, 0x08, 0x0D, 0x0A, 0x08, 0x05, 0x35, 0x33, 0x4C, 0x08, 0x13, 0x14, 0x2D, 0x32}, 0},\r
-    {1, 15, {0xE5, 0x58, 0xF5, 0x66, 0x33, 0x22, 0x25, 0x10, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77}, 0},\r
-    {1, 15, {0xE6, 0x58, 0xF5, 0x66, 0x33, 0x22, 0x25, 0x10, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77}, 0},\r
-    {1, 7, {0xEC, 0x00, 0x55, 0x00, 0x00, 0x00, 0x08}, 0},\r
-    {1, 2, {0x36, 0x0C}, 0},\r
-    {1, 2, {0x3A, 0x07}, 0},\r
-    {1, 2, {0xB2, 0x09}, 0},\r
-    {1, 2, {0xB3, 0x01}, 0},\r
-    {1, 2, {0xB4, 0x01}, 0},\r
-    {1, 5, {0xB5, 0x00, 0x08, 0x00, 0x08}, 0},\r
-    {1, 3, {0xB6, 0xEF, 0x2C}, 0},\r
-    {1, 3, {0xA4, 0xC0, 0x63}, 0},\r
-    {1, 10, {0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x2A, 0xBA, 0x02}, 0},\r
-    {1, 10, {0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x2A, 0xBA, 0x02}, 0},\r
-    {1, 8, {0xBA, 0x58, 0x1A, 0x45, 0x02, 0x22, 0x01, 0x00}, 0}, /* #2025 5 9 Modify STV0 */\r
-    {1, 9, {0xBB, 0x00, 0x20, 0x00, 0x25, 0x83, 0x87, 0x18, 0x00}, 0},\r
-    {1, 9, {0xBC, 0x00, 0x24, 0x00, 0x25, 0x83, 0x87, 0x18, 0x00}, 0},\r
-    {1, 12, {0xBD, 0x21, 0x12, 0x99, 0xFF, 0x45, 0x36, 0x63, 0x54, 0xAB, 0xFF, 0x07}, 0},\r
-    {1, 2, {0xED, 0xC3}, 0},\r
-    {1, 4, {0xE4, 0x40, 0x0F, 0x2F}, 0},\r
-    {1, 2, {0x35, 0x00}, 0},\r
-    {1, 1, {0x21}, 0},\r
-    {1, 1, {0x11}, 120},\r
-    {1, 1, {0x29}, 120},\r
-    {1, 2, {0x35, 0x00}, 100},\r
-};\r
-\r
-const lcd_cmd_sequ g_edo_502x410_screen_init_on[] = {\r
-    {1, 5, {0x2A, 0x00, 0x04, 0x01, 0x9d}, 0}, \r
-    {1, 5, {0x2B, 0x00, 0x00, 0x01, 0xf5}, 0}, \r
-    {1, 2, {0x35, 0x00}, 0}, \r
-    {1, 2, {0x36, 0x00}, 0}, \r
-    {1, 2, {0x67, 0x01}, 0}, \r
-    {1, 2, {0x68, 0x01}, 0}, \r
-    {1, 2, {0x11, 0x00}, 120}, \r
-    {1, 2, {0x29, 0x00}, 120}, \r
-};\r
-const lcd_cmd_sequ g_edo_466x466_screen_init_on[] = {\r
-    {1, 2, {0xfe, 0x00}, 0}, \r
-    {1, 2, {0x3a, 0x77}, 0}, \r
-    {1, 2, {0x35, 0x00}, 0}, \r
-    {1, 2, {0x53, 0x20}, 0}, \r
-    // {1, 2, {0x51, 0xff}, 0}, \r
-    {1, 2, {0x63, 0xff}, 0}, \r
-    {1, 5, {0x2A, 0x00, 0x06, 0x01, 0xd7}, 0}, \r
-    {1, 5, {0x2B, 0x00, 0x00, 0x01, 0xd1}, 0}, \r
-    {1, 3, {0x44, 0x01, 0xc5}, 0},\r
-    {1, 1, {0x11}, 120}, \r
-    {1, 1, {0x29}, 0}, \r
-};\r
-\r
-/* init sequence for EDO 454*454 lcd */\r
-const lcd_cmd_sequ g_edo_454x454_screen_init_on[] = {\r
-    {1, 2, {0xfe, 0x01}, 0},\r
-    {1, 2, {0x30, 0x43}, 0}, /* set LCD frequency to 15HZ */\r
-    {1, 2, {0xfe, 0x00}, 0},\r
-    {1, 2, {0x3a, 0x77}, 0},\r
-    {1, 2, {0x53, 0x20}, 0},\r
-    {1, 2, {0x51, 0xff}, 0},\r
-    {0, 5, {0x2a, 0x00, 0x0e, 0x01, 0xd3}, 0},\r
-    {0, 5, {0x2b, 0x00, 0x00, 0x01, 0xc5}, 0},\r
-    {1, 3, {0x44, 0x01, 0xc5}, 0},\r
-    {1, 2, {0x35, 0x00}, 0},\r
-    {1, 1, {0x11}, 120},\r
-    {1, 1, {0x29}, 0},\r
-};\r
-\r
-/* init sequence for BOE 454*454 lcd */\r
-const lcd_cmd_sequ g_boe_454x454_screen_init_on[] = {\r
-    {1, 2, {0xfe, 0x0d}, 0},\r
-    {1, 2, {0x01, 0x00}, 0},\r
-    {1, 2, {0x03, 0x00}, 0},\r
-    {1, 2, {0x1b, 0x00}, 0},\r
-    {1, 2, {0x1d, 0x00}, 0},\r
-    {1, 2, {0x37, 0x00}, 0},\r
-    {1, 2, {0x39, 0x00}, 0},\r
-    {1, 2, {0x52, 0x58}, 0},\r
-    {1, 2, {0x53, 0x00}, 0},\r
-\r
-    {1, 2, {0xfe, 0x01}, 0},\r
-    {1, 2, {0x72, 0x05}, 0},\r
-    {1, 2, {0x73, 0x16}, 0},\r
-    {1, 2, {0x74, 0x0c}, 0},\r
-\r
-    {1, 2, {0xfe, 0x01}, 0},\r
-    {1, 2, {0x18, 0x55}, 0},\r
-    {1, 2, {0xc5, 0x10}, 0},\r
-    {1, 2, {0x72, 0x0e}, 0},\r
-    {1, 2, {0x73, 0x1c}, 0},\r
-\r
-    {1, 2, {0xfe, 0x07}, 0},\r
-    {1, 2, {0x15, 0x04}, 0},\r
-    {1, 2, {0xfe, 0x01}, 0},\r
-    {1, 2, {0x0a, 0xf8}, 0},\r
-\r
-    {1, 2, {0xfe, 0x00}, 0},\r
-    {1, 2, {0x51, 0xff}, 0},\r
-    {1, 2, {0x35, 0x00}, 0},\r
-    {0, 5, {0x2a, 0x00, 0x0c, 0x01, 0xd1}, 0},\r
-    {0, 5, {0x2b, 0x00, 0x00, 0x01, 0xc5}, 0},\r
-    {1, 2, {0x53, 0x20}, 0},\r
-    {1, 1, {0x11}, 120},\r
-    {1, 1, {0x29}, 0},\r
-};\r
-\r
-const lcd_cmd_sequ g_sh_240x296_screen_init_on[] = {\r
-    {1, 1, {0x11}, 5},\r
-    {1, 5, {0x2a, 0x00, 0x00, 0x01, 0x6f}, 1},\r
-    {1, 5, {0x2b, 0x00, 0x00, 0x01, 0xbf}, 1},\r
-    {1, 3, {0x44, 0x01, 0xbf}, 1},\r
-    {1, 2, {0x35, 0x00}, 1},\r
-    {1, 2, {0x3a, 0x77}, 1},\r
-    {1, 2, {0x53, 0x20}, 80},\r
-    {1, 1, {0x29}, 0},\r
-};\r
-\r
-const lcd_cmd_sequ g_boe_194x368_screen_init_on[] = {\r
-    {0, 2, {0xfe, 0x00}, 0},\r
-    {0, 3, {0x44, 0x00, 0xB7}, 0},\r
-    {0, 2, {0x3a, 0x77}, 0},\r
-    {0, 2, {0x51, 0x80}, 0},\r
-    {0, 2, {0x35, 0x0}, 0},\r
-    {0, 5, {0x2a, 0x00, 0x00, 0x00, 0xc1}, 0},\r
-    {0, 1, {0x11}, 120},\r
-    {0, 1, {0x29}, 100},\r
-    {0, 1, {0x39}, 0},\r
-};\r
-\r
-\r
-const lcd_cmd_sequ g_jd_360x360_screen_init_on[] = {\r
-    {1, 2, {0xDE, 0x00}, 0},\r
-    {1, 3, {0xDF, 0x98, 0x55}, 0},\r
-    {1, 3, {0xCE, 0x0D, 0x00}, 0},\r
-    // {1, 2, {0xC2, 0x38}, 0},\r
-    {1, 2, {0xB2, 0x30}, 0},\r
-    {1, 5, {0xB7, 0x01, 0x35, 0x01, 0x5D}, 0},\r
-    {1, 7, {0xBB, 0x1B, 0x64, 0xE3, 0x34, 0x3E, 0xF3}, 0},\r
-    {1, 5, {0xBC, 0x00, 0x18, 0xF3, 0xC0}, 0},\r
-    {1, 3, {0xC0, 0x22, 0xC1}, 0},\r
-    {1, 12, {0xC3, 0x00, 0x02, 0x2A, 0x0B, 0x08, 0x47, 0x08, 0x04, 0x62, 0x30, 0x30}, 0},\r
-    {1, 12, {0xC4, 0x40, 0x00, 0xAD, 0x68, 0x43, 0x07, 0x04, 0x16, 0x43, 0x07, 0x04}, 0},\r
-    {1, 33, {0xC8, 0x3F, 0x2E, 0x24, 0x1F, 0x20, 0x21, 0x1D, 0x1D, 0x1D, 0x1C, 0x19, 0x0E, 0x0B, 0x07, 0x03, 0x02, 0x3F, 0x2E, 0x24, 0x1F, 0x20, 0x21, 0x1D, 0x1D, 0x1D, 0x1C, 0x19, 0x0E, 0x0B, 0x07, 0x03, 0x02}, 0},\r
-    {1, 3, {0xD3, 0x28, 0x13}, 0},\r
-    {1, 3, {0xD7, 0x18, 0x31}, 0},\r
-    {1, 7, {0xD9, 0x00, 0x00, 0xFF, 0x00, 0xF0, 0x00}, 0},\r
-    {1, 2, {0xDE, 0x01}, 0},\r
-    {1, 9, {0xB7, 0x13, 0xE7, 0x64, 0x39, 0x06, 0x36, 0x19, 0x1C}, 0},\r
-    {1, 2, {0xBE, 0x00}, 0},\r
-    {1, 5, {0xC1, 0x04, 0x4A, 0x90, 0x08}, 0},\r
-    {1, 5, {0xC2, 0x00, 0x16, 0xDA, 0xE7}, 0},\r
-    {1, 3, {0xC4, 0x72, 0x12}, 0},\r
-    {1, 7, {0xC7, 0x00, 0x00, 0x09, 0x3D, 0x09, 0x3D}, 0},\r
-    {1, 7, {0xC8, 0x00, 0x00, 0x0B, 0x3D, 0x16, 0x39}, 0},\r
-    {1, 6, {0xC9, 0x00, 0x0A, 0x08, 0x06, 0x04}, 0},\r
-    {1, 6, {0xCA, 0x1E, 0x1F, 0x10, 0x17, 0x18}, 0},\r
-    {1, 6, {0xCB, 0x01, 0x0B, 0x09, 0x07, 0x05}, 0},\r
-    {1, 6, {0xCC, 0x1E, 0x1F, 0x11, 0x17, 0x18}, 0},\r
-    {1, 6, {0xCD, 0x31, 0x25, 0x27, 0x29, 0x2B}, 0},\r
-    {1, 6, {0xCE, 0x3F, 0x3E, 0x21, 0x37, 0x38}, 0},\r
-    {1, 6, {0xCF, 0x30, 0x24, 0x26, 0x28, 0x2A}, 0},\r
-    {1, 6, {0xD0, 0x3F, 0x3E, 0x20, 0x37, 0x38}, 0},\r
-    {1, 6, {0xD1, 0x06, 0x30, 0xA5, 0xDB, 0x30}, 0},\r
-    {1, 7, {0xD3, 0x3B, 0x08, 0x00, 0x00, 0x00, 0x00}, 0},\r
-    {1, 7, {0xD4, 0x67, 0x00, 0x00, 0x01, 0x00, 0x01}, 0},\r
-    {1, 8, {0xD5, 0x10, 0x10, 0x07, 0x07, 0x0F, 0x94, 0x26}, 0},\r
-    {1, 4, {0xD6, 0x00, 0x00, 0x40}, 0},\r
-    {1, 4, {0xD7, 0x01, 0x84, 0x20}, 0},\r
-    {1, 2, {0xDE, 0x02}, 0},\r
-    {1, 2, {0xB6, 0x1C}, 0},\r
-    {1, 2, {0xDE, 0x00}, 0},\r
-    {1, 2, {0x4D, 0x00}, 0},\r
-    {1, 2, {0x4E, 0x00}, 0},\r
-    {1, 2, {0x4F, 0x00}, 0},\r
-    {1, 2, {0x4C, 0x01}, 10},\r
-    {1, 2, {0x4C, 0x00}, 0},\r
-    {1, 5, {0x2A, 0x00, 0x00, 0x01, 0x68}, 0},\r
-    {1, 5, {0x2B, 0x00, 0x00, 0x01, 0x68}, 0},\r
-    {1, 2, {0x35, 0x00}, 0},\r
-    {1, 2, {0x36, 0x00}, 0},\r
-    /* {1, 2, {0x3A, 0x55}, 0}, */\r
-    {1, 1, {0x11}, 120},\r
-    {1, 1, {0x29}, 10},\r
-};\r
-\r
-const lcd_cmds_sequ g_display_off_cmds = {\r
-    .cmd = g_common_cmd_display_off,\r
-    .cmd_cnt = array_size(g_common_cmd_display_off),\r
-};\r
-\r
-const lcd_cmds_sequ g_466x466_display_off_cmds = {\r
-    .cmd = g_common_466x466_cmd_display_off,\r
-    .cmd_cnt = array_size(g_common_466x466_cmd_display_off),\r
-};\r
-\r
-const lcd_cmds_sequ g_idle_in_cmds = {\r
-    .cmd = g_common_cmd_idle_in,\r
-    .cmd_cnt = array_size(g_common_cmd_idle_in),\r
-};\r
-\r
-const lcd_cmds_sequ g_idle_out_cmds = {\r
-    .cmd = g_common_cmd_idle_out,\r
-    .cmd_cnt = array_size(g_common_cmd_idle_out),\r
-};\r
-\r
-const lcd_cmds_sequ g_te_on_cmds = {\r
-    .cmd = g_common_cmd_te_on,\r
-    .cmd_cnt = array_size(g_common_cmd_te_on),\r
-};\r
-\r
-const lcd_cmds_sequ g_te_off_cmds = {\r
-    .cmd = g_common_cmd_te_off,\r
-    .cmd_cnt = array_size(g_common_cmd_te_off),\r
-};\r
-\r
-const lcd_cmds_sequ g_brightness_cmds = {\r
-    .cmd = g_common_cmd_brightness,\r
-    .cmd_cnt = array_size(g_common_cmd_brightness),\r
-};\r
-\r
-const lcd_cmds_sequ g_st7367_360x480_screen_init_on_cmds = {\r
-    .cmd = g_st7367_360x480_screen_init_on,\r
-    .cmd_cnt = array_size(g_st7367_360x480_screen_init_on),\r
-};\r
-\r
-const lcd_cmds_sequ g_edo_502x410_screen_init_on_cmds = {\r
-    .cmd = g_edo_502x410_screen_init_on,\r
-    .cmd_cnt = array_size(g_edo_502x410_screen_init_on),\r
-};\r
-const lcd_cmds_sequ g_edo_466x466_screen_init_on_cmds = {\r
-    .cmd = g_edo_466x466_screen_init_on,\r
-    .cmd_cnt = array_size(g_edo_466x466_screen_init_on),\r
-};\r
-\r
-const lcd_cmds_sequ g_jd_360x360_screen_init_on_cmds = {\r
-    .cmd = g_jd_360x360_screen_init_on,\r
-    .cmd_cnt = array_size(g_jd_360x360_screen_init_on),\r
-};\r
-\r
-const lcd_cmds_sequ g_edo_454x454_screen_init_on_cmds = {\r
-    .cmd = g_edo_454x454_screen_init_on,\r
-    .cmd_cnt = array_size(g_edo_454x454_screen_init_on),\r
-};\r
-\r
-const lcd_cmds_sequ g_boe_454x454_screen_init_on_cmds = {\r
-    .cmd = g_boe_454x454_screen_init_on,\r
-    .cmd_cnt = array_size(g_boe_454x454_screen_init_on),\r
-};\r
-\r
-const lcd_cmds_sequ g_sh_240x296_screen_init_on_cmds = {\r
-    .cmd = g_sh_240x296_screen_init_on,\r
-    .cmd_cnt = array_size(g_sh_240x296_screen_init_on),\r
-};\r
-\r
-const lcd_cmds_sequ g_boe_194x368_screen_init_on_cmds = {\r
-    .cmd = g_boe_194x368_screen_init_on,\r
-    .cmd_cnt = array_size(g_boe_194x368_screen_init_on),\r
-};\r
-\r
-const lcd_cmds_sequ g_sleep_in_cmds = {\r
-    .cmd = g_common_cmd_sleep_in,\r
-    .cmd_cnt = array_size(g_common_cmd_sleep_in),\r
-};\r
-\r
-const lcd_cmds_sequ g_sleep_out_cmds = {\r
-    .cmd = g_common_cmd_sleep_out,\r
-    .cmd_cnt = array_size(g_common_cmd_sleep_out),\r
-};\r
-\r
-\r
-const lcd_drv_cfg g_lcd_driver_ops[] = {\r
-    {\r
-        .bus_type             = BUS_DISPLAY_MIPI,\r
-        .bus_cfg              = &g_panel_st7367_360x480_60_config,\r
-        .x_start              = 0,\r
-        .y_start              = 0,\r
-        .fps                  = 60,\r
-        .lcd_id               = LCD_ST7367_360X480_SCREEN_ID,\r
-        .display_on_cmds      = &g_st7367_360x480_screen_init_on_cmds,\r
-        .display_off_cmds     = &g_display_off_cmds,\r
-        .enter_idle_cmds      = &g_idle_in_cmds,\r
-        .exit_idle_cmds       = &g_idle_out_cmds,\r
-        .te_on_cmds           = &g_te_on_cmds,\r
-        .te_off_cmds          = &g_te_off_cmds,\r
-        .set_brightnes_cmds   = &g_brightness_cmds,\r
-        .sleep_in_cmds        = &g_sleep_in_cmds,\r
-        .sleep_out_cmds       = &g_sleep_out_cmds,\r
-        .lcd_id_info.reg_addr = 0x04,\r
-        .lcd_id_info.read_len = 3,\r
-    },\r
-    {\r
-        .bus_type             = BUS_DISPLAY_MIPI,\r
-        .bus_cfg              = &g_panel_502x410_50_config,\r
-        .x_start              = 0x04,\r
-        .y_start              = 0,\r
-        .fps                  = 60,\r
-        .lcd_id               = LCD_EDO_502X410_SCREEN_ID,\r
-        .display_on_cmds      = &g_edo_502x410_screen_init_on_cmds,\r
-        .display_off_cmds     = &g_display_off_cmds,\r
-        .enter_idle_cmds      = &g_idle_in_cmds,\r
-        .exit_idle_cmds       = &g_idle_out_cmds,\r
-        .te_on_cmds           = &g_te_on_cmds,\r
-        .te_off_cmds          = &g_te_off_cmds,\r
-        .set_brightnes_cmds   = &g_brightness_cmds,\r
-        .sleep_in_cmds        = &g_sleep_in_cmds,\r
-        .sleep_out_cmds       = &g_sleep_out_cmds,\r
-        .lcd_id_info.reg_addr = 0x04,\r
-        .lcd_id_info.read_len = 3,\r
-    },\r
-    {\r
-        .bus_type             = BUS_DISPLAY_MIPI,\r
-        .bus_cfg              = &g_panel_466x466_60_config,\r
-        .x_start              = 0x6,\r
-        .y_start              = 0,\r
-        .fps                  = 60,\r
-        .lcd_id               = LCD_EDO_466X466_SCREEN_ID,\r
-        .display_on_cmds      = &g_edo_466x466_screen_init_on_cmds,\r
-        .display_off_cmds     = &g_466x466_display_off_cmds,\r
-        .enter_idle_cmds      = &g_idle_in_cmds,\r
-        .exit_idle_cmds       = &g_idle_out_cmds,\r
-        .te_on_cmds           = &g_te_on_cmds,\r
-        .te_off_cmds          = &g_te_off_cmds,\r
-        .set_brightnes_cmds   = &g_brightness_cmds,\r
-        .sleep_in_cmds        = &g_sleep_in_cmds,\r
-        .sleep_out_cmds       = &g_sleep_out_cmds,\r
-        .lcd_id_info.reg_addr = 0x04,\r
-        .lcd_id_info.read_len = 3,\r
-    },\r
-    {\r
-        .bus_type             = BUS_DISPLAY_MIPI,\r
-        .bus_cfg              = &g_panel_360x360_60_config,\r
-        .x_start              = 0,\r
-        .y_start              = 0,\r
-        .fps                  = 60,\r
-        .lcd_id               = LCD_JD_360X360_SCREEN_ID,\r
-        .display_on_cmds      = &g_jd_360x360_screen_init_on_cmds,\r
-        .display_off_cmds     = &g_display_off_cmds,\r
-        .enter_idle_cmds      = &g_idle_in_cmds,\r
-        .exit_idle_cmds       = &g_idle_out_cmds,\r
-        .te_on_cmds           = &g_te_on_cmds,\r
-        .te_off_cmds          = &g_te_off_cmds,\r
-        .set_brightnes_cmds   = &g_brightness_cmds,\r
-        .sleep_in_cmds        = &g_sleep_in_cmds,\r
-        .sleep_out_cmds       = &g_sleep_out_cmds,\r
-        .lcd_id_info.reg_addr = 0x04,\r
-        .lcd_id_info.read_len = 3,\r
-    },\r
-    {\r
-        .bus_type             = BUS_DISPLAY_MIPI,\r
-        .bus_cfg              = &g_panel_454x454_60_config,\r
-        .x_start              = 0xe,\r
-        .y_start              = 0,\r
-        .fps                  = 60,\r
-        .lcd_id               = LCD_EDO_454X454_SCREEN_ID,\r
-        .display_on_cmds      = &g_edo_454x454_screen_init_on_cmds,\r
-        .display_off_cmds     = &g_display_off_cmds,\r
-        .enter_idle_cmds      = &g_idle_in_cmds,\r
-        .exit_idle_cmds       = &g_idle_out_cmds,\r
-        .te_on_cmds           = &g_te_on_cmds,\r
-        .te_off_cmds          = &g_te_off_cmds,\r
-        .set_brightnes_cmds   = &g_brightness_cmds,\r
-        .sleep_in_cmds        = &g_sleep_in_cmds,\r
-        .sleep_out_cmds       = &g_sleep_out_cmds,\r
-        .lcd_id_info.reg_addr = 0x04,\r
-        .lcd_id_info.read_len = 3,\r
-    },\r
-    {\r
-        .bus_type             = BUS_DISPLAY_MIPI,\r
-        .bus_cfg              = &g_panel_454x454_60_config,\r
-        .x_start              = 0xc,\r
-        .y_start              = 0,\r
-        .fps                  = 60,\r
-        .lcd_id               = LCD_BOE_454X454_SCREEN_ID,\r
-        .display_on_cmds      = &g_boe_454x454_screen_init_on_cmds,\r
-        .display_off_cmds     = &g_display_off_cmds,\r
-        .enter_idle_cmds      = &g_idle_in_cmds,\r
-        .exit_idle_cmds       = &g_idle_out_cmds,\r
-        .te_on_cmds           = &g_te_on_cmds,\r
-        .te_off_cmds          = &g_te_off_cmds,\r
-        .set_brightnes_cmds   = &g_brightness_cmds,\r
-        .sleep_in_cmds        = &g_sleep_in_cmds,\r
-        .sleep_out_cmds       = &g_sleep_out_cmds,\r
-        .lcd_id_info.reg_addr = 0x04,\r
-        .lcd_id_info.read_len = 3,\r
-    },\r
-    {\r
-        .bus_type             = BUS_DISPLAY_MIPI,\r
-        .bus_cfg              = &g_panel_240x296_60_config,\r
-        .x_start              = 0,\r
-        .y_start              = 0,\r
-        .fps                  = 60,\r
-        .lcd_id               = LCD_SH_240X296_SCREEN_ID,\r
-        .display_on_cmds      = &g_sh_240x296_screen_init_on_cmds,\r
-        .display_off_cmds     = &g_display_off_cmds,\r
-        .enter_idle_cmds      = &g_idle_in_cmds,\r
-        .exit_idle_cmds       = &g_idle_out_cmds,\r
-        .te_on_cmds           = &g_te_on_cmds,\r
-        .te_off_cmds          = &g_te_off_cmds,\r
-        .set_brightnes_cmds   = &g_brightness_cmds,\r
-        .sleep_in_cmds        = &g_sleep_in_cmds,\r
-        .sleep_out_cmds       = &g_sleep_out_cmds,\r
-        .lcd_id_info.reg_addr = 0xda,\r
-        .lcd_id_info.read_len = 3,\r
-    },\r
-    {\r
-        .bus_type             = BUS_DISPLAY_QSPI,\r
-        .bus_cfg              = &g_panel_194x368_qspi_config,\r
-        .x_start              = 0,\r
-        .y_start              = 0,\r
-        .fps                  = 60,\r
-        .lcd_id               = LCD_BOE_194X368_SCREEN_ID,\r
-        .display_on_cmds      = &g_boe_194x368_screen_init_on_cmds,\r
-        .display_off_cmds     = &g_display_off_cmds,\r
-        .enter_idle_cmds      = &g_idle_in_cmds,\r
-        .exit_idle_cmds       = &g_idle_out_cmds,\r
-        .te_on_cmds           = &g_te_on_cmds,\r
-        .te_off_cmds          = &g_te_off_cmds,\r
-        .set_brightnes_cmds   = &g_brightness_cmds,\r
-        .sleep_in_cmds        = &g_sleep_in_cmds,\r
-        .sleep_out_cmds       = &g_sleep_out_cmds,\r
-        .lcd_id_info.reg_addr = 0x04,\r
-        .lcd_id_info.read_len = 3,\r
-    }\r
-};\r
-\r
-lcd_drv_cfg *lcd_get_driver_ops(void)\r
-{\r
-    return g_lcd_driver_ops;\r
-}\r
-\r
-uint32_t lcd_get_ops_num(void)\r
-{\r
-    return array_size(g_lcd_driver_ops);\r
-}\r
-\r
-combo_dev_cfg_t *lcd_get_bus_escape_config(void)\r
-{\r
-    return g_lcd_driver_ops[0].bus_cfg;\r
-}\r
-\r
-lcd_drv_cfg *lcd_get_driver_config(uint32_t id)\r
-{\r
-    uint32_t i;\r
-    if (id == 0) {\r
-        return NULL;\r
-    }\r
-\r
-    for (i = 0; i < array_size(g_lcd_driver_ops); i++) {\r
-        if (g_lcd_driver_ops[i].lcd_id == id) {\r
-            return &(g_lcd_driver_ops[i]);\r
-        }\r
-    }\r
-\r
-    return NULL;\r
-}\r
+/*
+ * Copyright (c) @CompanyNameMagicTag 2022-2022. All rights reserved.
+ * Description: Lcd driver configuration.
+ * Author: @CompanyNameTag
+ * Create: 2022-03-05
+ */
+
+#include <stdint.h>
+#include "common_def.h"
+#include "lcd_config.h"
+
+#define LCD_EDO_502X410_SCREEN_ID  0xFFFF //CH13613
+#define LCD_EDO_466X466_SCREEN_ID   0x1133
+#define LCD_FD272_466X466_SCREEN_ID  0x20
+#define LCD_JD_360X360_SCREEN_ID   0x5598
+#define LCD_EDO_454X454_SCREEN_ID  0xf00
+#define LCD_BOE_454X454_SCREEN_ID  0x500
+#define LCD_SH_240X296_SCREEN_ID   0x101
+#define LCD_BOE_194X368_SCREEN_ID  0x4a00
+/* manufacturer id - driver version id - driver id (don't care for the moment) */
+#define LCD_ST7367_360X480_SCREEN_ID 0xFFFFFF
+
+const combo_dev_cfg_t g_panel_st7367_360x480_60_config = {
+    .devno = 0,
+    .lane_id = {0, -1},
+    .out_mode = OUT_MODE_DSI_VIDEO,
+    .out_format = OUT_FORMAT_RGB_24BIT,
+    .sync_info = {
+        .hsa_pixels   = 2,    // hsa 2 pixels
+        .hbp_pixels   = 20,   // hbp 20 pixels
+        .hact_pixels  = 360,  // hact 360 pixels
+        .hfp_pixels   = 20,   // hfp 20 pixels
+        .vsa_lines    = 1,    // vsa 1 lines
+        .vbp_lines    = 6,    // vbp 6 lines
+        .vact_lines   = 480,  // vact 480 lines
+        .vfp_lines    = 6,    // vfp 6 lines
+    },
+    .phy_data_rate = 288,     // 288Mbps
+    .pixel_clk = 12000,       // 12000KHz
+};
+
+/*
+pixel_clk 需要大于 sync_info 中的(hsa+hbp+hact+hfp)* 
+(vsa+vbp+vact+vfp)* 60 / 1000 (帧率配置 60fps)
+
+. phy_data_rate=pixel_clk * 24 / 1000, 如果计算出来的值大于 500,需要调
+整降低帧率,减小 pixel_clk。
+
+当修改了 pixel_clk 时,需要同步修改
+“middleware\services\gpu\drv\dpu\hal\dpu_hal_crg.c”中函数
+dpu_crg_set_vedio_mclk_div_ctl 的 dpu_mclk_div 值,该值的后两位需要与
+pixel_clk 的 16 进制值保持一致,如下 pixel_clk=20000kHZ,换算为 MHZ 为 20,
+对应的 16 进制为 0x14。
+*/
+const combo_dev_cfg_t g_panel_502x410_50_config = {
+    .devno = 0,
+    .lane_id = {0, -1},
+    .out_mode = OUT_MODE_DSI_CMD,
+    .out_format = OUT_FORMAT_RGB_24BIT,
+    .sync_info = {
+        .hsa_pixels   = 4,   // hsa 4 pixels
+        .hbp_pixels   = 32,   // hbp 32 pixels
+        .hact_pixels  = 410,  // hact 410 pixels
+        .hfp_pixels   = 32,   // hfp 32 pixels
+        .vsa_lines    = 2,    // vsa 4 lines
+        .vbp_lines    = 7,   // vbp 7 lines
+        .vact_lines   = 502,  // vact 502 lines
+        .vfp_lines    = 7,   // vfp 7 lines
+    },
+    //pixel_clk*24/1000
+    .phy_data_rate = 300,     // 480Mbps
+    // (4+32+32+410)*(2+7+7+502)*50/1000
+    .pixel_clk = 12380,       // 20000KHz
+};
+const combo_dev_cfg_t g_panel_466x466_60_config = {
+    .devno = 0,
+    .lane_id = {0, -1},
+    .out_mode = OUT_MODE_DSI_CMD,
+    .out_format = OUT_FORMAT_RGB_24BIT,
+    .sync_info = {
+        .hsa_pixels   = 10,   // hsa 10 pixels
+        .hbp_pixels   = 10,   // hbp 10 pixels
+        .hact_pixels  = 466,  // hact 454 pixels
+        .hfp_pixels   = 10,   // hfp 10 pixels
+        .vsa_lines    = 4,    // vsa 4 lines
+        .vbp_lines    = 12,   // vbp 12 lines
+        .vact_lines   = 466,  // vact 454 lines
+        .vfp_lines    = 10,   // vfp 10 lines
+    },
+    .phy_data_rate = 480,     // 480Mbps
+    .pixel_clk = 20000,       // 20000KHz
+};
+
+const combo_dev_cfg_t g_fd272_466x466_60_config = {
+    .devno = 0,
+    .lane_id = {0, -1},
+    .out_mode = OUT_MODE_DSI_CMD,
+    .out_format = OUT_FORMAT_RGB_24BIT,
+    .sync_info = {
+        .hsa_pixels   = 4,   // hsa 10 pixels
+        .hbp_pixels   = 50,   // hbp 10 pixels
+        .hact_pixels  = 466,  // hact 454 pixels
+        .hfp_pixels   = 50,   // hfp 10 pixels
+        .vsa_lines    = 2,    // vsa 4 lines
+        .vbp_lines    = 8,   // vbp 12 lines
+        .vact_lines   = 466,  // vact 454 lines
+        .vfp_lines    = 6,   // vfp 10 lines
+    },
+    .phy_data_rate = 396,     // 480Mbps
+    .pixel_clk = 16485,       // 20000KHz
+};
+
+
+const combo_dev_cfg_t g_panel_360x360_60_config = {
+    .devno = 0,
+    .lane_id = {0, -1},
+    .out_mode = OUT_MODE_DSI_CMD,
+    .out_format = OUT_FORMAT_RGB_24BIT,
+    .sync_info = {
+        .hsa_pixels   = 8,   // hsa 10 pixels
+        .hbp_pixels   = 40,   // hbp 10 pixels
+        .hact_pixels  = 360,  // hact 454 pixels
+        .hfp_pixels   = 40,   // hfp 10 pixels
+        .vsa_lines    = 2,    // vsa 4 lines
+        .vbp_lines    = 14,   // vbp 12 lines
+        .vact_lines   = 360,  // vact 454 lines
+        .vfp_lines    = 16,   // vfp 10 lines
+    },
+    .phy_data_rate = 288,     // 480Mbps
+    .pixel_clk = 12000,       // 20000KHz
+};
+
+const combo_dev_cfg_t g_panel_454x454_60_config = {
+    .devno = 0,
+    .lane_id = {0, -1},
+    .out_mode = OUT_MODE_DSI_CMD,
+    .out_format = OUT_FORMAT_RGB_24BIT,
+    .sync_info = {
+        .hsa_pixels   = 10,   // hsa 10 pixels
+        .hbp_pixels   = 10,   // hbp 10 pixels
+        .hact_pixels  = 454,  // hact 454 pixels
+        .hfp_pixels   = 10,   // hfp 10 pixels
+        .vsa_lines    = 4,    // vsa 4 lines
+        .vbp_lines    = 12,   // vbp 12 lines
+        .vact_lines   = 454,  // vact 454 lines
+        .vfp_lines    = 10,   // vfp 10 lines
+    },
+    .phy_data_rate = 480,     // 480Mbps
+    .pixel_clk = 20000,       // 20000KHz
+};
+
+const combo_dev_cfg_t g_panel_240x296_60_config = {
+    .devno = 0,
+    .lane_id = {0, -1},
+    .out_mode = OUT_MODE_DSI_CMD,
+    .out_format = OUT_FORMAT_RGB_24BIT,
+    .sync_info = {
+        .hsa_pixels   = 4,   // hsa 14 pixels hpw
+        .hbp_pixels   = 11,   // hbp 11 pixels HBP
+        .hact_pixels  = 368,  // hact 240 pixels HPX
+        .hfp_pixels   = 14,   // hfp 14 pixels hfp
+        .vsa_lines    = 2,    // vsa 2 lines vpw
+        .vbp_lines    = 6,   // vbp 6 lines vbp
+        .vact_lines   = 448,  // vact 296 lines vpx
+        .vfp_lines    = 8,   // vfp 8 lines vfp
+    },
+    .phy_data_rate = 480,     // 480Mbps
+    .pixel_clk = 20000,       // 20000KHz
+};
+
+const combo_dev_cfg_t g_panel_194x368_qspi_config = {
+    .out_format = OUT_FORMAT_RGB_24BIT,
+    .sync_info = {
+        .hact_pixels  = 194,  // hact 368 pixels
+        .vact_lines   = 368,  // vact 368 lines
+    },
+};
+
+
+const lcd_cmd_sequ g_common_466x466_cmd_display_off[] = {
+#if defined(BOARD_W9) || defined(BOARD_N9)
+    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */
+    {1, 1, {0x28}, 10},         /* display off */
+    {1, 1, {0x10}, 120},       /* sleep in */
+    {1, 2, {0x4f, 0x01}, 100},        /* sleep in */
+#else
+    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */
+    {1, 1, {0x28}, 0},         /* display off */
+    {1, 1, {0x10}, 120},       /* sleep in */
+    {1, 2, {0x4f, 0x01}, 0},   /* ��deepstandby ״̬ */
+#endif
+};
+
+#ifdef LCD_JD9885
+
+/* display off sequence for common lcd */
+const lcd_cmd_sequ g_common_cmd_display_off[] = {
+    {1, 2, {0xde, 0x00}, 0},   /* select default cmd page */
+    {1, 1, {0x28}, 0},         /* display off */
+    {1, 1, {0x10}, 120},       /* sleep in */
+};
+
+/* sleep in sequence for common lcd */
+const lcd_cmd_sequ g_common_cmd_sleep_in[] = {
+    {1, 2, {0xde, 0x00}, 0},   /* select default cmd page */
+    {1, 1, {0x28}, 0},         /* display off */
+    {1, 1, {0x10}, 120},       /* sleep in */
+};
+
+/* sleep in sequence for common lcd */
+const lcd_cmd_sequ g_common_cmd_sleep_out[] = {
+    {1, 2, {0xde, 0x00}, 0},   /* select default cmd page */
+    {1, 1, {0x11}, 120},       /* sleep out */
+    {1, 1, {0x29}, 0},         /* display on */
+};
+
+/* idle in sequence for EDO and BOE 454*454 lcd */
+lcd_cmd_sequ g_common_cmd_idle_in[] = {
+    {1, 2, {0xde, 0x00}, 0},
+    {1, 1, {0x39}, 0},
+};
+
+/* idle out sequence for EDO and BOE 454*454 lcd */
+const lcd_cmd_sequ g_common_cmd_idle_out[] = {
+    {1, 2, {0xde, 0x00}, 0},
+    {1, 1, {0x38}, 0},
+};
+
+/* te on sequence for EDO and BOE 454*454 lcd */
+const lcd_cmd_sequ g_common_cmd_te_on[] = {
+    {1, 2, {0xde, 0x00}, 0},
+    {1, 1, {0x35}, 0},
+};
+
+/* te off sequence for EDO and BOE 454*454 lcd */
+const lcd_cmd_sequ g_common_cmd_te_off[] = {
+    {1, 2, {0xde, 0x00}, 0},
+    {1, 1, {0x34}, 0},
+};
+
+/* set brightness sequence for EDO and BOE 454*454 lcd */
+lcd_cmd_sequ g_common_cmd_brightness[] = {
+    {1, 2, {0xde, 0x00}, 0},
+    {1, 2, {0x51, 0xff}, 0},
+};
+#else
+
+/* display off sequence for common lcd */
+const lcd_cmd_sequ g_common_cmd_display_off[] = {
+    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */
+    {1, 1, {0x28}, 0},         /* display off */
+    {1, 1, {0x10}, 120},       /* sleep in */
+};
+
+/* sleep in sequence for common lcd */
+const lcd_cmd_sequ g_common_cmd_sleep_in[] = {
+    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */
+    {1, 1, {0x28}, 0},         /* display off */
+    {1, 1, {0x10}, 120},       /* sleep in */
+};
+
+/* sleep in sequence for common lcd */
+const lcd_cmd_sequ g_common_cmd_sleep_out[] = {
+    {1, 2, {0xfe, 0x00}, 0},   /* select default cmd page */
+    {1, 1, {0x11}, 120},       /* sleep out */
+    {1, 1, {0x29}, 0},         /* display on */
+};
+
+/* idle in sequence for EDO and BOE 454*454 lcd */
+lcd_cmd_sequ g_common_cmd_idle_in[] = {
+    {1, 2, {0xfe, 0x00}, 0},
+    {1, 1, {0x39}, 0},
+};
+
+/* idle out sequence for EDO and BOE 454*454 lcd */
+const lcd_cmd_sequ g_common_cmd_idle_out[] = {
+    {1, 2, {0xfe, 0x00}, 0},
+    {1, 1, {0x38}, 0},
+};
+
+/* te on sequence for EDO and BOE 454*454 lcd */
+const lcd_cmd_sequ g_common_cmd_te_on[] = {
+    {1, 2, {0xfe, 0x00}, 0},
+    {1, 1, {0x35}, 0},
+};
+
+/* te off sequence for EDO and BOE 454*454 lcd */
+const lcd_cmd_sequ g_common_cmd_te_off[] = {
+    {1, 2, {0xfe, 0x00}, 0},
+    {1, 1, {0x34}, 0},
+};
+
+/* set brightness sequence for EDO and BOE 454*454 lcd */
+lcd_cmd_sequ g_common_cmd_brightness[] = {
+    {1, 2, {0xfe, 0x00}, 0},
+    {1, 2, {0x51, 0xff}, 0},
+};
+#endif
+/* init sequence for ST7367 360*480 lcd */
+const lcd_cmd_sequ g_st7367_360x480_screen_init_on[] = {
+    {1, 2, {0xF0, 0xC3}, 0},
+    {1, 2, {0xF0, 0x96}, 0},
+    {1, 2, {0xF0, 0xA5}, 0},
+    {1, 5, {0xC1, 0x11, 0x08, 0xAD, 0x13}, 0},
+    {1, 5, {0xC2, 0x11, 0x08, 0xAD, 0x13}, 0},
+    {1, 5, {0xC3, 0x22, 0x02, 0x44, 0x04}, 0},
+    {1, 5, {0xC4, 0x44, 0x04, 0x44, 0x04}, 0},
+    {1, 3, {0xC5, 0x4E, 0x80}, 0},  /* #VCOM 0.975 2025 4 28 */
+    {1, 2, {0xD6, 0x00}, 0},
+    {1, 2, {0xD7, 0x00}, 0},
+    {1, 15, {0xE0, 0xD0, 0x08, 0x0D, 0x0A, 0x08, 0x05, 0x35, 0x33, 0x4C, 0x08, 0x13, 0x14, 0x2D, 0x32}, 0},
+    {1, 15, {0xE1, 0xD0, 0x08, 0x0D, 0x0A, 0x08, 0x05, 0x35, 0x33, 0x4C, 0x08, 0x13, 0x14, 0x2D, 0x32}, 0},
+    {1, 15, {0xE5, 0x58, 0xF5, 0x66, 0x33, 0x22, 0x25, 0x10, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77}, 0},
+    {1, 15, {0xE6, 0x58, 0xF5, 0x66, 0x33, 0x22, 0x25, 0x10, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77}, 0},
+    {1, 7, {0xEC, 0x00, 0x55, 0x00, 0x00, 0x00, 0x08}, 0},
+    {1, 2, {0x36, 0x0C}, 0},
+    {1, 2, {0x3A, 0x07}, 0},
+    {1, 2, {0xB2, 0x09}, 0},
+    {1, 2, {0xB3, 0x01}, 0},
+    {1, 2, {0xB4, 0x01}, 0},
+    {1, 5, {0xB5, 0x00, 0x08, 0x00, 0x08}, 0},
+    {1, 3, {0xB6, 0xEF, 0x2C}, 0},
+    {1, 3, {0xA4, 0xC0, 0x63}, 0},
+    {1, 10, {0xA5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x2A, 0xBA, 0x02}, 0},
+    {1, 10, {0xA6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x2A, 0xBA, 0x02}, 0},
+    {1, 8, {0xBA, 0x58, 0x1A, 0x45, 0x02, 0x22, 0x01, 0x00}, 0}, /* #2025 5 9 Modify STV0 */
+    {1, 9, {0xBB, 0x00, 0x20, 0x00, 0x25, 0x83, 0x87, 0x18, 0x00}, 0},
+    {1, 9, {0xBC, 0x00, 0x24, 0x00, 0x25, 0x83, 0x87, 0x18, 0x00}, 0},
+    {1, 12, {0xBD, 0x21, 0x12, 0x99, 0xFF, 0x45, 0x36, 0x63, 0x54, 0xAB, 0xFF, 0x07}, 0},
+    {1, 2, {0xED, 0xC3}, 0},
+    {1, 4, {0xE4, 0x40, 0x0F, 0x2F}, 0},
+    {1, 2, {0x35, 0x00}, 0},
+    {1, 1, {0x21}, 0},
+    {1, 1, {0x11}, 120},
+    {1, 1, {0x29}, 120},
+    {1, 2, {0x35, 0x00}, 100},
+};
+
+const lcd_cmd_sequ g_edo_502x410_screen_init_on[] = {
+    {1, 5, {0x2A, 0x00, 0x04, 0x01, 0x9d}, 0}, 
+    {1, 5, {0x2B, 0x00, 0x00, 0x01, 0xf5}, 0}, 
+    {1, 2, {0x35, 0x00}, 0}, 
+    {1, 2, {0x36, 0x00}, 0}, 
+    {1, 2, {0x67, 0x01}, 0}, 
+    {1, 2, {0x68, 0x01}, 0}, 
+    {1, 2, {0x11, 0x00}, 120}, 
+    {1, 2, {0x29, 0x00}, 120}, 
+};
+const lcd_cmd_sequ g_edo_466x466_screen_init_on[] = {
+    {1, 2, {0xfe, 0x00}, 0}, 
+    {1, 2, {0x3a, 0x77}, 0}, 
+    {1, 2, {0x35, 0x00}, 0}, 
+    {1, 2, {0x53, 0x20}, 0}, 
+    // {1, 2, {0x51, 0xff}, 0}, 
+    {1, 2, {0x63, 0xff}, 0}, 
+    {1, 5, {0x2A, 0x00, 0x06, 0x01, 0xd7}, 0}, 
+    {1, 5, {0x2B, 0x00, 0x00, 0x01, 0xd1}, 0}, 
+    {1, 3, {0x44, 0x01, 0xc5}, 0},
+    {1, 1, {0x11}, 120}, 
+    {1, 1, {0x29}, 0}, 
+};
+
+
+const lcd_cmd_sequ g_fd272_466x466_screen_init_on[] = {
+{1, 2, {0xFE,0x20}, 0},                
+{1, 2, {0xF4,0x5A}, 0},                
+{1, 2, {0xF5,0x59}, 0},        
+               
+// ===  ID code  ===           
+{1, 2, {0xFE,0x40}, 0},        
+{1, 2, {0xD8,0x22}, 0},        
+{1, 2, {0xD9,0x00}, 0},        
+{1, 2, {0xDA,0x00}, 0},        
+
+// //======================== QSPI setting ============================
+// {1, 2, {0xFE,0x20}, 0}, 
+// {1, 2, {0x19,0x10}, 0}, //QSPI setting, MIPI MIPI_WR(0x39,0xemove
+// {1, 2, {0x1C,0xA0}, 0}, //QSPI setting, MIPI MIPI_WR(0x39,0xemove   
+               
+// ===  Timing Gen  ===                
+{1, 2, {0xFE,0x20}, 0},                
+{1, 2, {0x1A,0x15}, 0},                
+{1, 2, {0xFE,0x40}, 0},                
+{1, 2, {0x01,0x01}, 0},                
+{1, 2, {0x02,0x74}, 0},                
+{1, 2, {0x59,0x02}, 0},                
+{1, 2, {0x5A,0x15}, 0},                
+{1, 2, {0x5B,0x08}, 0},                
+{1, 2, {0x5C,0x08}, 0},                
+{1, 2, {0x70,0x02}, 0},                
+{1, 2, {0x71,0x15}, 0},                
+{1, 2, {0x72,0x08}, 0},                
+{1, 2, {0x73,0x08}, 0},                
+               
+// // ===  AOD setting===              
+// {1, 2, {0xFE,0x40}, 0},             
+// {1, 2, {0x5D,0x24}, 0},             
+// {1, 2, {0x60,0x08}, 0},             
+// {1, 2, {0x61,0x05}, 0},             
+// {1, 2, {0x62,0xA5}, 0},             
+// {1, 2, {0x0C,0xD7}, 0},             
+// {1, 2, {0x0D,0xF0}, 0},             
+               
+// ===  PoweMIPI_WR(0x39,0x Settings  ===              
+{1, 2, {0xFE,0xE0}, 0}, 
+{1, 2, {0x00,0x1E}, 0}, 
+{1, 2, {0x01,0x02}, 0}, 
+{1, 2, {0x02,0x00}, 0}, 
+{1, 2, {0x04,0x00}, 0}, 
+{1, 2, {0x06,0x14}, 0}, 
+{1, 2, {0x08,0x03}, 0}, 
+{1, 2, {0x09,0x1E}, 0}, 
+{1, 2, {0x0A,0x02}, 0}, 
+{1, 2, {0x0B,0x00}, 0}, 
+{1, 2, {0x0C,0x00}, 0}, 
+{1, 2, {0x0E,0x14}, 0}, 
+{1, 2, {0x0F,0x03}, 0}, 
+{1, 2, {0x10,0x1E}, 0}, 
+{1, 2, {0x11,0x20}, 0}, 
+{1, 2, {0x24,0x01}, 0}, 
+{1, 2, {0x21,0x99}, 0}, 
+{1, 2, {0x2D,0x99}, 0}, 
+{1, 2, {0x32,0x99}, 0}, 
+{1, 2, {0x26,0x41}, 0}, 
+{1, 2, {0x22,0x1A}, 0}, 
+{1, 2, {0x23,0x15}, 0}, 
+{1, 2, {0x30,0x01}, 0}, 
+{1, 2, {0xFE,0x40}, 0},        
+{1, 2, {0x57,0x43}, 0},        
+{1, 2, {0x58,0x33}, 0},        
+{1, 2, {0x6E,0x43}, 0},        
+{1, 2, {0x6F,0x33}, 0},        
+{1, 2, {0x74,0x43}, 0},        
+{1, 2, {0x75,0x33}, 0},        
+               
+// ===  swi foSGM38046 ===             
+{1, 2, {0xFE,0x40}, 0},                
+{1, 2, {0x12,0xFE}, 0},                
+{1, 2, {0x13,0x09}, 0},                
+{1, 2, {0xC9,0x4A}, 0},  //noMIPI_WR(0x39,0xmal ELVSS=-2.4V    
+{1, 2, {0x96,0x1C}, 0},  //noMIPI_WR(0x39,0xmal ELVDD=4.6V     
+{1, 2, {0x97,0x02}, 0},        
+{1, 2, {0xA5,0xFF}, 0},        
+{1, 2, {0xAA,0x1C}, 0},  //HBM ELVDD=4.6V
+{1, 2, {0xAB,0x3D}, 0},  //HBM ELVSS=-3.7V             
+{1, 2, {0x98,0x00}, 0},        
+{1, 2, {0xA7,0x1C}, 0},  //AOD ELVDD=4.6V
+{1, 2, {0xA9,0x4A}, 0},  //AOD ELVSS=-2.4V
+
+//swie timing setting fo SGM38046
+{1, 2, {0xFE,0x80}, 0}, 
+{1, 2, {0x66,0x22}, 0}, 
+{1, 2, {0x67,0x10}, 0}, 
+{1, 2, {0x68,0x0E}, 0},        
+// === GOA mapping ===);               
+{1, 2, {0xFE,0x70}, 0},                
+{1, 2, {0x9B,0x0C}, 0},          
+{1, 2, {0x9C,0x0D}, 0},        
+{1, 2, {0x9D,0x0E}, 0},         
+{1, 2, {0x9E,0x11}, 0},           
+{1, 2, {0x9F,0x10}, 0},          
+{1, 2, {0xA0,0x0F}, 0},            
+{1, 2, {0xA2,0x19}, 0},          
+{1, 2, {0xA3,0x19}, 0},        
+{1, 2, {0xA4,0x19}, 0},           
+{1, 2, {0xA5,0x19}, 0},            
+{1, 2, {0xA6,0x19}, 0},          
+{1, 2, {0xA7,0x19}, 0},         
+{1, 2, {0xA9,0x19}, 0},         
+{1, 2, {0xAA,0x01}, 0},        
+{1, 2, {0xAB,0x00}, 0},          
+{1, 2, {0xAC,0x09}, 0},          
+{1, 2, {0xAD,0x19}, 0},           
+{1, 2, {0xAE,0x19}, 0},           
+{1, 2, {0xAF,0x19}, 0},          
+{1, 2, {0xB0,0x19}, 0},            
+{1, 2, {0xB1,0x19}, 0},          
+{1, 2, {0xB2,0x19}, 0},           
+{1, 2, {0xB3,0x19}, 0},            
+{1, 2, {0xB4,0x19}, 0},           
+{1, 2, {0xB5,0x19}, 0},           
+{1, 2, {0xB6,0x19}, 0},           
+{1, 2, {0xB7,0x19}, 0},            
+{1, 2, {0xB8,0x19}, 0},            
+{1, 2, {0xB9,0x19}, 0},           
+{1, 2, {0xBA,0x19}, 0},            
+{1, 2, {0xBB,0x19}, 0},         
+{1, 2, {0xBC,0x19}, 0},          
+{1, 2, {0xBD,0xE3}, 0},          
+{1, 2, {0xBE,0x02}, 0},           
+{1, 2, {0xBF,0x08}, 0},           
+{1, 2, {0xC0,0x19}, 0},           
+{1, 2, {0xC1,0x39}, 0},            
+{1, 2, {0xC2,0x19}, 0},            
+{1, 2, {0xC3,0x19}, 0},        
+{1, 2, {0xC4,0x19}, 0},         
+{1, 2, {0xC5,0x19}, 0},          
+{1, 2, {0xC6,0x19}, 0},          
+{1, 2, {0xC7,0x19}, 0},           
+{1, 2, {0xC8,0x19}, 0},           
+               
+// ===  souMIPI_WR(0x39,0xce/mux sequence ===          
+{1, 2, {0xFE,0x40}, 0}, 
+{1, 2, {0x4C,0x22}, 0}, 
+{1, 2, {0x53,0xA0}, 0}, 
+               
+// ===  SD/SW_Toggle_Sequence_ContMIPI_WR(0x39,0xol ===                
+{1, 2, {0xFE,0xF0}, 0},                
+{1, 2, {0x72,0x14}, 0},                
+{1, 2, {0x73,0x41}, 0},                
+{1, 2, {0x74,0x36}, 0},                
+{1, 2, {0x75,0x63}, 0},                
+{1, 2, {0x76,0x25}, 0},                
+{1, 2, {0x77,0x52}, 0},                
+{1, 2, {0x78,0x14}, 0},                
+{1, 2, {0x79,0x41}, 0},                
+{1, 2, {0x7A,0x36}, 0},                
+{1, 2, {0x7B,0x63}, 0},                
+{1, 2, {0x7C,0x25}, 0},                
+{1, 2, {0x7D,0x52}, 0},                
+{1, 2, {0x7E,0x36}, 0},                
+{1, 2, {0x7F,0x63}, 0},                
+{1, 2, {0x80,0x25}, 0},                
+{1, 2, {0x81,0x52}, 0},                
+{1, 2, {0x82,0x14}, 0},                
+{1, 2, {0x83,0x41}, 0},                
+{1, 2, {0x84,0x36}, 0},                
+{1, 2, {0x85,0x63}, 0},                
+{1, 2, {0x86,0x25}, 0},                
+{1, 2, {0x87,0x52}, 0},                
+{1, 2, {0x88,0x14}, 0},                
+{1, 2, {0x89,0x41}, 0},                
+                                        
+// === GIP Setting  ===                
+{1, 2, {0xFE,0x70}, 0}, 
+{1, 2, {0x00,0xC8}, 0}, 
+{1, 2, {0x01,0x08}, 0}, 
+{1, 2, {0x02,0x02}, 0}, 
+{1, 2, {0x03,0x00}, 0}, 
+{1, 2, {0x04,0x00}, 0}, 
+{1, 2, {0x05,0x00}, 0}, 
+{1, 2, {0x06,0x12}, 0}, 
+{1, 2, {0x07,0x0A}, 0}, 
+{1, 2, {0x09,0xC8}, 0}, 
+{1, 2, {0x0A,0x08}, 0}, 
+{1, 2, {0x0B,0x02}, 0}, 
+{1, 2, {0x0C,0x00}, 0}, 
+{1, 2, {0x0D,0x00}, 0}, 
+{1, 2, {0x0E,0x01}, 0}, 
+{1, 2, {0x0F,0x12}, 0}, 
+{1, 2, {0x10,0x0A}, 0}, 
+{1, 2, {0x12,0xC0}, 0}, 
+{1, 2, {0x13,0x08}, 0}, 
+{1, 2, {0x14,0x02}, 0}, 
+{1, 2, {0x15,0x00}, 0}, 
+{1, 2, {0x16,0x08}, 0}, 
+{1, 2, {0x17,0x02}, 0}, 
+{1, 2, {0x18,0x1D}, 0}, 
+{1, 2, {0x19,0x00}, 0}, 
+{1, 2, {0x1B,0xC0}, 0}, 
+{1, 2, {0x1C,0x08}, 0}, 
+{1, 2, {0x1D,0x02}, 0}, 
+{1, 2, {0x1E,0x00}, 0}, 
+{1, 2, {0x1F,0x08}, 0}, 
+{1, 2, {0x20,0x03}, 0}, 
+{1, 2, {0x21,0x1D}, 0}, 
+{1, 2, {0x22,0x00}, 0},  
+{1, 2, {0x4C,0x80}, 0}, 
+{1, 2, {0x4D,0x00}, 0}, 
+{1, 2, {0x4E,0x01}, 0}, 
+{1, 2, {0x4F,0x08}, 0}, 
+{1, 2, {0x50,0x01}, 0}, 
+{1, 2, {0x51,0x1D}, 0}, 
+{1, 2, {0x52,0x1F}, 0}, 
+{1, 2, {0x53,0xC6}, 0}, 
+{1, 2, {0x54,0x00}, 0}, 
+{1, 2, {0x55,0x02}, 0}, 
+{1, 2, {0x56,0x12}, 0}, 
+{1, 2, {0x58,0x00}, 0}, 
+{1, 2, {0x65,0xF1}, 0}, 
+{1, 2, {0x66,0x48}, 0}, 
+{1, 2, {0x67,0x00}, 0}, 
+               
+// === MUX Sequence ContMIPI_WR(0x39,0xol ===          
+{1, 2, {0xFE,0xF0}, 0},                
+{1, 2, {0xA3,0x00}, 0},                                          
+{1, 2, {0xFE,0x70}, 0},                
+{1, 2, {0x76,0x07}, 0},                
+{1, 2, {0x77,0x00}, 0},                
+{1, 2, {0x78,0x03}, 0},                
+{1, 2, {0x68,0x07}, 0},                
+{1, 2, {0x69,0x07}, 0},                
+{1, 2, {0x6A,0x07}, 0},                
+{1, 2, {0x6B,0x07}, 0},                
+{1, 2, {0x6C,0x07}, 0},                
+{1, 2, {0x6D,0x07}, 0},                
+{1, 2, {0xFE,0xF0}, 0},                
+{1, 2, {0xA9,0x23}, 0},                
+{1, 2, {0xAA,0x23}, 0},                
+{1, 2, {0xAB,0x23}, 0},                
+{1, 2, {0xAC,0x23}, 0},                
+{1, 2, {0xAD,0x23}, 0},                
+{1, 2, {0xAE,0x23}, 0},                
+{1, 2, {0xFE,0x70}, 0},                
+{1, 2, {0x93,0x07}, 0},                
+{1, 2, {0x94,0x00}, 0},                
+{1, 2, {0x96,0x03}, 0},                
+{1, 2, {0xDB,0x07}, 0},                
+{1, 2, {0xDC,0x07}, 0},                
+{1, 2, {0xDD,0x07}, 0},                
+{1, 2, {0xDE,0x07}, 0},                
+{1, 2, {0xDF,0x07}, 0},                
+{1, 2, {0xE0,0x07}, 0},                
+{1, 2, {0xE7,0x23}, 0},                
+{1, 2, {0xE8,0x23}, 0},                
+{1, 2, {0xE9,0x23}, 0},                
+{1, 2, {0xEA,0x23}, 0},                
+{1, 2, {0xEB,0x23}, 0},                
+{1, 2, {0xEC,0x23}, 0},                
+               
+// ===  PoweMIPI_WR(0x39,0x on/off sequence Blank peMIPI_WR(0x39,0xiod contMIPI_WR(0x39,0xol  ===              
+{1, 2, {0xFE,0x70}, 0},        
+{1, 2, {0xD1,0xF0}, 0},        
+{1, 2, {0xD2,0xFF}, 0},        
+{1, 2, {0xD3,0xF0}, 0},        
+{1, 2, {0xD4,0xFF}, 0},        
+{1, 2, {0xD5,0xA0}, 0},        
+{1, 2, {0xD6,0xAA}, 0},        
+{1, 2, {0xD7,0xF0}, 0},        
+{1, 2, {0xD8,0xFF}, 0},        
+               
+// ===  SouMIPI_WR(0x39,0xce  ===              
+{1, 2, {0xFE,0x40}, 0},        
+{1, 2, {0x4D,0x2A}, 0},        
+{1, 2, {0x4E,0x00}, 0},        
+{1, 2, {0x4F,0x00}, 0},        
+{1, 2, {0x50,0x00}, 0},        
+{1, 2, {0x51,0xF3}, 0},        
+{1, 2, {0x52,0x23}, 0},        
+{1, 2, {0x6B,0xF3}, 0},        
+{1, 2, {0x6C,0x13}, 0},        
+{1, 2, {0x8F,0xFF}, 0},        
+{1, 2, {0x90,0xFF}, 0},        
+{1, 2, {0x91,0x3F}, 0},        
+{1, 2, {0xA2,0x10}, 0},        
+{1, 2, {0x07,0x21}, 0},        
+{1, 2, {0x35,0x81}, 0},        
+               
+// === gamma setting  ===              
+{1, 3, {0x39,0xFE,0x40}, 0},           
+{1, 3, {0x39,0x33,0x10}, 0},           
+{1, 3, {0x39,0x34,0xC1}, 0},           
+{1, 3, {0x39,0xFE,0x50}, 0}, 
+{1, 3, {0x39,0xA9,0x58}, 0}, 
+{1, 3, {0x39,0xAA,0x58}, 0}, 
+{1, 3, {0x39,0xAB,0x01}, 0},  
+{1, 3, {0x39,0xFE,0x60}, 0}, 
+{1, 3, {0x39,0xA9,0x58}, 0}, 
+{1, 3, {0x39,0xAA,0x48}, 0}, 
+{1, 3, {0x39,0xAB,0x01}, 0}, 
+                                         
+//=== Watchedge ===            
+{1, 2, {0xFE,0x90}, 0}, 
+{1, 2, {0x15,0x00}, 0}, 
+{1, 2, {0xB0,0x00}, 0},  
+{1, 2, {0xA4,0xF1}, 0}, 
+{1, 2, {0xA5,0xE9}, 0}, 
+{1, 2, {0xA6,0x00}, 0}, 
+{1, 2, {0xA7,0xE9}, 0}, 
+{1, 2, {0xA9,0xE9}, 0}, 
+{1, 2, {0xAA,0x80}, 0}, 
+{1, 2, {0xAB,0x47}, 0}, 
+{1, 2, {0xAC,0xFF}, 0}, 
+{1, 2, {0xAE,0x0C}, 0}, 
+{1, 2, {0x45,0x00}, 0},                
+                                         
+//=== SCC ===           
+{1, 2, {0xFE,0x90}, 0},                
+{1, 2, {0x4E,0x1F}, 0},                 
+{1, 2, {0x4F,0x09}, 0},                 
+{1, 2, {0x50,0xDA}, 0},                 
+{1, 2, {0x51,0x80}, 0}, 
+{1, 2, {0x52,0x86}, 0}, 
+{1, 2, {0x53,0x00}, 0}, 
+{1, 2, {0x54,0x10}, 0}, 
+{1, 2, {0x55,0x00}, 0}, 
+{1, 2, {0x56,0x00}, 0}, 
+{1, 2, {0x57,0x00}, 0}, 
+{1, 2, {0x58,0x00}, 0}, 
+{1, 2, {0x59,0x00}, 0}, 
+{1, 2, {0x5A,0x0A}, 0}, 
+{1, 2, {0x5B,0x10}, 0}, 
+{1, 2, {0x5C,0x00}, 0}, 
+{1, 2, {0x5D,0x86}, 0}, 
+{1, 2, {0x5E,0x40}, 0}, 
+{1, 2, {0x5F,0x00}, 0}, 
+{1, 2, {0x60,0x00}, 0}, 
+{1, 2, {0x61,0x0A}, 0}, 
+{1, 2, {0x62,0x10}, 0}, 
+{1, 2, {0x63,0x00}, 0}, 
+{1, 2, {0x64,0x00}, 0}, 
+{1, 2, {0x65,0x00}, 0}, 
+{1, 2, {0x66,0x00}, 0}, 
+{1, 2, {0x67,0x00}, 0}, 
+{1, 2, {0x68,0x4A}, 0}, 
+{1, 2, {0x69,0x00}, 0}, 
+{1, 2, {0x6A,0x00}, 0}, 
+{1, 2, {0x6B,0x06}, 0}, 
+{1, 2, {0x6C,0x00}, 0}, 
+{1, 2, {0x6D,0x06}, 0}, 
+{1, 2, {0x6E,0x00}, 0}, 
+{1, 2, {0x6F,0x10}, 0}, 
+{1, 2, {0x70,0x0A}, 0}, 
+{1, 2, {0x71,0x00}, 0}, 
+{1, 2, {0x72,0x00}, 0}, 
+{1, 2, {0x73,0x00}, 0}, 
+{1, 2, {0x74,0x00}, 0}, 
+{1, 2, {0x75,0x00}, 0}, 
+{1, 2, {0x76,0x10}, 0}, 
+{1, 2, {0x77,0x0A}, 0}, 
+{1, 2, {0x78,0x86}, 0}, 
+{1, 2, {0x79,0x40}, 0}, 
+{1, 2, {0x7A,0x00}, 0}, 
+{1, 2, {0x7B,0x80}, 0}, 
+{1, 2, {0x7C,0x80}, 0}, 
+{1, 2, {0x7D,0x10}, 0}, 
+{1, 2, {0x7E,0x00}, 0}, 
+{1, 2, {0x7F,0x00}, 0}, 
+{1, 2, {0x80,0x00}, 0}, 
+{1, 2, {0x81,0x00}, 0}, 
+{1, 2, {0x82,0x00}, 0}, 
+{1, 2, {0x83,0x40}, 0}, 
+{1, 2, {0x84,0x0A}, 0}, 
+{1, 2, {0x85,0x00}, 0}, 
+{1, 2, {0x86,0x06}, 0}, 
+{1, 2, {0x87,0x00}, 0}, 
+{1, 2, {0x88,0x40}, 0}, 
+{1, 2, {0x89,0x00}, 0}, 
+{1, 2, {0x8A,0x10}, 0}, 
+{1, 2, {0x8B,0x84}, 0}, 
+{1, 2, {0x8C,0x00}, 0}, 
+{1, 2, {0x8D,0x00}, 0}, 
+{1, 2, {0x8E,0x00}, 0}, 
+{1, 2, {0x8F,0x08}, 0}, 
+{1, 2, {0x90,0x04}, 0}, 
+{1, 2, {0x91,0x10}, 0}, 
+{1, 2, {0x92,0x04}, 0}, 
+{1, 2, {0x93,0x00}, 0}, 
+{1, 2, {0x94,0x00}, 0}, 
+{1, 2, {0x95,0x00}, 0}, 
+{1, 2, {0x96,0x00}, 0}, 
+{1, 2, {0x97,0x44}, 0}, 
+{1, 2, {0x98,0x10}, 0}, 
+{1, 2, {0x99,0x00}, 0}, 
+{1, 2, {0x9A,0x08}, 0}, 
+{1, 2, {0x9B,0x00}, 0}, 
+{1, 2, {0x9C,0x08}, 0}, 
+{1, 2, {0x9D,0x00}, 0}, 
+{1, 2, {0x9E,0x44}, 0}, 
+{1, 2, {0x9F,0x04}, 0}, 
+{1, 2, {0xA0,0x00}, 0}, 
+{1, 2, {0xA2,0x00}, 0},        
+               
+// === PoweMIPI_WR(0x39,0x saving ===          
+{1, 2, {0xFE,0x70}, 0},                
+{1, 2, {0x98,0x74}, 0},                
+{1, 2, {0xC9,0x02}, 0},                
+{1, 2, {0xCA,0x02}, 0},                
+{1, 2, {0xCB,0x02}, 0},                
+{1, 2, {0xCC,0x02}, 0},                
+{1, 2, {0xCD,0x02}, 0},                
+{1, 2, {0xCE,0x82}, 0},                
+{1, 2, {0xCF,0x02}, 0},                
+{1, 2, {0xD0,0x42}, 0},                                                 
+{1, 2, {0xFE,0xE0}, 0},                
+{1, 2, {0x19,0x43}, 0},                
+{1, 2, {0x1E,0x43}, 0},                
+{1, 2, {0x1C,0x41}, 0},                
+{1, 2, {0x18,0x00}, 0},                
+{1, 2, {0x1B,0x0C}, 0},                
+{1, 2, {0x1A,0x9A}, 0},                
+{1, 2, {0x1D,0xDA}, 0},                
+{1, 2, {0x28,0x58}, 0},                
+{1, 2, {0x05,0x04}, 0},                
+{1, 2, {0x0D,0x04}, 0},                                                
+{1, 2, {0xFE,0x40}, 0},                
+{1, 2, {0x54,0xAC}, 0},                
+{1, 2, {0x55,0xA0}, 0},                
+{1, 2, {0x48,0xAA}, 0},                                                
+{1, 2, {0xFE,0x90}, 0},                
+{1, 2, {0x31,0x08}, 0},                
+               
+//=== CMD1 setting ===         
+// MIPI_WR(0x39,0xFE,0x00);
+//MIPI_WR(0x39,0xC4,0x80); //SPI setting, mipi MIPI_WR(0x39,0xemove
+//MIPI_WR(0x39,0x3A,0x55); //55 MIPI_WR(0x39,0xGB565, 77 MIPI_WR(0x39,0xGB888          
+{1, 2, {0x35,0x00}, 0},                        
+{1, 2, {0x53,0x20}, 0},                        
+{1, 2, {0x51,0xFF}, 0},                        
+{1, 2, {0x63,0xFF}, 0},                        
+{1, 5, {0x2A,0x00,0x08,0x01,0xD9}, 0},                         // paMIPI_WR(0x39,0xitial update
+{1, 5, {0x2B,0x00,0x00,0x01,0xD1}, 0},                         // paMIPI_WR(0x39,0xtial update
+{1, 1, {0x11}, 120}, 
+
+{1, 2, {0xFE,0x20}, 0}, 
+{1, 2, {0xF4,0x5A}, 0}, 
+{1, 2, {0xF5,0x59}, 0}, 
+{1, 2, {0xFE,0x40}, 0}, 
+{1, 2, {0x08,0x0A}, 0},                        
+
+{1, 1, {0x29}, 0},     
+};
+
+
+/* init sequence for EDO 454*454 lcd */
+const lcd_cmd_sequ g_edo_454x454_screen_init_on[] = {
+    {1, 2, {0xfe, 0x01}, 0},
+    {1, 2, {0x30, 0x43}, 0}, /* set LCD frequency to 15HZ */
+    {1, 2, {0xfe, 0x00}, 0},
+    {1, 2, {0x3a, 0x77}, 0},
+    {1, 2, {0x53, 0x20}, 0},
+    {1, 2, {0x51, 0xff}, 0},
+    {0, 5, {0x2a, 0x00, 0x0e, 0x01, 0xd3}, 0},
+    {0, 5, {0x2b, 0x00, 0x00, 0x01, 0xc5}, 0},
+    {1, 3, {0x44, 0x01, 0xc5}, 0},
+    {1, 2, {0x35, 0x00}, 0},
+    {1, 1, {0x11}, 120},
+    {1, 1, {0x29}, 0},
+};
+
+/* init sequence for BOE 454*454 lcd */
+const lcd_cmd_sequ g_boe_454x454_screen_init_on[] = {
+    {1, 2, {0xfe, 0x0d}, 0},
+    {1, 2, {0x01, 0x00}, 0},
+    {1, 2, {0x03, 0x00}, 0},
+    {1, 2, {0x1b, 0x00}, 0},
+    {1, 2, {0x1d, 0x00}, 0},
+    {1, 2, {0x37, 0x00}, 0},
+    {1, 2, {0x39, 0x00}, 0},
+    {1, 2, {0x52, 0x58}, 0},
+    {1, 2, {0x53, 0x00}, 0},
+
+    {1, 2, {0xfe, 0x01}, 0},
+    {1, 2, {0x72, 0x05}, 0},
+    {1, 2, {0x73, 0x16}, 0},
+    {1, 2, {0x74, 0x0c}, 0},
+
+    {1, 2, {0xfe, 0x01}, 0},
+    {1, 2, {0x18, 0x55}, 0},
+    {1, 2, {0xc5, 0x10}, 0},
+    {1, 2, {0x72, 0x0e}, 0},
+    {1, 2, {0x73, 0x1c}, 0},
+
+    {1, 2, {0xfe, 0x07}, 0},
+    {1, 2, {0x15, 0x04}, 0},
+    {1, 2, {0xfe, 0x01}, 0},
+    {1, 2, {0x0a, 0xf8}, 0},
+
+    {1, 2, {0xfe, 0x00}, 0},
+    {1, 2, {0x51, 0xff}, 0},
+    {1, 2, {0x35, 0x00}, 0},
+    {0, 5, {0x2a, 0x00, 0x0c, 0x01, 0xd1}, 0},
+    {0, 5, {0x2b, 0x00, 0x00, 0x01, 0xc5}, 0},
+    {1, 2, {0x53, 0x20}, 0},
+    {1, 1, {0x11}, 120},
+    {1, 1, {0x29}, 0},
+};
+
+const lcd_cmd_sequ g_sh_240x296_screen_init_on[] = {
+    {1, 1, {0x11}, 5},
+    {1, 5, {0x2a, 0x00, 0x00, 0x01, 0x6f}, 1},
+    {1, 5, {0x2b, 0x00, 0x00, 0x01, 0xbf}, 1},
+    {1, 3, {0x44, 0x01, 0xbf}, 1},
+    {1, 2, {0x35, 0x00}, 1},
+    {1, 2, {0x3a, 0x77}, 1},
+    {1, 2, {0x53, 0x20}, 80},
+    {1, 1, {0x29}, 0},
+};
+
+const lcd_cmd_sequ g_boe_194x368_screen_init_on[] = {
+    {0, 2, {0xfe, 0x00}, 0},
+    {0, 3, {0x44, 0x00, 0xB7}, 0},
+    {0, 2, {0x3a, 0x77}, 0},
+    {0, 2, {0x51, 0x80}, 0},
+    {0, 2, {0x35, 0x0}, 0},
+    {0, 5, {0x2a, 0x00, 0x00, 0x00, 0xc1}, 0},
+    {0, 1, {0x11}, 120},
+    {0, 1, {0x29}, 100},
+    {0, 1, {0x39}, 0},
+};
+
+
+const lcd_cmd_sequ g_jd_360x360_screen_init_on[] = {
+    {1, 2, {0xDE, 0x00}, 0},
+    {1, 3, {0xDF, 0x98, 0x55}, 0},
+    {1, 3, {0xCE, 0x0D, 0x00}, 0},
+    // {1, 2, {0xC2, 0x38}, 0},
+    {1, 2, {0xB2, 0x30}, 0},
+    {1, 5, {0xB7, 0x01, 0x35, 0x01, 0x5D}, 0},
+    {1, 7, {0xBB, 0x1B, 0x64, 0xE3, 0x34, 0x3E, 0xF3}, 0},
+    {1, 5, {0xBC, 0x00, 0x18, 0xF3, 0xC0}, 0},
+    {1, 3, {0xC0, 0x22, 0xC1}, 0},
+    {1, 12, {0xC3, 0x00, 0x02, 0x2A, 0x0B, 0x08, 0x47, 0x08, 0x04, 0x62, 0x30, 0x30}, 0},
+    {1, 12, {0xC4, 0x40, 0x00, 0xAD, 0x68, 0x43, 0x07, 0x04, 0x16, 0x43, 0x07, 0x04}, 0},
+    {1, 33, {0xC8, 0x3F, 0x2E, 0x24, 0x1F, 0x20, 0x21, 0x1D, 0x1D, 0x1D, 0x1C, 0x19, 0x0E, 0x0B, 0x07, 0x03, 0x02, 0x3F, 0x2E, 0x24, 0x1F, 0x20, 0x21, 0x1D, 0x1D, 0x1D, 0x1C, 0x19, 0x0E, 0x0B, 0x07, 0x03, 0x02}, 0},
+    {1, 3, {0xD3, 0x28, 0x13}, 0},
+    {1, 3, {0xD7, 0x18, 0x31}, 0},
+    {1, 7, {0xD9, 0x00, 0x00, 0xFF, 0x00, 0xF0, 0x00}, 0},
+    {1, 2, {0xDE, 0x01}, 0},
+    {1, 9, {0xB7, 0x13, 0xE7, 0x64, 0x39, 0x06, 0x36, 0x19, 0x1C}, 0},
+    {1, 2, {0xBE, 0x00}, 0},
+    {1, 5, {0xC1, 0x04, 0x4A, 0x90, 0x08}, 0},
+    {1, 5, {0xC2, 0x00, 0x16, 0xDA, 0xE7}, 0},
+    {1, 3, {0xC4, 0x72, 0x12}, 0},
+    {1, 7, {0xC7, 0x00, 0x00, 0x09, 0x3D, 0x09, 0x3D}, 0},
+    {1, 7, {0xC8, 0x00, 0x00, 0x0B, 0x3D, 0x16, 0x39}, 0},
+    {1, 6, {0xC9, 0x00, 0x0A, 0x08, 0x06, 0x04}, 0},
+    {1, 6, {0xCA, 0x1E, 0x1F, 0x10, 0x17, 0x18}, 0},
+    {1, 6, {0xCB, 0x01, 0x0B, 0x09, 0x07, 0x05}, 0},
+    {1, 6, {0xCC, 0x1E, 0x1F, 0x11, 0x17, 0x18}, 0},
+    {1, 6, {0xCD, 0x31, 0x25, 0x27, 0x29, 0x2B}, 0},
+    {1, 6, {0xCE, 0x3F, 0x3E, 0x21, 0x37, 0x38}, 0},
+    {1, 6, {0xCF, 0x30, 0x24, 0x26, 0x28, 0x2A}, 0},
+    {1, 6, {0xD0, 0x3F, 0x3E, 0x20, 0x37, 0x38}, 0},
+    {1, 6, {0xD1, 0x06, 0x30, 0xA5, 0xDB, 0x30}, 0},
+    {1, 7, {0xD3, 0x3B, 0x08, 0x00, 0x00, 0x00, 0x00}, 0},
+    {1, 7, {0xD4, 0x67, 0x00, 0x00, 0x01, 0x00, 0x01}, 0},
+    {1, 8, {0xD5, 0x10, 0x10, 0x07, 0x07, 0x0F, 0x94, 0x26}, 0},
+    {1, 4, {0xD6, 0x00, 0x00, 0x40}, 0},
+    {1, 4, {0xD7, 0x01, 0x84, 0x20}, 0},
+    {1, 2, {0xDE, 0x02}, 0},
+    {1, 2, {0xB6, 0x1C}, 0},
+    {1, 2, {0xDE, 0x00}, 0},
+    {1, 2, {0x4D, 0x00}, 0},
+    {1, 2, {0x4E, 0x00}, 0},
+    {1, 2, {0x4F, 0x00}, 0},
+    {1, 2, {0x4C, 0x01}, 10},
+    {1, 2, {0x4C, 0x00}, 0},
+    {1, 5, {0x2A, 0x00, 0x00, 0x01, 0x68}, 0},
+    {1, 5, {0x2B, 0x00, 0x00, 0x01, 0x68}, 0},
+    {1, 2, {0x35, 0x00}, 0},
+    {1, 2, {0x36, 0x00}, 0},
+    /* {1, 2, {0x3A, 0x55}, 0}, */
+    {1, 1, {0x11}, 120},
+    {1, 1, {0x29}, 10},
+};
+
+const lcd_cmds_sequ g_display_off_cmds = {
+    .cmd = g_common_cmd_display_off,
+    .cmd_cnt = array_size(g_common_cmd_display_off),
+};
+
+const lcd_cmds_sequ g_466x466_display_off_cmds = {
+    .cmd = g_common_466x466_cmd_display_off,
+    .cmd_cnt = array_size(g_common_466x466_cmd_display_off),
+};
+
+const lcd_cmds_sequ g_idle_in_cmds = {
+    .cmd = g_common_cmd_idle_in,
+    .cmd_cnt = array_size(g_common_cmd_idle_in),
+};
+
+const lcd_cmds_sequ g_idle_out_cmds = {
+    .cmd = g_common_cmd_idle_out,
+    .cmd_cnt = array_size(g_common_cmd_idle_out),
+};
+
+const lcd_cmds_sequ g_te_on_cmds = {
+    .cmd = g_common_cmd_te_on,
+    .cmd_cnt = array_size(g_common_cmd_te_on),
+};
+
+const lcd_cmds_sequ g_te_off_cmds = {
+    .cmd = g_common_cmd_te_off,
+    .cmd_cnt = array_size(g_common_cmd_te_off),
+};
+
+const lcd_cmds_sequ g_brightness_cmds = {
+    .cmd = g_common_cmd_brightness,
+    .cmd_cnt = array_size(g_common_cmd_brightness),
+};
+
+const lcd_cmds_sequ g_st7367_360x480_screen_init_on_cmds = {
+    .cmd = g_st7367_360x480_screen_init_on,
+    .cmd_cnt = array_size(g_st7367_360x480_screen_init_on),
+};
+
+const lcd_cmds_sequ g_edo_502x410_screen_init_on_cmds = {
+    .cmd = g_edo_502x410_screen_init_on,
+    .cmd_cnt = array_size(g_edo_502x410_screen_init_on),
+};
+const lcd_cmds_sequ g_edo_466x466_screen_init_on_cmds = {
+    .cmd = g_edo_466x466_screen_init_on,
+    .cmd_cnt = array_size(g_edo_466x466_screen_init_on),
+};
+
+const lcd_cmds_sequ g_fd272_466x466_screen_init_on_cmds = {
+    .cmd = g_fd272_466x466_screen_init_on,
+    .cmd_cnt = array_size(g_fd272_466x466_screen_init_on),
+};
+
+
+const lcd_cmds_sequ g_jd_360x360_screen_init_on_cmds = {
+    .cmd = g_jd_360x360_screen_init_on,
+    .cmd_cnt = array_size(g_jd_360x360_screen_init_on),
+};
+
+const lcd_cmds_sequ g_edo_454x454_screen_init_on_cmds = {
+    .cmd = g_edo_454x454_screen_init_on,
+    .cmd_cnt = array_size(g_edo_454x454_screen_init_on),
+};
+
+const lcd_cmds_sequ g_boe_454x454_screen_init_on_cmds = {
+    .cmd = g_boe_454x454_screen_init_on,
+    .cmd_cnt = array_size(g_boe_454x454_screen_init_on),
+};
+
+const lcd_cmds_sequ g_sh_240x296_screen_init_on_cmds = {
+    .cmd = g_sh_240x296_screen_init_on,
+    .cmd_cnt = array_size(g_sh_240x296_screen_init_on),
+};
+
+const lcd_cmds_sequ g_boe_194x368_screen_init_on_cmds = {
+    .cmd = g_boe_194x368_screen_init_on,
+    .cmd_cnt = array_size(g_boe_194x368_screen_init_on),
+};
+
+const lcd_cmds_sequ g_sleep_in_cmds = {
+    .cmd = g_common_cmd_sleep_in,
+    .cmd_cnt = array_size(g_common_cmd_sleep_in),
+};
+
+const lcd_cmds_sequ g_sleep_out_cmds = {
+    .cmd = g_common_cmd_sleep_out,
+    .cmd_cnt = array_size(g_common_cmd_sleep_out),
+};
+
+
+const lcd_drv_cfg g_lcd_driver_ops[] = {
+    {
+        .bus_type             = BUS_DISPLAY_MIPI,
+        .bus_cfg              = &g_panel_st7367_360x480_60_config,
+        .x_start              = 0,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_ST7367_360X480_SCREEN_ID,
+        .display_on_cmds      = &g_st7367_360x480_screen_init_on_cmds,
+        .display_off_cmds     = &g_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0x04,
+        .lcd_id_info.read_len = 3,
+    },
+    {
+        .bus_type             = BUS_DISPLAY_MIPI,
+        .bus_cfg              = &g_panel_502x410_50_config,
+        .x_start              = 0x04,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_EDO_502X410_SCREEN_ID,
+        .display_on_cmds      = &g_edo_502x410_screen_init_on_cmds,
+        .display_off_cmds     = &g_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0x04,
+        .lcd_id_info.read_len = 3,
+    },
+    {
+        .bus_type             = BUS_DISPLAY_MIPI,
+        .bus_cfg              = &g_panel_466x466_60_config,
+        .x_start              = 0x6,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_EDO_466X466_SCREEN_ID,
+        .display_on_cmds      = &g_edo_466x466_screen_init_on_cmds,
+        .display_off_cmds     = &g_466x466_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0x04,
+        .lcd_id_info.read_len = 3,
+    },
+    {
+        .bus_type             = BUS_DISPLAY_MIPI,
+        .bus_cfg              = &g_fd272_466x466_60_config,
+        .x_start              = 0x6,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_FD272_466X466_SCREEN_ID,
+        .display_on_cmds      = &g_fd272_466x466_screen_init_on_cmds,
+        .display_off_cmds     = &g_466x466_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0x04,
+        .lcd_id_info.read_len = 3,
+    },
+    {
+        .bus_type             = BUS_DISPLAY_MIPI,
+        .bus_cfg              = &g_panel_360x360_60_config,
+        .x_start              = 0,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_JD_360X360_SCREEN_ID,
+        .display_on_cmds      = &g_jd_360x360_screen_init_on_cmds,
+        .display_off_cmds     = &g_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0x04,
+        .lcd_id_info.read_len = 3,
+    },
+    {
+        .bus_type             = BUS_DISPLAY_MIPI,
+        .bus_cfg              = &g_panel_454x454_60_config,
+        .x_start              = 0xe,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_EDO_454X454_SCREEN_ID,
+        .display_on_cmds      = &g_edo_454x454_screen_init_on_cmds,
+        .display_off_cmds     = &g_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0x04,
+        .lcd_id_info.read_len = 3,
+    },
+    {
+        .bus_type             = BUS_DISPLAY_MIPI,
+        .bus_cfg              = &g_panel_454x454_60_config,
+        .x_start              = 0xc,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_BOE_454X454_SCREEN_ID,
+        .display_on_cmds      = &g_boe_454x454_screen_init_on_cmds,
+        .display_off_cmds     = &g_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0x04,
+        .lcd_id_info.read_len = 3,
+    },
+    {
+        .bus_type             = BUS_DISPLAY_MIPI,
+        .bus_cfg              = &g_panel_240x296_60_config,
+        .x_start              = 0,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_SH_240X296_SCREEN_ID,
+        .display_on_cmds      = &g_sh_240x296_screen_init_on_cmds,
+        .display_off_cmds     = &g_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0xda,
+        .lcd_id_info.read_len = 3,
+    },
+    {
+        .bus_type             = BUS_DISPLAY_QSPI,
+        .bus_cfg              = &g_panel_194x368_qspi_config,
+        .x_start              = 0,
+        .y_start              = 0,
+        .fps                  = 60,
+        .lcd_id               = LCD_BOE_194X368_SCREEN_ID,
+        .display_on_cmds      = &g_boe_194x368_screen_init_on_cmds,
+        .display_off_cmds     = &g_display_off_cmds,
+        .enter_idle_cmds      = &g_idle_in_cmds,
+        .exit_idle_cmds       = &g_idle_out_cmds,
+        .te_on_cmds           = &g_te_on_cmds,
+        .te_off_cmds          = &g_te_off_cmds,
+        .set_brightnes_cmds   = &g_brightness_cmds,
+        .sleep_in_cmds        = &g_sleep_in_cmds,
+        .sleep_out_cmds       = &g_sleep_out_cmds,
+        .lcd_id_info.reg_addr = 0x04,
+        .lcd_id_info.read_len = 3,
+    }
+};
+
+lcd_drv_cfg *lcd_get_driver_ops(void)
+{
+    return g_lcd_driver_ops;
+}
+
+uint32_t lcd_get_ops_num(void)
+{
+    return array_size(g_lcd_driver_ops);
+}
+
+combo_dev_cfg_t *lcd_get_bus_escape_config(void)
+{
+    return g_lcd_driver_ops[0].bus_cfg;
+}
+
+lcd_drv_cfg *lcd_get_driver_config(uint32_t id)
+{
+    uint32_t i;
+    if (id == 0) {
+        return NULL;
+    }
+
+    for (i = 0; i < array_size(g_lcd_driver_ops); i++) {
+        if (g_lcd_driver_ops[i].lcd_id == id) {
+            return &(g_lcd_driver_ops[i]);
+        }
+    }
+
+    return NULL;
+}
index 12f39ca..dd4f0b8 100644 (file)
@@ -114,6 +114,8 @@ const diag_cmd_reg_obj_t g_diag_default_cmd_tbl[] = {
 #ifdef SUPPORT_MEDIA_AUDIO_MANAGER
     { DIAG_CMD_AUDIO_SEE_EFFECT_REQ, DIAG_CMD_AUDIO_SEE_EFFECT_REQ, diag_see_param_trans },
     { DIAG_CMD_AUDIO_SAVE_SEE_EFFECT_REQ, DIAG_CMD_AUDIO_SAVE_SEE_EFFECT_REQ, diag_see_param_save },
+    { DIAG_CMD_AUDIO_SWS_EFFECT_REQ, DIAG_CMD_AUDIO_SEE_EFFECT_REQ, diag_aef_param_trans },
+    { DIAG_CMD_AUDIO_SAVE_SWS_EFFECT_REQ, DIAG_CMD_AUDIO_SAVE_SEE_EFFECT_REQ, diag_aef_param_save },
 #endif
 };
 
index d916334..8ca3252 100644 (file)
@@ -109,4 +109,92 @@ errcode_t diag_see_param_save(uint16_t cmd_id, void *cmd_param, uint16_t cmd_par
     audio_unused(cmd_param_size);\r
     return op;\r
 }\r
+\r
+/* debugkit menu点击read/write用于获取或设置AEF参数 */\r
+errcode_t diag_aef_param_trans(uint16_t cmd_id, void *cmd_param, uint16_t cmd_param_size, diag_option_t *option)\r
+{\r
+    errcode_t ret;\r
+    uint8_t *param = (uint8_t *)cmd_param;\r
+    if (cmd_param_size < NV_AUDIO_AEF_PARAM_SIZE) {\r
+        PRINT("[audio][diag][aef] cmd_param_size invalid\r\n");\r
+        return ERRCODE_FAIL;\r
+    }\r
+\r
+    if (param[GET_SEE_PARAM_FIRST_POS] != DEBUGKITS_READ_PARAM_TAG) {\r
+        /* set param , this func return 0 when success */\r
+        ret = AudioManagerSetAefParam(SND_PORT_AEF_TYPE, (uint8_t *)param, NV_AUDIO_AEF_PARAM_SIZE);\r
+        if (ret != ERRCODE_SUCC) {\r
+            PRINT("[audio][diag][aef] set param fail, errcode:%d\r\n", ret);\r
+            return ERRCODE_FAIL;\r
+        } else {\r
+            PRINT("[audio][diag][aef] set param success !\r\n");\r
+        }\r
+    } else {\r
+        /* get param , this func return 0 when success */\r
+        ret = AudioManagerGetAefParam(SND_PORT_AEF_TYPE, (uint8_t *)param, NV_AUDIO_AEF_PARAM_SIZE);\r
+        if (ret != ERRCODE_SUCC) {\r
+            PRINT("[audio][diag][aef] get param fail, errcode:%d\r\n", ret);\r
+            return ERRCODE_FAIL;\r
+        } else {\r
+            PRINT("[audio][diag][aef] get param success !\r\n");\r
+        }\r
+    }\r
+    return uapi_diag_report_packet(cmd_id, option, (uint8_t *)cmd_param, NV_AUDIO_AEF_PARAM_SIZE, true);\r
+}\r
+\r
+static errcode_t audio_manager_save_aef_param(uint8_t *aef_param, uint16_t len)\r
+{\r
+    if (aef_param == NULL || len != sizeof(audio_aef_param_t)) {\r
+        PRINT("[audio_manager_save_aef_param]sea_param null or len invalid");\r
+        return ERRCODE_INVALID_PARAM;\r
+    }\r
+\r
+#ifdef CONFIG_NV_FEATURE_SUPPORT\r
+    errcode_t nv_op = uapi_nv_write((uint16_t)NV_ID_AUDIO_AEF_SWS_PARAM, aef_param, len);\r
+    if (nv_op != ERRCODE_SUCC) {\r
+        return ERRCODE_FAIL;\r
+    }\r
+#endif\r
+    return ERRCODE_SUCC;\r
+}\r
+\r
+/* debugkit menu点击Save保存所有AEF参数 */\r
+errcode_t diag_aef_param_save(uint16_t cmd_id, void *cmd_param, uint16_t cmd_param_size, diag_option_t *option)\r
+{\r
+    PRINT("[audio][diag][aef] diag_aef_param_save comes\r\n");\r
+    audio_aef_param_t *nv_data = (audio_aef_param_t *)malloc(sizeof(audio_aef_param_t));\r
+    if (nv_data == NULL) {\r
+        PRINT("[audio][diag][aef] nv malloc fail\r\n");\r
+        return ERRCODE_MALLOC;\r
+    }\r
+    (void)memset_s(nv_data, sizeof(audio_aef_param_t), 0, sizeof(audio_aef_param_t));\r
+\r
+    nv_data->size = NV_AUDIO_AEF_PARAM_SIZE;\r
+    errcode_t ret = AudioManagerGetAefParam(SND_PORT_AEF_TYPE, (uint8_t *)nv_data->data,\r
+                                            NV_AUDIO_AEF_PARAM_SIZE * sizeof(uint8_t));\r
+    if (ret != ERRCODE_SUCC) {\r
+        free(nv_data);\r
+        PRINT("[audio][diag][save] get aef param fail\r\n");\r
+        return ERRCODE_FAIL;\r
+    }\r
+\r
+    errcode_t nv_op = audio_manager_save_aef_param((uint8_t *)nv_data, (uint16_t)sizeof(audio_aef_param_t));\r
+    if (nv_op != ERRCODE_SUCC) {\r
+        free(nv_data);\r
+        PRINT("[audio][diag] save aef param nv fail\r\n");\r
+        return ERRCODE_FAIL;\r
+    }\r
+    free(nv_data);\r
+\r
+    errcode_t op = uapi_diag_report_packet(cmd_id, option, &ret, sizeof(uint8_t), true);\r
+    if (op != ERRCODE_SUCC) {\r
+        PRINT("[audio][diag] read rpt fail %u\r\n", op);\r
+    } else {\r
+        PRINT("[audio][diag][aef] read rpt success\r\n");\r
+    }\r
+    audio_unused(cmd_param);\r
+    audio_unused(cmd_param_size);\r
+    return op;\r
+}\r
+\r
 #endif /* SUPPORT_MEDIA_AUDIO_MANAGER */
\ No newline at end of file
index 2494da2..413afe7 100644 (file)
 #include "diag.h"\r
 \r
 #define NV_AUDIO_VQE_PARAM_SIZE 53\r
+#define NV_AUDIO_AEF_PARAM_SIZE 162\r
 \r
 typedef struct {\r
     uint32_t size;\r
     uint32_t data[NV_AUDIO_VQE_PARAM_SIZE];\r
 } audio_vqe_param_t;\r
 \r
+typedef struct {\r
+    uint32_t size;\r
+    uint8_t data[NV_AUDIO_AEF_PARAM_SIZE];\r
+} audio_aef_param_t;\r
+\r
 errcode_t diag_see_param_save(uint16_t cmd_id, void *cmd_param, uint16_t cmd_param_size, diag_option_t *option);\r
 errcode_t diag_see_param_trans(uint16_t cmd_id, void *cmd_param, uint16_t cmd_param_size, diag_option_t *option);\r
+errcode_t diag_aef_param_save(uint16_t cmd_id, void *cmd_param, uint16_t cmd_param_size, diag_option_t *option);\r
+errcode_t diag_aef_param_trans(uint16_t cmd_id, void *cmd_param, uint16_t cmd_param_size, diag_option_t *option);\r
 #endif
\ No newline at end of file
index 815babf..516af18 100644 (file)
 #define DIAG_CMD_AUDIO_HAID_REQ                 diag_cmd_id_comb(0x24)\r
 #define DIAG_CMD_AUDIO_SWS_EFFECT_REQ           diag_cmd_id_comb(0x25)\r
 #define DIAG_CMD_AUDIO_SEE_EFFECT_REQ           diag_cmd_id_comb(0x26)\r
+#define DIAG_CMD_AUDIO_SAVE_SWS_EFFECT_REQ      diag_cmd_id_comb(0x2E)\r
 #define DIAG_CMD_AUDIO_SAVE_SEE_EFFECT_REQ      diag_cmd_id_comb(0x2f)\r
 \r
+\r
 /* NV read and write commands [0x30, 0x33] */\r
 #define DIAG_CMD_NV_RD                  diag_cmd_id_comb(0x30)\r
 #define DIAG_CMD_NV_WR                  diag_cmd_id_comb(0x31)\r
index 7b85e99..321155d 100644 (file)
                 654734439, 1, 0, 0, 0, 0, 0, 10551272, 655336, 4286447619, 64536,
                 500, 16384, 3277, 0, 66049, 0,
                 16711166, 2, 34145024, 33751810, 0]]
+        },
+        "audio_aef_sws_param":{
+            "key_id": "0x320E",
+            "key_status": "alive",
+            "structure_type": "audio_aef_param_t",
+            "attributions": 1,
+            "value": [81, [14, 316, 20, 25700, 3084, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25700, 25700, 25700, 25700, 25700, 25700, 25700, 25700,
+            25700, 25700, 25700, 25700, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414,
+            1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 300, 400, 600, 900, 1400, 2000, 3000, 5000, 8000, 9000,
+            12000, 16000, 300, 400, 600, 900, 1400, 2000, 3000, 5000, 8000, 9000, 12000, 16000, 5, 100, 0, 195]]
         }
     }
 }
index 05cb8c9..c2a3810 100644 (file)
                 654734439, 1, 0, 0, 0, 0, 0, 10551272, 655336, 4286447619, 64536,
                 500, 16384, 3277, 0, 66049, 0,
                 16711166, 2, 34145024, 33751810, 0]]
+        },
+        "audio_aef_sws_param":{
+            "key_id": "0x320E",
+            "key_status": "alive",
+            "structure_type": "audio_aef_param_t",
+            "attributions": 1,
+            "value": [81, [14, 316, 20, 25700, 3084, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25700, 25700, 25700, 25700, 25700, 25700, 25700, 25700,
+            25700, 25700, 25700, 25700, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414,
+            1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 1414, 300, 400, 600, 900, 1400, 2000, 3000, 5000, 8000, 9000,
+            12000, 16000, 300, 400, 600, 900, 1400, 2000, 3000, 5000, 8000, 9000, 12000, 16000, 5, 100, 0, 195]]
         }
     }
 }
index a5635b8..601d49d 100644 (file)
@@ -102,6 +102,13 @@ typedef struct {
     uint32_t data[NV_AUDIO_VQE_PARAM_SIZE];\r
 } audio_vqe_param_t;\r
 \r
+/* SWS aef prams */\r
+#define NV_AUDIO_AEF_PARAM_SIZE 162\r
+typedef struct {\r
+    uint32_t size;\r
+    uint16_t data[NV_AUDIO_AEF_PARAM_SIZE];\r
+} audio_aef_param_t;\r
+\r
 /* sys language id */\r
 typedef struct {\r
     uint8_t language_id;\r
index cafc786..e1f4ffe 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * @Author: penglei 1624952103@qq.com
+ * @Date: 2025-07-29 09:33:56
+ * @LastEditors: penglei 1624952103@qq.com
+ * @LastEditTime: 2025-11-02 15:48:44
+ * @FilePath: /FD230/code/sdk/middleware/chips/brandy/nv/nv_config/include/key_id.h
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
 /*
  * Copyright (c) @CompanyNameMagicTag 2023-2023. All rights reserved.
  * Description: NV - key_id.
@@ -36,6 +44,7 @@
 /* user normal key_id [0x3000,0x4000) */
 #define NV_ID_AUDIO_VQE_PARAM           0x320C /* 3A params for VOIP scene, audio_vqe_param_t */
 #define NV_ID_AUDIO_VQE_KWS_PARAM       0x320D /* 3A params for KWS scene, audio_vqe_param_t */
+#define NV_ID_AUDIO_AEF_SWS_PARAM       0x320E /* 3A params for SWS scene, audio_aef_param_t */
 
 /* reserved key_id [0x4000,0xFFFF) */
 #define NV_ID_SAMPLE_0 0x4000 /* Eg. */
index 2fc9273..d253f4f 100644 (file)
@@ -70,7 +70,11 @@ td_void dpu_crg_set_vedio_mclk_div_ctl(td_bool mclk_cken)
 #ifdef GPU_SUPPORT_VIDEO_MODE
     mclk_div_ctl.bits.dpu_mclk_div  = 0x412600C; /* 147M * 12/147 = 12M */
 #else
-    mclk_div_ctl.bits.dpu_mclk_div  = 0x4126014; /* 147M * 20/147 = 20M */
+#ifdef LCD_JD9885
+    mclk_div_ctl.bits.dpu_mclk_div  = 0x412600C; /* 147M * 20/147 = 20M */
+#else
+    mclk_div_ctl.bits.dpu_mclk_div  = 0x4126014;
+#endif    
 #endif
     mclk_div_ctl.bits.dpu_mclk_cken = mclk_cken;
     uapi_reg_write(CRG_VEDIO_CRG_MCLK_DIV_CTL, mclk_div_ctl.u32);
index 397deea..dedc718 100644 (file)
@@ -44,7 +44,7 @@ extern "C" {
 #define VQE_PARAM_SIZE         (NV_AUDIO_VQE_PARAM_SIZE * sizeof(uint32_t))
 #define SEA_BUFFER_SIZE        (VQE_PARAM_SIZE + VQE_PREFIX_LEN)
 #define AEF_BUFFER_SIZE        (PEQ_PARAM_SIZE + PEQ_PREFIX_LEN)
-#define PEQ_PREFIX_LEN         50
+#define AEF_BUFFER_LEN         256
 
 static AudioManager& g_amInstance = AudioManager::GetInstance();
 static std::shared_ptr<AudioStreamIn> g_streamIn = nullptr;
@@ -217,7 +217,7 @@ int32_t AudioStreamInObtainBuffer(uint8_t *data, uint32_t *size)
     if (ret < 0) {
         return AUDIO_ERROR;
     }
-    *size = (uint32_t)ret;
+    *size = static_cast<uint32_t>(ret);
     return AUDIO_SUCCESS;
 }
 
@@ -372,7 +372,7 @@ int32_t AudioStreamOutStreamWrite(const uint8_t *data, uint32_t size)
 
 int32_t AudioStreamOutStop(void)
 {
-    int32_t ret = g_streamOut->Pause();
+    int32_t ret = g_streamOut->Stop();
     if (ret != AUDIO_SUCCESS) {
         ALOGE("audio stream out stop failed 0x%x", ret);
         return AUDIO_ERROR;
@@ -529,12 +529,12 @@ int32_t AudioManagerA2dpSinkSetAefEnable(int32_t effectType, bool enable)
 
 int32_t AudioManagerSetSeaParam(const uint8_t *seaParam, uint16_t len)
 {
-    if (seaParam == NULL) {
+    if (seaParam == nullptr) {
         ALOGE("sea_param null");
         return AUDIO_INVALID_PARAMS;
     }
     char *seaBuf = (char *)malloc(SEA_BUFFER_SIZE);
-    if (seaBuf == NULL) {
+    if (seaBuf == nullptr) {
         ALOGE("malloc fail");
         return AUDIO_NO_MEM;
     }
@@ -561,18 +561,18 @@ int32_t AudioManagerSetSeaParam(const uint8_t *seaParam, uint16_t len)
         return AUDIO_ERROR;
     }
     free(seaBuf);
-    ALOGE("set param success!");
+    ALOGI("set param success!");
     return AUDIO_SUCCESS;
 }
 
 int32_t AudioManagerGetSeaParam(uint8_t *seaParam, uint16_t len)
 {
-    if (seaParam == NULL) {
+    if (seaParam == nullptr) {
         ALOGE("sea_param null");
         return AUDIO_INVALID_PARAMS;
     }
     char *seaBuf = (char *)malloc(SEA_BUFFER_SIZE);
-    if (seaBuf == NULL) {
+    if (seaBuf == nullptr) {
         ALOGE("malloc fail");
         return AUDIO_NO_MEM;
     }
@@ -599,7 +599,7 @@ int32_t AudioManagerGetSeaParam(uint8_t *seaParam, uint16_t len)
         return AUDIO_ERROR;
     }
     free(seaBuf);
-    ALOGE("get param success!");
+    ALOGI("get param success!");
     return AUDIO_SUCCESS;
 }
 
@@ -616,6 +616,82 @@ static void WaitA2dpStartWhenDelay(AudioManagerA2dpContext *a2dpContext)
     }
 }
 
+int32_t AudioManagerSetAefParam(int32_t effectType, const uint8_t *aefParam, uint16_t len)
+{
+    if (aefParam == nullptr) {
+        ALOGE("aef_param null");
+        return AUDIO_INVALID_PARAMS;
+    }
+    char *aefBuf = (char *)malloc(AEF_BUFFER_LEN);
+    if (aefBuf == nullptr) {
+        ALOGE("malloc fail");
+        return AUDIO_NO_MEM;
+    }
+    if (memset_s(aefBuf, AEF_BUFFER_LEN, 0, AEF_BUFFER_LEN) != EOK) {
+        ALOGE("memset_s fail");
+        free(aefBuf);
+        return AUDIO_NO_MEM;
+    }
+    int32_t prefixLen = sprintf_s(aefBuf, AEF_BUFFER_LEN, "%s = %d#%u:", "setaefparam", effectType, len);
+    if (prefixLen < 0) {
+        ALOGE("sprintf_s failed");
+        free(aefBuf);
+        return AUDIO_ERROR;
+    }
+    if (memcpy_s(aefBuf + prefixLen, AEF_BUFFER_LEN - prefixLen, aefParam, len) != EOK) {
+        ALOGE("memcpy_s failed");
+        free(aefBuf);
+        return AUDIO_ERROR;
+    }
+    int32_t ret = g_amInstance.SetParam(AUDIO_DOWN_LINK, aefBuf, AEF_BUFFER_LEN);
+    if (ret != AUDIO_SUCCESS) {
+        ALOGE("set param failed");
+        free(aefBuf);
+        return AUDIO_ERROR;
+    }
+    free(aefBuf);
+    ALOGI("set param success!");
+    return AUDIO_SUCCESS;
+}
+
+int32_t AudioManagerGetAefParam(int32_t effectType, uint8_t *aefParam, uint16_t len)
+{
+    if (aefParam == nullptr) {
+        ALOGE("aef_param null");
+        return AUDIO_INVALID_PARAMS;
+    }
+    char *aefBuf = (char *)malloc(AEF_BUFFER_LEN);
+    if (aefBuf == nullptr) {
+        ALOGE("malloc fail");
+        return AUDIO_NO_MEM;
+    }
+    if (memset_s(aefBuf, AEF_BUFFER_LEN, 0, AEF_BUFFER_LEN) != EOK) {
+        ALOGE("memset_s fail");
+        free(aefBuf);
+        return AUDIO_NO_MEM;
+    }
+    int32_t prefixLen = sprintf_s(aefBuf, AEF_BUFFER_LEN, "%s = %d#%u:", "getaefparam", effectType, len);
+    if (prefixLen < 0) {
+        ALOGE("sprintf_s failed");
+        free(aefBuf);
+        return AUDIO_ERROR;
+    }
+    int32_t ret = g_amInstance.GetParam(AUDIO_DOWN_LINK, aefBuf, AEF_BUFFER_LEN);
+    if (ret != AUDIO_SUCCESS) {
+        ALOGE("get param failed");
+        free(aefBuf);
+        return AUDIO_ERROR;
+    }
+    if (memcpy_s(aefParam, AEF_BUFFER_LEN, aefBuf, len) != EOK) {
+        ALOGE("memcpy_s failed");
+        free(aefBuf);
+        return AUDIO_ERROR;
+    }
+    free(aefBuf);
+    ALOGI("get param success!");
+    return AUDIO_SUCCESS;
+}
+
 static int32_t DisConnectBluetoothA2dpDevice(void)
 {
     if (CheckA2dpSourceConnectState()) {
index 0b7935a..19344ad 100644 (file)
@@ -96,6 +96,10 @@ int32_t AudioManagerSetSeaParam(const uint8_t *seaParam, uint16_t len);
 
 int32_t AudioManagerGetSeaParam(uint8_t *seaParam, uint16_t len);
 
+int32_t AudioManagerSetAefParam(int32_t effectType, const uint8_t *aefParam, uint16_t len);
+
+int32_t AudioManagerGetAefParam(int32_t effectType, uint8_t *aefParam, uint16_t len);
+
 int32_t AudioManagerA2dpSinkSetParam(AudioFormatConfig config);
 
 int32_t AudioManagerA2dpSinkCreate(void);
index 69ae4f9..7afbe27 100644 (file)
@@ -123,6 +123,8 @@ int32_t GetExternAIAttr(uapi_ai_attr *aiAttr);
 
 int32_t GetExternAOAttr(uapi_snd_attr *sndAttr);
 
+void SetAefExtraParam(td_handle soundHandle);
+
 #ifdef __cplusplus
 #if __cplusplus
 }
index 06e4aa7..0126bbc 100644 (file)
@@ -44,6 +44,7 @@ static bool g_isCanCreateAenc = true;
 static MediaHalMutexHandle g_audioSdkInitLock = NULL;
 #ifdef SUPPORT_NV
 static audio_vqe_param_t g_vqeParam = { 0 };
+static audio_aef_param_t g_aefParam = { 0 };
 static uint8_t g_productTestMode = 0;
 #endif
 #define VOLUME_UNIT 100
@@ -111,6 +112,25 @@ bool AudioConvertAudioFormatToCodecId(enum AudioFormat audioFormat, uapi_acodec_
     return false;
 }
 
+static void AudioNvRead(void)
+{
+    uint16_t len = 0;
+    errcode_t nvRet = uapi_nv_read(NV_ID_FTM_CONFIG, sizeof(uint8_t), &len, &g_productTestMode);
+    if (nvRet != ERRCODE_SUCC) {
+        g_productTestMode = 0;
+    }
+    nvRet = uapi_nv_read(NV_ID_AUDIO_VQE_PARAM, (uint16_t)sizeof(audio_vqe_param_t), &len, (uint8_t *)&g_vqeParam);
+    if (nvRet != MEDIA_HAL_OK) {
+        MEDIA_HAL_LOGW(MODULE_NAME, "nv read sea param faild!");
+    }
+    if(SND_PORT_AEF_TYPE == UAPI_AEF_TYPE_SWS1) {
+        nvRet = uapi_nv_read(NV_ID_AUDIO_AEF_SWS_PARAM , (uint16_t)sizeof(audio_aef_param_t), &len, (uint8_t *)&g_aefParam);
+        if (nvRet != MEDIA_HAL_OK) {
+            MEDIA_HAL_LOGW(MODULE_NAME, "nv read aef param faild!");
+        }
+    }
+}
+
 static int32_t AudioSDKInputInit(void)
 {
     int32_t ret;
@@ -122,15 +142,7 @@ static int32_t AudioSDKInputInit(void)
 
 #ifdef AUDIO_SEA_SUPPORT
 #ifdef SUPPORT_NV
-    uint16_t len = 0;
-    errcode_t nvRet = uapi_nv_read(NV_ID_FTM_CONFIG, sizeof(uint8_t), &len, &g_productTestMode);
-    if (nvRet != ERRCODE_SUCC) {
-        g_productTestMode = 0;
-    }
-    nvRet = uapi_nv_read(NV_ID_AUDIO_VQE_PARAM, (uint16_t)sizeof(audio_vqe_param_t), &len, (uint8_t *)&g_vqeParam);
-    if (nvRet != MEDIA_HAL_OK) {
-        MEDIA_HAL_LOGW(MODULE_NAME, "nv read sea param faild!");
-    }
+    AudioNvRead();
 #endif
     MEDIA_HAL_DOFUNC_TIME(ret = uapi_sea_init());
     if (ret != MEDIA_HAL_OK) {
@@ -382,6 +394,18 @@ static int32_t SetSeaExtraParam(td_handle seaHandle)
     return MEDIA_HAL_OK;
 }
 
+void SetAefExtraParam(td_handle soundHandle)
+{
+    if(SND_PORT_AEF_TYPE == UAPI_AEF_TYPE_SWS1) {
+        uint32_t size = g_aefParam.size * (uint32_t)sizeof(g_aefParam.data[0]);
+        int32_t ret = uapi_snd_set_aef_param(soundHandle, BUILTIN_SND_OUT_PORT, SND_PORT_AEF_TYPE,
+            (const td_void *)g_aefParam.data, (td_u32)size);
+        if (ret != MEDIA_HAL_OK) {
+            MEDIA_HAL_LOGE(MODULE_NAME, "uapi set aef param faild, ret: 0x%x", ret);
+        }
+    }
+}
+
 static int32_t SetSeaAfeAttr(td_handle seaHandle)
 {
     if (g_productTestMode == 0) {
index 091e8fc..3681436 100644 (file)
@@ -351,6 +351,7 @@ static int32_t SetAefProfile(SubPortOutContext *portOutCtx, const enum AudioCate
     if (ret != MEDIA_HAL_OK) {
         MEDIA_HAL_LOGE(MODULE_NAME, "uapi_snd_set_port_aef_enable(%d) failed: 0x%x", SND_PORT_AEF_TYPE, ret);
     }
+    SetAefExtraParam(portOutCtx->sndHandle);
     return MEDIA_HAL_OK;
 }