class BasicTest

Defined at line 24 of file ../../src/media/audio/drivers/tests/basic_test.h

BasicTest cases must run in environments where an audio driver may already have an active client.

For most hardware functions, testing is limited to validating the correctness and consistency of

the declared capabilities and current state. BasicTest cases CAN _change_ a device's state, but

only if it fully restores the previous state afterward (as it does when testing SetGain).

A driver can have only one RingBuffer client connection at any time, so BasicTest avoids any

usage of the RingBuffer interface. (Note: AdminTest is not limited to RingBuffer cases.)

Public Methods

void BasicTest (const DeviceEntry & dev_entry)

Defined at line 26 of file ../../src/media/audio/drivers/tests/basic_test.h

Protected Methods

float min_gain_db ()

Defined at line 44 of file ../../src/media/audio/drivers/tests/basic_test.h

float max_gain_db ()

Defined at line 45 of file ../../src/media/audio/drivers/tests/basic_test.h

void TearDown ()

Defined at line 60 of file ../../src/media/audio/drivers/tests/basic_test.cc

void WatchGainStateAndExpectUpdate ()

Basic (non-privileged) requests

Request that the driver return its gain capabilities and current state, expecting a response.

TODO(b/315051281): If possible, combine this with the corresponding check of the signalprocessing

gain element, once that test exists.

Defined at line 83 of file ../../src/media/audio/drivers/tests/basic_test.cc

void WatchGainStateAndExpectNoUpdate ()

Request that the driver return its current gain state, expecting no response (no change).

TODO(b/315051281): If possible, combine this with the corresponding check of the signalprocessing

gain element, once that test exists.

Defined at line 126 of file ../../src/media/audio/drivers/tests/basic_test.cc

void SetGainStateChange ()

Determine an appropriate gain state to request, then call other method to request that driver set

gain. This method assumes that the driver already successfully responded to a GetInitialGainState

request. If this device's gain is fixed and cannot be changed, then SKIP the test.

TODO(b/315051281): If possible, combine this with the corresponding check of the signalprocessing

gain element, once that test exists.

Defined at line 139 of file ../../src/media/audio/drivers/tests/basic_test.cc

void SetGainStateNoChange ()

Call SetGain with the current gain state.

Because we expect this to be ignored by the audio driver, we do not set expected_gain_state_.

Defined at line 178 of file ../../src/media/audio/drivers/tests/basic_test.cc

void SetGainStateNoValues ()

Call SetGain without setting `gain_db`, `muted` or `agc_enabled`.

Because we expect this to be ignored by the audio driver, we do not set expected_gain_state_.

Defined at line 189 of file ../../src/media/audio/drivers/tests/basic_test.cc

void SetImpossibleGainDb (float gain_db)

Because this sets `gain_db` values that should be ignored by the audio driver (and we do NOT set

`muted` or `agc_enabled`), we do not set expected_gain_state_.

Defined at line 202 of file ../../src/media/audio/drivers/tests/basic_test.cc

void SetImpossibleMute ()

Set audio driver MUTE to an invalid setting: enable it, if the driver does not support it.

Because we expect this to be ignored by the audio driver, we do not set expected_gain_state_.

Defined at line 215 of file ../../src/media/audio/drivers/tests/basic_test.cc

void SetImpossibleAgc ()

Set audio driver AGC to an invalid setting: enable it, if the driver does not support it.

Because we expect this to be ignored by the audio driver, we do not set expected_gain_state_.

Defined at line 234 of file ../../src/media/audio/drivers/tests/basic_test.cc

void WatchPlugStateAndExpectUpdate ()

Request that the driver return its current plug state, expecting a valid response.

TODO(b/315051014): If possible, combine this with the corresponding plug check of the

signalprocessing endpoint element, once that test exists.

Defined at line 282 of file ../../src/media/audio/drivers/tests/basic_test.cc

void WatchPlugStateAndExpectNoUpdate ()

Request that the driver return its current plug state, expecting no response (no change).

TODO(b/315051014): If possible, combine this with the corresponding plug check of the

signalprocessing endpoint element, once that test exists.

Defined at line 312 of file ../../src/media/audio/drivers/tests/basic_test.cc