Commit graph

1080 commits

Author SHA1 Message Date
Clemens Ladisch
e57f619c82 alsamixer: remove obsolete e-mail
Remove the no-longer-valid e-mail address also from the man page.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-12-06 14:04:39 +01:00
Colin Guthrie
a97bcd19dc alsactl: Add a --with-udev-rules-dir configure option.
After the previous patch to install udev rules it is impossible to do a
non-root, custom-prefix make install. This is generally not a problem
when building official packages but it can be a pain for developers
and debuggers etc.

This is essentially the same patch as was already made in PulseAudio
in commit e8a5746f2fcae59bfd18d39b621509b3ef130453.

Signed-off-by: Colin Guthrie <gmane@colin.guthr.ie>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-26 10:27:14 +01:00
Ozan Çağlayan
53b08bfc14 configure.in: Fix variable name
Fix variable name for --with-asound-state-dir as currently we have
to pass --with-ASOUND_STATE_DIR= which is wrong and inconsistent with
the other switches.

Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-26 08:33:39 +01:00
Lennart Poettering
81f015f5ab alsactl: Move asound.state location to /var/lib/alsa
.... and add configure switch for it.

/etc might be on a read-only partition which is not suitable for dynamic
data such as the mixer settings. Hence move the location of asound.state
to /var/lib.

This is based on a patch from Ubuntu/Debian which hardcoded the pah in
/var/lib.

Signed-off-by: Lennart Poettering <mznyfn@0pointer.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-23 15:48:50 +01:00
Lennart Poettering
de7c3eff0e alsactl: systemd and udev hookup
Add minimal systemd and udev support to alsactl so that mixer settings
are restored at boot, when sound cards are plugged in and saved on
shutdown.

This is similar to existing udev/init script solutions in various
distributions.

Note that alsactl is called both synchronously from the udev rules as
well as asynchronously at boot. This is intended, and to ensure two
things:

- At boot the asound.state file might not be readable, since it resides
  on a different file system. That means exclusively restoring sound card
  settings from udev rules will no suffice, since if the rule is
  executed at early boot (for example within udev settle) then the file
  will no be readable and cannot be restored.

- We need to ensure that applications monitoring sound cards coming and
  going (such as PA) must not get these events before the mixer settings
  have been restored. That means the mixer settings must be restored
  synchronously withing the udev rules, before the events are passed on
  to the apps.

That basically means we need to restore the settings once in udev, to
deal with sound cards becoming available during runtime. And once in
early boot to deal with coldplugged soundcards whose data files might
not have been available at time of plugging. Hence we call alsactl
twice: one from the udev rule, and once from he systemd unit file.

Signed-off-by: Lennart Poettering <mznyfn@0pointer.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-23 10:42:35 +01:00
Clemens Ladisch
b42a1c7a19 update German translations
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-11-10 10:16:07 +01:00
Clemens Ladisch
f2e9e9a5b0 alsamixer: remove obsolete e-mail
Tim Janik's e-mail address is no longer valid.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-11-10 10:14:53 +01:00
Jaroslav Kysela
7a11a2b546 alsaloop: rework the ctl event handling routine
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-21 20:38:06 +02:00
Jaroslav Kysela
d53eb0309d alsaloop: Delay the restart a bit (to handle snd-aloop playback xruns better)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-20 09:31:01 +02:00
David Henningsson
b67d215d20 speaker-test: Don't retry after fatal errors
Fixup commit 9b1a2566: Remove error loop

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-17 10:17:14 +02:00
Jaroslav Kysela
1ae28cae89 alsaloop: Fix latency print
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-14 15:39:28 +02:00
Jaroslav Kysela
513a9c7ad1 alsaloop: fixes, added -W/--wake option
- added -W/--wake option to reduce poll time
- another try to fix the avail_min parameter for playback
- fixed initial silence fill

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-14 11:17:25 +02:00
Jaroslav Kysela
b68986fb4a alsaloop: add -U/--xrun to alsaloop.1 man page
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-13 23:41:29 +02:00
Jaroslav Kysela
1a35bdf7c6 alsaloop: added xrun profiling support (-U,--xrun), added SIGUSR1 state dump
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-13 23:39:36 +02:00
Jaroslav Kysela
af61ea60cf alsaloop: add --pctl and --cctl options to man page
Signed-off-by: Jaroslav Kysela <perex@perex.cz># Please enter the commit message for your changes. Lines starting
2010-10-11 11:56:16 +02:00
Jaroslav Kysela
38c2ef96b7 alsaloop: add --pctl and --cctl options
In some cases it might be usefull to specify another CTL device names.
Add -X/--pctl and -Y/--cctl options.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-11 11:53:50 +02:00
Jaroslav Kysela
bee994f509 alsaloop: Fixes and added --workaround option
- added workaround for alsa-lib (pthread configuration parsing issue) -
  the workaround must be activated manually using ('--workaround serialopen')
- fixed avail_min initialization (caused high CPU usage or xruns)
- fixed shared buffer initialization (both capture and playback buffers
  must have equal number of samples in this config)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-11 10:24:14 +02:00
Jaroslav Kysela
e77983d3c5 alsaloop: Fix command-line parsing and pollfd initialization
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-08 22:23:05 +02:00
Jaroslav Kysela
147a1cc75c alsaloop: Add OSS mixer redirection support
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-08 15:10:23 +02:00
Jaroslav Kysela
058357f042 alsaloop: added resampling for unsupported soundcard rates
- improve also xrun synchronization

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-07 20:38:36 +02:00
Jaroslav Kysela
f956c329aa alsaloop: fix resample argument parsing
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-07 00:12:38 +02:00
Jaroslav Kysela
5ad13c4825 alsaloop: fix -a option and slave mode processing
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-06 20:34:03 +02:00
Jaroslav Kysela
4fe4d22b73 alsaloop: Fix thread handling
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-06 18:51:29 +02:00
Jaroslav Kysela
ad0e562373 alsaloop: Fix loopbacks pointer initialization and allocation, fix -T option
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-06 18:30:18 +02:00
Jaroslav Kysela
1e75673035 Introduce alsaloop utility
alsaloop allows create a PCM loopback between a PCM capture device
and a PCM playback device.

alsaloop supports multiple soundcards, adaptive clock synchronization,
adaptive rate resampling using the samplerate library (if available in
the system). Also, mixer controls can be redirected from one card to
another (for example Master and PCM).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-06 10:01:52 +02:00
Jaroslav Kysela
87c58b59b5 amixer: fix parsing of control ID name
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-05 10:02:45 +02:00
Jaroslav Kysela
ef919a4724 alsactl init: Initialize also "Master Front Playback Volume" & "Switch"
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-07 17:33:14 +02:00
Jaroslav Kysela
52bd2f8ace alsactl init: Handle "Capture Source" and "Mic Boost" in the default script
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-07 17:07:12 +02:00
Jaroslav Kysela
0fea2452cb alsactl: Change handling of inactive controls
The inactive controls are stored, but they are not restored
when they are marked inactive in the state file or in the
driver.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-02 15:48:43 +02:00
Jaroslav Kysela
7f6a55e203 alsactl init: use "generic method" instead "guess method"
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-02 15:36:56 +02:00
Jaroslav Kysela
dcb90a779e alsactl init: Use "Found hardware:" instead "Unknown hardware:"
It seems that "Unknown hardware:" confuses users. Use "Found hardware:"
instead.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-02 15:03:23 +02:00
Jaroslav Kysela
bb865dc10b aplay/arecord: term_c_lflag variable might be unitialized in some cases
The term_c_lflag variable might be unitialized in some cases. Add extra
check to avoid setting of wrong value.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-08-18 08:23:09 +02:00
Jaroslav Kysela
4c337275d1 speaker-test: add test pattern for PCM layer debugging purposes
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-08-18 08:22:23 +02:00
Jaroslav Kysela
73c79ebf26 aplay: fix termio settings - return back old c_flag value on exit
- symptom - ssh client password authentication does not work with
  the modified terminal settings

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-15 13:39:14 +02:00
Jaroslav Kysela
3bd6533622 aplay/arecord: Added hardware pause support (press SPACE or Enter)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-15 10:40:21 +02:00
Clemens Ladisch
b4ff58b685 Revert wrong parts of "alsactl: use snd_config_imake* functions"
This reverts the parts of commit e509df69a5
that accidentally reverted a bunch of earlier commits.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-05-26 10:37:58 +02:00
Clemens Ladisch
bd15b1e5ea alsactl: change format of comment node in state file
Make the comment node a separate node in the state file (join=0), and
move it after the other fields of the respective control.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-05-26 10:28:11 +02:00
Clemens Ladisch
4f29877d54 alsactl: correctly restore dB values of controls with changed range
When the range of a control has changed between driver versions, it is a
good idea to restore the same dB value of the control.  However,
computing the dB value by interpolating betweem the min/max dB values
duplicates alsa-lib's TLV functions and does not even work for controls
with a linear dB range.

A simple conversion to dB and back can be done if we add the dB value(s)
to the saved state.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-05-26 10:27:25 +02:00
Clemens Ladisch
224c12238e alsactl: remove open-coded search
Remove search_comment_item since it does the same as snd_config_search.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-05-26 10:19:17 +02:00
Clemens Ladisch
ad47784b01 alsactl: move alloca out of loop
Reserving new space from the stack in every loop iteration is not
necessary, so move the call to snd_ctl_elem_id_alloca outside where it
is executed only once.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-05-26 10:18:43 +02:00
Clemens Ladisch
e509df69a5 alsactl: use snd_config_imake* functions
To save a call to snd_config_set_xxx, replace the calls to
snd_config_make_xxx with snd_config_imake_xxx.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-05-26 10:07:47 +02:00
Jaroslav Kysela
1b22cb0488 Release v1.0.23
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-04-16 13:11:06 +02:00
lieven moors
b5f5ebcbe6 aconnect -x: Do not update index after removal of connection.
Signed-off-by: lieven moors <lievenmoors@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-25 12:21:58 +01:00
Jaroslav Kysela
f0658f37dc alsactl: update debug prints in state.c
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-25 16:45:13 +01:00
Jaroslav Kysela
412cb29b58 alsactl: add more debug prints to state.c
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-25 15:02:09 +01:00
Jaroslav Kysela
5c35aa8b69 alsactl: improve -d to get warnings and store exitcode to runstate file
Also, make the initialization & restore logic for one card similar to
multiple card initialization & restore.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-25 09:22:26 +01:00
Clemens Ladisch
c9b86f49a8 alsamixer: handle out-of-range volume values
Ensure that control volume values are in their allowed range; otherwise,
the displayed values could be outside the range 0..100 and mess up the
layout.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-02-22 09:42:03 +01:00
Clemens Ladisch
5a016b583b alsamixer: fix division by zero
The attempt to divide by max-min fails if a control has only one valid
value.  In this case, adjust the maximum so that the computation can
succeed; the control will look like 0%.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-02-19 17:07:20 +01:00
Jaroslav Kysela
69c6bead43 alsactl: Fix return code
The main() should return positive error value.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-14 19:07:25 +01:00
Jaroslav Kysela
f45aa72cd6 amixer: add support for TLV dB minmax types
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-02-10 11:52:53 +01:00