Commit graph

1655 commits

Author SHA1 Message Date
Takashi Iwai
8188c2466a alsa-info: Don't try update when wget isn't available
... otherwise it overwrites a zero size file.  Also add a check of
zero size file in the update procedure, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27 21:29:06 +02:00
Takashi Sakamoto
f3abdeea00 amixer: expand local storage for item name according to kernel code
According to kernel code (snd_ctl_elem_init_enum_names() in
sound/core/control.c), the maximum length of item name is 63 characters
(+ 1 terminator = 64 bytes). But current amixer implementation
uses 40 bytes. This causes name truncation and fail to operation.

This commit fixes this bug by expanding the length of local variables.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09 08:11:05 +02:00
Peter Meerwald
1a19ec1538 amixer: Don't set only the first item in sset_enum()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-05 11:05:44 +01:00
Jaroslav Kysela
85c622e298 Release v1.0.29
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2015-02-26 15:49:40 +01:00
Jaroslav Kysela
d9021f34d9 alsa-info.sh: add script to EXTRA_DIST (automake) 2015-02-26 15:47:27 +01:00
Matthieu Crapet
554706585c configure: allow contitional compilation of alsaucm
If alsa-lib have been compiled with --disable-ucm, alsaucm can't be built.
Detection is dynamic, no configure command line option is available for now.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-14 16:09:21 +01:00
David Henningsson
e1745a69fe alsactl/init: Add "Line Out" to list of outputs to initialize
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-12 17:01:06 +01:00
David Henningsson
d522b45508 alsactl/init: Change the "basic rules" description
We now enable more outputs than just the main speaker, so update
the basic rules to reflect the actual situation.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-12 17:00:56 +01:00
Jaroslav Kysela
55d41b7fe3 alsactl: add missing state_unlock() call 2014-12-24 20:15:26 +01:00
Takashi Iwai
088593c039 amixer: Parse the value more strictly
So far amixer allows some unexpected suffix and assumes as a raw
absolute value without returning an error.  This is rather dangerous,
e.g. user might not notice that a completely wrong value was set when
the command line included a typo.

This patch makes the parser a bit more strict: it doesn't allow any
longer invalid suffixes, instead either returns an error or skips the
invalid value, depending on the operation mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-23 10:04:24 +01:00
Takashi Iwai
45a334e71c amixer: Make "dB" case-insensitive in set commands
We don't have to be necessarily too strict about case-sensitivity of
"dB" suffix used in set commands.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-23 09:45:44 +01:00
Jaroslav Kysela
8f361d83cf Revert "aplay: fix pcm_read() return value"
This reverts commit 8aa13eec80.

The semantics for pcm_read() and pcm_readv() was changed, but the
callers expect the exact frame count as requested. It's possible
to fix callers, but the fix is more complicated than to revert the
change. Note that '-d' processing was broken in some cases.

Note: The reverted commit allows that the return value might be
greater than requested (see the first condition in read routines).
2014-10-01 15:43:57 +02:00
Jaroslav Kysela
89a4f490bd alsactl: coverity - missing_va_end – va_end was not called for "ap" 2014-09-24 10:52:17 +02:00
Jaroslav Kysela
17d4a5dd35 monitor: fix clang warning - Declared variable-length array (VLA) has zero size 2014-09-24 10:50:54 +02:00
Jaroslav Kysela
da7a2f91de speaker-text: fix simple signess assignment warning 2014-09-24 10:47:48 +02:00
Jaroslav Kysela
74e5d57c99 alsactl: aded missing monitor() prototype 2014-09-24 10:46:02 +02:00
Jaroslav Kysela
1363f852e9 alsactl: Fix the file locking routines (for the state management) 2014-09-24 10:35:53 +02:00
Takashi Iwai
f58ce3619d speaker-test: Add missing draining at the end
Without the call of snd_pcm_drain() the pending data on the buffer
might be discarded, which results in the abort of playback sound in
the middle.  Let's fix it.

Reported-and-tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-16 16:36:44 +02:00
David Henningsson
808af5fdb0 alsa-info: Refactor "withall" logic
Previously, using --output, --no-upload, --upload and --pastebin
switches implied the withall switch.

A more intuitive logic would be that --with-all is disabled if you
use another --with* switch, such as --withdmesg, and only then.

Also update script version to reflect the behaviour change.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22 11:08:35 +02:00
David Henningsson
4f569affc4 alsa-info: Make sure all full script is run even with "output" option
For some reason, when the --output option is used, less information
is included compared to when no options are used. This is unexpected.

Fix this by running "withall" also when the output option is used.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-22 11:08:28 +02:00
Takashi Iwai
5e5fe9e573 Add missing alsa-info entry to the root Makefile.am
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-12 16:19:06 +02:00
Takashi Iwai
87a9446d28 Add alsa-info.sh to alsa-utils repo
Copied the latest version (0.4.63) from alsa-driver repo.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-30 12:18:07 +02:00
Jaroslav Kysela
c788ce9b60 alsamixer: include missing mixer_controls.h 2014-06-25 10:54:40 +02:00
Jaroslav Kysela
03a652e18d alsactl: save state - do not call rename for stdio
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-25 10:54:26 +02:00
Jaroslav Kysela
6f9835f200 Release v1.0.28
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-13 19:21:05 +02:00
Sergey
a9705ca48f aplay: Fix VU-meter stdout/stderr mess
Commit 6bbeb78d forgot to change some of VU-meter output to stderr.
This patch makes the output of `aplay -vvv` consistent again.

Signed-off-by: Sergey <sergemp@mail.ru>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-13 18:39:11 +02:00
David Henningsson
3a7c1c59ec alsactl: Fixup test for mydatadir/sbindir
Use the "mydatadir" name consistently.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-13 11:54:45 +02:00
David Henningsson
be4565c841 alsactl: Do not run udev rule before datadir/sbindir are both mounted
Sometimes 90-alsa-restore.rules is run before /usr is mounted,
and alsactl restore depends on /usr/share/alsa being present.

If /usr/share/alsa is not present, we're so early in the boot
process that alsa-restore.service (or upstart equivalent) will
run later on.

BugLink: https://bugs.launchpad.net/bugs/1289730
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-13 11:10:03 +02:00
Jaroslav Kysela
c06dbf0774 aplay/arecord: Add more in_aborting checks to read/write loops
Reported-by: Sergey <sergemp@mail.ru>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-06-13 10:52:26 +02:00
Jaroslav Kysela
3775524880 configure.ac: cosmetic change 2014-06-12 10:48:22 +02:00
Jaroslav Kysela
158a67f6f5 alsactl: add -L (no-lock) and change -D (lock-dir) to -O (state-lock-file)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 11:20:16 +02:00
Jaroslav Kysela
504348cb52 Modernize configure.ac
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 10:55:59 +02:00
Jaroslav Kysela
6d7dfb4607 configure.in -> configure.ac rename
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 10:55:59 +02:00
Jaroslav Kysela
0a6c9e80f7 Makefiles - use AM_CPPFLAGS instead INCLUDES
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 10:55:59 +02:00
Jaroslav Kysela
3f9712b9cd update the gettext configuration
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 10:55:58 +02:00
Jaroslav Kysela
24a7b2fec2 configure: add --with-lock-dir option
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 10:55:58 +02:00
Julian Scheel
2607d8deee alsactl: Store lockfile in /var/lock, add -D option to specify the lock dir
It can not be generally assumed that the directories in which asound.state
resides are writable. Use /var/lock and allow users to alter this path.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 10:55:51 +02:00
Karl Bongers
0d46081679 fix aconnect -l option
aconnect -l would just print usage.
This fix makes it do what usage says it should do.

Signed-off-by: Karl Bongers <karlbongers@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2014-05-07 08:51:00 +02:00
Erik Ackermann
b7ed45a015 speaker-test: update man page for new -X arg, also consistency fixes
Signed-off-by: Erik Ackermann <kurterikackermann@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26 16:15:54 +01:00
Erik Ackermann
3b1ee6b325 speaker-test: add --force-frequency option to allow hz outside range
Signed-off-by: Erik Ackermann <kurterikackermann@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26 08:13:59 +01:00
Olivier Langlois
360878f9c3 aplay: fix timespec to msec conversion
There is 1M nsec in a msec.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-22 08:05:17 +01:00
Dave Reisner
ef0e588c76 alsa-restore.rules: refer to correct attr
$attr{number} in the RUN rule is an empty expansion. This makes sense,
because the path doesn't exist -- i.e., it refers to the path:

/sys/devices/pci0000:00/foo/bar/sound/card0/controlC0/number

Instead, refer to $attr{device/number}, which does exist.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13 11:30:43 +01:00
Olivier Langlois
8aa13eec80 aplay: fix pcm_read() return value
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>
2014-01-08 11:56:52 +01:00
Jaroslav Kysela
f4be3f88b6 alsactl: Fix the va_list initialization in cerror_() and dbg_()
The <ap> argument for syslog_() was uninitialized.

From: Alan Hamilton <alanh@arizonaroads.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-12-29 20:06:53 +01:00
Takashi Iwai
5dfc232a9d alsactl: monitor all cards as default
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-26 14:27:30 +01:00
Takashi Iwai
bb3293c76e alsactl: Fix REMOVE event handling in monitor command
SND_CTL_EVENT_MASK_REMOVE has to be checked at first and ignore the
rest if it matches.  Suggested by Clemens.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-26 13:59:19 +01:00
Takashi Iwai
d2d9b6fc8d alsactl: Add monitor command
With monitor command, you can monitor the events received from the
given control device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-26 11:45:34 +01:00
Ivailo Monev
7d0c2801b3 configure: detect udevdir via pkg-config, fallback to /lib/udev/rules.d
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-17 10:03:49 +01:00
Mike Frysinger
54a459a884 alsaconf: update gentoo to use modprobe.d method as everyone else
We migrated off modules.d a long time ago.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-14 08:51:55 +01:00
Mike Frysinger
df875c6e8f alsaconf: support newer m-i-t and kmod
The m-i-t package made it up to 3.10 versions before ending, so update
the glob to handle those too.

Most distros are moving on to kmod, so we also want to handle the version
string that package outputs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-14 08:51:37 +01:00