hi_mpi_ai_enable_chn
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
☓ |
|
|
☓ |
|
|
☓ |
|
|
√ |
|
|
☓ |
|
|
☓ |
Function Description
Enables an AI channel.
Prototype
hi_s32 hi_mpi_ai_enable_chn(hi_audio_dev ai_dev, hi_ai_chn ai_chn)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
ai_dev |
Input |
Audio device ID. The value range is [0, 2]. |
|
ai_chn |
Input |
Recording channel ID. |
Returns
- 0: success
- Other values: failure. For details, see Audio Return Codes.
Restrictions
- Before enabling an AI channel, you must set the attributes of the AI device by calling hi_mpi_ai_set_pub_attr. Otherwise, an error code indicating that the attributes are not set is returned.
- Before enabling an AI channel, you must call hi_mpi_ai_enable to enable the AI device to which the AI channel belongs. Otherwise, the error code indicating that the AI device is not enabled is returned.
- When the audio-left channel or stereo channel is used for recording, ai_chn must be fixed at 0. When the audio-right channel is used for recording, ai_chn is 1.
- If the channel of the AI device is enabled, a code indicating success is returned.
Parent topic: AI/AO