Virtual PCM test driver

modulename: snd-pcmtest.ko

configname: CONFIG_SND_PCMTEST

Linux Kernel Configuration
└─>Device Drivers
└─>Sound card support
└─>Advanced Linux Sound Architecture
└─>Generic sound devices
└─>Virtual PCM test driver
In linux kernel since version 4.14.326 (release Date: 2023-09-23)  
Say 'Y' or 'M' to include support for the Virtual PCM test driver.
This driver is aimed at extended testing of the userspace applications
which use the ALSA API, as well as the PCM middle layer testing.

It can generate random or pattern-based data into the capture stream,
check the playback stream for containing the selected pattern, inject
time delays during capture/playback, redefine the RESET ioctl operation
to perform the PCM middle layer testing and inject errors during the
PCM callbacks. It supports both interleaved and non-interleaved access
modes. You can find the corresponding selftest in the 'alsa'
selftests folder.

source code: