# 百问网 AvaotaF1 核心板

百问网的 **AvaotaF1 V821 开发套件** 采用 Pico 尺寸设计，紧凑且功能强大，支持标准 2.54 排针接口，方便与面包板连接，进行 DIY 实验。其超薄双面设计令其尺寸仅与 1 元硬币相当，集成了 V821 所有核心功能，极大地提升了开发灵活性与可扩展性。

这款开发套件具备多种强大特性：

- **板载 MIPI CSI 摄像头接口**，支持高清图像采集。
- **MIC 拾音功能**，便于音频采集。
- **SPI NOR FLASH（32MB）**，提供充足的存储空间。
- **WiFi 陶瓷天线**，支持无线连接，拓展网络功能。
- **TF 卡卡座**，方便数据存储和扩展。
- **烧录按键**，简化固件烧录操作。
- 丰富的 **GPIO 资源**，可灵活配置和控制外部硬件设备。
- 硬件**没有使用PMC**功能

该开发套件支持最新的 **Tina Linux 5.0 系统**，可直接在 V821 AvaotaF1 上进行开发。除此之外，还支持多种配件：

- **MIPI 摄像头 GC2083**，提供高质量图像采集。
- **SPI 屏幕**：包括 3.5 寸 320x480 分辨率显示屏和 1.54 寸 240x240 分辨率显示屏，适应多样的显示需求。

AvaotaF1 V821 开发套件集成了丰富的功能，操作简便且便于拓展，是进行嵌入式开发与实验的理想选择。

