linux-stable/tools
Ivan Orlov 10b98a4db1 selftests: ALSA: Add test for the 'pcmtest' driver
This test covers the new Virtual PCM Test Driver, including the capturing,
playback and ioctl redefinition functionalities for both interleaved and
non-interleaved access modes. This test is also helpful as an usage example
of the 'pcmtest' driver.

We have a lot of different virtual media drivers, which can be used for
testing of the userspace applications and media subsystem middle layer.
However, all of them are aimed at testing the video functionality and
simulating the video devices. For audio devices we have only snd-dummy
module, which is good in simulating the correct behavior of an ALSA device.
I decided to write a tool, which would help to test the userspace ALSA
programs (and the PCM middle layer as well) under unusual circumstances
to figure out how they would behave. So I came up with this Virtual PCM
Test Driver.

This new Virtual PCM Test Driver has several features which can be useful
during the userspace ALSA applications testing/fuzzing, or testing/fuzzing
of the PCM middle layer. Not all of them can be implemented using the
existing virtual drivers (like dummy or loopback). Here is what can this
driver do:

- Simulate both capture and playback processes
- Generate random or pattern-based capture data
- Check the playback stream for containing the looped pattern
- Inject delays into the playback and capturing processes
- Inject errors during the PCM callbacks

Also, this driver can check the playback stream for containing the
predefined pattern, which is used in the corresponding selftest to check
the PCM middle layer data transferring functionality. Additionally, this
driver redefines the default RESET ioctl, and the selftest covers this PCM
API functionality as well.

The driver supports both interleaved and non-interleaved access modes, and
have separate pattern buffers for each channel. The driver supports up to
4 channels and up to 8 substreams.

Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230606193254.20791-3-ivan.orlov0322@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-07 13:09:03 +02:00
..
accounting delayacct: track delays from IRQ/SOFTIRQ 2023-04-18 16:39:34 -07:00
arch Disable building BPF based features by default for v6.4. 2023-05-07 11:32:18 -07:00
bootconfig
bpf Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
build
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv
iio
include Disable building BPF based features by default for v6.4. 2023-05-07 11:32:18 -07:00
io_uring
kvm/kvm_stat
laptop
leds
lib Disable building BPF based features by default for v6.4. 2023-05-07 11:32:18 -07:00
memory-model LKMM scripting updates for v6.4 2023-04-24 12:02:25 -07:00
mm slab changes for 6.4 2023-04-25 13:00:41 -07:00
net/ynl tools: ynl: Rename ethtool to ethtool.py 2023-04-13 22:18:29 -07:00
objtool Objtool changes for v6.4: 2023-04-28 14:02:54 -07:00
pci
pcmcia
perf Disable building BPF based features by default for v6.4. 2023-05-07 11:32:18 -07:00
power Power management updates for 6.4-rc1 2023-04-25 18:44:10 -07:00
rcu
scripts sh updates for v6.4 2023-04-27 17:41:23 -07:00
spi
testing selftests: ALSA: Add test for the 'pcmtest' driver 2023-06-07 13:09:03 +02:00
thermal
time
tracing rtla/timerlat: Fix "Previous IRQ" auto analysis' line 2023-04-25 19:26:59 -04:00
usb
verification rv: Fix addition on an uninitialized variable 'run' 2023-04-25 17:02:13 -04:00
virtio tools/virtio: fix build caused by virtio_ring changes 2023-04-21 03:02:35 -04:00
wmi
Makefile tools/Makefile: do missed s/vm/mm/ 2023-04-18 14:22:12 -07:00