| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
It's helper for the "card" entries parsing. It reduces
the code in most of open_hw functions.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
| |
|
|
|
| |
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
| |
The multiply defined versioned symbols have to be called with
INTERNAL() wrapper.
Add the missing declarations of versioned timer API functions in the
local header, and use them in the callers in PCM.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
| |
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
Like pcm and rawmidi, each object parser needs to accept the hint
component. Now a new local function _snd_conf_generic_id() was
introduced to replace each call of "comment" and "type" field checks.
Also, the two existing identical functions for pcm and rawmidi are
removed and the new function is used commonly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| |
|
|
|
|
|
|
|
| |
- rename configure.in to configure.ac
- replace INCLUDES with AM_CPPFLAGS
- modernize AM_INIT_AUTOMAKE invocation
Signed-off-by: Patrick Welche <prlw1@cam.ac.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of keeping modified asound.h and asequencer.h, copy the files
in the kernel include/uapi/sound as is, and give some renames for
avoiding conflicts with alsa-lib's definitions.
Some structs, unions and typedefs in asound.h and asequencer.h are
once renamed in local.h before inclusion, then renamed back again.
A bonus by this action is that some local codes don't have to refer to
sndrv_xxx any longer. However, some codes like src/seq/seq.c need
explicit cast because of unavoidable conflicts of struct types.
Another significant change is that now snd_pcm_sw_params.period_event
field is removed. Instead, try to access the last reserved field
internally.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| |
|
|
|
|
| |
Now _GNU_SOURCE is already defined globally in configure.in.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| |
|
|
|
| |
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
| |
|
|
|
|
|
|
| |
The contents of the snd_timer_query_ops structure are not going to be
changed, so we might as well declare is as constant. This change avoids
a warning if some ops structure is actually defined as const.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
|
| |
|
|
|
|
|
| |
This excludes the mixer for now since it requires a change to the
public headers.
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
|
| | |
|
| |
|
|
|
| |
Allow building alsa-lib without libdl and libpthread.
Added new options to configure, --with-libdl and --with-pthread.
|
| |
|
|
| |
Fix the returned error code for the invalid timer definition.
|
| |
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
- Add missing pcm_empty entry
- Return the array pointer instead of the first array member.
Otherwise only the first entry is linked to the binary.
|
| |
|
|
| |
See: bug#2465
|
| |
|
|
|
| |
Call snd_dlclose() properly for the dlopened handlers in timer
and timer_query closing functions.
|
| |
|
|
|
| |
Suppress warning messages when the new timer ioctl isn't available
(happening when using dmix in the new alsa-lib with older kernels).
|
| |
|
|
|
|
| |
Add configuration options to change the default device path from the
default /dev/snd. This is useful for embedded systems that do not want
subdirectories in /dev.
|
| |
|
|
|
| |
free() correctly handles NULL pointers, so we can omit explicit checks
for that condition.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
- this patch adds support for suspend & result for dmix and other
direct plugins
- the timer detection / initialization (TREAD support) was redesigned and
the check for proper driver version was moved to the timer_hw.c
|
| | |
|
| |
|
|
| |
Fixed compile warnings with gcc-4 about pointer signedness.
|
| |
|
|
|
| |
Fix the warnings of doxygen parsing.
Add some missing documentation.
|
| |
|
|
|
| |
Change values of some timer ioctls to avoid confliction with FIO* ioctls.
Use old ioctls if the timer protocol version doesn't match.
|
| |
|
|
|
| |
- added snd_async_add_timer_handler and snd_async_handler_get_timer functions
- added async command to test/timer.c
|
| |
|
|
|
| |
- new snd_names_list and snd_names_list_free functions
- added snd_timer_ginfo related functions to the timer API
|
| | |
|
| |
|
|
|
| |
Call normal open() before trying with res_open_device().
snd_open_device() is defined to do this procedure.
|
| |
|
|
|
| |
Added the support for resmgr. A new configure option --with-resmgr is added
to enable the resmgr support.
|
| | |
|
| | |
|
| |
|
|
| |
rewritten with C99 struct initialization style.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
More updates to pcm_dmix.c .
|