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位址來源,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 *sin. |
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_flags_t標誌、const char *來源位址、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