class TestBase
Defined at line 109 of file ../../src/media/audio/drivers/tests/test_base.h
TestBase methods are used by both BasicTest and AdminTest cases.
Public Methods
void TestBase (const DeviceEntry & device_entry)
Defined at line 111 of file ../../src/media/audio/drivers/tests/test_base.h
Protected Methods
void SetUp ()
Device discovery is done once at binary open; a fresh FIDL channel is used for each test.
Defined at line 41 of file ../../src/media/audio/drivers/tests/test_base.cc
void TearDown ()
Defined at line 77 of file ../../src/media/audio/drivers/tests/test_base.cc
template <typename DeviceType, typename ConnectorType = void>
fidl::InterfaceHandle<DeviceType> ConnectWithTrampoline (const DeviceEntry & device_entry)
Given this device_entry, use its channel to open the device.
Defined at line 145 of file ../../src/media/audio/drivers/tests/test_base.cc
template <typename DeviceType>
DeviceType Connect (const DeviceEntry & device_entry)
Defined at line 158 of file ../../src/media/audio/drivers/tests/test_base.cc
void ConnectToBluetoothDevice ()
Defined at line 102 of file ../../src/media/audio/drivers/tests/test_base.cc
const DeviceEntry & device_entry ()
Defined at line 129 of file ../../src/media/audio/drivers/tests/test_base.h
DeviceType device_type ()
Defined at line 130 of file ../../src/media/audio/drivers/tests/test_base.h
DriverType driver_type ()
Defined at line 131 of file ../../src/media/audio/drivers/tests/test_base.h
const std::vector<fuchsia::hardware::audio::PcmSupportedFormats> & ring_buffer_pcm_formats ()
Defined at line 168 of file ../../src/media/audio/drivers/tests/test_base.h
void CreateCodecFromChannel (fidl::InterfaceHandle<fuchsia::hardware::audio::Codec> channel)
Defined at line 170 of file ../../src/media/audio/drivers/tests/test_base.cc
std::vector<fuchsia::hardware::audio::PcmSupportedFormats> & ring_buffer_pcm_formats ()
Defined at line 173 of file ../../src/media/audio/drivers/tests/test_base.h
std::vector<fuchsia::hardware::audio::DaiSupportedFormats> & dai_formats ()
Defined at line 177 of file ../../src/media/audio/drivers/tests/test_base.h
fidl::InterfacePtr<fuchsia::hardware::audio::Codec> & codec ()
Defined at line 182 of file ../../src/media/audio/drivers/tests/test_base.h
void CreateCompositeFromChannel (fidl::InterfaceHandle<fuchsia::hardware::audio::Composite> channel)
Defined at line 182 of file ../../src/media/audio/drivers/tests/test_base.cc
fidl::InterfacePtr<fuchsia::hardware::audio::Composite> & composite ()
Defined at line 183 of file ../../src/media/audio/drivers/tests/test_base.h
fidl::InterfacePtr<fuchsia::hardware::audio::Dai> & dai ()
Defined at line 184 of file ../../src/media/audio/drivers/tests/test_base.h
fidl::InterfacePtr<fuchsia::hardware::audio::StreamConfig> & stream_config ()
Defined at line 185 of file ../../src/media/audio/drivers/tests/test_base.h
void WaitForError (zx::duration wait_duration)
Defined at line 189 of file ../../src/media/audio/drivers/tests/test_base.h
void CreateDaiFromChannel (fidl::InterfaceHandle<fuchsia::hardware::audio::Dai> channel)
Defined at line 194 of file ../../src/media/audio/drivers/tests/test_base.cc
void CreateStreamConfigFromChannel (fidl::InterfaceHandle<fuchsia::hardware::audio::StreamConfig> channel)
Defined at line 205 of file ../../src/media/audio/drivers/tests/test_base.cc
std::optional<BaseProperties> & properties ()
Defined at line 211 of file ../../src/media/audio/drivers/tests/test_base.h
const std::optional<BaseProperties> & properties ()
Defined at line 212 of file ../../src/media/audio/drivers/tests/test_base.h
std::optional<bool> IsIncoming ()
Defined at line 436 of file ../../src/media/audio/drivers/tests/test_base.cc
void RequestHealthAndExpectHealthy ()
Requests on protocols that are composesd into StreamConfig/Dai/Codec/Composite.
fuchsia.hardware.audio.Health
We expect a response, and we allow 'healthy' to be either unspecified or TRUE.
Defined at line 221 of file ../../src/media/audio/drivers/tests/test_base.cc
void GetHealthState (fuchsia::hardware::audio::Health::GetHealthStateCallback cb)
Defined at line 228 of file ../../src/media/audio/drivers/tests/test_base.cc
void RetrieveProperties ()
BasicTest (non-destructive) and AdminTest (destructive or RingBuffer) cases both need to
know at least whether ring buffers are outgoing or incoming, so this is implemented in this
shared parent class.
Defined at line 245 of file ../../src/media/audio/drivers/tests/test_base.cc
void ValidateProperties ()
Defined at line 357 of file ../../src/media/audio/drivers/tests/test_base.cc
void DisplayBaseProperties ()
For debugging purposes
Defined at line 397 of file ../../src/media/audio/drivers/tests/test_base.cc
void RetrieveDaiFormats ()
BasicTest (non-destructive) and AdminTest (destructive or RingBuffer) cases both need to
know the supported formats, so this is implemented in this shared parent class.
Defined at line 458 of file ../../src/media/audio/drivers/tests/test_base.cc
void ValidateDaiFormatSets (const std::vector<fuchsia::hardware::audio::DaiSupportedFormats> & dai_format_sets)
Fail if the returned formats are not complete, unique and within ranges.
Consider defining FIDL constants for min/max channels, frame_rate, bits_per_slot/sample, etc.
Defined at line 499 of file ../../src/media/audio/drivers/tests/test_base.cc
void LogDaiFormatSets (const std::vector<fuchsia::hardware::audio::DaiSupportedFormats> & dai_format_sets, const std::string & tag)
For debugging purposes
Defined at line 632 of file ../../src/media/audio/drivers/tests/test_base.cc
void ValidateDaiFormat (const fuchsia::hardware::audio::DaiFormat & dai_format)
Defined at line 768 of file ../../src/media/audio/drivers/tests/test_base.cc
void LogDaiFormat (const fuchsia::hardware::audio::DaiFormat & format, const std::string & tag)
For debugging purposes
Defined at line 792 of file ../../src/media/audio/drivers/tests/test_base.cc
void GetMinDaiFormat (fuchsia::hardware::audio::DaiFormat & min_dai_format_out)
Defined at line 740 of file ../../src/media/audio/drivers/tests/test_base.cc
void GetMaxDaiFormat (fuchsia::hardware::audio::DaiFormat & max_dai_format_out)
Defined at line 754 of file ../../src/media/audio/drivers/tests/test_base.cc
const std::vector<fuchsia::hardware::audio::DaiSupportedFormats> & dai_formats ()
Defined at line 803 of file ../../src/media/audio/drivers/tests/test_base.cc
void RetrieveRingBufferFormats ()
Request that the driver return the format ranges that it supports.
Defined at line 808 of file ../../src/media/audio/drivers/tests/test_base.cc
void ValidateRingBufferFormatSets (const std::vector<fuchsia::hardware::audio::PcmSupportedFormats> & rb_format_sets)
Fail if the returned formats are not complete, unique and within ranges.
Defined at line 854 of file ../../src/media/audio/drivers/tests/test_base.cc
void ValidateRingBufferFormat (const fuchsia::hardware::audio::PcmFormat & rb_format)
Defined at line 1045 of file ../../src/media/audio/drivers/tests/test_base.cc
void LogRingBufferFormat (const fuchsia::hardware::audio::PcmFormat & format, const std::string & tag)
Defined at line 1057 of file ../../src/media/audio/drivers/tests/test_base.cc
const fuchsia::hardware::audio::PcmFormat & min_ring_buffer_format ()
Defined at line 1066 of file ../../src/media/audio/drivers/tests/test_base.cc
const fuchsia::hardware::audio::PcmFormat & max_ring_buffer_format ()
Defined at line 1070 of file ../../src/media/audio/drivers/tests/test_base.cc
void SetMinMaxRingBufferFormats ()
Defined at line 984 of file ../../src/media/audio/drivers/tests/test_base.cc
void SetMinMaxDaiFormats ()
Defined at line 672 of file ../../src/media/audio/drivers/tests/test_base.cc