fuchsia.audio.controller

This library contains protocols used by the ffx audio tool only.

Added: HEAD

PROTOCOLS

DeviceControl

Defined in fuchsia.audio.controller/audio_proxy.fidl

Enumerate, query, and control audio devices from clients.

DeviceSetGainState

Sets the gain of the stream in decibels.

Request

NameType
payload DeviceControlDeviceSetGainStateRequest

Response

NameType
payload DeviceControl_DeviceSetGainState_Result

GetDeviceInfo

Returns details about a specific audio device.

Request

NameType
payload DeviceControlGetDeviceInfoRequest

Response

NameType
payload DeviceControl_GetDeviceInfo_Result

ListDevices

Lists all available audio devices on target.

Request

<EMPTY>

Response

NameType
payload DeviceControl_ListDevices_Result

Player

Defined in fuchsia.audio.controller/play.fidl

Play

Plays audio data from socket on either an AudioRenderer or on device ring buffer. Return when all bytes have been read from the socket.

Request

NameType
payload PlayerPlayRequest

Response

NameType
payload Player_Play_Result

RecordCanceler

Defined in fuchsia.audio.controller/record.fidl

Cancels an RecordRequest.

Cancel

Finish sending audio data back to the client.

Request

<EMPTY>

Response

NameType
payload RecordCanceler_Cancel_Result

Recorder

Defined in fuchsia.audio.controller/record.fidl

Record

Records audio data from either an AudioCapturer or device ring buffer. Returns sockets containing audio data and errors back to host.

Request

NameType
payload RecorderRecordRequest

Response

NameType
payload Recorder_Record_Result

STRUCTS

DeviceControl_DeviceSetGainState_Response

Defined in fuchsia.audio.controller/audio_proxy.fidl

<EMPTY>

Flexible

Defined in fuchsia.audio.controller/settings.fidl

<EMPTY>

Loopback

Defined in fuchsia.audio.controller/record.fidl

<EMPTY>

RecordCanceler_Cancel_Response

Defined in fuchsia.audio.controller/record.fidl

<EMPTY>

SystemMonotonic

Defined in fuchsia.audio.controller/settings.fidl

<EMPTY>

UltrasoundCapturer

Defined in fuchsia.audio.controller/record.fidl

<EMPTY>

ENUMS

Error flexible

Type: uint32

Defined in fuchsia.audio.controller/types.fidl

Error Codes for fuchsia.audio.controller methods.

NameValueDescription
1

The operation is not implemented, supported, or enabled.

2

Some other problem occurred that cannot be classified using one of the more specific statuses. Future requests to this method will also fail.

3

Some other problem occurred, but there is reason to believe this operation may succeed in the future. Client can retry this request.

TABLES

CustomClockConfig

Defined in fuchsia.audio.controller/settings.fidl

Configuration for the custom reference clock passed to an AudioRenderer or AudioCapturer.

OrdinalFieldTypeDescription
rate_adjust int32

Frequency rate adjustment to a clone of the system monotonic clock. Given in parts per million relative to the system monotonic rate. Must fall within [ZX_CLOCK_UPDATE_MIN_RATE_ADJUST, ZX_CLOCK_UPDATE_MAX_RATE_ADJUST]. For more info, see zx_clock_update. If not specified, use the reference clock's default rate.

Optional.

offset int32

Starting delta between the reference clock passed to AudioRenderer or Capturer and the system monotonic clock. If not specified, do not adjust reference clock offset.

Optional.

DeviceControlDeviceSetGainStateRequest resource

Defined in fuchsia.audio.controller/audio_proxy.fidl

OrdinalFieldTypeDescription
device DeviceSelector

Id of the device to set the gain state.

Required.

gain_state fuchsia.hardware.audio/GainState

Desired gain state.

Required.

DeviceControlGetDeviceInfoRequest resource

Defined in fuchsia.audio.controller/audio_proxy.fidl

OrdinalFieldTypeDescription
device DeviceSelector

Id of device to retrieve information about, and whether it is an input or output device.

Required.

DeviceControl_GetDeviceInfo_Response resource

Defined in fuchsia.audio.controller/audio_proxy.fidl

