Mixer interface updates (group extensions)..

This commit is contained in:
Jaroslav Kysela 1999-07-20 22:00:59 +00:00
parent 0a512c7d25
commit b85839431d
2 changed files with 16 additions and 29 deletions

View file

@ -26,12 +26,11 @@ int snd_mixer_info(snd_mixer_t *handle, snd_mixer_info_t * info);
int snd_mixer_elements(snd_mixer_t *handle, snd_mixer_elements_t * elements);
int snd_mixer_routes(snd_mixer_t *handle, snd_mixer_routes_t * routes);
int snd_mixer_groups(snd_mixer_t *handle, snd_mixer_groups_t * groups);
int snd_mixer_group(snd_mixer_t *handle, snd_mixer_group_t * group);
int snd_mixer_group_read(snd_mixer_t *handle, snd_mixer_group_t * group);
int snd_mixer_group_write(snd_mixer_t *handle, snd_mixer_group_t * group);
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_channel_read(snd_mixer_t *handle, snd_mixer_channels_t * channels);
int snd_mixer_channel_write(snd_mixer_t *handle, snd_mixer_channels_t * channels);
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);

View file

@ -144,14 +144,26 @@ int snd_mixer_groups(snd_mixer_t *handle, snd_mixer_groups_t * groups)
return 0;
}
int snd_mixer_group(snd_mixer_t *handle, snd_mixer_group_t * group)
int snd_mixer_group_read(snd_mixer_t *handle, snd_mixer_group_t * group)
{
snd_mixer_t *mixer;
mixer = handle;
if (!mixer)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_GROUP, group) < 0)
if (ioctl(mixer->fd, SND_MIXER_IOCTL_GROUP_READ, group) < 0)
return -errno;
return 0;
}
int snd_mixer_group_write(snd_mixer_t *handle, snd_mixer_group_t * group)
{
snd_mixer_t *mixer;
mixer = handle;
if (!mixer)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_GROUP_WRITE, group) < 0)
return -errno;
return 0;
}
@ -192,30 +204,6 @@ int snd_mixer_element_write(snd_mixer_t *handle, snd_mixer_element_t * element)
return 0;
}
int snd_mixer_channel_read(snd_mixer_t *handle, snd_mixer_channels_t * channels)
{
snd_mixer_t *mixer;
mixer = handle;
if (!mixer)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_CHANNEL_READ, channels) < 0)
return -errno;
return 0;
}
int snd_mixer_channel_write(snd_mixer_t *handle, snd_mixer_channels_t * channels)
{
snd_mixer_t *mixer;
mixer = handle;
if (!mixer)
return -EINVAL;
if (ioctl(mixer->fd, SND_MIXER_IOCTL_CHANNEL_WRITE, channels) < 0)
return -errno;
return 0;
}
int snd_mixer_read(snd_mixer_t *handle, snd_mixer_callbacks_t * callbacks)
{
snd_mixer_t *mixer;