struct audio_stream_cmd_set_gain_req
Defined at line 225 of file ../../zircon/system/public/zircon/device/audio.h
AUDIO_STREAM_CMD_SET_GAIN
Request that a stream change its gain settings to most closely match those
requested. Gain values for Valid requests will be rounded to the nearest
gain step. For example, if a stream can control its gain on the range from
-60.0 to 0.0 dB, a request to set the gain to -33.3 dB will result in a gain
of -33.5 being applied.
Gain change requests outside of the capabilities of the stream's
amplifier will be rejected with a result of ZX_ERR_INVALID_ARGS. Using the
previous example, requests for gains of -65.0 or +3dB would be rejected.
Similarly, If an amplifier is capable of gain control but cannot mute, a
request to mute will be rejected.
TODO(johngro) : Is this the correct behavior? Should we just apply sensible
limits instead? IOW - If the user requests a gain of -1000 dB, should we
just set the gain to -60dB? Likewise, if they request mute but the amplifier
has no hard mute feature, should we just set the gain to the minimum
permitted gain?
May be used with the NO_ACK flag.
Public Members
audio_cmd_hdr hdr
audio_set_gain_flags_t flags
float gain