OrdinalFieldTypeDescription
device_info DeviceInfo

Information about the device.

Required.

DeviceControl_ListDevices_Response resource

Defined in fuchsia.audio.controller/audio_proxy.fidl

OrdinalFieldTypeDescription
devices vector<DeviceSelector>[256]

List of available devices, sorted by name.

Required.

DeviceSelector

Defined in fuchsia.audio.controller/audio_proxy.fidl

Identifies which device to retrieve information about.

OrdinalFieldTypeDescription
is_input bool

Whether device is input or output.

Required. Future device types may not require this field.

id fuchsia.io/Path

ID of device.

Required.

device_type fuchsia.hardware.audio/DeviceType

Device type. If not specified, defaults to StreamConfig.

GainSettings

Defined in fuchsia.audio.controller/settings.fidl

Gain settings.

OrdinalFieldTypeDescription
mute bool

Whether to mute the audio stream. If unspecified, do not adjust the existing mute value.

Optional.

gain float32

Gain level in dB. If unspecified, do not adjust stream or device gain.

Optional.

PlayerPlayRequest resource

Defined in fuchsia.audio.controller/play.fidl

OrdinalFieldTypeDescription
wav_source handle<socket>

Socket for the client to send audio data. Should transmit entire file in WAV format.

Required.

destination PlayDestination

Play on device ring buffer or AudioRenderer.

Required.

gain_settings GainSettings

Play settings.

Optional. If not specified, use unity gain unmuted, and no other gain processing enabled.

Player_Play_Response resource

Defined in fuchsia.audio.controller/play.fidl

OrdinalFieldTypeDescription
bytes_processed uint64

Total number of bytes sent to destination.

RecorderRecordRequest resource

Defined in fuchsia.audio.controller/record.fidl

OrdinalFieldTypeDescription
source RecordSource

Record from AudioCapturer or ring buffer.

Required.

stream_type fuchsia.media/AudioStreamType

Streamtype.

Required.

duration zx/Duration

Duration in nanoseconds to record audio data. If not specified, daemon will send data back to ffx client until it receives a stop signal following a keypress. If present, the record request is still cancelable via handle below.

Optional.

canceler server_end<RecordCanceler>

Handle to signal when to stop sending data back to ffx client.

Required.

gain_settings GainSettings

Record gain settings. If not specified, AudioCapturer's defaults will apply.

Optional.

buffer_size uint64

Buffer size. If not specified, allocate enough to hold one second of audio data.

Optional.

Recorder_Record_Response resource

Defined in fuchsia.audio.controller/record.fidl

OrdinalFieldTypeDescription
wav_data handle<socket>

Contains audio data in the form of a complete WAV file.

Required.

stderr handle<socket>

Errors from daemon component for ffx plugin to display.

Required.

StandardCapturerConfig

Defined in fuchsia.audio.controller/record.fidl

Configuration parameters for creating an AudioCapturer for the standard frequency range.

OrdinalFieldTypeDescription
usage fuchsia.media/AudioCaptureUsage

The usage of the audio stream.

Required.

clock ClockType

The reference clock type used by the stream. If unspecified, use the default reference clock provided by the capturer.

Optional.

StandardRendererConfig

Defined in fuchsia.audio.controller/play.fidl

Configuration parameters for creating an AudioRenderer for the standard frequency range.

OrdinalFieldTypeDescription
usage fuchsia.media/AudioRenderUsage

The usage of the audio stream.

Required.

clock ClockType

The reference clock type used by the stream. If unspecified, use the default reference clock provided by the renderer.

Optional.

packet_count uint32

How many packets to use when sending data to an AudioRenderer. Optional. If not specified, AudioDaemon will use four packets.

StreamConfigDeviceInfo

Defined in fuchsia.audio.controller/audio_proxy.fidl

Information about a device that supports the fuchsia.hardware.audio/StreamConfig protocol.

OrdinalFieldTypeDescription
stream_properties fuchsia.hardware.audio/StreamProperties

Top level static properties of the stream.

Required.

supported_formats vector<fuchsia.hardware.audio/SupportedFormats>[64]

