mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Add --disable-aload configure option
Added --disable-aload configure option to suppress probing of /dev/aload* files for auto-loading. These files often conflict with udev mechanism. Also, --with-resmgr is changed to --enable-resmgr.
This commit is contained in:
parent
49c9eba8e4
commit
4ea51d8201
3 changed files with 16 additions and 2 deletions
14
configure.in
14
configure.in
|
|
@ -173,8 +173,8 @@ esac
|
||||||
|
|
||||||
dnl Check for resmgr support...
|
dnl Check for resmgr support...
|
||||||
AC_MSG_CHECKING(for resmgr support)
|
AC_MSG_CHECKING(for resmgr support)
|
||||||
AC_ARG_WITH(resmgr,
|
AC_ARG_ENABLE(resmgr,
|
||||||
[ --with-resmgr support resmgr (optional)],
|
[ --enable-resmgr support resmgr (optional)],
|
||||||
resmgr="$withval", resmgr="no")
|
resmgr="$withval", resmgr="no")
|
||||||
AC_MSG_RESULT($resmgr)
|
AC_MSG_RESULT($resmgr)
|
||||||
if test "$resmgr" = "yes"; then
|
if test "$resmgr" = "yes"; then
|
||||||
|
|
@ -183,6 +183,16 @@ if test "$resmgr" = "yes"; then
|
||||||
AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
|
AC_DEFINE(SUPPORT_RESMGR, "1", [Support resmgr with alsa-lib])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Check for aload* support...
|
||||||
|
AC_MSG_CHECKING(for aload* support)
|
||||||
|
AC_ARG_ENABLE(aload,
|
||||||
|
[ --disable-aload disable reading /dev/aload*],
|
||||||
|
aload="$enableval", aload="yes")
|
||||||
|
AC_MSG_RESULT($aload)
|
||||||
|
if test "$aload" = "yes"; then
|
||||||
|
AC_DEFINE(SUPPORT_ALOAD, "1", [Support /dev/aload* access for auto-loading])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Make a symlink for inclusion of alsa/xxx.h
|
dnl Make a symlink for inclusion of alsa/xxx.h
|
||||||
if test ! -L include/alsa ; then
|
if test ! -L include/alsa ; then
|
||||||
echo "Making a symlink include/alsa"
|
echo "Making a symlink include/alsa"
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,13 @@ int snd_card_load(int card)
|
||||||
sprintf(control, SND_FILE_CONTROL, card);
|
sprintf(control, SND_FILE_CONTROL, card);
|
||||||
|
|
||||||
open_dev = snd_open_device(control, O_RDONLY);
|
open_dev = snd_open_device(control, O_RDONLY);
|
||||||
|
#ifdef SUPPORT_ALOAD
|
||||||
if (open_dev < 0) {
|
if (open_dev < 0) {
|
||||||
char aload[32];
|
char aload[32];
|
||||||
sprintf(aload, SND_FILE_LOAD, card);
|
sprintf(aload, SND_FILE_LOAD, card);
|
||||||
open_dev = snd_open_device(aload, O_RDONLY);
|
open_dev = snd_open_device(aload, O_RDONLY);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (open_dev >= 0) {
|
if (open_dev >= 0) {
|
||||||
close (open_dev);
|
close (open_dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
|
|
@ -441,6 +441,7 @@ int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
|
||||||
|
|
||||||
filename = SNDRV_FILE_SEQ;
|
filename = SNDRV_FILE_SEQ;
|
||||||
fd = snd_open_device(filename, fmode);
|
fd = snd_open_device(filename, fmode);
|
||||||
|
#ifdef SUPPORT_ALOAD
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
fd = snd_open_device(SNDRV_FILE_ALOADSEQ, fmode);
|
fd = snd_open_device(SNDRV_FILE_ALOADSEQ, fmode);
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
|
|
@ -451,6 +452,7 @@ int snd_seq_hw_open(snd_seq_t **handle, const char *name, int streams, int mode)
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* this is bogus, an application have to care about open filedescriptors
|
* this is bogus, an application have to care about open filedescriptors
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue