Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.audio

PROTOCOLS

Codec

Defined in fuchsia.hardware.audio/audio.fidl

Connect

This method connects a channel in order to serve FIDL over it outside the driver host control.

Request

NameType
channel handle<channel>

Response

NameType
status zx/status

Codec

Defined in fuchsia.hardware.audio/codec.fidl

For an overview see [Audio Codec Interface].

GetDaiFormats

Retrieves the DAI formats supported by the codec, if not available at the time the codec may reply with an error status and the controller may retry at a later time. Retrieving multiple DaiSupportedFormats allows for cases where exclusive combinations of the parameters in DaiSupportedFormats may be supported.

Request

NameType

Response

NameType
result Codec_GetDaiFormats_Result

GetGainFormat

Retrieves gain format.

Request

NameType

Response

NameType
gain_format GainFormat

GetInfo

Retrieves textual information about the codec.

Request

NameType

Response

NameType
info CodecInfo

GetPlugDetectCapabilities

Retrieves Plug Detect Capabilities.

Request

NameType

Response

NameType
plug_detect_capabilities PlugDetectCapabilities

IsBridgeable

Retrieves bridgeable mode from a codec.

Request

NameType

Response

NameType
supports_bridged_mode bool

Reset

Resets the codec. Reset returns when the reset is completed. If the driver can't successfully reset the codec it will close the codec protocol channel, in this case the client may obtain a new codec protocol channel and retry.

Request

NameType

Response

NameType

SetBridgedMode

Sets a codec's bridged mode. Only required if the codec supports bridged mode as specified by IsBridgeable's reply.

Request

NameType
enable_bridged_mode bool

SetDaiFormat

Sets the DAI format to be used in the interface between the controller and codec, if the codec is not able to support the DAI format anymore, e.g. for a removable component then the function may return an error status.

Request

NameType
format DaiFormat

Response

NameType
result Codec_SetDaiFormat_Result

SetGainState

Client update of the gain state.

Request

NameType
target_state GainState

Start

Start/Re-start the codec operation. Start returns when configuring the codec to start is completed but it does not wait for the hardware to actually start playback/capture, i.e. turn_on_delay impact is not taken into account to return from Start. The start_time value (in the CLOCK_MONOTONIC timeline) indicates when when configuring the codec to start is completed. If the driver can't successfully start the codec it will close the codec protocol channel, in this case the client may obtain a new codec protocol channel and retry.

Request

NameType

Response

NameType
start_time zx/time

Stop

Stops the codec operation. Stop returns when stopping the codec is completed. If the driver can't successfully stop the codec it will close the codec protocol channel, in this case the client may obtain a new codec protocol channel and retry.

Request

NameType

Response

NameType

WatchGainState

Get the gain state via a hanging get. The driver will reply to the first WatchGainState sent by the client and this reply must include a gain_db set to 0dB or lower. The driver will not respond to subsequent client WatchGainState calls until the gain state changes from what was most recently reported.

Request

NameType

Response

NameType
gain_state GainState

WatchPlugState

Get the plug detect state via a hanging get. The driver will reply to the first WatchPlugState sent by the client. The driver will not respond to subsequent client WatchPlugState calls until the plug state changes from what was most recently reported.

Request

NameType

Response

NameType
plug_state PlugState

Dai

Defined in fuchsia.hardware.audio/audio.fidl

Connect

This method connects a channel in order to serve FIDL over it outside the driver host control.

Request

NameType
channel handle<channel>

Response

NameType
status zx/status

Dai

Defined in fuchsia.hardware.audio/dai.fidl

For an overview see Digital Audio Interface.

CreateRingBuffer

CreateRingBuffer is sent by clients to select both a DAI format and a ring buffer format based on information that the driver provides in GetDaiFormats and GetRingBufferFormats, what is supported by the client, and any other requirement. The ring_buffer channel is used to control the audio buffer, if a previous ring buffer channel had been established and was still active, the driver must close that (ring buffer) channel and make every attempt to gracefully quiesce any on-going streaming operations in the process.

Request

NameType
dai_format DaiFormat
ring_buffer_format Format
ring_buffer request<RingBuffer>

GetDaiFormats