![image-20250424093755858](https://docs.aw-ol.com/assets/images/image-20250424093755858-281a5b7a60fac210009c0a40e352776e.png)

## 核心板参数

| 项目     | 参数                                               |
| -------- | -------------------------------------------------- |
| 主控     | 全志V821L2-WXX                                     |
| PMU      | 集成电源芯片EA3036                                 |
| DDR      | Internal 64MB DDR2                                 |
| Memory   | Nor Flash 32MB（PY25Q256）                         |
| 无线网络 | SIP 2.4GHz WIFI                                    |
| 摄像头   | 单目 1920x1080@30fps                               |
| 屏幕     | 3.5寸（320*480）SPI 屏                             |
| 麦克风   | 模拟麦克风*1                                       |
| 按键     | FEL烧录                                            |
| 灯       | LED * 1                                            |
| Debug    | 支持uart串口调试，支持ADB USB调试                  |
| USB      | Type-C USB * 1, 同时支持供电和数据传输以及串口输出 |
| GPIO     | 引出双盘排针30Pin 支持多达28个GPIO信号             |
| 板身尺寸 | 长35mm*宽22mm                                      |
| 板层     | 6层板                                              |

## 核心板接口功能示意

![image-20250424100013313](https://docs.aw-ol.com/assets/images/image-20250424100013313-f549f27f1da1cf80ca34db274b4e9760.png)

## 核心板接口功能

![image-20250421132702741](https://docs.aw-ol.com/assets/images/image-20250421132702741-db92937e87cebb5f50a48b8aa4934d1b.png)

![image-20250421132722612](https://docs.aw-ol.com/assets/images/image-20250421132722612-06a5b19112b0ac7b7c7eecfeb0e9fefd.png)

| Signal Name           | Description                                                  | Type    |
| --------------------- | ------------------------------------------------------------ | ------- |
| FEL                   | Boot Process Select Jump to the Try Media Boot process when FEL is high level, or else enter into the mandatory upgrade process. | I       |
| **Clock Fanout**      |                                                              |         |
| CLK-FANOUT0           | Internal Clock Fanout Optional Frequency: 32 kHz, 12 MHz, 16 MHz, 24 MHz, 25 MHz, 27 MHz | O       |
| **RF**                |                                                              |         |
| FEM-CTRL0             | Front End Module Control, TX-EN                              | I/O     |
| FEM-CTRL1             | Front End Module Control, RX-EN                              | I/O     |
| **SD Card/SDIO/eMMC** |                                                              |         |
| SDC1-CMD              | SDIO Command Output/Response Input                           | I/O, OD |
| SDC1-CLK              | SDIO Clock Output                                            | O       |
| SDC1-D0               | SDIO Data Input/ Output 0                                    | I/O     |
| SDC1-D1               | SDIO Data Input/ Output 1                                    | I/O     |
| SDC1-D2               | SDIO Data Input/ Output 2                                    | I/O     |
| SDC1-D3               | SDIO Data Input/ Output 3                                    | I/O     |
| **I2S/PCM**           |                                                              |         |
| I2S0-MCLK             | I2S0 Master Clock                                            | O       |
| I2S0-LRCK             | I2S0/PCM0 Sample Rate Clock/Sync                             | I/O     |
| I2S0-BCLK             | I2S0/PCM0 Bit Rate Clock                                     | I/O     |
| I2S0-DIN0             | I2S0/PCM0 Serial Data Input 0                                | I       |
| I2S0-DIN1             | I2S0/PCM0 Serial Data Input 1                                | I       |
| I2S0-DIN2             | I2S0/PCM0 Serial Data Input 2                                | I       |
| I2S0-DIN3             | I2S0/PCM0 Serial Data Input 3                                | I       |
| I2S0-DOUT0            | I2S0/PCM0 Serial Data Output 0                               | O       |
| I2S0-DOUT1            | I2S0/PCM0 Serial Data Output 1                               | O       |
| I2S0-DOUT2            | I2S0/PCM0 Serial Data Output 2                               | O       |
| I2S0-DOUT3            | I2S0/PCM0 Serial Data Output 3                               | O       |
| GPADC                 |                                                              |         |
| GPADC0-0              | General Purpose ADC0 Input 0                                 | AI      |
| GPADC0-2              | General Purpose ADC0 Input 2                                 | AI      |
| GPADC0-3              | General Purpose ADC0 Input 3                                 | AI      |
| **MIPI CSI**          |                                                              |         |
| CSI-SM-HS             | CSI Horizontal SYNC                                          | O       |
| CSI-SM-VS             | CSI Vertical SYNC/Frame SYNC                                 | O       |
| **Parallel CSI**      |                                                              |         |
| NCSI-PCLK             | Parallel CSI Pixel Clock Input                               | I       |
| NCSI-MCLK             | Parallel CSI Master Clock Output                             | O       |
| NCSI-HSYNC            | Parallel CSI Horizontal Synchronous Input                    | I       |
| NCSI-VSYNC            | Parallel CSI Vertical Synchronous Input                      | I       |
| NCSI-D0               | Parallel CSI Pixel Data 0                                    | I       |
| NCSI-D1               | Parallel CSI Pixel Data 1                                    | I       |
| NCSI-D2               | Parallel CSI Pixel Data 2                                    | I       |
| NCSI-D3               | Parallel CSI Pixel Data 3                                    | I       |
| NCSI-D4               | Parallel CSI Pixel Data 4                                    | I       |
| NCSI-D5               | Parallel CSI Pixel Data 5                                    | I       |
| NCSI-D6               | Parallel CSI Pixel Data 6                                    | I       |
| NCSI-D7               | Parallel CSI Pixel Data 7                                    | I       |
| NCSI-D8               | Parallel CSI Pixel Data 8                                    | I       |
| NCSI-D9               | Parallel CSI Pixel Data 9                                    | I       |
| NCSI-D10              | Parallel CSI Pixel Data 10                                   | I       |
| NCSI-D11              | Parallel CSI Pixel Data 11                                   | I       |
| **LCD**               |                                                              |         |
| LCD-CLK               | LCD Clock                                                    | O       |
| LCD-VSYNC             | LCD Vertical Synchronization                                 | O       |
| LCD-HSYNC             | LCD Horizontal Synchronization                               | O       |
| LCD-DE                | LCD Data Enable                                              | O       |
| TCON-FSYNC            | Frame Synchronization Signal for TCON and Sensor             | O       |
| TCON-TRIG             | Screen Trigger Signal                                        | I       |
| LCD-D3                | LCD Data Input/Output 3                                      | I/O     |
| LCD-D4                | LCD Data Input/Output 4                                      | I/O     |
| LCD-D5                | LCD Data Input/Output 5                                      | I/O     |
| LCD-D6                | LCD Data Input/Output 6                                      | I/O     |
| LCD-D7                | LCD Data Input/Output 7                                      | I/O     |
| LCD-D10               | LCD Data Input/Output 10                                     | I/O     |
| LCD-D11               | LCD Data Input/Output 11                                     | I/O     |
| LCD-D12               | LCD Data Input/Output 12                                     | I/O     |
| **Ethernet MAC**      |                                                              |         |
| RMII-TXCK             | RMII Transmit Clock                                          | I       |
| RMII-RXER             | RMII Receive Error                                           | I       |
| RMII-CRS-DV           | RMII Carrier Sense Receive Data Valid                        | I       |
| RMII-TXEN             | RMII Transmit Enable                                         | O       |
| RMII-EPHY-25M         | EMAC PHY 25 MHz Clock Output                                 | O       |
| RMII-MDC              | RMII Management Data Clock                                   | O       |
| RMII-MDIO             | RMII Management Data Input/ Output                           | I/O     |
| RMII-RXD0             | RMII Receive Data 0                                          | I       |
| RMII-RXD1             | RMII Receive Data 1                                          | I       |
| RMII-TXD0             | RMII Transmit Data 0                                         | O       |
| RMII-TXD1             | RMII Transmit Data 1                                         | O       |
| **SPI&SPI DBI**       |                                                              |         |
| SPI1-CS0              | SPI1 Chip Select 0 (Active Low)                              | I/O     |
| SPI1-CS1              | SPI1 Chip Select 1 (Active Low)                              | I/O     |
| SPI1-CLK              | SPI1 Clock                                                   | I/O     |
| SPI1-MOSI             | SPI1 Master Data Out, Slave Data In                          | I/O     |
| SPI1-MISO             | SPI1 Master Data In, Slave Data Out                          | I/O     |
| SPI1-WP               | SPI1 Write Protection (Active Low)/ Serial Data Input and Output for Quad Input or Quad Output | I/O     |
| SPI1-HOLD             | SPI1 Hold Signal/ Serial Data Input and Output for Quad Input or Quad Output | I/O     |
| SPI2-CS0              | SPI2 Chip Select 0 (Active Low)                              | I/O     |
| SPI2-CLK              | SPI2 Clock                                                   | I/O     |
| SPI2-MOSI             | SPI2 Master Data Out, Slave Data In                          | I/O     |
| SPI2-MISO             | SPI2 Master Data In, Slave Data Out                          | I/O     |
| SPI2-WP               | SPI2 Write Protection (Active Low)/ Serial Data Input and Output for Quad Input or Quad Output | I/O     |
| SPI2-HOLD             | SPI2 Hold Signal/ Serial Data Input and Output for Quad Input or Quad Output | I/O     |
| DBI-CSX               | Chip Select Signal (Active Low)                              | I/O     |
| DBI-SCLK              | Serial Clock Signal                                          | I/O     |
| DBI-SDO               | Data Output Signal                                           | I/O     |
| DBI-SDI               | Data Input Signal The data is sampled on the rising edge and the falling edge. | I/O     |
| DBI-TE                | Tearing Effect Input It is used to capture the external TE signal edge. The rising and falling edge is configurable. | I/O     |
| DBI-DCX               | DCX pin is the select output signal of data and command. DCX = 0: register command; DCX = 1: data or parameter. | I/O     |
| DBI-WRX               | When DBI operates in dual data lane format, the RGB666 format 2 can use WRX to transfer data | I/O     |
| **UART**              |                                                              |         |
| UART0-RX              | UART0 Data Receiver                                          | I       |
| UART0-TX              | UART0 Data Transmitter                                       | O       |
| UART1-CTS             | UART1 Clear to Send                                          | I       |
| UART1-RTS             | UART1 Request to Send                                        | O       |
| UART1-RX              | UART1 Data Receiver                                          | I       |
| UART1-TX              | UART1 Data Transmitter                                       | O       |
| UART2-CTS             | UART2 Clear to Send                                          | I       |
| UART2-RTS             | UART2 Request to Send                                        | O       |
| UART2-RX              | UART2 Data Receiver                                          | I       |
| UART2-TX              | UART2 Data Transmitter                                       | O       |
| UART3-RX              | UART3 Data Receiver                                          | I       |
| UART3-TX              | UART3 Data Transmitter                                       | O       |
| **PWM**               |                                                              |         |
| PWM0-0                | PWM0 Wave Output /Capture Wave Input 0                       | I/O     |
| PWM0-1                | PWM0 Wave Output /Capture Wave Input 1                       | I/O     |
| PWM0-2                | PWM0 Wave Output /Capture Wave Input 2                       | I/O     |
| PWM0-3                | PWM0 Wave Output /Capture Wave Input 3                       | I/O     |
| PWM0-4                | PWM0 Wave Output /Capture Wave Input 4                       | I/O     |
| PWM0-5                | PWM0 Wave Output /Capture Wave Input 5                       | I/O     |
| PWM0-6                | PWM0 Wave Output /Capture Wave Input 6                       | I/O     |
| PWM0-7                | PWM0 Wave Output /Capture Wave Input 7                       | I/O     |
| PWM0-8                | PWM0 Wave Output /Capture Wave Input 8                       | I/O     |
| PWM0-9                | PWM0 Wave Output /Capture Wave Input 9                       | I/O     |
| PWM0-10               | PWM0 Wave Output /Capture Wave Input 10                      | I/O     |
| PWM0-11               | PWM0 Wave Output /Capture Wave Input 11                      | I/O     |
| **TWI**               |                                                              |         |
| TWI0-SCK              | TWI0 Serial Clock Signal                                     | I/O     |
| TWI0-SDA              | TWI0 Serial Data Signal                                      | I/O     |
| TWI1-SCK              | TWI1 Serial Clock Signal                                     | I/O     |
| TWI1-SDA              | TWI1 Serial Data Signal                                      | I/O     |
| TWI2-SCK              | TWI2 Serial Clock Signal                                     | I/O     |
| TWI2-SDA              | TWI2 Serial Data Signal                                      | I/O     |
| **JTAG**              |                                                              |         |
| R-JTAG0-TMS           | CPU0 JTAG Mode Select                                        | I/O     |
| R-JTAG0-TCK           | CPU0 JTAG Clock Signal                                       | I       |
| R-JTAG1-TMS           | CPU1 JTAG Mode Select                                        | I/O     |
| R-JTAG1-TCK           | CPU1 JTAG Clock Signal                                       | I       |
| **Interrupt**         |                                                              |         |
| PD-EINT1              | Port D Interrupt                                             | I       |
| PD-EINT2              | Port D Interrupt                                             | I       |
| PD-EINT3              | Port D Interrupt                                             | I       |
| PD-EINT4              | Port D Interrupt                                             | I       |
| PD-EINT5              | Port D Interrupt                                             | I       |
| PD-EINT6              | Port D Interrupt                                             | I       |
| PD-EINT7              | Port D Interrupt                                             | I       |
| PD-EINT8              | Port D Interrupt                                             | I       |
| PD-EINT9              | Port D Interrupt                                             | I       |
| PD-EINT10             | Port D Interrupt                                             | I       |
| PD-EINT11             | Port D Interrupt                                             | I       |
| PD-EINT12             | Port D Interrupt                                             | I       |
| PD-EINT13             | Port D Interrupt                                             | I       |
| PD-EINT14             | Port D Interrupt                                             | I       |
| PD-EINT15             | Port D Interrupt                                             | I       |
| PD-EINT16             | Port D Interrupt                                             | I       |
| PD-EINT17             | Port D Interrupt                                             | I       |
| PD-EINT18             | Port D Interrupt                                             | I       |
| PD-EINT19             | Port D Interrupt                                             | I       |
| PD-EINT22             | Port D Interrupt                                             | I       |
| PD-EINT23             | Port D Interrupt                                             | I       |
| PL-EINT2              | Port L Interrupt                                             | I       |
| PL-EINT3              | Port L Interrupt                                             | I       |
| PL-EINT4              | Port L Interrupt                                             | I       |
| PL-EINT5              | Port L Interrupt                                             | I       |
| PL-EINT6              | Port L Interrupt                                             | I       |
| PL-EINT7              | Port L Interrupt                                             | I       |

## 核心板使用入门

### 串口调试

核心板支持接出两路调试串口，分别为 RISC-V CPU Linux 核心串口 UART0，RISC-V MCU RTOS 核心串口 UART3，波特率均为 115200

危险

SDK 1.2 默认波特率修改为 `1500000`，请使用波特率 `1500000`

提示

SDK 1.3 支持切换波特率，在 `lunch` 的时候可以选择 `115200` 或者 `1500000`

核心板调试串口有两种接入方式：

- 使用 USB 拆分器接入串口：仅接出常用的 CPU 核心串口 UART0
- 使用 GPIO 接入串口：支持接出 CPU 核心串口 UART0 和 MCU 核心串口 UART3

**使用 USB 拆分器接入串口**

核心板设计之时复用了 TypeC 中的 SBU 信号线用于传输串口信号，这个串口是 UART0，与 PL4，PL5 并联。接入方法如下：

![image-20250424091735539](https://docs.aw-ol.com/assets/images/image-20250424091735539-5205349f7060993af0ea44c34fb32b56.png)

**使用 GPIO 接入串口**

核心板串口位于 PL 口，如下图所示，需要焊接或者排针接出。其中绿色的是 RISC-V MCU 核心串口，蓝色的是 RISC-V CPU 串口。

![image-20250423232024357](https://docs.aw-ol.com/assets/images/image-20250423232024357-061a79019f59a1052d9ebcf13db225d0.png)

串口线打开电脑的设备管理器，确认串口号，例如这里是 COM5

![下载](data:image/png;base64, )

硬件连接完成后，使用串口终端访问，波特率 `115200` 。例如这里使用的 `PuTTY`

危险

SDK 1.2 默认波特率修改为 `1500000`，请使用波特率 `1500000`

提示

SDK 1.3 支持切换波特率，在 `lunch` 的时候可以选择 `115200` 或者 `1500000`

![image-20241119154137938](https://docs.aw-ol.com/assets/images/image-20241119154137938-17415738627349-7f2d2a9d50c474e8872d77f0d9d4f7e2-7f2d2a9d50c474e8872d77f0d9d4f7e2.png)

如果是刷入固件的核心板，上电后即可看到启动日志与控制台

![image-20241119154325232](https://docs.aw-ol.com/assets/images/image-20241119154325232-17415738627348-321630832a633e86294eab953bb542a6-321630832a633e86294eab953bb542a6.png)

### ADB 调试

备注

如果烧录的是 UVC 固件，UVC 会自动切换 USB 枚举为 UVC 设备，此时无法使用 ADB 调试。

在电脑上安装 ADB，打开 CMD 使用 `adb shell` 进入终端。

（1） 在 [全志开发者社区-资料下载 专区 ](https://www.aw-ol.com/downloads?cat=5)下载 ADB 工具 `ADB(tab自动补全版)` （2）下载后解压放到本地磁盘下（例如D盘的adb文件夹里）

![adb_ins_1](https://docs.aw-ol.com/assets/images/adb_ins_1-17415738627347-57ada7e769a9aaade7376a09459bb9cf-57ada7e769a9aaade7376a09459bb9cf.png)

（3） 右键 ”此电脑“，属性，找到高级系统设置，点击环境变量，xxx用户的环境变量，Path，新增一个环境变量。

![adb_ins_2](https://docs.aw-ol.com/assets/images/adb_ins_2-174157386273410-df9204a20d62347f8950c36e964fcbc1-df9204a20d62347f8950c36e964fcbc1.png)

（4） 打开命令提示符，输入 `adb shell`

![image-20241119154459505](https://docs.aw-ol.com/assets/images/image-20241119154459505-174157386273411-de1e746e8096e7634408c01423f9df38-de1e746e8096e7634408c01423f9df38.png)

ADB 也可以作为文件传输使用，例如：

- 将 sample.mp4 上传到核心板 /mnt/UDISK 目录内

```text
C:\System> adb push sample.mp4 /mnt/UDISK
```



- 将 /mnt/UDISK/sample.mp4 下拉到当前目录内

```text
C:\System> adb pull /mnt/UDISK/sample.mp4
```



### 重启

在核心板终端 Linux 命令行中输入 `reboot` 即可重启

![image-20241119154725553](https://docs.aw-ol.com/assets/images/image-20241119154725553-174157386273413-ef4977152178b27e2713e46ceeac2e5f-ef4977152178b27e2713e46ceeac2e5f.png)

在核心板终端 U-Boot 命令行中输入 `reset` 即可重启

![image-20241119154815320](https://docs.aw-ol.com/assets/images/image-20241119154815320-174157386273412-871cb7353e5f9bde2d4fbabce67aa86d-871cb7353e5f9bde2d4fbabce67aa86d.png)

### 进入烧录模式

有多种方式可以让核心板进入烧录模式。

**按键进入烧录模式**

在核心板找到按键 `FEL`，断开USB，电源，

（1）按住 `FEL` 按键

（2）插入 USB 线

（3）等待电脑连接成功，松开 `FEL` 按键即可进入烧录模式

![image-20250423232255073](https://docs.aw-ol.com/assets/images/image-20250423232255073-8681aaab953c4865dc250624e4bd77e9.png)

**命令行进入烧录模式**

在 Linux 命令行中输入 `reboot efex` 即可重启进入烧录模式

```text
reboot efex
```



在 U-Boot 命令行中输入 `efex` 即可重启进入烧录模式

```text
=> efex
```



**破坏启动介质进入烧录模式（SPI NOR）**

在 Linux 命令行中输入 `echo 000000 > /dev/mtd0`，破坏启动引导介质，重启后即可进入烧录模式

### WI-FI

**Wi-Fi 连接网络**

这里首先介绍如何使用 `wifi` 扫描网络：

（1）设置 `Wi-Fi` 为 `STATION` 模式

```text
wifi -o sta 
```



（2）扫描当前网络环境的 Wi-Fi 站点

```text
wifi -s
```



（3）连接Wi-Fi（SSID：awol，密码 1234567890）

```text
wifi -c awol 1234567890
```



（4）连接网络后输入 `ifconfig` 即可查看当前 ip 地址

![image-20241119161156996](https://docs.aw-ol.com/assets/images/image-20241119161156996-174157386273518-33b4484eedea2862098d9faf9e4b6699-33b4484eedea2862098d9faf9e4b6699.png)

可以使用 `ping` 命令测试 网络连接

```text
ping www.baidu.com
```



它会输出以下内容

```text
PING 202.108.22.5 (202.108.22.5): 56 data bytes
64 bytes from 202.108.22.5: seq=0 ttl=49 time=48.734 ms
64 bytes from 202.108.22.5: seq=1 ttl=49 time=48.624 ms
64 bytes from 202.108.22.5: seq=2 ttl=49 time=58.370 ms
64 bytes from 202.108.22.5: seq=3 ttl=49 time=69.119 ms
64 bytes from 202.108.22.5: seq=4 ttl=49 time=49.635 ms
```



（5）断开Wi-Fi

```text
wifi -d
```



**Wi-Fi 建立 AP**

（1）创建热点 （SSID：v821，密码 12345678）

```text
wifi -o ap v821 12345678
```



![image-20241119161500112](https://docs.aw-ol.com/assets/images/image-20241119161500112-174157386273519-aa6535be950b73342a394f15c349ea77-aa6535be950b73342a394f15c349ea77.png)

（2）然后就可以扫描到 Wi-Fi 了，输入密码 12345678 进行连接

![image-20241119161644816](https://docs.aw-ol.com/assets/images/image-20241119161644816-174157386273520-cf83500b0ddb243e22941c1f2e28f28c-cf83500b0ddb243e22941c1f2e28f28c.png)

### 音频 MIC

**查看音频设备**

使用命令 `amixer` 可以列出全部音频设备

```text
amixer
Simple mixer control 'ADC',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 255
  Mono: 160 [63%] [0.75dB]
Simple mixer control 'ADC DRC0 Mode',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'Off'
Simple mixer control 'ADC DRC1 Mode',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'Off'
Simple mixer control 'ADC HPF0 Mode',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'Off'
Simple mixer control 'ADC HPF1 Mode',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'Off'
Simple mixer control 'ADDA Loop Mode',0
  Capabilities: enum
  Items: 'Off' 'DAC-to-ADC'
  Item0: 'Off'
Simple mixer control 'DAC',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 63
  Mono: 63 [100%] [-1.16dB]
Simple mixer control 'DAC DRC Mode',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'Off'
Simple mixer control 'DAC HPF Mode',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'Off'
Simple mixer control 'DACL',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 255
  Mono: 160 [63%] [0.75dB]
Simple mixer control 'LINEOUT',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'LINEOUT Gain',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 31
  Mono: 31 [100%]
Simple mixer control 'LINEOUT Output Select',0
  Capabilities: enum
  Items: 'DIFFER' 'SINGLE'
  Item0: 'SINGLE'
Simple mixer control 'MIC',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'MIC Gain',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 31
  Mono: 31 [100%]
Simple mixer control 'SPK',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'rx sync mode',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'Off'
Simple mixer control 'tx hub mode',0
  Capabilities: enum
  Items: 'Off' 'On'
  Item0: 'Off'
```



**查看录音设备**

可以使用 `arecord -l` 命令查看核心板提供的录音设备。

```text
arecord -l
```



![image-20241119162200635](https://docs.aw-ol.com/assets/images/image-20241119162200635-174157386274222-eaa478f0eaf5e1350fae8dc67c140a8c-eaa478f0eaf5e1350fae8dc67c140a8c.png)

**麦克风录音**

V821 核心板板载一个麦克风，在录音之前，首先需要打开音频通路，配置内部 MIC0录制音频（需要 SDK 配置 `alsa-utils` 软件包才能直线 `amixer` 等命令）。

提示

配置软件包方法：`make menuconfig`，勾选以下软件包

```text
Allwinner  --->
	Audio  --->
		<*> AudioSystem.......................................... AudioSystem library
		<*> aactd............................ Allwinner Audio Calibration Tool Daemon
		-*- aactd-lib....................... Allwinner Audio Calibration Tool Library
		<*> alsa-plugins-aw.............................. ALSA plugins from Allwinner
Sound  --->
	<*> alsa-utils............ ALSA (Advanced Linux Sound Architecture) utilities
```



（1）打开 MIC 通路

```text
amixer -Dhw:audiocodec cset name="MIC Switch" 1
```



输出如下，表示音频通路已开启

```text
numid=16,iface=MIXER,name='MIC Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
```



（2）设置 MIC 音量

```text
amixer -Dhw:audiocodec cset name="MIC Gain" 10
```



输出如下，表示设置成功

```text
numid=15,iface=MIXER,name='MIC Gain'
  ; type=INTEGER,access=rw---R--,values=1,min=0,max=31,step=0
  : values=30
  | dBscale-min=0.00dB,step=1.00dB,mute=0
```



使用 `arecord -D hw:audiocodec -f S16_LE -t wav -r 16000 -d 3 t.wav` 命令，使用板载的麦克风进行录音。

```text
arecord -D hw:audiocodec -f S16_LE -t wav -r 16000 -d 3 t.wav
```



可以看到输出的 `t.wav` 文件

## 配套模块

### 摄像头模块

核心板套件配备了摄像头模块与配套的排线，请注意排线需要同向排线。

![image-20250423232434784](https://docs.aw-ol.com/assets/images/image-20250423232434784-a70c7e13e60b1a580ac2d8ebf1748eef.png)

摄像头模组排线的 1 脚如图所示，蓝色塑料面朝上插入排线

![image-20250423232520890](https://docs.aw-ol.com/assets/images/image-20250423232520890-5b18ab14574eeb2e9ca25692deecc130.png)

核心板摄像头接口的 1 脚

![image-20250423232559172](https://docs.aw-ol.com/assets/images/image-20250423232559172-36eee0bb40375875ba7d0f84eb2aded7.png)

在接入时请确保 1 脚与 1 脚对应，否则会出现摄像头烧毁的风险。

- 金属触点这一面面向 Avaota F1 文字

![image-20250423232634803](https://docs.aw-ol.com/assets/images/image-20250423232634803-91194f07a93fcf3be593b263cc92b8f6.png)

- 蓝色塑料这一面面向核心板内部

![image-20250423232654361](https://docs.aw-ol.com/assets/images/image-20250423232654361-f33d6b3a299ccf43fde6338b50547e91.png)

摄像头具体使用可以参考 【[SDK 功能演示体验](https://docs.aw-ol.com/docs/soc/v821/software/demo)】，具体演示如何编译运行一个 RTSP 测试 DEMO

# SDK 功能演示体验

本文将以 V821 PERF2 板为示例，演示搭建 Smart IPC 场景功能，包括：

- RTSP H264 1280*720@20fps 预览
- 1280*720@20fps H264 编码视频分段滚动录像
- 定时拍照

需要准备如下物品：

- V821 PERF2 开发板
- 单目GC1084模组
- 串口线（用于调试）
- USB线（用于下载烧录，传输文件）
- SD 卡（用于保存码流）
- WIFI天线（用于无线传输）
- 路由器（用于数据交换）
- 手机或笔记本电脑（用于播放码流）

## 硬件连接

准备好摄像头，排线，V821 PERF2 开发板，排线需要同向排线。

![image-20241118170410614](https://docs.aw-ol.com/assets/images/image-20241118170410614-a6165dd5603b19d8c8913b586e9886fe.png)

将排线的蓝面朝上，接入摄像头模块

![image-20241118170507963](https://docs.aw-ol.com/assets/images/image-20241118170507963-e7588158be4bc72d795335e2d67dbc10.png)

排线另外一边，触点面朝向芯片，接入 PERF2 开发板

![image-20241118170645214](https://docs.aw-ol.com/assets/images/image-20241118170645214-db6041f3a7ea7b1e462cb0cf00a4f612.png)

摄像头安装完成

![image-20241118170706269](https://docs.aw-ol.com/assets/images/image-20241118170706269-e05bb44f37c0e2ca9f2c1cb220f71577.png)

安装天线，将天线接入天线插口

![image-20241118170739004](https://docs.aw-ol.com/assets/images/image-20241118170739004-53a00c2aadba1e2711da78779c342361.png)

插入调试串口

![image-20241118171820917](https://docs.aw-ol.com/assets/images/image-20241118171820917-21f5dab91dd2345d218ecfc086696193.png)

## 准备固件

> 如果已有固件，可以跳过本章节，从烧录固件开始看

### 配置方案

首先输入以下命令，配置SDK开发环境

```text
source build/envsetup.sh
```



然后输入 `lunch` 命令加载方案

```text
lunch
```



这里选择 v821-perf2-tina 方案，输入 4，按回车

![image-20241118171552061](https://docs.aw-ol.com/assets/images/image-20241118171552061-ef0f66f13c01cb3cb0dc7712a0ed19f5.png)

### 配置测试 Sample

```

```



输入以下命令，进入配置界面

```text
make menuconfig
```



![image-20241118163536930](data:image/png;base64, )

配置页面如下

![image-20241118163553180](https://docs.aw-ol.com/assets/images/image-20241118163553180-9cadc1a9a50e50299556f7c271b6219a.png)

下拉找到 Allwinner 按回车进入

![image-20241118163621775](https://docs.aw-ol.com/assets/images/image-20241118163621775-1a32eed4e8c7dfa7880e40fe40ef90c0.png)

在最下面找到 eyesee-mpp，按回车进入

![image-20241118163640800](https://docs.aw-ol.com/assets/images/image-20241118163640800-77674f69b0cca4dff3260bf67feedb43.png)

找到 `select mpp sample`，按空格选中（先选择`eyesee-mpp-middleware-demo config`就出来`select mpp sample`）

![image-20241118164505217](https://docs.aw-ol.com/assets/images/image-20241118164505217-edaec93b9e9c1564f112df8b64f7d208.png)

找到 `mpp sample smartIPC_demo`，按空格选中

![image-20241118164525565](https://docs.aw-ol.com/assets/images/image-20241118164525565-56ac759a6aba1be36cc4c539d434289a.png)

提示

如果找不到 `mpp sample smartIPC_demo` 选项，先去检查一下依赖软件包 `rgb_ctrl` 有没有打开，如果没有打开需要开一下

![image-20250526103537915](https://docs.aw-ol.com/assets/images/image-20250526103537915-3adbff6c2fbf968fb4a6b55841b75762.png)

使用方向键选择 `Save`

![image-20241118164558256](https://docs.aw-ol.com/assets/images/image-20241118164558256-de39b191f0dfb30f7d7147d3cd5601f9.png)

选择 `OK`

![image-20241118164611317](https://docs.aw-ol.com/assets/images/image-20241118164611317-a49e248abc247925692ce07d20cad376.png)

选择 EXIT

![image-20241118164617725](data:image/png;base64, )

使用方向键选择 Exit

![image-20241118164655148](https://docs.aw-ol.com/assets/images/image-20241118164655148-5801275126fa3ee1e7e0873dca1b651a.png)

继续退出

![image-20241118164710249](https://docs.aw-ol.com/assets/images/image-20241118164710249-a9ae787b3a95358e1ff8ade6aa491ae0.png)

继续退出

![image-20241118164732177](https://docs.aw-ol.com/assets/images/image-20241118164732177-e3fe518332cda6f1ea8a271330f06dcf.png)

### 编译 SDK

回到控制台，输入 `mp -j4` 以 4 线程并行方式编译

![image-20241118164823029](data:image/png;base64, )

等待 SDK 编译完成，会在 `out` 目录下生成固件

![image-20241118171426560](https://docs.aw-ol.com/assets/images/image-20241118171426560-bb7e3e7bd4a11d4e6a524e8d65be6fc3.png)

将固件拷贝出来，准备烧录

![image-20241118171446163](https://docs.aw-ol.com/assets/images/image-20241118171446163-18105af7e30e1f3d9cb04fca6ce0b7e7.png)

## 烧写固件

打开 PhoenixSuit，选择一键刷机，点击浏览，打开刚才生成的固件

![image-20241118165428364](https://docs.aw-ol.com/assets/images/image-20241118165428364-3f46c09c8606d70d0d720523814368b5.png)

选择全盘擦除升级

![image-20241118171506827](https://docs.aw-ol.com/assets/images/image-20241118171506827-75671bafc478a80b4ccad241f044f9d8.png)

按住 PERF2 开发板上的FEL按键，插入USB线

![image-20241118165707091](https://docs.aw-ol.com/assets/images/image-20241118165707091-889836e7f6770e610d534a5dce06b91d.png)

烧录工具出现提示，选择是

![image-20241118171028491](https://docs.aw-ol.com/assets/images/image-20241118171028491-227ca42688fbfef63383bbf12d8ebca6.png)

烧录中，请耐心等待

![image-20241118171611288](https://docs.aw-ol.com/assets/images/image-20241118171611288-e7aa37779a26f01641b95622b75e7604.png)

烧写结束，系统自动启动

![image-20241118171845874](https://docs.aw-ol.com/assets/images/image-20241118171845874-cdde96393f93652b16d72ec3eae40ac4.png)

## 配置 Sample

前往 `platform/allwinner/eyesee-mpp/middleware/sun300iw1/sample/bin` 找到刚才编译出来的Sample

![image-20241118172041858](https://docs.aw-ol.com/assets/images/image-20241118172041858-b857ea2878462d08686cb5f604b04818.png)

编辑 `sample_smartIPC_demo.conf` 修改配置文件，需要修改的项目如下（可以在附录获取完整版配置文件）：

```text
stream_buf_size = -1 # 使用码流大小推流
main_rtsp_id = 0 # 启用 RTSP
main_src_frame_rate = 20 # 帧率设置 20 帧
main_encode_frame_rate = 20 # 配置编码器20帧
main_2nd_enable = 1 # 开启子码流
main_2nd_src_frame_rate = 20 # 子码流帧率20帧
main_2nd_encode_frame_rate = 20 # 子码流编码帧率20帧
main_2nd_take_picture = 1 # 子码流开启拍照功能
```



将SD卡格式化为 FAT32 格式

![image-20241118172735225](https://docs.aw-ol.com/assets/images/image-20241118172735225-49d35a51ef50d078d4bf44a3ff7ee626.png)

将上面编译出来的 sample 和 配置文件复制到 SD 卡里

![image-20241118172836521](https://docs.aw-ol.com/assets/images/image-20241118172836521-c9e95087bf001cf956c2cac829631225.png)

## 测试运行 Sample

### 配置无线网络

使用命令扫描无线网络

```text
wifi -s 
```



![image-20241118173306056](https://docs.aw-ol.com/assets/images/image-20241118173306056-e1f42389a48e72eeabb0d6264d893f2c.png)

使用命令连接无线网络，连接成功后使用 `ifconfig` 命令查看连接情况与 IP 地址

```text
wifi -c <SSID> <密码>
ifconfig wlan0
```



![image-20241118173535716](https://docs.aw-ol.com/assets/images/image-20241118173535716-6162c5421a20b4742ba9457c1acca69c.png)

### 挂载 SD 卡

插入 SD 卡后，可以在日志里看到新生成的卡设备

![image-20241118173626105](https://docs.aw-ol.com/assets/images/image-20241118173626105-80ffc62bdbc50f6b002be8dac236c9ac.png)

使用命令挂载 SD 卡

```text
mount /dev/mmcblk0p1 /mnt/extsd
```



![image-20241118174051714](data:image/png;base64, )

### 运行 Sample

前往SD卡的挂载目录，查看文件是否存在

```text
cd /mnt/extsd
```



![image-20241118174134210](data:image/png;base64, )

使用命令，运行 sample

```text
./sample_smartIPC_demo -path sample_smartIPC_demo.conf &
```



![image-20241118174552557](https://docs.aw-ol.com/assets/images/image-20241118174552557-fdb86700cff5b3b3e3486d5917a5b801.png)

在平板上打开 VLC 播放器。配置日志显示的地址

```text
rtsp://192.168.51.101:8554/ch0
```



![image-20241118175852117](https://docs.aw-ol.com/assets/images/image-20241118175852117-b66b359880fc1f9f4ce8ca383de062a0.png)

即可打开串流视频

![image-20241118180020486](https://docs.aw-ol.com/assets/images/image-20241118180020486-2b290d118813144de4ad1f178e907aef.png)

SD 卡插上电脑也可以看到拍到的图片和码流

![image-20241118180113645](https://docs.aw-ol.com/assets/images/image-20241118180113645-3c05a58ef43b1c91b42577e4360ef6ce.png)

## 附录：Sample 配置

```conf
########### paramter (ref to tulip_cedarx.conf)############
[parameter]

rtsp_net_type = 3                      #RTSP Network type, 0: "lo", 1: "eth0", 2: "br0", 3: "wlan0"
ve_rec_ref_buf_reduce_enable = 1       #0:disable buf reduce, 1:enable buf reduce
stream_buf_size = -1
product_mode = 0                       #0:static ipc, 1:moving ipc, 2: doorbell, 3:cdr, 4:sdv, 5:projection, 6:UAV(Unmanned Aerial Vehicle)
vbr_opt_en = 1                         #0: old vbr bitrate control, 1:new vbr bitrate control
vbr_opt_rc_priority = 0                #only for vbr opt, balance bitrate and quality, 0:quality priority, 1:bitrate priority, 2:avg bitrate first, 3:instantaneous bitrate first
rc_mode = 1                            #for H264, 0:CBR  1:VBR  2:FIXQP(only for debug)
init_qp = 37
min_i_qp = 25
max_i_qp = 45
min_p_qp = 25
max_p_qp = 45
moving_th = 20
mb_qp_limit_en = 1
quality = 1
p_bits_coef = 10
i_bits_coef = 10
isp_ve_linkage_enable = 1
region_link_enable = 1
region_link_tex_detect_enable = 1
region_link_motion_detect_enable = 1
camera_adaptive_moving_and_static_enable = 1
ve_lens_moving_max_qp = 40
wb_yuv_enable = 0
wb_yuv_buf_num = 3
wb_yuv_scaler_ratio = 0                #0:no scaler, 1: 1/8, 2: 1/2, 3: 1/4
wb_yuv_start_index = 0
wb_yuv_total_cnt = 100
wb_yuv_stream_channel = 0              #venc channel id
wb_yuv_file_path = "/mnt/extsd/wb_yuv.yuv"
vi_timeout_reset_disable = 0           #0:enable(default), >0:disable vi timeout reset for debug.
test_trigger_vi_timeout = 0            #0:disable, >0:enable and means time interval, unit is ms.
encpp_sharp_debug_disable = 0
tdm_speed_down_enable = 0
ve_2dnr_disable = 0
ve_3dnr_disable = 0
test_duration = 0                      #unit:s, 0:Infinite duration.

ir_cut_switch_test_enable = 0
ir_cut_switch_interval = 10            #unit:s
ir_cut_switch_isp = 0
ir_cut_switch_ir_bin_path = "/mnt/extsd/ir"
ir_cut_switch_rbg_bin_path = "/mnt/extsd/rgb"

audio_test_enable = 0
capture_en = 1
capture_sample_rate = 16000
capture_bit_witdh = 16
capture_channel_cnt = 1
capture_ans_en = 1
capture_agc_en = 1
capture_aec_en = 1
capture_save_file = "/mnt/extsd/capture_"
capture_save_file_max_cnt = 10
capture_save_file_duration = 600
playback_en = 1
playback_volume = 80
playback_file = "/mnt/extsd/test.wav"

motionAlarm_on = 0
motionAlarm_result_print_interval = 50     #fps
motionAlarm_sensitivity = 60               #[20,40,60,80,100]
motionAlarm_support_zone = 1
motionAlarm_left_up_x = 0
motionAlarm_left_up_y = 0
motionAlarm_left_bottom_x = 0
motionAlarm_left_bottom_y = 10000
motionAlarm_right_bottom_x = 10000
motionAlarm_right_bottom_y = 10000
motionAlarm_right_up_x = 10000
motionAlarm_right_up_y = 0
motionAlarm_useDefaultCfgEnable = 1
motionAlarm_HorizontalRegionNum = 15
motionAlarm_VerticalRegionNum = 8
motionAlarm_Threshold_High = 2
motionAlarm_Threshold_MediumHigh = 3
motionAlarm_Threshold_Default = 5
motionAlarm_Threshold_MediumLow = 10
motionAlarm_Threshold_Low = 36

main_enable = 1                        #0:disable main stream, 1:enable main stream
main_rtsp_id = 0
main_isp = 0
main_isp_d3d_lbc_ratio = 0             #[100,400], 0:not set but use default, 100:lossless, 125:1.25x, 150:1.5x(default), 400:4x
main_vipp = 0
main_src_width = 1280
main_src_height = 720
main_pixel_format = "aw_lbc_2_5x"      #nv21,nv12,yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
main_wdr_enable = 0
main_vi_buf_num = 3
main_src_frame_rate = 20
main_vi_stitch_mode = 0                # 0: DMA_STITCH_NONE, 1: DMA_STITCH_2IN1_LINNER, 2: DMA_STITCH_HORIZONTAL, 3: DMA_STITCH_VERTICAL
main_viChn = 0
main_venc_chn = 0
main_encode_type = "H.264"
main_encode_width = 1280
main_encode_height = 720
main_encode_frame_rate = 20
main_encode_bitrate = 1048576          #5M:5242880, 2.5M:2621440, 2M:2097152, 1.5M:1572864, 1M:1048576, 0.5M:524288, 0.25M:262144
main_online_en = 0
main_online_share_buf_num = 2
main_encpp_enable = 1
main_ve_ref_frame_lbc_mode = 0         #0:default(1.5x), 1:1.5x, 2:2.0x, 3:2.5x, 4:no lossy
main_key_frame_interval = 30
main_file_path = "/mnt/extsd/mainStream"    #if no path is specified, it will not be saved.
main_save_one_file_duration = 60       #unit:s, 0:Infinite duration.
main_save_max_file_cnt = 10
main_draw_osd_text = "main stream"

main_isp_test_enable = 0
main_isp_test_interval_ms = 2000
main_detect_mipi_desk_en = 0
main_detect_mipi_interv_ms = 1000
main_detect_mipi_channel = 0           # MIPI0/MIPIA: 0, MIPI1/MIPIB: 1

main_venc_recreate_enable = 0
main_venc_recreate_loop_cnt = -1       # loop count, -1:infinite
main_venc_recreate_interval = 10       #unit:s
main_venc_recreate_encoder = "H.264"
main_venc_recreate_framerate = 15
main_venc_recreate_bitrate = 1048576
main_venc_recreate_dst_width = 1280
main_venc_recreate_dst_height = 720
main_venc_recreate_key_frame_interval = 30

main_isp_tdm_raw_process_type = -1     #-1:disable, 0:dump 8bit, 1:dump 10bit, 2:dump 8bit for tools, 3:dump 10bit for tools, 4:send 8bit, 5:send 10bit
main_isp_tdm_raw_width = 1280
main_isp_tdm_raw_height = 720
main_isp_tdm_raw_rxbuf_num = 5
main_isp_tdm_raw_process_frame_cnt_min = 0
main_isp_tdm_raw_process_frame_cnt_max = 5
main_isp_tdm_raw_file_path = "/mnt/extsd/tdm_raw.bin"

main_offline_raw_simulate_type = -1     #-1:disable, 0:after reaching the end, start over from the beginning, 1: after reaching the end, read backwards.
main_offline_raw_type = 43              #39:BGGR8, 40:GBRG8, 41:GRBG8, 42:RGGB8, 43:BGGR10, 44:GBRG10, 45:GRBG10, 46:RGGB10, 47:BGGR12, 48:GBRG12, 49:GRBG12, 50:RGGB12
main_offline_raw_simulate_cnt_start = 0
main_offline_raw_simulate_cnt_end = 19
main_offline_raw_file_path = "/mnt/extsd/test.bin"

main_2nd_enable = 1
main_2nd_vipp = 4
main_2nd_src_width = 640
main_2nd_src_height = 480
main_2nd_pixel_format = "nv21"
main_2nd_vi_buf_num = 3
main_2nd_src_frame_rate = 20
main_2nd_vi_stitch_mode = 0                # 0: DMA_STITCH_NONE, 1: DMA_STITCH_2IN1_LINNER, 2: DMA_STITCH_HORIZONTAL, 3: DMA_STITCH_VERTICAL
main_2nd_viChn = 0
main_2nd_venc_chn = 2
main_2nd_encode_type = "H.264"
main_2nd_encode_width = 640
main_2nd_encode_height = 480
main_2nd_encode_frame_rate = 20
main_2nd_encode_bitrate = 262144
main_2nd_online_en = 0
main_2nd_online_share_buf_num = 2
main_2nd_encpp_enable = 1
main_2nd_ve_ref_frame_lbc_mode = 0
main_2nd_key_frame_interval = 30
main_2nd_file_path = #"/mnt/extsd/main2ndStream"
main_2nd_save_one_file_duration = 60
main_2nd_save_max_file_cnt = 10

main_2nd_take_picture = 1
main_2nd_take_picture_viChn = 1
main_2nd_take_picture_venc_chn = 8
main_2nd_take_picture_interval = 10     #unit:s
main_2nd_take_picture_file = "/mnt/extsd/main_2nd_pic"
main_2nd_take_picture_file_cnt = 10
main_2nd_take_picture_only_capture_yuv = 0

main_2nd_pdet_enable = 0
main_2nd_pdet_viChn = 2
main_2nd_pdet_input_width = 320
main_2nd_pdet_input_height = 192
main_2nd_pdet_input_channel = 3
main_2nd_pdet_conf_thres = 0.3
main_2nd_pdet_run_interval = 30     #unit:fps, default: framerate*2

sub_enable = 0                         #0:disable sub stream, 1:enable sub stream
sub_rtsp_id = -1                        #-1:disable sub rtsp
sub_isp = 1
sub_isp_d3d_lbc_ratio = 0             #[100,400], 0:not set but use default, 100:lossless, 125:1.25x, 150:1.5x(default), 400:4x
sub_vipp = 1
sub_src_width = 1280
sub_src_height = 720
sub_pixel_format = "aw_lbc_2_5x"       #nv21,nv12,yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
sub_wdr_enable = 0
sub_vi_buf_num = 3
sub_src_frame_rate = 15                #fps
sub_viChn = 0
sub_venc_chn = 1
sub_encode_type = "H.264"
sub_encode_width = 1280                #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
sub_encode_height = 720
sub_encode_frame_rate = 15             #fps
sub_encode_bitrate = 1048576           #5M:5242880, 2.5M:2621440, 2M:2097152, 1.5M:1572864, 1M:1048576, 0.5M:524288, 0.25M:262144
sub_online_en = 0
sub_online_share_buf_num = 2
sub_encpp_enable = 1
sub_ve_ref_frame_lbc_mode = 0          #0:default(1.5x), 1:1.5x, 2:2.0x, 3:2.5x, 4:no lossy
sub_key_frame_interval = 30
sub_file_path = "/mnt/extsd/subStream"      #if no path is specified, it will not be saved.
sub_save_one_file_duration = 60        #unit:s, 0:Infinite duration.
sub_save_max_file_cnt = 10
sub_draw_osd_text = "sub stream"

sub_venc_recreate_enable = 0
sub_venc_recreate_loop_cnt = -1       # loop count, -1:infinite
sub_venc_recreate_interval = 10       #unit:s
sub_venc_recreate_encoder = "H.264"
sub_venc_recreate_framerate = 15
sub_venc_recreate_bitrate = 1048576
sub_venc_recreate_dst_width = 1280
sub_venc_recreate_dst_height = 720
sub_venc_recreate_key_frame_interval = 30

sub_isp_tdm_raw_process_type = -1     #-1:disable, 0:dump 8bit, 1:dump 10bit, 2:dump 8bit for tools, 3:dump 10bit for tools, 4:send 8bit, 5:send 10bit
sub_isp_tdm_raw_width = 1280
sub_isp_tdm_raw_height = 720
sub_isp_tdm_raw_rxbuf_num = 5
sub_isp_tdm_raw_process_frame_cnt_min = 0
sub_isp_tdm_raw_process_frame_cnt_max = 5
sub_isp_tdm_raw_file_path = "/mnt/extsd/tdm_raw.bin"

sub_2nd_enable = 0
sub_2nd_vipp = 5
sub_2nd_src_width = 640
sub_2nd_src_height = 480
sub_2nd_pixel_format = "nv21"
sub_2nd_vi_buf_num = 3
sub_2nd_src_frame_rate = 15
sub_2nd_viChn = 0
sub_2nd_venc_chn = 3
sub_2nd_encode_type = "H.264"
sub_2nd_encode_width = 640
sub_2nd_encode_height = 480
sub_2nd_encode_frame_rate = 15
sub_2nd_encode_bitrate = 262144
sub_2nd_online_en = 0
sub_2nd_online_share_buf_num = 2
sub_2nd_encpp_enable = 1
sub_2nd_ve_ref_frame_lbc_mode = 0
sub_2nd_key_frame_interval = 30
sub_2nd_file_path = #"/mnt/extsd/sub2ndStream"
sub_2nd_save_one_file_duration = 60
sub_2nd_save_max_file_cnt = 10

sub_2nd_take_picture = 0
sub_2nd_take_picture_viChn = 1
sub_2nd_take_picture_venc_chn = 9
sub_2nd_take_picture_interval = 10     #unit:s
sub_2nd_take_picture_file = "/mnt/extsd/sub_2nd_pic"
sub_2nd_take_picture_file_cnt = 10
sub_2nd_take_picture_only_capture_yuv = 0

sub_2nd_pdet_enable = 0
sub_2nd_pdet_viChn = 2
sub_2nd_pdet_model_pathname = "/mnt/extsd/model/person_det_v4.0.0"
sub_2nd_pdet_input_width = 288
sub_2nd_pdet_input_height = 160
sub_2nd_pdet_input_channel = 3
sub_2nd_pdet_conf_thres = 0.3
sub_2nd_pdet_run_interval = 30     #unit:fps, default: framerate*2

three_enable = 0                         #0:disable sub stream, 1:enable sub stream
three_rtsp_id = -1                        #-1:disable sub rtsp
three_isp = 2
three_isp_d3d_lbc_ratio = 0             #[100,400], 0:not set but use default, 100:lossless, 125:1.25x, 150:1.5x(default), 400:4x
three_vipp = 2
three_src_width = 1280
three_src_height = 720
three_pixel_format = "aw_lbc_2_5x"       #nv21,nv12,yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
three_wdr_enable = 0
three_vi_buf_num = 3
three_src_frame_rate = 15                #fps
three_viChn = 0
three_venc_chn = 4
three_encode_type = "H.264"
three_encode_width = 1280                #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
three_encode_height = 720
three_encode_frame_rate = 15             #fps
three_encode_bitrate = 1048576           #5M:5242880, 2.5M:2621440, 2M:2097152, 1.5M:1572864, 1M:1048576, 0.5M:524288, 0.25M:262144
three_encpp_enable = 1
three_ve_ref_frame_lbc_mode = 0          #0:default(1.5x), 1:1.5x, 2:2.0x, 3:2.5x, 4:no lossy
three_key_frame_interval = 30
three_file_path = "/mnt/extsd/threeStream"      #if no path is specified, it will not be saved.
three_save_one_file_duration = 60        #unit:s, 0:Infinite duration.
three_save_max_file_cnt = 10
three_draw_osd_text = "three stream"

three_venc_recreate_enable = 0
three_venc_recreate_loop_cnt = -1       # loop count, -1:infinite
three_venc_recreate_interval = 10       #unit:s
three_venc_recreate_encoder = "H.264"
three_venc_recreate_framerate = 15
three_venc_recreate_bitrate = 1048576
three_venc_recreate_dst_width = 1280
three_venc_recreate_dst_height = 720
three_venc_recreate_key_frame_interval = 30

three_isp_tdm_raw_process_type = -1     #-1:disable, 0:dump 8bit, 1:dump 10bit, 2:dump 8bit for tools, 3:dump 10bit for tools, 4:send 8bit, 5:send 10bit
three_isp_tdm_raw_width = 1280
three_isp_tdm_raw_height = 720
three_isp_tdm_raw_rxbuf_num = 5
three_isp_tdm_raw_process_frame_cnt_min = 0
three_isp_tdm_raw_process_frame_cnt_max = 5
three_isp_tdm_raw_file_path = "/mnt/extsd/tdm_raw.bin"

three_2nd_enable = 0
three_2nd_vipp = 6
three_2nd_src_width = 640
three_2nd_src_height = 480
three_2nd_pixel_format = "nv21"
three_2nd_vi_buf_num = 3
three_2nd_src_frame_rate = 15
three_2nd_viChn = 0
three_2nd_venc_chn = 6
three_2nd_encode_type = "H.264"
three_2nd_encode_width = 640
three_2nd_encode_height = 480
three_2nd_encode_frame_rate = 15
three_2nd_encode_bitrate = 262144
three_2nd_online_en = 0
three_2nd_online_share_buf_num = 2
three_2nd_encpp_enable = 1
three_2nd_ve_ref_frame_lbc_mode = 0
three_2nd_key_frame_interval = 30
three_2nd_file_path = #"/mnt/extsd/three2ndStream"
three_2nd_save_one_file_duration = 60
three_2nd_save_max_file_cnt = 10

three_2nd_take_picture = 0
three_2nd_take_picture_viChn = 1
three_2nd_take_picture_venc_chn = 10
three_2nd_take_picture_interval = 10     #unit:s
three_2nd_take_picture_file = "/mnt/extsd/three_2nd_pic"
three_2nd_take_picture_file_cnt = 10
three_2nd_take_picture_only_capture_yuv = 0

three_2nd_pdet_enable = 0
three_2nd_pdet_viChn = 2
three_2nd_pdet_model_pathname = "/mnt/extsd/model/person_det_v4.0.0"
three_2nd_pdet_input_width = 288
three_2nd_pdet_input_height = 160
three_2nd_pdet_input_channel = 3
three_2nd_pdet_conf_thres = 0.3
three_2nd_pdet_run_interval = 30     #unit:fps, default: framerate*2

four_enable = 0                         #0:disable sub stream, 1:enable sub stream
four_rtsp_id = -1                        #-1:disable sub rtsp
four_isp = 3
four_isp_d3d_lbc_ratio = 0             #[100,400], 0:not set but use default, 100:lossless, 125:1.25x, 150:1.5x(default), 400:4x
four_vipp = 3
four_src_width = 1280
four_src_height = 720
four_pixel_format = "aw_lbc_2_5x"       #nv21,nv12,yu12,yv12;aw_lbc_2_5x,aw_lbc_2_0x,aw_lbc_1_5x,aw_lbc_1_0x
four_wdr_enable = 0
four_vi_buf_num = 3
four_src_frame_rate = 15                #fps
four_viChn = 0
four_venc_chn = 5
four_encode_type = "H.264"
four_encode_width = 1280                #1280x720->720p, 1920x1080->1080p, 2304x1296->3M, 2560×1440->2k, 3840x2160->4k, 7680x4320->8k
four_encode_height = 720
four_encode_frame_rate = 15             #fps
four_encode_bitrate = 1048576           #5M:5242880, 2.5M:2621440, 2M:2097152, 1.5M:1572864, 1M:1048576, 0.5M:524288, 0.25M:262144
four_encpp_enable = 1
four_ve_ref_frame_lbc_mode = 0          #0:default(1.5x), 1:1.5x, 2:2.0x, 3:2.5x, 4:no lossy
four_key_frame_interval = 30
four_file_path = "/mnt/extsd/fourStream"      #if no path is specified, it will not be saved.
four_save_one_file_duration = 60        #unit:s, 0:Infinite duration.
four_save_max_file_cnt = 10
four_draw_osd_text = "four stream"

four_venc_recreate_enable = 0
four_venc_recreate_loop_cnt = -1       # loop count, -1:infinite
four_venc_recreate_interval = 10       #unit:s
four_venc_recreate_encoder = "H.264"
four_venc_recreate_framerate = 15
four_venc_recreate_bitrate = 1048576
four_venc_recreate_dst_width = 1280
four_venc_recreate_dst_height = 720
four_venc_recreate_key_frame_interval = 30

four_isp_tdm_raw_process_type = -1     #-1:disable, 0:dump 8bit, 1:dump 10bit, 2:dump 8bit for tools, 3:dump 10bit for tools, 4:send 8bit, 5:send 10bit
four_isp_tdm_raw_width = 1280
four_isp_tdm_raw_height = 720
four_isp_tdm_raw_rxbuf_num = 5
four_isp_tdm_raw_process_frame_cnt_min = 0
four_isp_tdm_raw_process_frame_cnt_max = 5
four_isp_tdm_raw_file_path = "/mnt/extsd/tdm_raw.bin"

four_2nd_enable = 0
four_2nd_vipp = 7
four_2nd_src_width = 640
four_2nd_src_height = 480
four_2nd_pixel_format = "nv21"
four_2nd_vi_buf_num = 3
four_2nd_src_frame_rate = 15
four_2nd_viChn = 0
four_2nd_venc_chn = 7
four_2nd_encode_type = "H.264"
four_2nd_encode_width = 640
four_2nd_encode_height = 480
four_2nd_encode_frame_rate = 15
four_2nd_encode_bitrate = 262144
four_2nd_online_en = 0
four_2nd_online_share_buf_num = 2
four_2nd_encpp_enable = 1
four_2nd_ve_ref_frame_lbc_mode = 0
four_2nd_key_frame_interval = 30
four_2nd_file_path = #"/mnt/extsd/four2ndStream"
four_2nd_save_one_file_duration = 60
four_2nd_save_max_file_cnt = 10

four_2nd_take_picture = 0
four_2nd_take_picture_viChn = 1
four_2nd_take_picture_venc_chn = 11
four_2nd_take_picture_interval = 10     #unit:s
four_2nd_take_picture_file = "/mnt/extsd/four_2nd_pic"
four_2nd_take_picture_file_cnt = 10
four_2nd_take_picture_only_capture_yuv = 0

four_2nd_pdet_enable = 0
four_2nd_pdet_viChn = 2
four_2nd_pdet_model_pathname = "/mnt/extsd/model/person_det_v4.0.0"
four_2nd_pdet_input_width = 288
four_2nd_pdet_input_height = 160
four_2nd_pdet_input_channel = 3
four_2nd_pdet_conf_thres = 0.3
four_2nd_pdet_run_interval = 30     #unit:fps, default: framerate*2
```