audio_hw_device構造体リファレンス

audio_hw_device構造体リファレンス

#include < audio.h >

データフィールド

struct hw_device_t一般
uint32_t(* get_supported_devices )(const struct audio_hw_device * dev)
int(* init_check )(const struct audio_hw_device * dev)
int(* set_voice_volume )(struct audio_hw_device * dev、float volume)
int(* set_master_volume )(struct audio_hw_device * dev、float volume)
int(* get_master_volume )(struct audio_hw_device * dev、float * volume)
int(* set_mode )(struct audio_hw_device * dev、audio_mode_t mode)
int(* set_mic_mute )(struct audio_hw_device * dev、bool state)
int(* get_mic_mute )(const struct audio_hw_device * dev、bool * state)
int(* set_parameters )(struct audio_hw_device * dev、const char * kv_pairs)
char *(* get_parameters )(const struct audio_hw_device * dev、const char * keys)
size_t(* get_input_buffer_size )(const struct audio_hw_device * dev、const struct audio_config * config)
int(* open_output_stream )(struct audio_hw_device * dev、audio_io_handle_t handle、audio_devices_t devices、audio_output_flags_t flags、struct audio_config * config、struct audio_stream_out ** stream_out、const char * address)
空所(* close_output_stream )(struct audio_hw_device * dev、struct audio_stream_out * stream_out)
int(* open_input_stream )(struct audio_hw_device * dev、audio_io_handle_t handle、audio_devices_t devices、struct audio_config * config、struct audio_stream_in ** stream_in、audio_input_flags_t flags、const char * address、audio_source_t source)
空所(* close_input_stream )(struct audio_hw_device * dev、struct audio_stream_in * stream_in)
int(*ダンプ)(const struct audio_hw_device * dev、int fd)
int(* set_master_mute )(struct audio_hw_device * dev、bool mute)
int(* get_master_mute )(struct audio_hw_device * dev、bool * mute)
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(* release_audio_patch )(struct audio_hw_device * dev、audio_patch_handle_t handle)
int(* get_audio_port )(struct audio_hw_device * dev、struct audio_port * port)
int(* set_audio_port_config )(struct audio_hw_device * dev、const struct audio_port_config * config)

詳細な説明

ファイルaudio.h516行で定義されています。

フィールドドキュメント

void(* close_input_stream)(struct audio_hw_device * dev、struct audio_stream_in * stream_in)

ファイルaudio.h620行で定義されています。

void(* close_output_stream)(struct audio_hw_device * dev、struct audio_stream_out * stream_out)

ファイルaudio.h607行で定義されています。

struct hw_device_t common

オーディオデバイスの一般的な方法。この構造のユーザーは、 hw_device_taudio_hw_deviceを参照していることがわかっているコンテキストで、 hw_device_taudio_hw_deviceポインターにキャストするため、これはaudio_hw_deviceの最初のメンバーである必要があります。

ファイルaudio.h522行で定義されています。

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)

ルーティング制御

ファイルaudio.h648行で定義されています。

int(* dump)(const struct audio_hw_device * dev、int fd)

このメソッドは、オーディオハードウェアの状態をダンプします

ファイルaudio.h624行で定義されています。

int(* get_audio_port)(struct audio_hw_device * dev、struct audio_port * port)

ファイルaudio.h665行で定義されています。

size_t(* get_input_buffer_size)(const struct audio_hw_device * dev、const struct audio_config * config)

ファイルaudio.h588行で定義されています。

int(* get_master_mute)(struct audio_hw_device * dev、bool * mute)

HALがマスターミュート制御をサポートしている場合は、HALの現在のマスターミュートステータスを取得します。 AudioFlingerは、サービスの開始時にプライマリオーディオHALからこの値を照会し、この値を使用してすべてのHALに初期マスターミュートを設定します。このメソッドをサポートしないHALは、NULLに設定されたままになる場合があります。

ファイルaudio.h639行で定義されています。

int(* get_master_volume)(struct audio_hw_device * dev、float * volume)

HALがマスターボリューム制御をサポートしている場合は、HALの現在のマスターボリューム値を取得します。 AudioFlingerは、サービスの開始時にプライマリオーディオHALからこの値を照会し、この値を使用してすべてのHALの初期マスターボリュームを設定します。このメソッドをサポートしないHALは、NULLに設定されたままになる場合があります。

