audio_hw_device结构参考
audio_hw_device结构参考
#include < audio.h >
数据字段 | |
结构体hw_device_t | 常见的 |
uint32_t(* | get_supported_devices )(const struct audio_hw_device *dev) |
整数(* | init_check )(const struct audio_hw_device *dev) |
整数(* | set_voice_volume )(结构audio_hw_device *dev,浮动音量) |
整数(* | set_master_volume )(struct audio_hw_device *dev,浮动音量) |
整数(* | get_master_volume )(struct audio_hw_device *dev, float *volume) |
整数(* | set_mode )(结构audio_hw_device *dev,audio_mode_t模式) |
整数(* | set_mic_mute )(struct audio_hw_device *dev,布尔状态) |
整数(* | get_mic_mute )(const struct audio_hw_device *dev,bool *state) |
整数(* | set_parameters )(struct audio_hw_device *dev, const char *kv_pairs) |
字符 *(* | get_parameters )(const struct audio_hw_device *dev,const char *keys) |
尺寸_t(* | get_input_buffer_size )(const struct audio_hw_device *dev,const struct audio_config *config) |
整数(* | open_output_stream )(结构audio_hw_device * dev,audio_io_handle_t句柄,audio_devices_t设备,audio_output_flags_t标志,结构audio_config *配置,结构audio_stream_out **stream_out,const char *地址) |
空白(* | close_output_stream )(结构audio_hw_device *dev,结构audio_stream_out *stream_out) |
整数(* | open_input_stream )(结构audio_hw_device *dev,audio_io_handle_t句柄,audio_devices_t设备,结构audio_config *config,结构audio_stream_in **stream_in,audio_input_flags_t标志,const char *地址,audio_source_t源) |
空白(* | close_input_stream )(结构audio_hw_device *dev,结构audio_stream_in *stream_in) |
整数(* | 转储)(常量结构audio_hw_device * dev,int fd) |
整数(* | set_master_mute )(struct audio_hw_device *dev, bool 静音) |
整数(* | get_master_mute )(struct audio_hw_device *dev, bool *mute) |
整数(* | create_audio_patch )(struct audio_hw_device *dev,unsigned int num_sources,const struct audio_port_config *sources,unsigned int num_sinks,const struct audio_port_config *sinks,audio_patch_handle_t *handle) |
整数(* | release_audio_patch )(结构audio_hw_device *dev,audio_patch_handle_t句柄) |
整数(* | get_audio_port )(结构audio_hw_device *dev,结构audio_port *port) |
整数(* | set_audio_port_config )(struct audio_hw_device *dev,const struct audio_port_config *config) |
详细说明
现场文档
void(* close_input_stream)(结构体audio_hw_device *dev, 结构体audio_stream_in *stream_in) |
void(* close_output_stream)(结构audio_hw_device *dev, 结构audio_stream_out *stream_out) |
结构体hw_device_t公共 |
音频设备的常用方法。这必须是audio_hw_device的第一个成员,因为该结构的用户将在已知hw_device_t引用audio_hw_device的上下文中将hw_device_t强制转换为audio_hw_device指针。
int(* create_audio_patch)(struct audio_hw_device *dev, unsigned int num_sources, const struct audio_port_config *sources, unsigned int num_sinks, const struct audio_port_config *sinks, audio_patch_handle_t *handle) |
int(* dump)(const struct audio_hw_device *dev, int fd) |
int(* get_audio_port)(结构体audio_hw_device *dev, 结构体audio_port *port) |
size_t(* get_input_buffer_size)(const struct audio_hw_device *dev, const struct audio_config *config) |
int(* get_master_mute)(struct audio_hw_device *dev, bool *mute) |
int(* get_master_volume)(struct audio_hw_device *dev, float *volume) |
int(* get_mic_mute)(const struct audio_hw_device *dev, bool *state) |
char*(* get_parameters)(const struct audio_hw_device *dev, const char *keys) |
uint32_t(* get_supported_devices)(const struct audio_hw_device *dev) |
音频flinger 使用它来枚举每个audio_hw_device实现支持哪些设备。
返回值是1个或多个audio_devices_t值的位掩码
注意:以 AUDIO_DEVICE_API_VERSION_2_0 开头的音频 HAL 实现不实现此函数。所有支持的设备应在audio_policy.conf 文件中列出,并且音频策略管理器必须根据该文件中的信息选择适当的音频模块。
int(* init_check)(const struct audio_hw_device *dev) |
int(* open_input_stream)(结构audio_hw_device *dev、audio_io_handle_t句柄、audio_devices_t设备、结构audio_config *config、结构audio_stream_in **stream_in、audio_input_flags_t标志、const char *地址、audio_source_t源) |
int(* open_output_stream)(结构audio_hw_device *dev、audio_io_handle_t句柄、audio_devices_t设备、audio_output_flags_t标志、结构audio_config *config、结构audio_stream_out **stream_out、const char *地址) |
int(*release_audio_patch)(结构audio_hw_device *dev,audio_patch_handle_t句柄) |
int(* set_audio_port_config)(结构体audio_hw_device *dev, const 结构体audio_port_config *config) |
int(* set_master_mute)(struct audio_hw_device *dev, bool 静音) |
int(* set_master_volume)(struct audio_hw_device *dev, 浮动音量) |
int(* set_mic_mute)(struct audio_hw_device *dev, bool state) |
int(* set_mode)(结构audio_hw_device *dev,audio_mode_t模式) |
int(* set_parameters)(struct audio_hw_device *dev, const char *kv_pairs) |
int(* set_voice_volume)(struct audio_hw_device *dev, 浮动音量) |
该结构的文档是从以下文件生成的:
- 硬件/libhardware/include/hardware/audio.h
audio_hw_device结构参考
audio_hw_device结构参考
#include < audio.h >
数据字段 | |
结构体hw_device_t | 常见的 |
uint32_t(* | get_supported_devices )(const struct audio_hw_device *dev) |
整数(* | init_check )(const struct audio_hw_device *dev) |
整数(* | set_voice_volume )(结构audio_hw_device *dev,浮动音量) |
整数(* | set_master_volume )(struct audio_hw_device *dev,浮动音量) |
整数(* | get_master_volume )(struct audio_hw_device *dev, float *volume) |
整数(* | set_mode )(结构audio_hw_device *dev,audio_mode_t模式) |
整数(* | set_mic_mute )(struct audio_hw_device *dev,布尔状态) |
整数(* | get_mic_mute )(const struct audio_hw_device *dev,bool *state) |
整数(* | set_parameters )(struct audio_hw_device *dev, const char *kv_pairs) |
字符 *(* | get_parameters )(const struct audio_hw_device *dev,const char *keys) |
尺寸_t(* | get_input_buffer_size )(const struct audio_hw_device *dev,const struct audio_config *config) |
整数(* | open_output_stream )(结构audio_hw_device * dev,audio_io_handle_t句柄,audio_devices_t设备,audio_output_flags_t标志,结构audio_config *配置,结构audio_stream_out **stream_out,const char *地址) |
空白(* | close_output_stream )(结构audio_hw_device *dev,结构audio_stream_out *stream_out) |
整数(* | open_input_stream )(结构audio_hw_device *dev,audio_io_handle_t句柄,audio_devices_t设备,结构audio_config *config,结构audio_stream_in **stream_in,audio_input_flags_t标志,const char *地址,audio_source_t源) |
空白(* | close_input_stream )(结构audio_hw_device *dev,结构audio_stream_in *stream_in) |
整数(* | 转储)(常量结构audio_hw_device * dev,int fd) |
整数(* | set_master_mute )(struct audio_hw_device *dev, bool 静音) |
整数(* | get_master_mute )(struct audio_hw_device *dev, bool *mute) |
整数(* | create_audio_patch )(struct audio_hw_device *dev,unsigned int num_sources,const struct audio_port_config *sources,unsigned int num_sinks,const struct audio_port_config *sinks,audio_patch_handle_t *handle) |
整数(* | release_audio_patch )(结构audio_hw_device *dev,audio_patch_handle_t句柄) |
整数(* | get_audio_port )(结构audio_hw_device *dev,结构audio_port *port) |
整数(* | set_audio_port_config )(struct audio_hw_device *dev,const struct audio_port_config *config) |
详细说明
现场文档
void(* close_input_stream)(结构体audio_hw_device *dev, 结构体audio_stream_in *stream_in) |
void(* close_output_stream)(结构audio_hw_device *dev, 结构audio_stream_out *stream_out) |
结构体hw_device_t公共 |
音频设备的常用方法。这必须是audio_hw_device的第一个成员,因为该结构的用户将在已知hw_device_t引用audio_hw_device的上下文中将hw_device_t强制转换为audio_hw_device指针。
int(* create_audio_patch)(struct audio_hw_device *dev, unsigned int num_sources, const struct audio_port_config *sources, unsigned int num_sinks, const struct audio_port_config *sinks, audio_patch_handle_t *handle) |
int(* dump)(const struct audio_hw_device *dev, int fd) |
int(* get_audio_port)(结构体audio_hw_device *dev, 结构体audio_port *port) |
size_t(* get_input_buffer_size)(const struct audio_hw_device *dev, const struct audio_config *config) |
int(* get_master_mute)(struct audio_hw_device *dev, bool *mute) |
int(* get_master_volume)(struct audio_hw_device *dev, float *volume) |
int(* get_mic_mute)(const struct audio_hw_device *dev, bool *state) |
char*(* get_parameters)(const struct audio_hw_device *dev, const char *keys) |
uint32_t(* get_supported_devices)(const struct audio_hw_device *dev) |
音频flinger 使用它来枚举每个audio_hw_device实现支持哪些设备。
返回值是1个或多个audio_devices_t值的位掩码
注意:以 AUDIO_DEVICE_API_VERSION_2_0 开头的音频 HAL 实现不实现此函数。所有支持的设备应在audio_policy.conf 文件中列出,并且音频策略管理器必须根据该文件中的信息选择适当的音频模块。
int(* init_check)(const struct audio_hw_device *dev) |
int(* open_input_stream)(结构audio_hw_device *dev、audio_io_handle_t句柄、audio_devices_t设备、结构audio_config *config、结构audio_stream_in **stream_in、audio_input_flags_t标志、const char *地址、audio_source_t源) |
int(* open_output_stream)(结构audio_hw_device *dev、audio_io_handle_t句柄、audio_devices_t设备、audio_output_flags_t标志、结构audio_config *config、结构audio_stream_out **stream_out、const char *地址) |
int(*release_audio_patch)(结构audio_hw_device *dev,audio_patch_handle_t句柄) |
int(* set_audio_port_config)(结构体audio_hw_device *dev, const 结构体audio_port_config *config) |
int(* set_master_mute)(struct audio_hw_device *dev, bool 静音) |
int(* set_master_volume)(struct audio_hw_device *dev, 浮动音量) |
int(* set_mic_mute)(struct audio_hw_device *dev, bool state) |
int(* set_mode)(结构audio_hw_device *dev,audio_mode_t模式) |
int(* set_parameters)(struct audio_hw_device *dev, const char *kv_pairs) |
int(* set_voice_volume)(struct audio_hw_device *dev, 浮动音量) |
该结构的文档是从以下文件生成的:
- 硬件/libhardware/include/hardware/audio.h