pub struct DaiProxy { /* private fields */ }
Implementations§
Source§impl DaiProxy
impl DaiProxy
Sourcepub fn take_event_stream(&self) -> DaiEventStream
pub fn take_event_stream(&self) -> DaiEventStream
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 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.
Sourcepub fn get_properties(
&self,
) -> QueryResponseFut<DaiProperties, DefaultFuchsiaResourceDialect>
pub fn get_properties( &self, ) -> QueryResponseFut<DaiProperties, DefaultFuchsiaResourceDialect>
Retrieves top level static properties.
Sourcepub fn get_dai_formats(
&self,
) -> QueryResponseFut<DaiGetDaiFormatsResult, DefaultFuchsiaResourceDialect>
pub fn get_dai_formats( &self, ) -> QueryResponseFut<DaiGetDaiFormatsResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn get_ring_buffer_formats(
&self,
) -> QueryResponseFut<DaiGetRingBufferFormatsResult, DefaultFuchsiaResourceDialect>
pub fn get_ring_buffer_formats( &self, ) -> QueryResponseFut<DaiGetRingBufferFormatsResult, DefaultFuchsiaResourceDialect>
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.
Sourcepub fn create_ring_buffer(
&self,
dai_format: &DaiFormat,
ring_buffer_format: &Format,
ring_buffer: ServerEnd<RingBufferMarker>,
) -> Result<(), Error>
pub fn create_ring_buffer( &self, dai_format: &DaiFormat, ring_buffer_format: &Format, ring_buffer: ServerEnd<RingBufferMarker>, ) -> Result<(), Error>
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.
Trait Implementations§
Source§impl DaiProxyInterface for DaiProxy
impl DaiProxyInterface for DaiProxy
type GetHealthStateResponseFut = QueryResponseFut<HealthState>
type ResetResponseFut = QueryResponseFut<()>
type GetPropertiesResponseFut = QueryResponseFut<DaiProperties>
type GetDaiFormatsResponseFut = QueryResponseFut<Result<Vec<DaiSupportedFormats>, i32>>
type GetRingBufferFormatsResponseFut = QueryResponseFut<Result<Vec<SupportedFormats>, i32>>
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 get_dai_formats(&self) -> Self::GetDaiFormatsResponseFut
fn get_ring_buffer_formats(&self) -> Self::GetRingBufferFormatsResponseFut
fn create_ring_buffer( &self, dai_format: &DaiFormat, ring_buffer_format: &Format, ring_buffer: ServerEnd<RingBufferMarker>, ) -> Result<(), Error>
Source§impl Proxy for DaiProxy
impl Proxy for DaiProxy
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 DaiProxy
impl !RefUnwindSafe for DaiProxy
impl Send for DaiProxy
impl Sync for DaiProxy
impl Unpin for DaiProxy
impl !UnwindSafe for DaiProxy
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
)