Commit graph

83 commits

Author SHA1 Message Date
David Henningsson
e2cfe3c6c8 mixer: Fix rounding mode documentation
The documentation specifies three different rounding modes, but this
is wrong, because they all end up calling snd_tlv_convert_from_dB,
which only has two rounding modes.

Signed-off-by: David Henningsson <diwic@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-22 11:27:03 +02:00
Takashi Iwai
c0a708180f mixer: Fix inclusion of config.h
config.h wasn't read or read too late in some files in src/mixer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-21 15:20:48 +01:00
Takashi Iwai
2ab86d96c9 mixer: Remove redundant CHECK_ENUM() from snd_mixer_selem_is_enum*()
The functions to check whether the element is an enum don't need the
extra check of the type.  It should return simply 0 or 1 without error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13 14:30:22 +01:00
Clemens Ladisch
762fe145e9 mixer: fix enum check
The recent CHECK_ENUM fix uncovered a bug in snd_mixer_selem_is_enumerated()
which would now return -EINVAL for any non-enum control, which would be
interpreted as 'true' by callers like amixer or alsamixer.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-11-23 10:56:46 +01:00
Takashi Iwai
3440994f68 Fix CHECK_ENUM() in simple.c
simple.c: In function ‘snd_mixer_selem_is_enumerated’:
simple.c:881: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-08 09:26:59 +01:00
Diego E. 'Flameeyes' Pettenò
03388ca6d3 Mark static tables as constant when possible.
This makes it possible to write them to .data.rel.ro or to .rodata if
there is no relocation involved (arrays of character arrays).

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 22:39:38 +01:00
Jaroslav Kysela
058dde8b7d implemented integer volume <-> dB volume conversion functions for simple mixer 2008-04-21 11:44:20 +02:00
Jaroslav Kysela
d25e281230 Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:24:55 +02:00
Jaroslav Kysela
e0d7bfcea6 mixer simple basic abstraction - added python binding
reasons:
- rapid development
- class-like code structure
- more readable code
features:
- hcontrol binding is managed from python (opportunity to create
  virtual mixer without driver or join multiple cards to behave as one)
2007-07-11 10:10:12 +02:00
Clemens Ladisch
b5f50b06d2 fix doxygen warnings
Fix some wrong parameter names, hide some undocumented functions, and
correctly escape <> characters.
2005-10-12 16:08:53 +00:00
Jaroslav Kysela
5af75610f2 mixer API - extend simple enumerated controls for direction tests
Added snd_mixer_selem_is_enum_playback() and
snd_mixer_selem_is_enum_capture() functions.
2005-08-24 10:41:16 +00:00
James Courtier-Dutton
c593c1d260 Fix bug when a sound card had a stereo mute element and would fail to unmute the right channel.
Fixes a typo. Fixes bug#[ALSA - lib 0001219]
2005-06-29 20:31:33 +00:00
Jaroslav Kysela
ce67d5389b more simple mixer - basic abstraction - work
- midlayer cleanups and simplification
- probably broke the "none" abstraction code somehow (not intensively tested
  midlayer changes)
- trying to implement ac97 module
  - far from finished
  - common code should be moved to alsa-lib as core for other modules
  - perhaps simple_abst.c can be based on this common code, too
2005-06-16 11:59:26 +00:00
Jaroslav Kysela
597b4d0942 big simple mixer update
- exported all necessary functions to create a mixer module outside alsa-lib
- separated simple mixer API from the simple mixer implementation
  (using callbacks as usuall)
  - src/mixer/simple.c is the core
  - src/mixer/simple_none.c is the current (no-abstraction) implementation
    based on control names; note that this module does not depend on
    internal ALSA structures now
  - src/mixer/simple_abst.c is the ongoing abstraction which will use
    external dynamic modules; src/conf/smixer.conf will describe which
    modules will be used depending on the components from the driver
