Commit graph

21 commits

Author SHA1 Message Date
SASANO Takayoshi
613372dc7c Add OpenBSD support
- ERESTART not supported platform: use EINTR instead
- add include/os_compat.h, well-used OS specific definition
- copied include/bswap.h from alsa-lib

- EPIPE and ESTRPIPE are different usage, but currently
  EPIPE is used when ESTRPIPE is not defined.

  To fix this problem, assign ESPIPE instead.

Fixes: https://github.com/alsa-project/alsa-utils/pull/186
Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-03 13:08:44 +01:00
Pavel Hofman
0fd3022e82 alsaloop: fixed parsing value 'auto' of option 'sync'
The value 'auto' was not checked which resulted in using
SYNC_TYPE_NONE instead of SYNC_TYPE_AUTO.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-10-13 14:05:02 +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
Jaroslav Kysela
90bbeb1d3e alsaloop: fix possible memory leak in create_loopback_handle()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-01-08 18:21:39 +01: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
87bcda4b8a alsaloop: add -z,--syslog option to use syslog for errors
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-09-16 14:14:41 +02:00
Jaroslav Kysela
8f57464190 alsaloop: fix wrong alias for signal.h
in POSIX, there is no <sys/signal.h>.

it's merely a legacy alias used by glibc, and the header does nothing
else than including <signal.h>.

so let's do the right thing and use the right name, which works everywhere.

Signed-off-by: John Spencer <maillist-alsa@barfooze.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-07-23 14:57:05 +02:00
Takashi Iwai
c7b9d3e394 alsaloop: Fix missing #endif
Sorry, forgotten.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-30 14:53:12 +01:00
Takashi Iwai
b7ea343820 alsaloop: Make alsaloop working without libsamplerate
When alsaloop is built with libsamplerate, it quits immediately with
  No libsamplerate suppor
message.  It's because the check of -A option and it's set as default
non-zero value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-30 14:35:31 +01: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
e77983d3c5 alsaloop: Fix command-line parsing and pollfd initialization
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-08 22:23:05 +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
f956c329aa alsaloop: fix resample argument parsing
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-07 00:12:38 +02:00
Jaroslav Kysela
5ad13c4825 alsaloop: fix -a option and slave mode processing
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-06 20:34:03 +02:00
Jaroslav Kysela
4fe4d22b73 alsaloop: Fix thread handling
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-06 18:51:29 +02:00
Jaroslav Kysela
ad0e562373 alsaloop: Fix loopbacks pointer initialization and allocation, fix -T option
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-06 18:30:18 +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