Because of the way the pcm_read() functions are currently used, returning
rcount or result is equivalent but I feel it is more accurate to
return 'result'.
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix many occurrences of unescaped “-”.
Fix minor English issue.
Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>