Add resmgr support

Added the support for resmgr.  A new configure option --with-resmgr is added
to enable the resmgr support.
This commit is contained in:
Takashi Iwai 2005-01-26 10:50:28 +00:00
parent 7e74f2ef1b
commit 77c925a71f
9 changed files with 121 additions and 15 deletions

View file

@ -27,6 +27,9 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include "timer_local.h"
#ifdef SUPPORT_RESMGR
#include <resmgr.h>
#endif
#ifndef PIC
/* entry for static linking */
@ -211,7 +214,12 @@ int snd_timer_hw_open(snd_timer_t **handle, const char *name, int dev_class, int
tmode = O_RDONLY;
if (mode & SND_TIMER_OPEN_NONBLOCK)
tmode |= O_NONBLOCK;
if ((fd = open(SNDRV_FILE_TIMER, tmode)) < 0)
#ifdef SUPPORT_RESMGR
fd = rsm_open_device(SNDRV_FILE_TIMER, tmode);
#else
fd = open(SNDRV_FILE_TIMER, tmode);
#endif
if (fd < 0)
return -errno;
#if 0
/*

View file

@ -26,6 +26,9 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include "timer_local.h"
#ifdef SUPPORT_RESMGR
#include <resmgr.h>
#endif
#ifndef PIC
/* entry for static linking */
@ -99,7 +102,12 @@ int snd_timer_query_hw_open(snd_timer_query_t **handle, const char *name, int mo
tmode = O_RDONLY;
if (mode & SND_TIMER_OPEN_NONBLOCK)
tmode |= O_NONBLOCK;
if ((fd = open(SNDRV_FILE_TIMER, tmode)) < 0)
#ifdef SUPPORT_RESMGR
fd = rsm_open_device(SNDRV_FILE_TIMER, tmode);
#else
fd = open(SNDRV_FILE_TIMER, tmode);
#endif
if (fd < 0)
return -errno;
if (ioctl(fd, SNDRV_TIMER_IOCTL_PVERSION, &ver) < 0) {
close(fd);