summaryrefslogtreecommitdiff
path: root/src/mixer/simple_none.c
Commit message (Collapse)AuthorAgeFilesLines
* mixer: remove alloca() from set_enum_item_ops()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from get_enum_item_ops()Takashi Sakamoto2016-07-151-4/+3
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from enum_item_name_ops()Takashi Sakamoto2016-07-151-6/+5
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from init_db_range()Takashi Sakamoto2016-07-151-4/+3
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for init_db_range()Takashi Sakamoto2016-07-151-2/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from selem_write_main()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for selem_write_main()Takashi Sakamoto2016-07-151-3/+6
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_route()Takashi Sakamoto2016-07-151-6/+5
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_write_route()Takashi Sakamoto2016-07-151-1/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_enum()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_write_enum()Takashi Sakamoto2016-07-151-2/+4
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_switch_constant()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_switch()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_write_switch()Takashi Sakamoto2016-07-151-1/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_volume()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_write_volume()Takashi Sakamoto2016-07-151-1/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from selem_read()Takashi Sakamoto2016-07-151-4/+3
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for selem_read()Takashi Sakamoto2016-07-151-1/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_read_enum()Takashi Sakamoto2016-07-151-4/+3
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_read_enum()Takashi Sakamoto2016-07-151-2/+4
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_read_route()Takashi Sakamoto2016-07-151-4/+3
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_read_route()Takashi Sakamoto2016-07-151-1/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_read_volume()Takashi Sakamoto2016-07-151-8/+6
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_read_volume()Takashi Sakamoto2016-07-151-1/+3
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: include library local header to find layout of structuresTakashi Sakamoto2016-07-151-1/+1
| | | | | | | | | | | | | | Inner this library, implementation of each features can find actual layout of structures by including local header. Although, mixer feature is written without the header and as the same way for applications. This brings some inefficiencies such as usage of alloca() to keep memory objects for the structures. This commit includes the header for further improvements in mixer feature. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: Fix inclusion of config.hTakashi Iwai2014-11-211-1/+1
| | | | | | config.h wasn't read or read too late in some files in src/mixer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Reduce compilation warningsJaroslav Kysela2012-10-301-2/+0
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Fix compile warningsTakashi Iwai2011-05-041-2/+2
| | | | | | | | | | strstr() returns a char pointer simple_none.c: In function ‘base_len’: simple_none.c:940:33: warning: ordered comparison of pointer with integer zero simple_none.c:941:29: warning: ordered comparison of pointer with integer zero Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Fix alsa-lib to regard 3D control - Depth as Playback ControlsRaymond Yau2011-02-281-1/+6
| | | | | | | | This allow those mixer or recording application to find those controls which are really used for capturing. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* simple_none.c uses HAVE_SOFT_FLOAT it has to include config.hMichael Olbrich2009-11-161-0/+1
| | | | | | | | for this to work properly. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* mixer: Add Speaker and Beep names to the weight listTakashi Iwai2009-08-311-0/+2
| | | | | | | Added strings "Speaker" and "Beep" to the weight list so that the entries appear in more appropriate positions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Fix build with softfloat optionTakashi Iwai2009-01-211-0/+7
| | | | | | | | Fix build of alsa-lib when --with-softfloat is used: - disable ladspa plugin - don't use sqrt() function Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Mark static tables as constant when possible.Diego E. 'Flameeyes' Pettenò2008-11-211-5/+5
| | | | | | | 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>
* Make string arrays as constant as possible.Diego E. 'Flameeyes' Pettenò2008-11-211-2/+2
| | | | | | | Use "const char *const []" as type for string arrays, or convert to "const char [][x]" when it makes sense. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
* Fix volume/switch updates for global/simple mixer elementsTakashi Iwai2008-11-101-3/+19
| | | | | | | Fixed a long-standing bug that the values of global or simple mixer elements aren't updated when dir = SM_CAPT is given. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* implemented integer volume <-> dB volume conversion functions for simple mixerJaroslav Kysela2008-04-211-0/+29
|
* simple mixer: fix calculation of control rangeClemens Ladisch2007-11-121-6/+9
| | | | | | When calculating the value range of a control, the variables cannot be initialized with zero because this would prevent the minimum from having a value above zero or the maximum from having a value below zero.
* Remove assert from header filesTakashi Iwai2007-10-251-0/+1
| | | | | | | | Putting assert in the public macros isn't good idea at all. Let's get rid of them. Also, clean up snd*_alloca() functions to use a helper macro instead of copy and paste.
* Export dB conversion helper functionsTakashi Iwai2007-10-241-264/+13
| | | | | | | Export helper functions to convert dB level and range. snd_tlv_*dB*() are to convert dB level or range directly from TLV data. snd_ctl_*dB*() are to get dB level or range from a control element.
* Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela2007-10-151-2/+2
|
* Handle "Input Source" as a capture elementTakashi Iwai2007-08-291-3/+31
| | | | | | | Some drivers use "Input Source" as the capture source mixer element because mixer abstraction layer can't handle multiple "Capture Source" elements. This patch adds a hack to handle Input Source as a capture route, and let mixer apps know that it's a capture stuff, at least.
* fix SNDERR() format strings/argumentsClemens Ladisch2007-02-121-1/+1
|
* Implements support for capture/playback enums.James Courtier-Dutton2006-10-131-26/+133
|
* add snd_device_name_hint() function and initial implementationJaroslav Kysela2006-10-111-0/+4
| | | | | | | | | | - add snd_device_name_hint() and snd_device_name_free_hint() functions - add snd_ctl_iface_conf_name() functions - do not accept parameters for the plugin definition without @args section - add defaults.pcm.dmix.card/device and dsnoop.card/device definitions - add hints for HDA-Intel.conf, pcm/dmix.conf, pcm/dsnoop.conf and alsa.conf - add test/namehint test utility - doxygen related cleanups
* simple mixer - fix error recovery path for volume / switch writeJaroslav Kysela2006-10-011-1/+11
| | | | | | If volume or switch write fails, the internal contents for element is changed, but it is wrong. Reread the whole simple element in this case to get correct values.
* Fix wrong scales in linear volume calculationTakashi Iwai2006-09-071-5/+5
| | | | | Fixed wrong scales of dB values (TLV is 0.01dB unit) in the linear volume calculation.
* Add support of dB range compound TLVTakashi Iwai2006-09-061-50/+144
| | | | | Added the support of dB range compound TLV type in the simple mixer layer. All get_dB, get_dB_range and set_dB ops are supported.
* Add handling of linear volume in simple mixerTakashi Iwai2006-08-281-4/+64
| | | | Added the handling of linear volume TLV in the simple mixer layer.
* Add set_dB ops to simple mixerTakashi Iwai2006-08-251-21/+63
| | | | Added the set_dB ops to simple mixer.
* Add dB_range ops for simple mixerTakashi Iwai2006-08-251-22/+58
| | | | Added the dB_range ops for simple mixer.