]> git.alsa-project.org Git - alsa-utils.git/commitdiff
More mixer updates (GUS), OSS API emulation..
authorJaroslav Kysela <perex@perex.cz>
Thu, 22 Jul 1999 22:23:42 +0000 (22:23 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 22 Jul 1999 22:23:42 +0000 (22:23 +0000)
amixer/amixer.c

index 970302bb253f4c3d8274f3d3aa19c0fbe337aa96..916e350cae16103f2aa5832c6479ed62ed208158 100644 (file)
@@ -780,19 +780,19 @@ int show_group(void *handle, snd_mixer_gid_t *gid, const char *space)
                        printf(" mute");
                if (group.caps & SND_MIXER_GRPCAP_JOINTLY_MUTE)
                        printf(" jointly-mute");
-               if (group.caps & SND_MIXER_GRPCAP_RECORD) {
-                       printf(" record");
+               if (group.caps & SND_MIXER_GRPCAP_CAPTURE) {
+                       printf(" capture");
                } else {
-                       group.record = 0;
+                       group.capture = 0;
                }
-               if (group.caps & SND_MIXER_GRPCAP_JOINTLY_RECORD)
-                       printf(" jointly-record");
-               if (group.caps & SND_MIXER_GRPCAP_EXCL_RECORD)
-                       printf(" exclusive-record");
+               if (group.caps & SND_MIXER_GRPCAP_JOINTLY_CAPTURE)
+                       printf(" jointly-capture");
+               if (group.caps & SND_MIXER_GRPCAP_EXCL_CAPTURE)
+                       printf(" exclusive-capture");
                printf("\n");
-               if ((group.caps & SND_MIXER_GRPCAP_RECORD) &&
-                   (group.caps & SND_MIXER_GRPCAP_EXCL_RECORD))
-                       printf("%sRecord exclusive group: %i\n", space, group.record_group);
+               if ((group.caps & SND_MIXER_GRPCAP_CAPTURE) &&
+                   (group.caps & SND_MIXER_GRPCAP_EXCL_CAPTURE))
+                       printf("%sCapture exclusive group: %i\n", space, group.capture_group);
                printf("%sChannels: ", space);
                if (group.channels == SND_MIXER_CHN_MASK_MONO) {
                        printf("Mono");
@@ -816,7 +816,7 @@ int show_group(void *handle, snd_mixer_gid_t *gid, const char *space)
                                                snd_mixer_channel_name(chn),
                                                get_percent(group.volume.values[chn], group.min, group.max),
                                                group.mute & (1<<chn) ? "mute" : "on",
-                                               group.record & (1<<chn) ? "record" : "---");
+                                               group.capture & (1<<chn) ? "capture" : "---");
                        }
                }
        }
@@ -1348,10 +1348,12 @@ int gset(int argc, char *argv[])
                } else if (!strncmp(argv[idx], "unmute", 6) ||
                           !strncmp(argv[idx], "on", 2)) {
                        group.mute = 0;
-               } else if (!strncmp(argv[idx], "rec", 3)) {
-                       group.record = group.channels;
-               } else if (!strncmp(argv[idx], "norec", 5)) {
-                       group.record = 0;
+               } else if (!strncmp(argv[idx], "capture", 7) ||
+                          !strncmp(argv[idx], "rec", 3)) {
+                       group.capture = group.channels;
+               } else if (!strncmp(argv[idx], "nocapture", 9) ||
+                          !strncmp(argv[idx], "norec", 5)) {
+                       group.capture = 0;
                } else if (isdigit(argv[idx][0])) {
                        char *ptr;
                        int vol;
@@ -1361,7 +1363,7 @@ int gset(int argc, char *argv[])
                        for (chn = 0; chn <= SND_MIXER_CHN_LAST; chn++) {
                                if (!(group.channels & (1<<chn)))
                                        continue;
-                               group.volume.values[idx] = vol;
+                               group.volume.values[chn] = vol;
                        }
                } else {
                        error("Unknown setup '%s'..\n", argv[idx]);