pub struct CodecSynchronousProxy { /* private fields */ }
Implementations§
Source§impl CodecSynchronousProxy
impl CodecSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<CodecEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<CodecEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_health_state(
&self,
___deadline: MonotonicInstant,
) -> Result<HealthState, Error>
pub fn get_health_state( &self, ___deadline: MonotonicInstant, ) -> Result<HealthState, Error>
Retrieves top level health state. A driver not responding promptly can be used as an indication of an unhealthy driver.
Sourcepub fn signal_processing_connect(
&self,
protocol: ServerEnd<SignalProcessingMarker>,
) -> Result<(), Error>
pub fn signal_processing_connect( &self, protocol: ServerEnd<SignalProcessingMarker>, ) -> Result<(), Error>
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.
Sourcepub fn reset(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn reset(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
Resets the codec.
Reset
returns when the reset is completed. If the driver can’t successfully reset the
codec it will close the codec protocol channel, in this case the client may obtain a new
codec protocol channel and retry.
Sourcepub fn get_properties(
&self,
___deadline: MonotonicInstant,
) -> Result<CodecProperties, Error>
pub fn get_properties( &self, ___deadline: MonotonicInstant, ) -> Result<CodecProperties, Error>
Retrieves top level static properties.
Sourcepub fn stop(&self, ___deadline: MonotonicInstant) -> Result<i64, Error>
pub fn stop(&self, ___deadline: MonotonicInstant) -> Result<i64, Error>
Stops the codec operation.
Stop
returns when configuring the codec to stop is completed. This method does not wait
for the hardware to actually stop playback/capture (i.e. turn_off_delay
impact is not
taken into account), nor is any such delay reflected in the returned stop_time
.
stop_time
indicates when the driver finished configuring the codec to stop, as measured
in the CLOCK_MONOTONIC timeline.
If the driver cannot successfully configure the codec to stop, it will close the codec
protocol channel, in which case the client may obtain a new codec protocol channel and retry.
Sourcepub fn start(&self, ___deadline: MonotonicInstant) -> Result<i64, Error>
pub fn start(&self, ___deadline: MonotonicInstant) -> Result<i64, Error>
Start/Re-start the codec operation.
Start
returns when configuring the codec to start is completed. This method does not wait
for the hardware to actually start playback/capture (i.e. turn_on_delay
impact is not taken
into account), nor is any such delay reflected in the returned start_time
.
start_time
indicates when the driver finished configuring the codec to start, as measured
in the CLOCK_MONOTONIC timeline.
If the driver can’t successfully start the codec, it will close the codec protocol channel,
in which case the client may obtain a new codec protocol channel and retry.
Sourcepub fn is_bridgeable(
&self,
___deadline: MonotonicInstant,
) -> Result<bool, Error>
pub fn is_bridgeable( &self, ___deadline: MonotonicInstant, ) -> Result<bool, Error>
Returns whether a codec is bridgeable.
§Deprecation
Not supported anymore, bridged configurations are no longer changeable at runtime. A driver can still be configured to operate in bridged mode or not at boot time.
Sourcepub fn set_bridged_mode(&self, enable_bridged_mode: bool) -> Result<(), Error>
pub fn set_bridged_mode(&self, enable_bridged_mode: bool) -> Result<(), Error>
Sets a codec’s bridged mode. This method is required, but it only needs to take action if
the codec supports bridged mode as specified by its reply to IsBridgeable
.
§Deprecation
Not supported anymore, bridged configurations are no longer changeable at runtime. A driver can still be configured to operate in bridged mode or not at boot time.
Sourcepub fn get_dai_formats(
&self,
___deadline: MonotonicInstant,
) -> Result<CodecGetDaiFormatsResult, Error>
pub fn get_dai_formats( &self, ___deadline: MonotonicInstant, ) -> Result<CodecGetDaiFormatsResult, Error>
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.
Sourcepub fn set_dai_format(
&self,
format: &DaiFormat,
___deadline: MonotonicInstant,
) -> Result<CodecSetDaiFormatResult, Error>
pub fn set_dai_format( &self, format: &DaiFormat, ___deadline: MonotonicInstant, ) -> Result<CodecSetDaiFormatResult, Error>
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).
Sourcepub fn watch_plug_state(
&self,
___deadline: MonotonicInstant,
) -> Result<PlugState, Error>
pub fn watch_plug_state( &self, ___deadline: MonotonicInstant, ) -> Result<PlugState, Error>
Get the plug detect state via a hanging get. The driver will reply to the first
WatchPlugState
sent by the client. The driver will not respond to subsequent client
WatchPlugState
calls until the plug state changes from what was most recently reported.
Trait Implementations§
Source§impl Debug for CodecSynchronousProxy
impl Debug for CodecSynchronousProxy
Source§impl SynchronousProxy for CodecSynchronousProxy
impl SynchronousProxy for CodecSynchronousProxy
Source§type Proxy = CodecProxy
type Proxy = CodecProxy
Source§type Protocol = CodecMarker
type Protocol = CodecMarker
Proxy
controls.