hi_aio_attr
Description
Defines the attributes of the AIO device.
Prototype
typedef struct {
hi_audio_sample_rate sample_rate;
hi_audio_bit_width bit_width;
hi_aio_mode work_mode;
hi_audio_snd_mode snd_mode;
hi_u32 expand_flag;
hi_u32 frame_num;
hi_u32 point_num_per_frame;
hi_u32 chn_cnt;
hi_u32 clk_share;
hi_aio_i2s_type i2s_type;
} hi_aio_attr;
Members
Member |
Description |
|---|---|
sample_rate |
Audio sampling rate (this parameter does not take effect in slave mode). Only 48 kHz is supported. |
bit_width |
Audio sampling precision. In slave mode, this parameter must match the sampling precision of the audio AD/DA. Only 16-bit and 24-bit are supported. |
work_mode |
Defines the AI and AO operating modes. Only the value 0 (master mode) is supported. If other values are configured, the system automatically sets the value to 0. |
snd_mode |
Audio channel mode. 0 indicates single-channel, and 1 indicates dual-channel. |
expand_flag |
Audio bit width extension flag. This parameter is reserved. If it is set to other values, the system automatically sets it to 0. |
frame_num |
Number of buffered frames. Value range: [2, 300] |
point_num_per_frame |
Number of sampling points in a frame The value range of AI is [480, 2048], and that of AO is [480, 4096]. |
chn_cnt |
Number of channels supported by each I2S. A maximum of two channels are supported. In dual-channel mode, the value is fixed at 2. In single-channel mode, the value is fixed at 1. |
clk_share |
Whether AI device 0 multiplexes the frame sync clock and bit stream clock of AO device 0. This parameter is reserved. If this parameter is set to other values, the system automatically sets the value to 1. |
i2s_type |
I2S type of the device Only the value 0 is supported (for interworking with the built-in codec). If other values are configured, the system automatically sets the value to 0. |