]> git.alsa-project.org Git - alsa-utils.git/log
alsa-utils.git
10 years agospeaker-test: Add missing draining at the end
Takashi Iwai [Tue, 16 Sep 2014 14:36:44 +0000 (16:36 +0200)]
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>
11 years agoalsa-info: Refactor "withall" logic
David Henningsson [Fri, 22 Aug 2014 08:31:41 +0000 (10:31 +0200)]
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>
11 years agoalsa-info: Make sure all full script is run even with "output" option
David Henningsson [Fri, 22 Aug 2014 08:31:40 +0000 (10:31 +0200)]
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>
11 years agoAdd missing alsa-info entry to the root Makefile.am
Takashi Iwai [Tue, 12 Aug 2014 14:19:06 +0000 (16:19 +0200)]
Add missing alsa-info entry to the root Makefile.am

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoAdd alsa-info.sh to alsa-utils repo
Takashi Iwai [Wed, 30 Jul 2014 10:18:07 +0000 (12:18 +0200)]
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>
11 years agoalsamixer: include missing mixer_controls.h
Jaroslav Kysela [Wed, 25 Jun 2014 08:49:23 +0000 (10:49 +0200)]
alsamixer: include missing mixer_controls.h

11 years agoalsactl: save state - do not call rename for stdio
Jaroslav Kysela [Wed, 25 Jun 2014 08:47:21 +0000 (10:47 +0200)]
alsactl: save state - do not call rename for stdio

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoRelease v1.0.28 v1.0.28
Jaroslav Kysela [Fri, 13 Jun 2014 17:21:05 +0000 (19:21 +0200)]
Release v1.0.28

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoaplay: Fix VU-meter stdout/stderr mess
Sergey [Fri, 13 Jun 2014 01:28:49 +0000 (05:28 +0400)]
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>
11 years agoalsactl: Fixup test for mydatadir/sbindir
David Henningsson [Fri, 13 Jun 2014 09:31:44 +0000 (11:31 +0200)]
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>
11 years agoalsactl: Do not run udev rule before datadir/sbindir are both mounted
David Henningsson [Fri, 13 Jun 2014 08:04:25 +0000 (10:04 +0200)]
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>
11 years agoaplay/arecord: Add more in_aborting checks to read/write loops
Jaroslav Kysela [Fri, 13 Jun 2014 08:52:26 +0000 (10:52 +0200)]
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>
11 years agoconfigure.ac: cosmetic change
Jaroslav Kysela [Thu, 12 Jun 2014 08:48:22 +0000 (10:48 +0200)]
configure.ac: cosmetic change

11 years agoalsactl: add -L (no-lock) and change -D (lock-dir) to -O (state-lock-file)
Jaroslav Kysela [Wed, 7 May 2014 09:13:41 +0000 (11:13 +0200)]
alsactl: add -L (no-lock) and change -D (lock-dir) to -O (state-lock-file)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoModernize configure.ac
Jaroslav Kysela [Wed, 7 May 2014 07:49:52 +0000 (09:49 +0200)]
Modernize configure.ac

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoconfigure.in -> configure.ac rename
Jaroslav Kysela [Wed, 7 May 2014 07:46:08 +0000 (09:46 +0200)]
configure.in -> configure.ac rename

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoMakefiles - use AM_CPPFLAGS instead INCLUDES
Jaroslav Kysela [Wed, 7 May 2014 07:43:45 +0000 (09:43 +0200)]
Makefiles - use AM_CPPFLAGS instead INCLUDES

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoupdate the gettext configuration
Jaroslav Kysela [Wed, 7 May 2014 07:29:16 +0000 (09:29 +0200)]
update the gettext configuration

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoconfigure: add --with-lock-dir option
Jaroslav Kysela [Wed, 7 May 2014 07:19:36 +0000 (09:19 +0200)]
configure: add --with-lock-dir option

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoalsactl: Store lockfile in /var/lock, add -D option to specify the lock dir
Julian Scheel [Tue, 6 May 2014 19:32:19 +0000 (21:32 +0200)]
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>
11 years agofix aconnect -l option
Karl Bongers [Wed, 7 May 2014 04:06:47 +0000 (23:06 -0500)]
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>
11 years agospeaker-test: update man page for new -X arg, also consistency fixes
Erik Ackermann [Wed, 26 Feb 2014 14:52:29 +0000 (06:52 -0800)]
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>
11 years agospeaker-test: add --force-frequency option to allow hz outside range
Erik Ackermann [Tue, 25 Feb 2014 19:45:24 +0000 (11:45 -0800)]
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>
11 years agoaplay: fix timespec to msec conversion
Olivier Langlois [Tue, 21 Jan 2014 20:25:12 +0000 (15:25 -0500)]
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>
11 years agoalsa-restore.rules: refer to correct attr
Dave Reisner [Sun, 12 Jan 2014 16:15:52 +0000 (11:15 -0500)]
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>
11 years agoaplay: fix pcm_read() return value
Olivier Langlois [Wed, 8 Jan 2014 04:18:17 +0000 (23:18 -0500)]
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>
11 years agoalsactl: Fix the va_list initialization in cerror_() and dbg_()
Jaroslav Kysela [Sun, 29 Dec 2013 19:03:21 +0000 (20:03 +0100)]
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>
11 years agoalsactl: monitor all cards as default
Takashi Iwai [Tue, 26 Nov 2013 13:27:30 +0000 (14:27 +0100)]
alsactl: monitor all cards as default

Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoalsactl: Fix REMOVE event handling in monitor command
Takashi Iwai [Tue, 26 Nov 2013 12:59:19 +0000 (13:59 +0100)]
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>
11 years agoalsactl: Add monitor command
Takashi Iwai [Tue, 26 Nov 2013 10:44:40 +0000 (11:44 +0100)]
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>
11 years agoconfigure: detect udevdir via pkg-config, fallback to /lib/udev/rules.d
Ivailo Monev [Sat, 16 Nov 2013 14:00:19 +0000 (14:00 +0000)]
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>
11 years agoalsaconf: update gentoo to use modprobe.d method as everyone else
Mike Frysinger [Wed, 13 Nov 2013 18:23:48 +0000 (13:23 -0500)]
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>
11 years agoalsaconf: support newer m-i-t and kmod
Mike Frysinger [Wed, 13 Nov 2013 18:23:47 +0000 (13:23 -0500)]
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>
11 years agospeaker-test: Show out-of-chmap channels as Unknown
Anssi Hannula [Sun, 10 Nov 2013 18:29:19 +0000 (20:29 +0200)]
speaker-test: Show out-of-chmap channels as Unknown

Currently speaker-test falls back to ALSA default channel names for
channels out-of-chmap.

This causes e.g. the 4th channel of
$ speaker-test -c4 -Dhdmi -m "FR,FL,FC"
to be shown as "Rear Right".

Change the code to show such channels as Unknown instead, similar to
when snd_pcm_chmap_long_name() does not know the name.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agospeaker-test: Always show chmap channel names if available
Anssi Hannula [Sun, 10 Nov 2013 18:29:18 +0000 (20:29 +0200)]
speaker-test: Always show chmap channel names if available

Currently speaker-test only uses channel names retrieved by
snd_pcm_chmap_long_name() when a channel map has been manually set.

However, the device may provide a default (or fixed) channel map that
differs from the traditional ALSA map, in which case wrong channel names
are shown.

Fix that by always using the name from the channel map when a channel
map is present.

Note that the names retrieved by snd_pcm_chmap_long_name() are not
currently localized via gettext.

