mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-07 13:30:07 -05:00
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:
parent
7e74f2ef1b
commit
77c925a71f
9 changed files with 121 additions and 15 deletions
|
|
@ -33,6 +33,9 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "control_local.h"
|
||||
#ifdef SUPPORT_RESMGR
|
||||
#include <resmgr.h>
|
||||
#endif
|
||||
|
||||
#ifndef DOC_HIDDEN
|
||||
#define SND_FILE_CONTROL "/dev/snd/controlC%i"
|
||||
|
|
@ -51,10 +54,19 @@ int snd_card_load(int card)
|
|||
|
||||
sprintf(control, SND_FILE_CONTROL, card);
|
||||
|
||||
if ((open_dev=open(control, O_RDONLY)) < 0) {
|
||||
#ifdef SUPPORT_RESMGR
|
||||
open_dev = rsm_open_device(control, O_RDONLY);
|
||||
#else
|
||||
open_dev = open(control, O_RDONLY);
|
||||
#endif
|
||||
if (open_dev < 0) {
|
||||
char aload[32];
|
||||
sprintf(aload, SND_FILE_LOAD, card);
|
||||
#ifdef SUPPORT_RESMGR
|
||||
open_dev = rsm_open_device(aload, O_RDONLY);
|
||||
#else
|
||||
open_dev = open(aload, O_RDONLY);
|
||||
#endif
|
||||
}
|
||||
if (open_dev >= 0) {
|
||||
close (open_dev);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue