Commit graph

13 commits

Author SHA1 Message Date
Pavel Hofman
59464effec alsaloop: Renamed field capt_pitch to ctl_pitch
Renaming capt_pitch to ctl_pitch to respect the naming style of
snd_ctl_elem_value_t fields in loopback_handle. Also making the variable
name suitable for planned support of playback pitch.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-10-28 12:32:22 +02:00
Pavel Hofman
138e53aabb alsaloop: added option prateshift for PLAYSHIFT ctl elem used in PLAYSHIFT
If snd-aloop device is on playback side, the required sync mode is
PLAYSHIFT. That means Loopback ctl elem "PCM Rate Shift 100000" of the
corresponding capture side of the Loopback pipe must be controlled (by
a reciprocal).

ASCII name of the playback rate shift ctl elem is specified with newly
added option -x/--prateshift, e.g.:
  -P hw:Loopback,0 -S playshift \
  -x iface=PCM,name='PCM Rate Shift 100000',device=1

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-10-13 13:52:12 +02:00
Yunhao Tian
ce05208085 alsaloop: Support "Capture Pitch 1000000" rate shift
In Linux 5.14, a new feedback mechanism for USB Audio
Gadget is introduced (commit e89bb428), along with a
new control element "Capture Pitch 1000000". This patch
adds support for this feature. Note that this property
seems to be the reverse of PCM Rate Shift, so we have
to take reciprocal of pitch.

Signed-off-by: Yunhao Tian <t123yh@outlook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-08-23 16:55:36 +02:00
Jaroslav Kysela
b1e3d945b7 Change FSF address (Franklin Street)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:28:53 +01:00
Jaroslav Kysela
e61f35ba4d alsaloop: try adapt avail_min for playback to avoid 100% CPU usage 2016-10-18 13:57:19 +02:00
Jaroslav Kysela
d53eb0309d alsaloop: Delay the restart a bit (to handle snd-aloop playback xruns better)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-20 09:31:01 +02:00
Jaroslav Kysela
513a9c7ad1 alsaloop: fixes, added -W/--wake option
- added -W/--wake option to reduce poll time
- another try to fix the avail_min parameter for playback
- fixed initial silence fill

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-14 11:17:25 +02:00
Jaroslav Kysela
1a35bdf7c6 alsaloop: added xrun profiling support (-U,--xrun), added SIGUSR1 state dump
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-13 23:39:36 +02:00
Jaroslav Kysela
38c2ef96b7 alsaloop: add --pctl and --cctl options
In some cases it might be usefull to specify another CTL device names.
Add -X/--pctl and -Y/--cctl options.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-11 11:53:50 +02:00
Jaroslav Kysela
bee994f509 alsaloop: Fixes and added --workaround option
- added workaround for alsa-lib (pthread configuration parsing issue) -
  the workaround must be activated manually using ('--workaround serialopen')
- fixed avail_min initialization (caused high CPU usage or xruns)
- fixed shared buffer initialization (both capture and playback buffers
  must have equal number of samples in this config)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-11 10:24:14 +02:00
Jaroslav Kysela
147a1cc75c alsaloop: Add OSS mixer redirection support
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-08 15:10:23 +02:00
Jaroslav Kysela
058357f042 alsaloop: added resampling for unsupported soundcard rates
- improve also xrun synchronization

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-07 20:38:36 +02:00
Jaroslav Kysela
1e75673035 Introduce alsaloop utility
alsaloop allows create a PCM loopback between a PCM capture device
and a PCM playback device.

alsaloop supports multiple soundcards, adaptive clock synchronization,
adaptive rate resampling using the samplerate library (if available in
the system). Also, mixer controls can be redirected from one card to
another (for example Master and PCM).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-06 10:01:52 +02:00