Commit graph

1198 commits

Author SHA1 Message Date
Jurgen Kramer
719faff809 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>
2013-09-09 12:02:29 +02:00
Jaroslav Kysela
8f57464190 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>
2013-07-23 14:57:05 +02:00
Jaroslav Kysela
dda4392cd5 alsactl: alsa-state.service - fix typo (rkill -> kill)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-07-19 14:36:52 +02:00
Jaroslav Kysela
2e1718a728 Release v1.0.27.2
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-07-09 17:28:37 +02:00
David Henningsson
7ac9508c4e 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>
2013-06-14 14:05:23 +02:00
David Henningsson
9fe90a020c 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>
2013-06-14 13:38:23 +02:00
Jaroslav Kysela
c80a38dbf5 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>
2013-05-28 08:43:30 +02:00
Jaroslav Kysela
d61924fd24 amixer: Fix the hctl elem search bug
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-05-27 16:40:26 +02:00
Jaroslav Kysela
c0f70a0b8e alsactl: return back the udevrules_DATA rule for 90-alsa-restore.rules
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-05-27 09:26:39 +02:00
Gabriel M. Beddingfield
121df36949 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>
2013-05-27 09:09:14 +02:00
Jordi Mallach
2f2576518c 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>
2013-05-23 14:51:25 +02:00
Jaroslav Kysela
5bdfa4c73d Release v1.0.27.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-05-21 10:48:28 +02:00
Jaroslav Kysela
4485590096 alsactl: remove 90-alsa-restore.rules from the tar ball
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-05-21 10:27:25 +02:00
Jordi Mallach
50ce9adb8a Add AM_MAINTAINER_MODE([enable]) to configure.in.
Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16 10:38:31 +02:00
Jordi Mallach
f2f5f7a7d3 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>
2013-05-16 10:38:25 +02:00
Jordi Mallach
093a371a27 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>
2013-05-16 10:38:13 +02:00
Elimar Riesebieter
48554fc28b Fix several typos in manpage and help strings.
Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-16 10:38:02 +02:00
Doug Goldstein
888275e66c 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>
2013-05-06 10:55:07 +02:00
Jaroslav Kysela
b4f34ac260 arecord: add a missing break to the capture loop
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-17 08:34:34 +02:00
Jaroslav Kysela
95788fea25 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>
2013-04-15 14:44:13 +02:00
Takashi Iwai
3616b1fe3c alsactl: Fix a typo in systemd alsa-restore.service
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-15 11:21:13 +02:00
Jaroslav Kysela
3e95cb814c Release v1.0.27
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-11 13:43:06 +02:00
Jaroslav Kysela
c3a31afe14 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>
2013-04-10 11:08:47 +02:00
Jaroslav Kysela
8b34bf25c0 alsactl: revert back old systemd static units with the /etc/alsa/state-daemon.conf switch
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-10 10:29:19 +02:00
Jaroslav Kysela
611249ae26 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>
2013-04-10 09:42:40 +02:00
Jaroslav Kysela
e2eab09c1d amixer: Use the alsa-lib functions for id print and parse and value parse
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-09 18:38:58 +02:00
Jaroslav Kysela
9cb5e5bee7 alsactl: daemon mode - remove disconnected cards
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-09 18:10:22 +02:00
Jaroslav Kysela
e05b903b1f alsactl: move systemd config to the daemon mode
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-08 14:51:39 +02:00
Jaroslav Kysela
46cb355d4f speaker-test: change the interrupt handling logic to follow aplay/arecord
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-08 13:57:51 +02:00
Jaroslav Kysela
1d0042d7e9 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>
2013-04-08 13:30:54 +02:00
Jaroslav Kysela
ffaff06849 alsactl: add event filter and cache for the daemon mode
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-08 11:31:45 +02:00
Jaroslav Kysela
067f4f3256 alsactl: Improved command line argument handling...
Improve command line argument handling for future extensions.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-05 13:47:21 +02:00
Jaroslav Kysela
cc5c3357cf 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>
2013-04-05 13:47:18 +02:00
Jaroslav Kysela
b95dd7ef46 alsactl: small code reorder to avoid memory leaks
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-03 11:57:52 +02:00
Jaroslav Kysela
e3e85a851c 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>
2013-04-03 11:16:46 +02:00
Jaroslav Kysela
6de3c709b3 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>
2013-03-22 14:00:44 +01:00
Jaroslav Kysela
741064c601 speaker-test: try to call snd_pcm_close() when a signal is received
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-03-22 13:59:31 +01:00
Jaroslav Kysela
5622f3b09f alsamixer: Use isatty() to check the terminal (interactive) availability
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-03-22 13:27:26 +01:00
Takashi Iwai
bfcb26f9f7 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>
2013-01-31 17:47:50 +01:00
Antonio Ospite
cd39cfb480 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>
2013-01-17 07:46:32 +01:00
Marko Lindqvist
66d1cf7486 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>
2013-01-16 15:25:38 +01:00
Takashi Iwai
de61ec66fe aplay: Add the support for big-endian WAV format (RIFX)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-13 10:53:19 +01:00
Takashi Iwai
c7b9d3e394 alsaloop: Fix missing #endif
Sorry, forgotten.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-30 14:53:12 +01:00
Takashi Iwai
b7ea343820 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>
2012-11-30 14:35:31 +01:00
Takashi Iwai
d6da86117b 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>
2012-11-26 16:16:16 +01:00
Clemens Ladisch
da1c24a24c 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>
2012-11-13 21:54:20 +01:00
Fabio Estevam
c6614dbdab 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>
2012-11-13 14:33:40 +01:00
Clemens Ladisch
f282607273 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>
2012-10-19 12:16:33 +02:00
Jaroslav Kysela
6017849f1b aplay: fix typo & silence warning..
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-09-24 16:18:54 +02:00
Takashi Iwai
7b14c00b56 speaker-test: Update man page for chmap option
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-20 14:00:02 +02:00