2005-06-03 13:33:04 +00:00
Jaroslav Kysela
ff9fd33190 a bit reordered code to fix bug #838 2005-05-30 11:38:54 +00:00
Takashi Iwai
087184b0f9 Fix doxygen documents
Fix the warnings of doxygen parsing.
Add some missing documentation.
2005-05-24 14:14:28 +00:00
Takashi Iwai
9835e5c9ce Add Side controls in the weight list
Added the "Side" controls in the weight list.
2005-02-18 18:13:45 +00:00
Takashi Iwai
cb6bb19b4d Add Front control to weight list
Added "Front" control to the weight list.
2005-01-03 17:12:21 +00:00
Takashi Iwai
c11a1fc9be fixed documents to process properly via doxygen. 2004-05-24 14:57:47 +00:00
Takashi Iwai
70d2dd963d fixed the event handling of enum elements. 2004-05-02 11:59:08 +00:00
Takashi Iwai
965222c3d9 fixed compile warnings. 2004-04-15 12:52:49 +00:00
Jaroslav Kysela
81f8c76094 Initial proposal for selection of abstraction in simple mixer API.
Added dB related functions (no implementation yet).
2004-03-14 18:39:58 +00:00
Jaroslav Kysela
f3da5548b3 Fixed range problems 2003-12-09 09:48:28 +00:00
Takashi Iwai
19e8aa67db - fixed the invalid (positive) return value from snd_mixer_set_xxx()
functions.
2003-11-19 15:52:16 +00:00
Takashi Iwai
3b6ee2ad97 accept enum items for other volumes and switches. 2002-09-20 09:44:25 +00:00
Takashi Iwai
cabf841f4e handle enumerated playback/capture routes. 2002-09-13 17:36:44 +00:00
Takashi Iwai
c25879f9d9 added the handling of enum controls to simple mixer API.
the following functions are added:
int snd_mixer_selem_is_enumerated()
int snd_mixer_selem_get_enum_items()
int snd_mixer_selem_get_enum_item_name()
int snd_mixer_selem_get_enum_item()
int snd_mixer_selem_set_enum_item()
2002-09-09 14:24:56 +00:00
Jaroslav Kysela
52237f3542 Added back check for duplicated helements 2002-09-04 07:35:25 +00:00
Takashi Iwai
cf444c56b3 replaced excessive asserts with normal conditionals.
this _might_ cure some problems on powermac driver...
2002-09-03 15:53:59 +00:00
Takashi Iwai
50be21e1e4 fixed the detection of playback switch. 2002-05-02 10:58:10 +00:00
Jaroslav Kysela
853304bbf4 Corrections by Kevin Conder <kconder@interaccess.com> 2002-03-12 20:14:33 +00:00
Takashi Iwai
8336a94225 fixed handling of capture switch / volume:
"Capture Switch" and "Capture Volume" controls are handled
capture switch and volume without playback capabilities.

capture switch and volume capabilities are not set on
global switches and volumes such as Bass and Treble.
only playback switch/volume is set.
2002-03-12 12:30:17 +00:00
Jaroslav Kysela
3e3df2d32b Updated GNU GPL license (address).
Changed GNU LGPL licence from 2.0 to 2.1.
2001-12-30 09:22:54 +00:00
Jaroslav Kysela
aded0e2354 Fixed typo 2001-08-27 09:13:58 +00:00
Jaroslav Kysela
7e6906d056 Another fix - switch behaviour 2001-07-30 09:58:32 +00:00
Jaroslav Kysela
5b41fff0be Mixer behaviour fixes 2001-07-26 10:52:42 +00:00
Jaroslav Kysela
48c58ade1d Small fixes (capture & switch read) 2001-07-25 12:33:35 +00:00
Jaroslav Kysela
ff1820f1ad Added snd_mixer_selem_is_active function.
Changed behaviour for CTL_SINGLE.
Function snd_mixer_handle_events is no longer called from simple mixer code.
2001-07-23 13:07:47 +00:00
Jaroslav Kysela
0d9a5d0e59 More documentation updates. 2001-07-18 12:17:11 +00:00
Jaroslav Kysela
c20c954f3d Added documentation for instrument and midi event functions.
Removed snd_enum_() macros.
Documentation changes in asoundlib.h.
2001-07-11 14:09:01 +00:00
Jaroslav Kysela
711a344fa4 Added more Tone Control items to the sort tables 2001-05-14 14:29:19 +00:00
Jaroslav Kysela
290c2ed8fc Updated the sorting tables and functions. 2001-05-14 11:28:11 +00:00
Jaroslav Kysela
78cd184441 Added 'Center' and 'LFE' to the sort table 2001-05-08 09:25:13 +00:00
Jaroslav Kysela
d16192f6f2 Fixed capture source handling 2001-04-18 14:29:02 +00:00
Abramo Bagnara
62b2da1186 Documentation generation fixes 2001-03-30 10:12:19 +00:00
Abramo Bagnara
b4ac62f3dd More documentation. Tiny change for simple mixer element API (get_range) 2001-03-30 09:43:29 +00:00
Abramo Bagnara
5b50ec848a Lot of cleanings with the help of gcc3 2001-03-29 17:50:28 +00:00
Jaroslav Kysela
53fc0f6332 Added I2S to sort tables. 2001-03-27 15:50:17 +00:00
Jaroslav Kysela
0300bbbbb3 Added more sort rules 2001-03-16 16:46:05 +00:00
Abramo Bagnara
0c7637393f Added range specification to simple mixer. Fixes to alsamixer. Added mixer support to alsa-oss 2001-02-18 17:56:37 +00:00