pub struct CompositeProxy { /* private fields */ }
Implementations§
Source§impl CompositeProxy
impl CompositeProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.audio/Composite.
Sourcepub fn take_event_stream(&self) -> CompositeEventStream
pub fn take_event_stream(&self) -> CompositeEventStream
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<CompositeResetResult, DefaultFuchsiaResourceDialect>
pub fn reset( &self, ) -> QueryResponseFut<CompositeResetResult, DefaultFuchsiaResourceDialect>
Resets the hardware including all DAI interconnects and signal processing.
As a result, all channels obtained by CreateRingBuffer
will be closed.
Reset
returns when the hardware is fully reset. At this point, a client would need to
reconfigure any DAI interconnects, select a signal processing topology and reconfigure
any processing elements, and reconstruct any ring buffers.
If the driver can’t successfully reset the hardware, it will return an error and then close the protocol channel, in this case the client may obtain a new protocol channel and retry.
Sourcepub fn get_properties(
&self,
) -> QueryResponseFut<CompositeProperties, DefaultFuchsiaResourceDialect>
pub fn get_properties( &self, ) -> QueryResponseFut<CompositeProperties, DefaultFuchsiaResourceDialect>
Retrieves top level static properties.
Sourcepub fn get_ring_buffer_formats(
&self,
processing_element_id: u64,
) -> QueryResponseFut<CompositeGetRingBufferFormatsResult, DefaultFuchsiaResourceDialect>
pub fn get_ring_buffer_formats( &self, processing_element_id: u64, ) -> QueryResponseFut<CompositeGetRingBufferFormatsResult, DefaultFuchsiaResourceDialect>
Retrieves the ring buffer formats supported by a RING_BUFFER
processing element
in the topology supported by this driver as returned by GetElements
from
fuchsia.hardware.audio.signalprocessing.
Returns SHOULD_WAIT
if the ring buffer formats are not available at the time, the
client may retry at a later time.
Returns INVALID_ARGS
if the processing_element_id
does not match an id returned
by GetElements
.
Returns WRONG_TYPE
if the ElementType
of the element represented by the id is not
RING_BUFFER
.
Retrieving multiple SupportedFormats
allows for cases where exclusive combinations of
the parameters in SupportedFormats
may be supported.
Sourcepub fn create_ring_buffer(
&self,
processing_element_id: u64,
format: &Format,
ring_buffer: ServerEnd<RingBufferMarker>,
) -> QueryResponseFut<CompositeCreateRingBufferResult, DefaultFuchsiaResourceDialect>
pub fn create_ring_buffer( &self, processing_element_id: u64, format: &Format, ring_buffer: ServerEnd<RingBufferMarker>, ) -> QueryResponseFut<CompositeCreateRingBufferResult, DefaultFuchsiaResourceDialect>
CreateRingBuffer
is sent by clients to select a ring buffer format for the RING_BUFFER
processing element specified by processing_element_id
. The format is based on information
that the driver provides in GetRingBufferFormats
, what is supported by the client, and
any other requirement. The returned ring_buffer
channel is used to access and control the
audio buffer provided by the driver.
Returns INVALID_ARGS
if the processing_element_id
does not match an id returned
by GetElements
.
Returns WRONG_TYPE
if the ElementType
of the element represented by the id is not
RING_BUFFER
.
Sourcepub fn get_dai_formats(
&self,
processing_element_id: u64,
) -> QueryResponseFut<CompositeGetDaiFormatsResult, DefaultFuchsiaResourceDialect>
pub fn get_dai_formats( &self, processing_element_id: u64, ) -> QueryResponseFut<CompositeGetDaiFormatsResult, DefaultFuchsiaResourceDialect>
Retrieves the DAI formats supported by a DAI_INTERCONNECT
processing element
in the topology supported by this driver as returned by GetElements
from
fuchsia.hardware.audio.signalprocessing.
Returns SHOULD_WAIT
if the DAI formats are not available at the time, the client
may retry at a later time.
Returns INVALID_ARGS
if the processing_element_id
does not match an id returned
by GetElements
.
Returns WRONG_TYPE
if the ElementType
of the element represented by the id is not
DAI_INTERCONNECT
.
Retrieving multiple DaiSupportedFormats
allows for cases where exclusive combinations of
the parameters in SupportedFormats may be supported.
Sourcepub fn set_dai_format(
&self,
processing_element_id: u64,
format: &DaiFormat,
) -> QueryResponseFut<CompositeSetDaiFormatResult, DefaultFuchsiaResourceDialect>
pub fn set_dai_format( &self, processing_element_id: u64, format: &DaiFormat, ) -> QueryResponseFut<CompositeSetDaiFormatResult, DefaultFuchsiaResourceDialect>
SetDaiFormat
is sent by clients to select a DAI format for the DAI_INTERCONNECT
processing element specified by processing_element_id
. The format is based on information
that the driver provides in GetDaiFormats
, what is supported by the client, and any other
requirement.
Returns INVALID_ARGS
if the processing_element_id
does not match an id returned
by GetElements
.
Returns WRONG_TYPE
if the ElementType
of the element represented by the id is not
DAI_INTERCONNECT
.
Trait Implementations§
Source§impl Clone for CompositeProxy
impl Clone for CompositeProxy
Source§fn clone(&self) -> CompositeProxy
fn clone(&self) -> CompositeProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl CompositeProxyInterface for CompositeProxy
impl CompositeProxyInterface for CompositeProxy
type GetHealthStateResponseFut = QueryResponseFut<HealthState>
type ResetResponseFut = QueryResponseFut<Result<(), DriverError>>
type GetPropertiesResponseFut = QueryResponseFut<CompositeProperties>
type GetRingBufferFormatsResponseFut = QueryResponseFut<Result<Vec<SupportedFormats>, DriverError>>
type CreateRingBufferResponseFut = QueryResponseFut<Result<(), DriverError>>
type GetDaiFormatsResponseFut = QueryResponseFut<Result<Vec<DaiSupportedFormats>, DriverError>>
type SetDaiFormatResponseFut = QueryResponseFut<Result<(), DriverError>>
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_ring_buffer_formats( &self, processing_element_id: u64, ) -> Self::GetRingBufferFormatsResponseFut
fn create_ring_buffer( &self, processing_element_id: u64, format: &Format, ring_buffer: ServerEnd<RingBufferMarker>, ) -> Self::CreateRingBufferResponseFut
fn get_dai_formats( &self, processing_element_id: u64, ) -> Self::GetDaiFormatsResponseFut
fn set_dai_format( &self, processing_element_id: u64, format: &DaiFormat, ) -> Self::SetDaiFormatResponseFut
Source§impl Debug for CompositeProxy
impl Debug for CompositeProxy
Source§impl Proxy for CompositeProxy
impl Proxy for CompositeProxy
Source§type Protocol = CompositeMarker
type Protocol = CompositeMarker
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 CompositeProxy
impl !RefUnwindSafe for CompositeProxy
impl Send for CompositeProxy
impl Sync for CompositeProxy
impl Unpin for CompositeProxy
impl !UnwindSafe for CompositeProxy
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
)