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>
When -M option is given, amixer handles the volumes in percent unit
with the mapping more intuitive to human ears just like in alsamixer.
The -R option is to take the raw value as the volume percentage.
This mode is still used as default.
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>
When I was reading the source code, I stumbled over this typo causing
Center, LFE, and Surround speakers not to be initialized.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add missing initialization of surround and CLFE playback volumes and
switches. Ditto for "Front Speaker", etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The man page did not document what happens when multiple ports are
specified; this could be misinterpreted as the events being duplicated
so that they are played on all ports simultaneously. As suggested by
Peter Billam, clarify that these ports are only used for multi-port MIDI
files.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
A lot of reports that alsamixer crashes in X terminal when the PulseAudio
CTL plugin is activated were entered to the tracking systems.
I figured that there is a linking clash for the shutdown() function.
The shutdown() function in glibc is socket related, but the alsamixer code
redefines this function and appearently that under some linking
circumstances - which PA client invokes during the runtime dynamic linking
- the wrong function is called.
This patch, for safety, renames the shutdown() function from alsamixer
to app_shutdown(), but it might make sense to figure the real linking
culprit to avoid future surprises.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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>
The alsactl Makefile used 'sed $(SED)' which is going to failed when SED
is actually set. Replaced that with '$(SED)', and a few 'sed' calls in
alsaconf Makefile as well. Added AC_PROG_SED to configure to have it
set.
Fixes: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5363
Fixes: http://bugs.gentoo.org/show_bug.cgi?id=366587
Signed-off-by: Michał Górny <mgorny@gentoo.org>
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>
Current support for handling SND_CTL_TLVT_DB_RANGE in amixer is completely
broken. This patch fixes it.
Reported-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620513
From the Debian bug report:
"The speaker-test manpage could be improved somewhat by helping a
little bit the user determine how to find out the devices he can test.
Based on http://alsa.opensrc.org/Speaker-test I have make some changes
to the manpage (diff attached) to describe a little bit more how
speaker-test can be used alongside 'aplay'.
Please consider the following patch for
alsa-utils-1.0.23/speaker-test/speaker-test.1"
Signed-off-by: Javier Fernández-Sanguino Peña <jfs@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>
When snd_use_case_get_list (and hence also snd_use_case_card_list) returns
an empty list, alsaucm still attempts to free it. This ends up double-
freeing the returned list, or worse, freeing an invalid pointer, depending
on how snd_use_case_get_list gets implemented. Fix alsaucm to return early
on empty lists to avoid this.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
snd_use_case_get_list returns lists of strings that are either:
a) A sequence of single strings
b) A sequence of pairs of strings all flattened into a single list
The current list command assumes layout (b) above, and hence prints
nothing when printing a single-entry list that's actually in layout (a).
Add a new command "list1" to dump lists in layout (a).
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The CD analog playback line is seldom used these days, as all
modern players rip the CD and use the DAC on the sound card.
In addition, it causes background hum on some machines.
Therefore keep it muted by default.
BugLink: http://bugs.launchpad.net/bugs/747184
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
exp10 is a glibc extension, which isn't supported on uClibc. Luckily,
exp10() is trivial to compute based on exp(), so add a wrapper for
the uClibc case.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
add one argument to list to avoid error message, do not list
comments as verbs
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>