Also note that Linux kernel HDMI driver reported wrong default channel
maps before 56cac413dd6d43af8355f5d1f90a199b540f73fc ("ALSA: hda - hdmi:
Fix reported channel map on common default layouts").

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agospeaker-test: Fix chmapped channel selection without specified chmap
Anssi Hannula [Mon, 11 Nov 2013 22:04:02 +0000 (00:04 +0200)]
speaker-test: Fix chmapped channel selection without specified chmap

The channel selection currently does not work properly when there is a
driver-provided non-ALSA-traditional channel map but no manual channel
map was explicitely requested with "-m".

For example, the CEA/HDMI 8ch map is FL,FR,RLC,RRC,FC,LFE,RL,RR. Note
that it is otherwise the same as the traditional ALSA channel map,
except that the traditional rear speakers are considered
rear-center speakers and the traditional side speakers are considered
rear speakers.

Speaker-test tries to play back channels in this following order:
  0, /* Front Left  */
  4, /* Center      */
  1, /* Front Right */
  7, /* Side Right  */
  3, /* Rear Right  */
  2, /* Rear Left   */
  6, /* Side Left   */
  5, /* LFE         */

When it is the time to play back Side Left/Right, speaker-test tries to
look for SL/SR in the chmap, but doesn't find it, so it just plays back
channels 6/7 (which indeed are the side speakers, or RL/RR in this
channel map - so the correct channels are selected).

When it becomes the time to playback Rear Left/Right, speaker-test again
tries to find RL/RR in the chmap, and this time it does find them in the
chmap positions 6/7.

So the channels 6/7 are tested twice and 2/3 are never tested.

To fix this, define a generic playback order channel_order[] to be used
when the channel map is present (but not user-defined) and generate a
(speaker/playback number => channel number) mapping with the channels
ordered in the following order:
1. regular channels found in channel_order[] in the defined order,
2. channels not found in channel_order[] ordered by channel number.
3. UNKNOWN channels ordered by channel number.
4. NA channels ordered by channel number.
For channels outside the channel map just use their channel numbers (so
they will be last after all of the above).

For example, if the playback device has a fictional default channel map
of FR,FL,UNKNOWN1,FOO,BAR,RR,RL,UNKNOWN2, the playback order will be
FL,FR,RR,RL,FOO,BAR,UNKNOWN1,UNKNOWN2(,any_extra_channels).

When the channel mapping is specified manually, the specified order is
used for playback as before.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoalsaloop: pcmjob.c: use portable way to initialize recursive mutex
John Spencer [Fri, 8 Nov 2013 12:59:41 +0000 (13:59 +0100)]
alsaloop: pcmjob.c: use portable way to initialize recursive mutex

PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not in POSIX, as _NP
(non-portable) suggests.

exposing such a symbol in musl libc would lock in the ABI for all
times and makes it impossible to do future changes to the under-
lying struct without hideous symbol versioning hacks.

use the portable way instead: pthread_once was designed for such
cases.

Signed-off-by: John Spencer <maillist-alsa@barfooze.de>
Tested-by: John Spencer <maillist-alsa@barfooze.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11 years agoamixer: fix indentation when printing container TLV contents
Anssi Hannula [Tue, 1 Oct 2013 20:46:53 +0000 (23:46 +0300)]
amixer: fix indentation when printing container TLV contents

decode_tlv() adds indentation in the beginning, with the expectation
that the TLV will be printed on the line afterwards in a switch-case.

However, in the case of a container TLV the switch-case simply adds
another level of indentation and calls decode_tlv() for the inner TLVs.
This causes the first inner TLV to be printed with too much indentation
and double '|'.

Fix that by printing "container" and a newline for container TLVs, so
that the result is as follows:
  : values=0,0,0,0,0,0,0,0
  | container
    | chmap-variable=FL,FR
    | chmap-variable=FL,FR,LFE
    | chmap-variable=FL,FR,FC

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoamixer: actually print all TLVs in a container TLV
Anssi Hannula [Mon, 30 Sep 2013 20:46:50 +0000 (23:46 +0300)]
amixer: actually print all TLVs in a container TLV

Due to a wrong indexing of tlv[] decode_tlv() always skips to the end of
the container TLV since the used tlv[1] contains the container TLV size
instead of the intended element size.

This causes, for example, only the first HDMI channel map TLV to be
shown.

Fix the indexing to actually use the element size.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 years agoalsaloop: add -z,--syslog option to use syslog for errors
Jaroslav Kysela [Fri, 26 Jul 2013 14:16:00 +0000 (16:16 +0200)]
alsaloop: add -z,--syslog option to use syslog for errors

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoaplay: fix two off by one errors
Jurgen Kramer [Mon, 9 Sep 2013 10:02:29 +0000 (12:02 +0200)]
aplay: fix two off by one errors

Attached patch for aplay fixes two off-by-one errors preventing usage
of the last available sample format.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoalsaloop: fix wrong alias for signal.h
Jaroslav Kysela [Tue, 23 Jul 2013 12:57:05 +0000 (14:57 +0200)]
alsaloop: fix wrong alias for signal.h

in POSIX, there is no <sys/signal.h>.

it's merely a legacy alias used by glibc, and the header does nothing
else than including <signal.h>.

so let's do the right thing and use the right name, which works everywhere.

Signed-off-by: John Spencer <maillist-alsa@barfooze.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: alsa-state.service - fix typo (rkill -> kill)
Jaroslav Kysela [Fri, 19 Jul 2013 12:36:52 +0000 (14:36 +0200)]
alsactl: alsa-state.service - fix typo (rkill -> kill)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoRelease v1.0.27.2 v1.0.27.2
Jaroslav Kysela [Tue, 9 Jul 2013 15:28:37 +0000 (17:28 +0200)]
Release v1.0.27.2

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agospeaker-test: Fix wrong wave file played back in chmap setup
David Henningsson [Mon, 10 Jun 2013 14:42:48 +0000 (16:42 +0200)]
speaker-test: Fix wrong wave file played back in chmap setup

When explicitly specifying channel maps, we need to use that when
loading wave files so the correct file is played back.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoamixer: Print TLV of channel map controls
David Henningsson [Fri, 14 Jun 2013 09:41:01 +0000 (11:41 +0200)]
amixer: Print TLV of channel map controls

Previously these were written as "unk-25..." which wasn't very user friendly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoamixer: fix print_dB for -0.99 .. -0.01 range
Jaroslav Kysela [Tue, 28 May 2013 06:43:30 +0000 (08:43 +0200)]
amixer: fix print_dB for -0.99 .. -0.01 range

The first number is 0 when input dB (hundreds) is in range -99 .. -1 .
The printed number was positive in this case. This patch fixes this issue.

Reported-by: Tom Becker <GTBecker@RighTime.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoamixer: Fix the hctl elem search bug
Jaroslav Kysela [Mon, 27 May 2013 14:40:26 +0000 (16:40 +0200)]
amixer: Fix the hctl elem search bug

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: return back the udevrules_DATA rule for 90-alsa-restore.rules
Jaroslav Kysela [Mon, 27 May 2013 07:26:39 +0000 (09:26 +0200)]
alsactl: return back the udevrules_DATA rule for 90-alsa-restore.rules

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl init: ca0106 file was omitted
Gabriel M. Beddingfield [Sun, 26 May 2013 22:54:44 +0000 (15:54 -0700)]
alsactl init: ca0106 file was omitted

The file alsactl/init/00main includes the line:

CARDINFO{driver}=="CA0106", INCLUDE="ca0106", GOTO="init_end"

However, the file alsactl/init/ca0106 is not making it into the
release tarballs (nor to user installations).

This patch adds the ca0106 file to the build.

Signed-off-by: Gabriel M. Beddingfield <gabrbedd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoRequire alsa-lib 1.0.27.
Jordi Mallach [Fri, 17 May 2013 12:30:46 +0000 (14:30 +0200)]
Require alsa-lib 1.0.27.

Both aplay and speaker-test use the new snd_pcm_abort() function, which was
introduced in alsa-lib 1.0.27.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoRelease v1.0.27.1 v1.0.27.1
Jaroslav Kysela [Tue, 21 May 2013 08:48:28 +0000 (10:48 +0200)]
Release v1.0.27.1

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: remove 90-alsa-restore.rules from the tar ball
Jaroslav Kysela [Tue, 21 May 2013 08:27:25 +0000 (10:27 +0200)]
alsactl: remove 90-alsa-restore.rules from the tar ball

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoAdd AM_MAINTAINER_MODE([enable]) to configure.in.
Jordi Mallach [Wed, 15 May 2013 17:12:57 +0000 (19:12 +0200)]
Add AM_MAINTAINER_MODE([enable]) to configure.in.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoFix a build failure due to a misused format string.
Jordi Mallach [Wed, 15 May 2013 17:12:56 +0000 (19:12 +0200)]
Fix a build failure due to a misused format string.

This fixes builds with -Werror=format-security.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoSeveral formatting fixes for manpages.
Jordi Mallach [Wed, 15 May 2013 17:12:55 +0000 (19:12 +0200)]
Several formatting fixes for manpages.

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>
12 years agoFix several typos in manpage and help strings.
Elimar Riesebieter [Wed, 15 May 2013 17:12:54 +0000 (19:12 +0200)]
Fix several typos in manpage and help strings.

Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoalsactl: sprintf to snprintf prevent buffer overflow
Doug Goldstein [Wed, 1 May 2013 16:30:26 +0000 (11:30 -0500)]
alsactl: sprintf to snprintf prevent buffer overflow

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>
12 years agoarecord: add a missing break to the capture loop
Jaroslav Kysela [Wed, 17 Apr 2013 06:34:34 +0000 (08:34 +0200)]
arecord: add a missing break to the capture loop

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: Fix the string size for the lock file contents
Jaroslav Kysela [Mon, 15 Apr 2013 12:44:13 +0000 (14:44 +0200)]
alsactl: Fix the string size for the lock file contents

The string length is 10 characters + LF + '\0' = 12 characters.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: Fix a typo in systemd alsa-restore.service
Takashi Iwai [Mon, 15 Apr 2013 09:20:41 +0000 (11:20 +0200)]
alsactl: Fix a typo in systemd alsa-restore.service

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoRelease v1.0.27 v1.0.27
Jaroslav Kysela [Thu, 11 Apr 2013 11:43:06 +0000 (13:43 +0200)]
Release v1.0.27

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: add --with-alsactl-daemonswitch=FILE to the global configure.in
Jaroslav Kysela [Wed, 10 Apr 2013 09:08:47 +0000 (11:08 +0200)]
alsactl: add --with-alsactl-daemonswitch=FILE to the global configure.in

It may be useful to have the file location configurable.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: revert back old systemd static units with the /etc/alsa/state-daemon.conf...
Jaroslav Kysela [Wed, 10 Apr 2013 08:23:16 +0000 (10:23 +0200)]
alsactl: revert back old systemd static units with the /etc/alsa/state-daemon.conf switch

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: add --nice and --sched-idle options
Jaroslav Kysela [Wed, 10 Apr 2013 07:42:40 +0000 (09:42 +0200)]
alsactl: add --nice and --sched-idle options

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>
12 years agoamixer: Use the alsa-lib functions for id print and parse and value parse
Jaroslav Kysela [Tue, 9 Apr 2013 16:38:58 +0000 (18:38 +0200)]
amixer: Use the alsa-lib functions for id print and parse and value parse

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: daemon mode - remove disconnected cards
Jaroslav Kysela [Tue, 9 Apr 2013 16:10:22 +0000 (18:10 +0200)]
alsactl: daemon mode - remove disconnected cards

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: move systemd config to the daemon mode
Jaroslav Kysela [Mon, 8 Apr 2013 12:49:31 +0000 (14:49 +0200)]
alsactl: move systemd config to the daemon mode

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agospeaker-test: change the interrupt handling logic to follow aplay/arecord
Jaroslav Kysela [Mon, 8 Apr 2013 11:57:51 +0000 (13:57 +0200)]
speaker-test: change the interrupt handling logic to follow aplay/arecord

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoaplay/arecord: change the interrupt handling using snd_pcm_abort()
Jaroslav Kysela [Mon, 8 Apr 2013 11:30:54 +0000 (13:30 +0200)]
aplay/arecord: change the interrupt handling using snd_pcm_abort()

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>
12 years agoalsactl: add event filter and cache for the daemon mode
Jaroslav Kysela [Mon, 8 Apr 2013 09:31:45 +0000 (11:31 +0200)]
alsactl: add event filter and cache for the daemon mode

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: Improved command line argument handling...
Jaroslav Kysela [Fri, 5 Apr 2013 11:42:15 +0000 (13:42 +0200)]
alsactl: Improved command line argument handling...

Improve command line argument handling for future extensions.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: add the daemon mode
Jaroslav Kysela [Fri, 5 Apr 2013 09:51:51 +0000 (11:51 +0200)]
alsactl: add the daemon mode

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>
12 years agoalsactl: small code reorder to avoid memory leaks
Jaroslav Kysela [Wed, 3 Apr 2013 09:57:52 +0000 (11:57 +0200)]
alsactl: small code reorder to avoid memory leaks

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsactl: safe state store and memory allocation cleanups
Jaroslav Kysela [Wed, 3 Apr 2013 09:13:41 +0000 (11:13 +0200)]
alsactl: safe state store and memory allocation cleanups

- 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>
12 years agoaplay/arecord: added isatty() check (interactive mode)
Jaroslav Kysela [Fri, 22 Mar 2013 12:21:25 +0000 (13:21 +0100)]
aplay/arecord: added isatty() check (interactive mode)

Turn off the interactive mode when stdin is not a tty.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agospeaker-test: try to call snd_pcm_close() when a signal is received
Jaroslav Kysela [Fri, 22 Mar 2013 12:59:31 +0000 (13:59 +0100)]
speaker-test: try to call snd_pcm_close() when a signal is received

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoalsamixer: Use isatty() to check the terminal (interactive) availability
Jaroslav Kysela [Fri, 22 Mar 2013 12:27:26 +0000 (13:27 +0100)]
alsamixer: Use isatty() to check the terminal (interactive) availability

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agoamixer: Fix dB value outputs in amixer contents
Takashi Iwai [Thu, 31 Jan 2013 16:47:50 +0000 (17:47 +0100)]
amixer: Fix dB value outputs in amixer contents

Add missing cast to signed int for DB_MINMAX* types.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agospeaker-test: increase the maximum supported rate to 384000
Antonio Ospite [Wed, 16 Jan 2013 16:06:04 +0000 (17:06 +0100)]
speaker-test: increase the maximum supported rate to 384000

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>
12 years agoconfigure: Fix obsolete AM_CONFIG_HEADER macro
Marko Lindqvist [Wed, 16 Jan 2013 14:25:38 +0000 (15:25 +0100)]
configure: Fix obsolete AM_CONFIG_HEADER macro

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>
12 years agoaplay: Add the support for big-endian WAV format (RIFX)
Takashi Iwai [Thu, 13 Dec 2012 09:53:19 +0000 (10:53 +0100)]
aplay: Add the support for big-endian WAV format (RIFX)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoalsaloop: Fix missing #endif
Takashi Iwai [Fri, 30 Nov 2012 13:53:12 +0000 (14:53 +0100)]
alsaloop: Fix missing #endif

Sorry, forgotten.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoalsaloop: Make alsaloop working without libsamplerate
Takashi Iwai [Fri, 30 Nov 2012 13:35:31 +0000 (14:35 +0100)]
alsaloop: Make alsaloop working without libsamplerate

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>
12 years agoamixer: Fix parsing container TLV entries
Takashi Iwai [Mon, 26 Nov 2012 15:13:57 +0000 (16:13 +0100)]
amixer: Fix parsing container TLV entries

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>
12 years agoamixer: fix rounding of relative changes
Clemens Ladisch [Tue, 13 Nov 2012 20:54:20 +0000 (21:54 +0100)]
amixer: fix rounding of relative changes

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>
12 years agoaplay: Show usage if no parameter is passed
Fabio Estevam [Tue, 13 Nov 2012 12:05:39 +0000 (10:05 -0200)]
aplay: Show usage if no parameter is passed

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>
12 years agoalsamixer: fix handling of removed controls
Clemens Ladisch [Fri, 19 Oct 2012 10:16:33 +0000 (12:16 +0200)]
alsamixer: fix handling of removed controls

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>
12 years agoaplay: fix typo & silence warning..
Jaroslav Kysela [Mon, 24 Sep 2012 14:18:54 +0000 (16:18 +0200)]
aplay: fix typo & silence warning..

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12 years agospeaker-test: Update man page for chmap option
Takashi Iwai [Thu, 20 Sep 2012 12:00:02 +0000 (14:00 +0200)]
speaker-test: Update man page for chmap option

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoaplay: More support for channel map option
Takashi Iwai [Thu, 20 Sep 2012 11:53:46 +0000 (13:53 +0200)]
aplay: More support for channel map option

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>
12 years agoaplay: Add support for channel mapping
Takashi Iwai [Tue, 11 Sep 2012 10:20:55 +0000 (12:20 +0200)]
aplay: Add support for channel mapping

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>
12 years agospeaker-test: Add support for channel mapping API
Takashi Iwai [Tue, 11 Sep 2012 09:36:45 +0000 (11:36 +0200)]
speaker-test: Add support for channel mapping API

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>
13 years agoRelease v1.0.26 v1.0.26
Jaroslav Kysela [Thu, 6 Sep 2012 07:52:57 +0000 (09:52 +0200)]
Release v1.0.26

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
13 years agobuild: Don't call AC_CHECK_FUNC with --disable-alsatest
Arun Raghavan [Tue, 17 Jul 2012 10:15:35 +0000 (15:45 +0530)]
build: Don't call AC_CHECK_FUNC with --disable-alsatest

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoaplay: Use open() instead of open64()
Arun Raghavan [Tue, 17 Jul 2012 10:15:34 +0000 (15:45 +0530)]
aplay: Use open() instead of open64()

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>
13 years agoaplay: Fix signal.h include
Arun Raghavan [Tue, 17 Jul 2012 10:15:33 +0000 (15:45 +0530)]
aplay: Fix signal.h include

The correct header to include is <signal.h> not <sys/signal.h>.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoaseqnet: Remove obsoleted .LO entry from man page
Takashi Iwai [Fri, 15 Jun 2012 14:34:55 +0000 (16:34 +0200)]
aseqnet: Remove obsoleted .LO entry from man page

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoalsactl: Add reference to alsactl_init(7) in alsactl man page
Takashi Iwai [Thu, 14 Jun 2012 14:14:29 +0000 (16:14 +0200)]
alsactl: Add reference to alsactl_init(7) in alsactl man page

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoalsactl: Read only *.conf files when a directory is passed via INCLUDE
Takashi Iwai [Thu, 14 Jun 2012 11:14:48 +0000 (13:14 +0200)]
alsactl: Read only *.conf files when a directory is passed via INCLUDE

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>