Enumerations
enum DriverType
| Name | Value |
|---|---|
| Codec | 0 |
| Composite | 1 |
| Dai | 2 |
| StreamConfigInput | 3 |
| StreamConfigOutput | 4 |
Defined at line 41 of file ../../src/media/audio/drivers/tests/test_base.h
enum DeviceType
| Name | Value |
|---|---|
| A2DP | 0 |
| BuiltIn | 1 |
| Virtual | 2 |
Defined at line 49 of file ../../src/media/audio/drivers/tests/test_base.h
Records
-
class AdminTest -
class AudioDeviceEnumeratorStub -
class BasicTest -
class CodecStart -
class CodecStop -
class CompositeDaiFormats -
class CompositeHealth -
class CompositeProperties -
class CompositeRingBufferFormats -
class CompositeUnknownMethod -
class DaiElementStates -
class DaiElements -
class DaiFormats -
class DeviceEntry -
class DeviceHost -
class DisplayDaiFormatSets -
class DriverReservesRingBufferSpace -
class DynamicsElementStates -
class DynamicsElements -
class ElementTopologyClosure -
class EqualizerElementStates -
class EqualizerElements -
class ExternalDelayIsValid -
class GainElementStates -
class GainElements -
class GetBuffer -
class GetDelayInfoAfterDroppingFirstRingBuffer -
class GetDelayInfoAfterStart -
class GetDelayInfoSecondTimeNoResponse -
class GetElements -
class GetInitialGainState -
class GetInitialPlugState -
class GetProperties -
class GetRingBufferProperties -
class GetRingBufferPropertiesAfterDroppingFirstRingBuffer -
class GetTopologies -
class Health -
class InitialElementStates -
class InitialTopology -
class InternalDelayIsValid -
class NoMorePositionNotifyAfterStop -
class PositionNotifyAfterStop -
class PositionNotifyBeforeStart -
class PositionNotifyFast -
class PositionNotifyNone -
class PositionNotifySlow -
class PositionTest -
class Reset -
class RingBufferFormats -
class RingBufferStart -
class RingBufferStartBeforeGetVmoShouldDisconnect -
class RingBufferStartWhileStartedShouldDisconnect -
class RingBufferStartWhileStartingShouldDisconnect -
class RingBufferStop -
class RingBufferStopBeforeGetVmoShouldDisconnect -
class RingBufferStopWhileStoppedIsPermitted -
class SetActiveChannelsAfterDroppingFirstRingBuffer -
class SetActiveChannelsChange -
class SetActiveChannelsNoChange -
class SetActiveChannelsTooHigh -
class SetDynamicsElementState -
class SetElementState -
class SetElementStateNoChange -
class SetElementStateUnknownIdShouldError -
class SetEqualizerElementState -
class SetGainChangedCausesNotification -
class SetGainElementState -
class SetGainElementStateInvalidGain -
class SetGainElementStateNoChange -
class SetGainInvalidAgcIsIgnored -
class SetGainInvalidGainValuesAreIgnored -
class SetGainInvalidMuteIsIgnored -
class SetGainNoValuesMeansNoChange -
class SetGainOutOfRangeGainValuesAreIgnored -
class SetGainUnchangedDoesNotCauseNotification -
class SetTopology -
class SetTopologyNoChange -
class SetTopologyUnknownIdShouldError -
class TestBase -
class VendorSpecificElementStates -
class VendorSpecificElements -
class WatchElementStateUnknownIdShouldDisconnect -
class WatchElementStateWhilePendingShouldDisconnect -
class WatchGainSecondTimeNoResponse -
class WatchPlugSecondTimeNoResponse -
class WatchTopologyWhilePendingShouldDisconnect
Functions
-
void CooldownAfterDriverDisconnect ()Audio drivers can have multiple StreamConfig channels open, but only one can be 'privileged':
the one that can in turn create a RingBuffer channel. Each test case starts from scratch,
opening and closing channels. If we create a StreamConfig channel before the previous one is
cleared, a new StreamConfig channel will not be privileged, and Admin tests will fail.
When disconnecting a StreamConfig, there's no signal to wait on before proceeding (potentially
immediately executing other tests); insert a 10-ms wait (needing >3.5ms was never observed).
Defined at line 33 of file ../../src/media/audio/drivers/tests/durations.h
-
void CooldownAfterRingBufferDisconnect ()When disconnecting a RingBuffer, there's no signal to wait on before proceeding (potentially
immediately executing other tests); insert a 100-ms wait. This wait is even more important for
error cases that cause the RingBuffer to disconnect: without it, subsequent test cases that use
the RingBuffer may receive unexpected errors (e.g. ZX_ERR_PEER_CLOSED or ZX_ERR_INVALID_ARGS).
We need this wait when testing a "real hardware" driver (i.e. on realtime-capable systems). For
this reason a hardcoded time constant, albeit a test antipattern, is (grudgingly) acceptable.
TODO(https://fxbug.dev/42064975): investigate why we fail without this delay, fix the
drivers/test as necessary, and eliminate this workaround.
Defined at line 47 of file ../../src/media/audio/drivers/tests/durations.h
-
void CooldownAfterSignalProcessingDisconnect ()Defined at line 51 of file ../../src/media/audio/drivers/tests/durations.h
-
std::string DevNameForEntry (const DeviceEntry & device_entry)Used in registering separate test case instances for each enumerated device
See googletest/docs/advanced.md for details
Devices are displayed in the 'audio-output/a1b2c3d4' format, with 'Virtual' as the filename if
this is a virtualaudio instance we added, or 'A2DP' if this is a Bluetooth instance we added.
Defined at line 86 of file ../../src/media/audio/drivers/tests/test_base.h
-
std::string TestNameForEntry (const std::string & test_class_name, const DeviceEntry & device_entry)Defined at line 103 of file ../../src/media/audio/drivers/tests/test_base.h
-
std::ostream & operator<< (std::ostream & out, const DriverType & dev_dir)ostream formatting for DriverType
Defined at line 238 of file ../../src/media/audio/drivers/tests/test_base.h
-
void RegisterPositionTestsForDevice (const DeviceEntry & device_entry)Defined at line 254 of file ../../src/media/audio/drivers/tests/position_test.cc
-
std::ostream & operator<< (std::ostream & out, const DeviceType & device_type)ostream formatting for DeviceType
Defined at line 254 of file ../../src/media/audio/drivers/tests/test_base.h
-
std::ostream & operator<< (std::ostream & out, const std::optional<fuchsia::hardware::audio::PlugDetectCapabilities> & plug_caps)ostream formatting for optional
<PlugDetectCapabilities
>
Defined at line 266 of file ../../src/media/audio/drivers/tests/test_base.h
-
std::ostream & operator<< (std::ostream & out, fuchsia::hardware::audio::DaiSampleFormat sample_format)ostream formatting for DaiSampleFormat
Defined at line 281 of file ../../src/media/audio/drivers/tests/test_base.h
-
std::ostream & operator<< (std::ostream & out, fuchsia::hardware::audio::DaiFrameFormatStandard format)ostream formatting for DaiFrameFormatStandard
Defined at line 296 of file ../../src/media/audio/drivers/tests/test_base.h
-
std::ostream & operator<< (std::ostream & out, fuchsia::hardware::audio::DaiFrameFormatCustom format)ostream formatting for DaiFrameFormatCustom
Defined at line 317 of file ../../src/media/audio/drivers/tests/test_base.h
-
std::ostream & operator<< (std::ostream & out, fuchsia::hardware::audio::DaiFrameFormat format)ostream formatting for DaiFrameFormat
Defined at line 326 of file ../../src/media/audio/drivers/tests/test_base.h
-
std::ostream & operator<< (std::ostream & out, std::optional<std::array<uint8_t, 16>> id)ostream formatting for optional
<UniqueId
>
Defined at line 339 of file ../../src/media/audio/drivers/tests/test_base.h
-
void RegisterBasicTestsForDevice (const DeviceEntry & device_entry)Defined at line 515 of file ../../src/media/audio/drivers/tests/basic_test.cc
-
void RegisterAdminTestsForDevice (const DeviceEntry & device_entry)Defined at line 3179 of file ../../src/media/audio/drivers/tests/admin_test.cc
Variables
const zx::duration kWaitForErrorDuration
Defined at line 13 of file ../../src/media/audio/drivers/tests/durations.h
const bool kLogDetailedPositionInfo
Defined at line 13 of file ../../src/media/audio/drivers/tests/position_test.h
const zx::duration kDriverDisconnectCooldownDuration
Defined at line 16 of file ../../src/media/audio/drivers/tests/durations.h
const zx::duration kRingBufferDisconnectCooldownDuration
Defined at line 20 of file ../../src/media/audio/drivers/tests/durations.h
const zx::duration kSignalProcessingDisconnectCooldownDuration
Defined at line 24 of file ../../src/media/audio/drivers/tests/durations.h
const size_t kUniqueIdLength
Defined at line 26 of file ../../src/media/audio/drivers/tests/test_base.h
const bool kTolerateNonTerminalDaiEndpoints
Defined at line 29 of file ../../src/media/audio/drivers/tests/admin_test.cc
const bool kDisplayElementsAndTopologies
Defined at line 30 of file ../../src/media/audio/drivers/tests/admin_test.cc
const bool kDisplayDaiFormatSets
Defined at line 31 of file ../../src/media/audio/drivers/tests/admin_test.cc