ファイルaudio.h561行で定義されています。

int(* get_mic_mute)(const struct audio_hw_device * dev、bool * state)

ファイルaudio.h572行で定義されています。

char *(* get_parameters)(const struct audio_hw_device * dev、const char * keys)

ファイルaudio.h581行で定義されています。

uint32_t(* get_supported_devices)(const struct audio_hw_device * dev)

audio_hw_device実装でサポートされているデバイスを列挙するためにオーディオフリンガーによって使用されます。

戻り値は、audio_devices_tの1つ以上の値のビットマスクです。

注:AUDIO_DEVICE_API_VERSION_2_0で始まるオーディオHAL実装は、この関数を実装していません。サポートされているすべてのデバイスはaudio_policy.confファイルにリストされている必要があり、オーディオポリシーマネージャーはこのファイルの情報に基づいて適切なオーディオモジュールを選択する必要があります。

ファイルaudio.h536行で定義されています。

int(* init_check)(const struct audio_hw_device * dev)

オーディオハードウェアインターフェイスが初期化されているかどうかを確認してください。成功した場合は0を返し、失敗した場合は-ENODEVを返します。

ファイルaudio.h542行で定義されています。

int(* open_input_stream)(struct audio_hw_device * dev、audio_io_handle_t handle、audio_devices_t devices、struct audio_config * config、struct audio_stream_in ** stream_in、audio_input_flags_t flags、const char * address、audio_source_t source)

このメソッドは、オーディオハードウェア入力ストリームを作成して開きます

ファイルaudio.h611行で定義されています。

int(* open_output_stream)(struct audio_hw_device * dev、audio_io_handle_t handle、audio_devices_t devices、audio_output_flags_t flags、struct audio_config * config、struct audio_stream_out ** stream_out、const char * address)

このメソッドは、オーディオハードウェア出力ストリームを作成して開きます。 「address」パラメータは、必要に応じて「devices」オーディオデバイスタイプを修飾します。フォーマットフォーマットは、デバイスタイプによって異なります。

  • Bluetoothデバイスは、「00:11:22:AA:BB:CC」の形式でデバイスのMACアドレスを使用します
  • USBデバイスは、ALSAカードとデバイス番号を「card = X; device=Y」の形式で使用します
  • 他のデバイスは、数字または他の文字列を使用する場合があります。

ファイルaudio.h599行で定義されています。

int(* release_audio_patch)(struct audio_hw_device * dev、audio_patch_handle_t handle)

ファイルaudio.h656行で定義されています。

int(* set_audio_port_config)(struct audio_hw_device * dev、const struct audio_port_config * config)

ファイルaudio.h669行で定義されています。

int(* set_master_mute)(struct audio_hw_device * dev、bool mute)

すべてのオーディオアクティビティのオーディオミュートステータスを設定します。 0以外の値が返された場合、ソフトウェアミキサーはこの機能をエミュレートします。

ファイルaudio.h630行で定義されています。

int(* set_master_volume)(struct audio_hw_device * dev、float volume)

音声通話以外のすべての音声アクティビティの音量を設定します。 0.0から1.0の範囲。 0以外の値が返された場合、ソフトウェアミキサーはこの機能をエミュレートします。

ファイルaudio.h552行で定義されています。

int(* set_mic_mute)(struct audio_hw_device * dev、bool state)

ファイルaudio.h571行で定義されています。

int(* set_mode)(struct audio_hw_device * dev、audio_mode_t mode)

set_modeは、オーディオモードが変更されたときに呼び出されます。 AUDIO_MODE_NORMALモードは、標準のオーディオ再生用であり、着信音が再生されているときはAUDIO_MODE_RINGTONEであり、通話が進行中のときはAUDIO_MODE_IN_CALLです。

ファイルaudio.h568行で定義されています。

int(* set_parameters)(struct audio_hw_device * dev、const char * kv_pairs)

ファイルaudio.h575行で定義されています。

int(* set_voice_volume)(struct audio_hw_device * dev、float volume)

音声通話の音量を設定します。範囲は0.0〜1.0です

ファイルaudio.h545行で定義されています。


この構造体のドキュメントは、次のファイルから生成されました。
  • ハードウェア/libhardware/ include / hardware / audio.h