Retrieves the DAI formats supported by the DAI, if not available at the time the DAI may reply with an error status and the client may retry at a later time. Retrieving multiple DaiSupportedFormats allows for cases where exclusive combinations of the parameters in SupportedFormats may be supported.

Request

NameType

Response

NameType
result Dai_GetDaiFormats_Result

GetProperties

Retrieves top level static properties.

Request

NameType

Response

NameType
properties DaiProperties

GetRingBufferFormats

Retrieves the ring buffer formats supported by the DAI, if not available at the time the DAI may reply with an error status and the client may retry at a later time. Retrieving multiple SupportedFormats allows for cases where exclusive combinations of the parameters in SupportedFormats may be supported.

Request

NameType

Response

NameType
result Dai_GetRingBufferFormats_Result

Reset

Resets the DAI HW. The ring_buffer channel obtained via CreateRingBuffer may be closed by the driver, in this case the client needs to obtain a new ring_buffer. Reset returns when the reset is completed. If the driver can't successfully reset the HW, it will close the DAI protocol channel, in this case the client may obtain a new DAI protocol channel and retry.

Request

NameType

Response

NameType

DaiConnect

Defined in fuchsia.hardware.audio/dai_connect.fidl

For an overview of the DAI protocols see Digital Audio Interface

Connect

This connects to a DAI protocol server.

Request

NameType
dai_protocol request<Dai>

Device

Defined in fuchsia.hardware.audio/audio.fidl

For an overview see Audio Driver Streaming Interface.

GetChannel

This method obtains a channel in order to serve FIDL over it outside the devhost's control.

Request

NameType

Response

NameType
channel StreamConfig

RingBuffer

Defined in fuchsia.hardware.audio/ring_buffer.fidl

For an overview see Audio Driver Streaming Interface

GetProperties

Accessor for top level static properties.

Request

NameType

Response

NameType
properties RingBufferProperties

GetVmo

Requests a shared buffer to be used for moving bulk audio data. Requests the buffer size to fit at least min_frames, and returns the actual num_frames allocated in ring_buffer.

If clock_recovery_notifications_per_ring is non-zero, the driver will send replies to WatchClockRecoveryPositionInfo client requests at most at clock_recovery_notifications_per_ring frequency. These notifications are meant to be used for clock recovery.

Request

NameType
min_frames uint32
clock_recovery_notifications_per_ring uint32

Response

NameType
result RingBuffer_GetVmo_Result

Start

Start the ring buffer. The start_time value (in the CLOCK_MONOTONIC timeline) indicates when position began moving, starting at the beginning of the ring buffer. external_delay impact should not be incorporated into 'start_time'.

Request

NameType

Response

NameType
start_time zx/time

Stop

Stop the ring buffer. Once this call's response is received, no further position notifications will be sent until Start is called again.

Request

NameType

Response

NameType

WatchClockRecoveryPositionInfo

Gets the ring buffer current position via a hanging get. The driver must respond to a client's first WatchClockRecoveryPositionInfo call, but will not respond to subsequent client calls until the position information has changed from what was most recently provided to that client. The driver must not respond to a WatchClockRecoveryPositionInfo until after it has replied to the Start command. If clock_recovery_notifications_per_ring is not zero, the driver will reply with its estimated position to be used for clock recovery at most at clock_recovery_notifications_per_ring frequency. WatchClockRecoveryPositionInfo may only be called after GetVmo was called, hence a clock_recovery_notifications_per_ring was specified. Must be delivered with timestamps that are monotonically increasing.

Request

NameType

Response

NameType
position_info RingBufferPositionInfo

StreamConfig

Defined in fuchsia.hardware.audio/stream.fidl

For an overview see Audio Driver Streaming Interface

CreateRingBuffer

CreateRingBuffer is sent by clients to select a stream format based on information that the driver provides in GetSupportedFormats what is supported by the client, and any other requirement. The ring_buffer channel is used to control the audio buffer, if a previous ring buffer channel had been established and was still active, the driver must close that (ring buffer) channel and make every attempt to gracefully quiesce any on-going streaming operations in the process.

Request

NameType
format Format
ring_buffer request<RingBuffer>

GetProperties

Retrieves top level static properties.

Request

NameType

Response

NameType
properties StreamProperties

GetSupportedFormats

