It is required (exclude the fatal SIGABRT) to call snd_pcm_close() and
the end of work (outside of the interrupt handler). Use new snd_pcm_abort()
function to inform alsa-lib to not ignore EINTR and move the in_aborting
variable to the global scope to be checked in the i/o loops.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
When aplay/arecord are called without any argument the application hangs forever.
Instead of hanging, print the usage and exit.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Now aplay tries to follow the given channel map by rearranging the
channels even when the channel map override isn't allowed but if the
device is still capable to return a channel map.
Also update the man page appropriately.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
With -m option, user can specify the order of channel map.
As of this commit, it just tries to override the channel map, thus it
works only on devices that support the channel map override like HDMI.
Adjusting the channel order in aplay itself will be added later.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AC_SYS_LARGEFILE in configure.in will automatically set up defines so
that open() will support large files if supported, and if not, this
allows us to fall back gracefully to non-LFS open().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Dumping HW parameters of the current device with snd_pcm_hw_params_dump,
a new option --dump-hw-params added.
Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/816388
Reported-by: Chad Dunlap <cldunlap1@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
aplay is limited to 32 channels, which makes it impossible to use it for
testing devices with more channels. here we increase the limit to 256,
which should be sufficient for a virtual device made of 4 64-channel
soundcards.
Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The recent addition of pause/resume control via keyboard brought
a problem when aplay/arecord is invoked in background. For avoiding
regressions, it's safer to use non-interactive mode as default and
enable the new feature via an option.
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The term_c_lflag variable might be unitialized in some cases. Add extra
check to avoid setting of wrong value.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Bring the man file up to date, documenting the signals and all the
options, including those added for audio surveilance.
Signed-off-by: John Sauter <John_Sauter@systemeyescomputerstore.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add signal SIGUSR1 to turn over the output file,
--max-file-time to cause the output file to turn over automatically,
and --use-strftime to create output files based on the current time.
Signed-off-by: John Sauter <John_Sauter@systemeyescomputerstore.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Write the process ID to a file so other programs can
signal aplay. When aplay exits, delete the file.
Signed-off-by: John Sauter <John_Sauter@systemeyescomputerstore.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Report available sample formats in aplay/arecord when currently selected
one doesn't work.
Signed-off-by: Arnout Engelen <alsa2@bzzt.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
I have just discovered a minor logic inversion bug in
aplay/arecord --list-pcms functionality.
Basically, executing "aplay --list-pcms" lists all devices capable of
capture and executing "arecord --list-pcms" lists all devices capable
of playback.
Signed-off-by: Peter Stokes <linux@dadeos.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.
The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
This way the compiler can assume more information about their
interface for optimisation.
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
In some cases (HDA audio) the ring buffer position values returned
from alsa-lib are inaccurate. The added --test-position option will
print suspicious values.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Added the support of stereo VU-meter.
Enabled via -Vs option.
The new option, -V, can be used to enable the VU-meter. Now
VU-meter can be enabled even without -vv.
WAV files with more than 2 channels or with more than 16 bits per samples
can be saved with "extensible format" chunk
(see http://msdn2.microsoft.com/en-us/library/ms713496(VS.85).aspx).
For instance, sox, when converting data to 24- or 32-bits per sample format
uses this format, and aplay was unable to play such file. Now the problem
is solved :-)
Signed-off-by: Pawel MOLL <pawel.moll@st.com>
This patch modifies aplay/arecord to support playing/capturing IEEE float
32-bit WAV files. Tested on HDA hardware in both stereo and multi-channel
modes. Added the WAV file constant for Dolby AC-3 S/PDIF passthrough to
formats.h for future use when AC-3 passthrough is better supported.
Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
snd_pcm_drain() doesn't block when running with O_NONBLOCK.
Reset the non-blocking mode before calling snd_pcm_drain() properly
(and restore again for any further operations).
- remove unused static declaration
- fix double close in signal handler
- fix NULL reference
- fix max file size to stdout with non-raw format
- code clean up
From: Dirk Jagdmann <doj@cubic.org>
This patch will split files in chunks of aprox. 2GB in the interleaved
recording mode of arecord. This is meant to overcome the 2GB filesize
limit of .wav files, which is easily reached when recording multiple
channels.
From: Dirk Jagdmann <doj@cubic.org>
This patch adds an alternative peak meter for aplay/arecord which is
enabled via three "-v" command line arguments. This new mode differs
from the old in a larger meter, no linefeeds for every meter update and
a static maximum peak (for 1s).
This patch converts hyphens to minus signs in the man pages (for options,
emails, or command line examples).
This patch also closes one font modifier in iecset.1.
(s/\fIfalse\fI,/\fIfalse\fP,/)
Signed-off-by: Nicolas FRANCOIS <nicolas.francois@centraliens.net>
- don't parse -X option because such an option doesn't exist
- allow argument for --sleep-min option
- fix handling of .voc magic string
- fix handling of .voc files on big-endian machines
- remove superfluous "size" parameter from check_wavefile_space macro
- reallocate buffer only if needed in check_wavefile_space
- fix playback of >2GB .wav files
- skip over padding bytes in .wav files
- fix memory leak when playing .voc silence blocks
- fix file length when recording >2GB .wav files
- fix recording of >4GB files
arecord doesn't record if you don't indicate the time limit
The problem happens when the Wave-file is checked for it being even.
I have tried with the next change in aplay.c and it seems to work fine.