Commit graph

145 commits

Author SHA1 Message Date
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
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
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
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
Jaroslav Kysela
4c09aaa5c1 alsamixer: Fix X-win related crash for PulseAudio plugin (bad linking)
A lot of reports that alsamixer crashes in X terminal when the PulseAudio
CTL plugin is activated were entered to the tracking systems.

I figured that there is a linking clash for the shutdown() function.
The shutdown() function in glibc is socket related, but the alsamixer code
redefines this function and appearently that under some linking
circumstances - which PA client invokes during the runtime dynamic linking
- the wrong function is called.

This patch, for safety, renames the shutdown() function from alsamixer
to app_shutdown(), but it might make sense to figure the real linking
culprit to avoid future surprises.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-11-02 17:27:47 +01:00
Takashi Iwai
3bea722b3b alsamixer: Fix 64bit issues
lrint() returns a long int.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03 14:28:28 +02:00
Peter Korsgaard
a7bd33957e alsamixer: fix build on uClibc
exp10 is a glibc extension, which isn't supported on uClibc. Luckily,
exp10() is trivial to compute based on exp(), so add a wrapper for
the uClibc case.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-03-14 10:31:34 +01:00
Raymond Yau
cd26f244e7 alsamixer: fix display of active/inactive controls
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-02-28 15:36:36 +01:00
Clemens Ladisch
34bb514b5f alsamixer: use cubic scale for volume bars
Instead of mapping the raw volume values linearly to the screen, use
a mapping where the bar height is proportional to the audible volume,
i.e., where the amplitude is the cube of the bar height.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-12-06 14:07:48 +01:00
Clemens Ladisch
70a01748d5 alsamixer: increase step size for big control value ranges
For controls with a big range, stepping through all values can become
tedious and make it impossible to adjust the volume easily.  Therefore,
ensure that all steps are big enough so that the full range has at most
one hundred steps.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-12-06 14:05:10 +01:00
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
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
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
defee56c41 alsamixer: Improve set_escdelay() function availability detection
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-08-31 17:13:36 +02:00
Clemens Ladisch
077467a87e alsamixer: fix display of inactive volume bar
Fix the volume bar color selection logic so that the current attribute
is used for inactive controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-06-19 08:40:00 +02:00
Clemens Ladisch
7a3e59cbc5 alsamixer: rename attr to ch
Rename the attr variable because it contains not only the character's
attributes but also the character itself.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-06-19 08:39:24 +02:00
Takashi Iwai
29a7dbc552 alsamixer - Tricolorize volume bars
A little of bit of Italian taste was missing...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-18 14:42:28 +02:00
Clemens Ladisch
05fcb0c79f alsamixer: update man page
Update man page for change in "CAPTURE" field.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-06-02 11:19:45 +02:00
Clemens Ladisch
730e8253ef alsamixer: fix text box clipping with multi-column characters
When a multi-column character would straddle the left window border of
a text box, we have to take the inserted space character into account
when we compute how many characters fit into the rest of the line.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-05-28 09:16:11 +02:00
Takashi Iwai
b8f567461e alsamixer - Fix uninitialized variable warning
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-27 14:16:30 +02:00
Clemens Ladisch
5b6b5fd14b alsamixer: show channel names for multichannel controls
For multichannel mixer controls, add the channel name to each screen
control.

Also make some other small changes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-05-25 10:26:22 +02:00
Simon Hengel
8e0eb860ef ALSA: Added vi-like key bindings to alsamixer.
* Added 'j' as an alias for KEY_DOWN
* Added 'k' as an alias for KEY_UP

Signed-off-by: Simon Hengel <simon.hengel@gmx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-20 14:53:38 +02:00
Diego E. 'Flameeyes' Pettenò
6232f1c96c Make some static tables and strings constants.
By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.

The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 13:10:02 +01:00
Takashi Iwai
8e3e09dd0b Add check of ncurses*-config
The recent ncurses package provides ncurses*-config program to give the
proper cflags and libs.  Let's use them if available.

