pub enum DaiRequest {
GetHealthState {
responder: DaiGetHealthStateResponder,
},
SignalProcessingConnect {
protocol: ServerEnd<SignalProcessingMarker>,
control_handle: DaiControlHandle,
},
Reset {
responder: DaiResetResponder,
},
GetProperties {
responder: DaiGetPropertiesResponder,
},
GetDaiFormats {
responder: DaiGetDaiFormatsResponder,
},
GetRingBufferFormats {
responder: DaiGetRingBufferFormatsResponder,
},
CreateRingBuffer {
dai_format: DaiFormat,
ring_buffer_format: Format,
ring_buffer: ServerEnd<RingBufferMarker>,
control_handle: DaiControlHandle,
},
}
Expand description
For an overview see Digital Audio Interface.
§Deprecation
Not supported anymore, instead use an Audio Composite with one DAI and one Ring Buffer, see Audio Drivers Architecture
Variants§
GetHealthState
Retrieves top level health state. A driver not responding promptly can be used as an indication of an unhealthy driver.
Fields
responder: DaiGetHealthStateResponder
SignalProcessingConnect
Connect to a SignalProcessing
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
protocol
channel (not the channel upon which SignalProcessingConnect
is being called)
will be closed with a ZX_ERR_ALREADY_BOUND
epitaph.
If signal processing is not supported at all, then the protocol
channel (again, not the
channel upon which SignalProcessingConnect
is being called) will be closed with a
ZX_ERR_NOT_SUPPORTED
epitaph.
This method is named SignalProcessingConnect
instead of Connect
because this protocol
is intended to be composed, and hence the more verbose name allows differentiation and
improved clarity.
Reset
Resets the DAI HW. The ring_buffer
channel obtained via CreateRingBuffer
may be closed
by the driver, in this case the client needs to obtain a new ring_buffer
.
Reset
returns when the reset is completed. If the driver can’t successfully reset the HW,
it will close the DAI protocol channel, in this case the client may obtain a new DAI
protocol channel and retry.
Fields
responder: DaiResetResponder
GetProperties
Retrieves top level static properties.
Fields
responder: DaiGetPropertiesResponder
GetDaiFormats
Retrieves the DAI formats supported by the DAI, if not available at the time the DAI
may reply with an error status and the client may retry at a later time.
Retrieving multiple DaiSupportedFormats
allows for cases where exclusive combinations of
the parameters in SupportedFormats may be supported.
Fields
responder: DaiGetDaiFormatsResponder
GetRingBufferFormats
Retrieves the ring buffer formats supported by the DAI, if not available at the time the DAI
may reply with an error status and the client may retry at a later time.
Retrieving multiple SupportedFormats
allows for cases where exclusive combinations of
the parameters in SupportedFormats
may be supported.
Fields
responder: DaiGetRingBufferFormatsResponder
CreateRingBuffer
CreateRingBuffer
is sent by clients to select both a DAI format and a ring buffer format
based on information that the driver provides in GetDaiFormats
and GetRingBufferFormats
,
what is supported by the client, and any other requirement. The ring_buffer
channel is
used to control the audio buffer, if a previous ring buffer channel had been established and
was still active, the driver must close that (ring buffer) channel and make every attempt to
gracefully quiesce any on-going streaming operations in the process.
Implementations§
Source§impl DaiRequest
impl DaiRequest
pub fn into_get_health_state(self) -> Option<DaiGetHealthStateResponder>
pub fn into_signal_processing_connect( self, ) -> Option<(ServerEnd<SignalProcessingMarker>, DaiControlHandle)>
pub fn into_reset(self) -> Option<DaiResetResponder>
pub fn into_get_properties(self) -> Option<DaiGetPropertiesResponder>
pub fn into_get_dai_formats(self) -> Option<DaiGetDaiFormatsResponder>
pub fn into_get_ring_buffer_formats( self, ) -> Option<DaiGetRingBufferFormatsResponder>
pub fn into_create_ring_buffer( self, ) -> Option<(DaiFormat, Format, ServerEnd<RingBufferMarker>, DaiControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL