diff options
author | Jaroslav Kysela <perex@perex.cz> | 2009-05-12 08:05:50 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2009-05-15 14:18:15 +0200 |
commit | ecd6846c88d24f2a03895115b8ebf50679af69f3 (patch) | |
tree | 6880963798e200e7dcc3ef962e0149434bf709b1 /src/control/control_shm.c | |
parent | 3e30007a19a0904ad7c8965b0883322639e52b82 (diff) | |
download | alsa-lib-ecd6846c88d24f2a03895115b8ebf50679af69f3.tar.gz |
Initial amixer implementation + ctl & hctl API mergingamixer
This patch adds new mixer API which simplifies the previous mixer
API (removed mixer class).
The control and hcontrol APIs were merged into one.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'src/control/control_shm.c')
-rw-r--r-- | src/control/control_shm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/control/control_shm.c b/src/control/control_shm.c index abab3983..721ee69e 100644 --- a/src/control/control_shm.c +++ b/src/control/control_shm.c @@ -535,7 +535,7 @@ int snd_ctl_shm_open(snd_ctl_t **handlep, const char *name, const char *sockname shm->socket = sock; shm->ctrl = ctrl; - err = snd_ctl_new(&ctl, SND_CTL_TYPE_SHM, name); + err = snd_ctl_new(&ctl, SND_CTL_TYPE_SHM, name, mode); if (err < 0) { result = err; goto _err; @@ -548,6 +548,13 @@ int snd_ctl_shm_open(snd_ctl_t **handlep, const char *name, const char *sockname return err; } ctl->poll_fd = err; + if (mode & SND_CTL_CACHE) { + err = snd_ctl_cache_load(ctl); + if (err < 0) { + snd_ctl_close(ctl); + return err; + } + } *handlep = ctl; return 0; |