Supported formats.

Required.

gain_state fuchsia.hardware.audio/GainState

Gain state.

Required.

plug_state fuchsia.hardware.audio/PlugState

Plug state.

Required.

UltrasoundRendererConfig

Defined in fuchsia.audio.controller/play.fidl

Configuration parameters for creating an AudioRenderer for the standard frequency range.

OrdinalFieldTypeDescription
packet_count uint32

How many packets to use when sending data to an AudioRenderer. Optional. If not specified, AudioDaemon will use four packets.

UNIONS

CapturerConfig flexible

Defined in fuchsia.audio.controller/record.fidl

Selection of the frequency range than an AudioCapturer can read.

OrdinalVariantTypeDescription
standard_capturer StandardCapturerConfig

AudioCapturer for standard frequencies.

ultrasound_capturer UltrasoundCapturer

AudioCapturer for ultrasonic frequencies.

ClockType flexible

Defined in fuchsia.audio.controller/settings.fidl

Reference clock options for an AudioRenderer or AudioCapturer.

OrdinalVariantTypeDescription
flexible Flexible

Use a flexible clock.

system_monotonic SystemMonotonic

Use the system monotonic clock.

custom CustomClockConfig

Use a monotonic clock with possible rate adjustment and offset relative to the system monotonic clock.

DeviceControl_DeviceSetGainState_Result strict

Defined in fuchsia.audio.controller/audio_proxy.fidl

OrdinalVariantTypeDescription
response DeviceControl_DeviceSetGainState_Response
err zx/Status
transport_err internal

DeviceControl_GetDeviceInfo_Result strict resource

Defined in fuchsia.audio.controller/audio_proxy.fidl

OrdinalVariantTypeDescription
response DeviceControl_GetDeviceInfo_Response
err zx/Status
transport_err internal

DeviceControl_ListDevices_Result strict resource

Defined in fuchsia.audio.controller/audio_proxy.fidl

OrdinalVariantTypeDescription
response DeviceControl_ListDevices_Response
err zx/Status
transport_err internal

DeviceInfo flexible

Defined in fuchsia.audio.controller/audio_proxy.fidl

Information about a device.

OrdinalVariantTypeDescription
stream_config StreamConfigDeviceInfo

Device supports the fuchsia.hardware.audio/StreamConfig protocol.

PlayDestination flexible

Defined in fuchsia.audio.controller/play.fidl

Where to output audio data supplied by an ffx client.

OrdinalVariantTypeDescription
renderer RendererConfig

Create an AudioRenderer using the audio_core API and play audio through it.

device_ring_buffer DeviceSelector

Write audio data directly to a device ring buffer.

Player_Play_Result strict resource

Defined in fuchsia.audio.controller/play.fidl

OrdinalVariantTypeDescription
response Player_Play_Response
err Error
transport_err internal

RecordCanceler_Cancel_Result strict

Defined in fuchsia.audio.controller/record.fidl

OrdinalVariantTypeDescription
response RecordCanceler_Cancel_Response
err zx/Status

RecordSource flexible

Defined in fuchsia.audio.controller/record.fidl

Where to read audio data from to send back to an ffx client.

OrdinalVariantTypeDescription
capturer CapturerConfig

Create an audio_core AudioCapturer and record audio data from it.

loopback Loopback

Create an audio_core AudioCapturer with loopback and record audio data from it.

device_ring_buffer DeviceSelector

Raad audio data directly from a device ring buffer.

Recorder_Record_Result strict resource

Defined in fuchsia.audio.controller/record.fidl

OrdinalVariantTypeDescription
response Recorder_Record_Response
err zx/Status
transport_err internal

RendererConfig flexible

Defined in fuchsia.audio.controller/play.fidl

Selection of the frequency range than an AudioRenderer can write.

OrdinalVariantTypeDescription
standard_renderer StandardRendererConfig

Renderer for standard frequencies.

ultrasound_renderer UltrasoundRendererConfig

Renderer for ultrasonic frequencies.

CONSTANTS

NameValueTypeDescription
MAX_COUNT_DEVICES 256 uint32

Maximum number of audio devices in the system at any time.