Commit graph

128 commits

Author SHA1 Message Date
Jaroslav Kysela
5b9041bced Change FSF address (Franklin Street)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:29:26 +01:00
Takashi Sakamoto
7bebd4c980 ctl: rename APIs to add an element set so that their names are appropriate
In this development period, some APIs have already been added. Most of
them are to add an element set, while their names are not so appropriate
against their feature. This is due to following to names of old APIs.

This commit renames them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-07-17 10:01:25 +02:00
Takashi Sakamoto
16812b70da ctl: add an API to set dimension levels to element information
In a former commit, 'struct snd_ctl_elem_info' is used as a 'container' to
transfer extra fields of element information for APIs to add an element
set. The extra fields should be filled in advance of call of the APIs.
Currently, dimension level is in the extra fields and no APIs to set it.

This commit adds an API to set dimension level to the information
structure. This API is expected to be used in advance of usage of APIs
to add an element set, for nothing others. When the information structure
is extended in future, then the similar APIs shall be added for the new
feature.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-30 08:42:17 +02:00
Takashi Sakamoto
f9e6011255 ctl: support extra information to user-defined element set
In ALSA control feature, information of an element includes extra fields
to type-specific parameters; i.e. dimension. The fields can be extended in
future.

Meanwhile, current APIs to add user-defined element set can not support
such an extended fields. This may cause inconveniences in future.

This commit supports the fields, by changing APIs for element set.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-30 08:42:17 +02:00
Takashi Sakamoto
7117d22cf2 ctl: use consistent name for second argument of snd_ctl_elem_read/write
Second argument of these functions has three different names in
documentation/header/code (obj/control/value). This easily causes users'
confusion.

This commit applies consistent names for the arguments.

Fixes: 90020c05f8 ('ctl: improve comments for handling element data')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-29 11:50:26 +02:00
Takashi Sakamoto
07861888e4 ctl: add functions to add an element set
ALSA control core allows userspace applications to add an element set.
However, in ALSA userspace library, there's no APIs enough to utilize
the feature. The library has APIs just to add an element set with a single
element.

This commit adds functions to add an element set with several elements.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-16 15:45:58 +02:00
Takashi Iwai
30122df4fa Use __inline__ for exported headers
Some programs are still using C90.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=817077
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-25 09:52:33 +02:00
Jaroslav Kysela
e23fb2c4de control, pcm: implement snd_ctl_abort() and snd_pcm_abort() functions
Upon an interrupt, it is necessary to abort the wait loops with the EINTR
error code. Introduce snd_*_abort() functions to handle this case.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-08 13:28:03 +02:00
Takashi Iwai
3c4a22ea49 Implement the channel mapping API
Added new channel-mapping API functions.
Not all plugins are covered, especially the route, multi and external
plugins don't work yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11 11:34:50 +02:00
Clemens Ladisch
15c6f83296 control: add snd_ctl_elem_add_enumerated()
Handling of user control elements was implemented for all types except
BYTES and ENUMERATED.  Enumerated user controls will be needed for the
device-specific mixers of upcoming FireWire drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-10-07 23:38:55 +02:00
Takashi Iwai
acb423d937 Add snd_{ctl|pcm}_open_fallback() functions
This patch adds new API functions, snd_ctl_open_fallback() and
snd_pcm_open_fallback().  These are just like snd_*_open_lconf() but
used to open a fallback PCM/control.  The difference is that it replaces
the name string with the given original name, so that hctl and other
upper-layers will recognize it as an alias.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-27 15:24:13 +02:00
Jaroslav Kysela
9b6df1cf64 control: add ASCII parsers from amixer
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-04 19:58:44 +01:00
David Fries
63acb87329 modem.conf Off-hook improve behavior
Only restore the old value if it differs from the requested
value, because if it has changed restoring the old value
overrides the change.  Take for example, a voice modem with
a .conf that sets preserve off-hook.  Start playback (on-hook
to off-hook), start record (off-hook to off-hook), stop
playback (off-hook to restore on-hook), stop record (on-hook
to restore off-hook), Clearly you don't want to leave the
modem "on the phone" now that there isn't any playback or
recording active.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-22 11:45:35 +01:00
Takashi Iwai
f8a34aa683 Add the support of TLV_DB_MINMAX types
Added the support of the new TLV_DB_MINMAX types.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-16 14:28:57 +02:00
Takashi Iwai
a51118bb62 Fix build with --disable-hwdep and co
control.h has function declarations with hwdep or rawmidi types
that aren't included when built without the corresponding supports.

