mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
Fix resmgr support
Call normal open() before trying with res_open_device(). snd_open_device() is defined to do this procedure.
This commit is contained in:
parent
237d46cfb6
commit
f9b9015245
9 changed files with 30 additions and 94 deletions
|
|
@ -27,9 +27,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "timer_local.h"
|
||||
#ifdef SUPPORT_RESMGR
|
||||
#include <resmgr.h>
|
||||
#endif
|
||||
|
||||
#ifndef PIC
|
||||
/* entry for static linking */
|
||||
|
|
@ -214,11 +211,7 @@ 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;
|
||||
#ifdef SUPPORT_RESMGR
|
||||
fd = rsm_open_device(SNDRV_FILE_TIMER, tmode);
|
||||
#else
|
||||
fd = open(SNDRV_FILE_TIMER, tmode);
|
||||
#endif
|
||||
fd = snd_open_device(SNDRV_FILE_TIMER, tmode);
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "timer_local.h"
|
||||
#ifdef SUPPORT_RESMGR
|
||||
#include <resmgr.h>
|
||||
#endif
|
||||
|
||||
#ifndef PIC
|
||||
/* entry for static linking */
|
||||
|
|
@ -102,11 +99,7 @@ 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;
|
||||
#ifdef SUPPORT_RESMGR
|
||||
fd = rsm_open_device(SNDRV_FILE_TIMER, tmode);
|
||||
#else
|
||||
fd = open(SNDRV_FILE_TIMER, tmode);
|
||||
#endif
|
||||
fd = snd_open_device(SNDRV_FILE_TIMER, tmode);
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
if (ioctl(fd, SNDRV_TIMER_IOCTL_PVERSION, &ver) < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue