summaryrefslogtreecommitdiff
path: root/src/timer/timer.c
Commit message (Collapse)AuthorAgeFilesLines
* ucm: add LibraryConfig supportJaroslav Kysela2021-04-131-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit allows to define private alsa-lib's configuration. When the configuration is present, the device values ("PlaybackCTL", "CaptureCTL", "PlaybackMixer", "CaptureMixer", "CapturePCM") are prefixed with '_ucmHEXA.' string where HEXA is replaced by the unique hexadecimal number identifying the opened ucm manager handle. Syntax 4 LibraryConfig.a_label.SubstiConfig { # substituted library configuration like: usr_share_dir "${ConfLibDir}" } LibraryConfig.b_label.Config { # non-substituted library configuration like: usr_share_dir "/usr/share/alsa" } The File counterparts: LibraryConfig.c_label.SubstiFile "/some/path" LibraryConfig.d_label.File "/some/path" Note that for files the contents is substituted on the request, but the file name is always substituted (useful for ${ConfDir} etc.). The private configuration is not saved or preserved. It's life time belongs to the opened ucm manager handle. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* add support for GCC's LTOJaroslav Kysela2019-04-091-4/+4
|
* core: Proper reference of internal snd_dlopen()Takashi Iwai2018-01-041-1/+1
| | | | | | | | | | snd_dlopen() was recently rewritten to be versioned symbols, and we have to call it with INTERNAL() wrapper from the library itself. Add the proper declaration in the local header and fix the callers appropriately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Change snd_dlopen() function to return the error stringJaroslav Kysela2017-11-271-3/+3
| | | | | | | The dlopen() function might fail also for another reason than a missing file, thus return the error string from dlerror(). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Change FSF address (Franklin Street)Jaroslav Kysela2017-11-141-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* conf: Add thread-safe global tree referenceTakashi Iwai2016-05-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of open functions in alsa-lib have the call pattern: snd_config_update(); return snd_xxx_open(x, snd_config, ...); This means that the toplevel config gets updated, and passed to a local open function. Although snd_config_update() itself has a pthread mutex to be thread safe, the whole procedure above isn't thread safe. Namely, the global snd_config tree may be deleted and recreated at any time while the open function is being processed. This may lead to a data corruption and crash of the program. For avoiding the corruption, this patch introduces a refcount to config tree object. A few new helper functions are introduced as well: - snd_config_update_ref() does update and take the refcount of the toplevel tree. The obtained config tree has to be freed via snd_config_unref() below. - snd_config_ref() and snd_config_unref() manage the refcount of the config object. The latter eventually deletes the object when all references are gone. Along with these additions, the caller of snd_config_update() and snd_config global tree in alsa-lib are replaced with the new helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* fix _GNU_SOURCE handling & header inclusionMike Frysinger2015-10-121-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The configure script blindly adds -D_GNU_SOURCE to all build settings, even on non-GNU systems. This isn't too much of a big deal (even if it uses the wrong variable -- CFLAGS instead of CPPFLAGS), except that the alsa-lib source itself determines whether to use GNU features when this is defined (such as versionsort). So when we build on non-glibc systems, we get build failures like: src/ucm/parser.c:1268:18: error: 'versionsort' undeclared (first use in this function) #define SORTFUNC versionsort ^ src/ucm/parser.c:1272:54: note: in expansion of macro 'SORTFUNC' err = scandir(filename, &namelist, filename_filter, SORTFUNC); ^ The correct way to add these flags is to use the autoconf helper AC_USE_SYSTEM_EXTENSIONS. Unfortunately, that triggers some more bugs in the alsa build. This macro adds defines to config.h and not directly to CPPFLAGS, so it relies on files correctly including config.h before anything else. A number of alsa files do not do this leading to build failures. The fix there is to shuffle the includes around so that the local ones come first. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela2007-10-151-2/+2
|
* Allow build without libdl and libpthreadTakashi Iwai2007-03-221-1/+0
| | | | | Allow building alsa-lib without libdl and libpthread. Added new options to configure, --with-libdl and --with-pthread.
* initialize dl handles where it needs toBenoit Fouet2007-01-081-1/+1
| | | | | | | this trivial patch initializes dl handle in timer.c and timer_query.c where it needs to. Signed-off-by: Benoit Fouet <benoit.fouet@purplelabs.com>
* Fix missing snd_dlclose() in timer handlersTakashi Iwai2006-04-251-1/+10
| | | | | Call snd_dlclose() properly for the dlopened handlers in timer and timer_query closing functions.
* remove superfluous free() checksClemens Ladisch2006-02-271-2/+1
| | | | | free() correctly handles NULL pointers, so we can omit explicit checks for that condition.
* Do not abort in snd_xxx_close() functionsClemens Ladisch2006-02-271-3/+2
| | | | | | Remove several memory leaks by not aborting prematurely from a snd_xxx_close() function when some operation fails. This can happen when a USB device was unplugged.
* Fix compile warnings with gcc-4Takashi Iwai2005-06-281-2/+2
| | | | Fixed compile warnings with gcc-4 about pointer signedness.
* Fix doxygen documentsTakashi Iwai2005-05-241-3/+9
| | | | | Fix the warnings of doxygen parsing. Add some missing documentation.
* added full async interface to timer APIJaroslav Kysela2005-05-111-0/+53
| | | | | - added snd_async_add_timer_handler and snd_async_handler_get_timer functions - added async command to test/timer.c
* Fedora 4 patch - gcc4 fixesJaroslav Kysela2005-05-061-1/+1
|
* fixed documents to process properly via doxygen.Takashi Iwai2004-05-241-1/+1
|
* Added early event extension to the timer API - and a fix for the direct pluginsJaroslav Kysela2004-04-061-3/+30
|
* Fixed compilation --with-versioned=noJaroslav Kysela2003-03-111-4/+4
|
* Updated to new timer APIJaroslav Kysela2003-03-041-10/+79
|
* Timestamp update (struct timeval -> struct timespec).Jaroslav Kysela2003-02-281-1/+1
|
* fixed typo.Takashi Iwai2003-02-071-1/+1
|
* Added snd_timer_async() function.Jaroslav Kysela2003-02-061-0/+22
| | | | More updates to pcm_dmix.c .
* Added POLLNVAL to poll->eventsJaroslav Kysela2002-11-301-3/+3
|
* More documentation changes (rawmidi, timer)Jaroslav Kysela2002-02-111-0/+40
|
* Updated GNU GPL license (address).Jaroslav Kysela2001-12-301-5/+5
| | | | Changed GNU LGPL licence from 2.0 to 2.1.
* Added missing variable initialization in open_conf() functions (hwdep, ↵Jaroslav Kysela2001-12-271-5/+1
| | | | timer); Uros
* Added snd_*_poll_descriptors_revents functions.Jaroslav Kysela2001-11-301-3/+21
|
* Added snd_*_open_lconf functions.Jaroslav Kysela2001-11-241-0/+18
| | | | Some minor changes in config interface documentation.
* Configuration:Jaroslav Kysela2001-11-191-2/+10
| | | | | | | | | | | | | | | | - 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
* Changes for static build.Jaroslav Kysela2001-10-241-9/+11
|
* Fixed some typos for timer interface.Jaroslav Kysela2001-08-281-1/+1
|
* Added symbol versioning for dlsym-callbacks.Jaroslav Kysela2001-08-151-3/+7
| | | | Removed snd_config_refer_load from confmisc.c and pcm.c.
* Fixed broken initializationJaroslav Kysela2001-08-081-1/+1
|
* More documentation updates.Jaroslav Kysela2001-07-181-0/+1
|
* Added encapsulation for timer interfaceJaroslav Kysela2001-07-161-0/+339
|
* Updated timer interface to follow new uniform configuration style.Jaroslav Kysela2001-07-161-125/+273
|
* Lot of cleanings with the help of gcc3Abramo Bagnara2001-03-291-10/+0
|
* Added mode argument to open functions where it was missing. First part of ↵Abramo Bagnara2001-03-261-1/+1
| | | | CTL documentation
* Changed descriptors_countAbramo Bagnara2001-02-181-4/+2
|
* Changed behaviour of poll_descriptors function (returns the filled count of ↵Jaroslav Kysela2001-02-141-1/+10
| | | | | | | fds). Added poll_descriptors_count functions. Added snd_mixer_elem_count function.
* More generic support for poll descriptorsAbramo Bagnara2001-02-121-1/+11
|
* Control API encapsulation. Better names for kernel API. Simpler PCM ↵Abramo Bagnara2001-02-061-1/+0
| | | | hw_params API. Added missing const.
* Removed card type from devices info. Added card number to devices info. ↵Abramo Bagnara2001-01-311-1/+1
| | | | Completed encapsulation of PCM API. Removed snd_pcm_card(). All copy functions now have the form copy(dst, src).
* First step toward encapsulationAbramo Bagnara2001-01-291-13/+13
|
* Changes and cleanups for the timer API.Jaroslav Kysela2000-11-301-8/+5
| | | | The device lists use the next device syntax now.
* Merged pcmfinal branch.Jaroslav Kysela2000-11-201-13/+1
|
* Merged pcmplug branch.Jaroslav Kysela2000-09-241-1/+1
|
* Merged pcm2 branch.Jaroslav Kysela2000-05-081-1/+1
|