class SetElementState
Defined at line 407 of file fidling/gen/sdk/fidl/fuchsia.audio.device/fuchsia.audio.device/cpp/fidl/fuchsia.audio.device/cpp/markers.h
Controls the processing element specified by `processing_element_id`, a unique ElementId
returned by `GetElements`.
The `state` specified in calls to `SetElementState` is a `SettableElementState`. This is a
subset of `ElementState` because some fields returned by `WatchElementState` (e.g. `latency`
or `plug_state`) can only be observed (not set) by the client.
Returns `ZX_ERR_INVALID_ARGS` if `processing_element_id` does not match a known ElementId
returned by `GetElements`, or if `state` is not valid for the element. This entails any
violation of the rules specified in this protocol.
Examples:
`state` specifies that an element should be stopped or bypassed, but the corresponding
element does not specify (or explicitly set to false) `can_stop` or `can_bypass`.
`state` includes a `type_specific` entry, but that `SettableTypeSpecificElementState` does
not match the `ElementType` of the element corresponding to `processing_element_id`.
`state` changes an `EqualizerBandState` for an `EQUALIZER` element (so far so good), but
specifies a change to `frequency` when this element did not set `CAN_CONTROL_FREQUENCY`
in its `supported_controls`.
`state` specifies a `GainElementState` for a `GAIN` element with a `gain` value that is
-infinity, NAN, or outside the Element's stated [`min_gain`, `max_gain`] range.
Callers may intersperse method calls to the `SignalProcessing` protocol with calls to other
driver protocols. Some non-`SignalProcessing` configuration changes may require a
renegotiation of the driver state before certain elements can receive a `SetElementState`.
For example, if a `DaiFormat` is changed, then `SetElementState` changing an `AGL` element's
parameters may not require renegotiation of driver state because changing gain parameters
usually does not change the set of supported audio formats.
By contrast, following the same `DaiFormat` change, before `SetElementState` can be called
on a `CONNECTION_POINT` element, the driver state may need to be reestablished because the
format change may invalidate the set of supported formats returned in a previous
`GetDaiFormats` protocol call for another part of the Topology.
It is the driver's job to determine when renegotiation is required. When this is needed,
the related `SetElementState` call must return `ZX_ERR_BAD_STATE` and the client must
close the protocol channel entirely, such that the protocol negotiations are started over.
The client then must re-invoke the `SetElementState` call that returned
`ZX_ERR_BAD_STATE` before any non-`SignalProcessing` protocol calls.
Public Members
static const bool kHasClientToServer
static const bool kHasClientToServerBody
static const bool kHasServerToClient
static const bool kHasServerToClientBody
static const bool kHasNonEmptyUserFacingResponse
static const bool kHasDomainError
static const bool kHasFrameworkError
static const uint64_t kOrdinal