Gets formats supported by a given driver. When not all combinations supported by the driver can be described with one SupportedFormats, the driver returns more than one SupportedFormats in the returned vector. For example, if one SupportedFormats allows for 32 bits samples at 48KHz, and 16 bits samples at 96KHz, but not 32 bits samples at 96KHz, then the driver replies with 2 SupportedFormats: <<32bits>,<48KHz>> and <<16bits>,<96KHz>>. For simplicity, this example ignores parameters other than rate and bits per sample. In the case where the driver supports either 16 or 32 bits samples at either 48 or 96KHz, the driver would reply with 1 SupportedFormats: <<16bits,32bits>,<48KHz,96KHz>>.

Request

NameType

Response

NameType
supported_formats vector<SupportedFormats>[64]

SetGain

Client update of the gain state.

Request

NameType
target_state GainState

WatchGainState

Get the gain state via a hanging get. The driver will reply to the first WatchGainState sent by the client and this reply must include a gain_db set to 0dB or lower. The driver will not respond to subsequent client WatchGainState calls until the gain state changes from what was most recently reported.

Request

NameType

Response

NameType
gain_state GainState

WatchPlugState

Get the plug detect state via a hanging get. The driver will reply to the first WatchPlugState sent by the client. The driver will not respond to subsequent client WatchPlugState calls until the plug state changes from what was most recently reported.

Request

NameType

Response

NameType
plug_state PlugState

STRUCTS

CodecInfo

Defined in fuchsia.hardware.audio/codec.fidl

Textual information about the codec.

NameTypeDescriptionDefault
unique_id string[16]

Unique identifier for the codec.

No default
manufacturer string[256]

Name of the codec manufacturer.

No default
product_name string[256]

Product name of the codec.

No default

Codec_GetDaiFormats_Response

Defined in fuchsia.hardware.audio/codec.fidl

NameTypeDescriptionDefault
formats vector<DaiSupportedFormats>[64] No default

Codec_SetDaiFormat_Response

Defined in fuchsia.hardware.audio/codec.fidl

NameTypeDescriptionDefault
state CodecFormatInfo No default

DaiFormat

Defined in fuchsia.hardware.audio/dai_format.fidl

DAI format. Frames are made up of number_of_channels samples which have bits_per_sample bits of data within bits_per_slot arranged in frame_format. For more detailed information see Digital Audio Interface.

NameTypeDescriptionDefault
number_of_channels uint32

Number of channels.

No default
channels_to_use_bitmask uint64

Which channels to use.

No default
sample_format DaiSampleFormat

The sample format of all samples.

No default
frame_format DaiFrameFormat

The frame format of all samples.

No default
frame_rate uint32

The frame rate for all samples.

No default
bits_per_slot uint8

The bits per slot for all channels.

No default
bits_per_sample uint8

The bits per sample for all samples. Must be smaller than bits per channel for samples to fit.

No default

DaiFrameFormatCustom

Defined in fuchsia.hardware.audio/dai_format.fidl

Custom Frame format.

NameTypeDescriptionDefault
left_justified bool

Justification of the samples within a slot.

No default
sclk_on_raising bool

Clocking of data samples and frame sync output on either raising or falling sclk.

No default
frame_sync_sclks_offset int8

Number of sclks between the beginning of a frame sync change and audio samples. For example, for I2S set to 1 and for stereo left justified set to 0.

No default
frame_sync_size uint8

Number of sclks the frame sync is high within a frame. For example, for I2S with 32 bits slots set to 32, for TDM usually set to 1.

No default

DaiSupportedFormats

Defined in fuchsia.hardware.audio/dai_format.fidl

Formats supported by the DAI. Frames are made up of number_of_channels samples which have bits_per_sample bits of data within bits_per_slot bits arranged in frame_formats. All values listed in each vector are supported. When not all combinations supported by the driver can be described with one DaiSupportedFormats, GetDaiSupportedFormats returns more than one DaiSupportedFormats in the returned vector. For more detailed information see Digital Audio Interface.

NameTypeDescriptionDefault
number_of_channels vector<uint32>[64]

Possible number of channels supported.

No default
sample_formats vector<DaiSampleFormat>[4]

Sample formats supported.

No default
frame_formats vector<DaiFrameFormat>[64]

