Skip to content

Commit 597603d

Browse files
committed
ALSA: introduce the snd-aloop module for the PCM loopback
The snd-aloop module allows redirecting of the PCM playback in the kernel back to the user space using the standard ALSA PCM capture API. The module also allows time synchronization with another timing source and notifications of playback stream parameter changes. Signed-off-by: Jaroslav Kysela <[email protected]>
1 parent 9fe6206 commit 597603d

File tree

3 files changed

+1076
-0
lines changed

3 files changed

+1076
-0
lines changed

sound/drivers/Kconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,25 @@ config SND_DUMMY
7474
To compile this driver as a module, choose M here: the module
7575
will be called snd-dummy.
7676

77+
config SND_ALOOP
78+
tristate "Generic loopback driver (PCM)"
79+
select SND_PCM
80+
help
81+
Say 'Y' or 'M' to include support for the PCM loopback device.
82+
This module returns played samples back to the user space using
83+
the standard ALSA PCM device. The devices are routed 0->1 and
84+
1->0, where first number is the playback PCM device and second
85+
number is the capture device. Module creates two PCM devices and
86+
configured number of substreams (see the pcm_substreams module
87+
parameter).
88+
89+
The looback device allow time sychronization with an external
90+
timing source using the time shift universal control (+-20%
91+
of system time).
92+
93+
To compile this driver as a module, choose M here: the module
94+
will be called snd-aloop.
95+
7796
config SND_VIRMIDI
7897
tristate "Virtual MIDI soundcard"
7998
depends on SND_SEQUENCER

sound/drivers/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55

66
snd-dummy-objs := dummy.o
7+
snd-aloop-objs := aloop.o
78
snd-mtpav-objs := mtpav.o
89
snd-mts64-objs := mts64.o
910
snd-portman2x4-objs := portman2x4.o
@@ -13,6 +14,7 @@ snd-ml403-ac97cr-objs := ml403-ac97cr.o pcm-indirect2.o
1314

1415
# Toplevel Module Dependency
1516
obj-$(CONFIG_SND_DUMMY) += snd-dummy.o
17+
obj-$(CONFIG_SND_ALOOP) += snd-aloop.o
1618
obj-$(CONFIG_SND_VIRMIDI) += snd-virmidi.o
1719
obj-$(CONFIG_SND_SERIAL_U16550) += snd-serial-u16550.o
1820
obj-$(CONFIG_SND_MTPAV) += snd-mtpav.o

0 commit comments

Comments
 (0)