/** Async notification (flag for open mode) \hideinitializer */
#define SND_CTL_ASYNC 0x0002
+/** Read only (flag for open mode) \hideinitializer */
+#define SND_CTL_READONLY 0x0004
+
/** CTL handle */
typedef struct _snd_ctl snd_ctl_t;
assert(card >= 0 && card < 32);
sprintf(filename, SNDRV_FILE_CONTROL, card);
- fmode = O_RDWR;
+ if (mode & SND_CTL_READONLY)
+ fmode = O_RDONLY;
+ else
+ fmode = O_RDWR;
if (mode & SND_CTL_NONBLOCK)
fmode |= O_NONBLOCK;
if (mode & SND_CTL_ASYNC)
*/
void *snd_dlopen(const char *name, int mode)
{
- void *res;
-
#ifndef PIC
if (name == NULL)
return &snd_dlsym_start;