Frame formats supported.

No default
frame_rates vector<uint32>[64]

Rates supported.

No default
bits_per_slot vector<uint8>[8]

The bits per slot supported.

No default
bits_per_sample vector<uint8>[8]

Bits per sample supported.

No default

Dai_GetDaiFormats_Response

Defined in fuchsia.hardware.audio/dai.fidl

NameTypeDescriptionDefault
dai_formats vector<DaiSupportedFormats>[64] No default

Dai_GetRingBufferFormats_Response

Defined in fuchsia.hardware.audio/dai.fidl

NameTypeDescriptionDefault
ring_buffer_formats vector<SupportedFormats>[64] No default

PcmFormat

Defined in fuchsia.hardware.audio/stream.fidl

Format supporting non-compressed PCM audio. Frames are made up of number_of_channels samples which have valid_bits_per_sample bits of left-justified data within bytes_per_channel. bytes. For more detailed information see Audio Driver Streaming Interface.

NameTypeDescriptionDefault
number_of_channels uint8

Number of channels.

No default
channels_to_use_bitmask uint64

Which channels to use as a bitmask. Channels not set in the bitmask are ignored. The least significant bit corresponds to index 0.

No default
sample_format SampleFormat

The format of all samples.

No default
bytes_per_sample uint8

Bytes allocated to hold a sample, equal or bigger than the valid sample size in valid_bits_per_sample.

No default
valid_bits_per_sample uint8

Number of valid bits in a sample, must be equal or smaller than bits in bytes_per_sample. If smaller, bits are left justified, and any additional bits must be ignored by the receiver.

No default
frame_rate uint32

The frame rate for all samples.

No default

PcmSupportedFormats

Defined in fuchsia.hardware.audio/stream.fidl

Format supporting non-compressed PCM audio. Frames are made up of number_of_channels samples which have valid_bits_per_sample bits of left-justified data within bytes_per_sample bytes. All values listed in each vector are supported. When not all combinations supported by the driver can be described with one SupportedFormats (and hence one PcmSupportedFormats), GetSupportedFormats returns more than one SupportedFormats in the returned vector. For more detailed information see Audio Driver Streaming Interface.

NameTypeDescriptionDefault
number_of_channels vector<uint8>[64]

Vector of possible number of channels supported in ascending order.

No default
sample_formats vector<SampleFormat>[3]

Vector of possible SampleFormats supported.

No default
bytes_per_sample vector<uint8>[8]

Vector of possible number of bits allocated to hold a sample, equal or bigger than the actual sample size in valid_bits_per_sample in ascending order.

No default
valid_bits_per_sample vector<uint8>[8]

Vector of possible number of bits in a sample in ascending order, must be equal or smaller than bytes_per_channel for samples to fit. If smaller, bits are left justified, and any additional bits will be ignored.

No default
frame_rates vector<uint32>[64]

Vector of possible frame rates supported in ascending order.

No default

RingBufferPositionInfo

Defined in fuchsia.hardware.audio/ring_buffer.fidl

NameTypeDescriptionDefault
timestamp zx/time

The driver's best estimate of the time (in the CLOCK_MONOTONIC timeline) at which the playback/capture pointer reached the position indicated by position. external_delay impact should not be incorporated into 'timestamp'. turn_on_delay impact should not be incorporated into 'timestamp'.

No default
position uint32

The playback/capture pointer position (in bytes) in the ring buffer at time timestamp as estimated by the driver.

No default

RingBuffer_GetVmo_Response resource

Defined in fuchsia.hardware.audio/ring_buffer.fidl

NameTypeDescriptionDefault
num_frames uint32 No default
ring_buffer handle<vmo> No default

ENUMS

DaiFrameFormatStandard strict

Type: uint8

Defined in fuchsia.hardware.audio/dai_format.fidl

Standard Frame format.

NameValueDescription
NONE 1

No frame format as in samples without a frame sync like PDM.

I2S 2

Format as specified in the I2S specification (left justified, 2 channels, 32 bits per channel, frame sync stays low for the left channel and high for the right channel, data starts one clock cycle after frame sync changes clocked out at the falling edge of sclk).

STEREO_LEFT 3

