int snd_mixer_element_info(snd_mixer_t *handle, snd_mixer_element_info_t * info);
int snd_mixer_element_read(snd_mixer_t *handle, snd_mixer_element_t * element);
int snd_mixer_element_write(snd_mixer_t *handle, snd_mixer_element_t * element);
+int snd_mixer_read_filter(snd_mixer_t *handle, snd_mixer_filter_t * filter);
int snd_mixer_read(snd_mixer_t *handle, snd_mixer_callbacks_t * callbacks);
void snd_mixer_set_bit(unsigned int *bitmap, int bit, int val);
snd_mixer_t *mixer;
mixer = handle;
- if (!mixer)
+ if (!mixer || !elements)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_ELEMENTS, elements) < 0)
return -errno;
snd_mixer_t *mixer;
mixer = handle;
- if (!mixer)
+ if (!mixer || !routes)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_ROUTES, routes) < 0)
return -errno;
snd_mixer_t *mixer;
mixer = handle;
- if (!mixer)
+ if (!mixer || !groups)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_GROUPS, groups) < 0)
return -errno;
snd_mixer_t *mixer;
mixer = handle;
- if (!mixer)
+ if (!mixer || !group)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_GROUP_READ, group) < 0)
return -errno;
snd_mixer_t *mixer;
mixer = handle;
- if (!mixer)
+ if (!mixer || !group)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_GROUP_WRITE, group) < 0)
return -errno;
snd_mixer_t *mixer;
mixer = handle;
- if (!mixer)
+ if (!mixer || !info)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_ELEMENT_INFO, info) < 0)
return -errno;
snd_mixer_t *mixer;
mixer = handle;
- if (!mixer)
+ if (!mixer || !element)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_ELEMENT_READ, element) < 0)
return -errno;
snd_mixer_t *mixer;
mixer = handle;
- if (!mixer)
+ if (!mixer || !element)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_ELEMENT_WRITE, element) < 0)
return -errno;
return 0;
}
+int snd_mixer_read_filter(snd_mixer_t *handle, snd_mixer_filter_t * filter)
+{
+ snd_mixer_t *mixer;
+
+ mixer = handle;
+ if (!mixer || !filter)
+ return -EINVAL;
+ if (ioctl(mixer->fd, SND_MIXER_IOCTL_READ_FILTER, filter) < 0)
+ return -errno;
+ return 0;
+}
+
int snd_mixer_read(snd_mixer_t *handle, snd_mixer_callbacks_t * callbacks)
{
snd_mixer_t *mixer;