Add ifdef appropriately to fix this.
2008-02-04 16:00:16 +01:00
Takashi Iwai
68e5771a6f Remove assert from header files
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.
2007-10-25 15:36:03 +02:00
Takashi Iwai
f38e5feca3 Export dB conversion helper functions
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.
2007-10-24 13:04:14 +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
2c02c139f4 remove snd_ctl_iface_conf_name() prototype, namehint doxygen cleanups 2006-12-07 15:29:20 +01:00
Jaroslav Kysela
6d90397add add snd_device_name_get_hint() prototype to include/control.h 2006-12-05 11:52:37 +01:00
Clemens Ladisch
0f99fe7830 fix string list parameter in snd_device_name_(free_)hint prototypes
Fix the type of the string list parameter in the prototypes of
snd_device_name_hint() and snd_device_name_free_hint().  The prototypes
used char**, while the implementation and the users are using void**.
2006-12-04 18:07:46 +01:00
Jaroslav Kysela
03389a444b change iface argument for namehint function to const char *
remove snd_ctl_iface_conf_name function
2006-10-27 13:31:32 +02:00
Jaroslav Kysela
13fdc41785 add snd_device_name_hint() function and initial implementation
- 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
2006-10-11 13:18:57 +02:00
Takashi Iwai
fba26cd668 Add support of dB range compound TLV
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.
2006-09-06 12:17:29 +02:00
Takashi Iwai
b0bbcd0697 Add handling of linear volume in simple mixer
Added the handling of linear volume TLV in the simple mixer layer.
2006-08-28 13:27:41 +02:00
Takashi Iwai
ae76129999 Move dB parser to mixer abstraction
Moved the parser of dB value to mixer abstraction from hcontrol layer.
Also, cleaned up codes.
2006-07-28 14:36:37 +02:00
James Courtier-Dutton
5e3fc87888 Implement support for dB gain display in alsamixer. 2006-07-22 14:56:48 +01:00
Jaroslav Kysela
c7a0708a23 Control API - add TLV support
snd_ctl_elem_tlv_read
snd_ctl_elem_tlv_write
snd_ctl_elem_tlv_command
snd_ctl_elem_info_is_tlv_readable
snd_ctl_elem_info_is_tlv_writable
snd_ctl_elem_info_is_tlv_commandable
snd_hctl_elem_tlv_read
snd_hctl_elem_tlv_write
snd_hctl_elem_tlv_command
2006-07-05 17:42:16 +02:00
Takashi Iwai
8a3d07022c Add external control plugin SDK
Added external control plugin SDK.
2005-06-09 17:12:08 +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
Clemens Ladisch
04c2de32c1 fix some file paths in comments
doxygen complains if the file name specified with \file does
not match the real file name, so fix it
2005-01-17 17:34:31 +00:00
Takashi Iwai
0732cce6f0 Add accessor to user control elements
Added accessor functions to user control elements, snd_ctl_elem_add_*(),
and_ctl_elem_remove() and snd_ctl_elem_info_is_user().
2005-01-03 11:52:39 +00:00
Jaroslav Kysela
ab61b62cb4 More changes to the ordinary mixer API 2003-10-13 12:06:45 +00:00
Jaroslav Kysela
60585e25fc added snd_hctl_ctl() function
ordinary mixer:
  - revised Ordinary Mixer I/O type
  - sndo_mixer_open() take PCMs rather than strings to pass
    the real relationship
  - an initial version of toplevel alisp script
more alisp development:
  - renamed a* functions to A* functions (acall -> Acall etc.)
  - many improvements (unset*, exfun, Acall pcm_info, Asnderr, Asyserr)
2003-09-09 19:24:35 +00:00
Jaroslav Kysela
adbc93f1a4 More alisp extensions (card related functions, ctl_card_info). 2003-07-29 13:19:19 +00:00
Jaroslav Kysela
92093ae0fe Added snd_hctl_open_ctl() function.
alisp massive extensions and tested ALSA function bindings.
2003-07-27 20:20:26 +00:00
Jaroslav Kysela
368918b453 Added snd_ctl_elem_info_get_dimensions() and snd_ctl_elem_info_get_dimension() functions. 2003-04-01 13:58:09 +00:00
Jaroslav Kysela
7fcea07002 Added SND_CTL_READONLY 2002-12-04 14:36:39 +00:00
Jaroslav Kysela
ffda02123d Added INTEGER64 support by Paul Davis 2002-05-13 09:34:08 +00:00
Jaroslav Kysela
712501af15 Added integer64 routines for control API 2002-05-08 07:56:39 +00:00
Jaroslav Kysela
853304bbf4 Corrections by Kevin Conder <kconder@interaccess.com> 2002-03-12 20:14:33 +00:00
Jaroslav Kysela
2ca5ace9cb More documentation changes (rawmidi, timer) 2002-02-11 18:11:16 +00:00
Takashi Iwai
6ce9436b13 removed comma from last element of enums. 2002-02-05 11:36:20 +00:00
Jaroslav Kysela
d57853a90a Added more informative comments to open mode flags 2002-01-28 18:11:45 +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
ddb7209e9a Added snd_*_poll_descriptors_revents functions. 2001-11-30 17:36:45 +00:00
Jaroslav Kysela
c33c5760ab Added snd_*_open_lconf functions.
Some minor changes in config interface documentation.
2001-11-24 17:47:01 +00:00
Jaroslav Kysela
c39882f602 Configuration:
- changed snd_config_get_id function to follow semantic of other get functions
  - added snd_config_test_id
  - added runtime pointer type (not persistent)
    - added snd_config_make_pointer, snd_config_set_pointer, snd_config_get_pointer
  - added type/contents checking for callback functions
    - changed 'void *private_data' to 'snd_config_t *private_data'
  - renamed card_strtype functions to card_driver
Control:
  - fixed passing parameters to snd_ctl_async
Async handlers:
  - added public snd_async_handler_get_signo function
Documentation:
  - moved all documentation to source files
2001-11-19 08:14:21 +00:00
Jaroslav Kysela
87b5b249a5 pcm.h - major documentation updates and reordering
Cleanup for __cplusplus defines.
2001-11-14 11:40:46 +00:00
Jaroslav Kysela
80dfd3befd Cut&paste fixes 2001-09-26 15:23:46 +00:00