Left justified, 2 channels. Data starts at frame sync changes from low to high clocked out at the falling edge of sclk. The frame sync must stay high for bits_per_channel bits for the first channel and low for bits_per_channel bits for the second channel.

STEREO_RIGHT 4

Right justified, 2 channels. The frame sync must stay high for bits_per_channel bits for the first channel and low for bits_per_channel bits for the second channel.

TDM1 5

Left justified, variable number of channels, data starts at frame sync changes from low to high clocked out at the rising edge of sclk. The frame sync must stay high for exactly 1 clock cycle.

DaiSampleFormat strict

Type: uint8

Defined in fuchsia.hardware.audio/dai_format.fidl

NameValueDescription
PDM 1

Pulse Density Modulation samples.

PCM_SIGNED 2

Signed Linear Pulse Code Modulation samples at the host endianness.

PCM_UNSIGNED 3

Unsigned Linear Pulse Code Modulation samples at the host endianness.

PCM_FLOAT 4

Floating point samples IEEE-754 encoded.

GainType strict

Type: uint8

Defined in fuchsia.hardware.audio/codec.fidl

Gain type of representation.

NameValueDescription
DECIBELS 1

Gain specified in dB, for example -103.0dB or +3.2dB.

PERCENT 2

Gain specified as a percentage, for example 10.0% or 80.5%.

GetVmoError strict

Type: uint32

Defined in fuchsia.hardware.audio/ring_buffer.fidl

NameValueDescription
INVALID_ARGS 1

The ring buffer setup failed due to an invalid argument, e.g. min_frames is too big.

INTERNAL_ERROR 2

The ring buffer setup failed due to an internal error.

PlugDetectCapabilities strict

Type: uint32

Defined in fuchsia.hardware.audio/stream.fidl

NameValueDescription
HARDWIRED 0

Stream is hardwired (will always be plugged in).

CAN_ASYNC_NOTIFY 1

Stream is able to asynchronously notify of plug state changes.

SampleFormat strict

Type: uint8

Defined in fuchsia.hardware.audio/stream.fidl

NameValueDescription
PCM_SIGNED 1

Signed Linear Pulse Code Modulation samples at the host endianness.

PCM_UNSIGNED 2

Unsigned Linear Pulse Code Modulation samples at the host endianness.

PCM_FLOAT 3

Floating point samples IEEE-754 encoded.

TABLES

CodecFormatInfo

Defined in fuchsia.hardware.audio/codec.fidl

Codec format information.

OrdinalNameTypeDescription
1 external_delay zx/duration

The driver's best estimate of the external delay (in nanoseconds) present in the pipeline for the chosen format. When precisely synchronizing presentation across multiple entities (e.g. devices), the external delay should be taken into account. Optional.

2 turn_on_delay zx/duration

The driver's best estimate of the amount of time (in nanoseconds) it takes the hardware to actually start playback/capture after a Start command is issued. It may take some time for the hardware to get into fully operational mode, for example due a power state change. This delay must be taken into account if not getting the initial audio samples played or captured is not acceptable. Optional.

DaiProperties

Defined in fuchsia.hardware.audio/dai.fidl

OrdinalNameTypeDescription
1 is_input bool

Dai type is input or output. Required.

2 manufacturer string[256]

Name of the DAI interface provider manufacturer.

3 product_name string[256]

Product name of the DAI interface provider.

Format

Defined in fuchsia.hardware.audio/stream.fidl

OrdinalNameTypeDescription
1 pcm_format PcmFormat

Format supporting non-compressed PCM samples.

GainFormat

Defined in fuchsia.hardware.audio/codec.fidl

Gain format/parameters.

OrdinalNameTypeDescription
1 type GainType

Specifies what the numbers for gain represent, e.g. a percentage.

2 min_gain float32

Minimum gain. Must be included.

3 max_gain float32

Maximum gain. Must be included.

4 gain_step float32

Gain step in decibels, this value must not be negative, but may be zero to convey an effectively continuous range of values. Must not exceed max_gain_db - min_gain_db. Must be included.

5 can_mute bool

Gain mute capability. If not included, mute is not supported.

6 can_agc bool

Automatic Gain Control (AGC) capability. If not included, AGC is not supported.

GainState

Defined in fuchsia.hardware.audio/stream.fidl

Gain state requested by the client or returned by the driver.

OrdinalNameTypeDescription
1 muted bool

Current mute state. If not included, the state is unmuted.

2 agc_enabled bool

Current Automatic Gain Control (AGC) state. If not included, AGC is disabled.

3 gain_db float32

Current gain in decibels. Must be included.

PlugState

Defined in fuchsia.hardware.audio/stream.fidl

Plug state as returned by the driver.

OrdinalNameTypeDescription
1 plugged bool

Stream is currently plugged in. Must be included.

2 plug_state_time zx/time

Timestamps the information provided in the rest of the fields of this struct. Must be included.

RingBufferProperties

Defined in fuchsia.hardware.audio/ring_buffer.fidl

Properties of the ring buffer. These values don't change once the ring buffer is created.

OrdinalNameTypeDescription
1 external_delay zx/duration

The driver's best estimate of the external delay present in the presentation pipeline for the chosen format. When precisely synchronizing presentation across multiple entities (e.g. devices), the external delay should be taken into account.

2 fifo_depth uint32

Size (in bytes) representing a temporary buffer used by the driver in order to consume or generate the ring buffer contents. The ring buffer contents must be produced and consumed at the rate specified with the CreateRingBuffer command, however some amount of buffering is required when the data is written into and read from the ring buffer. For playback the data is consumed by the driver by reading ahead up to fifo_depth bytes. For capture the data is produced by the driver holding up to fifo_depth bytes at the time before committing it to main system memory. Hence fifo_depth must be taken into account by the client when determining either the minimum lead time requirement (for playback) or the maximum capture delay (for capture).

To convert fifo_depth to the corresponding number of audio frames, use the frame size returned by CreateRingBuffer in the StreamConfig protocol, note that the fifo_depth is not necessarily a multiple size of an audio frame.

The ring buffer data may be directly consumed/generated by hardware, in this case fifo_depth maps directly to the size of a hardware FIFO block, since the hardware FIFO block determines the amount of data read ahead or held back.

The ring buffer data may instead be consumed/generated by audio driver software that is conceptually situated between the ring buffer and the audio hardware. In this case, for playback the fifo_depth read ahead amount is set large enough such that the driver guarantees no undetected underruns, this assuming the client is generating the data as determined by the CreateRingBuffer and Start commands. For capture, the fifo_depth held back amount is set large enough such that the driver guarantees no undetected underruns when generating the data as determined by the CreateRingBuffer and Start commands. The driver must set fifo_depth big enough such that the potential delays added by any software interfacing with the audio hardware do not occur under most scenarios, and must detect and report underruns. How an underrun is reported is not defined in this API.

3 needs_cache_flush_or_invalidate bool

When set to true, indicates that clients need to make sure that their data has been flushed all the way to physical memory (in the case of playback) or that their view of the ring buffer will need to be invalidated before read (in the case of capture).

4 turn_on_delay zx/duration

The driver's best estimate of the amount of time it takes the hardware to actually start playback/capture after a Start command is completed as defined by the returned start_time. It may take some time for the hardware to get into fully operational mode, for example due a power state change or communication delays within the driver's multiple hardware entities as in a Bluetooth driver. This delay must be taken into account if not getting the initial audio samples played or captured is not acceptable. If not included, turn_on_delay is considered 0.

StreamProperties

Defined in fuchsia.hardware.audio/stream.fidl

OrdinalNameTypeDescription
1 unique_id uint8[16]

A unique identifier. If not included, there is no unique id for the StreamConfig.

2 is_input bool

Stream type is input or output. Must be included.

3 can_mute bool

Gain mute capability. If not included, the StreamConfig can't mute.

4 can_agc bool

Automatic Gain Control (AGC) capability. If not included, the StreamConfig can't AGC.

5 min_gain_db float32

Minimum gain in decibels. Must be included.

6 max_gain_db float32

Maximum gain in decibels. Must be included.

7 gain_step_db float32

Gain step in decibels, this value must not be negative, but may be zero to convey an effectively continuous range of values. Must not exceed max_gain_db - min_gain_db. Must be included.

8 plug_detect_capabilities PlugDetectCapabilities

Plug Detect Capabilities. Must be included.

9 manufacturer string[256]

