fuchsia.audio.controller

This library contains protocols used by the ffx audio tool.

Added: HEAD

PROTOCOLS

DeviceControl

Defined in fuchsia.audio.controller/device.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

Player

Defined in fuchsia.audio.controller/play.fidl

Play

Read audio data from a socket in WAV format and play it to a destination.

Returns 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 a Recorder.Record request.

Cancel

Stop recording and writing data on the output socket.

Request

<EMPTY>

Response

NameType
payload RecordCanceler_Cancel_Result

Recorder

Defined in fuchsia.audio.controller/record.fidl

Record

Record audio data and write it to a socket in WAV format.

Request

NameType
payload RecorderRecordRequest

Response

NameType
payload Recorder_Record_Result

STRUCTS

Devfs

Defined in fuchsia.audio.controller/device.fidl

FieldTypeDescriptionDefault
name fuchsia.io/Name

Name of this device's devfs node, e.g. 3d99d780.

No default
device_type fuchsia.audio.device/DeviceType

Device type.

No default

DeviceControl_DeviceSetGainState_Response

Defined in fuchsia.audio.controller/device.fidl

<EMPTY>

DeviceRingBuffer

Defined in fuchsia.audio.controller/device.fidl

Identifies a device ring buffer for playing/recording.

FieldTypeDescriptionDefault
selector DeviceSelector

The device that has a ring buffer.

No default
ring_buffer_element_id fuchsia.hardware.audio.signalprocessing/ElementId

The ID of an ENDPOINT (with type RING_BUFFER) signal processing element of the desired ring buffer.

For Dai and StreamConfig devices, this should be fuchsia.audio.device.DEFAULT_RING_BUFFER_ELEMENT_ID.

No default

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.

4

Necessary arguments missing on request.

5

Unsupported arguments on request.

6

Could not find a device matching client request parameters.

7

Could not connect to device at specified location.

TABLES

CustomClockConfig

Defined in fuchsia.audio.controller/settings.fidl

OrdinalFieldTypeDescription
rate_adjust int32

Frequency rate adjustment to a clone of the system monotonic clock, 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.

Optional. If not specified, the reference clock's default rate is used.

offset int32

Starting delta between the reference clock passed to AudioRenderer or Capturer and the system monotonic clock.

Optional. If not specified, the reference clock offset is unchanged.

DeviceControlDeviceSetGainStateRequest resource

Defined in fuchsia.audio.controller/device.fidl

OrdinalFieldTypeDescription
device DeviceSelector

Id of the device to set the gain state.

Required.

gain_state fuchsia.hardware.audio/GainState

Desired gain state.

Required.

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 in WAV format.

The client should transmit an entire file, then close the socket.

Required.

destination PlayDestination

The destination to which to play the audio.

Required.

gain_settings GainSettings

Play settings.

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

active_channels_bitmask uint64

Channels to enable during playback.

Optional. If not specified, the active-channels configuration is not changed.

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

The source from which to record the audio.

Required.

stream_type fuchsia.media/AudioStreamType

The stream format in which to record the audio.

Required.

duration zx/Duration

Duration in nanoseconds to record audio data.

If not specified, Recorder will record and write data to the socket until it receives a stop signal on canceler.

If present, the record request is still cancelable via canceler.

Optional.

canceler server_end:RecordCanceler

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

Required.

gain_settings GainSettings

Record gain settings.

Only used for the capturer and loopback sources.

Optional.

buffer_size uint64

Buffer size.

Optional. If not specified, defaults to a size that is enough to hold one second of audio data.

wav_data handle<socket>

Sink for audio data.

The captured data here will be written here as a complete WAV file.

Required.

Recorder_Record_Response resource

Defined in fuchsia.audio.controller/record.fidl

OrdinalFieldTypeDescription
bytes_processed uint64

Total number of bytes read from the source.

packets_processed uint64

If applicable, number of packets read from an AudioCapturer.

late_wakeups uint64

If applicable, number of times the capturer woke up too late to read valid data from the device.

If this is non-zero, some data was lost and replaced with silence.

StandardCapturerConfig

Defined in fuchsia.audio.controller/record.fidl

OrdinalFieldTypeDescription
usage fuchsia.media/AudioCaptureUsage

The usage of the audio stream.

Required.

clock ClockType

The reference clock type used by the stream.

Optional. If not specified, the default reference clock provided by the capturer is used.

StandardRendererConfig

Defined in fuchsia.audio.controller/play.fidl

OrdinalFieldTypeDescription
usage fuchsia.media/AudioRenderUsage

The usage of the audio stream.

Required.

clock ClockType

The reference clock type used by the stream.

Optional. If not specified, the default reference clock provided by the renderer is used.

packet_count uint32

How many packets to use when sending data to the AudioRenderer.

Optional. If not specified, defaults to four packets.

UltrasoundRendererConfig

Defined in fuchsia.audio.controller/play.fidl

OrdinalFieldTypeDescription
packet_count uint32

How many packets to use when sending data to the AudioRenderer.

Optional. If not specified, defaults to four packets.

UNIONS

CapturerConfig flexible

Defined in fuchsia.audio.controller/record.fidl

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/device.fidl

OrdinalVariantTypeDescription
response DeviceControl_DeviceSetGainState_Response
err zx/Status
framework_err internal

DeviceSelector flexible

Defined in fuchsia.audio.controller/device.fidl

Identifies an audio device.

OrdinalVariantTypeDescription
devfs Devfs

Driver node in devfs, e.g. /dev/class/audio-input/3d99d780.

registry fuchsia.audio.device/TokenId

A device available through the fuchsia.audio.device/Registry protocol.

PlayDestination flexible

Defined in fuchsia.audio.controller/play.fidl

OrdinalVariantTypeDescription
renderer RendererConfig

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

device_ring_buffer DeviceRingBuffer

A device ring buffer.

Player_Play_Result strict resource

Defined in fuchsia.audio.controller/play.fidl

OrdinalVariantTypeDescription
response Player_Play_Response
err Error
framework_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

OrdinalVariantTypeDescription
capturer CapturerConfig

An audio_core AudioCapturer protocol connection.

loopback Loopback

An audio_core AudioCapturer protocol connection with loopback enabled.

device_ring_buffer DeviceRingBuffer

A device ring buffer.

Recorder_Record_Result strict resource

Defined in fuchsia.audio.controller/record.fidl

OrdinalVariantTypeDescription
response Recorder_Record_Response
err Error
framework_err internal

RendererConfig flexible

Defined in fuchsia.audio.controller/play.fidl

OrdinalVariantTypeDescription
standard_renderer StandardRendererConfig

Renderer for standard frequencies.

ultrasound_renderer UltrasoundRendererConfig

Renderer for ultrasonic frequencies.