diff options
author | Simon Wilson <simonwilson@google.com> | 2012-03-08 10:30:15 -0800 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2012-03-08 10:30:15 -0800 |
commit | 8fe2c93b75112bce4de1a08f61eca9c509d770c1 (patch) | |
tree | b2fa013f212d355e811e7fc99a481ae36780084b | |
parent | b29ac1ab6b1f4d78017d652e850a96893347fc29 (diff) |
mixer: remove redundant IOCTL_ELEM_READs
-rw-r--r-- | mixer.c | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -351,35 +351,21 @@ int mixer_ctl_set_value(struct mixer_ctl *ctl, unsigned int id, int value) int mixer_ctl_get_range_min(struct mixer_ctl *ctl) { - struct snd_ctl_elem_value ev; int ret; if (!ctl || (ctl->info->type != SNDRV_CTL_ELEM_TYPE_INTEGER)) return -EINVAL; - memset(&ev, 0, sizeof(ev)); - ev.id.numid = ctl->info->id.numid; - ret = ioctl(ctl->mixer->fd, SNDRV_CTL_IOCTL_ELEM_READ, &ev); - if (ret < 0) - return ret; - return ctl->info->value.integer.min; } int mixer_ctl_get_range_max(struct mixer_ctl *ctl) { - struct snd_ctl_elem_value ev; int ret; if (!ctl || (ctl->info->type != SNDRV_CTL_ELEM_TYPE_INTEGER)) return -EINVAL; - memset(&ev, 0, sizeof(ev)); - ev.id.numid = ctl->info->id.numid; - ret = ioctl(ctl->mixer->fd, SNDRV_CTL_IOCTL_ELEM_READ, &ev); - if (ret < 0) - return ret; - return ctl->info->value.integer.max; } |