Commit graph

1173 commits

Author SHA1 Message Date
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
Takashi Iwai
000bf230cf 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>
2012-09-20 13:55:24 +02:00
Takashi Iwai
a9add2252f 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>
2012-09-17 12:23:33 +02:00
Takashi Iwai
951cb2c297 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>
2012-09-17 12:23:08 +02:00
Jaroslav Kysela
b9deb6d9f3 Release v1.0.26
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-09-06 09:52:57 +02:00
Arun Raghavan
5dcd52389a build: Don't call AC_CHECK_FUNC with --disable-alsatest
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-17 15:08:12 +02:00
Arun Raghavan
16bc934c0b 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>
2012-07-17 15:08:03 +02:00
Arun Raghavan
ae0a7d6f0a 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>
2012-07-17 15:07:31 +02:00
Takashi Iwai
2b31992c79 aseqnet: Remove obsoleted .LO entry from man page
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-15 16:34:55 +02:00
Takashi Iwai
c3111571dc alsactl: Add reference to alsactl_init(7) in alsactl man page
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-14 16:14:29 +02:00
Takashi Iwai
c68a3d02d1 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>
2012-06-14 16:06:42 +02:00
Jaroslav Kysela
b72e221aab alsaloop: fix the avail_min setup
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>
2012-05-13 13:30:15 +02:00
Jerome Carretero
6bbeb78dba aplay: print vu-meter to stderr, not stdout
It allows showing the vu-meter while recording to stdout, eg:

   aplay -C -V stereo | oggenc - > out.ogg

Signed-off-by: Jerome Carretero <cJ@zougloub.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-11 17:09:50 +02:00
Jaroslav Kysela
f7eb87ddc7 alsactl: Do not access other cards than specified for init
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>
2012-05-09 08:45:47 +02:00
Mike Frysinger
05d3bed5cd configure.in: use AS_HELP_STRING everywhere
This macro takes care of spacing for us.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-18 18:15:54 +02:00
Mike Frysinger
3a25a31285 configure.in: look for ncurses pkg-config first
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>
2012-04-18 18:15:44 +02:00
Takashi Iwai
8824d0824d amixer, alsamixer: Add description of volume-mapping
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-19 16:05:06 +01:00
Ben Gardiner
658c3cfd57 aplay/arecord: option to treat any xrun as fatal
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-19 15:44:16 +01:00
Takashi Iwai
a2b66855e6 amixer: Add the support for mapped volumes like alsamixer
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>
2012-03-12 10:56:22 +01:00
Pavel Hofman
2d105e0f18 aplay - option to dump HW parameters
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>
2012-03-06 10:42:17 +01:00
Jaroslav Kysela
53107e1e31 alsaloop: Improve xrun_sync - fill missing playback samples
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-02-20 16:41:19 +01:00
Vikram Narayanan
cefe6f2a49 Remove the cvscompile file
package: alsa-utils

Removed the cvscompile file.

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-20 15:35:07 +01:00
Vikram Narayanan
d5b6ecbbd6 Trivial fixes in INSTALL file
Changed from HG->git in the INSTALL file

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 15:17:45 +01:00
Jaroslav Kysela
5b91ee7f61 Fix the examples in aplay.1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-02-06 14:58:03 +01:00
Jaroslav Kysela
1df699bf0a Release v1.0.25
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-01-25 10:43:38 +01:00
Jaroslav Kysela
dc02bd4517 aplay: Add backward compatible endian macro definitions
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-01-25 10:40:25 +01:00