Right now, the ncurses version (5) is hard-coded.  It should be better
to be variable as well, but it'd be messy.  Hope the ncurses version won't
change rapidly.
2008-04-16 14:39:41 +02:00
Clemens Ladisch
fb1c2d53a1 alsamixer: add 8-channel support
Add support for playback volume controls with 8 channels.
This allows controlling the side channels on 7.1 devices.
2008-01-07 12:28:43 +01:00
Jaroslav Kysela
48de580a7b Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:25:17 +02:00
Takashi Iwai
cbb2d555df alsamixer - Handle capture enums separately
The capture enum controls should appear only in capture and all views.
This is a fix for Input Source enum controls.
2007-08-29 14:49:55 +02:00
Jaroslav Kysela
8d0fb15b2b amixer/alsamixer - updated go scripts for debugging 2007-07-11 10:12:24 +02:00
Takashi Iwai
53eb911fb7 alsamixer - Fix duplicated appearance in All view mode
Fixed the duplicated appearances of common volumes / switches
in ALL view mode.
2007-05-18 16:58:02 +02:00
Jaroslav Kysela
a08925f7a8 alsamixer: cosmetic fix 2006-10-04 09:34:02 +02:00
Takashi Iwai
cb9cb72466 Show the mute dB state correctly
Show the mute dB state correctly as 'mute' in the status line.
2006-08-25 12:39:34 +02:00
Jaroslav Kysela
e45ba7e644 amixer - show dB values for simple mixer interface (which is default) 2006-07-27 11:02:00 +02:00
Takashi Iwai
9fb30e388f Fix compile warnings
Fix trivial compile warnings.
2005-12-16 18:44:14 +00:00
James Courtier-Dutton
bd7a1e9847 Implement dB gain level display.
DONE: If alsa-lib and alsa-driver support it,
      alsamixer now displays dB gain levels for all mixer controls.
TODO: Implement alsa-lib and alsa-driver parts.
2005-09-10 13:56:57 +00:00
Takashi Iwai
0c4dfcaa97 Use strsignal()
Use strsignal() instead of sys_siglist[] (bug#1400).
2005-09-07 13:42:18 +00:00
Takashi Iwai
87ffccedfd Fix / clean up man pages
Fix / clean up man pages (bug#1386)
2005-09-02 17:36:40 +00:00
Takashi Iwai
39ff48b437 Output help messages to stdout
Output help messages and lists to stdout instead of stderr.
2005-06-23 10:39:16 +00:00
Jaroslav Kysela
fefe0aafaf initial debug script 2005-06-16 11:53:49 +00:00
Jaroslav Kysela
dd97818e6e Added support for abstraction selection
- (basic abst might be the default someday)
2005-06-16 11:53:20 +00:00
Takashi Iwai
74dca8fd02 Fix a wrong display in the last patch
Fixed a wrong item display in the last patch.
2005-06-15 12:53:30 +00:00
Takashi Iwai
11f789c4f9 Fix unexpected abort of alsamixer
Fixed unexpected abort of alsamixer when no playback or capture elements
are available.  Also fixed the wrong use of temporary array in
displaying item name.
2005-06-15 12:49:07 +00:00
Takashi Iwai
7b0c847f1a Fix typos in man pages
Fix typos in man pages (bug #1024)
2005-06-08 13:55:54 +00:00
Takashi Iwai
ff1354844a Fix crash with enum controls
Fix crash in display enum controls.
2005-05-30 16:37:52 +00:00
James Courtier-Dutton
ae524665a9 Comment out a section that causes an assert in alsamixer, until this section of code works. 2005-05-28 16:06:14 +00:00
Takashi Iwai
34e3b1c783 Fix segfault with no-capture devices
Fix segfault on the device without capture controls when the view
is changed to capture mode (bug #1080).
2005-05-23 16:48:17 +00:00
James Courtier-Dutton
f8d4923fa7 Improve display of long text for enums. 2005-05-22 14:16:38 +00:00
Takashi Iwai
53adb97f2e Fix typo
Fixed a typo.
2005-03-30 16:11:11 +00:00
Takashi Iwai
e188eaf097 Show other view names
alsamixer shows all view names in the View: line so that user
can understand what it means.  The currently used view is
shown with brackets and emphasized.
2005-01-31 13:46:05 +00:00
Takashi Iwai
2b83c39265 Fix compile warnings
Fixed compile warnings due to unused variables.
2005-01-13 15:42:25 +00:00