m (→Software Coverage)
m (→Running the tests)
|Line 72:||Line 72:|
|| -p || Enables profiling of ioctl calls
|| -p || Enables profiling of ioctl calls
|| -|| Used configuration file
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI functionality to the Linux operating system.
The test cases are:
PCM playback and record cases are generated from a configuration file. Control settings can be specified for each test set. Possible parameters for these cases are:
See section 5 for complete list of test cases.
Current coverage for tests:
Hardware coverage includes audio devices (soundcard).
The tests do not currently support verifying the sound passing through the audio path. Instead, the tester needs to listen to the produced audio to determine final results.
The asynchronous playback tests currently use quite short buffers. While this makes them very sensitive to context switch latency issues, it also means that the tests may fail due to constant underruns on some systems, even if the tested functionality actually works.
Run as root:
This will execute tests using default configuration file, which is; /usr/lib/tests/blts-alsa-core-tests/blts-alsa-core.cnf
Configuration file is platform dependant, see section "Configuration"
The test results are printed to terminal and also to /var/log/tests/blts_alsa_core.txt.
Other possible execution parameters for blts_alsa_core_test:
|-l||Used log file, default blts_alsa_core.txt|
|-e||Execute single or multiple selected tests, for example -e 1,4,5.|
|-en||Execute test by name, for example -en "My test X"|
|-s||Show list of all tests|
|-nc||Do not output log to terminal|
|-p||Enables profiling of ioctl calls|
|-C||Used configuration file|
Configuration file defines ALSA mixer (control) settings and used playback and recording parameters. These settings depend on platform.
[defaults] [control] card 0 set "Master Playback Volume" max set "PCM Playback Volume" max set "Master Playback Switch" off set "Headphone Playback Switch" off set "Front Playback Switch" off set "Capture Switch" off set "IEC958 Playback Switch" off set "IEC958 Default PCM Playback Switch" off [end_control] [end_defaults] [testset] description "front headphone" [control] card 0 set "Master Playback Volume" max set "PCM Playback Volume" max set "Master Playback Switch" on set "Headphone Playback Switch" on set "Front Playback Switch" on [end_control] [playback] card 0 device 0 rates 44100 96000 192000 formats S16_LE channels 2 access INTERLEAVED MMAP_INTERLEAVED NONINTERLEAVED hw_resampling 1 async SYNC duration 5 freq 1000 [end_playback] [end_testset] [testset] description "digital" [control] card 0 set "Master Playback Volume" max set "PCM Playback Volume" max set "Master Playback Switch" on set "IEC958 Playback Source" PCM set "IEC958 Playback Switch" on [end_control] [playback] card 0 device 1 rates 44100 96000 192000 formats S16_LE channels 2 access INTERLEAVED MMAP_INTERLEAVED hw_resampling 1 async SYNC duration 5 freq 1000 [end_playback] [end_testset] [testset] description "front mic with max volume" [control] card 0 set "Input Source" "Front Mic" set "Capture Switch" on set "Capture Volume" max set "Front Mic Boost" min [end_control] [recording] card 0 device 0 rates 44100 96000 192000 formats S16_LE channels 2 access INTERLEAVED MMAP_INTERLEAVED hw_resampling 1 duration 5 [end_recording] [end_testset]
The above configuration file produces following test cases:
Defines default control element settings. These settings are applied before and after each test case. Defaults -section can contain only [control] section(s).
Defines a set of settings for playback and/or recording tests. A configuration file can contain multiple testset sections, and settings within one section do not interfere with other testset sections. If testset section contains multiple playback/recording sections, the tests from each recording/playback section are executed in parallel.
Defines mixer (control) settings. The settings are applied in the given order before playback or recording. Currently the settings are not restored to original state after playback or recording finishes.
Defines PCM parameters for playback and recording.
Some of the variables allow multiple values, and the test cases are created as a combination of all values.
Defines Bluetooth audio settings. If a Bluetooth A2DP device is defined here, it will be connected for the duration of the test. Pairing a device is not supported as yet, and should be done before testing.
Note that just connecting to a device is usually not enough for sound output. In most cases platform-specific mixer settings are needed.
Defines v4l2 tuner settings. Possible variables: device "" : Used tuner device, for example "/dev/radio0" freq X : Used frequency in kHz. scan_select X : Scan for channels and select channel X. This works only with devices capable of hardware frequency seek (VIDIOC_S_HW_FREQ_SEEK).
The test module can be compiled to both a self-sufficient command line program and a Min test framework module. Debian packaging is provided.
|0.1||14-sep-2010||Iekku Huttunen||Draft||Page created|