mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04: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
|
|
@ -39,9 +39,6 @@
|
|||
#include <sys/shm.h>
|
||||
#include "pcm_local.h"
|
||||
#include "../control/control_local.h"
|
||||
#ifdef SUPPORT_RESMGR
|
||||
#include <resmgr.h>
|
||||
#endif
|
||||
|
||||
//#define DEBUG_RW /* use to debug readi/writei/readn/writen */
|
||||
//#define DEBUG_MMAP /* debug mmap_commit */
|
||||
|
|
@ -1206,11 +1203,7 @@ int snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
|
|||
fmode |= O_NONBLOCK;
|
||||
if (mode & SND_PCM_ASYNC)
|
||||
fmode |= O_ASYNC;
|
||||
#ifdef SUPPORT_RESMGR
|
||||
fd = rsm_open_device(filename, fmode);
|
||||
#else
|
||||
fd = open(filename, fmode);
|
||||
#endif
|
||||
fd = snd_open_device(filename, fmode);
|
||||
if (fd < 0) {
|
||||
ret = -errno;
|
||||
SYSMSG("open %s failed", filename);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue