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>
sprintf() is a bit dangerous unless you explicitly know your type size
and want to keep it in sync always. Its safer to just use snprintf() and
ensure your string doesn't overflow and is NULL terminated.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The state management can run at low priority, add --nice and --sched-idle
options to set the scheduler.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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>
For the plug-and-play hardware, like USB devices, it may be helpful
to manage the sound state periodically, before the devices are removed.
This change implements new commands 'daemon' and 'rdaemon' to save
the sound state in defined intervals when the sound controls are changed.
The udev rules can notify the daemon using the 'kill' or 'nrestore'
commands to rescan available cards in the system.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
- store new configuration to file + ".new" extension, rename later
- free the configuration tree on exit from load_state()/save_state()
- call snd_config_update_free_global() at the end of command blocks
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
There are some devices around supporting this sample rate so let's make
speaker-test capable to deal with them.
Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Automake-1.13 removed long obsolete AM_CONFIG_HEADER completely (
http://lists.gnu.org/archive/html/automake/2012-12/msg00038.html )
and errors out upon seeing it.
Attached patch replaces it with proper AC_CONFIG_HEADERS.
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>
Fix the wrong calculation of the size of a container TLV entry, which
resulted in "TLV size error" messages.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When doing control changes by a relative amount, amixer used the wrong
rounding direction, which would make it possible to stay at the same raw
value if the step was not big enough to reach the next value.
Reported-by: Honza Javorek <jan.javorek@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
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>
When we get a notification that an element has been removed, we have to
recreate our internal control representation to avoid accessing freed
memory. (And the checking for SND_CTL_EVENT_MASK_REMOVE should actually
be done correctly while we're at it.)
Signed-off-by: Clemens Ladisch <clemens@ladisch.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>
The surround channel map follows the given channel map from the
driver if available.
Also, the channels can be specified manually via -m option.
Pass the channel map like "FL,FR,FC,LFE".
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>
When alsactl init is invoked and a directory path is passed to INCLUDE
command in the config file, read only *.conf files in that directory.
This will avoid reading backup files or invalid files that have been
created accidentally.
Also by using scandir() with alphasort(), alsactl reads the files in
alphabetical order. Thus it's highly recommended to use some number
prefix to the file name for assuring the order.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The previous code does not work as expected for some period_size
configurations. We do not rely on the period size value, so do not
correlate the avail_min parameter with this value.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
When the global state does not exist, alsactl tries to
initialize all soundcards. It is not good when alsactl
is called multiple times from udev. Also, selinux can deny
access to non-existent devices.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Newer ncurses installs pkg-config files, and these are much easier
to manage when cross-compiling, so default to searching for those.
If they can't be found, we fall back to the existing xxx-config.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>