blob: 58d65405893a7f1bc6e5f6ea5fe7c544e547bc7a [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.hardware.audio
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## Codec {#Codec}
*Defined in [fuchsia.hardware.audio/codec.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec.fidl;l=115)*
<p>For an overview see
<a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_codec">[Audio Codec Interface]</a>.</p>
### GetDaiFormats {#Codec.GetDaiFormats}
<p>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.</p>
#### Request {#Codec.GetDaiFormats_Request}
&lt;EMPTY&gt;
#### Response {#Codec.GetDaiFormats_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Codec_GetDaiFormats_Result'>Codec_GetDaiFormats_Result</a></code>
</td>
</tr>
</table>
### GetHealthState {#Codec.GetHealthState}
<p>Retrieves top level health state.
A driver not responding promptly can be used as an indication of an unhealthy driver.</p>
#### Request {#Codec.GetHealthState_Request}
&lt;EMPTY&gt;
#### Response {#Codec.GetHealthState_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>state</code></td>
<td>
<code><a class='link' href='#HealthState'>HealthState</a></code>
</td>
</tr>
</table>
### GetInfo {#Codec.GetInfo}
<p>Retrieves textual information about the codec.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Deprecated: 11</span></div>
#### Request {#Codec.GetInfo_Request}
&lt;EMPTY&gt;
#### Response {#Codec.GetInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>info</code></td>
<td>
<code><a class='link' href='#CodecInfo'>CodecInfo</a></code>
</td>
</tr>
</table>
### GetPlugDetectCapabilities {#Codec.GetPlugDetectCapabilities}
<p>Retrieves Plug Detect Capabilities.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Deprecated: 11</span></div>
#### Request {#Codec.GetPlugDetectCapabilities_Request}
&lt;EMPTY&gt;
#### Response {#Codec.GetPlugDetectCapabilities_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>plug_detect_capabilities</code></td>
<td>
<code><a class='link' href='#PlugDetectCapabilities'>PlugDetectCapabilities</a></code>
</td>
</tr>
</table>
### GetProperties {#Codec.GetProperties}
<p>Retrieves top level static properties.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
#### Request {#Codec.GetProperties_Request}
&lt;EMPTY&gt;
#### Response {#Codec.GetProperties_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>properties</code></td>
<td>
<code><a class='link' href='#CodecProperties'>CodecProperties</a></code>
</td>
</tr>
</table>
### IsBridgeable {#Codec.IsBridgeable}
<p>Returns whether a codec is bridgeable.</p>
#### Request {#Codec.IsBridgeable_Request}
&lt;EMPTY&gt;
#### Response {#Codec.IsBridgeable_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>supports_bridged_mode</code></td>
<td>
<code>bool</code>
</td>
</tr>
</table>
### Reset {#Codec.Reset}
<p>Resets the codec.
<code>Reset</code> 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.</p>
#### Request {#Codec.Reset_Request}
&lt;EMPTY&gt;
#### Response {#Codec.Reset_Response}
&lt;EMPTY&gt;
### SetBridgedMode {#Codec.SetBridgedMode}
<p>Sets a codec's bridged mode. Only required if the codec supports bridged mode as specified
by IsBridgeable's reply.</p>
#### Request {#Codec.SetBridgedMode_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>enable_bridged_mode</code></td>
<td>
<code>bool</code>
</td>
</tr>
</table>
### SetDaiFormat {#Codec.SetDaiFormat}
<p>Sets the DAI format to be used in the interface between the controller and codec.
Returns an error if not supported at the time of the request (e.g. for removable hardware).</p>
#### Request {#Codec.SetDaiFormat_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>format</code></td>
<td>
<code><a class='link' href='#DaiFormat'>DaiFormat</a></code>
</td>
</tr>
</table>
#### Response {#Codec.SetDaiFormat_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Codec_SetDaiFormat_Result'>Codec_SetDaiFormat_Result</a></code>
</td>
</tr>
</table>
### SignalProcessingConnect {#Codec.SignalProcessingConnect}
<p>Connect to a <code>SignalProcessing</code> protocol.
Multiple connections may be supported, if a new connection request is not supported, i.e.
the maximum number of connections have already been created, for instance one, then the
<code>protocol</code> channel (not the channel upon which <code>SignalProcessingConnect</code> is being called)
will be closed with an ZX_ERR_ALREADY_BOUND epitaph.
If signal processing is not supported at all, then the <code>protocol</code> channel (again, not the
channel upon which <code>SignalProcessingConnect</code> is being called) will be closed with a
ZX_ERR_NOT_SUPPORTED epitaph.
This method is named <code>SignalProcessingConnect</code> instead of <code>Connect</code> because this protocol
is intended to be composed, and hence the more verbose name allows differentiation and
improved clarity.</p>
#### Request {#Codec.SignalProcessingConnect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>protocol</code></td>
<td>
<code>server_end&lt;<a class='link' href='../fuchsia.hardware.audio.signalprocessing/'>fuchsia.hardware.audio.signalprocessing</a>/<a class='link' href='../fuchsia.hardware.audio.signalprocessing/#SignalProcessing'>SignalProcessing</a>&gt;</code>
</td>
</tr>
</table>
### Start {#Codec.Start}
<p>Start/Re-start the codec operation.
<code>Start</code> returns when configuring the codec to start is completed but it does not wait for
the hardware to actually start playback/capture, i.e. <code>turn_on_delay</code> impact is not
taken into account to return from <code>Start</code>.
The <code>start_time</code> 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.</p>
#### Request {#Codec.Start_Request}
&lt;EMPTY&gt;
#### Response {#Codec.Start_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>start_time</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code>
</td>
</tr>
</table>
### Stop {#Codec.Stop}
<p>Stops the codec operation.
<code>Stop</code> returns when configuring the codec to stop is completed but it does not wait for
the hardware to actually stop playback/capture, i.e. <code>turn_off_delay</code> impact is not
taken into account to return from <code>Stop</code>.
The <code>stop_time</code> value (in the CLOCK_MONOTONIC timeline) indicates when when configuring
the codec to stop is completed.
If the driver can't successfully configure the codec to stop it will close the codec
protocol channel, in this case the client may obtain a new codec protocol channel and retry.</p>
#### Request {#Codec.Stop_Request}
&lt;EMPTY&gt;
#### Response {#Codec.Stop_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>start_time</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code>
</td>
</tr>
</table>
### WatchPlugState {#Codec.WatchPlugState}
<p>Get the plug detect state via a hanging get. The driver will reply to the first
<code>WatchPlugState</code> sent by the client. The driver will not respond to subsequent client
<code>WatchPlugState</code> calls until the plug state changes from what was most recently reported.</p>
#### Request {#Codec.WatchPlugState_Request}
&lt;EMPTY&gt;
#### Response {#Codec.WatchPlugState_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>plug_state</code></td>
<td>
<code><a class='link' href='#PlugState'>PlugState</a></code>
</td>
</tr>
</table>
## CodecConnector {#CodecConnector}
*Defined in [fuchsia.hardware.audio/codec_connector.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec_connector.fidl;l=8)*
<p>For an overview of the Codec protocols see
<a href="//docs/concepts/drivers/driver_architectures/audio_drivers/audio_codec.md">Codec Interface</a></p>
### Connect {#CodecConnector.Connect}
<p>Connect to a Codec protocol server.
This indirection into the Codec protocol allows us to support independent codec client
connections.</p>
#### Request {#CodecConnector.Connect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>codec_protocol</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Codec'>Codec</a>&gt;</code>
</td>
</tr>
</table>
## Dai {#Dai}
*Defined in [fuchsia.hardware.audio/dai.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai.fidl;l=27)*
<p>For an overview see
<a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_dai">Digital Audio Interface</a>.</p>
### CreateRingBuffer {#Dai.CreateRingBuffer}
<p><code>CreateRingBuffer</code> is sent by clients to select both a DAI format and a ring buffer format
based on information that the driver provides in <code>GetDaiFormats</code> and <code>GetRingBufferFormats</code>,
what is supported by the client, and any other requirement. The <code>ring_buffer</code> 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.</p>
#### Request {#Dai.CreateRingBuffer_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>dai_format</code></td>
<td>
<code><a class='link' href='#DaiFormat'>DaiFormat</a></code>
</td>
</tr>
<tr>
<td><code>ring_buffer_format</code></td>
<td>
<code><a class='link' href='#Format'>Format</a></code>
</td>
</tr>
<tr>
<td><code>ring_buffer</code></td>
<td>
<code>server_end&lt;<a class='link' href='#RingBuffer'>RingBuffer</a>&gt;</code>
</td>
</tr>
</table>
### GetDaiFormats {#Dai.GetDaiFormats}
<p>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 <code>DaiSupportedFormats</code> allows for cases where exclusive combinations of
the parameters in SupportedFormats may be supported.</p>
#### Request {#Dai.GetDaiFormats_Request}
&lt;EMPTY&gt;
#### Response {#Dai.GetDaiFormats_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Dai_GetDaiFormats_Result'>Dai_GetDaiFormats_Result</a></code>
</td>
</tr>
</table>
### GetHealthState {#Dai.GetHealthState}
<p>Retrieves top level health state.
A driver not responding promptly can be used as an indication of an unhealthy driver.</p>
#### Request {#Dai.GetHealthState_Request}
&lt;EMPTY&gt;
#### Response {#Dai.GetHealthState_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>state</code></td>
<td>
<code><a class='link' href='#HealthState'>HealthState</a></code>
</td>
</tr>
</table>
### GetProperties {#Dai.GetProperties}
<p>Retrieves top level static properties.</p>
#### Request {#Dai.GetProperties_Request}
&lt;EMPTY&gt;
#### Response {#Dai.GetProperties_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>properties</code></td>
<td>
<code><a class='link' href='#DaiProperties'>DaiProperties</a></code>
</td>
</tr>
</table>
### GetRingBufferFormats {#Dai.GetRingBufferFormats}
<p>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 <code>SupportedFormats</code> allows for cases where exclusive combinations of
the parameters in <code>SupportedFormats</code> may be supported.</p>
#### Request {#Dai.GetRingBufferFormats_Request}
&lt;EMPTY&gt;
#### Response {#Dai.GetRingBufferFormats_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Dai_GetRingBufferFormats_Result'>Dai_GetRingBufferFormats_Result</a></code>
</td>
</tr>
</table>
### Reset {#Dai.Reset}
<p>Resets the DAI HW. The <code>ring_buffer</code> channel obtained via <code>CreateRingBuffer</code> may be closed
by the driver, in this case the client needs to obtain a new <code>ring_buffer</code>.
<code>Reset</code> 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.</p>
#### Request {#Dai.Reset_Request}
&lt;EMPTY&gt;
#### Response {#Dai.Reset_Response}
&lt;EMPTY&gt;
### SignalProcessingConnect {#Dai.SignalProcessingConnect}
<p>Connect to a <code>SignalProcessing</code> protocol.
Multiple connections may be supported, if a new connection request is not supported, i.e.
the maximum number of connections have already been created, for instance one, then the
<code>protocol</code> channel (not the channel upon which <code>SignalProcessingConnect</code> is being called)
will be closed with an ZX_ERR_ALREADY_BOUND epitaph.
If signal processing is not supported at all, then the <code>protocol</code> channel (again, not the
channel upon which <code>SignalProcessingConnect</code> is being called) will be closed with a
ZX_ERR_NOT_SUPPORTED epitaph.
This method is named <code>SignalProcessingConnect</code> instead of <code>Connect</code> because this protocol
is intended to be composed, and hence the more verbose name allows differentiation and
improved clarity.</p>
#### Request {#Dai.SignalProcessingConnect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>protocol</code></td>
<td>
<code>server_end&lt;<a class='link' href='../fuchsia.hardware.audio.signalprocessing/'>fuchsia.hardware.audio.signalprocessing</a>/<a class='link' href='../fuchsia.hardware.audio.signalprocessing/#SignalProcessing'>SignalProcessing</a>&gt;</code>
</td>
</tr>
</table>
## DaiConnector {#DaiConnector}
*Defined in [fuchsia.hardware.audio/dai_connector.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_connector.fidl;l=8)*
<p>For an overview of the DAI protocols see
<a href="//docs/concepts/drivers/driver_architectures/audio_drivers/audio_dai.md">Digital Audio Interface</a></p>
### Connect {#DaiConnector.Connect}
<p>This connects to a DAI protocol server.</p>
#### Request {#DaiConnector.Connect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>dai_protocol</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Dai'>Dai</a>&gt;</code>
</td>
</tr>
</table>
## Health {#Health}
*Defined in [fuchsia.hardware.audio/health.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/health.fidl;l=15)*
### GetHealthState {#Health.GetHealthState}
<p>Retrieves top level health state.
A driver not responding promptly can be used as an indication of an unhealthy driver.</p>
#### Request {#Health.GetHealthState_Request}
&lt;EMPTY&gt;
#### Response {#Health.GetHealthState_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>state</code></td>
<td>
<code><a class='link' href='#HealthState'>HealthState</a></code>
</td>
</tr>
</table>
## RingBuffer {#RingBuffer}
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=311)*
<p>For an overview see
<a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_streaming">Audio Driver Streaming Interface</a></p>
### GetProperties {#RingBuffer.GetProperties}
<p>Accessor for top level static properties.</p>
#### Request {#RingBuffer.GetProperties_Request}
&lt;EMPTY&gt;
#### Response {#RingBuffer.GetProperties_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>properties</code></td>
<td>
<code><a class='link' href='#RingBufferProperties'>RingBufferProperties</a></code>
</td>
</tr>
</table>
### GetVmo {#RingBuffer.GetVmo}
<p>Requests a shared buffer to be used for moving bulk audio data. Requests the buffer size to
fit at least <code>min_frames</code>, and returns the actual <code>num_frames</code> allocated in
<code>ring_buffer</code>.</p>
<p>Drivers must incorporate any internal requirements when reporting the ring buffer size
in the actual <code>num_frames</code> allocated. For instance the driver, not the client, must take
into account any ring buffer data copy semantics like minimum hardware or virtual FIFO copy
size as required by the driver.</p>
<p>If <code>clock_recovery_notifications_per_ring</code> is non-zero, the driver will send replies to
<code>WatchClockRecoveryPositionInfo</code> client requests at most at
<code>clock_recovery_notifications_per_ring</code> frequency. These notifications are meant to be used
for clock recovery.</p>
#### Request {#RingBuffer.GetVmo_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>min_frames</code></td>
<td>
<code>uint32</code>
</td>
</tr>
<tr>
<td><code>clock_recovery_notifications_per_ring</code></td>
<td>
<code>uint32</code>
</td>
</tr>
</table>
#### Response {#RingBuffer.GetVmo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#RingBuffer_GetVmo_Result'>RingBuffer_GetVmo_Result</a></code>
</td>
</tr>
</table>
### SetActiveChannels {#RingBuffer.SetActiveChannels}
<p>Sets which channels are active via a bitmask.
The least significant bit corresponds to channel index 0.
Channels not set (bits are 0) in the bitmask are inactive.
Inactive channels indicate to the driver that it may turn off hardware associated with the
inactive channels. A subsequent <code>SetActiveChannels</code> setting an inactive channel to active
may incur in a <code>turn_on_delay</code> to actually restart playback/capture of the channels.
The total number of channels is the <code>number_of_channels</code> in <code>Format</code>, specifically in
<code>PcmFormat</code>, i.e. this bitmask has up to <code>number_of_channels</code> bits set (maximum 64).
Deactivating one, several, or all channels does not <code>Stop</code> the ring buffer.
<code>SetActiveChannels</code> does not change the ring buffer's behavior with regard to
<code>Start</code>/<code>Stop</code>, specifically position. Once <code>Start</code> is called, a ring buffer's position
advances (and position notifications sent as needed) regardless of the number of active
channels, including if no channels are active. This means that the format in the
ring buffer is not changed.
By default all channels are active.
If the driver does not support deactivating channels it must return <code>ZX_ERR_NOT_SUPPORTED</code>.
If the mask is incorrect, i.e. enables channels outside the number of bits
to use for a given <code>number_of_channels</code>, then the driver must return <code>ZX_ERR_INVALID_ARGS</code>.
The <code>set_time</code> value (in the CLOCK_MONOTONIC timeline) indicates when configuring
the hardware to activate or deactivate channels is completed. <code>set_time</code> does not include
the potential <code>turn_on_delay</code>, the driver does not delay the reply waiting for the
hardware to actually turn on, the driver replies with a <code>set_time</code> indicating when the
hardware configuration was completed.
For input channels, it is not required that the driver zero-out inactive channels.</p>
#### Request {#RingBuffer.SetActiveChannels_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>active_channels_bitmask</code></td>
<td>
<code>uint64</code>
</td>
</tr>
</table>
#### Response {#RingBuffer.SetActiveChannels_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#RingBuffer_SetActiveChannels_Result'>RingBuffer_SetActiveChannels_Result</a></code>
</td>
</tr>
</table>
### Start {#RingBuffer.Start}
<p>Start the ring buffer. The <code>start_time</code> 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'.
If <code>Start</code> is called before <code>SetActiveChannels</code>, then by default all channels are active.
If <code>Start</code> is called before <code>GetVmo</code>, the channel must be closed with <code>ZX_ERR_BAD_STATE</code>.
If <code>Start</code> is called while this RingBuffer is already started, the channel must be closed
with an error <code>ZX_ERR_BAD_STATE</code> returned.</p>
#### Request {#RingBuffer.Start_Request}
&lt;EMPTY&gt;
#### Response {#RingBuffer.Start_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>start_time</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code>
</td>
</tr>
</table>
### Stop {#RingBuffer.Stop}
<p>Stop the ring buffer. Once this call's response is received, no further position
notifications will be sent until <code>Start</code> is called again.
If <code>Stop</code> is called before <code>GetVmo</code>, the channel must be closed with <code>ZX_ERR_BAD_STATE</code>.</p>
#### Request {#RingBuffer.Stop_Request}
&lt;EMPTY&gt;
#### Response {#RingBuffer.Stop_Response}
&lt;EMPTY&gt;
### WatchClockRecoveryPositionInfo {#RingBuffer.WatchClockRecoveryPositionInfo}
<p>Gets the ring buffer current position via a hanging get. The driver must respond to a
client's first <code>WatchClockRecoveryPositionInfo</code> 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
<code>WatchClockRecoveryPositionInfo</code> until after it has replied to the <code>Start</code> command. If
<code>clock_recovery_notifications_per_ring</code> is not zero, the driver will reply with its
estimated position to be used for clock recovery at most at
<code>clock_recovery_notifications_per_ring</code> frequency.
<code>WatchClockRecoveryPositionInfo</code> may only be called after <code>GetVmo</code> was called, hence a
<code>clock_recovery_notifications_per_ring</code> was specified.
Must be delivered with timestamps that are monotonically increasing.</p>
#### Request {#RingBuffer.WatchClockRecoveryPositionInfo_Request}
&lt;EMPTY&gt;
#### Response {#RingBuffer.WatchClockRecoveryPositionInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>position_info</code></td>
<td>
<code><a class='link' href='#RingBufferPositionInfo'>RingBufferPositionInfo</a></code>
</td>
</tr>
</table>
### WatchDelayInfo {#RingBuffer.WatchDelayInfo}
<p>Get information about delays via a hanging get. The driver will immediately reply to the
first <code>WatchDelayInfo</code> sent by the client. The driver will not respond to subsequent client
<code>WatchDelayInfo</code> calls until the delay info changes from what was most recently reported.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
#### Request {#RingBuffer.WatchDelayInfo_Request}
&lt;EMPTY&gt;
#### Response {#RingBuffer.WatchDelayInfo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>delay_info</code></td>
<td>
<code><a class='link' href='#DelayInfo'>DelayInfo</a></code>
</td>
</tr>
</table>
## StreamConfig {#StreamConfig}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=218)*
<p>For an overview see
<a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_streaming">Audio Driver Streaming Interface</a></p>
### CreateRingBuffer {#StreamConfig.CreateRingBuffer}
<p><code>CreateRingBuffer</code> is sent by clients to select a stream format based on information that
the driver provides in <code>GetSupportedFormats</code> what is supported by the client, and any other
requirement. The <code>ring_buffer</code> 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.</p>
#### Request {#StreamConfig.CreateRingBuffer_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>format</code></td>
<td>
<code><a class='link' href='#Format'>Format</a></code>
</td>
</tr>
<tr>
<td><code>ring_buffer</code></td>
<td>
<code>server_end&lt;<a class='link' href='#RingBuffer'>RingBuffer</a>&gt;</code>
</td>
</tr>
</table>
### GetHealthState {#StreamConfig.GetHealthState}
<p>Retrieves top level health state.
A driver not responding promptly can be used as an indication of an unhealthy driver.</p>
#### Request {#StreamConfig.GetHealthState_Request}
&lt;EMPTY&gt;
#### Response {#StreamConfig.GetHealthState_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>state</code></td>
<td>
<code><a class='link' href='#HealthState'>HealthState</a></code>
</td>
</tr>
</table>
### GetProperties {#StreamConfig.GetProperties}
<p>Retrieves top level static properties.</p>
#### Request {#StreamConfig.GetProperties_Request}
&lt;EMPTY&gt;
#### Response {#StreamConfig.GetProperties_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>properties</code></td>
<td>
<code><a class='link' href='#StreamProperties'>StreamProperties</a></code>
</td>
</tr>
</table>
### GetSupportedFormats {#StreamConfig.GetSupportedFormats}
<p>Gets formats supported by a given driver. When not all combinations supported by the
driver can be described with one <code>SupportedFormats</code>, the driver returns more than one
<code>SupportedFormats</code> in the returned vector. For example, if one <code>SupportedFormats</code> 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 <code>SupportedFormats</code>: &lt;&lt;32bits&gt;,&lt;48KHz&gt;&gt; and
&lt;&lt;16bits&gt;,&lt;96KHz&gt;&gt;. 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 <code>SupportedFormats</code>:
&lt;&lt;16bits,32bits&gt;,&lt;48KHz,96KHz&gt;&gt;.</p>
#### Request {#StreamConfig.GetSupportedFormats_Request}
&lt;EMPTY&gt;
#### Response {#StreamConfig.GetSupportedFormats_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>supported_formats</code></td>
<td>
<code>vector&lt;<a class='link' href='#SupportedFormats'>SupportedFormats</a>&gt;[64]</code>
</td>
</tr>
</table>
### SetGain {#StreamConfig.SetGain}
<p>Client update of the gain state.</p>
#### Request {#StreamConfig.SetGain_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>target_state</code></td>
<td>
<code><a class='link' href='#GainState'>GainState</a></code>
</td>
</tr>
</table>
### SignalProcessingConnect {#StreamConfig.SignalProcessingConnect}
<p>Connect to a <code>SignalProcessing</code> protocol.
Multiple connections may be supported, if a new connection request is not supported, i.e.
the maximum number of connections have already been created, for instance one, then the
<code>protocol</code> channel (not the channel upon which <code>SignalProcessingConnect</code> is being called)
will be closed with an ZX_ERR_ALREADY_BOUND epitaph.
If signal processing is not supported at all, then the <code>protocol</code> channel (again, not the
channel upon which <code>SignalProcessingConnect</code> is being called) will be closed with a
ZX_ERR_NOT_SUPPORTED epitaph.
This method is named <code>SignalProcessingConnect</code> instead of <code>Connect</code> because this protocol
is intended to be composed, and hence the more verbose name allows differentiation and
improved clarity.</p>
#### Request {#StreamConfig.SignalProcessingConnect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>protocol</code></td>
<td>
<code>server_end&lt;<a class='link' href='../fuchsia.hardware.audio.signalprocessing/'>fuchsia.hardware.audio.signalprocessing</a>/<a class='link' href='../fuchsia.hardware.audio.signalprocessing/#SignalProcessing'>SignalProcessing</a>&gt;</code>
</td>
</tr>
</table>
### WatchGainState {#StreamConfig.WatchGainState}
<p>Get the gain state via a hanging get. The driver will reply to the first <code>WatchGainState</code>
sent by the client and this reply must include a <code>gain_db</code> set to 0dB or lower. The driver
will not respond to subsequent client <code>WatchGainState</code> calls until the gain state changes
from what was most recently reported.</p>
#### Request {#StreamConfig.WatchGainState_Request}
&lt;EMPTY&gt;
#### Response {#StreamConfig.WatchGainState_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>gain_state</code></td>
<td>
<code><a class='link' href='#GainState'>GainState</a></code>
</td>
</tr>
</table>
### WatchPlugState {#StreamConfig.WatchPlugState}
<p>Get the plug detect state via a hanging get. The driver will reply to the first
<code>WatchPlugState</code> sent by the client. The driver will not respond to subsequent client
<code>WatchPlugState</code> calls until the plug state changes from what was most recently reported.</p>
#### Request {#StreamConfig.WatchPlugState_Request}
&lt;EMPTY&gt;
#### Response {#StreamConfig.WatchPlugState_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>plug_state</code></td>
<td>
<code><a class='link' href='#PlugState'>PlugState</a></code>
</td>
</tr>
</table>
## StreamConfigConnector {#StreamConfigConnector}
*Defined in [fuchsia.hardware.audio/stream_config_connector.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream_config_connector.fidl;l=8)*
<p>For an overview see
<a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_streaming">Audio Driver Streaming Interface</a>.</p>
### Connect {#StreamConfigConnector.Connect}
<p>Connect to a <code>StreamConfig</code> protocol.
This method allows a component to serve FIDL outside the devhost's control.</p>
#### Request {#StreamConfigConnector.Connect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>protocol</code></td>
<td>
<code>server_end&lt;<a class='link' href='#StreamConfig'>StreamConfig</a>&gt;</code>
</td>
</tr>
</table>
## **STRUCTS**
### CodecInfo {#CodecInfo data-text="CodecInfo"}
*Defined in [fuchsia.hardware.audio/codec.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec.fidl;l=11)*
<p>Textual information about the codec.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Deprecated: 11</span></div>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="CodecInfo.unique_id">
<td><code>unique_id</code></td>
<td>
<code>string[16]</code>
</td>
<td><p>Unique identifier for the codec.</p>
</td>
<td>No default</td>
</tr>
<tr id="CodecInfo.manufacturer">
<td><code>manufacturer</code></td>
<td>
<code>string[256]</code>
</td>
<td><p>Name of the codec manufacturer.</p>
</td>
<td>No default</td>
</tr>
<tr id="CodecInfo.product_name">
<td><code>product_name</code></td>
<td>
<code>string[256]</code>
</td>
<td><p>Product name of the codec.</p>
</td>
<td>No default</td>
</tr>
</table>
### Codec_GetDaiFormats_Response {#Codec_GetDaiFormats_Response data-text="Codec_GetDaiFormats_Response"}
*Defined in [fuchsia.hardware.audio/codec.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec.fidl;l=179)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Codec_GetDaiFormats_Response.formats">
<td><code>formats</code></td>
<td>
<code>vector&lt;<a class='link' href='#DaiSupportedFormats'>DaiSupportedFormats</a>&gt;[64]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Codec_SetDaiFormat_Response {#Codec_SetDaiFormat_Response data-text="Codec_SetDaiFormat_Response"}
*Defined in [fuchsia.hardware.audio/codec.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec.fidl;l=187)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Codec_SetDaiFormat_Response.state">
<td><code>state</code></td>
<td>
<code><a class='link' href='#CodecFormatInfo'>CodecFormatInfo</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### DaiFormat {#DaiFormat data-text="DaiFormat"}
*Defined in [fuchsia.hardware.audio/dai_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=87)*
<p>DAI format. Frames are made up of <code>number_of_channels</code> samples which have <code>bits_per_sample</code> bits
of data within <code>bits_per_slot</code> arranged in <code>frame_format</code>. For more detailed information see
<a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_dai">Digital Audio Interface</a>.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="DaiFormat.number_of_channels">
<td><code>number_of_channels</code></td>
<td>
<code>uint32</code>
</td>
<td><p>Number of channels.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFormat.channels_to_use_bitmask">
<td><code>channels_to_use_bitmask</code></td>
<td>
<code>uint64</code>
</td>
<td><p>Sets which channels are active via a bitmask.
The least significant bit corresponds to channel index 0.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFormat.sample_format">
<td><code>sample_format</code></td>
<td>
<code><a class='link' href='#DaiSampleFormat'>DaiSampleFormat</a></code>
</td>
<td><p>The sample format of all samples.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFormat.frame_format">
<td><code>frame_format</code></td>
<td>
<code><a class='link' href='#DaiFrameFormat'>DaiFrameFormat</a></code>
</td>
<td><p>The frame format of all samples.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFormat.frame_rate">
<td><code>frame_rate</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The frame rate for all samples.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFormat.bits_per_slot">
<td><code>bits_per_slot</code></td>
<td>
<code>uint8</code>
</td>
<td><p>The bits per slot for all channels.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFormat.bits_per_sample">
<td><code>bits_per_sample</code></td>
<td>
<code>uint8</code>
</td>
<td><p>The bits per sample for all samples. Must be smaller than bits per channel for samples to
fit.</p>
</td>
<td>No default</td>
</tr>
</table>
### DaiFrameFormatCustom {#DaiFrameFormatCustom data-text="DaiFrameFormatCustom"}
*Defined in [fuchsia.hardware.audio/dai_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=68)*
<p>Custom Frame format.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="DaiFrameFormatCustom.left_justified">
<td><code>left_justified</code></td>
<td>
<code>bool</code>
</td>
<td><p>Justification of the samples within a slot.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFrameFormatCustom.sclk_on_raising">
<td><code>sclk_on_raising</code></td>
<td>
<code>bool</code>
</td>
<td><p>Clocking of data samples and frame sync output on either raising or falling sclk.
If true then the sclk raises on the raising edge of the data and frame sync, i.e.
the data will be sampled on the falling edge of sclk (the middle of the sclk cycle).
Hence, if false then data will be sampled on the raising edge of sclk.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFrameFormatCustom.frame_sync_sclks_offset">
<td><code>frame_sync_sclks_offset</code></td>
<td>
<code>int8</code>
</td>
<td><p>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.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiFrameFormatCustom.frame_sync_size">
<td><code>frame_sync_size</code></td>
<td>
<code>uint8</code>
</td>
<td><p>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.</p>
</td>
<td>No default</td>
</tr>
</table>
### DaiSupportedFormats {#DaiSupportedFormats data-text="DaiSupportedFormats"}
*Defined in [fuchsia.hardware.audio/dai_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=113)*
<p>Formats supported by the DAI. Frames are made up of <code>number_of_channels</code> samples which have
<code>bits_per_sample</code> bits of data within <code>bits_per_slot</code> bits arranged in <code>frame_formats</code>.
All values listed in each vector are supported. When not all combinations supported by the driver
can be described with one <code>DaiSupportedFormats</code>, <code>GetDaiSupportedFormats</code> returns more than one
<code>DaiSupportedFormats</code> in the returned vector.
For more detailed information see
<a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_dai">Digital Audio Interface</a>.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="DaiSupportedFormats.number_of_channels">
<td><code>number_of_channels</code></td>
<td>
<code>vector&lt;uint32&gt;[64]</code>
</td>
<td><p>Possible number of channels supported.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiSupportedFormats.sample_formats">
<td><code>sample_formats</code></td>
<td>
<code>vector&lt;<a class='link' href='#DaiSampleFormat'>DaiSampleFormat</a>&gt;[4]</code>
</td>
<td><p>Sample formats supported.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiSupportedFormats.frame_formats">
<td><code>frame_formats</code></td>
<td>
<code>vector&lt;<a class='link' href='#DaiFrameFormat'>DaiFrameFormat</a>&gt;[64]</code>
</td>
<td><p>Frame formats supported.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiSupportedFormats.frame_rates">
<td><code>frame_rates</code></td>
<td>
<code>vector&lt;uint32&gt;[64]</code>
</td>
<td><p>Rates supported.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiSupportedFormats.bits_per_slot">
<td><code>bits_per_slot</code></td>
<td>
<code>vector&lt;uint8&gt;[8]</code>
</td>
<td><p>The bits per slot supported.</p>
</td>
<td>No default</td>
</tr>
<tr id="DaiSupportedFormats.bits_per_sample">
<td><code>bits_per_sample</code></td>
<td>
<code>vector&lt;uint8&gt;[8]</code>
</td>
<td><p>Bits per sample supported.</p>
</td>
<td>No default</td>
</tr>
</table>
### Dai_GetDaiFormats_Response {#Dai_GetDaiFormats_Response data-text="Dai_GetDaiFormats_Response"}
*Defined in [fuchsia.hardware.audio/dai.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai.fidl;l=50)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Dai_GetDaiFormats_Response.dai_formats">
<td><code>dai_formats</code></td>
<td>
<code>vector&lt;<a class='link' href='#DaiSupportedFormats'>DaiSupportedFormats</a>&gt;[64]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Dai_GetRingBufferFormats_Response {#Dai_GetRingBufferFormats_Response data-text="Dai_GetRingBufferFormats_Response"}
*Defined in [fuchsia.hardware.audio/dai.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai.fidl;l=58)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Dai_GetRingBufferFormats_Response.ring_buffer_formats">
<td><code>ring_buffer_formats</code></td>
<td>
<code>vector&lt;<a class='link' href='#SupportedFormats'>SupportedFormats</a>&gt;[64]</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### PcmFormat {#PcmFormat data-text="PcmFormat"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=102)*
<p>Format supporting non-compressed PCM audio. Frames are made up of <code>number_of_channels</code> samples
which have <code>valid_bits_per_sample</code> bits of left-justified data within <code>bytes_per_sample</code>.
bytes. For more detailed information see
<a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_streaming">Audio Driver Streaming Interface</a>.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="PcmFormat.number_of_channels">
<td><code>number_of_channels</code></td>
<td>
<code>uint8</code>
</td>
<td><p>Number of channels.</p>
</td>
<td>No default</td>
</tr>
<tr id="PcmFormat.sample_format">
<td><code>sample_format</code></td>
<td>
<code><a class='link' href='#SampleFormat'>SampleFormat</a></code>
</td>
<td><p>The format of all samples.</p>
</td>
<td>No default</td>
</tr>
<tr id="PcmFormat.bytes_per_sample">
<td><code>bytes_per_sample</code></td>
<td>
<code>uint8</code>
</td>
<td><p>Bytes allocated to hold a sample, equal or bigger than the valid sample size in
<code>valid_bits_per_sample</code>.</p>
</td>
<td>No default</td>
</tr>
<tr id="PcmFormat.valid_bits_per_sample">
<td><code>valid_bits_per_sample</code></td>
<td>
<code>uint8</code>
</td>
<td><p>Number of valid bits in a sample, must be equal or smaller than bits in <code>bytes_per_sample</code>.
If smaller, bits are left justified, and any additional bits must be ignored by the
receiver.</p>
</td>
<td>No default</td>
</tr>
<tr id="PcmFormat.frame_rate">
<td><code>frame_rate</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The frame rate for all samples.</p>
</td>
<td>No default</td>
</tr>
</table>
### RingBufferPositionInfo {#RingBufferPositionInfo data-text="RingBufferPositionInfo"}
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=289)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="RingBufferPositionInfo.timestamp">
<td><code>timestamp</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code>
</td>
<td><p>The driver's best estimate of the time (in the CLOCK_MONOTONIC timeline) at which the
playback/capture pointer reached the position indicated by <code>position</code>.
<code>turn_on_delay</code> impact should not be incorporated into 'timestamp'.
No delays indicated in <code>DelayInfo</code> should be incorporated.</p>
</td>
<td>No default</td>
</tr>
<tr id="RingBufferPositionInfo.position">
<td><code>position</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The playback/capture pointer position (in bytes) in the ring buffer at time
<code>timestamp</code> as estimated by the driver.</p>
</td>
<td>No default</td>
</tr>
</table>
### RingBuffer_GetVmo_Response [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#RingBuffer_GetVmo_Response data-text="RingBuffer_GetVmo_Response"}
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=351)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="RingBuffer_GetVmo_Response.num_frames">
<td><code>num_frames</code></td>
<td>
<code>uint32</code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="RingBuffer_GetVmo_Response.ring_buffer">
<td><code>ring_buffer</code></td>
<td>
<code>handle&lt;vmo&gt;</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### RingBuffer_SetActiveChannels_Response {#RingBuffer_SetActiveChannels_Response data-text="RingBuffer_SetActiveChannels_Response"}
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=399)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="RingBuffer_SetActiveChannels_Response.set_time">
<td><code>set_time</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
## **ENUMS**
### DaiFrameFormatStandard [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#DaiFrameFormatStandard data-text="DaiFrameFormatStandard"}
Type: <code>uint8</code>
*Defined in [fuchsia.hardware.audio/dai_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=37)*
<p>Standard Frame format.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="DaiFrameFormatStandard.NONE">
<td><h3 id="DaiFrameFormatStandard.NONE" class="add-link hide-from-toc">NONE</h3></td>
<td><code>1</code></td>
<td><p>No frame format as in samples without a frame sync like PDM.</p>
</td>
</tr>
<tr id="DaiFrameFormatStandard.I2S">
<td><h3 id="DaiFrameFormatStandard.I2S" class="add-link hide-from-toc">I2S</h3></td>
<td><code>2</code></td>
<td><p>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).</p>
</td>
</tr>
<tr id="DaiFrameFormatStandard.STEREO_LEFT">
<td><h3 id="DaiFrameFormatStandard.STEREO_LEFT" class="add-link hide-from-toc">STEREO_LEFT</h3></td>
<td><code>3</code></td>
<td><p>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.</p>
</td>
</tr>
<tr id="DaiFrameFormatStandard.STEREO_RIGHT">
<td><h3 id="DaiFrameFormatStandard.STEREO_RIGHT" class="add-link hide-from-toc">STEREO_RIGHT</h3></td>
<td><code>4</code></td>
<td><p>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.</p>
</td>
</tr>
<tr id="DaiFrameFormatStandard.TDM1">
<td><h3 id="DaiFrameFormatStandard.TDM1" class="add-link hide-from-toc">TDM1</h3></td>
<td><code>5</code></td>
<td><p>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.</p>
</td>
</tr>
<tr id="DaiFrameFormatStandard.TDM2">
<td><h3 id="DaiFrameFormatStandard.TDM2" class="add-link hide-from-toc">TDM2</h3></td>
<td><code>6</code></td>
<td><p>Left justified, variable number of channels, data starts one clock cycle after the 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.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
<tr id="DaiFrameFormatStandard.TDM3">
<td><h3 id="DaiFrameFormatStandard.TDM3" class="add-link hide-from-toc">TDM3</h3></td>
<td><code>7</code></td>
<td><p>Left justified, variable number of channels, data starts two clock cycles after the 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.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 10</span></div>
</td>
</tr>
</table>
### DaiSampleFormat [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#DaiSampleFormat data-text="DaiSampleFormat"}
Type: <code>uint8</code>
*Defined in [fuchsia.hardware.audio/dai_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=13)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="DaiSampleFormat.PDM">
<td><h3 id="DaiSampleFormat.PDM" class="add-link hide-from-toc">PDM</h3></td>
<td><code>1</code></td>
<td><p>Pulse Density Modulation samples.</p>
</td>
</tr>
<tr id="DaiSampleFormat.PCM_SIGNED">
<td><h3 id="DaiSampleFormat.PCM_SIGNED" class="add-link hide-from-toc">PCM_SIGNED</h3></td>
<td><code>2</code></td>
<td><p>Signed Linear Pulse Code Modulation samples at the host endianness.</p>
</td>
</tr>
<tr id="DaiSampleFormat.PCM_UNSIGNED">
<td><h3 id="DaiSampleFormat.PCM_UNSIGNED" class="add-link hide-from-toc">PCM_UNSIGNED</h3></td>
<td><code>3</code></td>
<td><p>Unsigned Linear Pulse Code Modulation samples at the host endianness.</p>
</td>
</tr>
<tr id="DaiSampleFormat.PCM_FLOAT">
<td><h3 id="DaiSampleFormat.PCM_FLOAT" class="add-link hide-from-toc">PCM_FLOAT</h3></td>
<td><code>4</code></td>
<td><p>Floating point samples IEEE-754 encoded.</p>
</td>
</tr>
</table>
### GetVmoError [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#GetVmoError data-text="GetVmoError"}
Type: <code>uint32</code>
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=301)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="GetVmoError.INVALID_ARGS">
<td><h3 id="GetVmoError.INVALID_ARGS" class="add-link hide-from-toc">INVALID_ARGS</h3></td>
<td><code>1</code></td>
<td><p>The ring buffer setup failed due to an invalid argument, e.g. min_frames is too big.</p>
</td>
</tr>
<tr id="GetVmoError.INTERNAL_ERROR">
<td><h3 id="GetVmoError.INTERNAL_ERROR" class="add-link hide-from-toc">INTERNAL_ERROR</h3></td>
<td><code>2</code></td>
<td><p>The ring buffer setup failed due to an internal error.</p>
</td>
</tr>
</table>
### PlugDetectCapabilities [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PlugDetectCapabilities data-text="PlugDetectCapabilities"}
Type: <code>uint32</code>
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=146)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="PlugDetectCapabilities.HARDWIRED">
<td><h3 id="PlugDetectCapabilities.HARDWIRED" class="add-link hide-from-toc">HARDWIRED</h3></td>
<td><code>0</code></td>
<td><p>Stream is hardwired (will always be plugged in).</p>
</td>
</tr>
<tr id="PlugDetectCapabilities.CAN_ASYNC_NOTIFY">
<td><h3 id="PlugDetectCapabilities.CAN_ASYNC_NOTIFY" class="add-link hide-from-toc">CAN_ASYNC_NOTIFY</h3></td>
<td><code>1</code></td>
<td><p>Stream is able to asynchronously notify of plug state changes.</p>
</td>
</tr>
</table>
### SampleFormat [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#SampleFormat data-text="SampleFormat"}
Type: <code>uint8</code>
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=24)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="SampleFormat.PCM_SIGNED">
<td><h3 id="SampleFormat.PCM_SIGNED" class="add-link hide-from-toc">PCM_SIGNED</h3></td>
<td><code>1</code></td>
<td><p>Signed Linear Pulse Code Modulation samples at the host endianness.</p>
</td>
</tr>
<tr id="SampleFormat.PCM_UNSIGNED">
<td><h3 id="SampleFormat.PCM_UNSIGNED" class="add-link hide-from-toc">PCM_UNSIGNED</h3></td>
<td><code>2</code></td>
<td><p>Unsigned Linear Pulse Code Modulation samples at the host endianness.</p>
</td>
</tr>
<tr id="SampleFormat.PCM_FLOAT">
<td><h3 id="SampleFormat.PCM_FLOAT" class="add-link hide-from-toc">PCM_FLOAT</h3></td>
<td><code>3</code></td>
<td><p>Floating point samples IEEE-754 encoded.</p>
</td>
</tr>
</table>
## **TABLES**
### ChannelAttributes {#ChannelAttributes data-text="ChannelAttributes"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=35)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ChannelAttributes.min_frequency">
<td><h3 id="ChannelAttributes.min_frequency" class="add-link hide-from-toc">1</h3></td>
<td><code>min_frequency</code></td>
<td>
<code>uint32</code>
</td>
<td><p>Minimum frequency guaranteed to be emitted by (or captured in) this channel, in Hz. Optional.
If both <code>min_frequency</code> and <code>max_frequency</code> are not included, then this channel is assumed
to cover the full frequency range of this device.</p>
</td>
</tr>
<tr id="ChannelAttributes.max_frequency">
<td><h3 id="ChannelAttributes.max_frequency" class="add-link hide-from-toc">2</h3></td>
<td><code>max_frequency</code></td>
<td>
<code>uint32</code>
</td>
<td><p>Maximum frequency guaranteed to be emitted by (or captured in) this channel, in Hz. Optional.
If both <code>min_frequency</code> and <code>max_frequency</code> are not included, then this channel is assumed
to cover the full frequency range of this device.</p>
</td>
</tr>
</table>
### ChannelSet {#ChannelSet data-text="ChannelSet"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=51)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="ChannelSet.attributes">
<td><h3 id="ChannelSet.attributes" class="add-link hide-from-toc">1</h3></td>
<td><code>attributes</code></td>
<td>
<code>vector&lt;<a class='link' href='#ChannelAttributes'>ChannelAttributes</a>&gt;[64]</code>
</td>
<td><p>Describes attributes for this channel set. Required.
The size of this vector defines the number of channels supported by this <code>ChannelSet</code>.
Each element of the vector defines attributes of a single channel.</p>
</td>
</tr>
</table>
### CodecFormatInfo {#CodecFormatInfo data-text="CodecFormatInfo"}
*Defined in [fuchsia.hardware.audio/codec.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec.fidl;l=89)*
<p>Codec format information.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="CodecFormatInfo.external_delay">
<td><h3 id="CodecFormatInfo.external_delay" class="add-link hide-from-toc">1</h3></td>
<td><code>external_delay</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>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.
If not included <code>external_delay</code> is unknown.</p>
</td>
</tr>
<tr id="CodecFormatInfo.turn_on_delay">
<td><h3 id="CodecFormatInfo.turn_on_delay" class="add-link hide-from-toc">2</h3></td>
<td><code>turn_on_delay</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>The driver's best estimate of the amount of time (in nanoseconds) it takes the hardware to
actually start playback/capture after a <code>Start</code> 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.
If not included <code>turn_on_delay</code> is unknown.</p>
</td>
</tr>
<tr id="CodecFormatInfo.turn_off_delay">
<td><h3 id="CodecFormatInfo.turn_off_delay" class="add-link hide-from-toc">3</h3></td>
<td><code>turn_off_delay</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>The driver's best estimate of the amount of time (in nanoseconds) it takes the hardware to
actually stop playback/capture after a <code>Stop</code> command is issued.
It may take some time for the hardware to get into fully stopped mode, for example due
a power state change. This delay must be taken into account if playback/capture of samples
after a 'Stop' command is not acceptable. Optional.
If not included, the turn off delay is unknown.</p>
</td>
</tr>
</table>
### CodecProperties {#CodecProperties data-text="CodecProperties"}
*Defined in [fuchsia.hardware.audio/codec.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec.fidl;l=23)*
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="CodecProperties.is_input">
<td><h3 id="CodecProperties.is_input" class="add-link hide-from-toc">1</h3></td>
<td><code>is_input</code></td>
<td>
<code>bool</code>
</td>
<td><p>Codec type is input or output.
If not included, then the codec may be used for both input and output.</p>
</td>
</tr>
<tr id="CodecProperties.manufacturer">
<td><h3 id="CodecProperties.manufacturer" class="add-link hide-from-toc">2</h3></td>
<td><code>manufacturer</code></td>
<td>
<code>string[256]</code>
</td>
<td><p>UI string for the manufacturer name. If not included, the manufacturer is unspecified.</p>
</td>
</tr>
<tr id="CodecProperties.product">
<td><h3 id="CodecProperties.product" class="add-link hide-from-toc">3</h3></td>
<td><code>product</code></td>
<td>
<code>string[256]</code>
</td>
<td><p>UI string for the product name. If not included, the product name is unspecified.</p>
</td>
</tr>
<tr id="CodecProperties.unique_id">
<td><h3 id="CodecProperties.unique_id" class="add-link hide-from-toc">4</h3></td>
<td><code>unique_id</code></td>
<td>
<code>string[16]</code>
</td>
<td><p>Unique identifier for the codec.
If not included, there is no unique id for the Codec.</p>
</td>
</tr>
<tr id="CodecProperties.plug_detect_capabilities">
<td><h3 id="CodecProperties.plug_detect_capabilities" class="add-link hide-from-toc">5</h3></td>
<td><code>plug_detect_capabilities</code></td>
<td>
<code><a class='link' href='#PlugDetectCapabilities'>PlugDetectCapabilities</a></code>
</td>
<td><p>Plug Detect Capabilities. Required.</p>
</td>
</tr>
</table>
### DaiProperties {#DaiProperties data-text="DaiProperties"}
*Defined in [fuchsia.hardware.audio/dai.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai.fidl;l=12)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="DaiProperties.is_input">
<td><h3 id="DaiProperties.is_input" class="add-link hide-from-toc">1</h3></td>
<td><code>is_input</code></td>
<td>
<code>bool</code>
</td>
<td><p>Dai type is input or output. Required.</p>
</td>
</tr>
<tr id="DaiProperties.manufacturer">
<td><h3 id="DaiProperties.manufacturer" class="add-link hide-from-toc">2</h3></td>
<td><code>manufacturer</code></td>
<td>
<code>string[256]</code>
</td>
<td><p>Name of the DAI interface provider manufacturer. If not included, the manufacturer is
unspecified.</p>
</td>
</tr>
<tr id="DaiProperties.product_name">
<td><h3 id="DaiProperties.product_name" class="add-link hide-from-toc">3</h3></td>
<td><code>product_name</code></td>
<td>
<code>string[256]</code>
</td>
<td><p>Product name of the DAI interface provider. If not included, the product name is
unspecified.</p>
</td>
</tr>
</table>
### DelayInfo {#DelayInfo data-text="DelayInfo"}
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=10)*
<p>Delay information as returned by the driver.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="DelayInfo.internal_delay">
<td><h3 id="DelayInfo.internal_delay" class="add-link hide-from-toc">1</h3></td>
<td><code>internal_delay</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>The driver's best estimate of the delay internal to the hardware it abstracts for
the chosen format.</p>
<p>&quot;Internal&quot; refers to the hardware on the side of any hardware interconnect (DAI)
that provides the ring buffer, for instance an SoC audio subsystem, whereas &quot;external&quot;
refers to hardware on the other side of any hardware interconnect (DAI), for
instance hardware codecs.</p>
<p>For a given frame during playback, this is any delay after the driver/HW copies it
out of the ring-buffer, before it exits any hardware interconnect.
For a given frame during recording, this is any delay before the driver/HW copies
it into the ring-buffer, after it enters the hardware interconnect.</p>
<p><code>internal_delay</code> must be taken into account by the client when determining either
the minimum lead time requirement (for playback) or the minimum capture delay (for
capture).</p>
<p>This delay must not include the inherent delay added by the temporary buffering needed
to copy data in and out of the ring buffer, specified via <code>RingBufferProperties</code>
<code>driver_transfer_bytes</code>.</p>
<p>Required.</p>
</td>
</tr>
<tr id="DelayInfo.external_delay">
<td><h3 id="DelayInfo.external_delay" class="add-link hide-from-toc">2</h3></td>
<td><code>external_delay</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>The driver's best estimate of the delay external to the hardware it abstracts for
the chosen format.</p>
<p>&quot;Internal&quot; refers to the hardware on the side of any hardware interconnect (DAI)
that provides the ring buffer, for instance an SoC audio subsystem, whereas &quot;external&quot;
refers to hardware on the other side of any hardware interconnect (DAI), for
instance hardware codecs.</p>
<p>If not included <code>external_delay</code> is unknown. If unknown, the client may treat
<code>external_delay</code> as it chooses, e.g. may autodetect it, consider it zero, consider
it a large number, etc.</p>
<p><code>external_delay</code> must be taken into account by the client when determining either
the minimum lead time requirement (for playback) or the minimum capture delay (for
capture).</p>
<p>This delay must not include the inherent delay added by the temporary buffering needed
to copy data in and out of the ring buffer, specified via <code>RingBufferProperties</code>
<code>driver_transfer_bytes</code>.</p>
</td>
</tr>
</table>
### Format {#Format data-text="Format"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=93)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Format.pcm_format">
<td><h3 id="Format.pcm_format" class="add-link hide-from-toc">1</h3></td>
<td><code>pcm_format</code></td>
<td>
<code><a class='link' href='#PcmFormat'>PcmFormat</a></code>
</td>
<td><p>Format supporting non-compressed PCM samples. Required.</p>
</td>
</tr>
</table>
### GainState {#GainState data-text="GainState"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=123)*
<p>Gain state requested by the client or returned by the driver.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="GainState.muted">
<td><h3 id="GainState.muted" class="add-link hide-from-toc">1</h3></td>
<td><code>muted</code></td>
<td>
<code>bool</code>
</td>
<td><p>Current mute state. If not included, the state is unmuted.</p>
</td>
</tr>
<tr id="GainState.agc_enabled">
<td><h3 id="GainState.agc_enabled" class="add-link hide-from-toc">2</h3></td>
<td><code>agc_enabled</code></td>
<td>
<code>bool</code>
</td>
<td><p>Current Automatic Gain Control (AGC) state. If not included, AGC is disabled.</p>
</td>
</tr>
<tr id="GainState.gain_db">
<td><h3 id="GainState.gain_db" class="add-link hide-from-toc">3</h3></td>
<td><code>gain_db</code></td>
<td>
<code>float32</code>
</td>
<td><p>Current gain in decibels. Required.</p>
</td>
</tr>
</table>
### HealthState {#HealthState data-text="HealthState"}
*Defined in [fuchsia.hardware.audio/health.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/health.fidl;l=6)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="HealthState.healthy">
<td><h3 id="HealthState.healthy" class="add-link hide-from-toc">1</h3></td>
<td><code>healthy</code></td>
<td>
<code>bool</code>
</td>
<td><p>Driver is currently healthy. Optional.
No health information is provided if this field is not included.
This allows drivers to signal their health state in scenarios where they have not enough
capabilities or resources to recover on their own, for instance not able to power down the
hardware via a GPIO or control over the power subsystem.</p>
</td>
</tr>
</table>
### PcmSupportedFormats {#PcmSupportedFormats data-text="PcmSupportedFormats"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=69)*
<p>Format supporting non-compressed PCM audio. Frames are made up of number of channels samples
which have <code>valid_bits_per_sample</code> bits of left-justified data within <code>bytes_per_sample</code>
bytes. All values listed in each vector are supported. When not all combinations supported by
the driver can be described with one <code>SupportedFormats</code> (and hence one <code>PcmSupportedFormats</code>),
<code>GetSupportedFormats</code> returns more than one <code>SupportedFormats</code> in the returned vector.
For more detailed information see <a href="https://fuchsia.dev/fuchsia-src/concepts/drivers/driver_architectures/audio_drivers/audio_streaming">Audio Driver Streaming Interface</a>.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PcmSupportedFormats.channel_sets">
<td><h3 id="PcmSupportedFormats.channel_sets" class="add-link hide-from-toc">1</h3></td>
<td><code>channel_sets</code></td>
<td>
<code>vector&lt;<a class='link' href='#ChannelSet'>ChannelSet</a>&gt;[64]</code>
</td>
<td><p>Vector of possible <code>ChannelSets</code> supported. Required.
A <code>ChannelSet</code> defines a number of channels supported plus a number of optional
attributes for these channels.
Only one <code>ChannelSet</code> is allowed for each unique number of channels.</p>
</td>
</tr>
<tr id="PcmSupportedFormats.sample_formats">
<td><h3 id="PcmSupportedFormats.sample_formats" class="add-link hide-from-toc">2</h3></td>
<td><code>sample_formats</code></td>
<td>
<code>vector&lt;<a class='link' href='#SampleFormat'>SampleFormat</a>&gt;[3]</code>
</td>
<td><p>Vector of possible <code>SampleFormat</code>s supported. Required.</p>
</td>
</tr>
<tr id="PcmSupportedFormats.bytes_per_sample">
<td><h3 id="PcmSupportedFormats.bytes_per_sample" class="add-link hide-from-toc">3</h3></td>
<td><code>bytes_per_sample</code></td>
<td>
<code>vector&lt;uint8&gt;[8]</code>
</td>
<td><p>Vector of possible number of bits allocated to hold a sample,
equal or bigger than the actual sample size in <code>valid_bits_per_sample</code> in ascending order.
Required.</p>
</td>
</tr>
<tr id="PcmSupportedFormats.valid_bits_per_sample">
<td><h3 id="PcmSupportedFormats.valid_bits_per_sample" class="add-link hide-from-toc">4</h3></td>
<td><code>valid_bits_per_sample</code></td>
<td>
<code>vector&lt;uint8&gt;[8]</code>
</td>
<td><p>Vector of possible number of bits in a sample in ascending order, must be equal or smaller
than <code>bytes_per_sample</code> for samples to fit. If smaller, bits are left justified, and any
additional bits will be ignored. Required.</p>
</td>
</tr>
<tr id="PcmSupportedFormats.frame_rates">
<td><h3 id="PcmSupportedFormats.frame_rates" class="add-link hide-from-toc">5</h3></td>
<td><code>frame_rates</code></td>
<td>
<code>vector&lt;uint32&gt;[64]</code>
</td>
<td><p>Vector of possible frame rates supported in ascending order. Required.</p>
</td>
</tr>
</table>
### PlugState {#PlugState data-text="PlugState"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=138)*
<p>Plug state as returned by the driver.
If the driver reports a <code>plug_detect_capabilities</code> equal to HARDWIRED, then the driver should
respond to <code>WatchPlugState</code> only the first time it is called, with <code>plugged</code> set to true and
<code>plug_state_time</code> set to time '0'.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PlugState.plugged">
<td><h3 id="PlugState.plugged" class="add-link hide-from-toc">1</h3></td>
<td><code>plugged</code></td>
<td>
<code>bool</code>
</td>
<td><p>Stream is currently plugged in. Required</p>
</td>
</tr>
<tr id="PlugState.plug_state_time">
<td><h3 id="PlugState.plug_state_time" class="add-link hide-from-toc">2</h3></td>
<td><code>plug_state_time</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code>
</td>
<td><p>Timestamps the information provided in the rest of the fields of this struct. Required.</p>
</td>
</tr>
</table>
### RingBufferProperties {#RingBufferProperties data-text="RingBufferProperties"}
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=59)*
<p>Properties of the ring buffer. These values don't change once the ring buffer is created.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="RingBufferProperties.external_delay">
<td><h3 id="RingBufferProperties.external_delay" class="add-link hide-from-toc">1</h3></td>
<td><code>external_delay</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>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.
If not included <code>external_delay</code> is unknown.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Deprecated: 9</span></div>
</td>
</tr>
<tr id="RingBufferProperties.fifo_depth">
<td><h3 id="RingBufferProperties.fifo_depth" class="add-link hide-from-toc">2</h3></td>
<td><code>fifo_depth</code></td>
<td>
<code>uint32</code>
</td>
<td><p>Size (in bytes) representing a temporary buffer used by the driver in order to consume or
generate the ring buffer contents. Required.
The ring buffer contents must be produced and consumed at the rate specified with the
<code>CreateRingBuffer</code> 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 <code>fifo_depth</code> bytes. For capture the data is produced by the driver
holding up to <code>fifo_depth</code> bytes at the time before committing it to main system
memory. Hence <code>fifo_depth</code> 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).</p>
<p>To convert <code>fifo_depth</code> to the corresponding number of audio frames, use the frame size
returned by <code>CreateRingBuffer</code> in the <code>StreamConfig</code> protocol, note that the <code>fifo_depth</code>
is not necessarily a multiple size of an audio frame.</p>
<p>The ring buffer data may be directly consumed/generated by hardware, in this case
<code>fifo_depth</code> 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.</p>
<p>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 <code>fifo_depth</code> 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 <code>CreateRingBuffer</code> and <code>Start</code> commands. For capture, the
<code>fifo_depth</code> held back amount is set large enough such that the driver guarantees no
undetected underruns when generating the data as determined by the <code>CreateRingBuffer</code> and
<code>Start</code> commands. The driver must set <code>fifo_depth</code> 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.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Deprecated: 9</span></div>
</td>
</tr>
<tr id="RingBufferProperties.needs_cache_flush_or_invalidate">
<td><h3 id="RingBufferProperties.needs_cache_flush_or_invalidate" class="add-link hide-from-toc">3</h3></td>
<td><code>needs_cache_flush_or_invalidate</code></td>
<td>
<code>bool</code>
</td>
<td><p>When set to true, indicates that the ring buffer runs in a different cache coherency domain,
hence clients need to make sure that their data has been flushed all the way to main 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).</p>
<p>When set to false, indicates that the ring buffer runs in the same cache coherency domain,
hence the driver does not require flushing/invalidation, as in there is no hardware external
to the CPUs reading/writing from/to main memory bypassing the CPUs.
Note that in this case the driver and client still need to make sure they synchronize their
access to the data, for instance inserting the appropriate acquire fences before reading
and release fences after writing.</p>
<p>Required.</p>
</td>
</tr>
<tr id="RingBufferProperties.turn_on_delay">
<td><h3 id="RingBufferProperties.turn_on_delay" class="add-link hide-from-toc">4</h3></td>
<td><code>turn_on_delay</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>The driver's best estimate of the amount of time it takes the hardware to actually start
playback/capture, after a channel is activated by <code>SetActiveChannels</code>.
Restated: the driver estimates that after <code>SetActiveChannels</code> enables a channel, its data
will resume flowing at approximately <code>set_time</code> + <code>turn_on_delay</code>.
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 <code>turn_on_delay</code> is unknown.</p>
</td>
</tr>
<tr id="RingBufferProperties.driver_transfer_bytes">
<td><h3 id="RingBufferProperties.driver_transfer_bytes" class="add-link hide-from-toc">5</h3></td>
<td><code>driver_transfer_bytes</code></td>
<td>
<code>uint32</code>
</td>
<td><p>Size (in bytes) representing a temporary buffer used by the driver/HW in order to transfer
(consume or produce) the ring buffer contents.</p>
<p>The ring buffer contents must be produced and consumed at the rate specified with the
<code>CreateRingBuffer</code> 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 <code>driver_transfer_bytes</code>. For capture, the data is produced by the
driver holding up to <code>driver_transfer_bytes</code> at a time before committing it to the ring
buffer.</p>
<p>Let's define ‘begin pointer’ and 'end pointer' as position pointers in the ring buffer,
represented as 'B' and 'E' in the figures below, that bound the portion of the ring buffer
that are unsafe for reading or writing by the client at a given point in time.</p>
<h2>Playback</h2>
<p>For playback, it is safe for a client to write only to the part of the ring buffer that is
not simultaneously being read by the driver/HW. Before the ring buffer is started, clients
of output devices may write initial data starting at the very beginning of the ring buffer
at least <code>driver_transfer_bytes</code> of audio since they must always stay at least that far
ahead of where the driver/HW is reading. Note that if the client does not write to the
beginning of the ring buffer, then it is relying on the zeroed-out contents of the VMO as
the initial audio to be read by the driver/HW.
It is therefore not safe for the client to copy additional data to the ring buffer between
'B' and 'E', the part already in use which may or may not already be consumed. The client
may safely write to any other portion of the ring buffer from 'E' to '0/B'.</p>
<pre><code> Ring Buffer
+-------------------------+-------------------------------------------------------------+
|&lt;--- unsafe ---&gt;|&lt;--- safe (empty) ---&gt;|
|&lt;`driver_transfer_bytes`&gt;| |
+-------------------------+-------------------------------------------------------------+
0/B E 0
</code></pre>
<p>As time passes, the driver/HW reads the data in chunks of unknown size (up to the amount of
<code>driver_transfer_bytes</code>) at the rate specified in <code>CreateRingBuffer</code>, and the begin/end
pointers move to the right of '0' at the same rate. As a result, the area to which it is
unsafe for the client to write moves gradually forward through the ring buffer, but
maintains a constant size equal to <code>driver_transfer_bytes</code>. For instance after some time we
now have:</p>
<pre><code> Ring Buffer
+------------+-------------------------+------------------------------------------------+
[&lt;-- safe --&gt;|&lt;--- unsafe ---&gt;|&lt;-- safe (empty) --&gt;|
| |&lt;`driver_transfer_bytes`&gt;| |
+------------+-------------------------+------------------------------------------------+
0 B E 0
</code></pre>
<p>In steady state, i.e. once the process has wrapped around the ring buffer, any area outside
of the pointers 'B' and 'E' is safe to write:</p>
<pre><code> Ring Buffer
+--------------------------------+-------------------------+----------------------------+
[&lt;-- safe --&gt;|&lt;--- unsafe ---&gt;|&lt;-- safe --&gt;|
| |&lt;`driver_transfer_bytes`&gt;| |
+--------------------------------+-------------------------+----------------------------+
0 B E 0
</code></pre>
<h2>Recording</h2>
<p>For recording, it is safe for a client to read only the part of the ring buffer that is not
simultaneously being written by the driver/HW. At the moment when the ring buffer is started
by the client, the driver has not written any amount of data to the ring buffer, so there
is nothing for the client to read:</p>
<pre><code> Ring Buffer
+---------------------------------------------------------------------------------------+
[&lt;--- empty --&gt;|
+---------------------------------------------------------------------------------------+
0/B/E 0
</code></pre>
<p>The driver/HW begins writing to the ring buffer starting at '0'. As time passes, the
driver/HW writes data in chunks of unknown size (up to <code>driver_transfer_bytes</code>) at the rate
specified in <code>CreateRingBuffer</code>. Until an amount of data equal to <code>driver_transfer_bytes</code>
has been written into the ring buffer by the driver/HW, it is not safe for the client to
read any data:</p>
<pre><code> Ring Buffer
+----------------+----------------------------------------------------------------------+
[&lt;--- unsafe ---&gt;|&lt;-- empty --&gt;|
|&lt;`driver_transfer_bytes`&gt;| |
+----------------+----------------------------------------------------------------------+
0/B E 0
</code></pre>
<p>Once <code>driver_transfer_bytes</code> of data have been copied into the ring buffer by the driver/HW,
it is safe for the client to read the data from '0' to 'B'. It is unsafe to read the data
from ‘B’ to ‘E’, the area in which the driver/HW is simultaneously writing. This unsafe
area moves gradually forward through the ring buffer, but maintains a constant size equal
to <code>driver_transfer_bytes</code>. For instance after some time we now have:</p>
<pre><code> Ring Buffer
+------------+-------------------------+------------------------------------------------+
[&lt;-- safe --&gt;|&lt;--- unsafe ---&gt;|&lt;-- empty --&gt;|
| |&lt;`driver_transfer_bytes`&gt;| |
+------------+-------------------------+------------------------------------------------+
0 B E 0
</code></pre>
<p>In steady state, i.e. once the process has wrapped around the ring buffer, any area outside
of the pointers 'B' and 'E' is safe to read:</p>
<pre><code> Ring Buffer
+--------------------------------+-------------------------+----------------------------+
[&lt;-- safe --&gt;|&lt;--- unsafe ---&gt;|&lt;-- safe --&gt;|
| |&lt;`driver_transfer_bytes`&gt;| |
+--------------------------------+-------------------------+----------------------------+
0 B E 0
</code></pre>
<h2>Hardware versus software</h2>
<p>The ring buffer data may be directly consumed/generated by hardware, i.e.
<code>driver_transfer_bytes</code> can be mapped directly to the size of a hardware FIFO block, since a
hardware FIFO block determines the upper limit amount of data read ahead or held back.
Note that if the FIFO buffer is used in a &quot;ping pong&quot; manner (such that only half the FIFO
buffer size is copied at a time), and this is true not only on steady state but also the
very first time the driver copies data to or from the ring buffer, then
<code>driver_transfer_bytes</code> may be set to half the FIFO buffer size. If the hardware at any time
copies data to/from the ring buffer in an amount equal to the entire FIFO buffer size (for
instance the first copy from the ring buffer to fill an initially empty hardware FIFO), then
<code>driver_transfer_bytes</code> must be set to the entire size of the FIFO buffer.</p>
<p>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 <code>driver_transfer_bytes</code> 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 <code>CreateRingBuffer</code> and <code>Start</code> commands. For capture, the
<code>driver_transfer_bytes</code> held back amount is set large enough such that the driver guarantees
no undetected underruns when generating the data as determined by the <code>CreateRingBuffer</code> and
<code>Start</code> commands.</p>
<p>This size must not include the impact of any delays caused by hardware or software
processing abstracted by the driver; those are communicated by the <code>internal_delay</code> and
<code>external_delay</code> fields in <code>DelayInfo</code> and are entirely orthogonal to this value.</p>
<p>Required.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: HEAD</span></div>
</td>
</tr>
</table>
### StreamProperties {#StreamProperties data-text="StreamProperties"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=154)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="StreamProperties.unique_id">
<td><h3 id="StreamProperties.unique_id" class="add-link hide-from-toc">1</h3></td>
<td><code>unique_id</code></td>
<td>
<code>uint8[16]</code>
</td>
<td><p>A unique identifier. If not included, there is no unique id for the StreamConfig.
<code>unique_id</code> arrays starting with 0x42, 0x54, ... (or <code>BT</code> in ASCII) are
reserved for drivers implementing Bluetooth technologies.
<code>unique_id</code> arrays starting with 0x55, 0x53, 0x42, ... (or <code>USB</code> in ASCII) are
reserved for drivers implementing USB technologies.
Note that even though the above values map to readable ASCII characters, array
values can span the entire uint8 range (0-255).</p>
</td>
</tr>
<tr id="StreamProperties.is_input">
<td><h3 id="StreamProperties.is_input" class="add-link hide-from-toc">2</h3></td>
<td><code>is_input</code></td>
<td>
<code>bool</code>
</td>
<td><p>Stream type is input or output. Required.</p>
</td>
</tr>
<tr id="StreamProperties.can_mute">
<td><h3 id="StreamProperties.can_mute" class="add-link hide-from-toc">3</h3></td>
<td><code>can_mute</code></td>
<td>
<code>bool</code>
</td>
<td><p>Gain mute capability. If not included, the StreamConfig can't mute.</p>
</td>
</tr>
<tr id="StreamProperties.can_agc">
<td><h3 id="StreamProperties.can_agc" class="add-link hide-from-toc">4</h3></td>
<td><code>can_agc</code></td>
<td>
<code>bool</code>
</td>
<td><p>Automatic Gain Control (AGC) capability. If not included, the StreamConfig can't AGC.</p>
</td>
</tr>
<tr id="StreamProperties.min_gain_db">
<td><h3 id="StreamProperties.min_gain_db" class="add-link hide-from-toc">5</h3></td>
<td><code>min_gain_db</code></td>
<td>
<code>float32</code>
</td>
<td><p>Minimum gain in decibels. Required.</p>
</td>
</tr>
<tr id="StreamProperties.max_gain_db">
<td><h3 id="StreamProperties.max_gain_db" class="add-link hide-from-toc">6</h3></td>
<td><code>max_gain_db</code></td>
<td>
<code>float32</code>
</td>
<td><p>Maximum gain in decibels. Required.</p>
</td>
</tr>
<tr id="StreamProperties.gain_step_db">
<td><h3 id="StreamProperties.gain_step_db" class="add-link hide-from-toc">7</h3></td>
<td><code>gain_step_db</code></td>
<td>
<code>float32</code>
</td>
<td><p>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 <code>max_gain_db</code> - <code>min_gain_db</code>.
Required.</p>
</td>
</tr>
<tr id="StreamProperties.plug_detect_capabilities">
<td><h3 id="StreamProperties.plug_detect_capabilities" class="add-link hide-from-toc">8</h3></td>
<td><code>plug_detect_capabilities</code></td>
<td>
<code><a class='link' href='#PlugDetectCapabilities'>PlugDetectCapabilities</a></code>
</td>
<td><p>Plug Detect Capabilities. Required.</p>
</td>
</tr>
<tr id="StreamProperties.manufacturer">
<td><h3 id="StreamProperties.manufacturer" class="add-link hide-from-toc">9</h3></td>
<td><code>manufacturer</code></td>
<td>
<code>string[256]</code>
</td>
<td><p>UI string for the manufacturer name. If not included, the manufacturer is unspecified.</p>
</td>
</tr>
<tr id="StreamProperties.product">
<td><h3 id="StreamProperties.product" class="add-link hide-from-toc">10</h3></td>
<td><code>product</code></td>
<td>
<code>string[256]</code>
</td>
<td><p>UI string for the product name. If not included, the product name is unspecified.</p>
</td>
</tr>
<tr id="StreamProperties.clock_domain">
<td><h3 id="StreamProperties.clock_domain" class="add-link hide-from-toc">11</h3></td>
<td><code>clock_domain</code></td>
<td>
<code><a class='link' href='#ClockDomain'>ClockDomain</a></code>
</td>
<td><p>An identifier for the clock domain in which this hardware operates. If
two hardware devices have the same clock domain, their clock rates are
identical and perfectly synchronized. Although these two clocks have the
same rate, the clock positions may be offset from each other by an
arbitrary (but fixed) amount. The clock_domain typically comes from a
system wide entity, such as a platform bus or global clock tree.</p>
<p>There are two special values:</p>
<ul>
<li>
<p>CLOCK_DOMAIN_MONOTONIC means the hardware is operating at the same
rate as the system montonic clock.</p>
</li>
<li>
<p>CLOCK_DOMAIN_EXTERNAL means the hardware is operating at an unknown
rate and is not synchronized with any known clock, not even with
other clocks in domain CLOCK_DOMAIN_EXTERNAL.</p>
</li>
</ul>
<p>If the domain is not CLOCK_DOMAIN_MONOTONIC, client must use position
notification updates to recover the hardware's clock.</p>
<p>Required.</p>
</td>
</tr>
</table>
### SupportedFormats {#SupportedFormats data-text="SupportedFormats"}
*Defined in [fuchsia.hardware.audio/stream.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=58)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="SupportedFormats.pcm_supported_formats">
<td><h3 id="SupportedFormats.pcm_supported_formats" class="add-link hide-from-toc">1</h3></td>
<td><code>pcm_supported_formats</code></td>
<td>
<code><a class='link' href='#PcmSupportedFormats'>PcmSupportedFormats</a></code>
</td>
<td><p>Supported formats for non-compressed PCM samples with attributes. Required.</p>
</td>
</tr>
</table>
## **UNIONS**
### Codec_GetDaiFormats_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Codec_GetDaiFormats_Result data-text="Codec_GetDaiFormats_Result"}
*Defined in [fuchsia.hardware.audio/codec.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec.fidl;l=179)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Codec_GetDaiFormats_Result.response">
<td><h3 id="Codec_GetDaiFormats_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Codec_GetDaiFormats_Response'>Codec_GetDaiFormats_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Codec_GetDaiFormats_Result.err">
<td><h3 id="Codec_GetDaiFormats_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>
### Codec_SetDaiFormat_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Codec_SetDaiFormat_Result data-text="Codec_SetDaiFormat_Result"}
*Defined in [fuchsia.hardware.audio/codec.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/codec.fidl;l=187)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Codec_SetDaiFormat_Result.response">
<td><h3 id="Codec_SetDaiFormat_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Codec_SetDaiFormat_Response'>Codec_SetDaiFormat_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Codec_SetDaiFormat_Result.err">
<td><h3 id="Codec_SetDaiFormat_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>
### DaiFrameFormat [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#DaiFrameFormat data-text="DaiFrameFormat"}
*Defined in [fuchsia.hardware.audio/dai_format.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=28)*
<p>Either a standard or custom frame format.</p>
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="DaiFrameFormat.frame_format_standard">
<td><h3 id="DaiFrameFormat.frame_format_standard" class="add-link hide-from-toc">1</h3></td>
<td><code>frame_format_standard</code></td>
<td>
<code><a class='link' href='#DaiFrameFormatStandard'>DaiFrameFormatStandard</a></code>
</td>
<td><p>The format type of all samples in the DAI, listed in <code>DaiFrameFormatStandard</code>.</p>
</td>
</tr>
<tr id="DaiFrameFormat.frame_format_custom">
<td><h3 id="DaiFrameFormat.frame_format_custom" class="add-link hide-from-toc">2</h3></td>
<td><code>frame_format_custom</code></td>
<td>
<code><a class='link' href='#DaiFrameFormatCustom'>DaiFrameFormatCustom</a></code>
</td>
<td><p>The format type of all samples in the DAI, specified in <code>DaiFrameFormatCustom</code>.</p>
</td>
</tr>
</table>
### Dai_GetDaiFormats_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Dai_GetDaiFormats_Result data-text="Dai_GetDaiFormats_Result"}
*Defined in [fuchsia.hardware.audio/dai.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai.fidl;l=50)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Dai_GetDaiFormats_Result.response">
<td><h3 id="Dai_GetDaiFormats_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Dai_GetDaiFormats_Response'>Dai_GetDaiFormats_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Dai_GetDaiFormats_Result.err">
<td><h3 id="Dai_GetDaiFormats_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>
### Dai_GetRingBufferFormats_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Dai_GetRingBufferFormats_Result data-text="Dai_GetRingBufferFormats_Result"}
*Defined in [fuchsia.hardware.audio/dai.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai.fidl;l=58)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Dai_GetRingBufferFormats_Result.response">
<td><h3 id="Dai_GetRingBufferFormats_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Dai_GetRingBufferFormats_Response'>Dai_GetRingBufferFormats_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Dai_GetRingBufferFormats_Result.err">
<td><h3 id="Dai_GetRingBufferFormats_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>
### RingBuffer_GetVmo_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#RingBuffer_GetVmo_Result data-text="RingBuffer_GetVmo_Result"}
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=351)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="RingBuffer_GetVmo_Result.response">
<td><h3 id="RingBuffer_GetVmo_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#RingBuffer_GetVmo_Response'>RingBuffer_GetVmo_Response</a></code>
</td>
<td></td>
</tr>
<tr id="RingBuffer_GetVmo_Result.err">
<td><h3 id="RingBuffer_GetVmo_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='#GetVmoError'>GetVmoError</a></code>
</td>
<td></td>
</tr>
</table>
### RingBuffer_SetActiveChannels_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RingBuffer_SetActiveChannels_Result data-text="RingBuffer_SetActiveChannels_Result"}
*Defined in [fuchsia.hardware.audio/ring_buffer.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/ring_buffer.fidl;l=399)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="RingBuffer_SetActiveChannels_Result.response">
<td><h3 id="RingBuffer_SetActiveChannels_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#RingBuffer_SetActiveChannels_Response'>RingBuffer_SetActiveChannels_Response</a></code>
</td>
<td></td>
</tr>
<tr id="RingBuffer_SetActiveChannels_Result.err">
<td><h3 id="RingBuffer_SetActiveChannels_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="CLOCK_DOMAIN_EXTERNAL">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=22">CLOCK_DOMAIN_EXTERNAL</a></td>
<td>
<code>4294967295</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="CLOCK_DOMAIN_MONOTONIC">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=21">CLOCK_DOMAIN_MONOTONIC</a></td>
<td>
<code>0</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_CHANNELS_IN_RING_BUFFER">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=11">MAX_COUNT_CHANNELS_IN_RING_BUFFER</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_CHANNEL_SETS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=13">MAX_COUNT_CHANNEL_SETS</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_DAI_FORMATS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai.fidl;l=10">MAX_COUNT_DAI_FORMATS</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_DAI_SUPPORTED_BITS_PER_SAMPLE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=11">MAX_COUNT_DAI_SUPPORTED_BITS_PER_SAMPLE</a></td>
<td>
<code>8</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_DAI_SUPPORTED_BITS_PER_SLOT">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=10">MAX_COUNT_DAI_SUPPORTED_BITS_PER_SLOT</a></td>
<td>
<code>8</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_DAI_SUPPORTED_FRAME_FORMATS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=8">MAX_COUNT_DAI_SUPPORTED_FRAME_FORMATS</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_DAI_SUPPORTED_NUMBER_OF_CHANNELS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=6">MAX_COUNT_DAI_SUPPORTED_NUMBER_OF_CHANNELS</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_DAI_SUPPORTED_RATES">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=9">MAX_COUNT_DAI_SUPPORTED_RATES</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_DAI_SUPPORTED_SAMPLE_FORMATS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai_format.fidl;l=7">MAX_COUNT_DAI_SUPPORTED_SAMPLE_FORMATS</a></td>
<td>
<code>4</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_FORMATS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=18">MAX_COUNT_FORMATS</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_SUPPORTED_BYTES_PER_SAMPLE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=16">MAX_COUNT_SUPPORTED_BYTES_PER_SAMPLE</a></td>
<td>
<code>8</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_SUPPORTED_NUMBER_OF_CHANNELS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=12">MAX_COUNT_SUPPORTED_NUMBER_OF_CHANNELS</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_SUPPORTED_RATES">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=15">MAX_COUNT_SUPPORTED_RATES</a></td>
<td>
<code>64</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_SUPPORTED_SAMPLE_FORMATS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=14">MAX_COUNT_SUPPORTED_SAMPLE_FORMATS</a></td>
<td>
<code>3</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_COUNT_SUPPORTED_VALID_BITS_PER_SAMPLE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=17">MAX_COUNT_SUPPORTED_VALID_BITS_PER_SAMPLE</a></td>
<td>
<code>8</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_DAI_UI_STRING_SIZE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/dai.fidl;l=9">MAX_DAI_UI_STRING_SIZE</a></td>
<td>
<code>256</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="MAX_UI_STRING_SIZE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=10">MAX_UI_STRING_SIZE</a></td>
<td>
<code>256</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
<tr id="UNIQUE_ID_SIZE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=9">UNIQUE_ID_SIZE</a></td>
<td>
<code>16</code>
</td>
<td><code>uint32</code></td>
<td></td>
</tr>
</table>
## **ALIASES**
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="ClockDomain">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.audio/stream.fidl;l=20">ClockDomain</a></td>
<td>
<code>uint32</code></td>
<td></td>
</tr>
</table>