UI string for the manufacturer name. If not included, the manufacturer is unspecified.

10 product string[256]

UI string for the product name. If not included, the product name is unspecified.

11 clock_domain clock_domain

An identifier for the clock domain in which this hardware operates. If the hardware is operating in CLOCK_DOMAIN_MONOTONIC, its nominal rate is locked to that of the ZX_CLOCK_MONOTONIC time reference. Given the start time, and a nominal rate, the position of the playback/capture pointer may always be calculated using a clock monotonic timestamp as the pointer's movement is locked to that of ZX_CLOCK_MONOTONIC.

Other values indicate that playback/capture is not locked to ZX_CLOCK_MONOTONIC, and moves at its own rate depending on a number of factors. Client will need to make use of the timing information present in the position notification updates in order to recover the clock of the audio stream. The clock_domain comes from an system wide entity (or instance a platform bus or clock tree/global driver). Audio drivers retrieve clock_domain from such system wide entity. Must be included.

SupportedFormats

Defined in fuchsia.hardware.audio/stream.fidl

OrdinalNameTypeDescription
1 pcm_supported_formats PcmSupportedFormats

Supported formats for non-compressed PCM samples.

UNIONS

Codec_GetDaiFormats_Result strict

Defined in fuchsia.hardware.audio/codec.fidl

NameTypeDescription
response Codec_GetDaiFormats_Response
err zx/status

Codec_SetDaiFormat_Result strict

Defined in fuchsia.hardware.audio/codec.fidl

NameTypeDescription
response Codec_SetDaiFormat_Response
err zx/status

DaiFrameFormat strict

Defined in fuchsia.hardware.audio/dai_format.fidl

Either a standard or custom frame format.

NameTypeDescription
frame_format_standard DaiFrameFormatStandard

The format type of all samples in the DAI, listed in DaiFrameFormatStandard.

frame_format_custom DaiFrameFormatCustom

The format type of all samples in the DAI, specified in DaiFrameFormatCustom.

Dai_GetDaiFormats_Result strict

Defined in fuchsia.hardware.audio/dai.fidl

NameTypeDescription
response Dai_GetDaiFormats_Response
err zx/status

Dai_GetRingBufferFormats_Result strict

Defined in fuchsia.hardware.audio/dai.fidl

NameTypeDescription
response Dai_GetRingBufferFormats_Response
err zx/status

RingBuffer_GetVmo_Result strict resource

Defined in fuchsia.hardware.audio/ring_buffer.fidl

NameTypeDescription
response RingBuffer_GetVmo_Response
err GetVmoError

CONSTANTS

NameValueTypeDescription
CLOCK_DOMAIN_EXTERNAL 4294967295 uint32
CLOCK_DOMAIN_MONOTONIC 0 uint32
MAX_COUNT_CHANNELS_TO_USE 64 uint32
MAX_COUNT_DAI_FORMATS 64 uint32
MAX_COUNT_DAI_SUPPORTED_BITS_PER_SAMPLE 8 uint32
MAX_COUNT_DAI_SUPPORTED_BITS_PER_SLOT 8 uint32
MAX_COUNT_DAI_SUPPORTED_FRAME_FORMATS 64 uint32
MAX_COUNT_DAI_SUPPORTED_NUMBER_OF_CHANNELS 64 uint32
MAX_COUNT_DAI_SUPPORTED_RATES 64 uint32
MAX_COUNT_DAI_SUPPORTED_SAMPLE_FORMATS 4 uint32
MAX_COUNT_FORMATS 64 uint32
MAX_COUNT_SUPPORTED_BYTES_PER_SAMPLE 8 uint32
MAX_COUNT_SUPPORTED_NUMBER_OF_CHANNELS 64 uint32
MAX_COUNT_SUPPORTED_RATES 64 uint32
MAX_COUNT_SUPPORTED_SAMPLE_FORMATS 3 uint32
MAX_COUNT_SUPPORTED_VALID_BITS_PER_SAMPLE 8 uint32
MAX_DAI_UI_STRING_SIZE 256 uint32
MAX_UI_STRING_SIZE 256 uint32
UNIQUE_ID_SIZE 16 uint32

TYPE ALIASES

NameValueDescription
clock_domain uint32