![]() |
CI130X SDK API手册
2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
|
播放器底层设备 更多...
#include "audio_play_device.h"#include "audio_play_api.h"#include "audio_play_process.h"#include <string.h>#include "audio_play_os_port.h"#include "ci130x_codec.h"#include "sdk_default_config.h"#include "FreeRTOS.h"#include "codec_manager.h"#include "romlib_runtime.h"#include "board.h"函数 | |
| int | cm_start_codec (int codec_index, io_direction_t io_dir) |
| 启动指定的音频CODEC播放或录音。 更多... | |
| int | cm_stop_codec (int codec_index, io_direction_t io_dir) |
| 停止指定的音频CODEC播放或录音。 更多... | |
| int | cm_set_codec_mute (int codec_index, io_direction_t io_dir, int channel_flag, FunctionalState en) |
| 设置静音模式。 更多... | |
| int | cm_set_codec_dac_gain (int codec_index, cm_cha_sel_t cha, int gain) |
| 设置DAC的增益(0 —— 100) 更多... | |
| void | cm_get_pcm_buffer (int codec_index, uint32_t *ret_buf, uint32_t wait_tick) |
| 从指定的音频CODEC获取空闲的PCM数据buffer,用于填充PCM数据后再通过cm_write_codec接口写入音频CODEC。 更多... | |
| int | cm_write_codec (int codec_index, void *pcm_buffer, uint32_t wait_tick) |
| 向指定的音频CODEC写入数据。 更多... | |
| void | send_one_buf_done_event (void *xHigherPriorityTaskWoken) |
| buf释放回调函数 更多... | |
| void | audio_play_hw_timeout (void *xHigherPriorityTaskWoken) |
| 硬件超时回调函数 更多... | |
| void | audio_play_hw_per_init (void) |
| 播放硬件声卡预初始化 更多... | |
| void | audio_play_set_vol_gain (int32_t gain) |
| 调节播放音量 更多... | |
| int32_t | audio_play_get_vol_gain (void) |
| 获取当前播放音量 更多... | |
| void | audio_play_set_mute (bool is_mute) |
| 设置静音 更多... | |
| void | audio_play_hw_pa_da_ctl (FunctionalState cmd, bool is_control_pa) |
| pa、da控制,可选择是否控制功放 更多... | |
| void | audio_play_hw_start (FunctionalState pa_cmd, audio_format_info_t *audio_format_info) |
| 声卡驱动开始播放 更多... | |
| void | audio_play_hw_stop (FunctionalState pa_cmd) |
| 声卡驱动停止播放 更多... | |
| int32_t | audio_play_hw_write_data (void *pcm_buf, uint32_t buf_size) |
| 向硬件写入音频数据 更多... | |
| int32_t | audio_play_hw_clean_data (void) |
| 清理写入硬件的音频数据 更多... | |
| int32_t | audio_play_hw_queue_is_full (void) |
| 查询音频数据消息是否发满 更多... | |
| int32_t | audio_play_hw_get_queue_remain_nums (void) |
| 查询硬件待处理的消息个数 更多... | |
变量 | |
| int | sg_play_device_index = PLAY_CODEC_ID |
| static int32_t | g_audio_play_gain = 0 |
播放器底层设备
| int32_t audio_play_get_vol_gain | ( | void | ) |
获取当前播放音量
| int32_t audio_play_hw_clean_data | ( | void | ) |
清理写入硬件的音频数据
| int32_t audio_play_hw_get_queue_remain_nums | ( | void | ) |
查询硬件待处理的消息个数
| void audio_play_hw_pa_da_ctl | ( | FunctionalState | cmd, |
| bool | is_control_pa | ||
| ) |
pa、da控制,可选择是否控制功放
| cmd | pa使能或失能 |
< 输入
< 输出
| void audio_play_hw_per_init | ( | void | ) |
播放硬件声卡预初始化
| int32_t audio_play_hw_queue_is_full | ( | void | ) |
查询音频数据消息是否发满
| void audio_play_hw_start | ( | FunctionalState | pa_cmd, |
| audio_format_info_t * | audio_format_info | ||
| ) |
声卡驱动开始播放
| void audio_play_hw_stop | ( | FunctionalState | pa_cmd | ) |
声卡驱动停止播放
| void audio_play_hw_timeout | ( | void * | xHigherPriorityTaskWoken | ) |
硬件超时回调函数
| xHigherPriorityTaskWoken | 中断退出OS调度任务标志 |
| int32_t audio_play_hw_write_data | ( | void * | pcm_buf, |
| uint32_t | buf_size | ||
| ) |
向硬件写入音频数据
| void audio_play_set_mute | ( | bool | is_mute | ) |
设置静音
| is_mute | 是否静音 |
| void audio_play_set_vol_gain | ( | int32_t | gain | ) |
调节播放音量
| gain | 音量(0–100) |
| void send_one_buf_done_event | ( | void * | xHigherPriorityTaskWoken | ) |
buf释放回调函数
| xHigherPriorityTaskWoken | 中断退出OS调度任务标志 |
|
static |
| int sg_play_device_index = PLAY_CODEC_ID |
1.8.14