]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Added record channel operations.
authorJaroslav Kysela <perex@perex.cz>
Sun, 29 Nov 1998 16:30:35 +0000 (16:30 +0000)
committerJaroslav Kysela <perex@perex.cz>
Sun, 29 Nov 1998 16:30:35 +0000 (16:30 +0000)
include/mixer.h
src/mixer/mixer.c

index 2068be478b2dddc347c4850917c38a2882b3c4be..9de2b7af3ac2f73f2badf087227911fe6e35acb4 100644 (file)
@@ -26,6 +26,8 @@ int snd_mixer_channel(void *handle, const char *channel_id);
 int snd_mixer_channel_info(void *handle, int channel, snd_mixer_channel_info_t * info);
 int snd_mixer_channel_read(void *handle, int channel, snd_mixer_channel_t * data);
 int snd_mixer_channel_write(void *handle, int channel, snd_mixer_channel_t * data);
+int snd_mixer_channel_record_read(void *handle, int channel, snd_mixer_channel_t * data);
+int snd_mixer_channel_record_write(void *handle, int channel, snd_mixer_channel_t * data);
 int snd_mixer_switches(void *handle);
 int snd_mixer_switch_read(void *handle, int switchn, snd_mixer_switch_t * data);
 int snd_mixer_switch_write(void *handle, int switchn, snd_mixer_switch_t * data);
index 66f84a09b11dd21668dd3b92fec53663a115925e..b48171bf003889bdc29e4ccf0b183b90f4522e13 100644 (file)
@@ -190,6 +190,32 @@ int snd_mixer_channel_write(void *handle, int channel, snd_mixer_channel_t * dat
        return 0;
 }
 
+int snd_mixer_channel_record_read(void *handle, int channel, snd_mixer_channel_t * data)
+{
+       snd_mixer_t *mixer;
+
+       mixer = (snd_mixer_t *) handle;
+       if (!mixer)
+               return -EINVAL;
+       data->channel = channel;
+       if (ioctl(mixer->fd, SND_MIXER_IOCTL_CHANNEL_RREAD, data) < 0)
+               return -errno;
+       return 0;
+}
+
+int snd_mixer_channel_record_write(void *handle, int channel, snd_mixer_channel_t * data)
+{
+       snd_mixer_t *mixer;
+
+       mixer = (snd_mixer_t *) handle;
+       if (!mixer)
+               return -EINVAL;
+       data->channel = channel;
+       if (ioctl(mixer->fd, SND_MIXER_IOCTL_CHANNEL_RWRITE, data) < 0)
+               return -errno;
+       return 0;
+}
+
 int snd_mixer_switches(void *handle)
 {
        snd_mixer_t *mixer;