audio hal HAL_MODULE_INFO_SYM define and load
来源:互联网 发布:电竞显示器 知乎 编辑:程序博客网 时间:2024/04/24 19:45
audio_hw.c
static struct hw_module_methods_t hal_module_methods = {
.open = adev_open,};
struct audio_module HAL_MODULE_INFO_SYM = {
.common = {
.tag = HARDWARE_MODULE_TAG,
.module_api_version = AUDIO_MODULE_API_VERSION_0_1,
.hal_api_version = HARDWARE_HAL_API_VERSION,
.id = AUDIO_HARDWARE_MODULE_ID,
.name = "QCOM Audio HAL",
.author = "The Linux Foundation",
.methods = &hal_module_methods,
},
};
audioflinger.cpp
static int load_audio_interface(const char *if_name, audio_hw_device_t **dev)
{
const hw_module_t *mod;
int rc;
rc = hw_get_module_by_class(AUDIO_HARDWARE_MODULE_ID, if_name, &mod);
ALOGE_IF(rc, "%s couldn't load audio hw module %s.%s (%s)", __func__,
AUDIO_HARDWARE_MODULE_ID, if_name, strerror(-rc));
if (rc) {
goto out;
}
rc = audio_hw_device_open(mod, dev);
ALOGE_IF(rc, "%s couldn't open audio hw device in %s.%s (%s)", __func__,
AUDIO_HARDWARE_MODULE_ID, if_name, strerror(-rc));
if (rc) {
goto out;
}
if ((*dev)->common.version < AUDIO_DEVICE_API_VERSION_MIN) {
ALOGE("%s wrong audio hw device version %04x", __func__, (*dev)->common.version);
rc = BAD_VALUE;
goto out;
}
return 0;
out:
*dev = NULL;
return rc;
}
- audio hal HAL_MODULE_INFO_SYM define and load
- android 怎么选择audio hal
- Android 5.1 Audio HAL分析
- Android Audio HAL層的研究
- Android底层开发之Audio HAL
- android Audio OverView之二(hal)
- audio channels and channel_layout
- Audio and Video
- struct hw_module_t HAL_MODULE_INFO_SYM
- struct hw_module_t HAL_MODULE_INFO_SYM
- typedef and define
- const and #define
- define and typedef
- define curser and record
- #define and const
- #define and typedef
- define and typedef
- #define and typedef
- qt上用qrencode3.4.4生成二维码显示
- Python isinstance
- Android开发之 --- 观察者模式
- log4j.properties的配置
- 1009. 说反话 (20)
- audio hal HAL_MODULE_INFO_SYM define and load
- php 获取时间以及时间戳转换
- python学习记录--continue break的区别
- SSL笔记
- 图书管理系统
- 电商网站开发概述
- 一步一步构建iOS持续集成:Jenkins+GitLab+蒲公英+FTP
- oracle 导入 dmp
- Ceph排错之osd之间心跳检测没有回应