class SimpleCodecClient
Defined at line 32 of file ../../src/media/audio/lib/simple-codec/include/lib/simple-codec/simple-codec-client.h
This class provides simple audio DAI controller drivers a way to communicate with codecs using
the audio codec protocol. The methods in the protocol have been converted to always return a
status in case there is not reply (after kDefaultTimeoutNsecs or the timeout specified via the
SetTimeout() method). This class is thread hostile.
Public Methods
void ~SimpleCodecClient ()
Defined at line 15 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
zx_status_t SetCodec (fidl::ClientEnd<fuchsia_hardware_audio::Codec> channel_local)
Convenience methods not part of the audio codec protocol.
Initialize the client using the fidl codec client. Other methods must not be called
until after SetCodec() has been called and returned ZX_OK.
Defined at line 17 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
void SimpleCodecClient (async_dispatcher_t * dispatcher)
If dispatcher is not specified, this object will start its own dispatcher thread for handling
async calls. Otherwise, dispatcher must remain valid while this object exists, and will be
passed to SimpleCodecClients that are move constructed from this one.
Defined at line 37 of file ../../src/media/audio/lib/simple-codec/include/lib/simple-codec/simple-codec-client.h
zx_status_t Reset ()
Sync C++ methods to communicate with codecs, for descriptions see
//docs/concepts/drivers/driver_interfaces/audio_codec.md.
Methods are simplified to use standard C++ types (see simple-codec-types.h) and also:
- Only allow standard frame formats (DaiFrameFormatStandard, see
//sdk/fidl/fuchsia.hardware.audio/dai_format.fidl).
- GetDaiFormats returns one DaiSupportedFormats instead of a vector (still allows supported
formats with multiple frame rates, number of channels, etc. just not overly complex ones).
- No direct calls to WatchPlugState, the library only expects "hardwired" codecs.
Defined at line 146 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
zx::result<Info> GetInfo ()
Defined at line 152 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
zx_status_t Stop ()
Defined at line 148 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
zx_status_t Start ()
Defined at line 150 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
zx::result<DaiSupportedFormats> GetDaiFormats ()
Defined at line 172 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
zx::result<CodecFormatInfo> SetDaiFormat (DaiFormat format)
Defined at line 203 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
zx::result<GainFormat> GetGainFormat ()
Defined at line 239 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
zx::result<GainState> GetGainState ()
Defined at line 241 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc
void SetGainState (GainState state)
Defined at line 246 of file ../../src/media/audio/lib/simple-codec/simple-codec-client.cc