pub struct CodecProxy { /* private fields */ }
Implementations§
Source§impl CodecProxy
impl CodecProxy
Sourcepub fn take_event_stream(&self) -> CodecEventStream
pub fn take_event_stream(&self) -> CodecEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_health_state(
&self,
) -> QueryResponseFut<HealthState, DefaultFuchsiaResourceDialect>
pub fn get_health_state( &self, ) -> QueryResponseFut<HealthState, DefaultFuchsiaResourceDialect>
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) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn reset(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<CodecProperties, DefaultFuchsiaResourceDialect>
pub fn get_properties( &self, ) -> QueryResponseFut<CodecProperties, DefaultFuchsiaResourceDialect>
Retrieves top level static properties.
Sourcepub fn stop(&self) -> QueryResponseFut<i64, DefaultFuchsiaResourceDialect>
pub fn stop(&self) -> QueryResponseFut<i64, DefaultFuchsiaResourceDialect>
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) -> QueryResponseFut<i64, DefaultFuchsiaResourceDialect>
pub fn start(&self) -> QueryResponseFut<i64, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
pub fn is_bridgeable( &self, ) -> QueryResponseFut<bool, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<CodecGetDaiFormatsResult, DefaultFuchsiaResourceDialect>
pub fn get_dai_formats( &self, ) -> QueryResponseFut<CodecGetDaiFormatsResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<CodecSetDaiFormatResult, DefaultFuchsiaResourceDialect>
pub fn set_dai_format( &self, format: &DaiFormat, ) -> QueryResponseFut<CodecSetDaiFormatResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<PlugState, DefaultFuchsiaResourceDialect>
pub fn watch_plug_state( &self, ) -> QueryResponseFut<PlugState, DefaultFuchsiaResourceDialect>
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 Clone for CodecProxy
impl Clone for CodecProxy
Source§fn clone(&self) -> CodecProxy
fn clone(&self) -> CodecProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl CodecProxyInterface for CodecProxy
impl CodecProxyInterface for CodecProxy
type GetHealthStateResponseFut = QueryResponseFut<HealthState>
type ResetResponseFut = QueryResponseFut<()>
type GetPropertiesResponseFut = QueryResponseFut<CodecProperties>
type StopResponseFut = QueryResponseFut<i64>
type StartResponseFut = QueryResponseFut<i64>
type IsBridgeableResponseFut = QueryResponseFut<bool>
type GetDaiFormatsResponseFut = QueryResponseFut<Result<Vec<DaiSupportedFormats>, i32>>
type SetDaiFormatResponseFut = QueryResponseFut<Result<CodecFormatInfo, i32>>
type WatchPlugStateResponseFut = QueryResponseFut<PlugState>
fn get_health_state(&self) -> Self::GetHealthStateResponseFut
fn signal_processing_connect( &self, protocol: ServerEnd<SignalProcessingMarker>, ) -> Result<(), Error>
fn reset(&self) -> Self::ResetResponseFut
fn get_properties(&self) -> Self::GetPropertiesResponseFut
fn stop(&self) -> Self::StopResponseFut
fn start(&self) -> Self::StartResponseFut
fn is_bridgeable(&self) -> Self::IsBridgeableResponseFut
fn set_bridged_mode(&self, enable_bridged_mode: bool) -> Result<(), Error>
fn get_dai_formats(&self) -> Self::GetDaiFormatsResponseFut
fn set_dai_format(&self, format: &DaiFormat) -> Self::SetDaiFormatResponseFut
fn watch_plug_state(&self) -> Self::WatchPlugStateResponseFut
Source§impl Debug for CodecProxy
impl Debug for CodecProxy
Source§impl Proxy for CodecProxy
impl Proxy for CodecProxy
Source§type Protocol = CodecMarker
type Protocol = CodecMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for CodecProxy
impl !RefUnwindSafe for CodecProxy
impl Send for CodecProxy
impl Sync for CodecProxy
impl Unpin for CodecProxy
impl !UnwindSafe for CodecProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)