linux/sound/drivers
Ivan Orlov 315a3d57c6 ALSA: Implement the new Virtual PCM Test 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
- 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-2-ivan.orlov0322@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-07 13:08:53 +02:00
..
mpu401 ALSA: mpu401: Allocate resources with device-managed APIs 2021-07-19 16:17:30 +02:00
opl3 ALSA: drivers: opl3: Fix incorrect use of vp->state 2021-12-13 10:36:17 +01:00
opl4 ALSA: opl4: More constification 2020-01-05 16:15:08 +01:00
pcsp ALSA: pcsp: Make hrtimer forwarding more robust 2021-09-28 10:58:08 +02:00
vx ALSA: vx: Drop superfluous GFP setup 2022-08-24 08:00:26 +02:00
aloop.c ALSA: aloop: Replace runtime->status->state reference to runtime->state 2022-09-27 08:47:13 +02:00
dummy.c ALSA: dummy: Add customizable volume min/max. 2022-09-12 09:52:10 +02:00
Kconfig ALSA: Implement the new Virtual PCM Test Driver 2023-06-07 13:08:53 +02:00
Makefile ALSA: Implement the new Virtual PCM Test Driver 2023-06-07 13:08:53 +02:00
mtpav.c ALSA: mtpav: Don't call card private_free at probe error path 2022-04-12 17:58:43 +02:00
mts64.c ALSA: mts64: Convert to platform remove callback returning void 2023-03-20 13:07:02 +00:00
pcmtest.c ALSA: Implement the new Virtual PCM Test Driver 2023-06-07 13:08:53 +02:00
portman2x4.c ASoC: Updates for v6.4 2023-04-24 15:15:31 +02:00
serial-generic.c ALSA: Add generic serial MIDI driver using serial bus API 2022-05-12 11:54:13 +02:00
serial-u16550.c ALSA: serial-u16550: Allocate resources with device-managed APIs 2021-07-19 16:17:30 +02:00
virmidi.c ALSA: virmidi: Remove duplicated code 2022-01-06 16:08:18 +01:00